:root{--safe-top: max(env(safe-area-inset-top), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));--safe-bottom: max(env(safe-area-inset-bottom), calc(var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)));--brand: #0a5bff;--brand-strong: #0847c9;--brand-soft: #e8f0ff;--ink: #111827;--ink-2: #374151;--muted: #4b5563;--faint: #9ca3af;--page: #f3f4f7;--card: #ffffff;--line: #e5e7eb;--fill: #f3f4f6;--green: #16a34a;--green-ink: #14532d;--green-soft: #dcfce7;--orange-ink: #7c2d12;--orange-soft: #ffedd5;--orange-line: #fb923c;--red: #dc2626;--red-ink: #7f1d1d;--red-soft: #fee2e2;--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Khmer", sans-serif}html:lang(km){--sans: "Kantumruy Pro", "Noto Sans Khmer", "Inter", system-ui, sans-serif}html:lang(km) body{line-height:1.6}*{box-sizing:border-box}html,body{height:100%;margin:0;background:var(--page);color:var(--ink);font:15px/1.45 var(--sans);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}#app{max-width:480px;min-height:100%;margin:0 auto;background:var(--page);display:flex;flex-direction:column}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer}button:disabled,button[aria-disabled=true]{cursor:not-allowed}:focus-visible{outline:2px solid var(--brand);outline-offset:2px}a{color:var(--brand-strong)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.topbar{position:sticky;top:0;z-index:5;padding:calc(8px + var(--safe-top)) 12px 8px;background:var(--card);border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}.topbar .side{display:flex;align-items:center;gap:6px}.topbar .side.end{justify-content:flex-end}.topbar h1{margin:0;font-size:16px;font-weight:700;text-align:center}.topbar .sub{display:block;font-size:11px;font-weight:500;color:var(--muted);text-align:center}.link-btn{border:0;background:transparent;color:var(--brand-strong);font-weight:600;padding:10px 4px;min-height:44px;display:inline-flex;align-items:center;gap:4px;text-decoration:none}.icon-btn{width:40px;height:40px;border-radius:50%;border:0;background:var(--fill);display:inline-flex;align-items:center;justify-content:center;color:var(--ink)}.lang-btn{border:1px solid var(--line);background:var(--card);border-radius:999px;min-width:44px;min-height:36px;padding:6px 10px;font-size:12px;font-weight:700}.offline-bar{background:var(--ink);color:#fff;padding:10px 16px;font-size:13px;display:flex;gap:8px;align-items:center}.offline-bar svg{color:#fbbf24;flex:none}.page{flex:1;padding:14px 16px 24px;display:flex;flex-direction:column;gap:12px}.footer{position:sticky;bottom:0;background:var(--card);border-top:1px solid var(--line);padding:12px 16px calc(14px + var(--safe-bottom));display:flex;flex-direction:column;gap:8px}.btn{border:0;border-radius:14px;min-height:50px;padding:12px 16px;font-weight:700;font-size:16px;background:var(--brand);color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;transition:transform .08s}.btn:active{transform:scale(.98)}.btn:disabled,.btn[aria-disabled=true]{background:var(--line);color:var(--muted)}.btn.green{background:var(--green)}.btn.ghost{background:var(--card);color:var(--ink);border:1px solid var(--line)}.btn.danger{background:var(--card);color:#b91c1c;border:1px solid #fecaca}.btn.danger-solid{background:var(--red);color:#fff}.btn.small{min-height:44px;font-size:14px;border-radius:12px;flex:1}.segmented{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:var(--line);border-radius:12px;padding:3px;gap:3px}.segmented button{border:0;border-radius:10px;background:transparent;min-height:40px;font-size:13px;font-weight:700}.segmented button[aria-checked=true]{background:var(--card);box-shadow:0 1px 3px #1118271f}.chips{display:flex;gap:6px;flex-wrap:wrap}.chip{border:1px solid var(--line);background:var(--card);border-radius:999px;min-height:40px;padding:8px 13px;font-size:13px;font-weight:700}.chip[aria-selected=true],.chip[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:#fff}.chip .count{margin-left:4px;font-variant-numeric:tabular-nums;color:var(--muted)}.chip[aria-selected=true] .count{color:#cbd5e1}.pill{font-size:12px;font-weight:700;padding:5px 10px;border-radius:999px;white-space:nowrap}.pill.orange{background:var(--orange-soft);color:var(--orange-ink)}.pill.blue{background:var(--brand-soft);color:var(--brand-strong)}.pill.green{background:var(--green-soft);color:var(--green-ink)}.pill.red{background:var(--red-soft);color:var(--red-ink)}.field{display:flex;flex-direction:column;gap:6px}.field>span{font-size:13px;font-weight:600;color:var(--ink-2)}.input{width:100%;border:1px solid var(--line);border-radius:12px;padding:12px 14px;font-size:16px;background:var(--card)}textarea.input{resize:none}.card{background:var(--card);border-radius:18px;padding:16px;display:flex;flex-direction:column;gap:12px}.card h2{margin:0;font-size:15px;font-weight:700}.tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tile{background:var(--card);border-radius:16px;padding:12px 14px;display:flex;flex-direction:column;gap:2px}.tile span{font-size:12px;font-weight:600;color:var(--muted)}.tile strong{font-size:22px;font-weight:800;font-variant-numeric:tabular-nums}.notice{border-radius:12px;padding:10px 12px;font-size:13px;line-height:1.45;display:flex;flex-direction:column;gap:4px}.notice.blue{background:var(--brand-soft);color:var(--brand-strong)}.notice.green{background:var(--green-soft);color:var(--green-ink)}.notice.orange{background:var(--orange-soft);color:var(--orange-ink);border:1px solid #fed7aa}.notice.red{background:var(--red-soft);color:var(--red-ink)}.notice.gray{background:var(--fill);color:var(--ink-2)}.empty{background:var(--card);border-radius:16px;padding:28px 18px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;color:var(--muted)}.empty strong{color:var(--ink);font-size:15px}.skeleton{display:block;border-radius:16px;background:linear-gradient(90deg,#e5e7eb,#eef0f3,#e5e7eb);background-size:200% 100%;animation:shimmer 1.2s infinite linear}@keyframes shimmer{to{background-position:-200% 0}}@media (prefers-reduced-motion: reduce){.skeleton{animation:none}}.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;background:#11182773;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}.sheet{width:100%;max-width:480px;max-height:92vh;overflow-y:auto;background:var(--card);border-radius:22px 22px 0 0;padding:16px 16px calc(20px + var(--safe-bottom));display:flex;flex-direction:column;gap:14px}.sheet-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.sheet-head h2{margin:0;font-size:19px;font-weight:800}.sheet-head p{margin:2px 0 0;font-size:13px;color:var(--muted)}.toast{position:fixed;left:50%;bottom:calc(96px + var(--safe-bottom));transform:translate(-50%);z-index:30;width:min(440px,calc(100% - 32px));background:var(--ink);color:#fff;border-radius:12px;padding:12px 14px;font-size:14px;font-weight:600;text-align:center}.radio-row{display:flex;align-items:center;gap:10px;border:1px solid var(--line);background:var(--card);border-radius:12px;padding:12px;min-height:46px;font-size:14px;font-weight:600;text-align:left}.radio-row[aria-checked=true]{border-color:var(--brand);background:var(--brand-soft)}.radio-row .dot{width:16px;height:16px;border-radius:50%;flex:none;border:2px solid var(--faint)}.radio-row[aria-checked=true] .dot{border:5px solid var(--brand)}
