/* あの頃スワイプ。枠は game-ui.css の共通UI。ここにあるのはゲームの中身だけ */
a.g-icon-btn, a.g-btn { text-decoration: none; }
.ano-a { display: flex; align-items: center; justify-content: center; }

/* 遊ぶ画面: スマホ縦の1画面に収める */
.ano-play { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding-bottom: .5rem; overflow: hidden; }
.ano-play .g-stats { margin-bottom: .5rem; }
.ano-play .g-stat b { font-size: 1.0625rem; }
.ano-prompt { margin: 0 0 .625rem; text-align: center; font-size: 1rem; font-weight: 800; color: var(--on-surface); }
.ano-prompt small { display: block; font-size: .75rem; font-weight: 600; color: var(--on-surface-variant); }

/* カードの山 */
.ano-deck { position: relative; flex: 1 1 auto; min-height: 260px; margin-bottom: .75rem; }
.ano-back, .ano-swipe { position: absolute; inset: 0; border-radius: var(--r-xl); }
.ano-back { background: var(--surface-container-high); transition: transform 280ms var(--spring); }
.ano-back.b1 { transform: translateY(8px) scale(.96); }
.ano-back.b2 { transform: translateY(16px) scale(.92); background: var(--surface-container); }
.ano-deck.is-next .ano-back.b1 { transform: translateY(0) scale(1); }
.ano-deck.is-next .ano-back.b2 { transform: translateY(8px) scale(.96); }

.ano-swipe {
  --tone: var(--primary-container); --on-tone: var(--on-primary-container);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 1.5rem 1.25rem; overflow: hidden; cursor: grab; touch-action: none;
  background: var(--tone); color: var(--on-tone); will-change: transform;
}
.ano-swipe.t1 { --tone: var(--secondary-container); --on-tone: var(--on-secondary-container); }
.ano-swipe.t2 { --tone: var(--tertiary-container); --on-tone: var(--on-tertiary-container); }
.ano-swipe.dragging { cursor: grabbing; }
.ano-swipe.settle { transition: transform 360ms var(--spring-fast); }
.ano-swipe.fly { transition: transform 240ms cubic-bezier(.3, 0, .8, .4); }
.ano-swipe.enter { animation: ano-enter 320ms var(--spring) both; }
.ano-swipe.hint { animation: ano-hint 1500ms var(--emph) 500ms 2; }
@keyframes ano-enter { from { transform: translateY(8px) scale(.96); } }
@keyframes ano-hint {
  0%, 100% { transform: none; }
  25% { transform: translateX(22px) rotate(2deg); }
  60% { transform: translateX(-22px) rotate(-2deg); }
}
.ano-cat {
  width: 64px; height: 64px; border-radius: 22px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--on-tone) 12%, transparent); margin-bottom: .5rem;
}
.ano-cat .icon { font-size: 34px; }
.ano-cat-name { font-size: .8125rem; font-weight: 700; opacity: .75; margin-bottom: .875rem; }
.ano-swipe h2 { margin: 0; font-weight: 900; font-size: clamp(1.75rem, 8.2vw, 2.25rem); line-height: 1.32; text-wrap: balance; word-break: auto-phrase; }
.ano-w { display: inline-block; }
.ano-swipe p { margin: .875rem 0 0; font-size: .9375rem; font-weight: 600; line-height: 1.6; opacity: .82; text-wrap: balance; }

/* はじいている間に出る札 */
.ano-stamp {
  position: absolute; top: 1.125rem; padding: .375rem .875rem; border-radius: var(--r-full);
  font-size: 1.0625rem; font-weight: 900; opacity: 0; pointer-events: none;
}
.ano-stamp.yes { left: 1.125rem; background: var(--primary); color: var(--on-primary); transform: rotate(-7deg); }
.ano-stamp.no { right: 1.125rem; background: var(--inverse-surface); color: var(--inverse-on-surface); transform: rotate(7deg); }

.ano-actions { margin-bottom: .25rem; }
.ano-actions .g-btn-sub { height: 56px; padding: 0 .75rem; font-size: 1rem; font-weight: 800; }
.ano-actions .icon { font-size: 20px; }
.ano-foot { display: flex; align-items: center; justify-content: space-between; }
.ano-sound { width: 40px; height: 40px; }

/* 結果 */
.ano-hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.75rem 1rem 1.5rem; margin-bottom: .75rem;
  background: var(--primary); color: var(--on-primary);
}
.ano-hero small { font-size: .875rem; font-weight: 700; opacity: .85; }
.ano-hero strong { font-weight: 900; font-size: clamp(5rem, 27vw, 7rem); line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ano-hero span { font-size: 1.25rem; font-weight: 800; }
.ano-card { text-align: center; }
.ano-line { text-wrap: balance; margin: 0 0 1rem; font-size: 1.125rem; font-weight: 800; line-height: 1.55; color: var(--on-surface); }
.ano-label { margin: 0 0 .5rem; font-size: .75rem; font-weight: 700; color: var(--on-surface-variant); }
.ano-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .375rem; margin-bottom: 1.25rem; }
.ano-chip {
  padding: .375rem .75rem; border-radius: var(--r-s); font-size: .8125rem; font-weight: 700; line-height: 1.4;
  background: var(--secondary-container); color: var(--on-secondary-container);
}
.ano-check { margin-bottom: 1.25rem; }
.ano-check p { margin: 0 0 .5rem; font-size: .9375rem; font-weight: 800; color: var(--on-surface); }
.ano-check .g-seg { margin: 0; }
.ano-sub { margin: .5rem 0 0; }
.ano-sub .icon { font-size: 20px; }
/* 広告はボタンから離す（誤タップさせない） */
.ano-ad { margin: 3rem auto 1rem; text-align: center; }
.ano-ad small { display: block; margin-bottom: .25rem; font-size: 11px; color: var(--on-surface-variant); }
.ano-ad iframe { display: block; margin: 0 auto; border: 0; max-width: 100%; }

/* 決まった瞬間: はじいた場所から色が広がり、数字が止まる */
.ano-reveal {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--primary); color: var(--on-primary); cursor: pointer;
  clip-path: circle(0 at var(--x, 50%) var(--y, 50%)); animation: ano-open 620ms cubic-bezier(.2, 0, 0, 1) forwards;
}
.ano-reveal.out { animation: ano-fade 280ms ease forwards; }
.ano-reveal small { font-size: 1rem; font-weight: 700; opacity: .85; }
.ano-reveal strong { font-weight: 900; font-size: clamp(6rem, 33vw, 9rem); line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ano-reveal strong.done { animation: ano-land 460ms var(--spring-fast); }
.ano-reveal span { font-size: 1.5rem; font-weight: 800; opacity: 0; }
.ano-reveal span.on { opacity: 1; transition: opacity 240ms; }
@keyframes ano-open { to { clip-path: circle(150vmax at var(--x, 50%) var(--y, 50%)); } }
@keyframes ano-fade { from { clip-path: none; opacity: 1; } to { clip-path: none; opacity: 0; } }
@keyframes ano-land { from { transform: scale(1.28); } to { transform: none; } }

/* 背の低い画面ではカードの中を詰める */
@media (max-height: 640px) {
  .ano-play .g-header { min-height: 3.25rem; padding: .25rem 0; }
  .ano-cat { width: 48px; height: 48px; border-radius: 16px; }
  .ano-cat .icon { font-size: 26px; }
  .ano-cat-name { margin-bottom: .375rem; }
  .ano-swipe h2 { font-size: 1.625rem; }
  .ano-swipe p { margin-top: .5rem; font-size: .875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ano-swipe.hint, .ano-swipe.enter { animation: none; }
  .ano-reveal { animation: none; clip-path: none; }
}
