/* =========================================================
   Otokara Events — Components & layouts (mock v0.2)
   Depends on tokens.css. Mobile-first; md ≥ 768px, lg ≥ 1024px.
   Principles: flat surfaces (no decorative shadows or gradients),
   hierarchy from weight/size/spacing, high-contrast text only,
   one brand color reserved for the primary action and active state.
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-weight: var(--w-body);
  font-size: var(--t-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: var(--w-black); line-height: var(--lh-tight); letter-spacing: -.02em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
b, strong { font-weight: var(--w-bold); }
:focus-visible { outline: 3px solid var(--c-ink); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Every view ends with the same breathing room before the footer */
#main { padding-bottom: var(--s-12); }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 760px; }

/* ---------- Review bar (mock-only chrome) ---------- */
.review-bar {
  display: flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 6px var(--gutter);
  background: var(--c-ink); color: var(--c-white);
  font-size: var(--t-xs); font-weight: var(--w-bold); line-height: 1.5; text-align: center;
}
.review-bar b { letter-spacing: .12em; }

/* ---------- Header ---------- */
.hdr {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}
.hdr__in { display: flex; align-items: center; gap: var(--s-3); height: 60px; }
.hdr__logo { display: flex; align-items: center; background: none; border: 0; padding: 0; cursor: pointer; }
/* Header logo: each character flips up into place one by one, holds, flips away, loops (6s) */
.lg { display: block; height: 32px; width: auto; aspect-ratio: 2598 / 1026; fill: var(--c-brand); overflow: visible; }
.lg-ch {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: lgFlip 6s cubic-bezier(.25, .8, .3, 1) infinite both;
  animation-delay: calc(var(--lg-off, 0ms) + var(--i) * 70ms);
}
@keyframes lgFlip {
  0%   { transform: translateY(6%) skewX(-6deg) scaleY(0); opacity: 0; }
  3%   { opacity: 1; }
  8%   { transform: translateY(-1%) scaleY(1.04); }
  11%  { transform: none; opacity: 1; }
  88%  { transform: none; opacity: 1; }
  95%  { transform: translateY(-4%) skewX(6deg) scaleY(0); opacity: 0; }
  100% { transform: translateY(6%) skewX(-6deg) scaleY(0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .lg-ch { animation: none !important; } }
.mock-pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 10px; border-radius: var(--r-pill);
  border: 1.5px solid var(--c-ink); background: var(--c-bg);
  color: var(--c-ink); font-weight: var(--w-xbold); font-size: 11px; letter-spacing: .1em;
  cursor: pointer;
}
.mock-pill .icon { width: 14px; height: 14px; }
.hdr__nav { display: none; margin-left: auto; gap: var(--s-1); height: 100%; }
.hdr__nav button {
  position: relative; height: 100%; padding: 0 var(--s-4); border: 0; background: none;
  color: var(--c-ink-2); font-weight: var(--w-bold); font-size: var(--t-md); cursor: pointer;
}
.hdr__nav button:hover { color: var(--c-ink); }
.hdr__nav button[aria-current="page"] { color: var(--c-ink); }
.hdr__nav button[aria-current="page"]::after { content: ""; position: absolute; left: var(--s-4); right: var(--s-4); bottom: -1px; height: 3px; background: var(--c-brand); }
.hdr__act { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.bell { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--c-ink); cursor: pointer; }
.bell:hover { background: var(--c-surface); }
.bell .icon { width: 24px; height: 24px; }
.bell__badge { position: absolute; top: 1px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-pill); background: var(--c-brand); color: var(--c-white); border: 2px solid var(--c-bg); font-size: 11px; font-weight: var(--w-black); line-height: 15px; text-align: center; font-variant-numeric: tabular-nums; }
.notice-list__ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface); color: var(--c-ink); }
.notice-list__ic .icon { width: 20px; height: 20px; }
.notice-list b { font-size: var(--t-md); line-height: 1.5; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-ink); color: var(--c-white); font-weight: var(--w-black); font-size: 15px;
  border: 0; cursor: pointer;
}
.btn-login {
  height: 40px; padding: 0 var(--s-5); border-radius: var(--r-pill);
  border: 0; background: var(--c-ink); color: var(--c-white); font-weight: var(--w-xbold); font-size: var(--t-sm); cursor: pointer;
}
@media (min-width: 900px) { .hdr__nav { display: flex; } .hdr__nav + .hdr__act { margin-left: var(--s-3); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--tap); padding: 0 var(--s-6); border-radius: var(--r-pill);
  border: 0; cursor: pointer; font-weight: var(--w-bold); font-size: var(--t-base); text-decoration: none; white-space: nowrap;
  transition: transform var(--d-fast) var(--ease-out), background-color var(--d-fast);
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--c-brand-ink); color: var(--c-white); }
.btn--primary:hover { background: var(--c-brand-hover); }
.btn--secondary { background: var(--c-bg); color: var(--c-ink); border: 1.5px solid var(--c-line-2); }
.btn--secondary:hover { border-color: var(--c-ink); }
.btn--soft { background: var(--c-surface); color: var(--c-ink); }
.btn--soft:hover { background: var(--c-surface-2); }
.btn--ghost { background: none; color: var(--c-ink); min-height: 40px; padding: 0 var(--s-3); text-decoration: underline; text-underline-offset: 3px; }
.btn--danger-ghost { background: none; color: var(--c-danger); min-height: 44px; font-size: var(--t-md); }
.btn--danger { background: var(--c-danger); color: var(--c-white); }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: 17px; }
.btn--sm { min-height: 40px; padding: 0 var(--s-4); font-size: var(--t-sm); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .icon { width: 20px; height: 20px; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 0; background: var(--c-bg); color: var(--c-ink); cursor: pointer;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn--glass, .icon-btn--photo { background: var(--c-photo-scrim); color: var(--c-white); }
.icon-btn .icon { width: 22px; height: 22px; }
.icon-btn.is-on { color: var(--c-brand); background: var(--c-bg); }
.icon-btn.is-on .icon { fill: currentColor; }

/* Favourite animation */
.icon-btn { position: relative; }
.icon-btn.is-pop .icon { animation: heartPop .6s cubic-bezier(.2, .9, .3, 1.4) both; }
.icon-btn.is-pop::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--c-brand); pointer-events: none;
  animation: heartRing .55s ease-out both;
}
.icon-btn.is-unpop .icon { animation: heartOut .25s ease-out both; }
.burst { position: absolute; inset: 0; pointer-events: none; }
.burst { z-index: 1; }
.burst i {
  position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--c-brand); animation: heartBurst .7s cubic-bezier(.15, .8, .3, 1) both .06s;
}
.burst i:nth-child(even) { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--c-brand-hover); animation-name: heartBurstNear; }
@keyframes heartPop { 0% { transform: scale(1); } 15% { transform: scale(.55); } 45% { transform: scale(1.4); } 70% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes heartRing { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes heartOut { 0% { transform: scale(1); } 40% { transform: scale(.75); } 100% { transform: scale(1); } }
@keyframes heartBurst {
  0% { transform: rotate(var(--a)) translateY(-14px) scale(.4); opacity: 0; }
  20% { opacity: 1; }
  65% { transform: rotate(var(--a)) translateY(-36px) scale(1); opacity: 1; }
  100% { transform: rotate(var(--a)) translateY(-42px) scale(.2); opacity: 0; }
}
@keyframes heartBurstNear {
  0% { transform: rotate(var(--a)) translateY(-12px) scale(.4); opacity: 0; }
  20% { opacity: 1; }
  65% { transform: rotate(var(--a)) translateY(-30px) scale(1); opacity: 1; }
  100% { transform: rotate(var(--a)) translateY(-34px) scale(.2); opacity: 0; }
}

/* ---------- Tags / status / labels ---------- */
.tag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: var(--w-bold); white-space: nowrap;
  background: var(--c-surface); color: var(--c-ink);
}
.status {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 9px;
  border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: var(--w-xbold); white-space: nowrap;
  background: var(--c-bg); color: var(--c-ink);
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--open { color: var(--c-ok); }
.status--few { color: var(--c-warn); }
.status--full { color: var(--c-ink-2); }
.status--booked { color: var(--c-white); background: var(--c-brand-ink); }
.status--booked::before { background: var(--c-white); }
.status--done { color: var(--c-ink); background: var(--c-surface); }

/* "仮" = placeholder data, "案" = undecided operations copy. Always visible. */
.kari {
  display: inline-flex !important; width: auto !important; align-items: center; height: 18px; padding: 0 5px; margin-left: 6px;
  border-radius: var(--r-xs); border: 1px solid var(--c-ink-2); background: var(--c-bg);
  color: var(--c-ink); font-size: 10px; font-weight: var(--w-xbold); letter-spacing: .04em; line-height: 1;
  vertical-align: middle;
}
.kari--draft { border-color: var(--c-ink); background: var(--c-ink); color: var(--c-white); }
.kari--bar { border-color: var(--c-white); background: var(--c-white); color: var(--c-ink); margin-inline: 2px; }
.draft-note { display: flex; gap: 8px; align-items: flex-start; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: var(--c-surface); font-size: var(--t-sm); font-weight: var(--w-bold); line-height: 1.6; color: var(--c-ink); }
.draft-note .kari { margin: 2px 0 0; flex: none; }

/* Review memos (toggled from the review panel) */
.memo { display: none; }
.show-memos .memo {
  display: flex; gap: var(--s-2); align-items: flex-start;
  margin-block: var(--s-3); padding: var(--s-3) var(--s-4);
  border: 1.5px dashed var(--c-ink); border-radius: var(--r-sm);
  background: var(--c-bg); color: var(--c-ink); font-size: var(--t-sm); line-height: 1.65;
}
.show-memos .memo::before { content: "MEMO"; font-weight: var(--w-black); font-size: 10px; letter-spacing: .12em; padding-top: 3px; }

/* ---------- Section heading ---------- */
.eyebrow { font-weight: var(--w-xbold); font-size: var(--t-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--c-brand-ink); }
.sec-head { display: grid; gap: var(--s-2); margin-bottom: var(--s-6); }
.sec-head h2 { font-size: var(--t-xl); }
.sec-head p { color: var(--c-ink-2); font-size: var(--t-md); }

/* =========================================================
   A. Event list
   ========================================================= */

/* Filters */
.filters { position: sticky; margin-top: var(--s-2); top: calc(env(safe-area-inset-top, 0px) + 61px); z-index: 30; background: var(--c-bg); padding-block: var(--s-3); border-bottom: 1px solid var(--c-line); }
.filters__row { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.filters__row::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 40px; padding: 0 var(--s-4);
  border-radius: var(--r-pill); border: 0; background: var(--c-surface);
  font-weight: var(--w-bold); font-size: var(--t-sm); color: var(--c-ink); cursor: pointer; white-space: nowrap;
  transition: background-color var(--d-fast), color var(--d-fast);
}
.chip .icon { width: 16px; height: 16px; }
.chip:hover { background: var(--c-surface-2); }
.chip[aria-pressed="true"] { background: var(--c-ink); color: var(--c-white); }
.filters__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 0; font-size: var(--t-sm); color: var(--c-ink-2); }
.pref-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border: 1.5px solid var(--c-line-2); border-radius: var(--r-pill); background: var(--c-bg); color: var(--c-ink); font-size: var(--t-sm); font-weight: var(--w-bold); cursor: pointer; }
.pref-btn:hover { border-color: var(--c-ink); }
.pref-btn .icon { width: 16px; height: 16px; }
/* Drum-roll picker: 5 rows visible, centre row is the selection */
.drum { position: relative; height: calc(44px * 5); border-radius: var(--r-md); background: var(--c-bg); }
.drum::before { content: ""; position: absolute; left: 0; right: 0; top: calc(44px * 2); height: 44px; box-sizing: border-box; border: 1.5px solid var(--c-ink); background: var(--c-surface); border-radius: var(--r-sm); pointer-events: none; }
.drum::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(var(--c-bg) 0%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 62%, var(--c-bg) 100%); }
.drum__list { position: relative; height: 100%; margin: 0; padding: calc(44px * 2) 0; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; border-radius: var(--r-md); }
.drum__list::-webkit-scrollbar { display: none; }
.drum__list:focus-visible { outline: 3px solid var(--c-ink); outline-offset: 2px; }
.drum__item { height: 44px; display: grid; place-items: center; scroll-snap-align: center; font-size: var(--t-lg); font-weight: var(--w-bold); color: var(--c-ink-2); cursor: pointer; user-select: none; transition: color var(--d-fast), font-size var(--d-fast); }
.drum__item.is-sel { color: var(--c-ink); font-weight: var(--w-black); font-size: 1.25rem; }
.drum__item.is-off { color: #b8b8b8; }
.drum__item.is-off.is-sel { color: #a0a0a0; }
.filters__meta b { color: var(--c-ink); font-size: var(--t-base); margin-right: 2px; }

/* Event card — photo on top, text on white below */
.cards { display: grid; gap: var(--s-8); padding-block: var(--s-6) 0; }
.ev-card { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: var(--s-3); cursor: pointer; animation: rise var(--d-slow) var(--ease-out) both; border-radius: var(--r-md); }
.ev-card__ph { position: relative; width: 100%; aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--r-md); background: var(--c-surface); } /* not clipped, so the favourite burst can fly out */
.ev-card__ph img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ev-card__ph .status { position: absolute; left: var(--s-3); top: var(--s-3); }
.ev-card__ph .icon-btn { position: absolute; right: var(--s-3); top: var(--s-3); width: 40px; height: 40px; }
.ev-card__body { display: grid; gap: 6px; }
.ev-card__date { font-size: var(--t-sm); font-weight: var(--w-xbold); color: var(--c-brand-ink); }
.ev-card__title { font-size: 1.25rem; line-height: 1.4;  overflow-wrap: anywhere;}
.ev-card:hover .ev-card__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.ev-card__meta { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: var(--t-sm); color: var(--c-ink-2); }
.ev-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Corner sash: a filled triangle in the photo's top-left corner (Mercari-style),
   label rotated along the diagonal. */
.sash {
  position: absolute; z-index: 2; top: 0; left: 0; width: 92px; height: 92px; pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 0 100%); border-top-left-radius: var(--r-md);
}
.sash > span {
  position: absolute; top: 19px; left: -22px; width: 100px;
  transform: rotate(-45deg); text-align: center; white-space: nowrap;
  color: var(--c-white); font-size: 12px; font-weight: var(--w-black); letter-spacing: .04em; line-height: 1.2;
}
.sash--new { background: var(--c-av-2); }
.sash--new > span { letter-spacing: .14em; }
.sash--few { background: var(--c-warn); }
.sash--few > span { top: 13px; left: -24px; line-height: 1.15; }
.sash--full { background: var(--c-ink); }
.sash--booked { background: var(--c-brand-ink); }
.status--new { color: var(--c-white); background: var(--c-av-2) !important; }
.status--new::before { background: var(--c-white); }
.cta-bar__full { display: grid; flex: none; line-height: 1.25; font-size: var(--t-xs); font-weight: var(--w-bold); color: var(--c-ink-2); }
.cta-bar__full b { font-size: var(--t-lg); font-weight: var(--w-black); color: var(--c-ink); }

.urgency { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border: 1px solid var(--c-line-2); border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: var(--w-bold); color: var(--c-ink); white-space: nowrap; }
.urgency::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.urgency--red::before { background: var(--c-brand); }
.urgency--yellow::before { background: #e8b100; }
.urgency--green::before { background: #1f9d55; }
.dt-head .urgency { margin-top: -4px; }
.ev-card__when { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--c-ink); }
.ev-card__when li { display: inline-flex; align-items: center; gap: 5px; }
.ev-card__when .icon { width: 16px; height: 16px; color: var(--c-ink-2); }
.ev-card__people { display: flex; justify-content: flex-start; margin-top: 6px; }
.ev-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 32px; }
.ev-card__foot .ev-card__meta { min-width: 0; }

/* Participant avatars (profile photo or grey silhouette) */
.av {
  display: inline-grid; place-items: center; flex: none; padding: 0; border-radius: 50%;
  border: 2px solid var(--c-bg); color: var(--c-white); font-weight: var(--w-black); line-height: 1; cursor: pointer;
  transition: transform var(--d-fast) var(--ease-out);
}
button.av:hover { transform: translateY(-2px); }
.av--sm { width: 32px; height: 32px; font-size: 13px; }
.av--md { width: 44px; height: 44px; font-size: 16px; }
.av--xl { width: 88px; height: 88px; font-size: 34px; border: 0; cursor: default; }
.av--t0 { background: var(--c-av-0); } .av--t1 { background: var(--c-av-1); } .av--t2 { background: var(--c-av-2); }
.av--t3 { background: var(--c-av-3); } .av--t4 { background: var(--c-av-4); } .av--t5 { background: var(--c-av-5); }
.av--t6 { background: var(--c-av-6); }
/* Faces: profile photo, or a grey silhouette when none is registered */
.av, .avatar { overflow: hidden; }
.av img, .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.av--none, .avatar.av--none { background: var(--c-surface-2); color: #a3a3a3; align-items: end; }
.av__none { width: 100%; height: 100%; fill: currentColor; stroke: none; display: block; }
.avatar.av--photo, .avatar.av--none { padding: 0; }
.av--more { background: var(--c-surface); color: var(--c-ink); font-weight: var(--w-xbold); }
.av--sm.av--more { font-size: 12px; }
.av-stack { display: flex; align-items: center; flex: none; }
.av-stack > * + * { margin-left: -8px; }
.av-stack--md > * + * { margin-left: -10px; }
.av-stack { padding-bottom: 6px; } /* room for the 主催 tag */

/* Host: brand ring + 主催 tag overlapping the bottom of the avatar */
.av--host { border-color: var(--c-brand-ink); border-width: 2.5px; }
.av--host { animation: hostGlow 2.2s ease-out infinite; }
@keyframes hostGlow {
  0% { box-shadow: 0 0 0 0 rgba(231, 59, 136, .55); }
  70% { box-shadow: 0 0 0 7px rgba(231, 59, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(231, 59, 136, 0); }
}
.av-host { position: relative; display: inline-flex; flex: none; z-index: 1; }
.av-host__tag {
  position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  padding: 1px 6px; border-radius: var(--r-pill); background: var(--c-brand-ink); color: var(--c-white);
  font-size: 9px; font-weight: var(--w-black); line-height: 1.4; white-space: nowrap; pointer-events: none;
}
.av-stack--md .av-host__tag { font-size: 11px; padding: 1px 8px; bottom: -8px; }
.host-tag { display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--c-brand-ink); color: var(--c-white); font-size: 11px; font-weight: var(--w-black); line-height: 1.5; vertical-align: middle; }
.host-tag--lg { font-size: 12px; padding: 2px 10px; }

/* Favourite count on photos (bottom-right) */
.fav-count {
  position: absolute; z-index: 2; right: var(--s-3); bottom: var(--s-3);
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px;
  border-radius: var(--r-pill); background: var(--c-photo-scrim); color: var(--c-white);
  font-size: var(--t-sm); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; pointer-events: none;
}
.fav-count .icon { width: 15px; height: 15px; }
.fav-count.is-on .icon { color: var(--c-brand); fill: currentColor; }
.fav-count.is-bump b { display: inline-block; animation: countBump .4s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes countBump { 0% { transform: translateY(0); } 40% { transform: translateY(-4px) scale(1.15); } 100% { transform: none; } }

/* Detail photo carousel */
.gallery__track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { outline: 3px solid var(--c-white); outline-offset: -6px; }
.gallery__slide { flex: 0 0 100%; min-width: 0; height: 100%; margin: 0; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }
.gallery__slide img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; } /* any aspect ratio fills the frame */
.gallery__dots { position: absolute; z-index: 2; left: 50%; bottom: var(--s-3); transform: translateX(-50%); display: flex; gap: 2px; }
.gallery__dot { width: 20px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.gallery__dot::before { content: ""; width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .6); transition: width var(--d-med) var(--ease-out), background-color var(--d-fast); }
.gallery__dot[aria-current]::before { width: 18px; background: var(--c-white); }
.gallery__count { position: absolute; z-index: 2; left: var(--s-3); bottom: var(--s-3); height: 28px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: var(--r-pill); background: var(--c-photo-scrim); color: var(--c-white); font-size: var(--t-sm); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.gallery__count b { margin-right: 3px; }
.gallery__nav { display: none; position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); }
.gallery__nav--prev { left: var(--s-4); }
.gallery__nav--next { right: var(--s-4); }
.gallery__nav[disabled] { opacity: 0; pointer-events: none; }
.gallery__nav:active { transform: translateY(-50%) scale(.94); } /* keep centring while pressed, or the click lands on the photo */
@media (min-width: 1024px) {
  .gallery__nav { display: grid; }
  /* the raised booking card covers the bottom-right corner on desktop */
  .gallery .fav-count { right: auto; left: calc(var(--s-3) + 72px); }
}

.people { display: grid; gap: var(--s-3); }
.people__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.people__head h2 { font-size: var(--t-lg); display: flex; align-items: center; }
.people__count { font-size: var(--t-sm); color: var(--c-ink-2); font-weight: var(--w-bold); }
.people__count b { color: var(--c-ink); font-size: var(--t-base); }
.people__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.people__row .btn .icon { width: 16px; height: 16px; }

.people-list { display: grid; border-top: 1px solid var(--c-line); }
.people-list button { display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; gap: var(--s-3); align-items: center; width: 100%; min-height: 64px; padding: var(--s-2) 0; border: 0; border-bottom: 1px solid var(--c-line); background: none; text-align: left; cursor: pointer; }
.people-list button:hover b { text-decoration: underline; text-underline-offset: 3px; }
.people-list .av { cursor: inherit; }
.people-list b { display: block; font-size: var(--t-base); }
.people-list small { display: block; font-size: var(--t-sm); color: var(--c-ink-2); font-weight: var(--w-body); }
.people-list .icon { width: 18px; height: 18px; }

.prof { display: flex; align-items: center; gap: var(--s-5); padding-block: var(--s-4) var(--s-2); }
.prof h1 { font-size: var(--t-2xl); letter-spacing: -.03em; }
.prof p { color: var(--c-ink-2); font-size: var(--t-base); margin-top: 4px; display: flex; align-items: center; }
.prof__sec { display: grid; gap: var(--s-3); padding-top: var(--s-5); border-top: 1px solid var(--c-line); }
.prof__sec h2 { font-size: var(--t-lg); }
.prof__sec > p { color: var(--c-ink-2); }

.coming-card { display: grid; gap: var(--s-3); justify-items: start; padding: var(--s-6) var(--s-5); border-radius: var(--r-md); border: 1.5px dashed var(--c-line-2); }
.coming-card h3 { font-size: var(--t-lg); display: flex; align-items: center; }
.coming-card p { color: var(--c-ink-2); font-size: var(--t-md); }

.empty { display: grid; justify-items: center; gap: var(--s-3); padding: var(--s-12) var(--s-6); text-align: center; color: var(--c-ink-2); border-radius: var(--r-md); background: var(--c-surface); }
.empty .icon { width: 32px; height: 32px; color: var(--c-ink); }
.empty h3 { color: var(--c-ink); font-size: var(--t-lg); }

/* Icon disc (used by the detail page safety list) */
.safety-tile__ic { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface); color: var(--c-ink); }
.safety-tile__ic .icon { width: 20px; height: 20px; }

.ftr { padding-block: var(--s-10) var(--s-10); background: var(--c-surface); font-size: var(--t-sm); color: var(--c-ink-2); }
.ftr__in { display: grid; gap: var(--s-4); }
.ftr img { height: 36px; width: auto; }
.ftr nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); color: var(--c-ink); font-weight: var(--w-bold); }

/* =========================================================
   B. Event detail
   ========================================================= */
.dt-hero { position: relative; }
/* Event photos use one ratio everywhere (4:3 = 横4:縦3: list, detail, related, completion,
   thumbnails), so a single banner size works without per-screen crops. */
.dt-hero__photo { position: relative; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; background: var(--c-surface); }
.dt-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.dt-hero__tools { position: absolute; z-index: 2; top: var(--s-4); left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; }
.dt-hero__tools div { display: flex; gap: var(--s-2); }

.dt-main { position: relative; z-index: 3; background: var(--c-bg); padding-top: var(--s-6); }

/* Mobile: the photo stays pinned under the header; the white sheet slides
   over it with rounded top corners, and the photo dims and blurs as it goes
   (--hero-p, 0 → 1, is set from scroll in app.js). */
@media (max-width: 1023px) {
  .dt-hero { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 61px); z-index: 1; }
  .dt-hero .gallery__track { filter: blur(calc(var(--hero-p, 0) * 10px)) brightness(calc(1 - var(--hero-p, 0) * .55)); transform: scale(calc(1 + var(--hero-p, 0) * .06)); }
  .dt-hero__tools { opacity: calc(1 - var(--hero-p, 0) * 1.6); }
  .dt-main { margin-top: -24px; border-radius: 24px 24px 0 0; }
  .gallery .gallery__dots, .gallery .gallery__count, .gallery .fav-count { bottom: calc(24px + var(--s-3)); }
}
.dt-layout { display: grid; gap: var(--s-8); }
.dt-head { display: grid; gap: var(--s-3); }
.dt-head__row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dt-head__row .status { background: var(--c-surface); }
.dt-head__row .status--booked { background: var(--c-brand-ink); }
.dt-head h1 { font-size: clamp(1.25rem, 5.2vw, 1.75rem); line-height: 1.35; letter-spacing: -.03em; } /* 70% of the previous size */

/* Key facts: label column + value column, hairline separated */
.facts { display: grid; border-top: 1px solid var(--c-line); }
.facts > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: var(--s-3); padding-block: var(--s-3); border-bottom: 1px solid var(--c-line); align-items: baseline; }
.facts dt { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--c-ink-2); }
.facts dt .icon { width: 18px; height: 18px; color: var(--c-ink); align-self: center; }
.facts dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.facts dd b { font-size: var(--t-base); font-weight: var(--w-bold); }
.target { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--r-pill); border: 1.5px solid currentColor; font-size: var(--t-sm); font-weight: var(--w-black); line-height: 1; }
.target--mixed { color: var(--c-ink); }
.target--female { color: var(--c-brand-ink); background: var(--c-brand-tint); }
.target--male { color: var(--c-av-2); background: #e8f1f6; }
.facts dd .target + .kari { align-self: center; }
.facts dd span { font-size: var(--t-sm); color: var(--c-ink-2); }


.dt-sec { display: grid; gap: var(--s-4); padding-top: var(--s-8); border-top: 1px solid var(--c-line); }
.dt-sec h2 { font-size: var(--t-xl); }
.dt-about { font-size: var(--t-base); color: var(--c-ink-2); }
.about { position: relative; display: grid; gap: var(--s-2); justify-items: center; }
.about .dt-about { justify-self: stretch; }
/* Collapsed: clamp to 5 lines and end the last line with "…" */
.about[data-open="false"] .dt-about { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
.about__more { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 var(--s-5); border: 1.5px solid var(--c-line-2); border-radius: var(--r-pill); background: var(--c-bg); color: var(--c-ink); font-size: var(--t-md); font-weight: var(--w-bold); cursor: pointer; }
.about__more:hover { border-color: var(--c-ink); }
.about__more .icon { width: 18px; height: 18px; }

.info-banners { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
.info-banner {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 18px; gap: var(--s-3); align-items: center; position: relative;
  min-height: 72px; padding: var(--s-3) var(--s-4); border: 0; border-radius: var(--r-md); background: var(--c-surface);
  text-align: left; cursor: pointer; transition: background-color var(--d-fast), transform var(--d-fast) var(--ease-out);
}
.info-banner:hover { background: var(--c-surface-2); }
.info-banner:active { transform: scale(.98); }
.info-banner__ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c-ink); color: var(--c-white); }
.info-banner__ic .icon { width: 20px; height: 20px; }
.info-banner__tx { display: grid; gap: 2px; min-width: 0; }
.info-banner__tx b { font-size: var(--t-md); font-weight: var(--w-black); line-height: 1.4; }
.info-banner__tx b .kari { margin-left: 4px; }
.info-banner__tx small { font-size: var(--t-sm); color: var(--c-ink-2); }
.info-banner > .icon { width: 18px; height: 18px; }
.sheet .safety-list, .sheet .faq { border-top: 1px solid var(--c-line); }


.spec { border-top: 1px solid var(--c-line); }
.spec__row { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: var(--s-3); padding-block: var(--s-3); border-bottom: 1px solid var(--c-line); font-size: var(--t-base); }
.spec__row dt { color: var(--c-ink-2); font-weight: var(--w-bold); font-size: var(--t-sm); padding-top: 2px; }
.spec__row dd { font-weight: var(--w-bold); min-width: 0; }
.spec__row dd small { display: block; color: var(--c-ink-2); font-size: var(--t-sm); font-weight: var(--w-body); }
.spec__row dd small.spec__min { color: var(--c-danger); font-weight: var(--w-bold); }

.fee { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
.fee__box { padding: var(--s-4); border-radius: var(--r-md); display: grid; gap: 2px; align-content: start; border: 1.5px solid var(--c-line-2); }
.fee__box--event { border-color: var(--c-ink); }
.fee__lb { font-size: var(--t-xs); font-weight: var(--w-xbold); color: var(--c-ink-2); }
.fee__v { font-weight: var(--w-bold); font-size: 2rem; line-height: 1.15; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.fee__v small { font-size: var(--t-base); margin-left: 2px; }
.fee__box--venue .fee__v { font-size: var(--t-lg); padding-block: 6px 2px; }
.fee__note { font-size: var(--t-sm); color: var(--c-ink-2); line-height: 1.55; }


.safety-list { display: grid; border-top: 1px solid var(--c-line); }
.safety-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-4); align-items: center; padding-block: var(--s-3); border-bottom: 1px solid var(--c-line); }
.safety-list .safety-tile__ic { grid-row: auto; }
.safety-list b { display: block; font-size: var(--t-base); }
.safety-list li > div span { display: block; font-size: var(--t-md); color: var(--c-ink-2); line-height: 1.55; }

.faq { display: grid; border-top: 1px solid var(--c-line); }
.faq details { border-bottom: 1px solid var(--c-line); }
.faq summary { list-style: none; display: grid; grid-template-columns: 24px minmax(0, 1fr) 20px; gap: var(--s-2); align-items: center; padding-block: var(--s-4); cursor: pointer; font-weight: var(--w-bold); font-size: var(--t-base); min-height: var(--tap); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q { font-weight: var(--w-black); color: var(--c-brand-ink); }
.faq summary .icon { width: 20px; height: 20px; transition: transform var(--d-med) var(--ease-out); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 0 var(--s-4) 32px; color: var(--c-ink-2); font-size: var(--t-md); white-space: pre-line; }

.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 70%); gap: var(--s-4); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) var(--s-2); scrollbar-width: none; overscroll-behavior-x: contain; } /* snap keeps the gutter */
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
.mini-card { display: grid; gap: var(--s-2); padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.mini-card__ph { position: relative; aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--r-md); overflow: hidden; }
.mini-card__ph img { width: 100%; height: 100%; object-fit: cover; }
.mini-card__ph .status { position: absolute; left: 10px; top: 10px; }
.mini-card h3 { font-size: var(--t-base); line-height: 1.45; }
.mini-card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.mini-card p { font-size: var(--t-sm); color: var(--c-ink-2); display: flex; gap: 10px; }

.book-card { display: none; }

/* Sticky CTA (mobile) */
.cta-bar {
  position: fixed; z-index: 45; left: 0; right: 0; bottom: 0;
  padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom, 0px));
  background: var(--c-bg); border-top: 1px solid var(--c-line);
  display: flex; align-items: center; gap: var(--s-4);
  animation: slideUp var(--d-slow) var(--ease-out) both .15s;
}
.cta-bar .btn { flex: 1; width: 100%; }
.has-tabbar .ftr { padding-bottom: calc(var(--s-10) + 72px); }
.has-cta .ftr { padding-bottom: calc(var(--s-10) + 96px); }

/* =========================================================
   C. Sheet (bottom sheet on mobile, dialog on desktop)
   ========================================================= */
.sheet-root { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--c-scrim); }
.sheet-root.is-enter .sheet-backdrop { animation: fade var(--d-med) var(--ease-out) both; }
.sheet {
  position: relative; width: 100%; max-height: 92%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--c-bg); border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: var(--s-2) var(--gutter) calc(var(--s-6) + env(safe-area-inset-bottom, 0px));
}
.sheet:focus { outline: none; }
.sheet-root.is-enter .sheet { animation: sheetIn var(--d-slow) var(--ease-out) both; }
.sheet-root.is-closing .sheet { animation: sheetOut var(--d-med) ease-in both; }
.sheet-root.is-closing .sheet-backdrop { animation: fade var(--d-med) ease-in reverse both; }
.sheet__grab { width: 36px; height: 4px; border-radius: 2px; background: var(--c-line-2); margin: 0 auto var(--s-3); }
.sheet__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 44px; }
.sheet__top .icon-btn { background: var(--c-surface); width: 40px; height: 40px; }
.sheet__top .icon-btn:hover { background: var(--c-surface-2); }
.sheet__step { animation: stepIn var(--d-med) var(--ease-out) both; display: grid; gap: var(--s-5); }
.sheet h2 { font-size: var(--t-xl); }
.sheet__lead { color: var(--c-ink-2); font-size: var(--t-md); margin-top: -8px; }
.sheet__lead--ok { display: flex; align-items: center; gap: 6px; color: var(--c-ok); font-weight: var(--w-bold); }
.sheet__lead--ok .icon { width: 18px; height: 18px; stroke-width: 2.6; }

.progress { display: flex; align-items: center; gap: 4px; font-size: var(--t-xs); font-weight: var(--w-xbold); color: var(--c-ink); }
.progress i { width: 28px; height: 4px; border-radius: 2px; background: var(--c-line); }
.progress i.on { background: var(--c-ink); }
.progress span { margin-left: 6px; font-variant-numeric: tabular-nums; }

.ev-mini { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s-3); align-items: center; padding-block: var(--s-3); border-block: 1px solid var(--c-line); }
.ev-mini img { width: 64px; height: 48px; border-radius: var(--r-sm); object-fit: cover; }
.ev-mini b { display: block; font-size: var(--t-md); line-height: 1.45; }
.ev-mini span { display: block; font-size: var(--t-sm); color: var(--c-ink-2); }

.auth { display: grid; gap: var(--s-2); }
.auth__btn {
  display: grid; grid-template-columns: 28px 1fr 28px; align-items: center; min-height: 52px; padding: 0 var(--s-4);
  border-radius: var(--r-pill); border: 1.5px solid var(--c-line-2); background: var(--c-bg); cursor: pointer;
  font-weight: var(--w-bold); font-size: var(--t-base); transition: border-color var(--d-fast);
}
.auth__btn:hover { border-color: var(--c-ink); }
.auth__btn:active { transform: scale(.99); }
.auth__glyph { width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; font-weight: var(--w-black); font-size: 13px; color: var(--c-white); }
.auth__glyph--line { background: #06c755; }
.auth__glyph--mail { background: var(--c-surface); color: var(--c-ink); }
.auth__glyph .icon { width: 16px; height: 16px; }
.auth__btn[disabled] { cursor: default; opacity: .5; }
.auth__btn[aria-busy="true"] { opacity: 1; border-color: var(--c-ink); }
.divider { display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-xs); font-weight: var(--w-bold); color: var(--c-ink-2); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }
.fine { font-size: var(--t-sm); color: var(--c-ink-2); line-height: 1.6; text-align: center; }
.fine button { border: 0; background: none; padding: 0; color: var(--c-ink); font-weight: var(--w-bold); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }

.field { display: grid; gap: 6px; }
.field label, .field .lb { font-weight: var(--w-bold); font-size: var(--t-sm); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.field label small, .field .lb small { font-weight: var(--w-body); color: var(--c-ink-2); font-size: var(--t-xs); }
.input, .select {
  width: 100%; height: 52px; padding: 0 var(--s-4); border-radius: var(--r-sm);
  border: 1.5px solid var(--c-line-2); background: var(--c-bg); font: inherit; font-size: 16px; color: var(--c-ink);
}
.input::placeholder { color: #767676; }
.input:focus, .select:focus { outline: none; border-color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-ink); }
.input.is-error, .select.is-error { border-color: var(--c-danger); }
.dob { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-2); }
.hint { font-size: var(--t-xs); color: var(--c-ink-2); }
.err { font-size: var(--t-sm); color: var(--c-danger); font-weight: var(--w-bold); display: flex; gap: 4px; align-items: center; }
.err .icon { width: 16px; height: 16px; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-3); align-items: start; font-size: var(--t-sm); cursor: pointer; line-height: 1.6; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--c-ink); }
.check a { color: var(--c-ink); font-weight: var(--w-bold); }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2); }
.code-row .btn { min-height: 52px; padding: 0 var(--s-4); font-size: var(--t-sm); }

.confirm-list { display: grid; border-top: 1px solid var(--c-line); }
.confirm-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: var(--s-3); padding-block: var(--s-3); border-bottom: 1px solid var(--c-line); font-size: var(--t-md); line-height: 1.6; color: var(--c-ink-2); }
.confirm-list .icon { width: 20px; height: 20px; color: var(--c-ink); margin-top: 2px; stroke-width: 2.4; }
.confirm-list b { color: var(--c-ink); }
.toggle-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.toggle-chips .chip { height: 40px; }
.toggle-chips .chip[aria-pressed="true"] { background: var(--c-ink); color: var(--c-white); }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: var(--c-white); animation: spin .8s linear infinite; }
.spinner--pink { width: 16px; height: 16px; border-width: 2px; border-color: var(--c-line-2); border-top-color: var(--c-ink); }
.resume-note { display: flex; align-items: center; gap: 6px; margin-top: -8px; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--c-ink); }
.resume-note .icon { width: 16px; height: 16px; }

/* =========================================================
   D. Completion / My events / Booking detail
   ========================================================= */
.done-hero { padding-block: var(--s-10) var(--s-6); }
.done-hero__badge { width: 64px; height: 64px; margin-bottom: var(--s-5); border-radius: 50%; display: grid; place-items: center; background: var(--c-ok); color: var(--c-white); animation: pop .5s var(--ease-out) both .05s; }
.done-hero__badge .icon { width: 32px; height: 32px; stroke-width: 3; }
.done-hero h1 { font-size: clamp(1.75rem, 7.4vw, 2.5rem); letter-spacing: -.035em; }
.done-hero p { color: var(--c-ink-2); margin-top: var(--s-2); font-size: var(--t-base); }

.res-card { border-radius: var(--r-md); background: var(--c-bg); overflow: hidden; border: 1px solid var(--c-line-2); }
.res-card__ph { position: relative; aspect-ratio: 4 / 3; max-width: 100%; }
.res-card__ph img { width: 100%; height: 100%; object-fit: cover; }
.res-card__ph .status { position: absolute; left: var(--s-4); top: var(--s-4); }
.res-card__body { display: grid; gap: var(--s-4); padding: var(--s-5); }
.res-card__body h2 { font-size: var(--t-lg); }
.res-id { display: flex; justify-content: space-between; align-items: center; padding-top: var(--s-4); border-top: 1px solid var(--c-line); font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--c-ink-2); }
.res-id b { font-size: var(--t-base); color: var(--c-ink); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.info-rows { display: grid; gap: var(--s-3); }
.info-rows li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s-3); align-items: center; }
.info-rows .ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface); color: var(--c-ink); }
.info-rows .ic .icon { width: 18px; height: 18px; }
.info-rows b { display: block; font-size: var(--t-base); line-height: 1.5; }
.info-rows span { display: block; font-size: var(--t-sm); color: var(--c-ink-2); line-height: 1.5; }

.guide { display: grid; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-md); background: var(--c-surface); }
.guide h3 { font-size: var(--t-lg); display: flex; gap: var(--s-2); align-items: center; }
.guide ol { display: grid; gap: var(--s-3); counter-reset: g; }
.guide li { counter-increment: g; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: var(--s-2); font-size: var(--t-md); line-height: 1.6; color: var(--c-ink); }
.guide li::before { content: counter(g); width: 24px; height: 24px; border-radius: 50%; background: var(--c-ink); color: var(--c-white); font-weight: var(--w-black); font-size: 12px; display: grid; place-items: center; }

.done-wrap { display: grid; gap: var(--s-6); min-width: 0; } /* mobile: card and actions stacked with room between */
.done-actions { display: grid; gap: var(--s-2); }
.stack { display: grid; gap: var(--s-5); padding-block: var(--s-6) 0; }

.page-head { padding-block: var(--s-8) var(--s-5); display: grid; gap: var(--s-2); }
.page-head h1 { font-size: var(--t-2xl); letter-spacing: -.03em; }
.page-head p { color: var(--c-ink-2); font-size: var(--t-base); }
.back-link { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font-weight: var(--w-bold); color: var(--c-ink); font-size: var(--t-sm); cursor: pointer; min-height: 40px; }
.back-link .icon { width: 18px; height: 18px; }

.tabs { display: flex; gap: var(--s-6); border-bottom: 1px solid var(--c-line); position: relative; }
.tabs button { position: relative; height: 48px; padding: 0; border: 0; background: none; font-weight: var(--w-bold); font-size: var(--t-base); color: var(--c-ink-2); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--c-ink); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--c-brand); }
.tabs__ind { display: none; }
.tabs .count { margin-left: 6px; font-variant-numeric: tabular-nums; }

.my-list { display: grid; gap: 0; padding-block: var(--s-2) 0; }
.my-card { display: grid; grid-template-columns: 88px minmax(0, 1fr) 20px; gap: var(--s-4); align-items: center; padding: var(--s-4) 0; border: 0; border-bottom: 1px solid var(--c-line); background: none; text-align: left; cursor: pointer; width: 100%; animation: rise var(--d-slow) var(--ease-out) both; }
.my-card::after { content: "›"; font-size: 24px; font-weight: var(--w-bold); color: var(--c-ink); }
.my-card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.my-card__ph { position: relative; width: 96px; height: 72px; border-radius: var(--r-sm); overflow: hidden; }
.my-card__ph img { width: 100%; height: 100%; object-fit: cover; }
.my-card--past .my-card__ph img { filter: grayscale(.6); }
.my-card__body { display: grid; gap: 4px; min-width: 0; }
.my-card__body h3 { font-weight: var(--w-black); font-size: var(--t-base); line-height: 1.45; }
.my-card__body p { font-size: var(--t-sm); color: var(--c-ink-2); display: flex; align-items: center; gap: 4px; }
.my-card__body p .icon { width: 14px; height: 14px; color: var(--c-ink); }
.my-card__top { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.my-card__top .status--done { background: var(--c-surface); }
.fav-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: var(--s-2); align-items: center; border-bottom: 1px solid var(--c-line); }
.fav-row .my-card { border-bottom: 0; grid-template-columns: 88px minmax(0, 1fr); }
.fav-row .my-card::after { display: none; }
.fav-row .icon-btn { background: var(--c-surface); }
.fav-row .icon-btn:not(.is-on) { color: var(--c-ink); }
.countdown { font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--c-ink-2); }
.countdown b { color: var(--c-ink); font-size: var(--t-base); font-variant-numeric: tabular-nums; }

/* Bottom nav (mobile app chrome) */
.tabbar {
  position: fixed; z-index: 45; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 4px var(--s-2) calc(4px + env(safe-area-inset-bottom, 0px));
  background: var(--c-bg); border-top: 1px solid var(--c-line);
}
.tabbar button { display: grid; justify-items: center; gap: 2px; min-height: 52px; padding-top: 6px; border: 0; background: none; color: var(--c-ink-2); font-size: 11px; font-weight: var(--w-bold); cursor: pointer; }
.tabbar button .icon { width: 24px; height: 24px; }
.tabbar button.is-off { color: #b8b8b8; cursor: not-allowed; }
.tabbar button[aria-current="page"] { color: var(--c-ink); font-weight: var(--w-black); }
.tabbar button[aria-current="page"] .icon { stroke-width: 2.6; color: var(--c-brand-ink); }

/* Toast */
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: var(--r-sm); background: var(--c-ink); color: var(--c-white); font-size: var(--t-sm); font-weight: var(--w-bold); display: flex; gap: 8px; align-items: center; animation: toastIn var(--d-med) var(--ease-out) both; }
.toast .icon { width: 18px; height: 18px; }

/* Review panel */
.rv { display: grid; gap: var(--s-5); }
.rv h3 { font-size: var(--t-xs); font-weight: var(--w-xbold); color: var(--c-ink-2); letter-spacing: .08em; margin-bottom: var(--s-2); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--c-surface); }
.seg button { min-height: 40px; border: 0; border-radius: var(--r-pill); background: none; font-weight: var(--w-bold); font-size: var(--t-sm); cursor: pointer; color: var(--c-ink); }
.seg button[aria-pressed="true"] { background: var(--c-ink); color: var(--c-white); }
.jump { display: grid; border-top: 1px solid var(--c-line); }
.jump button { display: grid; grid-template-columns: 32px minmax(0, 1fr) 18px; gap: var(--s-3); align-items: center; min-height: 52px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--c-line); background: none; text-align: left; cursor: pointer; }
.jump button:hover span { text-decoration: underline; }
.jump b { font-size: var(--t-sm); font-weight: var(--w-black); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface); color: var(--c-ink); }
.jump b .icon { width: 16px; height: 16px; }
.jump span { font-weight: var(--w-bold); font-size: var(--t-md); line-height: 1.4; }
.jump small { display: block; font-weight: var(--w-body); font-size: var(--t-xs); color: var(--c-ink-2); }
.jump .icon { width: 18px; height: 18px; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); font-weight: var(--w-bold); font-size: var(--t-md); }
.switch { position: relative; width: 48px; height: 28px; border-radius: 14px; border: 0; background: var(--c-line-2); cursor: pointer; transition: background-color var(--d-fast); flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--c-white); transition: transform var(--d-med) var(--ease-out); }
.switch[aria-checked="true"] { background: var(--c-ink); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.route { font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--c-ink); background: var(--c-surface); padding: 8px 12px; border-radius: var(--r-sm); word-break: break-all; font-variant-numeric: tabular-nums; }

/* ---------- Skeleton (loading) ----------
   Grey placeholders with a light sweep; shapes mirror the real layout. */
.sk {
  display: block; position: relative; overflow: hidden; border-radius: var(--r-sm);
  background: var(--c-surface-2);
}
.sk::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
  animation: skShimmer 1.3s ease-in-out infinite;
}
.sk-photo { aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--r-md); }
.sk-line { height: 14px; width: 100%; }
.sk-line--title { height: 22px; width: 85%; }
.sk-line--h1 { height: 26px; width: 80%; }
.sk-chip { flex: none; height: 40px; border-radius: var(--r-pill); }
.sk-pill { width: 84px; height: 26px; border-radius: var(--r-pill); }
.sk-circle { width: 32px; height: 32px; border-radius: 50%; }
.sk-circle--md { width: 44px; height: 44px; }
.sk-btn { height: 56px; width: 100%; border-radius: var(--r-pill); }
.sk-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-card--sk { cursor: default; }
.ev-card--sk .ev-card__body { gap: 10px; margin-top: 4px; }
.dt-hero__photo.sk { border-radius: 0; }
.filters__meta .sk-line { height: 12px; }
.facts > div .sk-line { height: 14px; }
.cta-bar .sk-btn { flex: 1; }
@keyframes skShimmer { to { transform: translateX(100%); } }
@media (min-width: 1024px) { .dt-hero__photo.sk { border-radius: var(--r-lg); } }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: .001; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetOut { from { transform: none; } to { transform: translateY(100%); } }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

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

/* =========================================================
   Tablet / desktop
   ========================================================= */
@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8) var(--s-6); }
  .coming-card { grid-column: 1 / -1; }
  .sheet-root { align-items: center; padding: var(--s-6); }
  .sheet { max-width: 480px; border-radius: var(--r-lg); padding: var(--s-4) var(--s-8) var(--s-8); max-height: calc(100% - var(--s-6) * 2); }
  .sheet-root.is-enter .sheet { animation-name: dialogIn; }
  .sheet-root.is-closing .sheet { animation-name: dialogOut; }
  .sheet__grab { display: none; }
  .hscroll { grid-auto-columns: minmax(220px, 1fr); margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; }
  .toast { bottom: 40px; }
  .stack { max-width: 640px; margin-inline: auto; }
}
@keyframes dialogIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes dialogOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px); } }

@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .coming-card { grid-template-columns: 1fr auto; align-items: center; padding: var(--s-5) var(--s-6); }
  .tabbar { display: none; }
  .ftr, .has-cta .ftr, .has-tabbar .ftr { padding-bottom: var(--s-10); }

  /* Detail: viewport-relative photo + raised booking card keep the CTA in the first view */
  /* 4:3 photo in the left column (same width as the content below); the booking
     card is pulled up beside it. --dt-col = left column width, from the page width. */
  .dt-main { container-type: inline-size; }
  .dt-hero { padding-top: var(--s-6); max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
  .dt-hero__photo { width: calc(100% - 360px - var(--s-16)); border-radius: var(--r-lg); }
  .dt-hero__tools { left: calc(var(--gutter) + var(--s-4)); right: auto; width: calc(100% - var(--gutter) * 2 - 360px - var(--s-16) - var(--s-8)); top: calc(var(--s-6) + var(--s-4)); }
  .dt-main { padding-top: var(--s-8); }
  .dt-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-16); align-items: start; }
  .book-card { display: grid; gap: var(--s-4); position: sticky; z-index: 4; margin-top: calc((min(100cqw, 1200px) - var(--gutter) * 2 - 360px - var(--s-16)) * -3 / 4 - var(--s-8)); top: calc(61px + var(--s-6)); padding: var(--s-6); border-radius: var(--r-md); background: var(--c-bg); border: 1px solid var(--c-line-2); }
  .book-card__fee { display: flex; align-items: baseline; justify-content: space-between; }
  .book-card__fee b { font-size: 2.25rem; font-weight: var(--w-bold); line-height: 1; font-variant-numeric: tabular-nums; }
  .book-card__fee b small { font-size: var(--t-base); margin-left: 2px; }
  .book-card .info-rows { padding-block: var(--s-4); border-block: 1px solid var(--c-line); }
  .cta-bar { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-8); }
  .dt-sec h2 { font-size: 1.5rem; }
  .done-hero { padding-block: var(--s-12) var(--s-8); }
  .done-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s-10); max-width: 1040px; margin-inline: auto; align-items: start; }
  .stack.stack--wide { max-width: 1040px; }
  .wrap--my { max-width: 900px; }
}


/* ---- LP FAQ + footer on the event list (transplanted from the LP; rules scoped under .otk-lp) ---- */
.otk-lp{--pink:#fa1d88;--ink:#333;--paper:#f7f7f7;color:var(--ink)}
#main:has(+ .otk-lp){padding-bottom:0}
.otk-lp .faq-section{background:var(--paper)}
.otk-lp .faq-section h2{font-size:clamp(30px,3.9vw,48px);line-height:1.45;font-weight:900}
.otk-lp .site-footer{padding-bottom:calc(35px + 84px)}
.otk-lp .site-footer a{color:#fff}
.otk-lp .content-wide{width:min(1100px,calc(100% - 48px));margin-inline:auto}
.otk-lp .section-pad{padding-block:clamp(70px,8vw,112px)}
.otk-lp .section-kicker{color:var(--pink);font-size:17px;font-weight:900;letter-spacing:.12em;display:inline-block;border-bottom:2px dotted currentColor;margin-bottom:28px;padding-bottom:6px}
.otk-lp .faq-section h2{margin-bottom:35px}
.otk-lp .faq-list{display:grid;gap:16px}
.otk-lp .faq-list details{background:#fff;border:1px solid #fff;border-radius:25px;padding:0 25px}
.otk-lp .faq-list summary{list-style:none;display:flex;align-items:center;gap:14px;cursor:pointer;padding:25px 0;font-size:19px;font-weight:900;line-height:1.55}
.otk-lp .faq-list summary::-webkit-details-marker{display:none}
.otk-lp .faq-list summary:before{content:'Q.';color:var(--pink);font-size:16px}
.otk-lp .faq-list summary:after{content:'+';color:var(--pink);margin-left:auto;font-size:23px}
.otk-lp .faq-list details[open] summary:after{content:'−'}
.otk-lp .faq-list details p{padding:0 0 26px 38px;margin:0;font-size:16px;color:#555}
.otk-lp .site-footer{background:#333;color:#fff;padding:60px 0 35px}
.otk-lp .site-footer img{width:330px;max-width:75%;margin:0 auto 45px}
.otk-lp .site-footer nav{display:flex;gap:24px;flex-wrap:wrap;margin-bottom:25px}
.otk-lp .site-footer a{font-size:14px;text-decoration:none}
.otk-lp .site-footer small{display:block;text-align:center;font-size:13px}
@media(max-width:700px){
.otk-lp .content-wide{width:calc(100% - 48px)}
.otk-lp .section-pad{padding-block:65px}
.otk-lp .faq-section h2{font-size:36px}
.otk-lp .faq-list details{padding:0 20px}
.otk-lp .faq-list summary{font-size:17px;padding:22px 0}
.otk-lp .faq-list details p{font-size:15px}
.otk-lp .site-footer nav{display:grid;gap:20px}
}
@media(max-width:390px){
.otk-lp .content-wide{width:calc(100% - 36px)}
}
.otk-lp .faq-list details p{color:#333}

/* list footer clearance above the tab bar (tab bar exists only up to 1023px; must follow the transplanted LP rules) */
@media (max-width:1023px){.otk-lp .site-footer{padding-bottom:calc(35px + 84px)}}

/* Unregistered header auth pair (login / register) */
.hdr-auth { display: inline-flex; gap: 8px; align-items: center; margin-left: auto; }
@media (max-width: 480px) {
  .hdr-auth .btn--sm { padding: 0 10px; font-size: 13px; min-height: 38px; }
  .hdr__nav button { padding: 0 6px; }
}

/* Breadcrumbs on sub-pages */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; font-size: 12px; color: var(--c-ink-3); padding: 10px 0 4px; }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs--edge { padding-left: var(--s-4); padding-right: var(--s-4); }
.crumbs a, .crumbs button { color: var(--c-ink-2); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; white-space: nowrap; cursor: pointer; }
.crumbs a:hover, .crumbs button:hover { color: var(--c-brand); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--c-ink); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs__sep { flex: none; }
.hdr__logo { text-decoration: none; }
.wait-note { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 13px; font-weight: 700; color: var(--mint-d, #178a5c); margin: 2px 0; }
.wait-note svg { width: 16px; height: 16px; }
/* --- temporary test-event application site --- */
.test-banner { margin-top: 14px; }
.test-note { background: #fff7ea; border: 1px solid #f0dcb8; border-radius: 14px; padding: 16px 18px; margin: 16px auto; }
.test-note h2 { font-size: 16px; margin: 0 0 8px; }
.test-note ul { margin: 0 0 8px; padding-left: 20px; font-size: 14px; line-height: 1.8; }
.test-note p { font-size: 13px; color: #666; margin: 0; line-height: 1.7; }
.ta-wrap { max-width: 640px; padding-bottom: 40px; }
.ta-h { font-size: 24px; margin: 14px 0 6px; }
.ta-lead { font-size: 14px; color: #555; margin: 0 0 18px; }
.ta-form { display: grid; gap: 10px; }
.ta-lb { font-weight: 700; font-size: 14px; margin-top: 8px; }
.ta-in { padding: 13px 14px; border: 1.5px solid #d8d8d8; border-radius: 10px; font-size: 16px; width: 100%; box-sizing: border-box; }
.ta-err { color: #c0392b; font-size: 13px; margin: 0; }
.ta-evs { display: grid; gap: 10px; }
.ta-ev { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid #e2e2e2; border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.ta-ev:has(input:checked) { border-color: #e56b8c; background: #fdf2f5; }
.ta-ev input { margin-top: 3px; accent-color: #e56b8c; }
.ta-ev b { display: block; font-size: 15px; }
.ta-ev small { color: #777; font-size: 12.5px; }
.ta-note { background: #f7f7f7; border-radius: 12px; padding: 14px 16px; font-size: 13.5px; line-height: 1.8; }
.ta-note h2 { font-size: 14px; margin: 0 0 6px; }
.ta-note ul { margin: 0 0 8px; padding-left: 18px; }
.ta-note p { margin: 0; color: #555; font-size: 13px; }
.ta-recap { margin-bottom: 16px; }
