/* あすカップ エントリー｜トップだけの演出（オープニング・タブ・大会の3枚）。
   動きは transform と opacity が中心（スマホで重くしない）。画像は /top/ の webp（各20〜45KB）。
   prefers-reduced-motion では、オープニングを出さず（app.js）、カードもそのまま並べる（下の @media）。 */

/* ---------- オープニングは /top/intro/（player.js と variants/）。ここには置かない ---------- */
@keyframes c-blink { 50% { opacity: .45; } }

/* ---------- ようこそ（ログイン中） ---------- */
.c-welcome { display: grid; grid-template-columns: 56px 1fr; align-items: end; gap: 10px; }
.c-welcome img { width: 56px; height: auto; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 45%)); }
.c-welcome__bubble {
  position: relative; padding: 10px 14px; border-radius: 16px 16px 16px 4px;
  background: var(--asu-surface); box-shadow: 0 0 0 1px var(--asu-line), var(--asu-shadow);
}
.c-welcome__bubble p { margin: 0; }
.c-welcome__hi { font-size: 1rem; font-weight: 800; }
.c-welcome__hi b { background: var(--asu-grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.c-welcome__line { margin-top: 2px !important; color: var(--asu-muted); font-size: .86rem; line-height: 1.55; }

/* ---------- エントリー／マイページ（ページ全体が横にスライドして切り替わる） ---------- */
.c-hub { display: grid; gap: 16px; }
.c-hub__tabs { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 6; box-shadow: 0 8px 20px rgb(0 0 0 / 35%); }
.c-hub__tabs .asu-tab { flex: 1 1 0; }
.c-hub__tabs .asu-tab[aria-selected="true"] { color: var(--asu-on-primary); }
/* 横は切り取るだけ（ページ自体は横スクロールさせない） */
.c-hub__view { margin: 0 -16px; overflow: hidden; overflow: clip; }
.c-hub__track { display: flex; align-items: flex-start; transition: transform 460ms cubic-bezier(.65, 0, .35, 1); }
.c-hub__pane { flex: 0 0 100%; min-width: 0; box-sizing: border-box; display: grid; gap: 14px; align-content: start; padding: 0 16px 8px; }
.c-hub__pane.is-off { visibility: hidden; height: 0; overflow: hidden; padding-bottom: 0; }
.c-hub__pane > * { margin: 0; min-width: 0; }
.c-hub__pane > .asu-h2 { margin-top: 14px; font-size: 1.08rem; }
.c-hub__pane > .asu-btn--block + .asu-btn--block { margin-top: -4px; }
.c-guest { display: grid; justify-items: center; gap: 8px; padding: 8px 0 4px; text-align: center; color: var(--asu-muted); font-size: .92rem; line-height: 1.6; }
.c-guest img { width: 84px; height: auto; animation: c-bob 2.4s ease-in-out infinite; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 45%)); }
.c-guest p { margin: 0; }

/* ---------- 見出し ---------- */
.c-lineup { position: relative; display: grid; gap: 2px; padding: 2px 0; }
/* どっとあすくん＋吹き出しが、タブの切り取り（.c-hub__view）で上が欠けないよう、高さを確保する */
.c-lineup--kun { min-height: 96px; align-content: end; padding-right: 78px; }
.c-lineup__eyebrow { font-size: .68rem; font-weight: 800; letter-spacing: .24em; color: var(--asu-accent-ink); }
.c-lineup__title {
  margin: 0; font-size: clamp(1.6rem, 8vw, 2rem); font-weight: 900; line-height: 1.2; letter-spacing: .02em;
  background: var(--asu-grad-metal); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgb(0 0 0 / 70%));
}
.c-lineup__kun { position: absolute; right: 2px; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.c-lineup__kun img { width: 60px; height: auto; animation: c-bob 2.4s ease-in-out infinite; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 45%)); }
/* 状態のことば（受付中！）は、どっとあすくんの足元に札のように出す */
.c-lineup__say {
  position: relative; z-index: 1; padding: 3px 9px; border-radius: 8px; white-space: nowrap;
  background: var(--asu-grad-button); color: #fff; font-size: .68rem; font-weight: 900; line-height: 1.3; text-align: center;
  box-shadow: 0 0 0 1.5px var(--asu-silver-lo), 0 3px 8px rgb(0 0 0 / 40%);
  transform: rotate(-4deg);
}
@keyframes c-bob { 50% { transform: translateY(-4px) rotate(-3deg); } }

/* ---------- 大会のカード（バンバンバーンと落ちてくる） ---------- */
.c-cups { display: grid; gap: 14px; }
.c-cup {
  position: relative; border-radius: var(--asu-radius-l); overflow: hidden;
  border: 1.5px solid var(--asu-line); background: var(--asu-surface); color: var(--asu-text); box-shadow: var(--asu-shadow);
}
.c-cup__main {
  display: grid; grid-template-columns: 128px 1fr; align-items: center; gap: 12px; width: 100%; min-height: 116px;
  padding: 12px 14px 12px 8px; border: 0; background: none; color: inherit; font: inherit; text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.c-cup--soon .c-cup__main { cursor: default; }
.c-cup__main:focus-visible { outline: 3px solid var(--asu-focus); outline-offset: -3px; border-radius: var(--asu-radius-l); }
.c-cups:not(.is-go) .c-cup { opacity: 0; }
.c-cups.is-go .c-cup { animation: c-slam 440ms calc(var(--i) * 380ms) cubic-bezier(.5, 0, .75, 0) backwards, c-land 360ms calc(var(--i) * 380ms + 440ms) var(--asu-ease); }
.c-cup__logo { display: grid; place-items: center; min-height: 80px; }
.c-cup__logo img { display: block; width: 100%; height: auto; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 50%)); transition: transform var(--asu-dur) var(--asu-ease); }
.c-cup__main:active .c-cup__logo img { transform: scale(.96); }
.c-cup__body { display: grid; justify-items: start; gap: 3px; min-width: 0; }
.c-cup__name { font-size: 1.18rem; font-weight: 900; line-height: 1.25; }
.c-cup__date { font-family: var(--asu-font-num); font-weight: 900; font-size: .95rem; }
.c-cup__tag { color: var(--asu-muted); font-size: .76rem; line-height: 1.45; }

/* 受付中：あすグラデーションの縁と光 */
.c-cup--open {
  border-color: transparent;
  background: radial-gradient(90% 70% at 0% 30%, rgb(155 92 255 / 22%), transparent 60%) padding-box, linear-gradient(var(--asu-surface), var(--asu-surface)) padding-box, var(--asu-grad-brand) border-box;
  box-shadow: -8px 8px 26px rgb(155 92 255 / 22%), 8px 8px 26px rgb(255 138 42 / 18%);
}
.c-cup__status {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--asu-radius-pill);
  background: var(--asu-success-soft); color: var(--asu-success); font-size: .72rem; font-weight: 900;
}
.c-cup__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: c-blink 1.2s ease-in-out infinite; }
/* 参加の条件：最初は閉じていて、カードを押すと下に開く */
.c-cup__more-label { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--asu-accent-ink); font-size: .78rem; font-weight: 800; }
.c-cup__more-label::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform 260ms var(--asu-ease); }
.c-cup.is-open .c-cup__more-label::after { transform: translateY(1px) rotate(-135deg); }
.c-cup__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 340ms var(--asu-ease); }
.c-cup.is-open .c-cup__more { grid-template-rows: 1fr; }
.c-cup__more > div { min-height: 0; overflow: hidden; padding: 0 14px; }
.c-rules { margin: 0 0 10px; border-top: 1px solid var(--asu-line); }
.c-rules > div { display: grid; grid-template-columns: 5em 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--asu-line); font-size: .84rem; line-height: 1.55; }
.c-rules dt { color: var(--asu-muted); font-weight: 800; }
.c-rules dd { margin: 0; }
.c-cup__detail { display: inline-block; margin-bottom: 12px; font-size: .82rem; font-weight: 800; }
.c-cup__go {
  display: flex; align-items: center; justify-content: center; min-height: 46px; margin: 0 12px 12px; padding: 0 16px;
  border-radius: var(--asu-radius-pill); background: var(--asu-grad-button); color: #fff; font-size: .92rem; font-weight: 900; text-decoration: none;
  box-shadow: 0 0 0 1.5px var(--asu-silver-lo), 0 4px 12px rgb(200 0 58 / 28%); transition: transform var(--asu-dur) var(--asu-ease);
}
.c-cup__go:active { transform: scale(.97); }
.c-cup__go::after { content: "›"; margin-left: 6px; font-size: 1.1em; }

/* 準備中：板を2枚打ち付けて、木の札を下げる */
.c-cup--soon .c-cup__logo img { filter: grayscale(.55) brightness(.5); }
.c-cup--soon .c-cup__name, .c-cup--soon .c-cup__tag { opacity: .7; }
.c-cup__sign {
  position: relative; z-index: 3; padding: 3px 10px 2px; border-radius: 5px;
  border: 2px solid #7a4a1d; background: linear-gradient(#f3dfb5, #e2c58f); color: #5a3512;
  font-size: .74rem; font-weight: 900; letter-spacing: .06em; box-shadow: 0 3px 0 #5a3512;
  transform: rotate(-4deg);
}
.c-cup__sign::before {
  content: ""; position: absolute; left: 50%; top: -5px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f4f6fa, #7d8696 70%); box-shadow: 0 1px 1px rgb(0 0 0 / 50%);
}
.c-board { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.c-board__plank {
  position: absolute; left: -4%; width: 108%; height: 22px; border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, rgb(0 0 0 / 0%) 0 26px, rgb(60 30 5 / 18%) 26px 28px, rgb(0 0 0 / 0%) 28px 61px),
    linear-gradient(#c88d50, #a86b31 55%, #8c5523);
  box-shadow: 0 4px 6px rgb(0 0 0 / 45%), inset 0 1px 0 rgb(255 230 190 / 35%);
}
.c-board__plank--a { top: 4%; transform: rotate(-6deg); }
.c-board__plank--b { top: 84%; transform: rotate(4.5deg); }
.c-board__plank::before, .c-board__plank::after {
  content: ""; position: absolute; top: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f4f6fa, #7d8696 70%); box-shadow: 0 1px 1px rgb(0 0 0 / 55%);
}
.c-board__plank::before { left: 8%; }
.c-board__plank::after { right: 8%; }
.c-cups.is-go .c-cup--soon .c-board__plank--a { animation: c-nail-a 260ms calc(var(--i) * 380ms + 560ms) cubic-bezier(.5, 0, .75, 0) backwards; }
.c-cups.is-go .c-cup--soon .c-board__plank--b { animation: c-nail-b 260ms calc(var(--i) * 380ms + 740ms) cubic-bezier(.5, 0, .75, 0) backwards; }
.c-cups.is-go .c-cup--soon .c-cup__sign { animation: c-swing 900ms calc(var(--i) * 380ms + 900ms) ease-out backwards; }

@keyframes c-slam { 0% { opacity: 0; transform: translateY(-70px) scale(1.45) rotate(-3deg); } 100% { opacity: 1; transform: none; } }
@keyframes c-land { 0% { transform: scale(1.04, .94); } 45% { transform: scale(.985, 1.02) translateY(-2px); } 100% { transform: none; } }
@keyframes c-nail-a { 0% { opacity: 0; transform: rotate(-6deg) scale(1.6) translateY(-24px); } 100% { opacity: 1; transform: rotate(-6deg); } }
@keyframes c-nail-b { 0% { opacity: 0; transform: rotate(4.5deg) scale(1.6) translateY(-24px); } 100% { opacity: 1; transform: rotate(4.5deg); } }
@keyframes c-swing { 0% { opacity: 0; transform: rotate(-30deg) translateY(-8px); } 35% { opacity: 1; transform: rotate(10deg); } 65% { transform: rotate(-9deg); } 100% { opacity: 1; transform: rotate(-4deg); } }

/* ---------- 大会のページ ---------- */
.c-event {
  position: relative; display: grid; justify-items: center; gap: 4px; padding: 18px 16px 16px; text-align: center; overflow: hidden;
  border: 1.5px solid var(--asu-line); border-radius: var(--asu-radius-l); background: var(--asu-surface); box-shadow: var(--asu-shadow);
}
/* 受付中：トップのカードと同じ、あすグラデーションの縁。後ろにAEOS NOVAの会場をうっすら */
.c-event.is-open {
  border-color: transparent;
  background: linear-gradient(rgb(13 11 24 / 78%), rgb(13 11 24 / 92%)) padding-box, url(/top/arena.webp) center 75% / cover padding-box, var(--asu-grad-brand) border-box;
  box-shadow: -8px 8px 26px rgb(155 92 255 / 22%), 8px 8px 26px rgb(255 138 42 / 18%);
}
.c-event__logo img { display: block; width: min(62vw, 240px); height: auto; filter: drop-shadow(0 6px 14px rgb(0 0 0 / 55%)); }
.c-event__eyebrow { margin-top: 4px; font-size: .68rem; font-weight: 800; letter-spacing: .24em; color: var(--asu-accent-ink); }
.c-event__name {
  margin: 0; font-size: clamp(1.5rem, 7.4vw, 1.9rem); font-weight: 900; line-height: 1.2;
  background: var(--asu-grad-metal); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgb(0 0 0 / 70%));
}
.c-event__date { font-family: var(--asu-font-num); font-weight: 900; font-size: 1rem; }
.c-cup__status.is-closed { background: rgb(255 255 255 / 8%); color: var(--asu-muted); }
.c-cup__status.is-closed::before { animation: none; }
.c-event .c-cup__status { margin-top: 4px; }

/* タブ4つ：文字を少し小さく、上に貼りつけない（ページの上のタブはトップだけ） */
.c-hub--event .c-hub__tabs { position: relative; top: auto; box-shadow: none; }
.c-hub--event .asu-tab { padding-left: 4px; padding-right: 4px; font-size: .8rem; white-space: nowrap; }
.c-hub--event .c-hub__pane { gap: 12px; padding-top: 2px; }
.c-hub--event .c-rules { margin: 0; }
.c-hub--event .c-rules > div { grid-template-columns: 5.5em 1fr; }
.c-hub--event .c-rules small { color: var(--asu-muted); font-size: .76rem; }
.c-h3 { margin: 6px 0 0; font-size: .96rem; font-weight: 900; }
.c-soon {
  display: inline-block; padding: 0 8px; border-radius: var(--asu-radius-pill); border: 1px dashed rgb(255 255 255 / 28%);
  color: var(--asu-muted); font-size: .76rem; font-weight: 800; line-height: 1.6;
}
.c-tbd { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 12px; padding: 14px; border-radius: var(--asu-radius-l); border: 1px dashed rgb(255 255 255 / 18%); background: rgb(255 255 255 / 3%); }
.c-tbd img { width: 64px; height: auto; animation: c-bob 2.4s ease-in-out infinite; }
.c-tbd p { margin: 0; color: var(--asu-muted); font-size: .86rem; line-height: 1.6; }
.c-tbd b { display: block; color: var(--asu-text); font-size: 1rem; }
.c-center { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .c-tbd img { animation: none !important; }
  .c-cups .c-cup, .c-cups .c-board__plank, .c-cups .c-cup__sign, .c-lineup__kun img, .c-guest img, .c-cup__status::before { animation: none !important; opacity: 1 !important; }
  .c-hub__track, .c-cup__more { transition: none; }
}
