/* Shared design tokens and base components. */

:root {
  --ink: #18233a;
  --muted: #5b6783;
  --white: #ffffff;
  --bg: #f4f7fa;
  --line: #dce3ec;
  --amber: #f2a93b;
  --amber-bg: #fff4de;
  --amber-bd: #f2d9a6;
  --amber-txt: #9a5b00;
  --teal: #17a596;
  --green-txt: #2d6a45;
  --green-bg: #e4f1e6;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --lock-bg: #e3e8ef;
  --lock-ic: #6e7d96;
  --font-ui: "Manrope", "Noto Sans SC", "Noto Sans Tamil", system-ui, sans-serif;
  /* Used for Chinese and Tamil text */
  --font-cjk: "Noto Sans SC", "Noto Sans Tamil", sans-serif;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --bar-h: 72px;
  --nav-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; }

/* Keep the page the same width whether or not a scrollbar shows, so moving
   between screens never makes the layout jump sideways. */
html { scrollbar-gutter: stable; }

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: #e8edf3;
  -webkit-font-smoothing: antialiased;
}

.app {
  position: relative;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
}

.icon { display: block; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 24px; border: none; border-radius: 27px;
  font: 800 17px var(--font-ui); text-decoration: none; cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-sm { min-height: 44px; padding: 0 18px; border-radius: 22px; font-size: 15px; }
.btn-block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px 0 16px; border-radius: 22px;
  background: var(--white); border: 1px solid var(--line);
  font: 700 15px var(--font-ui); color: var(--ink); cursor: pointer;
}
.chip .chip-glyph { font-family: var(--font-cjk); font-weight: 700; }
.chip .icon { color: var(--muted); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: var(--white); border: 1px solid var(--line);
  color: var(--ink); cursor: pointer; text-decoration: none; flex-shrink: 0;
}
.icon-btn.muted { color: var(--muted); }

/* ---- form fields ---- */
.field {
  width: 100%; min-height: 48px; padding: 0 14px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--white);
  font: 500 16px var(--font-ui); color: var(--ink);
}
.field::placeholder { color: #8190a8; }

/* ---- status messages ---- */
.status-message {
  margin: 12px 20px 0; padding: 10px 14px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14px; line-height: 1.4;
}
.status-message:empty { display: none; }
.status-error { background: var(--danger-bg); color: var(--danger); }
.status-success { background: var(--green-bg); color: var(--green-txt); }
.status-info { background: #eaf1fb; color: #24477a; }

.empty-state {
  margin: 24px 20px; text-align: center; color: var(--muted);
  font-weight: 600; font-size: 14px; line-height: 1.5;
}