@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400&family=Quicksand:wght@400;500;600&display=swap');

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  /* Backgrounds */
  --bg:           #F8F6EF;
  --bg-entry:     #EAE8DA;
  --bg-inactive:  #D4D3CC;

  /* Text */
  --text:         #333333;
  --text-white:   #FFFFFF;
  --text-placeholder: #99A1AF;

  /* UI */
  --color-btn:    #444444;
  --color-btn-add:#656565;
  --color-input-border: #D1D5DC;

  /* Character theme colors */
  --char-yellow:  #F4D15E;
  --char-green:   #88D69F;
  --char-pink:    #FFA0B1;
  --char-blue:    #7EBDE8;
  --char-purple:  #B99BEF;
  --char-gray:    #979797;

  /* Color card palette */
  --iro-red:          #E8383D;
  --iro-orange:       #F39800;
  --iro-yellow:       #F8D500;
  --iro-yellow-green: #88CB7F;
  --iro-green:        #009944;
  --iro-light-blue:   #68BBE3;
  --iro-blue:         #005BAC;
  --iro-purple:       #7B5EB3;
  --iro-pink:         #F29C9F;
  --iro-brown:        #8B6C42;
  --iro-black:        #2B2B2B;
  --iro-light-orange: #EDC58F;

  /* Typography */
  --font-jp: 'Noto Sans JP', sans-serif;
  --font-en: 'Quicksand', sans-serif;

  /* Border radius */
  --r-card:   8px;
  --r-entry:  6.75px;
  --r-input:  6.75px;
  --r-btn:    6px;
}

/* ============================================================
   Base Reset
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
}

body {
  font-family: var(--font-jp);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: inherit;
  outline: none;
}

/* ============================================================
   Screen Layout
   ============================================================ */
.screen {
  display: none;
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  flex-direction: column;
  align-items: center;
}

.screen.is-active {
  display: flex;
}

/* Top bar: holds step indicator */
.screen__header {
  width: 100%;
  max-width: 1440px;
  height: 30px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 0 25px;
  flex-shrink: 0;
}

/* Centered main content area */
.screen__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 30px;
  width: 100%;
}

/* ============================================================
   Step Indicator
   ============================================================ */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-indicator__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-inactive);
  flex-shrink: 0;
}

.step-indicator__dot--active {
  background: var(--text);
}

.step-indicator__dot--done {
  background: #888;
}

/* ============================================================
   Title Block  (English label + Japanese heading)
   ============================================================ */
.title-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  text-align: center;
  white-space: nowrap;
}

.title-block__en {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 1.44px;
  line-height: 1;
  color: var(--text);
  text-transform: uppercase;
}

.title-block__jp {
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: 24px;
  line-height: 40px;
  color: var(--text);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  height: 50px;
  padding: 0 40px;
  background: var(--color-btn);
  color: var(--text-white);
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: 15.5px;
  line-height: 35px;
  border-radius: var(--r-btn);
  white-space: nowrap;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  opacity: 0.82;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn--light {
  background: #FFFFFF;
  color: var(--text);
  border: 1px solid var(--color-input-border);
}

/* ============================================================
   Entry Row  (participant list item)
   ============================================================ */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 20px 0 15px;
  background: var(--bg-entry);
  border-radius: var(--r-entry);
  overflow: hidden;
}

.entry-row__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.entry-row__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.entry-row__name {
  font-family: var(--font-jp);
  font-size: 18px;
  font-weight: 400;
  line-height: 2.3;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-row__san {
  font-family: var(--font-jp);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.018px;
  color: var(--text);
  line-height: 2.3;
}

.entry-row__remove {
  opacity: 0.5;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  transition: opacity 0.15s ease;
  color: var(--text);
  font-size: 14px;
  line-height: 1;
}

.entry-row__remove:hover {
  opacity: 1;
}

/* ============================================================
   Card Sections
   ============================================================ */
.card-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-section__label {
  font-family: var(--font-jp);
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  line-height: 1;
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
   Kotobacard  (word card — 120×150)
   ============================================================ */
.kotobacard {
  width: 120px;
  height: 150px;
  background: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kotobacard:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.kotobacard.is-selected {
  outline: 2px solid var(--text);
  outline-offset: -2px;
}

.kotobacard__text {
  font-family: var(--font-jp);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
}

/* ============================================================
   Irocard  (color card — 120×68)
   ============================================================ */
.irocard {
  width: 120px;
  height: 68px;
  border-radius: var(--r-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 3px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.irocard:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.irocard.is-selected {
  outline: 3px solid var(--text);
  outline-offset: -3px;
}

.irocard__text {
  font-family: var(--font-jp);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  color: var(--text-white);
}

.irocard__text--dark {
  color: var(--text);
}

/* Irocard color variants */
.irocard--red          { background: var(--iro-red); }
.irocard--orange       { background: var(--iro-orange); }
.irocard--yellow       { background: var(--iro-yellow); }
.irocard--yellow-green { background: var(--iro-yellow-green); }
.irocard--green        { background: var(--iro-green); }
.irocard--light-blue   { background: var(--iro-light-blue); }
.irocard--blue         { background: var(--iro-blue); }
.irocard--purple       { background: var(--iro-purple); }
.irocard--pink         { background: var(--iro-pink); }
.irocard--brown        { background: var(--iro-brown); }
.irocard--black        { background: var(--iro-black); }
.irocard--light-orange { background: var(--iro-light-orange); }

/* ============================================================
   Utility
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.hidden { display: none !important; }

/* ============================================================
   Responsive — Tablet (768px ~ 1024px)
   ============================================================ */
@media (max-width: 1100px) {
  .card-row {
    gap: 8px;
  }

  .kotobacard {
    width: 100px;
    height: 130px;
  }

  .kotobacard__text {
    font-size: 17px;
  }

  .irocard {
    width: 100px;
    height: 60px;
  }

  .irocard__text {
    font-size: 15px;
  }

  .s4b-card-scene {
    width: 100px;
    height: 130px;
  }

  .s4b-word {
    font-size: 17px;
  }
}

@media (max-width: 860px) {
  .title-block__jp {
    font-size: 20px;
    white-space: normal;
    text-align: center;
  }

  .kotobacard {
    width: 80px;
    height: 110px;
  }

  .kotobacard__text {
    font-size: 15px;
  }

  .irocard {
    width: 80px;
    height: 56px;
  }

  .irocard__text {
    font-size: 13px;
  }

  .s8-order-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .s8-order-card {
    width: 100%;
  }

  .s4b-card-scene {
    width: 80px;
    height: 110px;
  }

  .s4b-word {
    font-size: 15px;
  }
}

/* ============================================================
   Screen 3-A — Participant Entry
   ============================================================ */
.s3-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  opacity: 0;
}

.s3-upper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  width: 500px;
}

.s3-input-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  height: 45px;
}

.s3-input {
  flex: 1;
  height: 44px;
  padding: 0 10.5px;
  background: var(--text-white);
  border: 1px solid var(--color-input-border);
  border-radius: var(--r-input);
  font-family: var(--font-jp);
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.2s ease;
  outline: none;
}

.s3-input::placeholder {
  color: var(--text-placeholder);
}

.s3-input:focus {
  border-color: var(--text);
}

.s3-add-btn {
  width: 44px;
  height: 44px;
  background: var(--color-btn-add);
  border: 1px solid #f8f6ef;
  border-radius: var(--r-btn);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.s3-add-btn img {
  filter: brightness(0) invert(1);
}

.s3-add-btn:hover {
  opacity: 0.82;
}

/* Entry rows in screen 3 take full container width */
#s3-entry-list .entry-row {
  width: 500px;
}

/* Name + さん grouped: items-center with nested wrapper matching Figma */
.entry-row__name-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.entry-row__san-wrap {
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 3px;
  width: 26px;
  flex-shrink: 0;
}

.entry-row__san-inner {
  height: 41px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 0;
}

/* Proceed button */
.s3-proceed {
  padding-top: 15px;
}

.s3-proceed-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.s3-proceed-btn {
  width: 230px;
  border-radius: 0;
}

.s3-cancel-btn {
  width: 200px;
  border-radius: 0;
}

.s3-confirm-yes-btn {
  width: 200px;
  border-radius: 0;
}

/* Entry row entrance animation */
@keyframes s3-entry-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.s3-entry-appear {
  animation: s3-entry-in 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Popup notification */
.s3-popup {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #FFF9C1;
  border: 2px solid #FFFFFF;
  color: var(--text);
  font-family: var(--font-jp);
  font-size: 14px;
  line-height: 1.5;
  padding: 11px 24px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 200;
}

.s3-popup.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.s3-confirm {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #FFF9C1;
  border: 2px solid #FFFFFF;
  color: var(--text);
  font-family: var(--font-jp);
  font-size: 14px;
  line-height: 1.5;
  padding: 11px 24px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 210;
}

.s3-confirm.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.s3-confirm-msg {
  font-size: 14px;
}

/* Body: top-anchored (no vertical re-centering as entries grow) */
#screen-3-a .screen__body {
  justify-content: flex-start;
  padding-top: 70px;
}

/* Entrance animation */
#screen-3-a.is-active .s3-inner {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.1s;
}

/* ============================================================
   Screen 3-B — 発表順決定
   ============================================================ */
#screen-3-b .screen__body {
  justify-content: flex-start;
  padding-top: 70px;
}

.s3b-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  opacity: 0;
}

#screen-3-b.is-active .s3b-inner {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.1s;
}

.s3b-order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 460px;
}

.s3b-order-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-entry);
  border-radius: 8px;
  padding: 14px 20px;
}

.s3b-order-num {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 20px;
  color: var(--text);
  min-width: 24px;
}

.s3b-order-icon {
  opacity: 0.6;
}

.s3b-order-name {
  font-family: var(--font-jp);
  font-size: 16px;
  color: var(--text);
}

.s3b-next-btn {
  width: 260px;
  height: 50px;
  border-radius: 0;
}

/* ============================================================
   Screen 4-B — ことばカード
   ============================================================ */
.s4b-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
  opacity: 0;
}

#screen-4-b.is-active .s4b-inner {
  animation: s1-fade-up 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.s4b-cards-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* カードフリップ — 3D */
.s4b-card-scene {
  width: 120px;
  height: 150px;
  perspective: 800px;
  flex-shrink: 0;
}

.s4b-card-flipper {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.s4b-card-flipper.is-flipped {
  transform: rotateY(180deg);
}

.s4b-card-front,
.s4b-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.s4b-card-front {
  background: var(--bg);
}

.s4b-card-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.s4b-card-back {
  background: #ffffff;
  transform: rotateY(180deg);
}

/* 縦書き — ーはJS側で｜に置換 */
.s4b-word {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-jp);
  font-size: 20px;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
}

/* ボタン — カードアニメーション中は非表示、完了後にフェードイン */
.s4b-buttons {
  display: flex;
  gap: 25px;
  align-items: center;
  padding-top: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.s4b-buttons.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.s4b-shuffle-btn {
  width: 260px;
  background: #ffffff;
  border: 1px solid var(--bg-inactive);
  color: var(--text);
  border-radius: 0;
  opacity: 0.85;
}

.s4b-shuffle-btn:hover {
  opacity: 1;
}

.s4b-shuffle-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.s4b-start-btn {
  width: 260px;
  border-radius: 0;
}

/* ============================================================
   Screen 2 — Game explanation
   ============================================================ */
.s2-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

.s2-desc {
  font-family: var(--font-jp);
  font-size: 16px;
  font-weight: 400;
  line-height: 35px;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  opacity: 0;
}

.s2-animation {
  width: 500px;
  height: 140px;
  border: none;
  display: block;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  margin-top: -20px;
  margin-bottom: -20px;
}

.s2-heading {
  font-family: var(--font-jp);
  font-size: 24px;
  font-weight: 400;
  line-height: 40px;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  opacity: 0;
}

.s2-btn {
  width: 260px;
  border-radius: 0;
  opacity: 0;
}

#screen-2.is-active .s2-desc {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.1s;
}

#screen-2.is-active .s2-animation {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.35s;
}

#screen-2.is-active .s2-heading {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.6s;
}

#screen-2.is-active .s2-btn {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.85s;
}

/* ============================================================
   Screen 1 — Title / Start
   ============================================================ */
@keyframes s1-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.s1-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
}

.s1-tagline {
  font-family: var(--font-jp);
  font-size: 24px;
  font-weight: 400;
  line-height: 40px;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  opacity: 0;
}

.s1-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  opacity: 0;
}

.s1-anim-wrap {
  position: relative;
  width: 600px;
  height: 160px;
  margin-top: -38px;
  margin-bottom: -38px;
}

.s1-anim-cover {
  position: absolute;
  inset: 0;
  background: var(--bg);
  pointer-events: none;
  display: none;
}

.s1-anim-cover.is-visible {
  display: block;
}

.s1-animation {
  width: 600px;
  height: 160px;
  border: none;
  display: block;
  overflow: hidden;
  pointer-events: none;
}

.s1-logo {
  width: 219px;
  height: 40px;
  display: block;
}

.s1-btn {
  width: 260px;
  height: 60px;
  background: #ffffff;
  color: var(--text);
  font-family: var(--font-jp);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  border: none;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.s1-btn:hover {
  opacity: 0.72 !important;
}

/* Animate in when screen becomes active */
#screen-1.is-active .s1-tagline {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.1s;
}

#screen-1.is-active .s1-visual {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.4s;
}

#screen-1.is-active .s1-btn {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.85s;
}

/* ============================================================
   Screen 5 — IMAGE TIME
   ============================================================ */
.s5-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

.s5-title {
  opacity: 0;
}

.s5-desc {
  font-family: var(--font-jp);
  font-size: 16px;
  font-weight: 400;
  line-height: 35px;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  opacity: 0;
}

.s5-animation {
  width: 500px;
  height: 160px;
  border: none;
  display: block;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  margin-top: -48px;
  margin-bottom: -18px;
}

.s5-ok-btn {
  width: 300px;
  border-radius: 0;
  opacity: 0;
}

#screen-5.is-active .s5-title {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.15s;
}

#screen-5.is-active .s5-desc {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.4s;
}

#screen-5.is-active .s5-animation {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.65s;
}

#screen-5.is-active .s5-ok-btn {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.9s;
}

/* ============================================================
   Screen 6 — IMAGE TIME (card selection + countdown)
   ============================================================ */
.s6-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* — Title — */
.s6-title {
  opacity: 0;
}

/* — Countdown row — */
.s6-countdown-row {
  display: grid;
  grid-template-columns: 35px 130px;
  align-items: center;
  gap: 10px;
  opacity: 0;
}

.s6-timer-icon {
  width: 35px;
  height: 35px;
  flex-shrink: 0;
}

.s6-countdown {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: 43.642px;
  line-height: 43.642px;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* — Section (label + cards) — */
.s6-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 770px;
  opacity: 0;
}

.s6-section-label {
  font-family: var(--font-jp);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  color: var(--text);
}

/* — Kotoba cards row — */
.s6-kotoba-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.s6-kotobacard {
  width: 120px;
  height: 150px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s6-kotobacard-word {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-jp);
  font-size: 20px;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
}

/* — Iro cards grid — */
.s6-iro-grid {
  display: flex;
  flex-wrap: wrap;
  row-gap: 10px;
  justify-content: space-between;
}

.s6-irocard {
  width: 120px;
  height: 68px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s6-irocard-label {
  font-family: var(--font-jp);
  font-size: 17px;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}


/* — Entrance animations — */
#screen-6.is-active .s6-title {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.15s;
}

#screen-6.is-active .s6-countdown-row {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.35s;
}

#screen-6.is-active .s6-section:nth-child(3) {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.55s;
}

#screen-6.is-active .s6-section:nth-child(4) {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.75s;
}


/* ============================================================
   Screen 7 — IMAGE TIME (per-player card selection: 7-A / 7-B / 7-C)
   ============================================================ */

.s7-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
}

.s7-title {
  opacity: 0;
}

/* — Entry bar — */
.s7-entry-bar {
  width: 770px;
  height: 52px;
  background: var(--bg-entry);
  border-radius: var(--r-entry);
  display: flex;
  align-items: center;
  padding: 0 20px 0 15px;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
}

.s7-entry-inner {
  display: flex;
  flex: 1;
  gap: 20px;
  align-items: center;
  justify-content: center;
  padding-right: 50px;
  min-width: 0;
}

.s7-entry-num {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 1.92px;
  width: 30px;
  text-align: center;
  color: var(--text);
  flex-shrink: 0;
}

.s7-entry-center {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  flex: 1;
}

.s7-entry-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.s7-entry-namegroup {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.s7-entry-name {
  font-family: var(--font-jp);
  font-size: 18px;
  line-height: 2.3;
  color: var(--text);
}

.s7-entry-san {
  font-family: var(--font-jp);
  font-size: 13px;
  letter-spacing: -0.018px;
  color: var(--text);
}

/* — Card sections — */
.s7-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 770px;
  opacity: 0;
}

.s7-section-label {
  font-family: var(--font-jp);
  font-size: 13px;
  color: var(--text);
}

/* — Kotoba cards — */
.s7-kotoba-row {
  display: flex;
  justify-content: space-between;
}

.s7-kotobacard {
  width: 120px;
  height: 150px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
  box-sizing: border-box;
  border: 1px solid transparent;
}

.s7-kotobacard.is-selected {
  border: 1px solid var(--bg-inactive);
  box-shadow: 5px 5px 2.5px rgba(0, 0, 0, 0.05);
}

.s7-kotoba-row:has(.is-selected) .s7-kotobacard:not(.is-selected) {
  opacity: 0.4;
}

.s7-kotobacard-word {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-jp);
  font-size: 20px;
  line-height: 1.2;
  color: var(--text);
  pointer-events: none;
}

/* — Iro cards — */
.s7-iro-grid {
  display: flex;
  flex-wrap: wrap;
  row-gap: 10px;
  justify-content: space-between;
}

.s7-irocard {
  width: 120px;
  height: 68px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
  box-sizing: border-box;
  border: 1px solid transparent;
}

.s7-irocard.is-selected {
  border: 1px solid rgba(255, 255, 255, 1);
  box-shadow: 3px 3px 1.5px rgba(0, 0, 0, 0.1);
}

.s7-iro-grid:has(.is-selected) .s7-irocard:not(.is-selected) {
  opacity: 0.3;
}

.s7-irocard-label {
  font-family: var(--font-jp);
  font-size: 17px;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}

/* — Confirm button — */
.s7-button-wrap {
  padding-top: 15px;
  opacity: 0;
}

.s7-confirm-btn {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  height: 50px;
  padding: 0 40px;
  background: var(--bg-inactive);
  color: #fff;
  font-family: var(--font-jp);
  font-size: 15.5px;
  line-height: 1;
  border: none;
  border-radius: 0;
  pointer-events: none;
  cursor: default;
}

.s7-confirm-btn.s7-btn--active {
  background: var(--color-btn);
  pointer-events: auto;
  cursor: pointer;
}

.s7-confirm-btn svg {
  flex-shrink: 0;
}

/* — Entrance animations — */
#screen-7-a.is-active .s7-title {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.15s;
}

#screen-7-a.is-active .s7-entry-bar {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.3s;
}

#screen-7-a.is-active .s7-section:nth-child(3) {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.45s;
}

#screen-7-a.is-active .s7-section:nth-child(4) {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.6s;
}

#screen-7-a.is-active .s7-button-wrap {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.75s;
}


/* ============================================================
   Screen 8 — KATALI 発表順確認
   ============================================================ */

.s8-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.s8-title {
  opacity: 0;
}

.s8-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
}

.s8-section-label {
  font-family: var(--font-jp);
  font-size: 13px;
  color: var(--text);
}

.s8-order-grid {
  display: grid;
  grid-template-columns: repeat(2, 375px);
  column-gap: 20px;
  row-gap: 29px;
}

.s8-order-card {
  width: 375px;
  background: var(--bg-entry);
  border-radius: 10px;
  padding: 12px 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.s8-order-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 96px;
  justify-content: space-between;
  padding-bottom: 5px;
  padding-right: 35px;
  min-width: 0;
}

.s8-order-num {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 1.92px;
  color: var(--text);
  line-height: 1;
}

.s8-next-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 4px 6px;
  font-family: var(--font-jp);
  font-size: 13px;
  letter-spacing: -0.018px;
  white-space: nowrap;
  box-sizing: border-box;
  line-height: 1;
}

.s8-order-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  width: 100%;
}

.s8-name-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* name + さん grouped to stay visually adjacent */
.s8-name-san-group {
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.s8-order-name {
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 35px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.s8-order-san {
  font-family: var(--font-jp);
  font-size: 13px;
  letter-spacing: -0.018px;
  color: var(--text);
  flex-shrink: 0;
  white-space: nowrap;
}

.s8-order-right {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.s8-kotobacard {
  width: 75px;
  height: 93.75px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s8-kotobacard-word {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-jp);
  font-size: 14px;
  line-height: 1.1;
  color: var(--text);
  pointer-events: none;
}

/* outer wrapper stretches to card height; inner stack centers cards with h:100% */
.s8-iro-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: stretch;
}

.s8-iro-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s8-irocard-mini {
  width: 50px;
  height: 28.333px;
  border-radius: 4px;
  flex-shrink: 0;
}

.s8-buttons {
  display: flex;
  gap: 25px;
  align-items: center;
  padding-top: 15px;
  opacity: 0;
}

.s8-btn-change {
  width: 260px;
  height: 50px;
  background: #fff;
  border: 1px solid var(--color-input-border);
  font-family: var(--font-jp);
  font-size: 15.5px;
  line-height: 1;
  color: rgba(51, 51, 51, 0.8);
  cursor: pointer;
  border-radius: 0;
}

.s8-btn-start {
  width: 260px;
  height: 50px;
  background: var(--color-btn);
  border: none;
  font-family: var(--font-jp);
  font-size: 15.5px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  border-radius: 0;
}

/* — Entrance animations — */
#screen-8.is-active .s8-title {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.15s;
}

#screen-8.is-active .s8-section {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.35s;
}

#screen-8.is-active .s8-buttons {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.6s;
}


/* ============================================================
   Screen 8.5-A — カード変更する人を選択
   ============================================================ */

/* Step indicator hidden (Figma: opacity-0 on header) */
.s8-5-header-hidden {
  opacity: 0;
  pointer-events: none;
}

.s8-5-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.s8-5-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  opacity: 0;
}

.s8-5-title-jp {
  font-family: var(--font-jp);
  font-size: 24px;
  line-height: 40px;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
}

.s8-5-section {
  width: 770px;
  opacity: 0;
}

/* Clickable cards */
.s8-5-card-clickable {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.s8-5-card-clickable:hover {
  opacity: 0.8;
}

.s8-5-buttons {
  padding-top: 15px;
  opacity: 0;
}

.s8-5-btn-back {
  width: 260px;
  height: 50px;
  background: #fff;
  border: 1px solid var(--color-input-border);
  font-family: var(--font-jp);
  font-size: 15.5px;
  line-height: 1;
  color: rgba(51, 51, 51, 0.8);
  cursor: pointer;
  border-radius: 0;
}

/* — Entrance animations — */
#screen-8-5-a.is-active .s8-5-title {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.15s;
}

#screen-8-5-a.is-active .s8-5-section {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.35s;
}

#screen-8-5-a.is-active .s8-5-buttons {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.6s;
}


/* ============================================================
   Screen 8.5-B — カード変更（再選択）
   ============================================================ */

.s8-5-b-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
}

.s8-5-b-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
}

.s8-5-b-title-jp {
  font-family: var(--font-jp);
  font-size: 24px;
  line-height: 40px;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
}

#screen-8-5-b.is-active .s8-5-b-title {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.15s;
}

#screen-8-5-b.is-active .s7-entry-bar {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.3s;
}

#screen-8-5-b.is-active .s8-5-b-kotoba-section {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.45s;
}

#screen-8-5-b.is-active .s8-5-b-iro-section {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.6s;
}

#screen-8-5-b.is-active .s8-5-b-btn-wrap {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.75s;
}


/* ============================================================
   Screen 9 — KATALI 発表
   ============================================================ */

.s9-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
}

.s9-title {
  opacity: 0;
}

/* — Presentation card — */
.s9-presentation-card {
  width: 770px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  padding: 25px 32px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
}

.s9-pres-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 180px;
  align-items: flex-start;
  justify-content: space-between;
  padding-right: 70px;
  min-width: 0;
}

.s9-pres-num {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 2.4px;
  color: var(--text);
  line-height: 1;
}

.s9-pres-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
}

/* 発表中 label — blinks slowly */
@keyframes s9-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.s9-presenting-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  font-family: var(--font-jp);
  font-size: 16px;
  letter-spacing: -0.027px;
  white-space: nowrap;
  line-height: 1;
}

.s9-presenting-label-text {
  animation: s9-pulse 3.74s ease-in-out infinite;
}

.s9-pres-name-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-bottom: 2px;
  width: 100%;
}

.s9-pres-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  width: 100%;
  margin-bottom: -2px;
}

.s9-pres-icon {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
}

.s9-pres-name {
  flex: 0 1 auto;
  font-family: var(--font-jp);
  font-size: 24px;
  line-height: 40px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.s9-pres-sanga {
  font-family: var(--font-jp);
  font-size: 24px;
  line-height: 40px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.s9-pres-subtitle {
  font-family: var(--font-jp);
  font-size: 24px;
  line-height: 40px;
  color: var(--text);
  margin-bottom: -2px;
}

/* Right: kotobacard + iro column */
.s9-pres-right {
  display: flex;
  gap: 30px;
  height: 170px;
  align-items: flex-end;
  flex-shrink: 0;
}

.s9-pres-kotobacard {
  width: 136px;
  height: 170px;
  background: #fff;
  border: 1px solid var(--bg-inactive);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s9-pres-kotobacard-word {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-jp);
  font-size: 20px;
  line-height: 1.2;
  color: var(--text);
  pointer-events: none;
}

.s9-pres-iro-col {
  width: 120px;
  height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.s9-pres-irocard {
  width: 100%;
  height: 68px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 3px;
  flex-shrink: 0;
}

.s9-pres-irocard-label {
  font-family: var(--font-jp);
  font-size: 17px;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}

/* — Queue section — */
.s9-queue-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: stretch;
  opacity: 0;
}

.s9-queue-label {
  font-family: var(--font-jp);
  font-size: 13px;
  color: var(--text);
  width: 770px;
  align-self: center;
}

.s9-queue-scroll-track {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.s9-queue-scroll-track::-webkit-scrollbar {
  display: none;
}

.s9-queue-row {
  display: flex;
  gap: 15px;
  padding-left: calc(50% - 385px);
}

.s9-queue-row::after {
  content: '';
  min-width: 15px;
  flex-shrink: 0;
}

.s9-queue-card {
  width: 375px;
  flex-shrink: 0;
  background: var(--bg-entry);
  border-radius: 10px;
  padding: 12px 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.s9-queue-card--done {
  opacity: 0.35;
}

.s9-queue-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 96px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 5px;
  padding-right: 35px;
  min-width: 0;
}

.s9-queue-num {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 1.92px;
  color: var(--text);
  line-height: 1;
}

.s9-queue-status-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 4px 6px;
  font-family: var(--font-jp);
  font-size: 13px;
  letter-spacing: -0.018px;
  white-space: nowrap;
  line-height: 1;
  box-sizing: border-box;
}

.s9-queue-status-label--done {
  background: var(--bg-inactive);
  color: rgba(51, 51, 51, 0.5);
}

.s9-queue-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  width: 100%;
}

.s9-queue-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.s9-queue-name {
  flex: 0 1 auto;
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 35px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.s9-queue-san-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 3px;
  width: 26px;
  flex-shrink: 0;
}

.s9-queue-san-inner {
  height: 41px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.s9-queue-san {
  font-family: var(--font-jp);
  font-size: 13px;
  letter-spacing: -0.018px;
  color: var(--text);
  line-height: 2.3;
  white-space: nowrap;
}

.s9-queue-right {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-shrink: 0;
  height: 93.75px;
}

.s9-queue-kotobacard {
  width: 75px;
  height: 93.75px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s9-queue-kotobacard-word {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-jp);
  font-size: 14px;
  line-height: 1.1;
  color: var(--text);
  pointer-events: none;
}

.s9-queue-iro-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: stretch;
}

.s9-queue-iro-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s9-queue-iro-mini {
  width: 50px;
  height: 28.333px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* — Button — */
.s9-button-wrap {
  padding-top: 15px;
  opacity: 0;
}

.s9-confirm-btn {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  height: 50px;
  padding: 0 40px;
  background: var(--color-btn);
  color: #fff;
  font-family: var(--font-jp);
  font-size: 15.5px;
  line-height: 35px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.s9-confirm-btn:hover {
  opacity: 0.82;
}

/* — Entrance animations — */
#screen-9.is-active .s9-title {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.15s;
}

#screen-9.is-active .s9-presentation-card {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.35s;
}

#screen-9.is-active .s9-queue-section {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.55s;
}

#screen-9.is-active .s9-button-wrap {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.75s;
}


/* ============================================================
   Screen 10 — エンディング
   ============================================================ */

.s10-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

.s10-message {
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 35px;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  opacity: 0;
}

.s10-animation {
  width: 500px;
  height: 160px;
  border: none;
  display: block;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  margin-top: -74px;
  margin-bottom: -18px;
}

.s10-credits {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 13px;
  line-height: 2.3;
  letter-spacing: 1px;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  opacity: 0;
}

.s10-button-wrap {
  opacity: 0;
}

.s10-btn {
  width: 300px;
  height: 50px;
  background: var(--color-btn);
  color: var(--text-white);
  font-family: var(--font-jp);
  font-size: 15.5px;
  line-height: 35px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.s10-btn:hover {
  opacity: 0.82;
}

@keyframes s10-credits-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 0.6; transform: translateY(0); }
}

/* — Entrance animations — */
#screen-10.is-active .s10-message {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.15s;
}

#screen-10.is-active .s10-animation {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.4s;
}

#screen-10.is-active .s10-credits {
  animation: s10-credits-in 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.65s;
}

#screen-10.is-active .s10-button-wrap {
  animation: s1-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.85s;
}

