:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface2: #ffffff;
  --border: #e3e8f0;
  --text: #0f172a;
  --muted: #5b6878;
  --accent: #2563eb;
  --success: #059669;
  --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; min-height: 100vh; }

nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 20px; }
.nav-inner { max-width: 600px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 52px; }
.logo { font-weight: 700; font-size: 1.1rem; }
.nav-badge { font-size: .75rem; color: var(--muted); background: var(--surface2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 20px; }

.container { max-width: 600px; margin: 0 auto; padding: 28px 20px; }
.calc-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }

.field { margin-bottom: 22px; }
.field-label { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }

/* BILL */
.amount-row { display: flex; align-items: center; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .15s; }
.amount-row:focus-within { border-color: var(--accent); }
.currency-sym { padding: 0 14px; font-size: 1.4rem; color: var(--muted); }
.bill-input { flex: 1; background: transparent; border: none; color: var(--text); font-size: 2rem; font-weight: 700; padding: 12px 12px 12px 0; outline: none; font-family: 'Consolas', monospace; }

/* TIP PRESETS */
.tip-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.tip-btn { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 10px 16px; border-radius: var(--radius); cursor: pointer; font-size: .9rem; font-weight: 600; transition: all .15s; }
.tip-btn:hover { border-color: var(--accent); }
.tip-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tip-btn.custom.active { background: #3a1e60; border-color: #2563eb; color: #2563eb; }
.custom-wrap { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .9rem; color: var(--muted); }
.custom-input { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 8px 12px; border-radius: 6px; width: 80px; font-size: 1rem; outline: none; text-align: center; }
.custom-input:focus { border-color: var(--accent); }

/* PEOPLE */
.people-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.count-btn { background: var(--surface2); border: 1px solid var(--border); color: var(--text); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; transition: background .15s; }
.count-btn:hover { background: var(--border); }
.people-num { font-size: 1.4rem; font-weight: 700; min-width: 30px; text-align: center; }
.people-slider { flex: 1; accent-color: var(--accent); min-width: 100px; }
.people-label { font-size: .85rem; color: var(--muted); min-width: 60px; }

/* ROUND */
.round-row { display: flex; gap: 18px; flex-wrap: wrap; }
.radio-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: .875rem; color: var(--muted); }
.radio-label input { accent-color: var(--accent); }

/* RESULTS */
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.result-card { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.result-card.highlight { background: #1e2445; border-color: var(--accent); }
.rc-label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.rc-value { font-size: 1.6rem; font-weight: 700; font-family: 'Consolas', monospace; color: var(--text); }
.result-card.highlight .rc-value { color: var(--accent); }

/* TIP GUIDE */
.tip-guide { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.tg-title { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.tg-grid { display: flex; flex-direction: column; gap: 0; }
.tg-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.tg-row:last-child { border-bottom: none; }
.tg-place { color: var(--text); }
.tg-range { color: var(--accent); font-weight: 500; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
