/* css/main.css - 視覺設定與共用元件 */
:root { 
    --bg-base: #F7F5F0; --bg-card: #FFFCF9; --bg-panel: rgba(255, 255, 255, 0.75);
    --text-main: #4B4338; --text-sub: #8C8479; --border-line: #E0DCD3;
    --accent-red: #A63737; --accent-green: #5B7A58; --accent-blue: #4A6C8C; --accent-gold: #D4A373;
    --hover-bg: rgba(75, 67, 56, 0.05); --active-bg: rgba(75, 67, 56, 0.1);
    --radius-std: 6px; --radius-l: 12px;
    --shadow-paper: 0 2px 8px rgba(75, 67, 56, 0.06); --shadow-float: 0 8px 24px rgba(75, 67, 56, 0.12);
    --glass-blur: 15px;
    --font-main: 'Noto Sans TC', sans-serif; --font-serif: 'Noto Serif TC', serif;

    /* [列印變數] 初始值 */
    --print-width: 58mm;
    --print-font-size: 12px;
    --print-kitchen-font-size: 14px;
    --print-padding: 0mm;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; } 
body { margin: 0; padding: 0; height: 100vh; height: 100dvh; font-family: var(--font-main); background-color: var(--bg-base); color: var(--text-main); overflow: hidden; -webkit-user-select: none; user-select: none; background-image: radial-gradient(#E0DCD3 1px, transparent 1px); background-size: 20px 20px; touch-action: pan-x pan-y; overscroll-behavior: none; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: #C7C2B8; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

button { cursor: pointer; font-family: inherit; outline: none; border: none; transition: all 0.2s ease; background: transparent; touch-action: manipulation; }
button:active { transform: translateY(1px); opacity: 0.8; }
button:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-muji { padding: 8px 20px; border: 1px solid var(--border-line); border-radius: var(--radius-std); background: #fff; color: var(--text-main); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.5px; }
.btn-muji:hover { border-color: var(--text-sub); background: var(--bg-base); }
.btn-primary { background: var(--text-main); color: #fff; border: 1px solid var(--text-main); padding: 8px 24px; border-radius: var(--radius-std); font-weight: 500; font-size: 0.8rem; }
.btn-primary:hover { background: #332D25; }
.icon-btn { color: var(--text-sub); font-size: 1.5rem; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.icon-btn:hover { background: rgba(0,0,0,0.05); color: var(--text-main); }
.icon-btn.active { color: var(--accent-gold); background: rgba(212, 163, 115, 0.1); }

/* Common Inputs */
.muji-input { padding: 10px 15px; border: 1px solid var(--border-line); border-radius: 4px; font-size: 1rem; color: var(--text-main); background: #FCFCFB; width: 100%; font-family: inherit; transition: 0.2s; margin-bottom: 15px; }
.muji-input:focus { border-color: var(--text-sub); background: #fff; outline: none; }
.muji-label { display: block; margin-bottom: 5px; font-weight: 500; color: var(--text-sub); font-size: 0.9rem; }

/* Modals */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(75, 67, 56, 0.4); backdrop-filter: blur(4px); z-index: 1000; justify-content: center; align-items: center; }
.simple-modal { background: #fff; border-radius: var(--radius-std); width: 90%; max-width: 400px; padding: 30px; box-shadow: var(--shadow-float); text-align: center; }
.sm-header { font-family: var(--font-serif); font-size: 1.4rem; font-weight: bold; margin-bottom: 25px; color: var(--text-main); }

/* Keypad UI */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.key-btn { height: 60px; font-size: 1.4rem; font-weight: 500; border: 1px solid var(--border-line); border-radius: 4px; color: var(--text-main); background: #FCFCFB; touch-action: manipulation; }
.key-btn:active { background: #ECEBE8; }
.key-btn.confirm { background: var(--text-main); color: #fff; border-color: var(--text-main); }
.key-btn.clear { color: var(--accent-red); border-color: rgba(166,55,55,0.3); }
.inline-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 15px; }
.ik-btn { padding: 12px 0; font-size: 1.2rem; border: 1px solid var(--border-line); border-radius: 4px; background: #fff; font-weight: 500; color: var(--text-main); cursor: pointer; touch-action: manipulation; }
.ik-btn:active { background: #eee; }
.ik-btn.backspace { color: var(--accent-red); }

/* Utility Text Classes */
.text-accent { color: var(--accent-red); }
.text-gold { color: var(--accent-gold); }