/* "dusk glass" — see DESIGN.md. The only place colours, radii and fonts are defined. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Noto+Sans+Thai:wght@300;400;500;600&display=swap");

:root {
  --ink: #20174e;
  --ink-soft: rgba(32, 23, 78, 0.62);
  --hair: rgba(32, 23, 78, 0.08);
  --bg: linear-gradient(180deg, #f3e9e6 0%, #e6d6ec 45%, #cdb3e0 75%, #b99ad8 100%);
  --bg-calm: linear-gradient(180deg, #f6eeeb 0%, #efe4f1 100%);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.6);
  --violet: linear-gradient(160deg, #8b6cf0 0%, #b49af7 100%);
  --cyan: #00f0ff;
  --r-card: 16px;
  --r-input: 12px;
  --r-pill: 100px;
  --font: "Inter", "Noto Sans Thai", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg-calm);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
body.dusk { background: var(--bg); background-attachment: fixed; }

.page { max-width: 1120px; margin: 0 auto; padding: 24px 16px 96px; }
.display { font-size: clamp(40px, 6vw, 56px); line-height: 1.05; font-weight: 300; letter-spacing: -0.02em; margin: 0 0 12px; }
h2, .h2 { font-size: 32px; line-height: 1.15; font-weight: 300; letter-spacing: -0.01em; margin: 0 0 12px; }
h3, .h3 { font-size: 20px; font-weight: 500; margin: 0 0 8px; }
.muted, small { color: var(--ink-soft); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 20px;
}
.tile-violet { background: var(--violet); color: #fff; border-radius: var(--r-card); padding: 20px; }

/* One row that scrolls sideways on a phone — wrapping turned the bar into a blob at 390px. */
.pill-nav {
  display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none;
  width: fit-content; max-width: 100%; margin: 0 auto 24px; padding: 6px;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--r-pill);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.pill-nav a { flex: none; white-space: nowrap; padding: 10px 16px; border-radius: var(--r-pill); color: var(--ink); text-decoration: none; font-size: 15px; }
.pill-nav a[aria-current="page"] { background: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  font: inherit; font-size: 15px; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }

.field {
  width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; color: var(--ink);
  background: rgba(255, 255, 255, 0.7); border: 1px solid var(--glass-border); border-radius: var(--r-input);
}
.btn:focus-visible, .field:focus-visible, .pill-nav a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-weight: 500; color: var(--ink-soft); font-size: 13px; padding: 8px 10px; }
.table td { padding: 12px 10px; border-top: 1px solid var(--hair); }
.table td.num, .table th.num { text-align: right; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.7); font-size: 13px; }
.badge-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.shop-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }
.sticky-cart { position: sticky; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
