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

/* 遊ぶ画面: スマホ縦の1画面に収める */
.iro-play { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding-bottom: .5rem; }
.iro-play .g-stats { margin-bottom: .5rem; }
.iro-prompt { margin: 0 0 .5rem; text-align: center; font-size: .9375rem; font-weight: 700; color: var(--on-surface-variant); }
.iro-stage { flex: 1 1 auto; min-height: 280px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.iro-pick {
  flex: 1 1 0; min-height: 0; width: 100%; border: 0; padding: 0; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--outline-variant);
  transition: flex-grow 340ms cubic-bezier(.2, 0, 0, 1), transform 200ms var(--spring-fast);
}
.iro-pick:active { transform: scale(.985); }
.iro-pick span {
  font-family: 'Noto Serif JP', serif; font-weight: 700; font-size: 2.25rem; opacity: 0;
  transform: translateY(6px); transition: opacity 200ms, transform 300ms var(--spring);
}
.iro-stage.is-picking .iro-pick { pointer-events: none; }
.iro-pick.win { flex-grow: 1; }
.iro-pick.win span { opacity: 1; transform: none; }
.iro-pick.lose { flex-grow: .0001; }
.iro-stage.is-new .iro-pick { animation: iro-in 260ms var(--spring) both; }
.iro-stage.is-new .iro-pick + .iro-pick { animation-delay: 50ms; }
@keyframes iro-in { from { opacity: 0; transform: scale(.96); } }

.iro-foot { display: flex; align-items: center; justify-content: space-between; padding-top: .25rem; }
.iro-sound { width: 40px; height: 40px; }

/* 結果 */
.iro-hero {
  height: min(62vw, 300px); min-height: 220px; margin-bottom: .75rem;
  display: flex; flex-direction: row-reverse; align-items: center; justify-content: center; gap: .75rem;
  box-shadow: inset 0 0 0 1px var(--outline-variant);
}
.iro-name { font-family: 'Noto Serif JP', serif; font-weight: 700; font-size: clamp(2.5rem, 13vw, 3.5rem); line-height: 1.15; writing-mode: vertical-rl; letter-spacing: .08em; }
.iro-kana { font-size: .8125rem; font-weight: 700; letter-spacing: .2em; writing-mode: vertical-rl; opacity: .82; }
.iro-card { text-align: center; }
.iro-line { text-wrap: balance; margin: 0 0 .5rem; font-size: 1.125rem; font-weight: 800; line-height: 1.55; color: var(--on-surface); }
.iro-note { margin: 0 0 1.25rem; font-size: .8125rem; font-weight: 500; line-height: 1.7; color: var(--on-surface-variant); }
.iro-sub { margin: .5rem 0 0; }
.iro-sub .icon { font-size: 20px; }
/* 広告はボタンから離す（誤タップさせない） */
.iro-ad { margin: 3rem auto 1rem; text-align: center; }
.iro-ad small { display: block; margin-bottom: .25rem; font-size: 11px; color: var(--on-surface-variant); }
.iro-ad iframe { display: block; margin: 0 auto; border: 0; max-width: 100%; }

/* 決まった瞬間: 押した場所から色が広がる */
.iro-reveal {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: row-reverse; align-items: center; justify-content: center; gap: 1rem;
  clip-path: circle(0 at var(--x, 50%) var(--y, 50%)); animation: iro-open 760ms cubic-bezier(.2, 0, 0, 1) forwards; cursor: pointer;
}
.iro-reveal.out { animation: iro-fade 300ms ease forwards; }
.iro-reveal .iro-name { font-size: clamp(3.5rem, 19vw, 5.5rem); }
.iro-reveal .iro-name i { font-style: normal; display: inline-block; opacity: 0; animation: iro-char 420ms var(--spring) forwards; }
.iro-reveal .iro-kana { font-size: 1rem; opacity: 0; animation: iro-kana 400ms ease 900ms forwards; }
@keyframes iro-open { to { clip-path: circle(150vmax at var(--x, 50%) var(--y, 50%)); } }
@keyframes iro-fade { from { clip-path: none; opacity: 1; } to { clip-path: none; opacity: 0; } }
@keyframes iro-char { from { opacity: 0; transform: translateY(-10px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes iro-kana { to { opacity: .82; } }

@media (prefers-reduced-motion: reduce) {
  .iro-pick, .iro-pick span { transition: none; }
  .iro-stage.is-new .iro-pick { animation: none; }
  .iro-reveal { animation: none; clip-path: none; }
  .iro-reveal .iro-name i, .iro-reveal .iro-kana { animation: none; opacity: 1; }
}
