@font-face { font-family: "Neil Bold Pro"; src: url("assets/neil-bold-pro.otf") format("opentype"); font-display: swap; }

/* Same palette and type as the NARITA site (redesign.html) */
:root {
  --bg: #0b0a09;
  --bg-2: #100e0c;
  --bg-3: #161412;
  --fg: #efe7dc;
  --accent: #e64d28;
  --muted: rgba(239, 231, 220, .66);
  --faint: rgba(239, 231, 220, .45);
  --line: rgba(239, 231, 220, .12);
  --line-strong: rgba(239, 231, 220, .3);
  --pad: 16px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --safe-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--bg); }
body { margin: 0; min-height: 100dvh; color: var(--fg); font: 400 16px/1.55 "Onest", system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }

.display { font-family: "Neil Bold Pro", "Onest", sans-serif; font-weight: 400; font-synthesis: none; }
.jp { font-family: "Noto Serif JP", serif; font-weight: 300; }
.grain { position: fixed; inset: 0; z-index: 100; pointer-events: none; background: url(assets/grain.png) 0 0 / 260px; opacity: .035; mix-blend-mode: screen; }

/* Preloader */
html.is-loading { overflow: hidden; }
.preloader { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; background: var(--bg); }
.preloader-inner { display: grid; justify-items: center; gap: 22px; }
.preloader-logo { display: inline-flex; align-items: center; gap: .32em; font-size: 48px; line-height: 1; letter-spacing: .14em; }
.preloader-logo .logo-seal { width: 1.1em; height: 1.1em; }
.preloader-track { width: 140px; height: 1px; overflow: hidden; background: var(--line); }
.preloader-bar { display: block; height: 100%; background: var(--accent); transform: scaleX(.15); transform-origin: left; animation: load 1.4s var(--ease) infinite; }
@keyframes load { 50% { transform: scaleX(.85); } 100% { transform: scaleX(1); opacity: 0; } }
html:not(.is-loading) .preloader { opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }

/* Header */
.app-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; padding: 0 var(--pad); background: rgba(11, 10, 9, .82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; line-height: 1; letter-spacing: .14em; }
.logo-seal { display: block; flex-shrink: 0; width: 26px; height: 26px; }
.tabs { display: flex; gap: 20px; }
.tab { min-height: 44px; padding: 0; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; font-size: 15px; transition: color .3s var(--ease), border-color .3s var(--ease); }
.tab[aria-pressed="true"] { color: var(--fg); border-bottom-color: var(--accent); }

/* Layout */
.app { padding: 28px var(--pad) calc(120px + var(--safe-bottom)); }
.eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; flex-shrink: 0; }
.title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: clamp(52px, 16vw, 76px); line-height: .9; letter-spacing: .01em; }
.title .jp { font-size: 22px; color: var(--faint); letter-spacing: 0; }
.lead { margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.lead strong { color: var(--fg); font-weight: 500; }

.step { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.step-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.step-num { font-size: 13px; color: var(--accent); letter-spacing: .12em; }
.step-title { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.step-hint { margin-top: 12px; font-size: 13px; color: var(--faint); }
.step.is-locked { opacity: .35; pointer-events: none; }

/* Choice chips: square, bordered, accent when chosen */
.chip { position: relative; display: grid; place-items: center; min-height: 48px; padding: 0 8px; background: transparent; border: 1px solid var(--line-strong); color: var(--fg); transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .15s var(--ease); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.chip:disabled { opacity: .3; cursor: default; }

.dates { display: flex; gap: 8px; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.date-chip { flex: 0 0 70px; min-height: 92px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.date-chip .wd { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.date-chip .day { font-size: 34px; line-height: 1; }
.date-chip .mon { font-size: 12px; color: var(--muted); }
.date-chip[aria-pressed="true"] .wd, .date-chip[aria-pressed="true"] .mon { color: var(--bg); }
.date-chip.other { border-style: dashed; }
.date-chip.other .day { font-family: "Onest", sans-serif; font-size: 26px; font-weight: 300; }

.times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.time-chip { flex-direction: column; gap: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.time-chip small { font-size: 10px; font-weight: 400; color: var(--faint); line-height: 1.1; }
.time-chip[aria-pressed="true"] small { color: var(--bg); }

.sheet-times { margin-top: 18px; }
.party { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.party .chip { aspect-ratio: 1; min-height: 0; font-size: 26px; }

/* Fields */
.field { display: block; margin-bottom: 18px; }
.field-label { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.input { width: 100%; min-height: 48px; padding: 8px 0; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; outline: none; transition: border-color .25s var(--ease); }
.input:focus { border-bottom-color: var(--accent); }
.input[aria-invalid="true"] { border-bottom-color: var(--accent); }
textarea.input { min-height: 84px; resize: none; line-height: 1.5; }
.field-error { margin-top: 6px; font-size: 13px; color: var(--accent); }
.field-row { display: flex; gap: 12px; align-items: flex-end; }
.field-row .field { flex: 1; }
.link { padding: 0; background: none; border: 0; color: var(--accent); font-size: 14px; font-weight: 500; }
.link-muted { color: var(--muted); }

.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border: 1px solid var(--line-strong); }
.contact-card strong { display: block; font-weight: 500; }
.contact-card span { color: var(--muted); font-size: 14px; }

/* Buttons — as on the site */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 54px; padding: 0 24px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; border: 1px solid transparent; background: none; transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .2s var(--ease), opacity .3s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:disabled { background: var(--bg-3); color: var(--faint); cursor: default; transform: none; }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); }
.btn-ghost:disabled { opacity: .35; cursor: default; transform: none; }
.btn + .btn { margin-top: 10px; }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:active .arrow { transform: translateX(4px); }

.cta { position: fixed; inset: auto 0 0; z-index: 15; padding: 12px var(--pad) calc(12px + var(--safe-bottom)); background: linear-gradient(to top, var(--bg) 70%, rgba(11, 10, 9, 0)); }
.cta-summary { margin-bottom: 8px; min-height: 20px; font-size: 13px; color: var(--muted); text-align: center; }

/* Summary rows */
.rows { margin: 0; }
.rows div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rows dt { color: var(--muted); font-size: 14px; }
.rows dd { margin: 0; text-align: right; font-weight: 500; }
.seating { margin: 18px 0 22px; padding-left: 14px; border-left: 2px solid var(--accent); font-size: 15px; }
.seating small { display: block; color: var(--muted); font-size: 13px; }

/* Done screen */
.done { padding-top: 24px; text-align: left; }
.stamp { width: 84px; height: 84px; margin-bottom: 28px; animation: stamp .6s var(--ease) both; }
@keyframes stamp { from { opacity: 0; transform: scale(1.6) rotate(-14deg); } to { opacity: 1; transform: none; } }
.done .title { font-size: clamp(44px, 13vw, 64px); }
.done .actions { margin-top: 28px; }
.notice { margin-top: 18px; padding: 14px 16px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 14px; }

/* My bookings */
.cards { display: grid; gap: 12px; margin-top: 28px; }
.card { padding: 18px 16px; border: 1px solid var(--line-strong); background: var(--bg-2); }
.card.is-confirmed { border-color: rgba(230, 77, 40, .55); }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-num { font-size: 30px; line-height: 1; }
.badge { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card.is-confirmed .badge { color: var(--accent); }
.card-slot { margin-top: 12px; font-size: 17px; font-weight: 500; }
.card-meta { margin-top: 2px; color: var(--muted); font-size: 14px; }
.card-changes { margin-top: 10px; font-size: 14px; color: var(--muted); }
.card-changes b { color: var(--fg); font-weight: 500; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.card-actions .btn { min-height: 44px; font-size: 12px; padding: 0 12px; }
.card-actions .btn + .btn { margin-top: 0; }
.empty { margin-top: 36px; color: var(--muted); }
.empty .btn { margin-top: 24px; }

/* Bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .6); animation: fade .25s ease both; }
.sheet { position: fixed; inset: auto 0 0; z-index: 41; max-height: 88dvh; overflow-y: auto; padding: 22px var(--pad) calc(22px + var(--safe-bottom)); background: var(--bg-2); border-top: 1px solid var(--line-strong); animation: rise .35s var(--ease) both; }
.sheet-title { font-size: 34px; line-height: 1; margin-bottom: 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-month { font-size: 15px; font-weight: 500; }
.cal-nav { width: 44px; height: 44px; background: none; border: 1px solid var(--line); }
.cal-nav:disabled { opacity: .25; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { padding-bottom: 6px; text-align: center; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.cal-day { aspect-ratio: 1; min-height: 0; padding: 0; font-variant-numeric: tabular-nums; }
.cal-day:disabled { text-decoration: line-through; text-decoration-color: var(--faint); }
.cal-legend { margin-top: 14px; font-size: 13px; color: var(--faint); }

/* Toast and fallback */
.toast { position: fixed; left: var(--pad); right: var(--pad); bottom: calc(110px + var(--safe-bottom)); z-index: 50; padding: 14px 16px; background: var(--fg); color: var(--bg); font-size: 14px; animation: rise .3s var(--ease) both; }
.fallback { padding-top: 12vh; }
.fallback .lead { max-width: 32ch; }
.fallback-actions { margin-top: 32px; max-width: 420px; }
.fallback-actions .step-hint { margin-top: 14px; text-align: center; }
a.btn { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
