/* Boarding design system (see docs/adr/0003-boarding-design-system.md).
   Tokens are CSS custom properties on :root; themes override them from body[data-site-theme="..."] stylesheets loaded after this file.
   Primary = yellow pill, secondary = white pill; blue is decoration only; state is shape + pattern + label, never colour alone.
   Focus: one ink 3px ring + 2px white halo. Ink #291F1D is for headings; body text is --c-text. */
:root {
  --c-ink: #291F1D;
  --c-text: #3D3431;
  --c-outline: #4D423E;
  --c-ink-soft: #5E524E;
  --c-ink-mute: #6E625E;
  --c-page: #EEF5FA;
  --c-surface: #FFFFFF;
  --c-yellow: #F2C568;
  --c-yellow-tint: #FBEFCF;
  --c-yellow-hover: #EBBA52;
  --c-yellow-press: #E2AE3F;
  --c-stub: #FEF6DD;
  --c-blue-tint: #D9E8F5;
  --c-blue: #A1C5E5;
  --c-scroll-thumb: #4A769E; /* accessibility derivative of --c-blue: scrollbar thumb needs >=3:1 on the page; not a state colour */
  --c-line-warm: #85776F;
  --c-hatch: #978983;
  --c-past: #F3EFEC;
  --c-line: var(--c-blue);
  --c-focus: var(--c-ink);
  --c-focus-halo: #FFFFFF;
  --font-head: "Chiron GoRound TC", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 72px;
  --wrap: 1080px;
  --notch: 11px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--c-scroll-thumb) var(--c-page); scroll-padding-bottom: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--c-page);
  color: var(--c-text);
  font: 400 16px/1.75 var(--font-body);
  caret-color: var(--c-ink);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
::selection { background: var(--c-yellow); color: var(--c-ink); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { color: var(--c-ink); }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--c-ink); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--c-focus-halo); }
.btn:focus-visible, .btn:active:focus-visible { box-shadow: 0 0 0 2px var(--c-focus-halo), var(--elev); }
.day > .day-btn:focus-visible, .day > .day-btn:active:focus-visible { outline-offset: 3px; box-shadow: 0 0 0 2px var(--c-focus-halo), var(--elev); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.site-theme-ornament { display: none; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--c-ink); color: #fff; padding: 12px 18px; border-radius: var(--radius-s); }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  font: 600 16px/1 var(--font-head);
  border-radius: 999px; border: 1.5px solid var(--c-outline);
  background: var(--c-yellow); color: var(--c-ink);
  --elev: 0 3px 8px rgba(61, 52, 49, .14);
  box-shadow: var(--elev);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--c-yellow-hover); color: var(--c-ink); }
.btn:active { background: var(--c-yellow-press); color: var(--c-ink); transform: translateY(1px); --elev: 0 0 #0000; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--c-past); border: 1.5px dashed var(--c-line-warm); color: var(--c-ink-mute); --elev: 0 0 #0000; cursor: not-allowed; transform: none; }
.btn-ghost { background: var(--c-surface); color: var(--c-ink); --elev: 0 0 #0000; }
.btn-ghost:hover { background: var(--c-blue-tint); color: var(--c-ink); }
.btn-ghost:active { background: var(--c-blue); }
.btn-block { width: 100%; }

/* header */
.site-header { background: var(--c-surface); color: var(--c-ink); border-bottom: 2px solid var(--c-blue); position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--c-ink); flex: none; }
.brand-logo { width: 46px; height: 46px; }
.brand-name { font: 700 22px/1.1 var(--font-head); }
.brand-sub { display: block; font: 500 12px/1.3 var(--font-body); color: var(--c-ink-soft); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 2px; }
.main-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 11px; font: 500 15px/1.2 var(--font-body);
  color: var(--c-text); text-decoration: none; border-radius: 8px; position: relative; white-space: nowrap;
}
.main-nav a:hover { background: var(--c-page); }
.main-nav a[aria-current="page"] { font-weight: 700; color: var(--c-ink); }
.main-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 0; height: 4px; border-radius: 4px; background: var(--c-outline);
}
.site-header .login { flex: none; min-height: 44px; padding: 0 18px; font-size: 15px; }

/* hero (booking) */
.hero { margin-top: 28px; }
.hero-photo { width: 100%; aspect-ratio: 2.18 / 1; object-fit: cover; object-position: 50% 50%; border-radius: var(--radius-l); }
.pass { position: relative; width: min(680px, calc(100% - 48px)); margin: -120px auto 0; filter: drop-shadow(0 12px 24px rgba(61, 52, 49, .16)); }
.pass-card {
  --stub-h: 64px;
  display: grid; grid-template-rows: auto var(--stub-h);
  background: var(--c-surface); border-radius: var(--radius-m);
  -webkit-mask: radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub-h)), #0000 96%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub-h)), #0000 96%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub-h)), #0000 96%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub-h)), #0000 96%, #000) right / 51% 100% no-repeat;
}
.pass-main { padding: 26px 32px 18px; text-align: center; }
.pass-main h1 { font: 700 clamp(26px, 3.2vw, 32px)/1.2 var(--font-head); letter-spacing: .01em; }
.pass-main .lede { margin: 8px auto 0; color: var(--c-ink-soft); font-size: 16px; max-width: 30em; text-wrap: balance; }
.fields { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: 8px 36px; margin-top: 14px; padding-top: 12px; border-top: 2px dashed var(--c-line); }
.fields dt { font: 500 13px/1.4 var(--font-body); color: var(--c-ink-soft); }
.fields dd { font: 700 19px/1.4 var(--font-head); font-variant-numeric: tabular-nums; }
.stub { background: var(--c-stub); border-top: 3px dashed var(--c-blue); padding: 0 24px; display: flex; align-items: center; justify-content: center; gap: 12px 20px; color: var(--c-ink); font: 700 16px/1.3 var(--font-head); }
.stub .icon { flex: none; width: 32px; height: 32px; stroke-width: 1.5; }
.stub span { white-space: nowrap; }

/* booking layout */
#calendar { margin-top: 32px; }
.panel { background: var(--c-surface); border: 2px solid var(--c-blue); border-radius: var(--radius-l); overflow: hidden; }
.cal-head { background: var(--c-page); color: var(--c-text); border-bottom: 4px solid var(--c-yellow); padding: 22px 28px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cal-head h2 { font: 700 32px/1.1 var(--font-head); font-variant-numeric: tabular-nums; margin-right: auto; }
.cal-head .meta { flex-basis: 100%; display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: center; color: var(--c-ink-soft); font-size: 15px; }
.cal-head .meta strong { color: var(--c-ink); font-family: var(--font-head); font-weight: 600; }
.cal-head .meta span:first-child { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 10px; background: var(--c-yellow); border-radius: 999px; color: var(--c-ink); }
.cal-head .meta span:first-child::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c-ink); }
.cal-head .meta span:first-child strong { color: var(--c-ink); }
.cal-head .proto-note { flex-basis: 100%; color: var(--c-ink-soft); font-size: 14px; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--c-outline); background: #fff; color: var(--c-ink); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--c-blue-tint); }
.icon-btn[disabled] { opacity: .5; border-style: dashed; cursor: not-allowed; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 14px 28px; border-bottom: 2px dashed var(--c-blue); }
.switch { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; background: none; border: 0; padding: 0; font: 500 16px/1.2 var(--font-body); color: var(--c-ink); cursor: pointer; text-align: left; }
.switch-track { width: 52px; height: 30px; border-radius: 999px; background: #fff; border: 2px solid var(--c-line-warm); position: relative; flex: none; transition: background .2s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--c-line-warm); transition: transform .2s, background .2s; }
.switch[aria-checked="true"] .switch-track { background: var(--c-yellow); border-color: var(--c-outline); }
.switch[aria-checked="true"] .switch-track::after { transform: translateX(22px); background: var(--c-ink); }
.legend { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: 14px; color: var(--c-ink-soft); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--c-line-warm); }
.swatch.open { background: #fff; border: 2px solid var(--c-outline); }
.swatch.full { background: #fff; border-style: dashed; }
.swatch.closed { background: repeating-linear-gradient(135deg, #fff 0 3px, var(--c-hatch) 3px 5px); }

.weekdays, .cal-grid { display: grid; grid-template-columns: repeat(var(--cal-cols, 4), minmax(0, 1fr)); gap: 8px; padding: 0 20px; }
.weekdays { padding-top: 18px; padding-bottom: 8px; }
.weekdays li { font: 700 17px/1 var(--font-head); text-align: left; padding-left: 12px; color: var(--c-ink); }
.cal-grid { padding-bottom: 14px; }
.day { position: relative; min-height: 96px; border-radius: 12px; display: flex; }
.day > .day-btn { --elev: 0 0 #0000; box-shadow: var(--elev); }
.day > .day-btn, .day > .day-static { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 8px 10px; border: 2px solid transparent; border-radius: inherit; text-align: left; font: inherit; color: inherit; width: 100%; position: relative; }
.d-num { font: 700 24px/1 var(--font-head); font-variant-numeric: tabular-nums; }
.d-state { font: 600 12px/1 var(--font-body); padding: 5px 9px; border: 1.5px solid transparent; border-radius: 999px; }
.d-note { font-size: 12px; line-height: 1.3; color: var(--c-ink); }
.day.is-open .day-btn { background: #fff; border: 1.5px solid var(--c-outline); cursor: pointer; }
.day.is-open .d-state { background: #fff; color: var(--c-ink); border-color: var(--c-outline); }
.day.is-open .day-btn:hover { background: var(--c-blue-tint); outline: 2px solid var(--c-ink); outline-offset: -2px; }
.day.is-open .day-btn:hover .d-state { background: var(--c-blue-tint); }
.day.is-open.is-next .day-btn { padding-top: 18px; }
.day.is-open.is-next .day-btn[aria-pressed="true"] { padding-top: 17px; }
.day.is-open .day-btn[aria-pressed="true"] { background: var(--c-yellow); outline: 0; border: 3px solid var(--c-ink); padding: 7px 9px; transform: translateY(-2px); --elev: 0 5px 12px rgba(61, 52, 49, .22); }
.day.is-open .day-btn[aria-pressed="true"]:focus-visible, .day.is-open .day-btn[aria-pressed="true"]:active:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.day.is-open .day-btn[aria-pressed="true"] .d-state { background: #fff; color: var(--c-ink); border-color: var(--c-ink); font-weight: 700; }
.day.is-open .day-btn[aria-pressed="true"]::after { content: ""; position: absolute; right: 8px; bottom: 8px; width: 24px; height: 24px; border: 2px solid var(--c-ink); border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23291F1D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4.5 4.5 8.5-9.5'/%3E%3C/svg%3E") center / 16px no-repeat; }
.day.is-full .day-static { background: #fff; border: 2px dashed var(--c-line-warm); color: var(--c-ink-soft); cursor: not-allowed; }
.day.is-full .d-state { border: 1.5px dashed var(--c-line-warm); }
.day.is-closed .day-static { background: repeating-linear-gradient(135deg, #fff 0 11px, var(--c-hatch) 11px 12px); border: 2px solid var(--c-line-warm); }
.day.is-closed .d-note { background: #fff; padding: 1px 4px; border-radius: 4px; }
.day.is-closed .d-num { background: #fff; padding: 2px 6px; border-radius: 6px; }
.day.is-closed .d-state { background: #fff; border-color: var(--c-outline); color: var(--c-ink); }
.day.is-today .d-num { background: var(--c-yellow); color: var(--c-ink); padding: 4px 8px; border-radius: 8px; }
.day.is-past { min-height: 56px; }
.day.is-past .day-static { color: var(--c-ink-mute); justify-content: flex-start; background: var(--c-past); }
.day.is-past .d-num { font-weight: 500; font-size: 20px; }
.tag-next { position: absolute; top: -8px; right: 8px; z-index: 1; background: var(--c-yellow); color: var(--c-ink); font: 700 12px/1 var(--font-head); padding: 5px 9px; border-radius: 6px; pointer-events: none; }
.only-open .day:not(.is-open):not([aria-hidden="true"]) { opacity: .45; }
.only-open .day:not(.is-open) .day-static { background: var(--c-surface); border: 2px solid transparent; color: var(--c-ink-mute); cursor: default; }
.only-open .day:not(.is-open) .d-state, .only-open .day:not(.is-open) .d-note, .only-open .day:not(.is-open) .d-num { background: transparent; border-color: transparent; color: var(--c-ink-mute); }
.event-note { margin: 0 20px 20px; padding: 12px 16px; border-radius: 12px; background: var(--c-page); font-size: 15px; display: flex; gap: 10px; align-items: flex-start; }
.event-note .icon { margin-top: 2px; }

/* class passes */
.day-courses { margin-top: 32px; scroll-margin-top: 88px; }
.day-courses h2:focus { outline: none; }
.day-courses h2 { font: 700 30px/1.2 var(--font-head); font-variant-numeric: tabular-nums; }
.day-courses .hint { color: var(--c-ink-soft); margin-top: 4px; }
.day-courses [hidden] { display: none; }
.tickets { display: grid; gap: 18px; margin-top: 18px; }
.ticket { filter: drop-shadow(0 6px 14px rgba(61, 52, 49, .12)); }
.ticket-card {
  --stub: 210px;
  display: grid; grid-template-columns: 1fr var(--stub); background: var(--c-surface); border-radius: var(--radius-m);
  -webkit-mask: radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 96%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 96%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 96%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 96%, #000) bottom / 100% 51% no-repeat;
}
.ticket-main { padding: 16px 28px; display: grid; gap: 8px; align-content: center; }
.ticket-main h3 { font: 700 24px/1.2 var(--font-head); }
.ticket-main .teacher-name { color: var(--c-ink-soft); font-size: 15px; }
.ticket-main .time { font: 700 28px/1 var(--font-head); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.ticket-main .time small { font: 500 15px/1 var(--font-body); color: var(--c-ink-soft); margin-left: 8px; letter-spacing: 0; }
.ticket-stub { border-left: 3px dashed var(--c-blue); border-right: 10px solid var(--c-yellow); padding: 16px 18px 16px 22px; display: flex; flex-direction: column; justify-content: center; gap: 10px; background: var(--c-stub); }
/* yellow button on the light-yellow stub: ink outline keeps the pill edge >=3:1 */
.ticket-stub .btn { border-color: var(--c-ink); --elev: 0 3px 8px rgba(61, 52, 49, .14); }
.ticket-stub .btn:active { --elev: 0 0 #0000; }
.ticket-stub .btn { flex-direction: column; gap: 3px; padding: 6px 20px; }
.btn small { font: 500 12px/1 var(--font-body); }
.seats { display: grid; gap: 2px; }
.seats span { font-size: 13px; color: var(--c-ink-soft); }
.seats strong { font: 700 26px/1.1 var(--font-head); font-variant-numeric: tabular-nums; }

.login-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 20px; margin-top: 40px; padding: 16px 24px; scroll-margin-top: 24px; background: var(--c-surface); border: 2px solid var(--c-blue); border-radius: var(--radius-l); }
.login-strip:focus-visible { outline-offset: -3px; }
.login-strip > .icon { width: 32px; height: 32px; color: var(--c-ink); stroke-width: 1.5; }
.login-strip h2 { font: 700 19px/1.3 var(--font-head); }
.login-strip .login-text p { color: var(--c-ink-soft); font-size: 15px; }
.login-strip .login-pick { grid-column: 1 / -1; color: var(--c-ink); background: var(--c-yellow-tint); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.login-strip .login-pick:not([hidden]) { display: block; }
.gate { display: flex; align-items: center; gap: 10px; margin: 64px 0 96px; padding-top: 18px; border-top: 1px solid var(--c-line); color: var(--c-ink-soft); font-size: 15px; }
.gate .icon { width: 20px; height: 20px; flex: none; color: var(--c-ink); }
.gate strong { font: 700 15px/1.5 var(--font-head); color: var(--c-ink); margin-right: 12px; }

/* footer */
.site-footer { background: var(--c-yellow-tint); color: var(--c-text); border-top: 2px solid var(--c-blue); padding: 40px 0 44px; }
.site-footer .wrap { display: flex; gap: 16px 40px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--c-ink); }
.site-footer p { display: flex; flex-wrap: wrap; gap: 0 20px; align-items: center; }

/* mobile top menu (hidden on desktop) */
.menu-btn, .mobile-menu, .menu-backdrop { display: none; }

/* about */
.about-hero { margin-top: 28px; }
.about-hero img { width: 100%; aspect-ratio: 2.4 / 1; object-fit: cover; border-radius: var(--radius-l); }
.about-title { padding: 36px 0 12px; max-width: 760px; }
.about-title h1 { font: 700 clamp(26px, 4vw, 32px)/1.25 var(--font-head); }
.about-title p { margin-top: 12px; font-size: 18px; color: var(--c-ink-soft); }
.teacher { display: grid; gap: 28px; margin-top: 64px; }
.teacher picture { display: block; }
.teacher img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius-l); }
.teacher h2, .rhythm h2, .areas h2, .moments h2 { font: 700 clamp(24px, 3vw, 28px)/1.25 var(--font-head); }
.teacher .cred { margin-top: 6px; font: 600 17px/1.5 var(--font-head); color: var(--c-ink); }
.teacher .handle { display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; font-weight: 500; }
.teacher p.body { margin-top: 12px; max-width: 40em; }
@media (min-width: 861px) {
  .teacher { grid-template-columns: 9fr 11fr; gap: 48px; align-items: center; }
  .teacher p.body { max-width: none; }
}

.rhythm { margin-top: 72px; background: var(--c-surface); border: 2px solid var(--c-blue); color: var(--c-text); border-radius: var(--radius-l); padding: 32px 40px; display: grid; gap: 24px; }
.rhythm dl { display: grid; }
.rhythm .row { display: grid; grid-template-columns: 9em 1fr; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 2px dashed var(--c-blue); }
.rhythm .row:first-child { padding-top: 0; }
.rhythm .row:last-child { border-bottom: 0; padding-bottom: 0; }
.rhythm dt { color: var(--c-ink-soft); font-size: 16px; }
.rhythm dd { color: var(--c-ink); font: 700 clamp(20px, 2vw, 26px)/1.3 var(--font-head); font-variant-numeric: tabular-nums; }

.areas { margin-top: 96px; display: grid; gap: 24px; }
.areas-photo img { width: 100%; max-width: 800px; aspect-ratio: 2 / 1; object-position: 50% 30%; object-fit: cover; border-radius: var(--radius-l); }
.area-list { margin-top: 0; }
.areas li { padding: 16px 0; border-top: 1px solid var(--c-line); }
.areas li:first-child { border-top: 0; padding-top: 4px; }
.areas h3 { font: 700 22px/1.3 var(--font-head); }
.areas li p { color: var(--c-ink-soft); max-width: 32em; margin-top: 2px; }

.moments { margin-top: 96px; scroll-margin-top: 24px; }
.path { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; }
.path::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; border-top: 3px dashed var(--c-blue); }
.path li { position: relative; padding-top: 44px; }
.path li::before { content: ""; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--c-yellow); border: 4px solid var(--c-page); box-shadow: 0 0 0 1.5px var(--c-outline); }
.path h3 { font: 700 22px/1.3 var(--font-head); }
.path p { margin-top: 6px; color: var(--c-ink-soft); }
.moment-photos { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 48px; justify-items: start; }
.moment-photos > * { width: 100%; max-width: 720px; }
.moment-photos img { width: 100%; object-fit: cover; border-radius: var(--radius-l); }
.moment-photos .a img { aspect-ratio: 16 / 9; }
.moment-photos .b img { aspect-ratio: 4 / 3; }

.closing { margin: 80px 0 96px; display: grid; gap: 24px; justify-items: start; background: transparent; border-top: 1px solid var(--c-line); border-radius: 0; padding: 40px 0 0; }
.closing p { font-size: 18px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-start; }

@media (max-width: 1180px) {
  .main-nav a { padding: 10px 8px; font-size: 14px; }
  .main-nav a[aria-current="page"]::after { left: 8px; right: 8px; }
  .site-header .wrap { gap: 14px; }
  .brand-sub { display: none; }
}
@media (max-width: 860px) {
  body { line-height: 1.6; }
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .main-nav { display: none; }
  .site-header .wrap { min-height: 64px; justify-content: space-between; }
  .brand-name { font-size: 20px; }
  .site-header .brand > span:not(.site-theme-ornament) { min-width: 0; }
  .brand-logo { width: 40px; height: 40px; }
  .site-header .wrap { gap: 8px; }
  .site-header .desktop-login, .site-header .user-menu { display: none; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; margin-left: auto; width: 44px; height: 44px; min-width: 44px; padding: 0; border: 1.5px solid var(--c-outline); border-radius: 12px; background: var(--c-surface); color: var(--c-ink); cursor: pointer; touch-action: manipulation; }
  .menu-btn:hover { background: var(--c-blue-tint); }
  .menu-btn .icon-close, .menu-btn[aria-expanded="true"] .icon-open { display: none; }
  .menu-btn[aria-expanded="true"] .icon-close { display: block; }
  .menu-backdrop:not([hidden]) { display: block; position: absolute; top: 100%; left: 0; right: 0; height: 100vh; height: 100dvh; background: rgba(61, 52, 49, .3); z-index: 1; }
  .mobile-menu:not([hidden]) { display: block; position: absolute; top: 100%; left: 0; right: 0; z-index: 2; max-height: calc(100dvh - 66px); overflow-y: auto; overscroll-behavior: contain; background: var(--c-surface); border-bottom: 1px solid var(--c-line); box-shadow: 0 8px 16px rgba(61, 52, 49, .08); animation: menu-slide .2s ease-out; }
  .mobile-menu-list a, .mobile-menu-logout { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 0 20px; border: 0; border-bottom: 1px solid var(--c-line); border-left: 4px solid transparent; background: none; text-decoration: none; color: var(--c-ink); font: 500 16px/1.2 var(--font-body); text-align: left; cursor: pointer; }
  .mobile-menu-list a:hover, .mobile-menu-logout:hover { background: var(--c-page); }
  .mobile-menu-list a[aria-current="page"] { border-left-color: var(--c-yellow); background: var(--c-yellow-tint); font-weight: 700; }
  .mobile-menu-account { padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); border-top: 2px solid var(--c-line); }
  .mobile-menu-account > .login { display: flex; width: calc(100% - 40px); margin: 0 20px; justify-content: center; }
  .mobile-menu-user { display: flex; align-items: center; gap: 12px; padding: 0 20px 12px; }
  .mobile-menu-user .user-name { display: grid; }
  html.menu-open { overflow: hidden; }
  @keyframes menu-slide { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { .mobile-menu:not([hidden]) { animation: none; } }

  .hero { margin-top: 16px; }
  .hero-photo { aspect-ratio: 16 / 9; object-position: 50% 50%; border-radius: var(--radius-m); }
  .pass { width: calc(100% - 24px); margin: -40px auto 0; }
  .pass-card { --stub-h: 52px; }
  .pass-main { padding: 18px 20px 14px; }
  .pass-main .lede { font-size: 15px; line-height: 1.6; }
  .fields { grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 12px; padding-top: 10px; }
  .fields div:last-child { grid-column: span 2; }
  .stub { padding: 0 14px; gap: 10px 14px; font-size: 14px; }
  .stub .icon { width: 26px; height: 26px; }
  #calendar { margin-top: 20px; }
  .login-strip { grid-template-columns: 1fr; justify-items: start; margin-top: 32px; padding: 20px; }
  .login-strip .btn { width: 100%; }
  .gate { margin: 40px 0 56px; align-items: flex-start; flex-wrap: wrap; }
  .gate .icon { margin-top: 2px; }
  .gate span { flex: 1 1 0; min-width: 0; }
  .gate strong { display: block; margin: 0; }

  .cal-head { padding: 16px 16px 14px; gap: 10px; }
  .cal-head h2 { font-size: 26px; }
  .icon-btn { width: 44px; height: 44px; }
  .toolbar { padding: 8px 16px; }
  .weekdays, .cal-grid { padding-inline: 10px; gap: 6px; }
  .day { min-height: 72px; }
  .day.is-past { min-height: 48px; }
  .weekdays li { text-align: center; padding-left: 0; }
  .day > .day-btn, .day > .day-static { padding: 5px 4px; align-items: center; }
  .day.is-open .day-btn[aria-pressed="true"] { padding: 4px 3px; }
  .day.is-open.is-next .day-btn { padding-top: 16px; }
  .day.is-open.is-next .day-btn[aria-pressed="true"] { padding-top: 15px; }
  .day.is-open .day-btn[aria-pressed="true"]::after { display: none; }
  .day.is-open .day-btn[aria-pressed="true"] .d-state { font-size: 0; padding: 4px 8px; }
  .day.is-open .day-btn[aria-pressed="true"] .d-state::after { content: "已選"; font-size: 12px; line-height: 1; }
  .d-num { font-size: 19px; }
  .d-state { font-size: 11px; padding: 4px 6px; }
  .day.is-full .d-state, .day.is-closed .d-state { padding: 2.5px 5px; }
  .d-note { display: none; }
  .tag-next { right: 4px; font-size: 11px; padding: 4px 6px; }
  .event-note { margin: 0 12px 14px; }

  .day-courses { margin-top: 32px; }
  .day-courses h2 { font-size: 26px; }
  .ticket-card { --stub: 0px; --stub-h: 84px; grid-template-columns: 1fr; grid-template-rows: auto var(--stub-h);
    -webkit-mask: radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub-h)), #0000 96%, #000) left / 51% 100% no-repeat,
                  radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub-h)), #0000 96%, #000) right / 51% 100% no-repeat;
            mask: radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub-h)), #0000 96%, #000) left / 51% 100% no-repeat,
                  radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub-h)), #0000 96%, #000) right / 51% 100% no-repeat; }
  .ticket-main { padding: 14px 20px; gap: 6px; }
  .ticket-main .time { font-size: 26px; }
  .ticket-stub { border-left: 0; border-right: 0; border-top: 2px dashed var(--c-line); border-bottom: 8px solid var(--c-yellow); flex-direction: row; align-items: center; justify-content: space-between; padding: 0 20px; }
  .ticket-stub .btn { padding: 0 28px; }
  .site-footer { padding: 32px 0 36px; }
  .site-footer .wrap { justify-content: center; text-align: center; }
  .site-footer p { justify-content: center; }
  .site-footer .site-footer-social { display: none; }

  .about-hero { margin-top: 16px; }
  .about-hero img { aspect-ratio: 4 / 3; border-radius: var(--radius-m); }
  .about-title { padding-top: 24px; }
  .teacher { gap: 24px; margin-top: 44px; }
  .teacher img { aspect-ratio: 3 / 2; }
  .rhythm { padding: 24px 22px; gap: 20px; margin-top: 56px; border-radius: var(--radius-m); }
  .rhythm .row { grid-template-columns: 1fr; gap: 2px; }
  .areas { gap: 20px; margin-top: 64px; }
  .areas-photo { order: 2; }
  .areas-photo img { aspect-ratio: 16 / 9; }
  .moments { margin-top: 64px; }
  .path { grid-template-columns: 1fr; gap: 24px; margin-top: 28px; padding-left: 40px; }
  .path::before { left: 11px; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 3px dashed var(--c-blue); }
  .path li { padding-top: 0; }
  .path li::before { left: -40px; top: 4px; }
  .moment-photos { grid-template-columns: 1fr; margin-top: 32px; }
  .closing { justify-items: stretch; padding: 28px 0 0; margin: 56px 0 64px; gap: 24px; }
  .cta-row .btn { flex: 1 1 100%; }
}
/* ---- full-site additions ---- */
[hidden] { display: none !important; }

/* logged-in user menu (labels from _Layout: 已登入 / 個人資料 / 購買紀錄 / 預約紀錄 / 登出) */
.user-menu { position: relative; flex: none; margin-left: auto; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px 0 5px; border: 1.5px solid var(--c-outline); border-radius: 999px; background: var(--c-surface); color: var(--c-ink); cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { background: var(--c-blue-tint); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--c-yellow); border: 1.5px solid var(--c-ink); display: grid; place-items: center; font: 700 17px/1 var(--font-head); color: var(--c-ink); flex: none; }
.user-name { display: grid; text-align: left; line-height: 1.25; }
.user-name small { font-size: 12px; color: var(--c-ink-soft); }
.user-name span { font: 600 15px/1.25 var(--font-body); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 208px; background: var(--c-surface); border: 2px solid var(--c-blue); border-radius: var(--radius-m); padding: 6px; filter: drop-shadow(0 12px 20px rgba(61, 52, 49, .16)); }
.menu-panel a, .menu-panel button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; background: none; border-radius: 10px; font: 500 15px/1.2 var(--font-body); color: var(--c-ink); text-decoration: none; cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--c-page); }
.menu-panel hr { border: 0; border-top: 1px solid var(--c-line); margin: 4px 6px; }

.notice { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; padding: 14px 18px; border-radius: var(--radius-m); background: var(--c-yellow-tint); border: 1.5px solid var(--c-outline); font-size: 15px; color: var(--c-ink); }
.notice .icon { margin-top: 2px; }
.notice p + p { margin-top: 2px; color: var(--c-ink-soft); font-size: 14px; }
.notice.is-error { background: var(--c-past); border: 2px dashed var(--c-line-warm); }

/* 下次登機 / 登機證 pass */
.next-pass .pass-main { padding: 22px 32px 16px; }
.next-pass h2, .pass-ticket h2 { font: 700 clamp(26px, 3vw, 32px)/1.2 var(--font-head); letter-spacing: .01em; }
.pass-class { margin-top: 6px; font: 600 20px/1.3 var(--font-head); }
.pass-time { font: 700 clamp(26px, 4vw, 32px)/1.15 var(--font-head); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.fields.fields-2 { grid-template-columns: repeat(2, minmax(0, auto)); gap: 8px 48px; text-align: left; }
.fields.fields-2 dd { font-size: 17px; }
.pass-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: 6px; font-size: 15px; }
.stub-pass { --stub-h: 72px; }
.stub .stub-date { font: 700 24px/1 var(--font-head); font-variant-numeric: tabular-nums; }
.stub .stub-date small { font: 500 15px/1 var(--font-body); margin-left: 4px; }
.stub .stub-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: var(--c-surface); border: 1.5px solid var(--c-ink); border-radius: 999px; font: 700 16px/1.2 var(--font-head); }
.stub .stub-status small { font: 500 13px/1 var(--font-body); color: var(--c-ink-soft); }
.stub .stub-status .icon { width: 20px; height: 20px; stroke-width: 2.25; }
.pass-card.stub-pass { grid-template-rows: auto var(--stub-h); }
.pass-ticket { width: 100%; margin: 24px auto 0; }

/* upcoming bookings (Booking/Index, logged in) */
.upcoming { margin-top: 40px; }
.day .d-state .icon { width: 14px; height: 14px; margin: -2px 3px 0 -2px; vertical-align: middle; stroke-width: 2.5; }
.day.is-open.is-booked .d-state { background: var(--c-yellow-tint); }
.upcoming-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.upcoming-head h2 { font: 700 24px/1.3 var(--font-head); }
.upcoming-head p { font-size: 14px; color: var(--c-ink-soft); }
.booking-list { display: grid; gap: 12px; margin-top: 14px; }
.booking-row { display: flex; align-items: center; gap: 16px 20px; flex-wrap: wrap; padding: 14px 18px; background: var(--c-surface); border: 2px solid var(--c-blue); border-radius: var(--radius-m); }
.date-chip { display: grid; place-items: center; gap: 2px; min-width: 72px; padding: 8px 10px; background: var(--c-stub); border: 1.5px solid var(--c-outline); border-radius: 12px; color: var(--c-ink); }
.date-chip span:first-child { font: 500 12px/1 var(--font-body); }
.date-chip span:last-child { font: 700 26px/1 var(--font-head); font-variant-numeric: tabular-nums; }
.row-main { flex: 1 1 220px; min-width: 0; }
.row-main h3 { font: 700 19px/1.3 var(--font-head); }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; color: var(--c-ink-soft); font-size: 14px; }
.chip { display: inline-block; padding: 0 10px; border: 1.5px solid var(--c-outline); border-radius: 999px; background: var(--c-surface); color: var(--c-ink); font: 600 12px/1.7 var(--font-body); }
.row-action { margin-left: auto; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.locked { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px dashed var(--c-line-warm); border-radius: 999px; background: var(--c-past); color: var(--c-ink-soft); font-size: 14px; }
.empty { margin-top: 14px; padding: 28px 20px; text-align: center; background: var(--c-surface); border: 2px dashed var(--c-blue); border-radius: var(--radius-l); color: var(--c-ink-soft); }

/* single-purpose flow pages (confirm / cancel) */
.flow { width: min(100% - 48px, 720px); margin: 28px auto 96px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font: 500 15px/1.2 var(--font-body); }
.flow-card { margin-top: 8px; padding: 28px 32px 32px; background: var(--c-surface); border: 2px solid var(--c-blue); border-radius: var(--radius-l); }
.flow-card h1 { font: 700 clamp(26px, 3vw, 32px)/1.25 var(--font-head); }
.summary { display: grid; margin-top: 12px; }
.summary > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.summary > div:last-child { border-bottom: 0; }
.summary dt { color: var(--c-ink-soft); font-size: 15px; }
.summary dd { font: 700 17px/1.4 var(--font-head); text-align: right; }
.form-field { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.form-field label { display: block; margin-bottom: 8px; font: 600 15px/1.4 var(--font-body); color: var(--c-ink); }
.select { width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--c-outline); border-radius: 12px; background: var(--c-surface); font: 500 16px/1.2 var(--font-body); color: var(--c-ink); }
.credits { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 14px 18px; border-radius: 12px; background: var(--c-page); }
.credits strong { font: 700 26px/1.1 var(--font-head); font-variant-numeric: tabular-nums; }
.credits.is-low { background: var(--c-past); border: 2px dashed var(--c-line-warm); }
.credits-note { margin-top: 8px; padding: 10px 14px; text-align: center; border-radius: 12px; background: var(--c-yellow-tint); color: var(--c-ink); font-size: 14px; }
.actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px 20px; margin-top: 24px; }
.actions .fine { flex: 1 1 260px; margin-right: auto; color: var(--c-ink-soft); font-size: 14px; }
.after-pass { margin-top: 24px; }
.after-pass ul { display: grid; gap: 8px; padding: 14px 18px; background: var(--c-surface); border: 2px solid var(--c-blue); border-radius: var(--radius-m); font-size: 15px; }
.confirm-dialog { width: min(440px, 100%); margin: 20px auto 0; padding: 22px 24px; background: var(--c-surface); border: 2px solid var(--c-ink); border-radius: var(--radius-m); filter: drop-shadow(0 12px 20px rgba(61, 52, 49, .16)); }
.confirm-dialog h2 { font: 700 19px/1.4 var(--font-head); }
.confirm-dialog .actions { margin-top: 18px; }
.confirm-dialog .dialog-src { margin-top: 4px; font-size: 13px; color: var(--c-ink-soft); }

@media (max-width: 860px) {
  .user-name { display: none; }
  .user-menu summary { padding-right: 5px; }
  .site-header .user-menu { margin-left: 0; }
  .next-pass .pass-main { padding: 18px 20px 12px; }
  .fields.fields-2 { grid-template-columns: 1fr 1fr; gap: 6px 16px; }
  .fields.fields-2 div:last-child { grid-column: auto; }
  .fields.fields-2 div.wide { grid-column: span 2; }
  .stub-pass { --stub-h: 64px; }
  .stub .stub-date { font-size: 20px; }
  .stub .stub-status { padding: 4px 10px; font-size: 15px; }
  .upcoming { margin-top: 32px; }
  .booking-row { padding: 14px; }
  .row-action { margin-left: 0; flex: 1 1 100%; }
  .row-action .btn, .row-action .locked { width: 100%; justify-content: center; }
  .flow { width: min(100% - 32px, 720px); margin-top: 12px; }
  .flow-card { padding: 20px 18px 24px; border-radius: var(--radius-m); }
  .actions .btn { flex: 1 1 100%; }
  .summary dd { font-size: 16px; }
}
/* ---- run 2: account / purchase / info pages ---- */
.icon.inline { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -.18em; margin-right: 2px; }
.page-head { padding: 36px 0 8px; max-width: 760px; }
.page-head h1 { font: 700 clamp(26px, 3.6vw, 32px)/1.25 var(--font-head); }
.page-head p { margin-top: 8px; color: var(--c-ink-soft); font-size: 17px; text-wrap: balance; }
.page { margin-bottom: 96px; }
.page > .notice:first-of-type { margin-top: 20px; }
.page .panel-pad { padding: 24px 28px; }
.stack { display: grid; gap: 16px; margin-top: 20px; }
.narrow { max-width: 720px; }
.page.narrow { margin-inline: auto; }
.fine-print { font-size: 14px; color: var(--c-ink-soft); }
.notice.is-ok { background: var(--c-surface); border: 2px solid var(--c-outline); }
.notice > div { min-width: 0; }
.notice a.btn { margin-top: 10px; }

/* forms */
.field { display: grid; gap: 6px; margin-top: 16px; }
.field > label, .field > .label { font: 600 15px/1.4 var(--font-body); color: var(--c-ink); }
.input { width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--c-outline); border-radius: 12px; background: var(--c-surface); font: 500 16px/1.2 var(--font-body); color: var(--c-ink); }
.input[readonly] { background: var(--c-past); border-style: dashed; border-color: var(--c-line-warm); color: var(--c-ink-soft); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .input.input-validation-error, .select.input-validation-error { border-width: 2px; border-style: dashed; border-color: var(--c-ink); background: var(--c-yellow-tint); }
.field-error { display: flex; align-items: flex-start; gap: 6px; color: var(--c-ink); font: 600 14px/1.5 var(--font-body); }
.field-error .icon { width: 18px; height: 18px; margin-top: 2px; stroke-width: 2.25; }
.field-note { font-size: 14px; color: var(--c-ink-soft); }
.form-section { margin-top: 28px; padding-top: 20px; border-top: 2px dashed var(--c-blue); }
.form-section > h2, .form-section > .section-head h2 { font: 700 21px/1.3 var(--font-head); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.subform { margin-top: 16px; padding: 4px 18px 20px; border: 2px solid var(--c-blue); border-radius: var(--radius-m); background: var(--c-page); }
.subform > h3 { margin-top: 14px; font: 700 17px/1.3 var(--font-head); }
.subform .input { background: var(--c-surface); }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 8px 0; cursor: pointer; font: 500 16px/1.5 var(--font-body); color: var(--c-ink); }
.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--c-ink); }
.check-list { display: grid; gap: 4px; margin-top: 8px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }

/* status chips: shape + icon + text */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px 2px 8px; border: 1.5px solid var(--c-outline); border-radius: 999px; background: var(--c-surface); font: 700 13px/1.6 var(--font-body); color: var(--c-ink); white-space: nowrap; }
.status .icon { width: 16px; height: 16px; stroke-width: 2.5; }
.status.s-pending { border-style: dashed; border-color: var(--c-line-warm); }
.status.s-review { background: var(--c-yellow-tint); }
.status.s-paid { border-color: var(--c-ink); border-width: 2px; }
.status.s-rejected { background: repeating-linear-gradient(135deg, #fff 0 5px, #E9E3DF 5px 6px); }
.status.s-expired, .status.s-cancelled, .status.s-ended { background: var(--c-past); border-style: dashed; border-color: var(--c-line-warm); color: var(--c-ink-soft); }
.status.s-booked { background: var(--c-yellow); }

/* booking history cards */
.booking-row.is-ended, .booking-row.is-cancelled { background: var(--c-past); border-color: var(--c-line-warm); border-style: dashed; }
.booking-row.is-cancelled h3 { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.booking-row.is-ended .date-chip, .booking-row.is-cancelled .date-chip { background: var(--c-surface); }
.row-meta .sep { color: var(--c-line-warm); }
.row-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.load-end { margin-top: 20px; text-align: center; color: var(--c-ink-soft); font-size: 14px; }
.cancel-confirm { width: 100%; padding: 14px 16px; border: 2px solid var(--c-ink); border-radius: var(--radius-m); background: var(--c-surface); }
.cancel-confirm p { font: 700 17px/1.4 var(--font-head); }

/* purchase history */
.order-card { background: var(--c-surface); border: 2px solid var(--c-blue); border-radius: var(--radius-m); padding: 18px 22px; display: grid; gap: 12px; }
.order-card.is-dim { background: var(--c-past); border: 2px dashed var(--c-line-warm); }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 16px; flex-wrap: wrap; }
.order-head h2 { font: 700 20px/1.3 var(--font-head); }
.order-head .sub { color: var(--c-ink-soft); font-size: 14px; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px 20px; padding-top: 12px; border-top: 2px dashed var(--c-blue); }
.order-grid dt { font-size: 13px; color: var(--c-ink-soft); }
.order-grid dd { font: 700 17px/1.4 var(--font-head); font-variant-numeric: tabular-nums; }
.order-grid dd small { font: 500 13px/1.2 var(--font-body); color: var(--c-ink-soft); }
.order-grid dd .status { margin-left: 6px; vertical-align: 2px; }
.transfer { margin-top: 4px; padding: 16px 18px; border-radius: var(--radius-m); background: var(--c-stub); border: 2px solid var(--c-yellow); }
.transfer h3, .transfer h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 700 18px/1.3 var(--font-head); }
.transfer dl { display: grid; gap: 0; margin-top: 8px; }
.transfer dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 2px dashed var(--c-yellow); }
.transfer dl > div:last-child { border-bottom: 0; }
.transfer dt { color: var(--c-ink-soft); font-size: 15px; }
.transfer dd { font: 700 17px/1.4 var(--font-head); text-align: right; font-variant-numeric: tabular-nums; }
.transfer .copy-row { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.transfer .copy-value { overflow-wrap: anywhere; }
.transfer .copy-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; padding: 6px; margin: -4px -6px -4px 0; border: 0; border-radius: 8px; background: transparent; color: var(--c-ink-soft); font-size: 18px; cursor: pointer; }
.transfer .copy-btn:hover { color: var(--c-ink); }
.transfer .copy-btn:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 1px; box-shadow: 0 0 0 2px var(--c-focus-halo); }
.transfer .fine-print { margin-top: 6px; }
details.disclosure > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; font: 600 15px/1.2 var(--font-body); color: var(--c-ink); list-style: none; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary .icon { transition: transform .2s; }
details.disclosure[open] > summary .icon { transform: rotate(90deg); }

/* 回數票 (course-card ticket book) */
.cardbook-list { display: grid; gap: 22px; margin-top: 20px; }
.cardbook { filter: drop-shadow(0 6px 14px rgba(61, 52, 49, .12)); }
.cardbook-body {
  --spine: 44px; --price: 210px;
  display: grid; grid-template-columns: var(--spine) minmax(0, 1fr) var(--price);
  background: var(--c-surface); border-radius: var(--radius-m); overflow: hidden;
}
.cardbook-spine { background: var(--c-yellow) radial-gradient(circle at 50% 14px, var(--c-page) 0 6px, #0000 6.5px) 0 0 / 100% 36px repeat-y; border-right: 2px solid var(--c-outline); }
.cardbook-main { padding: 20px 24px; display: grid; gap: 10px; align-content: start; }
.cardbook-main h2, .cardbook-main h3 { font: 700 24px/1.25 var(--font-head); }
.cardbook-main p { color: var(--c-ink-soft); font-size: 15px; }
.coupons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.coupons li { position: relative; width: 36px; height: 44px; border: 1.5px solid var(--c-outline); border-radius: 6px; background: var(--c-stub); display: grid; place-items: center; font: 700 12px/1 var(--font-head); color: var(--c-ink); }
.coupons li::before { content: ""; position: absolute; top: -1.5px; left: 50%; width: 10px; height: 5px; margin-left: -5px; border: 1.5px solid var(--c-outline); border-top: 0; border-radius: 0 0 6px 6px; background: var(--c-surface); }
.coupons-label { font: 700 15px/1.3 var(--font-head); color: var(--c-ink); }
.cardbook-price { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 18px 22px; background: var(--c-stub); border-left: 3px dashed var(--c-blue); }
.cardbook-price .price { font: 700 28px/1.1 var(--font-head); font-variant-numeric: tabular-nums; }
.cardbook-price .price small { display: block; font: 500 13px/1.4 var(--font-body); color: var(--c-ink-soft); }
.cardbook-price .btn { border-color: var(--c-ink); }
.cardbook.is-locked .cardbook-spine { background-color: var(--c-past); border-right-style: dashed; }
.cardbook.is-locked .cardbook-body { border: 2px dashed var(--c-line-warm); }
.cardbook.is-locked .coupons li { background: var(--c-past); border-style: dashed; border-color: var(--c-line-warm); }
.cardbook.is-locked .cardbook-price { background: var(--c-past); border-left-color: var(--c-line-warm); }
.locked-msg { display: flex; gap: 8px; align-items: flex-start; font: 600 14px/1.5 var(--font-body); color: var(--c-ink); }
.locked-msg .icon { width: 20px; height: 20px; margin-top: 1px; }
.child-pick { margin-top: 20px; padding: 18px 22px; background: var(--c-surface); border: 2px solid var(--c-blue); border-radius: var(--radius-m); }
.child-pick h2 { font: 700 18px/1.4 var(--font-head); }
.child-pick p { margin-top: 4px; font-size: 14px; color: var(--c-ink-soft); }
.child-pick .select { margin-top: 12px; max-width: 360px; }
.child-pick .for-child { font: 700 20px/1.4 var(--font-head); }
.footnote { margin-top: 24px; color: var(--c-ink-soft); font-size: 15px; }

/* standby pass (候補) */
.standby { margin-top: 20px; filter: drop-shadow(0 8px 18px rgba(61, 52, 49, .14)); }
.standby-card {
  --stub-h: 96px;
  display: grid; grid-template-rows: auto var(--stub-h);
  background: var(--c-surface); border-radius: var(--radius-m);
  -webkit-mask: radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub-h)), #0000 96%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub-h)), #0000 96%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub-h)), #0000 96%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub-h)), #0000 96%, #000) right / 51% 100% no-repeat;
}
.standby-main { padding: 22px 32px 24px; border-top: 8px solid var(--c-blue); }
.standby-main > h2 { font: 700 24px/1.3 var(--font-head); }
.standby-stub { background: var(--c-blue-tint); border-top: 3px dashed var(--c-outline); display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 0 32px; flex-wrap: wrap; }
.standby-stub .stub-title { display: flex; align-items: center; gap: 10px; font: 700 18px/1.3 var(--font-head); color: var(--c-ink); }
.standby-stub .stub-title .icon { width: 30px; height: 30px; stroke-width: 1.5; }
.standby-stub .btn { border-color: var(--c-ink); }
.standby-stub .status { background: var(--c-surface); border-color: var(--c-ink); border-width: 2px; font-size: 15px; }
.standby-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 28px; }
.standby-note { margin-top: 12px; }

/* document-like pages */
.acc-list { margin-top: 20px; background: var(--c-surface); border: 2px solid var(--c-blue); border-radius: var(--radius-l); overflow: hidden; }
.acc { border-bottom: 2px dashed var(--c-blue); }
.acc:last-child { border-bottom: 0; }
.acc > summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 22px; cursor: pointer; list-style: none; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { background: var(--c-page); }
.acc > summary h2, .acc > summary h3 { font: 700 18px/1.5 var(--font-head); }
.acc > summary .icon { margin-top: 3px; transition: transform .2s; }
.acc[open] > summary .icon { transform: rotate(180deg); }
.acc-body { padding: 2px 22px 22px; max-width: 46em; color: var(--c-text); }
.acc-body > * + * { margin-top: 10px; }
.acc-body ul { list-style: disc; padding-left: 1.4em; display: grid; gap: 4px; }
.acc-body ol { list-style: decimal; padding-left: 1.5em; display: grid; gap: 4px; }
.acc-body strong { color: var(--c-ink); }
.acc-body .callout { padding: 12px 16px; border-radius: 12px; background: var(--c-yellow-tint); border: 1.5px solid var(--c-outline); }
.acc-body .callout p:first-child { color: var(--c-ink); }
.acc-body .callout p + p { margin-top: 4px; font-size: 15px; }
.acc-body figure { margin-top: 12px; }
.acc-body figure img { width: 100%; max-width: 560px; border-radius: 12px; border: 1.5px solid var(--c-line); }
.acc-body figcaption { margin-top: 4px; font-size: 13px; color: var(--c-ink-soft); }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 8px 12px; border: 1.5px solid var(--c-line); text-align: left; vertical-align: top; }
.compare thead th { background: var(--c-page); }
.compare tbody th { background: var(--c-page); white-space: nowrap; }
.doc-end { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--c-line); color: var(--c-ink-soft); font-size: 15px; }
.doc-scroll { max-height: 280px; overflow: auto; margin-top: 14px; border: 1.5px solid var(--c-line); border-radius: 12px; background: var(--c-page); }
.doc-scroll .acc-list { margin: 0; border: 0; border-radius: 0; background: transparent; }
.read-first { margin-top: 20px; }
.read-first h2 { font: 700 20px/1.3 var(--font-head); }
.read-first p { margin-top: 6px; color: var(--c-ink-soft); }

/* shop */
.shop-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 24px; }
.product { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; background: var(--c-surface); border: 2px solid var(--c-blue); border-radius: var(--radius-l); overflow: hidden; }
.product-photo { position: relative; background: var(--c-page); overflow: hidden; }
.product-track { display: flex; transition: transform .3s ease-out; }
.product-track img { flex: 0 0 100%; }
.product-empty { display: grid; place-items: center; aspect-ratio: 1 / 1; color: var(--c-ink-soft); font-size: 15px; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }
.product-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.product-photo .count { position: absolute; right: 10px; bottom: 10px; padding: 0 10px; border-radius: 999px; background: var(--c-surface); border: 1.5px solid var(--c-outline); font: 600 13px/1.8 var(--font-body); color: var(--c-ink); font-variant-numeric: tabular-nums; }
.thumbs { display: flex; gap: 6px; padding: 8px 10px 6px; overflow-x: auto; }
.thumbs button { flex: none; width: 52px; height: 52px; padding: 0; border: 1.5px solid var(--c-line); border-radius: 8px; overflow: hidden; background: #fff; cursor: pointer; }
.thumbs button[aria-current="true"] { border: 3px solid var(--c-ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-photo, .thumbs { grid-column: 1; }
.product-body { grid-column: 2; grid-row: 1 / span 2; padding: 22px 26px 26px; display: grid; gap: 12px; }
.product-body h2 { font: 700 22px/1.3 var(--font-head); }
.product-body ul { display: grid; gap: 6px; font-size: 15px; }
.product-body li strong { color: var(--c-ink); }
.prices { display: flex; flex-wrap: wrap; gap: 6px 20px; padding-top: 12px; border-top: 2px dashed var(--c-blue); }
.prices div { display: grid; }
.prices dt { font-size: 13px; color: var(--c-ink-soft); }
.prices dd { font: 700 20px/1.3 var(--font-head); font-variant-numeric: tabular-nums; }
.product-body .btn { justify-self: start; }
.prices dd small { font: 500 13px/1.3 var(--font-body); color: var(--c-ink-soft); }

/* embedded browser warning */
.warn-card { width: min(520px, 100%); background: var(--c-surface); border: 2px solid var(--c-ink); border-radius: var(--radius-l); padding: 26px 28px 28px; filter: drop-shadow(0 16px 28px rgba(61, 52, 49, .22)); }
.warn-card.inline { border: 2px solid var(--c-blue); filter: none; margin-top: 20px; }
.warn-card .warn-icon { width: 44px; height: 44px; stroke-width: 1.6; }
.warn-card h1, .warn-card h2 { margin-top: 8px; font: 700 24px/1.3 var(--font-head); }
.warn-card .lede { margin-top: 4px; color: var(--c-ink-soft); }
.warn-card ol { margin-top: 14px; display: grid; gap: 8px; list-style: decimal; padding-left: 1.5em; }
.warn-card .tip { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--c-yellow-tint); font-size: 15px; }
.warn-card .copy-result { margin-top: 12px; font: 600 14px/1.5 var(--font-body); }
.warn-card .copy-result:empty { display: none; }
.warn-card .manual-url { display: block; margin-top: 6px; padding: 8px 12px; border: 1.5px dashed var(--c-line-warm); border-radius: 10px; font: 500 14px/1.5 var(--font-body); word-break: break-all; user-select: all; }
.warn-card .form-actions { margin-top: 20px; }

/* login / error / empty */
.center-card { max-width: 520px; margin: 40px auto 96px; padding: 32px 32px 36px; text-align: center; background: var(--c-surface); border: 2px solid var(--c-blue); border-radius: var(--radius-l); display: grid; justify-items: center; gap: 12px; }
.center-card h1 { font: 700 clamp(26px, 3vw, 32px)/1.3 var(--font-head); }
.center-card p { color: var(--c-ink-soft); }
.center-card .icon-lg { width: 44px; height: 44px; stroke-width: 1.6; color: var(--c-ink); }
.center-card .form-actions { justify-content: center; margin-top: 8px; }
.center-card .code { font: 700 56px/1 var(--font-head); font-variant-numeric: tabular-nums; color: var(--c-ink); letter-spacing: .02em; }
.center-card .state-art { width: 160px; height: auto; margin-bottom: 4px; }
.center-card .req { font-size: 13px; color: var(--c-ink-mute); word-break: break-all; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--c-blue-tint); border-top-color: var(--c-ink); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.provider { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 28px; }
.empty-state { display: grid; justify-items: center; gap: 8px; padding: 36px 20px; text-align: center; background: var(--c-surface); border: 2px dashed var(--c-blue); border-radius: var(--radius-l); }
.empty-state .icon-lg { width: 40px; height: 40px; stroke-width: 1.5; color: var(--c-ink); }
.empty-state h2, .empty-state h3 { font: 700 20px/1.4 var(--font-head); }
.empty-state p { color: var(--c-ink-soft); max-width: 28em; }
.empty-state .btn { margin-top: 8px; }
.empty-state.cal-empty { margin: 20px; background: var(--c-page); border-radius: var(--radius-m); }
.cal-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; margin-top: 8px; }
.cal-empty-actions .btn { margin-top: 0; }

@media (max-width: 860px) {
  .empty-state.cal-empty { margin: 14px 12px; padding: 28px 16px; }
  .cal-empty-actions { width: 100%; }
  .cal-empty-actions .btn { flex: 1 1 160px; }
  .page-head { padding-top: 22px; }
  .page .panel-pad { padding: 18px; }
  .order-card { padding: 16px; }
  .cardbook-body { --spine: 100%; grid-template-columns: 1fr; grid-template-rows: 18px auto auto; }
  .cardbook-spine { background: var(--c-yellow) radial-gradient(circle at 14px 50%, var(--c-page) 0 5px, #0000 5.5px) 0 0 / 36px 100% repeat-x; border-right: 0; border-bottom: 2px solid var(--c-outline); }
  .cardbook-main { padding: 16px 18px; }
  .cardbook-price { flex-direction: row; align-items: center; justify-content: space-between; border-left: 0; border-top: 3px dashed var(--c-blue); padding: 14px 18px; }
  .cardbook.is-locked .cardbook-price { border-top: 3px dashed var(--c-line-warm); flex-direction: column; align-items: flex-start; gap: 8px; }
  .cardbook-price .price { white-space: nowrap; }
  .cardbook-price .price { font-size: 24px; }
  .standby-card { --stub-h: 128px; }
  .standby-main { padding: 18px 18px 20px; }
  .standby-stub { flex-direction: column; align-items: stretch; justify-content: center; padding: 0 18px; gap: 8px; }
  .standby-stub .btn { width: 100%; }
  .acc > summary { padding: 12px 16px; }
  .acc-body { padding: 0 16px 18px; }
  .product { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .product-body { grid-column: 1; grid-row: auto; padding: 18px 18px 22px; }
  .thumbs { padding: 8px 10px 6px; }
  .compare { font-size: 14px; }
  .compare th, .compare td { padding: 6px 8px; }
  .center-card { margin: 20px auto 64px; padding: 24px 20px 28px; }
  .warn-card { padding: 22px 20px 24px; }
  .form-actions .btn { flex: 1 1 100%; }
  .transfer dl > div { flex-direction: column; gap: 0; }
  .transfer dd { text-align: left; }
  .transfer .copy-row { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- fix pass ---- */
/* intro / plain blocks: quiet solid rules, no notches */
.pass.pass-plain { filter: none; }
.pass-plain .pass-card { -webkit-mask: none; mask: none; background: var(--c-surface); border: 2px solid var(--c-blue); overflow: hidden; }
.pass-plain .fields { border-top: 1px solid var(--c-line); }
.pass-plain .stub { border-top: 1px solid var(--c-line); }
.fields.fields-2 div.wide { grid-column: span 2; }
.fields.fields-2 div.wide:last-child { grid-column: span 2; }

.placeholder-copy { color: var(--c-ink-soft); font-style: normal; }
.ok-inline { margin-top: 12px; }
.dim-note { color: var(--c-ink-soft); font-size: 14px; }
.cardbook-price .price { white-space: nowrap; }

/* standby pass, read-only */
.standby-pass .standby-main { display: grid; gap: 14px; }
.standby-pass .fields { margin-top: 0; justify-content: start; grid-template-columns: repeat(auto-fit, minmax(150px, auto)); text-align: left; }
.standby-pass .slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.standby-pass .slots li { padding: 4px 14px; border: 1.5px solid var(--c-outline); border-radius: 999px; background: var(--c-surface); font-size: 15px; }
.standby-pass .pass-msg { padding: 10px 14px; border-radius: 12px; background: var(--c-yellow-tint); color: var(--c-ink); font-size: 15px; }
.standby-pass .standby-stub { padding-top: 10px; padding-bottom: 10px; }

/* modal dialog for embedded-browser warning */
dialog.warn-card { padding: 26px 28px 28px; margin: auto; max-height: calc(100dvh - 32px); overflow: auto; color: var(--c-text); }
dialog.warn-card::backdrop { background: rgba(61, 52, 49, .45); }
dialog.warn-card:not([open]) { display: none; }
.warn-opener { margin-top: 16px; }
.warn-backdrop-note { margin-top: 12px; color: var(--c-ink-soft); font-size: 15px; }

/* inline cancel result */
.cancel-result { margin-top: 12px; }
.loading-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; padding: 32px 20px; background: var(--c-surface); border: 2px solid var(--c-blue); border-radius: var(--radius-l); color: var(--c-ink-soft); }
.recovery { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; }
.recovery a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.ticket-stub .stub-status { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 6px 14px; background: var(--c-surface); border: 1.5px solid var(--c-ink); border-radius: 999px; font: 700 16px/1.2 var(--font-head); }
.ticket-stub .stub-status .icon { width: 20px; height: 20px; stroke-width: 2.25; }
.warn-close { position: absolute; top: 12px; right: 12px; }
dialog.warn-card { position: relative; }
dialog.warn-card[open] { position: fixed; }

/* FAQ image lightbox */
.text-link { background: none; border: 0; padding: 0; font: inherit; color: var(--c-ink); text-decoration: underline; cursor: pointer; }
[data-lightbox-src] { cursor: zoom-in; }
.lightbox { max-width: min(92vw, 960px); max-height: 92vh; padding: 12px; border: 2px solid var(--c-outline); border-radius: var(--radius-m); background: var(--c-surface); }
.lightbox::backdrop { background: rgba(61, 52, 49, .7); }
.lightbox form { display: flex; justify-content: flex-end; }
.lightbox img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; object-fit: contain; }
@media (max-width: 380px) {
  .brand-name { font-size: 17px; }
}
