/* わたしの星座。枠は game-ui.css の共通UI。ここにあるのはゲームの中身だけ */
a.g-icon-btn, a.g-btn { text-decoration: none; }
.sz-a { display: flex; align-items: center; justify-content: center; }

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

/* 夜空。中の絵は canvas が自分で塗る（共通UIの決まり） */
.sz-sky { flex: 1 1 auto; min-height: 220px; margin-bottom: .75rem; touch-action: none; }
.sz-sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }

.sz-actions { margin-bottom: .25rem; }
.sz-actions .g-btn-sub { height: 56px; padding: 0 .75rem; font-size: 1rem; font-weight: 800; }
.sz-actions .icon { font-size: 20px; }
#btn-done.ready { animation: sz-ready 1400ms var(--emph) infinite; }
@keyframes sz-ready { 0%, 100% { transform: none; } 50% { transform: scale(1.04); } }
.sz-foot { display: flex; align-items: center; justify-content: space-between; }
.sz-sound { width: 40px; height: 40px; }

/* 結果 */
.sz-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: .75rem .75rem 1.25rem; margin-bottom: .75rem;
  background: var(--primary); color: var(--on-primary);
}
.sz-hero-cv { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r-l); margin-bottom: .875rem; }
.sz-hero-sky { width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r-l); margin-bottom: .875rem; display: flex; justify-content: center;
  background: color-mix(in srgb, var(--primary) 30%, var(--inverse-surface)); }
.sz-hero small { font-size: .875rem; font-weight: 700; opacity: .85; }
.sz-mod { margin: .25rem 0 0; font-size: 1.25rem; font-weight: 800; line-height: 1.3; }
.sz-noun { font-weight: 900; font-size: clamp(2.5rem, 13vw, 3.5rem); line-height: 1.15; letter-spacing: -.01em; word-break: keep-all; }
.sz-svg { height: 100%; aspect-ratio: 1; }
.sz-svg .l line { stroke: var(--inverse-primary); stroke-width: .8; stroke-linecap: round; }
.sz-svg .s circle { fill: var(--inverse-on-surface); }

.sz-card { text-align: center; }
.sz-w { display: inline-block; }
.sz-line { margin: 0 0 .5rem; font-size: .9375rem; font-weight: 700; line-height: 1.6; color: var(--on-surface-variant); text-wrap: balance; }
.sz-bless { margin: 0 0 1rem; font-size: 1.125rem; font-weight: 800; line-height: 1.55; color: var(--on-surface); text-wrap: balance; }
.sz-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .375rem; margin-bottom: 1.25rem; }
.sz-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);
}
.sz-sub { margin: .5rem 0 0; }
.sz-sub .icon { font-size: 20px; }
/* 広告はボタンから離す（誤タップさせない） */
.sz-ad { margin: 3rem auto 1rem; text-align: center; }
.sz-ad small { display: block; margin-bottom: .25rem; font-size: 11px; color: var(--on-surface-variant); }
.sz-ad iframe { display: block; margin: 0 auto; border: 0; max-width: 100%; }

/* 名前が決まった瞬間: 「できた」の場所から色が広がり、名前が落ちてくる */
.sz-reveal {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 1rem; text-align: center;
  background: var(--primary); color: var(--on-primary); cursor: pointer;
  clip-path: circle(0 at var(--x, 50%) var(--y, 50%)); animation: sz-open 620ms cubic-bezier(.2, 0, 0, 1) forwards;
}
.sz-reveal.out { animation: sz-fade 280ms ease forwards; }
.sz-reveal small { font-size: 1rem; font-weight: 700; opacity: .85; }
.sz-reveal p { margin: .75rem 0 0; font-size: 1.5rem; font-weight: 800; opacity: 0; }
.sz-reveal strong { font-weight: 900; font-size: clamp(3rem, 16vw, 4.5rem); line-height: 1.15; opacity: 0; word-break: keep-all; }
.sz-reveal p.on { opacity: 1; transition: opacity 300ms; }
.sz-reveal strong.on { opacity: 1; animation: sz-land 520ms var(--spring-fast); }
@keyframes sz-open { to { clip-path: circle(150vmax at var(--x, 50%) var(--y, 50%)); } }
@keyframes sz-fade { from { clip-path: none; opacity: 1; } to { clip-path: none; opacity: 0; } }
@keyframes sz-land { from { transform: translateY(-18px) scale(1.25); } to { transform: none; } }

/* 背の低い画面では上を詰めて、空を広く取る */
@media (max-height: 640px) {
  .sz-play .g-header { min-height: 3.25rem; padding: .25rem 0; }
  .sz-play .g-stats { margin-bottom: .375rem; }
  .sz-prompt { font-size: .9375rem; margin-bottom: .375rem; }
  .sz-actions .g-btn-sub { height: 52px; }
  .sz-sky { margin-bottom: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  #btn-done.ready { animation: none; }
  .sz-reveal { animation: none; clip-path: none; }
  .sz-reveal strong.on { animation: none; }
}
