/* TaiwanMate phase-1 — plain, mobile-first. Polish is intentionally minimal. */
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #1f2937; background: #f8fafc; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: #0f766e; color: #fff; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 44px; height: 44px; border-radius: 10px; }
.name { font-size: 22px; font-weight: 800; }
.tagline { font-size: 13px; opacity: .9; }
.auth-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lang-wrap select { padding: 7px 9px; border: 1px solid #99f6e4; border-radius: 8px; background: #fff; color: #134e4a; font-size: 14px; }
.auth-box input { padding: 7px 9px; border: 1px solid #99f6e4; border-radius: 8px; width: 150px; }
button { cursor: pointer; border: 0; border-radius: 8px; padding: 8px 14px; background: #0f766e; color: #fff; font-size: 15px; }
button.secondary { background: #e2e8f0; color: #1f2937; }
button:disabled { opacity: .5; cursor: default; }
nav { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; background: #fff; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; }
nav button { background: #f1f5f9; color: #1f2937; white-space: nowrap; }
nav button.active { background: #0f766e; color: #fff; }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
.tab { display: none; }
.tab.active { display: block; }
h1 { font-size: 22px; }
h2 { font-size: 18px; margin-top: 22px; }
.row { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; align-items: center; }
.row input, .row select { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 15px; }
.grow { flex: 1; min-width: 180px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.entry { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; }
.entry .hz { font-size: 26px; font-weight: 700; }
.entry .py { color: #0f766e; }
.entry .ex { color: #475569; font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.card { background: #fff; color: #1f2937; border: 1px solid #e2e8f0; text-align: left; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.card span { color: #475569; font-size: 14px; }
.promo, .note { background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: 12px; padding: 12px; }
.note { font-size: 14px; color: #475569; }
.chat { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.msg { padding: 10px 12px; border-radius: 12px; max-width: 90%; white-space: pre-wrap; }
.msg.user { background: #ccfbf1; align-self: flex-end; }
.msg.ai { background: #fff; border: 1px solid #e2e8f0; align-self: flex-start; }
.tbl { border-collapse: collapse; width: 100%; background: #fff; }
.tbl th, .tbl td { border: 1px solid #e2e8f0; padding: 8px; text-align: left; font-size: 14px; }
.err { color: #b91c1c; }
.ok { color: #0f766e; }
footer { text-align: center; color: #64748b; font-size: 13px; padding: 20px; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: flex-start; justify-content: center; padding: 24px 12px; z-index: 50; overflow-y: auto; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: 12px; padding: 20px; max-width: 520px; width: 100%; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.modal-box ol { padding-left: 20px; }
.modal-box li { margin: 8px 0; }
.modal-box button.active { background: #0f766e; color: #fff; }
