    /* ============================================================
   SPADIE POKER LEAGUE — Public Portal
   Brand: retro-game × pop-culture × festival
   Colors: 4-suit system (red/blue/gold/green) + dark navy base
   ============================================================ */
    :root {
      --primary: #1a1a2e;
      --accent: #e94560;
      --accent-light: #fff0f3;
      --gold: #f5c800;
      --gold-light: #faf6eb;
      --blue: #0f3460;
      --blue-light: #eef3fa;
      --green: #16a34a;
      --green-light: #f0fdf4;
      --surface: #ffffff;
      --surface-alt: #f8f9fc;
      --border: #e8e9f0;
      --text: #1a1a2e;
      --text-secondary: #5a5d70;
      --text-light: #8b8ea0;
      --suit-spade: #0f3460;
      --suit-heart: #e94560;
      --suit-diamond: #c9a84c;
      --suit-club: #16a34a;
      --tab-height: 64px;
      --header-height: 60px;
      --day-tabs-height: 52px;
      --safe-bottom: env(safe-area-inset-bottom, 0px);
      --safe-top: env(safe-area-inset-top, 0px);
      --safe-left: env(safe-area-inset-left, 0px);
      --safe-right: env(safe-area-inset-right, 0px);
    }

    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      -webkit-text-size-adjust: 100%;
    }

    body {
      font-family: 'Inter', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', system-ui, sans-serif;
      background: var(--surface-alt);
      color: var(--text);
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      padding-bottom: calc(var(--tab-height) + var(--safe-bottom));
    }

    .pixel-font {
      font-family: 'Press Start 2P', monospace;
    }

    .en {
      font-family: 'Inter', sans-serif;
    }

    /* ── Page Transitions ── */
    #main-content {
      transition: opacity .18s ease, transform .18s ease;
    }

    #main-content.page-leaving {
      opacity: 0;
      transform: translateY(6px);
    }

    #main-content.page-entering {
      opacity: 0;
      transform: translateY(-4px);
    }

    @media (prefers-reduced-motion: reduce) {

      #main-content,
      #main-content.page-leaving,
      #main-content.page-entering {
        transition: none;
        transform: none;
        opacity: 1;
      }
    }

    /* ── PWA Install Banner ── */
    #pwa-install-banner {
      position: fixed;
      left: calc(12px + var(--safe-left));
      right: calc(12px + var(--safe-right));
      bottom: calc(var(--tab-height) + var(--safe-bottom) + 12px);
      z-index: 90;
      background: #153364;
      color: #ffd84d;
      border-radius: 14px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 216, 77, .35) inset;
      padding: 12px 14px;
      display: none;
      align-items: center;
      gap: 12px;
      font-family: 'Noto Sans JP', sans-serif;
      transform: translateY(20px);
      opacity: 0;
      transition: opacity .3s ease, transform .3s ease;
      pointer-events: none;
    }

    #pwa-install-banner.pwa-show {
      display: flex;
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }

    .pwa-install-icon {
      flex: 0 0 40px;
      width: 40px;
      height: 40px;
      border-radius: 10px;
      background: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    .pwa-install-icon img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .pwa-install-text {
      flex: 1 1 auto;
      min-width: 0;
      font-size: 12px;
      line-height: 1.4;
      color: #fff;
    }

    .pwa-install-text strong {
      display: block;
      color: #ffd84d;
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 2px;
    }

    .pwa-install-actions {
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex-shrink: 0;
    }

    .pwa-install-btn {
      background: #ffd84d;
      color: #153364;
      border: none;
      padding: 8px 14px;
      min-height: 36px;
      border-radius: 18px;
      font-size: 12px;
      font-weight: 700;
      font-family: 'Noto Sans JP', sans-serif;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }

    .pwa-install-btn:active {
      transform: scale(.96);
    }

    .pwa-install-dismiss {
      background: transparent;
      color: rgba(255, 255, 255, .7);
      border: none;
      padding: 4px 10px;
      min-height: 28px;
      font-size: 11px;
      font-weight: 600;
      font-family: 'Noto Sans JP', sans-serif;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }

    @media (max-width: 360px) {
      #pwa-install-banner {
        padding: 10px 12px;
        gap: 8px;
      }

      .pwa-install-icon {
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
      }

      .pwa-install-text {
        font-size: 11px;
      }
    }

    /* ── Toast ── */
    #toast-container {
      position: fixed;
      left: 50%;
      bottom: calc(72px + env(safe-area-inset-bottom, 0px));
      transform: translateX(-50%);
      z-index: 99999;
      display: flex;
      flex-direction: column;
      gap: 8px;
      pointer-events: none;
    }

    .toast {
      background: rgba(21, 51, 100, .95);
      color: #ffd84d;
      padding: 10px 18px;
      border-radius: 24px;
      font-size: 13px;
      font-weight: 600;
      font-family: 'Noto Sans JP', sans-serif;
      box-shadow: 0 6px 22px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 216, 77, .3) inset;
      opacity: 0;
      transform: translateY(10px) scale(.96);
      transition: opacity .22s ease, transform .22s ease;
      white-space: nowrap;
    }

    .toast.toast-show {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    .toast.toast-success {
      color: #bfffcf;
      box-shadow: 0 6px 22px rgba(0, 0, 0, .45), 0 0 0 1px rgba(22, 163, 74, .5) inset;
    }

    .toast.toast-warn {
      color: #ffd1a8;
      box-shadow: 0 6px 22px rgba(0, 0, 0, .45), 0 0 0 1px rgba(249, 115, 22, .5) inset;
    }

    /* ── Splash Screen ── */
    #splash {
      position: fixed;
      inset: 0;
      z-index: 9999;
      background: var(--primary);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      transition: opacity 0.6s, visibility 0.6s;
    }

    #splash.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    #splash .splash-logo-img {
      width: 70%;
      max-width: 280px;
      height: auto;
      margin-bottom: 16px;
      animation: splashLogoBounce 1.6s ease-in-out infinite;
    }

    @keyframes splashLogoBounce {

      0%,
      100% {
        transform: translateY(0) scale(1);
      }

      50% {
        transform: translateY(-6px) scale(1.02);
      }
    }

    #splash .tagline {
      color: var(--text-light);
      font-size: 12px;
      margin-top: 8px;
    }

    /* ── Splash Partner Logos ── */
    #splash .splash-partner-logos {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 20px;
      margin-top: 28px;
      margin-bottom: 4px;
    }

    #splash .splash-partner-logo {
      width: 52px;
      height: 52px;
      object-fit: contain;
      animation: splashPartnerPulse 1.4s ease-in-out infinite;
    }

    /* 4枚を時間差でバウンド */
    #splash .splash-partner-logo:nth-child(1) {
      animation-delay: 0s;
    }

    #splash .splash-partner-logo:nth-child(2) {
      animation-delay: 0.2s;
    }

    #splash .splash-partner-logo:nth-child(3) {
      animation-delay: 0.4s;
    }

    #splash .splash-partner-logo:nth-child(4) {
      animation-delay: 0.6s;
    }

    @keyframes splashPartnerPulse {

      0%,
      100% {
        transform: scale(1);
        opacity: 0.7;
      }

      50% {
        transform: scale(1.22);
        opacity: 1;
      }
    }

    #splash .bar-wrap {
      width: 180px;
      height: 4px;
      background: rgba(255, 255, 255, 0.15);
      border-radius: 2px;
      margin-top: 20px;
      overflow: hidden;
    }

    #splash .bar {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--suit-heart), var(--suit-diamond));
      border-radius: 2px;
      transition: width 0.3s;
    }

    #splash .pct {
      color: var(--text-light);
      font-size: 11px;
      margin-top: 8px;
      font-family: 'Inter', sans-serif;
    }

    /* ── Header ── */
    .app-header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
      background: #153364;
      height: calc(var(--header-height) + var(--safe-top));
      padding-top: var(--safe-top);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-left: calc(12px + var(--safe-left));
      padding-right: calc(12px + var(--safe-right));
      padding-bottom: 2px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
      gap: 8px;
    }

    main {
      padding-top: calc(var(--header-height) + var(--safe-top));
    }

    .app-header .header-slot {
      display: flex;
      align-items: center;
      gap: 6px;
      flex: 0 0 auto;
    }

    .app-header .header-slot.left {
      justify-content: flex-start;
    }

    .app-header .header-slot.right {
      justify-content: flex-end;
    }

    .app-header .header-center {
      flex: 1 1 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 0;
    }

    .app-header .header-title {
      font-family: 'Press Start 2P', cursive;
      font-size: 18px;
      letter-spacing: 2px;
      color: var(--gold);
      text-shadow: 2px 2px 0 var(--blue), 3px 3px 0 rgba(0, 0, 0, 0.8);
      white-space: nowrap;
    }

    .header-logo-img {
      /* ヘッダー縦幅いっぱいに表示（上下に最小限の余白のみ残す） */
      height: calc(var(--header-height) - 6px);
      max-height: calc(var(--header-height) - 2px);
      max-width: min(260px, 65vw);
      width: auto;
      display: block;
      object-fit: contain;
      transition: transform 0.2s;
    }

    @keyframes logo-pulse {
      0% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.12);
      }

      100% {
        transform: scale(1);
      }
    }

    .header-logo-img.logo-pulse {
      animation: logo-pulse 0.8s ease-in-out infinite;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }

    .app-header .partner-logo {
      display: block;
      height: clamp(24px, 8vw, 34px);
      max-height: calc(var(--header-height) - 16px);
      width: auto;
      object-fit: contain;
      flex-shrink: 0;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transform-origin: bottom center;
    }

    @keyframes chara-jump {
      0% {
        transform: translateY(0) scale(1, 1);
      }

      15% {
        transform: translateY(0) scale(1.1, 0.85);
      }

      30% {
        transform: translateY(-12px) scale(0.95, 1.1);
      }

      50% {
        transform: translateY(-14px) scale(0.95, 1.1);
      }

      70% {
        transform: translateY(0) scale(1.05, 0.9);
      }

      85% {
        transform: translateY(-3px) scale(1, 1.02);
      }

      100% {
        transform: translateY(0) scale(1, 1);
      }
    }

    .partner-logo.jumping {
      animation: chara-jump 0.45s ease-out;
    }

    /* ヘッダーキャラ昇天 */
    @keyframes chara-ascend {
      0% {
        transform: translateY(0);
        opacity: 1;
      }

      40% {
        transform: translateY(-20px);
        opacity: 1;
      }

      100% {
        transform: translateY(-120vh);
        opacity: 0;
      }
    }

    .partner-logo.chara-ascend {
      animation: chara-ascend 0.8s ease-in forwards !important;
    }

    /* 降臨キャラ */
    .ascension-title {
      position: absolute;
      top: 22%;
      left: 50%;
      transform: translateX(-50%);
      color: #f5c800;
      font-size: clamp(16px, 4.5vw, 24px);
      font-weight: 700;
      text-align: center;
      white-space: nowrap;
      letter-spacing: 0.05em;
      text-shadow: 0 0 12px rgba(245, 200, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5);
      opacity: 0;
      animation: ascension-title-in 1.5s 1s ease-out forwards;
      z-index: 2;
    }

    @keyframes ascension-title-in {
      0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
      }

      100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
      }
    }

    .ascension-chara {
      position: absolute;
      top: 50%;
      left: 50%;
      width: clamp(180px, 55vw, 300px);
      height: auto;
      object-fit: contain;
      transform: translate(-50%, -150vh);
      opacity: 0;
      animation: chara-descend 4.5s 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards,
        chara-descend-pulse 0.8s 0.3s ease-in-out infinite;
      filter: drop-shadow(0 0 40px rgba(233, 69, 96, 0.5));
      z-index: 1;
    }

    @keyframes chara-descend {
      0% {
        transform: translate(-50%, -150vh);
        opacity: 0;
      }

      30% {
        opacity: 1;
      }

      70% {
        transform: translate(-50%, -45%);
        opacity: 1;
      }

      85% {
        transform: translate(-50%, -52%);
        opacity: 1;
      }

      100% {
        transform: translate(-50%, -50%);
        opacity: 1;
      }
    }

    @keyframes chara-descend-pulse {
      0% {
        filter: drop-shadow(0 0 40px rgba(233, 69, 96, 0.5)) drop-shadow(0 0 15px rgba(255, 200, 100, 0.3)) scale(1);
      }

      50% {
        filter: drop-shadow(0 0 60px rgba(233, 69, 96, 0.8)) drop-shadow(0 0 30px rgba(255, 220, 120, 0.6)) scale(1.06);
      }

      100% {
        filter: drop-shadow(0 0 40px rgba(233, 69, 96, 0.5)) drop-shadow(0 0 15px rgba(255, 200, 100, 0.3)) scale(1);
      }
    }

    /* キラキラパーティクル */
    .sparkle {
      position: absolute;
      pointer-events: none;
      z-index: 2;
      animation-fill-mode: forwards;
    }

    .sparkle-star {
      width: 100%;
      height: 100%;
      background: radial-gradient(circle, #fff 0%, rgba(255, 220, 130, 0.8) 30%, transparent 70%);
      border-radius: 50%;
    }

    .sparkle-cross {
      width: 100%;
      height: 100%;
      position: relative;
    }

    .sparkle-cross::before,
    .sparkle-cross::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9) 40%, rgba(255, 255, 255, 0.9) 60%, transparent);
      transform-origin: center;
    }

    .sparkle-cross::before {
      width: 100%;
      height: 2px;
      transform: translate(-50%, -50%);
    }

    .sparkle-cross::after {
      width: 2px;
      height: 100%;
      transform: translate(-50%, -50%);
    }

    @keyframes sparkle-float {
      0% {
        opacity: 0;
        transform: translate(0, 0) scale(0) rotate(0deg);
      }

      20% {
        opacity: 1;
        transform: translate(var(--sx), var(--sy)) scale(1) rotate(90deg);
      }

      60% {
        opacity: 0.8;
        transform: translate(calc(var(--sx)*2), calc(var(--sy)*2)) scale(0.7) rotate(180deg);
      }

      100% {
        opacity: 0;
        transform: translate(calc(var(--sx)*3), calc(var(--sy)*3)) scale(0) rotate(360deg);
      }
    }

    /* 降臨画面「戻る」ボタン */
    .ascension-back-btn {
      position: absolute;
      bottom: max(env(safe-area-inset-bottom, 20px), 40px);
      left: 50%;
      transform: translateX(-50%) scale(0.8);
      padding: 14px 48px;
      background: #f5c800;
      color: #fff;
      font-size: 16px;
      font-weight: 700;
      border: none;
      border-radius: 30px;
      cursor: pointer;
      z-index: 10;
      letter-spacing: 2px;
      opacity: 0;
      animation: ascension-btn-in 0.5s ease-out forwards;
      -webkit-tap-highlight-color: transparent;
      box-shadow: 0 4px 16px rgba(245, 200, 0, 0.4);
    }

    .ascension-back-btn:active {
      opacity: 0.8;
      transform: translateX(-50%) scale(0.95);
    }

    @keyframes ascension-btn-in {
      0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
      }

      100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
      }
    }

    @media (max-width: 360px) {
      .app-header .header-title {
        font-size: 14px;
        letter-spacing: 1px;
      }

      .app-header .partner-logo {
        height: 24px;
      }

      .header-logo-img {
        max-width: 55vw;
      }
    }

    /* ── Freeze Overlay — 群演出 (Easter Egg) ── */
    .freeze-overlay {
      position: fixed;
      inset: 0;
      z-index: 99999;
      background: #000;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      overflow: hidden;
    }

    .freeze-overlay.active {
      visibility: visible;
      pointer-events: auto;
      animation: freeze-blackout 0.6s ease-out forwards;
    }

    .freeze-overlay.fade-out {
      animation: freeze-out 1s ease-in forwards;
    }

    @keyframes freeze-blackout {
      0% {
        opacity: 0;
      }

      20% {
        opacity: 1;
      }

      40% {
        opacity: 0.3;
      }

      55% {
        opacity: 1;
      }

      70% {
        opacity: 0.6;
      }

      100% {
        opacity: 1;
      }
    }

    @keyframes freeze-out {
      0% {
        opacity: 1;
      }

      100% {
        opacity: 0;
        visibility: hidden;
      }
    }

    /* 走るキャラ共通 */
    .stampede-chara {
      position: absolute;
      width: 48px;
      height: 48px;
      object-fit: contain;
      pointer-events: none;
      /* iOS Safari/Chrome 対策: 可視性と変換の初期値を明示 */
      visibility: visible;
      transform: translateX(0) scaleX(-1);
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      /* 跳ねながら走る */
      animation-timing-function: linear;
      animation-fill-mode: both;
    }

    @keyframes stampede-run {
      0% {
        transform: translateX(0) translateY(0) scaleX(-1);
      }

      5% {
        transform: translateX(-11vw) translateY(-10px) scaleX(-1);
      }

      10% {
        transform: translateX(-22vw) translateY(0) scaleX(-1);
      }

      15% {
        transform: translateX(-33vw) translateY(-12px) scaleX(-1);
      }

      20% {
        transform: translateX(-44vw) translateY(0) scaleX(-1);
      }

      25% {
        transform: translateX(-55vw) translateY(-10px) scaleX(-1);
      }

      30% {
        transform: translateX(-66vw) translateY(0) scaleX(-1);
      }

      35% {
        transform: translateX(-77vw) translateY(-12px) scaleX(-1);
      }

      40% {
        transform: translateX(-88vw) translateY(0) scaleX(-1);
      }

      45% {
        transform: translateX(-99vw) translateY(-10px) scaleX(-1);
      }

      50% {
        transform: translateX(-110vw) translateY(0) scaleX(-1);
      }

      55% {
        transform: translateX(-121vw) translateY(-12px) scaleX(-1);
      }

      60% {
        transform: translateX(-132vw) translateY(0) scaleX(-1);
      }

      65% {
        transform: translateX(-143vw) translateY(-10px) scaleX(-1);
      }

      70% {
        transform: translateX(-154vw) translateY(0) scaleX(-1);
      }

      75% {
        transform: translateX(-165vw) translateY(-12px) scaleX(-1);
      }

      80% {
        transform: translateX(-176vw) translateY(0) scaleX(-1);
      }

      85% {
        transform: translateX(-187vw) translateY(-10px) scaleX(-1);
      }

      90% {
        transform: translateX(-198vw) translateY(0) scaleX(-1);
      }

      95% {
        transform: translateX(-209vw) translateY(-12px) scaleX(-1);
      }

      100% {
        transform: translateX(-220vw) translateY(0) scaleX(-1);
      }
    }

    /* 群予告メッセージ */
    .stampede-msg {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0.8);
      font-size: 15px;
      font-weight: 700;
      color: rgba(255, 255, 255, 0.9);
      white-space: nowrap;
      text-shadow: 0 0 20px rgba(180, 160, 130, 0.6);
      opacity: 0;
      animation: stampede-msg-in 0.6s ease-out forwards;
      z-index: 100;
    }

    @keyframes stampede-msg-in {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
      }

      50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.04);
      }

      100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
      }
    }

    /* 砂埃パーティクル */
    .stampede-dust {
      position: absolute;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: rgba(180, 160, 130, 0.7);
      pointer-events: none;
      will-change: transform, opacity;
      animation-fill-mode: forwards;
    }

    @keyframes dust-puff {
      0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
      }

      30% {
        transform: translate(8px, -10px) scale(2);
        opacity: 0.5;
      }

      60% {
        transform: translate(18px, -18px) scale(3);
        opacity: 0.25;
      }

      100% {
        transform: translate(28px, -24px) scale(4);
        opacity: 0;
      }
    }

    /* ── Freeze演出（隠しコマンド用） ── */
    .freeze-title {
      position: absolute;
      top: 22%;
      left: 50%;
      transform: translateX(-50%);
      color: #ffffff;
      font-size: clamp(14px, 4vw, 20px);
      font-weight: 700;
      text-align: center;
      white-space: nowrap;
      letter-spacing: 0.08em;
      text-shadow: 0 0 12px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.5);
      opacity: 0;
      z-index: 2;
    }

    .freeze-overlay.active .freeze-title {
      animation: freeze-title-in 1.5s 1.2s ease-out forwards;
    }

    @keyframes freeze-title-in {
      0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
      }

      100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
      }
    }

    .freeze-chara {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0.9);
      width: clamp(120px, 35vw, 200px);
      height: auto;
      object-fit: contain;
      opacity: 0;
      pointer-events: none;
      z-index: 1;
    }

    .freeze-overlay.active .freeze-chara {
      animation: chara-emerge 2.5s 0.8s ease-out forwards;
    }

    @keyframes chara-emerge {
      0% {
        opacity: 0;
        filter: brightness(0);
        transform: translate(-50%, -50%) scale(0.9);
      }

      30% {
        opacity: 0.3;
        filter: brightness(0.3) drop-shadow(0 0 20px rgba(80, 160, 255, 0.3));
        transform: translate(-50%, -50%) scale(0.95);
      }

      60% {
        opacity: 0.85;
        filter: brightness(0.8) drop-shadow(0 0 40px rgba(80, 160, 255, 0.4));
        transform: translate(-50%, -50%) scale(1);
      }

      100% {
        opacity: 1;
        filter: brightness(1) drop-shadow(0 0 50px rgba(80, 160, 255, 0.5));
        transform: translate(-50%, -50%) scale(1);
      }
    }

    .freeze-flare {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 0;
      height: 2px;
      background: radial-gradient(ellipse at center, rgba(80, 160, 255, 0.9) 0%, rgba(40, 100, 255, 0.4) 40%, transparent 70%);
      box-shadow: 0 0 30px 10px rgba(60, 140, 255, 0.5), 0 0 80px 20px rgba(40, 100, 255, 0.3), 0 0 160px 40px rgba(30, 80, 255, 0.15);
      opacity: 0;
      pointer-events: none;
    }

    .freeze-overlay.active .freeze-flare {
      animation: flare-expand 1.2s 0.3s ease-out forwards;
    }

    @keyframes flare-expand {
      0% {
        width: 0;
        height: 2px;
        opacity: 0;
      }

      20% {
        width: 120vw;
        height: 3px;
        opacity: 1;
      }

      50% {
        width: 140vw;
        height: 4px;
        opacity: 0.8;
      }

      100% {
        width: 100vw;
        height: 2px;
        opacity: 0.2;
      }
    }

    /* ═══════════════════════════════════════════
       群予告 (月背景 + logo_a)
       ═══════════════════════════════════════════ */

    .freeze-overlay.yokoku-mode {
      background:
        radial-gradient(ellipse at 30% 55%, rgba(60, 90, 150, 0.55) 0%, rgba(10, 14, 32, 0.0) 55%),
        radial-gradient(ellipse at 70% 30%, rgba(140, 60, 120, 0.25) 0%, rgba(10, 14, 32, 0.0) 60%),
        linear-gradient(180deg, #050814 0%, #0d1230 45%, #040616 100%);
    }

    /* 星空（box-shadow で大量ドット） */
    .yokoku-stars {
      position: absolute;
      top: 0;
      left: 0;
      width: 2px;
      height: 2px;
      background: transparent;
      opacity: 0;
      animation: yokoku-stars-in 1.8s 0.1s ease-out forwards;
      box-shadow:
        12vw 8vh 0 0.5px #fff,
        25vw 14vh 0 0.5px rgba(255, 255, 255, 0.7),
        38vw 6vh 0 0.5px #fff,
        52vw 11vh 0 0.5px rgba(200, 220, 255, 0.8),
        63vw 18vh 0 0.5px #fff,
        77vw 9vh 0 0.5px rgba(255, 255, 255, 0.6),
        88vw 22vh 0 0.5px #fff,
        5vw 28vh 0 0.5px rgba(255, 255, 255, 0.5),
        18vw 34vh 0 0.5px #fff,
        31vw 40vh 0 0.5px rgba(220, 230, 255, 0.7),
        44vw 26vh 0 0.5px #fff,
        56vw 44vh 0 0.5px rgba(255, 255, 255, 0.8),
        72vw 38vh 0 0.5px rgba(180, 200, 255, 0.6),
        85vw 48vh 0 0.5px #fff,
        95vw 32vh 0 0.5px rgba(255, 255, 255, 0.5),
        8vw 52vh 0 0.5px #fff,
        22vw 58vh 0 0.5px rgba(255, 255, 255, 0.7),
        36vw 68vh 0 0.5px rgba(200, 220, 255, 0.8),
        49vw 56vh 0 0.5px #fff,
        62vw 72vh 0 0.5px rgba(255, 255, 255, 0.6),
        78vw 64vh 0 0.5px #fff,
        91vw 78vh 0 0.5px rgba(220, 230, 255, 0.5),
        3vw 82vh 0 0.5px #fff,
        15vw 88vh 0 0.5px rgba(255, 255, 255, 0.7),
        28vw 76vh 0 0.5px rgba(180, 200, 255, 0.8),
        41vw 92vh 0 0.5px #fff,
        55vw 84vh 0 0.5px rgba(255, 255, 255, 0.6),
        68vw 95vh 0 0.5px #fff,
        82vw 90vh 0 0.5px rgba(200, 220, 255, 0.5),
        94vw 62vh 0 0.5px #fff,
        10vw 16vh 0 1px #fff,
        33vw 50vh 0 1px #fff,
        60vw 80vh 0 1px #fff,
        75vw 25vh 0 1px rgba(255, 255, 255, 0.9),
        20vw 70vh 0 1px #fff;
    }

    @keyframes yokoku-stars-in {
      0% {
        opacity: 0;
      }

      100% {
        opacity: 1;
      }
    }

    /* 月本体（画面中央に大きく配置） */
    .yokoku-moon {
      position: absolute;
      top: 50%;
      left: 50%;
      width: clamp(320px, 85vmin, 780px);
      height: clamp(320px, 85vmin, 780px);
      border-radius: 50%;
      background:
        radial-gradient(circle at 32% 30%,
          #eaf2ff 0%,
          #bcd2ef 18%,
          #6e93c7 42%,
          #2f5490 70%,
          #0f1f44 100%);
      box-shadow:
        0 0 80px 15px rgba(120, 170, 240, 0.45),
        0 0 200px 60px rgba(70, 130, 220, 0.3),
        inset -30px -40px 100px rgba(0, 10, 30, 0.5);
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.4);
      filter: blur(8px);
      animation: yokoku-moon-in 1.6s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
      z-index: 1;
    }

    /* 月のクレーター */
    .yokoku-moon::before,
    .yokoku-moon::after {
      content: '';
      position: absolute;
      border-radius: 50%;
      background: radial-gradient(circle at 40% 40%, rgba(20, 40, 80, 0.55), rgba(50, 80, 130, 0.15));
      box-shadow: inset 2px 3px 4px rgba(0, 10, 30, 0.35);
    }

    .yokoku-moon::before {
      width: 14%;
      height: 14%;
      top: 22%;
      left: 58%;
    }

    .yokoku-moon::after {
      width: 9%;
      height: 9%;
      top: 62%;
      left: 28%;
    }

    @keyframes yokoku-moon-in {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.4);
        filter: blur(10px);
      }

      60% {
        opacity: 1;
        filter: blur(0);
      }

      100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        filter: blur(0);
      }
    }

    /* logo_a — 月の右下寄りに重ねて配置 */
    .yokoku-chara {
      position: absolute;
      top: 62%;
      left: 60%;
      width: clamp(220px, 55vmin, 500px);
      height: auto;
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.55) rotate(6deg);
      filter: drop-shadow(0 16px 36px rgba(80, 160, 255, 0.0)) brightness(0.35);
      animation: yokoku-chara-in 1.8s 1.2s cubic-bezier(0.18, 0.8, 0.22, 1) forwards;
      pointer-events: none;
      z-index: 3;
    }

    @keyframes yokoku-chara-in {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.55) rotate(6deg);
        filter: drop-shadow(0 16px 36px rgba(80, 160, 255, 0)) brightness(0.35);
      }

      40% {
        opacity: 1;
      }

      100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        filter: drop-shadow(0 16px 36px rgba(120, 190, 255, 0.65)) brightness(1);
      }
    }

    /* logo_a 背後のオーラ（右下寄り / 月とキャラの中間レイヤ） */
    .yokoku-aura {
      position: absolute;
      top: 62%;
      left: 60%;
      width: clamp(280px, 70vmin, 620px);
      height: clamp(280px, 70vmin, 620px);
      border-radius: 50%;
      background: radial-gradient(circle,
          rgba(150, 210, 255, 0.35) 0%,
          rgba(90, 150, 230, 0.18) 40%,
          rgba(40, 80, 160, 0.0) 70%);
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.6);
      animation: yokoku-aura-in 1.4s 1.4s ease-out forwards;
      pointer-events: none;
      z-index: 2;
      mix-blend-mode: screen;
    }

    @keyframes yokoku-aura-in {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.6);
      }

      100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
      }
    }

    /* 群予告タイトル */
    .yokoku-title {
      position: absolute;
      top: 12%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: #fff;
      font-family: 'Inter', 'Noto Sans JP', system-ui, sans-serif;
      font-weight: 700;
      font-size: clamp(16px, 4.2vw, 30px);
      letter-spacing: 0.08em;
      text-align: center;
      text-shadow:
        0 0 10px rgba(150, 210, 255, 0.9),
        0 0 24px rgba(80, 160, 255, 0.55),
        0 2px 6px rgba(0, 10, 30, 0.7);
      opacity: 0;
      animation: yokoku-title-in 1.2s 0.8s ease-out forwards;
      pointer-events: none;
      z-index: 4;
      max-width: 92vw;
      white-space: nowrap;
    }

    @keyframes yokoku-title-in {
      0% {
        opacity: 0;
        transform: translate(-50%, -30%) scale(1.15);
        letter-spacing: 0.35em;
      }

      60% {
        opacity: 1;
      }

      100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        letter-spacing: 0.08em;
      }
    }

    /* ── Tab Bar ── */
    .tab-bar {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: calc(var(--tab-height) + var(--safe-bottom));
      padding-bottom: var(--safe-bottom);
      background: #fff;
      display: flex;
      border-top: 1px solid var(--border);
      z-index: 100;
      box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    }

    .tab-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
      cursor: pointer;
      color: var(--text-light);
      transition: color 0.2s;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
      /* button/a の既定スタイル解除 */
      background: transparent;
      border: none;
      padding: 0;
      margin: 0;
      font: inherit;
      text-decoration: none;
    }

    .tab-item.active {
      color: var(--accent);
    }

    .tab-item.active .tab-indicator {
      position: absolute;
      top: 0;
      left: 20%;
      right: 20%;
      height: 2.5px;
      background: var(--accent);
      border-radius: 0 0 2px 2px;
    }

    .tab-icon {
      font-size: 20px;
      position: relative;
    }

    .tab-label {
      font-size: 10px;
      font-weight: 600;
      font-family: 'Inter', sans-serif;
      letter-spacing: 0.5px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      text-align: center;
    }

    /* 長いラベル（メインスケジュール / トーナメントリスト）は少しだけ小さく */
    .tab-item[aria-label="メインスケジュール"] .tab-label,
    .tab-item[aria-label="トーナメントリスト"] .tab-label {
      font-size: 9px;
      letter-spacing: 0;
    }

    .tab-svg-icon {
      width: 22px;
      height: 22px;
      object-fit: contain;
      display: block;
      opacity: 0.45;
      transition: opacity 0.2s;
    }

    .tab-item.active .tab-svg-icon {
      opacity: 1;
    }

    /* ── Page Container ── */
    main {
      min-height: 100vh;
    }

    .page {
      display: none;
      animation: pageFadeIn 0.3s ease;
    }

    .page.active {
      display: block;
    }

    @keyframes pageFadeIn {
      from {
        opacity: 0;
        transform: translateY(8px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* ── Banner Slider ── */
    .banner-slider {
      position: relative;
      background: #000;
      overflow: hidden;
      line-height: 0;
    }

    .banner-track {
      display: flex;
      will-change: transform;
    }

    .banner-slide {
      flex: 0 0 100%;
      width: 100%;
      aspect-ratio: 3 / 2;
      background: #000;
    }

    .banner-slide img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .banner-dots {
      position: absolute;
      bottom: 8px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 6px;
      line-height: 1;
    }

    .banner-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.4);
      transition: background 0.2s, transform 0.2s;
    }

    .banner-dot.active {
      background: #fff;
      transform: scale(1.3);
    }

    /* ── Promo Strip ── */
    .promo-strip {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      margin: 12px 16px 0;
      padding: 12px 16px;
      background: #f5c800;
      border-radius: 10px;
      text-decoration: none;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: opacity 0.15s;
    }

    .promo-strip:active {
      opacity: 0.8;
    }

    .promo-strip-text {
      font-size: 14px;
      font-weight: 700;
      color: #0a1929;
      letter-spacing: 0.5px;
    }

    .promo-strip-arrow {
      font-size: 18px;
      font-weight: 700;
      color: #0a1929;
      line-height: 1;
    }

    /* ── Day Tabs ── */
    .day-tabs {
      display: flex;
      background: #fff;
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: var(--header-height);
      z-index: 50;
    }

    .day-tab {
      flex: 1;
      padding: 10px 4px;
      text-align: center;
      cursor: pointer;
      border-bottom: 2.5px solid transparent;
      transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
      user-select: none;
      position: relative;
      /* 非アクティブ: 浮き上がり（凸） */
      background: linear-gradient(180deg, #fff 0%, #f4f5f7 100%);
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    .day-tab:active {
      /* 押し込み（凹） */
      background: linear-gradient(180deg, #ecedf0 0%, #f4f5f7 100%);
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
      transform: scale(0.97);
    }

    .day-tab.active {
      border-bottom-color: var(--accent);
      /* 選択中: 沈み込み（凹） */
      background: linear-gradient(180deg, #fdf0f3 0%, #fff5f7 100%);
      box-shadow: inset 0 2px 6px rgba(233, 69, 96, 0.12), inset 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    .day-tab .day-date {
      font-family: 'Inter', sans-serif;
      font-size: 15px;
      font-weight: 700;
      color: var(--text-light);
    }

    .day-tab.active .day-date {
      color: var(--text);
    }

    .day-tab .day-name {
      font-family: 'Inter', sans-serif;
      font-size: 10px;
      font-weight: 600;
      color: var(--text-light);
      text-transform: uppercase;
    }

    .day-tab.active .day-name {
      color: var(--accent);
    }

    .day-suit {
      font-size: 14px;
      line-height: 1;
      margin-bottom: 2px;
      display: block;
    }

    .day-tab+.day-tab {
      border-left: 1px solid var(--border);
    }

    /* ALL view: day divider */
    .all-day-divider {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 16px 16px 6px;
      margin-top: 4px;
    }

    .all-day-divider:first-child {
      margin-top: 0;
    }

    .all-day-suit {
      font-size: 16px;
      line-height: 1;
    }

    .all-day-label {
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      letter-spacing: 0.5px;
    }

    /* ── Section Title ── */
    .section-header {
      padding: 20px 16px 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .section-header .section-icon {
      width: 28px;
      height: 28px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      color: #fff;
      flex-shrink: 0;
    }

    .section-header h2 {
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 1px;
      color: var(--text);
      text-transform: uppercase;
    }

    .section-header .event-count {
      font-size: 11px;
      color: var(--text-light);
      font-weight: 400;
      margin-left: auto;
    }

    /* ── Tournament Card ── */
    .card-list {
      padding: 0 12px 16px;
    }

    /* スケジュール最下部: 過去プレイヤーズガイド (PDF) への外部リンク（ピル型） */
    .past-pg-section {
      padding: 4px 16px 28px;
      display: flex;
      justify-content: center;
    }

    .past-pg-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      max-width: 360px;
      padding: 14px 24px;
      background: var(--gold);
      color: var(--primary);
      border-radius: 9999px;
      text-decoration: none;
      font-size: 14px;
      font-weight: 800;
      letter-spacing: 0.2px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
      transition: transform 0.1s, opacity 0.15s;
      -webkit-tap-highlight-color: transparent;
    }

    .past-pg-link:active {
      transform: scale(0.97);
      opacity: 0.88;
    }

    .past-pg-arrow {
      font-size: 14px;
      font-weight: 700;
      line-height: 1;
    }

    .tournament-card {
      background: #fff;
      border-radius: 14px;
      margin-bottom: 12px;
      overflow: hidden;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
      border: 1px solid var(--border);
      transition: transform 0.15s;
    }

    .tournament-card:active {
      transform: scale(0.985);
    }

    .card-top {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      border-bottom: 1px solid var(--border);
    }

    .card-num {
      font-family: 'Press Start 2P', monospace;
      font-size: 9px;
      color: var(--accent);
      background: var(--accent-light);
      padding: 4px 8px;
      border-radius: 6px;
      white-space: nowrap;
    }

    .card-name {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      flex: 1;
    }

    .card-badges {
      display: flex;
      gap: 6px;
    }

    .card-badge {
      font-size: 9px;
      font-weight: 700;
      padding: 3px 7px;
      border-radius: 4px;
      font-family: 'Inter', sans-serif;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }

    .badge-open {
      background: var(--green-light);
      color: var(--green);
    }

    .badge-closed {
      background: #fef2f2;
      color: #dc2626;
    }

    .badge-ticket {
      background: var(--gold-light);
      color: #92700c;
    }

    .badge-live {
      background: var(--accent);
      color: #fff;
    }

    .card-body {
      padding: 12px 14px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .card-info-item {}

    .card-info-label {
      font-size: 10px;
      color: var(--text-light);
      font-family: 'Inter', sans-serif;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .card-info-value {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      margin-top: 1px;
    }

    .card-info-sub {
      font-size: 11px;
      font-weight: 500;
      color: var(--text-muted);
      margin-top: 2px;
      letter-spacing: 0;
    }

    /* ── Filter Bar ── */
    .filter-bar {
      background: var(--surface-alt);
      border-bottom: 1px solid var(--border);
      padding: 10px 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .filter-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .filter-label {
      font-family: 'Inter', sans-serif;
      font-size: 9px;
      font-weight: 700;
      color: var(--text-light);
      letter-spacing: 1px;
      text-transform: uppercase;
      flex-shrink: 0;
      width: 36px;
    }

    .filter-chips {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    .filter-chip {
      padding: 8px 14px;
      min-height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 20px;
      border: 1.5px solid var(--border);
      background: #fff;
      font-family: 'Inter', sans-serif;
      font-size: 11px;
      font-weight: 600;
      color: var(--text-secondary);
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
      transition: background 0.15s, color 0.15s, border-color 0.15s;
      white-space: nowrap;
    }

    /* GAME chips active */
    .filter-chip.fc-nlh.active {
      background: #dbeafe;
      color: #1d4ed8;
      border-color: #1d4ed8;
    }

    .filter-chip.fc-mix.active {
      background: var(--green-light);
      color: var(--green);
      border-color: var(--green);
    }

    .filter-chip.fc-sate.active {
      background: var(--gold-light);
      color: #92700c;
      border-color: #92700c;
    }

    /* PRICE chips active */
    .filter-chip.fc-price.active {
      background: var(--accent-light);
      color: var(--accent);
      border-color: var(--accent);
    }

    /* フィルター適用中の件数バナー */
    .filter-result-bar {
      padding: 6px 16px;
      background: var(--blue-light);
      font-size: 11px;
      font-weight: 600;
      color: var(--blue);
      font-family: 'Inter', sans-serif;
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .filter-result-bar.visible {
      display: flex;
    }

    .filter-clear-btn {
      font-family: 'Inter', sans-serif;
      font-size: 11px;
      font-weight: 700;
      color: var(--blue);
      background: #fff;
      border: 1px solid var(--blue);
      border-radius: 14px;
      padding: 4px 12px 4px 8px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      min-height: 28px;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
      transition: background .12s, color .12s;
    }

    .filter-clear-btn:hover {
      background: var(--blue);
      color: #fff;
    }

    .filter-clear-btn:active {
      transform: scale(.96);
    }

    .filter-clear-btn::before {
      content: '✕';
      font-size: 10px;
      line-height: 1;
    }

    /* GAME タグ */
    .card-game-tag {
      display: inline-block;
      font-size: 9px;
      font-weight: 700;
      font-family: 'Inter', sans-serif;
      letter-spacing: 0.8px;
      padding: 3px 8px;
      border-radius: 4px;
      text-transform: uppercase;
      flex-shrink: 0;
    }

    .game-nlh {
      background: #dbeafe;
      color: #1d4ed8;
    }

    .game-sate {
      background: var(--gold-light);
      color: #92700c;
    }

    .game-mix {
      background: var(--green-light);
      color: var(--green);
    }

    .card-winner {
      margin: 0 14px 12px;
      background: linear-gradient(135deg, var(--primary), var(--blue));
      border-radius: 10px;
      padding: 10px 14px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .card-winner .trophy {
      font-size: 18px;
    }

    .card-winner .cw-label {
      font-size: 9px;
      color: var(--gold);
      font-family: 'Inter', sans-serif;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .card-winner .cw-name {
      font-size: 14px;
      color: #fff;
      font-weight: 700;
    }

    /* X / Gallery tabs → external links (no in-app pages) */

    /* ── Modal ── */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.72);
      z-index: 200;
      align-items: flex-end;
      justify-content: center;
    }

    .modal-overlay.active {
      display: flex;
    }

    .modal-content {
      background: #fff;
      border-radius: 20px 20px 0 0;
      width: 100%;
      max-width: 430px;
      max-height: 88vh;
      overflow-y: auto;
      animation: modalSlideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
      position: relative;
      touch-action: pan-y;
      will-change: transform;
    }

    .modal-content.is-dragging {
      transition: none !important;
      animation: none !important;
    }

    .modal-content.is-closing {
      transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
      animation: none !important;
    }

    @keyframes modalSlideUp {
      from {
        transform: translateY(100%);
      }

      to {
        transform: translateY(0);
      }
    }

    /* スワイプダウンで閉じるためのハンドル（モーダル上端） */
    .modal-handle {
      display: block;
      position: sticky;
      top: 0;
      width: 100%;
      height: 18px;
      background: var(--primary);
      z-index: 5;
      cursor: grab;
      touch-action: none;
    }

    .modal-handle::before {
      content: '';
      position: absolute;
      top: 7px;
      left: 50%;
      transform: translateX(-50%);
      width: 44px;
      height: 4px;
      border-radius: 2px;
      background: rgba(255, 255, 255, 0.45);
    }

    .modal-handle:active {
      cursor: grabbing;
    }

    /* モーダルヘッダー */
    .modal-header {
      background: var(--primary);
      padding: 20px 48px 18px 16px;
      display: flex;
      align-items: flex-start;
      gap: 12px;
      position: relative;
    }

    /* 閉じるボタン（右上） */
    .modal-close-x {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 32px;
      height: 32px;
      background: rgba(255, 255, 255, 0.15);
      border: none;
      border-radius: 50%;
      color: #fff;
      font-size: 18px;
      line-height: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }

    .modal-header .mh-num {
      font-family: 'Press Start 2P', monospace;
      font-size: 9px;
      color: var(--accent);
      background: rgba(233, 69, 96, 0.18);
      padding: 5px 8px;
      border-radius: 6px;
      flex-shrink: 0;
      margin-top: 2px;
    }

    .modal-header .mh-info {
      flex: 1;
    }

    .modal-header .mh-name {
      font-size: 18px;
      font-weight: 800;
      color: #fff;
      line-height: 1.3;
    }

    .modal-header .mh-badge {
      margin-top: 8px;
    }

    /* モーダル本文 */
    .modal-body {
      padding: 0 16px calc(24px + var(--safe-bottom));
    }

    .modal-section {
      padding: 18px 0;
      border-bottom: 1px solid var(--border);
    }

    .modal-section:last-child {
      border-bottom: none;
    }

    .modal-section-title {
      font-family: 'Press Start 2P', monospace;
      font-size: 9px;
      color: var(--accent);
      letter-spacing: 1px;
      margin-bottom: 14px;
      text-transform: uppercase;
    }

    .modal-info-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .modal-info-item .mi-label {
      font-size: 10px;
      color: var(--text-light);
      font-family: 'Inter', sans-serif;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .modal-info-item .mi-value {
      font-size: 18px;
      font-weight: 800;
      color: var(--text);
      margin-top: 3px;
    }

    .modal-info-item .mi-value-sub {
      font-size: 12px;
      font-weight: 500;
      color: var(--text-muted);
      margin-top: 4px;
      letter-spacing: 0;
    }

    /* プレイヤーズガイド: ピンチズーム対応 */
    .pg-zoomer {
      position: relative;
      overflow: hidden;
      border-radius: 10px;
      background: #f1f5f9;
      touch-action: pan-y;
      -webkit-user-select: none;
      user-select: none;
    }

    .pg-zoomer+.pg-zoomer {
      margin-top: 10px;
    }

    .pg-zoomer.is-zoomed {
      touch-action: none;
    }

    .pg-zoomer .pg-img {
      display: block;
      width: 100%;
      height: auto;
      transform-origin: 0 0;
      transform: translate(0, 0) scale(1);
      -webkit-user-drag: none;
      -webkit-touch-callout: none;
      pointer-events: auto;
      will-change: transform;
    }

    /* ズーム可能を示す右下バッジ（ズーム中は自動的に非表示） */
    .pg-zoomer::after {
      content: "🔍 ピンチで拡大";
      position: absolute;
      right: 8px;
      bottom: 8px;
      background: rgba(17, 24, 39, 0.62);
      color: rgba(255, 255, 255, 0.95);
      font-size: 10px;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 999px;
      pointer-events: none;
      letter-spacing: 0.02em;
      -webkit-backdrop-filter: blur(4px);
      backdrop-filter: blur(4px);
      transition: opacity 0.2s ease;
      z-index: 1;
      line-height: 1.4;
    }

    .pg-zoomer.is-zoomed::after {
      opacity: 0;
    }

    /* 初回のみ表示されるピンチズームの案内トースト */
    .pg-zoom-hint-toast {
      position: fixed;
      left: 50%;
      top: calc(env(safe-area-inset-top, 0px) + 16px);
      transform: translate(-50%, -16px);
      background: rgba(17, 24, 39, 0.92);
      color: #fff;
      font-size: 13px;
      font-weight: 600;
      padding: 10px 16px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
      opacity: 0;
      transition: opacity 0.28s ease, transform 0.28s ease;
      z-index: 500;
      pointer-events: none;
    }

    .pg-zoom-hint-toast.visible {
      opacity: 1;
      transform: translate(-50%, 0);
    }

    /* カードをタップ可能に */
    .tournament-card {
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
      transition: transform 0.12s, box-shadow 0.12s;
    }

    .tournament-card:active {
      transform: scale(0.97);
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    /* イベントリスト切替フェード */
    #card-list-wrap {
      transition: opacity 0.16s ease;
      will-change: opacity;
      position: relative;
    }

    #card-list-wrap.fading {
      opacity: 0;
    }

    /* ── Skeleton UI ── */
    @keyframes skeleton-shimmer {
      0% {
        background-position: -200% 0;
      }

      100% {
        background-position: 200% 0;
      }
    }

    .skeleton {
      background: linear-gradient(90deg,
          rgba(0, 0, 0, .06) 0%,
          rgba(0, 0, 0, .12) 50%,
          rgba(0, 0, 0, .06) 100%);
      background-size: 200% 100%;
      animation: skeleton-shimmer 1.4s ease-in-out infinite;
      border-radius: 6px;
      color: transparent !important;
      user-select: none;
      pointer-events: none;
    }

    .skeleton-card {
      background: #fff;
      border-radius: 12px;
      padding: 16px 14px;
      margin-bottom: 8px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
      display: flex;
      gap: 12px;
      align-items: flex-start;
    }

    .skeleton-card .sk-num {
      width: 32px;
      height: 32px;
      border-radius: 6px;
      flex-shrink: 0;
    }

    .skeleton-card .sk-body {
      flex: 1 1 auto;
    }

    .skeleton-card .sk-line {
      height: 14px;
      margin-bottom: 8px;
      border-radius: 4px;
    }

    .skeleton-card .sk-line-w80 {
      width: 80%;
    }

    .skeleton-card .sk-line-w60 {
      width: 60%;
    }

    .skeleton-card .sk-line-w40 {
      width: 40%;
      height: 11px;
    }

    .skeleton-list {
      padding: 4px 0;
    }

    @media (prefers-reduced-motion: reduce) {
      .skeleton {
        animation: none;
      }
    }

    /* 画像ロード前プレースホルダ */
    img.img-loading {
      background: linear-gradient(90deg,
          rgba(21, 51, 100, .08) 0%,
          rgba(21, 51, 100, .16) 50%,
          rgba(21, 51, 100, .08) 100%);
      background-size: 200% 100%;
      animation: skeleton-shimmer 1.4s ease-in-out infinite;
    }

    /* ── Bookmark Star Button ── */
    .card-bookmark-btn {
      background: none;
      border: none;
      padding: 8px;
      min-width: 44px;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      line-height: 1;
      cursor: pointer;
      flex-shrink: 0;
      color: #d1d5db;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
      transition: color 0.15s, transform 0.15s;
    }

    .card-bookmark-btn.bookmarked {
      color: var(--gold);
    }

    .card-bookmark-btn:active {
      transform: scale(1.3);
    }

    .card-bookmark-btn.bm-pop {
      animation: bm-pop .38s cubic-bezier(.34, 1.56, .64, 1);
    }

    @keyframes bm-pop {
      0% {
        transform: scale(1);
      }

      30% {
        transform: scale(1.45) rotate(-14deg);
      }

      60% {
        transform: scale(.9) rotate(6deg);
      }

      100% {
        transform: scale(1) rotate(0deg);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .card-bookmark-btn.bm-pop {
        animation: none;
      }
    }

    /* ── Bookmark Tab Badge ── */
    .tab-badge {
      position: absolute;
      top: 4px;
      right: 50%;
      transform: translateX(calc(50% + 8px));
      background: var(--accent);
      color: #fff;
      font-size: 9px;
      font-weight: 700;
      min-width: 16px;
      height: 16px;
      border-radius: 8px;
      padding: 0 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Inter', sans-serif;
      pointer-events: none;
    }

    .tab-icon {
      position: relative;
      display: inline-block;
    }

    /* ── Bookmark Page ── */
    .bm-page-header {
      background: var(--primary);
      padding: 28px 20px 20px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .bm-page-header .bm-icon {
      font-size: 24px;
    }

    .bm-page-header h1 {
      font-family: 'Press Start 2P', monospace;
      font-size: 12px;
      color: #fff;
      letter-spacing: 2px;
    }

    .bm-page-header .bm-count {
      margin-left: auto;
      font-size: 11px;
      color: rgba(255, 255, 255, 0.5);
      font-family: 'Inter', sans-serif;
    }

    .bm-day-group {
      padding: 16px 12px 0;
    }

    .bm-day-label {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 10px;
    }

    .bm-day-label .bm-suit {
      width: 26px;
      height: 26px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      color: #fff;
      flex-shrink: 0;
    }

    .bm-day-label span {
      font-family: 'Inter', sans-serif;
      font-size: 12px;
      font-weight: 700;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .bm-empty {
      text-align: center;
      padding: 80px 20px 40px;
      color: var(--text-light);
    }

    .bm-empty .bm-empty-icon {
      font-size: 52px;
      margin-bottom: 14px;
    }

    .bm-empty p {
      font-size: 14px;
      line-height: 1.7;
    }


    /* ── Main Schedule Page ── */
    .ms-page-header {
      background: var(--primary);
      padding: 28px 20px 20px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .ms-page-header .ms-icon {
      font-size: 24px;
    }

    .ms-page-header h1 {
      font-family: 'Press Start 2P', monospace;
      font-size: 12px;
      color: #fff;
      letter-spacing: 2px;
    }

    .ms-page-header .ms-count {
      margin-left: auto;
      font-size: 11px;
      color: rgba(255, 255, 255, 0.5);
      font-family: 'Inter', sans-serif;
    }

    .ms-lead {
      padding: 14px 16px 4px;
      font-size: 12px;
      line-height: 1.6;
      color: var(--text-secondary);
    }

    /* ── カードリスト ── */
    .ms-list-wrap {
      padding: 8px 16px 24px;
    }

    .ms-day-group {
      margin-top: 18px;
    }

    .ms-day-group:first-child {
      margin-top: 0;
    }

    .ms-day-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      padding-bottom: 8px;
      margin-bottom: 10px;
      border-bottom: 2px solid var(--border);
    }

    .ms-day-date {
      font-family: 'Inter', sans-serif;
      font-size: 18px;
      font-weight: 800;
      color: var(--primary);
      letter-spacing: 0.3px;
    }

    .ms-day-dow {
      margin-left: 8px;
      font-family: 'Inter', sans-serif;
      font-size: 11px;
      font-weight: 700;
      color: var(--accent);
      letter-spacing: 1px;
    }

    .ms-day-count {
      font-family: 'Inter', sans-serif;
      font-size: 11px;
      color: var(--text-secondary);
      letter-spacing: 0.3px;
    }

    .ms-card {
      display: flex;
      align-items: stretch;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
      margin-bottom: 8px;
      cursor: pointer;
      overflow: hidden;
      transition: transform 0.1s ease, box-shadow 0.12s ease, background-color 0.12s ease;
      -webkit-tap-highlight-color: transparent;
    }

    .ms-card:last-child {
      margin-bottom: 0;
    }

    .ms-card:hover {
      background-color: rgba(20, 50, 100, 0.035);
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    }

    .ms-card:active {
      transform: scale(0.985);
      background-color: rgba(20, 50, 100, 0.07);
    }

    .ms-card-time {
      flex: 0 0 auto;
      width: 68px;
      padding: 12px 8px 12px 14px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
    }

    .ms-time-main {
      font-family: 'Inter', sans-serif;
      font-size: 16px;
      font-weight: 800;
      color: var(--text);
      line-height: 1.1;
    }

    .ms-time-main.is-empty {
      color: var(--text-secondary);
      opacity: 0.5;
    }

    .ms-time-label {
      font-family: 'Inter', sans-serif;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 1.5px;
      color: var(--text-secondary);
      margin-top: 4px;
    }

    .ms-card-body {
      flex: 1 1 auto;
      min-width: 0;
      padding: 12px 14px;
      border-left: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .ms-card-venue-name {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      line-height: 1.35;
      word-break: normal;
      overflow-wrap: break-word;
    }

    .ms-card-station {
      margin-top: 4px;
      font-size: 11px;
      color: var(--text-secondary);
      line-height: 1.3;
    }

    /* ── 会場詳細モーダル（中央表示） ── */
    .ms-modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.72);
      z-index: 250;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }

    .ms-modal-overlay.active {
      display: flex;
    }

    .ms-modal-card {
      background: #fff;
      border-radius: 20px;
      width: 100%;
      max-width: 360px;
      max-height: 88vh;
      overflow-y: auto;
      position: relative;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
      animation: msModalPop 0.22s cubic-bezier(0.32, 0.72, 0, 1);
    }

    @keyframes msModalPop {
      from {
        transform: scale(0.92);
        opacity: 0;
      }

      to {
        transform: scale(1);
        opacity: 1;
      }
    }

    .ms-modal-header {
      background: var(--primary);
      color: #fff;
      padding: 18px 52px 16px 20px;
      position: relative;
      border-radius: 20px 20px 0 0;
    }

    .ms-modal-venue {
      font-size: 16px;
      font-weight: 700;
      line-height: 1.35;
      word-break: break-word;
    }

    .ms-modal-close {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 32px;
      height: 32px;
      border-radius: 16px;
      border: none;
      background: rgba(255, 255, 255, 0.18);
      color: #fff;
      font-size: 15px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      line-height: 1;
    }

    .ms-modal-close:hover {
      background: rgba(255, 255, 255, 0.28);
    }

    .ms-modal-body {
      padding: 18px 20px 22px;
      display: grid;
      grid-template-columns: 88px 1fr;
      column-gap: 14px;
      row-gap: 12px;
    }

    .ms-modal-label {
      font-size: 12px;
      font-weight: 700;
      color: var(--text-secondary);
      letter-spacing: 0.3px;
      padding-top: 2px;
    }

    .ms-modal-value {
      font-size: 14px;
      color: var(--text);
      word-break: break-word;
      line-height: 1.5;
    }

    .ms-modal-value.en {
      font-family: 'Inter', sans-serif;
      font-weight: 600;
    }

    .ms-modal-value.is-placeholder {
      color: var(--text-secondary);
      opacity: 0.6;
    }

    /* X アカウントのリンク表示 */
    .ms-modal-x-link {
      color: var(--accent);
      text-decoration: none;
      font-weight: 600;
      border-bottom: 1px solid rgba(233, 69, 96, 0.35);
      padding-bottom: 1px;
      transition: opacity 0.12s ease, border-color 0.12s ease;
    }

    .ms-modal-x-link:hover {
      opacity: 0.85;
      border-bottom-color: var(--accent);
    }

    .ms-modal-x-link:active {
      opacity: 0.7;
    }

    /* 住所 + 経路ボタン行 */
    .ms-modal-address-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .ms-modal-address-text {
      flex: 1 1 auto;
      min-width: 0;
      word-break: break-word;
    }

    .ms-modal-address-text.is-placeholder {
      color: var(--text-secondary);
      opacity: 0.6;
    }

    .ms-modal-route-btn {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 7px 14px;
      border-radius: 999px;
      border: none;
      background: var(--accent);
      color: #fff;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.3px;
      cursor: pointer;
      white-space: nowrap;
      text-decoration: none;
      transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
      box-shadow: 0 2px 6px rgba(233, 69, 96, 0.28);
    }

    .ms-modal-route-btn:hover {
      opacity: 0.92;
      box-shadow: 0 3px 10px rgba(233, 69, 96, 0.38);
    }

    .ms-modal-route-btn:active {
      transform: translateY(1px);
    }

    /* 狭幅端末での微調整 */
    @media (max-width: 360px) {
      .ms-list-wrap {
        padding: 8px 12px 24px;
      }

      .ms-day-date {
        font-size: 16px;
      }

      .ms-card-time {
        width: 60px;
        padding: 10px 6px 10px 12px;
      }

      .ms-time-main {
        font-size: 15px;
      }

      .ms-card-body {
        padding: 10px 12px;
      }

      .ms-card-venue-name {
        font-size: 12.5px;
      }
    }

    /* PC（サイドバー表示時）の調整 */
    @media (min-width: 960px) {
      .ms-lead {
        font-size: 13px;
      }
    }


    /* ── Lucky Hand Section ── */
    .lucky-inner-card {
      background: #fff;
      border-radius: 14px;
      padding: 28px 16px 24px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
    }

    .lucky-card-area {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
      width: 100%;
    }

    .lucky-cards-row {
      display: flex;
      gap: 16px;
      justify-content: center;
    }

    .playing-card {
      width: 80px;
      height: 116px;
      border-radius: 8px;
      perspective: 700px;
      cursor: pointer;
      filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45));
    }

    .playing-card-inner {
      width: 100%;
      height: 100%;
      position: relative;
      transform-style: preserve-3d;
      transition: transform .65s cubic-bezier(.4, 0, .2, 1);
    }

    .playing-card.flipped .playing-card-inner {
      transform: rotateY(180deg);
    }

    .playing-card-front,
    .playing-card-back {
      position: absolute;
      inset: 0;
      border-radius: 8px;
      backface-visibility: hidden;
      -webkit-backface-visibility: hidden;
    }

    /* ── カード裏面（クラシックバイシクル風） ── */
    .playing-card-back {
      background: #1a56a0;
      overflow: hidden;
    }

    .playing-card-back::before {
      content: '';
      position: absolute;
      inset: 5px;
      border: 2px solid rgba(255, 255, 255, .55);
      border-radius: 4px;
    }

    .playing-card-back::after {
      content: '';
      position: absolute;
      inset: 0;
      background-image:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0, rgba(255, 255, 255, .07) 1px, transparent 0, transparent 50%),
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, .07) 0, rgba(255, 255, 255, .07) 1px, transparent 0, transparent 50%);
      background-size: 8px 8px;
    }

    /* ── カード表面（クラシックスタンダード） ── */
    .playing-card-front {
      background: #fff;
      transform: rotateY(180deg);
      border: 1px solid #bbb;
      box-sizing: border-box;
      overflow: hidden;
    }

    .card-corner {
      position: absolute;
      display: flex;
      flex-direction: column;
      align-items: center;
      line-height: 1;
      gap: 0px;
      padding: 4px;
    }

    .card-corner.top {
      top: 0;
      left: 0;
    }

    .card-corner.bottom {
      bottom: 0;
      right: 0;
      transform: rotate(180deg);
    }

    .card-rank {
      font-family: Georgia, 'Times New Roman', serif;
      font-size: 18px;
      font-weight: 700;
      line-height: 1;
      letter-spacing: -1px;
    }

    .card-suit-sm {
      font-size: 12px;
      line-height: 1.1;
    }

    .card-suit-center {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-size: 40px;
      line-height: 1;
    }

    .card-red {
      color: #c8102e;
    }

    .card-black {
      color: #000;
    }

    .lucky-draw-btn {
      background: var(--gold);
      color: var(--primary);
      border: none;
      border-radius: 24px;
      padding: 12px 32px;
      font-family: 'Inter', sans-serif;
      font-size: 14px;
      font-weight: 800;
      letter-spacing: .5px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .1s, opacity .1s;
    }

    .lucky-draw-btn:active {
      transform: scale(.95);
      opacity: .85;
    }

    .lucky-btn-row {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      width: 100%;
    }

    .lucky-share-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: #000;
      color: #fff;
      border: none;
      border-radius: 24px;
      padding: 10px 22px;
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: .3px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .1s, opacity .15s;
      box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
    }

    .lucky-share-btn img {
      width: 14px;
      height: 14px;
      object-fit: contain;
      display: block;
      filter: invert(1);
    }

    .lucky-share-btn:hover {
      opacity: .85;
    }

    .lucky-share-btn:active {
      transform: scale(.95);
      opacity: .7;
    }

    .lucky-share-btn[hidden] {
      display: none;
    }

    .lucky-result {
      text-align: center;
      min-height: 36px;
      transition: opacity .3s;
    }

    .lucky-result-msg {
      font-size: 12px;
      color: var(--text-muted);
      line-height: 1.6;
    }

    /* ── Interview Section ── */
    .interview-wrap {
      position: relative;
      margin: 0 -8px;
    }

    /* 右側のフェード：まだ続くことを暗示 */
    .interview-wrap::after {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 14px;
      width: 40px;
      background: linear-gradient(90deg, rgba(245, 245, 240, 0) 0%, rgba(245, 245, 240, .95) 100%);
      pointer-events: none;
      opacity: 1;
      transition: opacity .2s ease;
    }

    .interview-wrap.at-end::after {
      opacity: 0;
    }

    /* スクロール進捗バー */
    .interview-progress {
      position: relative;
      height: 3px;
      background: rgba(21, 51, 100, .08);
      border-radius: 2px;
      margin: 2px 14px 0;
      overflow: hidden;
    }

    .interview-progress-fill {
      position: absolute;
      left: 0;
      top: 0;
      height: 100%;
      width: 30%;
      background: linear-gradient(90deg, var(--blue), var(--gold));
      border-radius: 2px;
      transition: left .08s linear, width .08s linear;
    }

    .interview-scroll {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      overflow-y: hidden;
      scroll-snap-type: x mandatory;
      padding: 4px 8px 12px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }

    .interview-scroll::-webkit-scrollbar {
      display: none;
    }

    .interview-card {
      flex: 0 0 auto;
      width: 200px;
      background: #fff;
      border-radius: 14px;
      overflow: hidden;
      box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
      text-decoration: none;
      color: inherit;
      scroll-snap-align: start;
      display: flex;
      flex-direction: column;
      transition: transform .15s ease, box-shadow .15s ease;
      position: relative;
    }

    .interview-card:active {
      transform: scale(.97);
    }

    .interview-card-thumb {
      position: relative;
      width: 100%;
      aspect-ratio: 16 / 10;
      background: #eee center / cover no-repeat;
      overflow: hidden;
    }

    .interview-card-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .interview-card-num {
      position: absolute;
      top: 8px;
      left: 8px;
      background: #e94560;
      color: #fff;
      font-family: 'Inter', sans-serif;
      font-size: 11px;
      font-weight: 900;
      padding: 3px 8px;
      border-radius: 999px;
      letter-spacing: .05em;
      box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    }

    .interview-card-body {
      padding: 10px 12px 12px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
    }

    .interview-card-name {
      font-size: 12px;
      font-weight: 700;
      color: #111;
      line-height: 1.35;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
      min-height: calc(1.35em * 3);
    }

    .interview-card-winner {
      font-size: 11px;
      color: #666;
      margin-top: auto;
      padding-top: 4px;
      border-top: 1px solid #eee;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .interview-card-winner::before {
      content: '🏆';
      font-size: 11px;
    }

    .interview-card-arrow {
      position: absolute;
      right: 8px;
      bottom: 8px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #153364;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      line-height: 1;
      font-weight: 700;
    }

    /* ── Freeze interview card ── */
    .interview-card-freeze {
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }

    .interview-card-thumb-freeze {
      background: #0a1929;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .interview-card-thumb-freeze img {
      width: 60%;
      height: auto;
      object-fit: contain;
      filter: drop-shadow(0 0 12px rgba(80, 160, 255, 0.4));
    }

    /* ── Home Background Overlay ── */
    .home-bg-overlay {
      display: none;
    }

    /* ── Section Block（共通：色付き背景ブロック） ── */
    .section-block {
      background: #153364;
      border-radius: 20px;
      margin: 0 0 24px;
      padding: 40px 0 36px;
      position: relative;
      overflow: hidden;
    }

    .section-block-label {
      font-family: 'Inter', sans-serif;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .15em;
      color: rgba(255, 255, 255, .5);
      text-transform: uppercase;
      margin: 0 0 6px;
      padding: 0 24px;
    }

    .section-block-title {
      font-family: 'Inter', sans-serif;
      font-size: 22px;
      font-weight: 900;
      color: #fff;
      margin: 0 0 24px;
      letter-spacing: -.3px;
      padding: 0 24px;
    }

    .section-block-inner {
      padding: 0 16px;
    }

    /* ── Section rhythm（スート別アクセント） ── */
    .section-block {
      --suit-color: #f5c800;
      --suit-glyph: '♦';
    }

    .section-block.interview-section {
      --suit-color: #e94560;
      --suit-glyph: '♠';
    }

    .section-block.venue-section {
      --suit-color: #f97316;
      --suit-glyph: '♥';
    }

    .section-block.follow-section {
      --suit-color: #f5c800;
      --suit-glyph: '♦';
    }

    .section-block.lucky-section {
      --suit-color: #16a34a;
      --suit-glyph: '♣';
    }

    .section-block.games-section {
      --suit-color: #16a34a;
      --suit-glyph: '♣';
    }

    /* ── Countdown Section (Neon) ── */
    .countdown-section {
      --neon-gold: #ffd84d;
      margin: 16px 12px 8px;
      padding: 24px 14px 22px;
      border-radius: 18px;
      background: #153364;
      /* ヘッダーと同色 */
      border: 1px solid rgba(255, 216, 77, .4);
      box-shadow:
        0 8px 28px rgba(0, 0, 0, .45),
        0 0 24px rgba(255, 216, 77, .12) inset;
      position: relative;
      overflow: hidden;
      text-align: center;
    }

    /* 走査線 */
    .countdown-section::before {
      content: '';
      position: absolute;
      inset: 0;
      background-image: repeating-linear-gradient(0deg,
          rgba(255, 255, 255, 0) 0,
          rgba(255, 255, 255, 0) 2px,
          rgba(255, 216, 77, .035) 2px,
          rgba(255, 216, 77, .035) 3px);
      pointer-events: none;
    }

    /* グロー輪郭 */
    .countdown-section::after {
      content: '';
      position: absolute;
      inset: -1px;
      border-radius: 18px;
      padding: 1px;
      background: linear-gradient(135deg, rgba(255, 216, 77, .6), rgba(255, 216, 77, .15), rgba(255, 216, 77, .6));
      -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
      -webkit-mask-composite: xor;
      mask-composite: exclude;
      pointer-events: none;
      opacity: .7;
    }

    .countdown-label {
      position: relative;
      font-family: 'Inter', sans-serif;
      font-size: 10px;
      letter-spacing: 5px;
      color: var(--neon-gold);
      font-weight: 800;
      margin-bottom: 6px;
      text-shadow:
        0 0 6px rgba(255, 216, 77, .85),
        0 0 14px rgba(255, 216, 77, .6),
        0 0 28px rgba(255, 216, 77, .3);
      animation: neon-flicker 4.2s ease-in-out infinite;
    }

    .countdown-title {
      position: relative;
      font-family: 'Noto Sans JP', sans-serif;
      font-size: 13px;
      color: var(--neon-gold);
      font-weight: 600;
      margin-bottom: 16px;
      letter-spacing: 2px;
      text-shadow: 0 0 8px rgba(255, 216, 77, .4);
    }

    .countdown-grid {
      position: relative;
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
      margin: 0 auto;
      max-width: 340px;
      width: 100%;
      box-sizing: border-box;
    }

    .countdown-cell {
      position: relative;
      background: rgba(10, 22, 52, .85);
      /* ヘッダー色を少し暗めにして数字を浮かせる */
      border: 1px solid rgba(255, 216, 77, .4);
      border-radius: 10px;
      padding: 12px 4px 9px;
      box-shadow:
        0 0 12px rgba(255, 216, 77, .18),
        0 0 0 1px rgba(255, 216, 77, .08) inset;
    }

    .countdown-cell::after {
      content: '';
      position: absolute;
      top: 0;
      left: 8px;
      right: 8px;
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--neon-gold), transparent);
      opacity: .6;
    }

    .countdown-num {
      font-family: 'Inter', sans-serif;
      font-size: 30px;
      font-weight: 800;
      line-height: 1;
      color: var(--neon-gold);
      letter-spacing: -1px;
      font-variant-numeric: tabular-nums;
      text-shadow:
        0 0 6px rgba(255, 216, 77, .9),
        0 0 14px rgba(255, 216, 77, .6),
        0 0 26px rgba(255, 216, 77, .35);
    }

    .countdown-unit {
      font-family: 'Inter', sans-serif;
      font-size: 9px;
      letter-spacing: 2.5px;
      color: rgba(255, 216, 77, .75);
      margin-top: 8px;
      font-weight: 700;
      text-shadow: 0 0 6px rgba(255, 216, 77, .35);
    }

    .countdown-date {
      position: relative;
      margin-top: 16px;
      font-family: 'Inter', sans-serif;
      font-size: 11px;
      letter-spacing: 3px;
      color: var(--neon-gold);
      text-shadow: 0 0 8px rgba(255, 216, 77, .4);
    }

    .countdown-date::before,
    .countdown-date::after {
      content: '◆';
      color: var(--neon-gold);
      margin: 0 10px;
      font-size: 8px;
      vertical-align: middle;
      text-shadow: 0 0 8px var(--neon-gold);
    }

    /* LIVE 状態 — より強いゴールドの脈動 */
    .countdown-section.countdown-live .countdown-label {
      animation: neon-pulse 1.1s ease-in-out infinite;
    }

    /* 終了状態 — ミュート */
    .countdown-section.countdown-ended .countdown-num {
      color: rgba(255, 216, 77, .35);
      text-shadow: none;
    }

    .countdown-section.countdown-ended .countdown-label {
      animation: none;
      color: rgba(255, 216, 77, .55);
      text-shadow: 0 0 8px rgba(255, 216, 77, .25);
    }

    @keyframes neon-flicker {

      0%,
      92%,
      100% {
        opacity: 1;
      }

      93% {
        opacity: .55;
      }

      94% {
        opacity: 1;
      }

      95% {
        opacity: .7;
      }

      96% {
        opacity: 1;
      }
    }

    @keyframes neon-pulse {

      0%,
      100% {
        opacity: 1;
        filter: brightness(1);
      }

      50% {
        opacity: .85;
        filter: brightness(1.25);
      }
    }

    @media (prefers-reduced-motion: reduce) {

      .countdown-label,
      .countdown-section.countdown-live .countdown-label {
        animation: none;
      }
    }

    @media (min-width: 768px) {
      .countdown-section {
        margin: 20px auto 12px;
        max-width: 520px;
      }

      .countdown-num {
        font-size: 36px;
      }
    }

    /* 上部のスート色ストライプ */
    .section-block::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, transparent 0%, var(--suit-color) 25%, var(--suit-color) 75%, transparent 100%);
      opacity: .9;
      pointer-events: none;
    }

    /* 右上にうっすらスートグリフを配置してリズム感を出す */
    .section-block::after {
      content: var(--suit-glyph);
      position: absolute;
      top: 18px;
      right: 20px;
      font-size: 64px;
      line-height: 1;
      color: var(--suit-color);
      opacity: .08;
      pointer-events: none;
      font-family: 'Segoe UI Symbol', 'Apple Symbols', sans-serif;
    }

    /* ラベルをスート色で彩り、先頭にスートマーク */
    .section-block-label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--suit-color);
    }

    .section-block-label::before {
      content: var(--suit-glyph);
      font-size: 11px;
      line-height: 1;
    }

    /* セクション同士の間隔を少し広げて、各ブロックを独立した存在に */
    .section-block+.section-block {
      margin-top: 8px;
    }

    /* ============================================ */
    /* 色反転：白 → 紺 → 白 → 紺 の交互リズム        */
    /*   インタビュー : 白                            */
    /*   アクセス     : 紺                            */
    /*   フォロー     : 白                            */
    /*   ラッキー     : 紺                            */
    /* ============================================ */
    .section-block.interview-section,
    .section-block.follow-section {
      background: #f5f5f0;
      color: #111;
      box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
    }

    .section-block.interview-section .section-block-title,
    .section-block.follow-section .section-block-title {
      color: #0f2651;
    }

    .section-block.interview-section::after,
    .section-block.follow-section::after {
      opacity: .14;
    }

    /* インタビュー：白背景上で白カードが埋もれないよう、輪郭を強化 */
    .section-block.interview-section .interview-card {
      box-shadow: 0 4px 14px rgba(21, 51, 100, .18);
      border: 1px solid rgba(21, 51, 100, .08);
    }

    /* フォロー：アイコンのみのシンプル構成なので反転処理は不要 */

    /* ── Games Section（アーケード風 START GAME） ── */
    .games-cta-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
      padding: 16px 16px 12px;
    }

    .games-cta-lead {
      margin: 0;
      font-size: 12px;
      line-height: 1.6;
      color: rgba(255, 255, 255, .55);
      text-align: center;
      letter-spacing: .2px;
    }

    .games-cta-btn {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      width: 100%;
      max-width: 340px;
      min-height: 96px;
      background: var(--primary);
      color: var(--gold);
      border: 2px solid var(--gold);
      border-radius: 10px;
      padding: 14px 22px;
      font-family: 'Press Start 2P', 'Courier New', monospace;
      line-height: 1;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      box-shadow:
        inset 0 0 0 2px var(--primary),
        inset 0 0 0 4px var(--gold),
        0 0 0 1px rgba(245, 200, 0, .35),
        0 0 22px rgba(245, 200, 0, .55),
        0 0 56px rgba(245, 200, 0, .3);
      animation: gamesCtaGlow 2.6s ease-in-out infinite;
      transition: transform .12s ease;
      text-transform: uppercase;
    }

    .games-cta-btn:active {
      transform: translateY(2px) scale(.985);
      animation-play-state: paused;
    }

    .games-cta-label {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      color: var(--gold);
      letter-spacing: 3px;
      line-height: 1;
      text-shadow: 0 0 6px rgba(245, 200, 0, .4);
      flex: 1;
    }

    .games-cta-line {
      display: block;
      font-size: 20px;
      letter-spacing: 3px;
      line-height: 1;
    }

    .games-cta-arrow {
      font-size: 22px;
      color: #d7ec5e;
      line-height: 1;
      filter: drop-shadow(0 0 5px rgba(215, 236, 94, .65));
      flex-shrink: 0;
    }

    @keyframes gamesCtaGlow {

      0%,
      100% {
        box-shadow:
          inset 0 0 0 2px var(--primary),
          inset 0 0 0 4px var(--gold),
          0 0 0 1px rgba(245, 200, 0, .35),
          0 0 22px rgba(245, 200, 0, .5),
          0 0 56px rgba(245, 200, 0, .25);
      }

      50% {
        box-shadow:
          inset 0 0 0 2px var(--primary),
          inset 0 0 0 4px var(--gold),
          0 0 0 1px rgba(245, 200, 0, .55),
          0 0 34px rgba(245, 200, 0, .85),
          0 0 72px rgba(245, 200, 0, .45);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .games-cta-btn {
        animation: none;
      }
    }

    /* ── SPADIE GAMES ページ ── */
    .games-root {
      background: var(--primary);
      color: #fff;
      min-height: calc(100vh - var(--tab-height) - var(--safe-bottom));
      /* body が --surface-alt（白系）なので、ゲームページの見た目をネイビーに統一 */
      /* 万一、子要素がビューポートを超えても横スクロールさせないための保険 */
      overflow-x: hidden;
      max-width: 100%;
    }

    .games-page-header {
      background: var(--primary);
      padding: 20px 16px 16px;
      /* 左（戻る）／中（タイトル）／右（サウンドトグル）を 3 カラム grid で配置し、
         タイトルが常に画面中央に来るようにする（flex + margin:auto だと
         左右アイテムの幅差でタイトルがズレるため） */
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      position: relative;
    }

    /* 戻るボタンは左寄せ、サウンドトグルは右寄せ */
    .games-page-header > .games-back-btn { justify-self: start; }
    .games-page-header > .sg-sound-toggle { justify-self: end; }

    .games-back-btn {
      background: transparent;
      border: 1px solid rgba(255, 255, 255, .25);
      color: #fff;
      padding: 6px 12px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      letter-spacing: .3px;
    }

    .games-back-btn:active {
      transform: scale(.96);
      opacity: .85;
    }

    .games-page-title {
      font-family: 'Press Start 2P', monospace;
      font-size: 12px;
      color: #fff;
      letter-spacing: 2px;
      margin: 0;
      justify-self: center;
      text-align: center;
      white-space: nowrap;
    }

    .games-page-body {
      padding: 24px 16px 80px;
      min-height: 60vh;
      /* スマホで子要素が画面幅を超えないように保険をかける */
      max-width: 100%;
      overflow-x: hidden;
      box-sizing: border-box;
    }

    /* ────────────────────────────────────────────────
       ゲーム詳細ページ（colormatch / perfectstop /
       tapbattle / luckyclover / emoheart）用のコンパクト化。
       SPADIE のヘッダーと下タブバーは表示したまま、
       ゲーム要素を縦方向に圧縮して、画面内に収める。
       ──────────────────────────────────────────────── */

    /* ゲーム詳細ページの games-page-header は詰める（タイトル帯は短く） */
    body.is-game-detail .games-page-header {
      padding: 10px 16px 6px;
    }

    body.is-game-detail .games-page-body {
      /* 上下の余白を削って、ゲームを縦方向に詰める */
      padding: 8px 16px 12px;
      min-height: 0;
    }

    /* 各ゲーム共通：縦方向を詰める（gap と上下 padding を圧縮） */
    body.is-game-detail .ps-start,
    body.is-game-detail .ps-play,
    body.is-game-detail .ps-result,
    body.is-game-detail .tb-start,
    body.is-game-detail .tb-play,
    body.is-game-detail .tb-result,
    body.is-game-detail .lc-start,
    body.is-game-detail .lc-play,
    body.is-game-detail .lc-result,
    body.is-game-detail .eh-start,
    body.is-game-detail .eh-play,
    body.is-game-detail .eh-result,
    body.is-game-detail .gt-start,
    body.is-game-detail .gt-play,
    body.is-game-detail .gt-result {
      gap: 10px;
      padding: 8px 12px 6px;
    }

    /* タイトルを少しコンパクトに */
    body.is-game-detail .ps-title,
    body.is-game-detail .tb-title,
    body.is-game-detail .lc-title,
    body.is-game-detail .eh-title {
      font-size: 14px;
      line-height: 1.4;
    }

    /* リードテキスト（説明）を詰める */
    body.is-game-detail .ps-lead,
    body.is-game-detail .tb-lead,
    body.is-game-detail .lc-lead,
    body.is-game-detail .eh-lead {
      font-size: 11px;
      line-height: 1.6;
    }

    /* BEST 表記もコンパクトに */
    body.is-game-detail .ps-best,
    body.is-game-detail .tb-best,
    body.is-game-detail .lc-best,
    body.is-game-detail .eh-best {
      font-size: 9px;
    }

    /* START ボタンの余白を圧縮 */
    body.is-game-detail .ps-start-btn,
    body.is-game-detail .tb-start-btn,
    body.is-game-detail .lc-start-btn,
    body.is-game-detail .eh-start-btn {
      padding: 12px 22px;
      font-size: 13px;
    }

    /* PerfectStop: ステージのアスペクト比を低くして高さを節約 */
    body.is-game-detail .ps-stage {
      aspect-ratio: 1.8 / 1;
      max-width: 320px;
      gap: 10px;
      padding: 12px;
    }
    body.is-game-detail .ps-char {
      width: 64px;
      height: 64px;
    }
    body.is-game-detail .ps-time {
      font-size: 22px;
    }
    body.is-game-detail .ps-stop-btn {
      padding: 14px 22px;
      min-width: 180px;
      font-size: 18px;
    }
    body.is-game-detail .ps-mode-btn {
      padding: 10px 8px;
    }
    body.is-game-detail .ps-mode-btn-title { font-size: 12px; }
    body.is-game-detail .ps-mode-btn-sub   { font-size: 10px; }

    /* TapBattle: タップエリアを小さく */
    body.is-game-detail .tb-tap-area {
      max-width: 240px;
      border-radius: 16px;
      padding: 10px;
    }
    body.is-game-detail .tb-char {
      width: 80px;
      height: 80px;
    }
    body.is-game-detail .tb-tap-hint { font-size: 14px; }

    /* LuckyClover: パッドをコンパクトに */
    body.is-game-detail .lc-pad {
      max-width: 260px;
      gap: 10px;
    }

    /* EmoHeart: ステージをコンパクトに */
    body.is-game-detail .eh-stage {
      max-width: 320px;
    }

    /* ── さらに iPhone SE 系（高さ 700px 以下）では追い込み ── */
    @media (max-height: 700px) {
      body.is-game-detail .games-page-header { padding: 6px 16px 4px; }
      body.is-game-detail .games-page-body   { padding: 4px 16px 8px; }
      body.is-game-detail .ps-start,
      body.is-game-detail .ps-play,
      body.is-game-detail .ps-result,
      body.is-game-detail .tb-start,
      body.is-game-detail .tb-play,
      body.is-game-detail .tb-result,
      body.is-game-detail .lc-start,
      body.is-game-detail .lc-play,
      body.is-game-detail .lc-result,
      body.is-game-detail .eh-start,
      body.is-game-detail .eh-play,
      body.is-game-detail .eh-result {
        gap: 8px;
        padding: 4px 12px 4px;
      }
      body.is-game-detail .ps-stage { aspect-ratio: 2 / 1; max-width: 300px; }
      body.is-game-detail .ps-char { width: 54px; height: 54px; }
      body.is-game-detail .ps-time { font-size: 20px; }
      body.is-game-detail .ps-stop-btn { padding: 12px 20px; min-width: 160px; font-size: 16px; }
      body.is-game-detail .tb-tap-area { max-width: 200px; }
      body.is-game-detail .tb-char { width: 68px; height: 68px; }
      body.is-game-detail .lc-pad { max-width: 220px; gap: 8px; }
      body.is-game-detail .eh-stage { max-width: 280px; }

      /* リード（説明）はさらに短く */
      body.is-game-detail .ps-lead,
      body.is-game-detail .tb-lead,
      body.is-game-detail .lc-lead,
      body.is-game-detail .eh-lead { font-size: 10px; line-height: 1.5; }
    }

    /* ── SPADIE GAMES ゲーム一覧 ── */
    .games-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
      max-width: 480px;
      margin: 0 auto;
    }

    .games-list-card {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 14px;
      background: rgba(255, 255, 255, .04);
      border: 1px solid rgba(245, 200, 0, .25);
      border-radius: 12px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .12s ease, background .15s, border-color .15s, box-shadow .2s;
      text-align: left;
      width: 100%;
      color: inherit;
      font: inherit;
    }

    .games-list-card:active {
      transform: scale(.985);
      background: rgba(255, 255, 255, .08);
      border-color: rgba(245, 200, 0, .55);
      box-shadow: 0 0 16px rgba(245, 200, 0, .25);
    }

    .games-list-card-thumbs {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 3px;
      width: 68px;
      height: 68px;
      flex-shrink: 0;
      background: var(--primary);
      border-radius: 8px;
      padding: 4px;
      border: 1px solid rgba(255, 255, 255, .1);
    }

    .games-list-card-thumbs img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
    }

    /* 1 枚アイコン用バリアント — 大きく中央配置 */
    .games-list-card-thumbs.is-single {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 6px;
    }

    .games-list-card-body {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-width: 0;
    }

    .games-list-card-title {
      /* Latin（SPADIE 等）と日本語の両方を同じフォントで描画して大きさを揃える
         （pixel font の Press Start 2P は日本語が描けず、フォールバックで不揃いになるため使わない） */
      font-family: 'Inter', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', system-ui, sans-serif;
      font-size: 14px;
      font-weight: 700;
      color: var(--gold);
      letter-spacing: .8px;
      line-height: 1.4;
    }

    .games-list-card-desc {
      font-size: 12px;
      color: rgba(255, 255, 255, .6);
      line-height: 1.5;
    }

    .games-list-card-arrow {
      font-size: 26px;
      color: var(--gold);
      font-weight: 700;
      flex-shrink: 0;
      line-height: 1;
      opacity: .85;
    }

    /* ── 色違いタップ（gt = game tiles） ── */
    .gt-start {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 24px;
      padding: 40px 16px 16px;
      text-align: center;
    }

    .gt-title {
      font-family: 'Press Start 2P', monospace;
      font-size: 18px;
      color: var(--gold);
      letter-spacing: 2px;
      text-shadow: 0 0 8px rgba(245, 200, 0, .35);
      margin: 0;
      line-height: 1.5;
    }

    .gt-lead {
      font-size: 13px;
      line-height: 1.9;
      color: rgba(255, 255, 255, .75);
      margin: 0;
    }

    .gt-start-btn {
      font-family: 'Press Start 2P', 'Courier New', monospace;
      letter-spacing: 2px;
      border-radius: 6px;
      padding: 16px 28px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .12s ease;
      background: var(--primary);
      color: var(--gold);
      border: 3px solid var(--gold);
      font-size: 14px;
      box-shadow:
        0 0 0 3px var(--primary),
        0 0 0 4px rgba(245, 200, 0, .85),
        0 0 20px rgba(245, 200, 0, .45);
      animation: gamesCtaGlow 2.6s ease-in-out infinite;
      text-transform: uppercase;
    }

    .gt-start-btn:active {
      transform: translateY(2px) scale(.985);
      animation-play-state: paused;
    }

    .gt-secondary-btn {
      font-family: 'Press Start 2P', 'Courier New', monospace;
      letter-spacing: 2px;
      border-radius: 6px;
      padding: 12px 22px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .12s ease, opacity .15s;
      background: transparent;
      color: rgba(255, 255, 255, .75);
      border: 1px solid rgba(255, 255, 255, .3);
      font-size: 10px;
    }

    .gt-secondary-btn:active {
      transform: scale(.96);
      opacity: .85;
    }

    .gt-hud {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      font-family: 'Press Start 2P', monospace;
      font-size: 9px;
      color: rgba(255, 255, 255, .8);
      letter-spacing: 1.5px;
      padding: 0 4px;
    }

    .gt-hud .gt-num {
      color: var(--gold);
      font-size: 12px;
      margin: 0 2px;
    }

    .gt-progress {
      height: 4px;
      background: rgba(255, 255, 255, .08);
      border-radius: 999px;
      overflow: hidden;
      margin: 10px 0 18px;
    }

    .gt-progress-bar {
      height: 100%;
      background: linear-gradient(90deg, var(--gold), #ffe26b);
      transition: width .4s ease;
    }

    .gt-grid {
      display: grid;
      /* minmax(0, 1fr) にしておかないと、中の img の intrinsic width が
         グリッドアイテムの min-width: auto と相互作用してビューポートを
         超える幅にふくらむ（iOS Safari で顕著）。 */
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
      margin: 0 auto;
      max-width: 380px;
      width: 100%;
      box-sizing: border-box;
    }

    .gt-tile {
      aspect-ratio: 1 / 1;
      background: rgba(255, 255, 255, .04);
      border: 1px solid rgba(255, 255, 255, .08);
      border-radius: 8px;
      padding: 6px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .1s ease, background .15s, border-color .15s, box-shadow .2s;
      display: flex;
      align-items: center;
      justify-content: center;
      /* Grid item の自動 min-size を殺して、1fr 列の幅に従わせる */
      min-width: 0;
      min-height: 0;
    }

    .gt-tile img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
    }

    .gt-tile:active {
      transform: scale(.94);
    }

    .gt-tile.gt-correct {
      background: rgba(22, 163, 74, .28);
      border-color: #16a34a;
      box-shadow: 0 0 14px rgba(22, 163, 74, .55);
      animation: gtPulse .5s ease-out;
    }

    .gt-tile.gt-wrong {
      background: rgba(233, 69, 96, .22);
      border-color: var(--accent);
      animation: gtShake .32s ease-in-out;
    }

    .gt-tile.gt-reveal {
      background: rgba(245, 200, 0, .18);
      border-color: var(--gold);
      box-shadow: 0 0 14px rgba(245, 200, 0, .5);
    }

    @keyframes gtPulse {
      0% { transform: scale(.94); }
      50% { transform: scale(1.06); }
      100% { transform: scale(1); }
    }

    @keyframes gtShake {
      0%, 100% { transform: translateX(0); }
      25% { transform: translateX(-5px); }
      50% { transform: translateX(5px); }
      75% { transform: translateX(-3px); }
    }

    .gt-result {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
      padding: 32px 16px 16px;
      text-align: center;
    }

    .gt-result-rank {
      font-family: 'Press Start 2P', monospace;
      font-size: 22px;
      color: var(--gold);
      letter-spacing: 3px;
      text-shadow: 0 0 12px rgba(245, 200, 0, .5);
      margin: 0;
    }

    .gt-result-score {
      font-family: 'Press Start 2P', monospace;
      font-size: 14px;
      color: rgba(255, 255, 255, .85);
      letter-spacing: 2px;
    }

    .gt-result-score .gt-num {
      color: var(--gold);
      font-size: 28px;
      margin: 0 4px;
    }

    .gt-result-btns {
      display: flex;
      flex-direction: column;
      gap: 12px;
      width: 100%;
      align-items: center;
      margin-top: 14px;
    }

    @media (prefers-reduced-motion: reduce) {
      .gt-start-btn { animation: none; }
    }

    /* ── ぴったりストップ（ps = perfect stop） ── */
    .ps-start,
    .ps-play,
    .ps-result {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 20px;
      padding: 28px 16px 16px;
      text-align: center;
      /* スマホで子要素が画面幅を超えないように */
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      overflow-x: hidden;
    }

    .ps-title {
      font-family: 'Press Start 2P', monospace;
      font-size: 18px;
      color: var(--gold);
      letter-spacing: 2px;
      text-shadow: 0 0 8px rgba(245, 200, 0, .35);
      margin: 0;
      line-height: 1.5;
    }

    .ps-lead {
      font-size: 13px;
      line-height: 1.9;
      color: rgba(255, 255, 255, .78);
      margin: 0;
    }

    .ps-mode-select {
      width: 100%;
      max-width: 360px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .ps-mode-label {
      font-family: 'Press Start 2P', monospace;
      font-size: 9px;
      color: rgba(255, 255, 255, .6);
      letter-spacing: 1.5px;
    }

    .ps-mode-btns {
      display: grid;
      /* minmax(0, 1fr) で min-content によるはみ出しを抑止 */
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 10px;
    }

    .ps-mode-btn {
      background: rgba(255, 255, 255, .04);
      border: 2px solid rgba(245, 200, 0, .25);
      border-radius: 10px;
      padding: 14px 8px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: background .15s, border-color .15s, box-shadow .2s, transform .1s;
      color: inherit;
      font: inherit;
      display: flex;
      flex-direction: column;
      gap: 6px;
      align-items: center;
      /* Grid item の min-width: auto を殺す */
      min-width: 0;
    }

    .ps-mode-btn:active {
      transform: scale(.97);
    }

    .ps-mode-btn.selected {
      background: rgba(245, 200, 0, .12);
      border-color: var(--gold);
      box-shadow: 0 0 14px rgba(245, 200, 0, .35);
    }

    .ps-mode-btn-title {
      font-family: 'Press Start 2P', monospace;
      font-size: 13px;
      color: var(--gold);
      letter-spacing: 2px;
    }

    .ps-mode-btn-sub {
      font-size: 11px;
      color: rgba(255, 255, 255, .75);
      letter-spacing: .5px;
    }

    .ps-best {
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      color: rgba(255, 255, 255, .65);
      letter-spacing: 1.5px;
    }

    .ps-best .ps-best-num {
      color: var(--gold);
      margin-left: 6px;
    }

    .ps-start-btn {
      font-family: 'Press Start 2P', 'Courier New', monospace;
      letter-spacing: 2px;
      border-radius: 6px;
      padding: 16px 28px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .12s ease;
      background: var(--primary);
      color: var(--gold);
      border: 3px solid var(--gold);
      font-size: 14px;
      box-shadow:
        0 0 0 3px var(--primary),
        0 0 0 4px rgba(245, 200, 0, .85),
        0 0 20px rgba(245, 200, 0, .45);
      text-transform: uppercase;
      margin-top: 4px;
    }

    .ps-start-btn:active {
      transform: translateY(2px) scale(.985);
    }

    .ps-target {
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      color: rgba(255, 255, 255, .7);
      letter-spacing: 2px;
    }

    .ps-target .ps-target-num {
      color: var(--gold);
      font-size: 14px;
      margin-left: 6px;
    }

    .ps-stage {
      position: relative;
      width: 100%;
      max-width: 380px;
      aspect-ratio: 1.25 / 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 18px;
      background: rgba(255, 255, 255, .03);
      border: 1px solid rgba(245, 200, 0, .22);
      border-radius: 14px;
      padding: 18px;
    }

    .ps-char {
      width: 96px;
      height: 96px;
      object-fit: contain;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
      animation: psCharBounce 0.9s ease-in-out infinite;
      pointer-events: none;
      user-select: none;
    }

    @keyframes psCharBounce {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-10px); }
    }

    .ps-time {
      font-family: 'Press Start 2P', monospace;
      font-size: 28px;
      letter-spacing: 3px;
      color: var(--gold);
      text-shadow: 0 0 10px rgba(245, 200, 0, .45);
      font-variant-numeric: tabular-nums;
    }

    .ps-time .ps-time-unit {
      font-size: 14px;
      color: rgba(255, 255, 255, .7);
      margin-left: 4px;
      letter-spacing: 1px;
    }

    .ps-hidden-hint {
      font-size: 11px;
      color: rgba(255, 255, 255, .55);
      letter-spacing: 1px;
      line-height: 1.6;
    }

    .ps-stop-btn {
      font-family: 'Press Start 2P', 'Courier New', monospace;
      letter-spacing: 3px;
      border-radius: 10px;
      padding: 22px 28px;
      min-width: 220px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .08s ease, box-shadow .15s;
      background: var(--accent, #e94560);
      color: #fff;
      border: 3px solid #fff;
      font-size: 22px;
      box-shadow:
        0 0 0 3px var(--accent, #e94560),
        0 0 0 4px rgba(255, 255, 255, .5),
        0 0 24px rgba(233, 69, 96, .55);
      text-transform: uppercase;
      animation: psStopPulse 1s ease-in-out infinite;
    }

    .ps-stop-btn:active {
      transform: translateY(2px) scale(.97);
      animation-play-state: paused;
    }

    @keyframes psStopPulse {
      0%, 100% {
        box-shadow:
          0 0 0 3px var(--accent, #e94560),
          0 0 0 4px rgba(255, 255, 255, .45),
          0 0 22px rgba(233, 69, 96, .5);
      }
      50% {
        box-shadow:
          0 0 0 3px var(--accent, #e94560),
          0 0 0 4px rgba(255, 255, 255, .8),
          0 0 38px rgba(233, 69, 96, .85);
      }
    }

    .ps-result-rank {
      font-family: 'Press Start 2P', monospace;
      font-size: 26px;
      color: var(--gold);
      letter-spacing: 3px;
      text-shadow: 0 0 14px rgba(245, 200, 0, .55);
      margin: 0;
    }

    .ps-result-rank.ps-rank-perfect {
      color: #c9e84b;
      text-shadow: 0 0 18px rgba(201, 232, 75, .75);
    }

    .ps-result-rank.ps-rank-d {
      color: var(--accent, #e94560);
      text-shadow: 0 0 12px rgba(233, 69, 96, .55);
    }

    .ps-result-time {
      font-family: 'Press Start 2P', monospace;
      font-size: 18px;
      color: #fff;
      letter-spacing: 2px;
      font-variant-numeric: tabular-nums;
    }

    .ps-result-time .ps-num {
      color: var(--gold);
      font-size: 26px;
      margin: 0 2px;
    }

    .ps-result-error {
      font-size: 13px;
      color: rgba(255, 255, 255, .8);
      letter-spacing: 1px;
      font-variant-numeric: tabular-nums;
    }

    .ps-result-error .ps-num {
      color: var(--gold);
      font-family: 'Press Start 2P', monospace;
      font-size: 15px;
      margin: 0 4px;
    }

    .ps-best-flag {
      font-family: 'Press Start 2P', monospace;
      font-size: 11px;
      color: #c9e84b;
      letter-spacing: 2px;
      padding: 6px 14px;
      border: 1px solid rgba(201, 232, 75, .6);
      border-radius: 999px;
      background: rgba(201, 232, 75, .1);
      animation: psBestFlash 1.2s ease-in-out infinite;
    }

    @keyframes psBestFlash {
      0%, 100% { opacity: 1; }
      50% { opacity: .55; }
    }

    .ps-result-btns {
      display: flex;
      flex-direction: column;
      gap: 12px;
      width: 100%;
      align-items: center;
      margin-top: 10px;
    }

    @media (prefers-reduced-motion: reduce) {
      .ps-start-btn,
      .ps-stop-btn,
      .ps-char,
      .ps-best-flag {
        animation: none;
      }
    }

    /* ── タップカウンター対決（tb = tap battle） ── */
    .tb-start,
    .tb-play,
    .tb-result {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
      padding: 28px 16px 16px;
      text-align: center;
      /* スマホで子要素が画面幅を超えないように */
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      overflow-x: hidden;
    }

    .tb-title {
      font-family: 'Press Start 2P', monospace;
      font-size: 18px;
      color: var(--gold);
      letter-spacing: 2px;
      text-shadow: 0 0 8px rgba(245, 200, 0, .4);
      margin: 0;
      line-height: 1.5;
    }

    .tb-lead {
      font-size: 13px;
      line-height: 1.9;
      color: rgba(255, 255, 255, .78);
      margin: 0;
    }

    .tb-best {
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      color: rgba(255, 255, 255, .65);
      letter-spacing: 1.5px;
    }

    .tb-best .tb-best-num {
      color: var(--gold);
      font-size: 14px;
      margin: 0 6px;
    }

    .tb-start-btn {
      font-family: 'Press Start 2P', 'Courier New', monospace;
      letter-spacing: 2px;
      border-radius: 6px;
      padding: 16px 28px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .12s ease;
      background: var(--primary);
      color: var(--gold);
      border: 3px solid var(--gold);
      font-size: 14px;
      box-shadow:
        0 0 0 3px var(--primary),
        0 0 0 4px rgba(245, 200, 0, .85),
        0 0 20px rgba(245, 200, 0, .45);
      text-transform: uppercase;
    }

    .tb-start-btn:active {
      transform: translateY(2px) scale(.985);
    }

    .tb-hud {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      max-width: 380px;
      gap: 12px;
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      color: rgba(255, 255, 255, .8);
      letter-spacing: 1.5px;
      padding: 0 6px;
    }

    .tb-hud .tb-hud-num {
      color: var(--gold);
      font-size: 18px;
      margin-left: 6px;
      font-variant-numeric: tabular-nums;
    }

    .tb-hud .tb-hud-num.tb-count-num {
      font-size: 22px;
      text-shadow: 0 0 10px rgba(245, 200, 0, .45);
    }

    .tb-tap-area {
      position: relative;
      width: 100%;
      max-width: 320px;
      aspect-ratio: 1 / 1;
      background: radial-gradient(ellipse at center, rgba(245, 200, 0, .18) 0%, rgba(245, 200, 0, .06) 55%, rgba(245, 200, 0, 0) 85%);
      border: 3px solid var(--gold);
      border-radius: 20px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      touch-action: none;            /* 2 本指ピンチ/スクロール抑止 */
      user-select: none;
      -webkit-user-select: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 14px;
      box-shadow:
        inset 0 0 24px rgba(245, 200, 0, .2),
        0 0 0 1px rgba(245, 200, 0, .35),
        0 0 28px rgba(245, 200, 0, .35);
      transition: transform .06s ease, box-shadow .15s;
      color: inherit;
      font: inherit;
    }

    .tb-tap-area:active {
      transform: scale(.985);
      box-shadow:
        inset 0 0 38px rgba(245, 200, 0, .35),
        0 0 0 1px rgba(245, 200, 0, .55),
        0 0 44px rgba(245, 200, 0, .55);
    }

    .tb-tap-area.tb-disabled {
      pointer-events: none;
      opacity: .55;
      filter: grayscale(.35);
    }

    .tb-char {
      width: 120px;
      height: 120px;
      object-fit: contain;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
      animation: tbCharPulse 1s ease-in-out infinite;
    }

    @keyframes tbCharPulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.06); }
    }

    .tb-tap-hint {
      font-family: 'Press Start 2P', monospace;
      font-size: 18px;
      color: var(--gold);
      letter-spacing: 3px;
      text-shadow: 0 0 10px rgba(245, 200, 0, .55);
      pointer-events: none;
      animation: tbHintBlink 0.8s ease-in-out infinite;
    }

    @keyframes tbHintBlink {
      0%, 100% { opacity: 1; }
      50% { opacity: .55; }
    }

    .tb-multi-hint {
      font-size: 11px;
      color: rgba(255, 255, 255, .6);
      letter-spacing: 1px;
      max-width: 320px;
      line-height: 1.6;
    }

    .tb-result-rank {
      font-family: 'Press Start 2P', monospace;
      font-size: 26px;
      color: var(--gold);
      letter-spacing: 3px;
      text-shadow: 0 0 14px rgba(245, 200, 0, .55);
      margin: 0;
    }

    .tb-result-rank.tb-rank-legend {
      color: #c9e84b;
      text-shadow: 0 0 18px rgba(201, 232, 75, .75);
    }

    .tb-result-rank.tb-rank-d {
      color: var(--accent, #e94560);
      text-shadow: 0 0 12px rgba(233, 69, 96, .55);
    }

    .tb-result-count {
      font-family: 'Press Start 2P', monospace;
      font-size: 14px;
      color: rgba(255, 255, 255, .85);
      letter-spacing: 2px;
    }

    .tb-result-count .tb-num {
      color: var(--gold);
      font-size: 34px;
      margin: 0 6px;
      text-shadow: 0 0 10px rgba(245, 200, 0, .45);
    }

    .tb-result-rate {
      font-size: 12px;
      color: rgba(255, 255, 255, .7);
      letter-spacing: 1px;
      font-variant-numeric: tabular-nums;
    }

    .tb-best-flag {
      font-family: 'Press Start 2P', monospace;
      font-size: 11px;
      color: #c9e84b;
      letter-spacing: 2px;
      padding: 6px 14px;
      border: 1px solid rgba(201, 232, 75, .6);
      border-radius: 999px;
      background: rgba(201, 232, 75, .1);
      animation: tbBestFlash 1.2s ease-in-out infinite;
    }

    @keyframes tbBestFlash {
      0%, 100% { opacity: 1; }
      50% { opacity: .55; }
    }

    .tb-result-btns {
      display: flex;
      flex-direction: column;
      gap: 12px;
      width: 100%;
      align-items: center;
      margin-top: 8px;
    }

    @media (prefers-reduced-motion: reduce) {
      .tb-start-btn,
      .tb-char,
      .tb-tap-hint,
      .tb-best-flag {
        animation: none;
      }
    }

    /* ── 覚えて！ラッキークローバー（lc = lucky clover） ── */
    .lc-start,
    .lc-play,
    .lc-result {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
      padding: 24px 16px 16px;
      text-align: center;
      /* スマホで子要素が画面幅を超えないように */
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      overflow-x: hidden;
    }

    .lc-title {
      font-family: 'Press Start 2P', monospace;
      font-size: 16px;
      color: var(--gold);
      letter-spacing: 2px;
      text-shadow: 0 0 8px rgba(245, 200, 0, .4);
      margin: 0;
      line-height: 1.6;
    }

    .lc-lead {
      font-size: 13px;
      line-height: 1.9;
      color: rgba(255, 255, 255, .78);
      margin: 0;
    }

    .lc-best {
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      color: rgba(255, 255, 255, .65);
      letter-spacing: 1.5px;
    }

    .lc-best .lc-best-num {
      color: var(--gold);
      font-size: 14px;
      margin: 0 6px;
    }

    .lc-start-btn {
      font-family: 'Press Start 2P', 'Courier New', monospace;
      letter-spacing: 2px;
      border-radius: 6px;
      padding: 16px 28px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .12s ease;
      background: var(--primary);
      color: var(--gold);
      border: 3px solid var(--gold);
      font-size: 14px;
      box-shadow:
        0 0 0 3px var(--primary),
        0 0 0 4px rgba(245, 200, 0, .85),
        0 0 20px rgba(245, 200, 0, .45);
      text-transform: uppercase;
    }

    .lc-start-btn:active {
      transform: translateY(2px) scale(.985);
    }

    .lc-hud {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      max-width: 360px;
      gap: 12px;
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      color: rgba(255, 255, 255, .8);
      letter-spacing: 1.5px;
      padding: 0 6px;
    }

    .lc-hud .lc-hud-num {
      color: var(--gold);
      font-size: 16px;
      margin: 0 6px;
      font-variant-numeric: tabular-nums;
    }

    .lc-phase-label {
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      color: var(--gold);
      letter-spacing: 2px;
      min-height: 14px;
    }

    .lc-phase-label.lc-phase-watch {
      color: #d7ec5e;
      animation: lcPhaseBlink 0.6s ease-in-out infinite;
    }

    @keyframes lcPhaseBlink {
      0%, 100% { opacity: 1; }
      50% { opacity: .5; }
    }

    .lc-pad {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 14px;
      width: 100%;
      max-width: 340px;
      box-sizing: border-box;
      touch-action: manipulation;
    }

    .lc-btn {
      position: relative;
      aspect-ratio: 1 / 1;
      border-radius: 18px;
      border: 2px solid rgba(245, 200, 0, .3);
      background: rgba(255, 255, 255, .04);
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .1s ease, background .15s, border-color .15s, box-shadow .2s, filter .15s;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 18px;
      overflow: hidden;
      /* Grid item の自動 min-size を殺す */
      min-width: 0;
      min-height: 0;
    }

    .lc-btn img {
      width: 76%;
      height: 76%;
      object-fit: contain;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
      filter: saturate(.7) brightness(.8);
      transition: filter .15s, transform .15s;
    }

    /* 4 色バリエーション — クローバーに hue-rotate で差別化 */
    .lc-btn-0 img { filter: hue-rotate(0deg) saturate(.7) brightness(.8); }
    .lc-btn-1 img { filter: hue-rotate(90deg) saturate(.75) brightness(.8); }
    .lc-btn-2 img { filter: hue-rotate(180deg) saturate(.75) brightness(.8); }
    .lc-btn-3 img { filter: hue-rotate(270deg) saturate(.75) brightness(.8); }

    .lc-btn:active {
      transform: scale(.96);
    }

    .lc-btn.lc-lit {
      border-color: var(--gold);
      background: rgba(245, 200, 0, .16);
      box-shadow:
        inset 0 0 22px rgba(245, 200, 0, .35),
        0 0 24px rgba(245, 200, 0, .55);
      transform: scale(1.04);
    }

    .lc-btn.lc-lit img {
      transform: scale(1.1);
    }

    .lc-btn-0.lc-lit img { filter: hue-rotate(0deg) saturate(1.5) brightness(1.25) drop-shadow(0 0 6px rgba(245, 200, 0, .6)); }
    .lc-btn-1.lc-lit img { filter: hue-rotate(90deg) saturate(1.5) brightness(1.25) drop-shadow(0 0 6px rgba(245, 200, 0, .6)); }
    .lc-btn-2.lc-lit img { filter: hue-rotate(180deg) saturate(1.5) brightness(1.25) drop-shadow(0 0 6px rgba(245, 200, 0, .6)); }
    .lc-btn-3.lc-lit img { filter: hue-rotate(270deg) saturate(1.5) brightness(1.25) drop-shadow(0 0 6px rgba(245, 200, 0, .6)); }

    .lc-btn.lc-wrong {
      border-color: var(--accent, #e94560);
      background: rgba(233, 69, 96, .22);
      box-shadow: 0 0 18px rgba(233, 69, 96, .5);
      animation: lcShake .32s ease-in-out;
    }

    @keyframes lcShake {
      0%, 100% { transform: translateX(0); }
      25% { transform: translateX(-5px); }
      50% { transform: translateX(5px); }
      75% { transform: translateX(-3px); }
    }

    .lc-btn[aria-disabled="true"] {
      cursor: default;
      opacity: .9;
    }

    .lc-hint {
      font-size: 11px;
      color: rgba(255, 255, 255, .55);
      letter-spacing: 1px;
      max-width: 320px;
      line-height: 1.6;
    }

    .lc-result-rank {
      font-family: 'Press Start 2P', monospace;
      font-size: 26px;
      color: var(--gold);
      letter-spacing: 3px;
      text-shadow: 0 0 14px rgba(245, 200, 0, .55);
      margin: 0;
    }

    .lc-result-rank.lc-rank-legend {
      color: #c9e84b;
      text-shadow: 0 0 18px rgba(201, 232, 75, .75);
    }

    .lc-result-rank.lc-rank-d {
      color: var(--accent, #e94560);
      text-shadow: 0 0 12px rgba(233, 69, 96, .55);
    }

    .lc-result-score {
      font-family: 'Press Start 2P', monospace;
      font-size: 14px;
      color: rgba(255, 255, 255, .85);
      letter-spacing: 2px;
    }

    .lc-result-score .lc-num {
      color: var(--gold);
      font-size: 32px;
      margin: 0 6px;
      text-shadow: 0 0 10px rgba(245, 200, 0, .45);
    }

    .lc-best-flag {
      font-family: 'Press Start 2P', monospace;
      font-size: 11px;
      color: #c9e84b;
      letter-spacing: 2px;
      padding: 6px 14px;
      border: 1px solid rgba(201, 232, 75, .6);
      border-radius: 999px;
      background: rgba(201, 232, 75, .1);
      animation: lcBestFlash 1.2s ease-in-out infinite;
    }

    @keyframes lcBestFlash {
      0%, 100% { opacity: 1; }
      50% { opacity: .55; }
    }

    .lc-result-btns {
      display: flex;
      flex-direction: column;
      gap: 12px;
      width: 100%;
      align-items: center;
      margin-top: 8px;
    }

    @media (prefers-reduced-motion: reduce) {
      .lc-start-btn,
      .lc-phase-label.lc-phase-watch,
      .lc-best-flag {
        animation: none;
      }
    }

    /* ── 進め！エモーショナルハート（eh = emo heart, endless runner） ── */
    .eh-start,
    .eh-play,
    .eh-result {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
      padding: 24px 16px 16px;
      text-align: center;
      /* スマホで子要素が画面幅を超えないように */
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      overflow-x: hidden;
    }

    .eh-title {
      font-family: 'Press Start 2P', monospace;
      font-size: 16px;
      color: var(--gold);
      letter-spacing: 2px;
      text-shadow: 0 0 8px rgba(245, 200, 0, .4);
      margin: 0;
      line-height: 1.6;
    }

    .eh-lead {
      font-size: 13px;
      line-height: 1.9;
      color: rgba(255, 255, 255, .78);
      margin: 0;
    }

    .eh-best {
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      color: rgba(255, 255, 255, .65);
      letter-spacing: 1.5px;
    }

    .eh-best .eh-best-num {
      color: var(--gold);
      font-size: 14px;
      margin: 0 6px;
    }

    .eh-start-btn {
      font-family: 'Press Start 2P', 'Courier New', monospace;
      letter-spacing: 2px;
      border-radius: 6px;
      padding: 16px 28px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .12s ease;
      background: var(--primary);
      color: var(--gold);
      border: 3px solid var(--gold);
      font-size: 14px;
      box-shadow:
        0 0 0 3px var(--primary),
        0 0 0 4px rgba(245, 200, 0, .85),
        0 0 20px rgba(245, 200, 0, .45);
      text-transform: uppercase;
    }

    .eh-start-btn:active {
      transform: translateY(2px) scale(.985);
    }

    .eh-hud {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      max-width: 360px;
      gap: 12px;
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      color: rgba(255, 255, 255, .8);
      letter-spacing: 1.5px;
      padding: 0 6px;
    }

    .eh-hud .eh-hud-num {
      color: var(--gold);
      font-size: 16px;
      margin: 0 6px;
      font-variant-numeric: tabular-nums;
    }

    .eh-combo {
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      letter-spacing: 1px;
      color: rgba(255, 255, 255, .55);
      transition: color .12s ease, text-shadow .12s ease, transform .12s ease;
      min-height: 12px;
    }

    .eh-combo-active {
      color: var(--gold);
      text-shadow:
        0 0 6px rgba(245, 200, 0, .8),
        0 0 10px rgba(245, 200, 0, .4);
      animation: ehComboPulse 1.1s ease-in-out infinite;
    }

    @keyframes ehComboPulse {
      0%, 100% { transform: scale(1); }
      50%      { transform: scale(1.06); }
    }

    .eh-stage {
      position: relative;
      width: 100%;
      max-width: 360px;
      aspect-ratio: 360 / 220;
      background:
        linear-gradient(180deg, rgba(245, 200, 0, .04) 0%, rgba(245, 200, 0, 0) 70%),
        radial-gradient(ellipse at 50% 110%, rgba(245, 200, 0, .12) 0%, rgba(245, 200, 0, 0) 60%);
      border: 2px solid rgba(245, 200, 0, .4);
      border-radius: 14px;
      overflow: hidden;
      box-shadow:
        inset 0 0 22px rgba(245, 200, 0, .12),
        0 0 22px rgba(245, 200, 0, .25);
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      touch-action: none;
      user-select: none;
      -webkit-user-select: none;
      padding: 0;
      color: inherit;
      font: inherit;
      transition: transform .06s ease;
    }

    .eh-stage:active {
      transform: scale(.997);
    }

    .eh-canvas {
      display: block;
      width: 100%;
      height: 100%;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
    }

    .eh-overlay-score {
      position: absolute;
      top: 8px;
      right: 12px;
      font-family: 'Press Start 2P', monospace;
      font-size: 12px;
      color: var(--gold);
      letter-spacing: 1.5px;
      text-shadow: 0 0 6px rgba(245, 200, 0, .55);
      font-variant-numeric: tabular-nums;
      pointer-events: none;
    }

    .eh-overlay-hint {
      position: absolute;
      bottom: 10px;
      left: 0;
      right: 0;
      text-align: center;
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      color: rgba(255, 255, 255, .7);
      letter-spacing: 1.5px;
      pointer-events: none;
      animation: ehHintBlink 1.1s ease-in-out infinite;
    }

    @keyframes ehHintBlink {
      0%, 100% { opacity: 1; }
      50% { opacity: .35; }
    }

    .eh-hint {
      font-size: 11px;
      color: rgba(255, 255, 255, .55);
      letter-spacing: 1px;
      max-width: 320px;
      line-height: 1.6;
    }

    .eh-result-rank {
      font-family: 'Press Start 2P', monospace;
      font-size: 26px;
      color: var(--gold);
      letter-spacing: 3px;
      text-shadow: 0 0 14px rgba(245, 200, 0, .55);
      margin: 0;
    }

    .eh-result-rank.eh-rank-legend {
      color: #c9e84b;
      text-shadow: 0 0 18px rgba(201, 232, 75, .75);
    }

    .eh-result-rank.eh-rank-d {
      color: var(--accent, #e94560);
      text-shadow: 0 0 12px rgba(233, 69, 96, .55);
    }

    .eh-result-score {
      font-family: 'Press Start 2P', monospace;
      font-size: 14px;
      color: rgba(255, 255, 255, .85);
      letter-spacing: 2px;
    }

    .eh-result-score .eh-num {
      color: var(--gold);
      font-size: 32px;
      margin: 0 6px;
      text-shadow: 0 0 10px rgba(245, 200, 0, .45);
    }

    .eh-best-flag {
      font-family: 'Press Start 2P', monospace;
      font-size: 11px;
      color: #c9e84b;
      letter-spacing: 2px;
      padding: 6px 14px;
      border: 1px solid rgba(201, 232, 75, .6);
      border-radius: 999px;
      background: rgba(201, 232, 75, .1);
      animation: ehBestFlash 1.2s ease-in-out infinite;
    }

    @keyframes ehBestFlash {
      0%, 100% { opacity: 1; }
      50% { opacity: .55; }
    }

    .eh-result-btns {
      display: flex;
      flex-direction: column;
      gap: 12px;
      width: 100%;
      align-items: center;
      margin-top: 8px;
    }

    @media (prefers-reduced-motion: reduce) {
      .eh-start-btn,
      .eh-overlay-hint,
      .eh-best-flag {
        animation: none;
      }
    }

    /* ── SPADIE GAMES 共通コンポーネント（sg = spadie games） ── */
    /* サウンドトグル（ゲームページヘッダー右） */
    .sg-sound-toggle {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      width: 32px;
      height: 32px;
      border: 1px solid rgba(255, 255, 255, .2);
      background: rgba(255, 255, 255, .04);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .12s ease, background .15s;
      padding: 0;
    }
    .sg-sound-toggle:active { transform: translateY(-50%) scale(.92); }
    .sg-sound-toggle.is-off { opacity: .55; }
    .sg-sound-icon {
      font-size: 15px;
      line-height: 1;
      filter: grayscale(.1);
    }
    .games-page-header { position: relative; }

    /* 統合ランキングパネル（GAMES一覧ページの先頭） */
    .sg-ranking-panel {
      margin: 0 auto 18px;
      max-width: 480px;
      background: linear-gradient(180deg, rgba(245, 200, 0, .10), rgba(22, 163, 74, .06));
      border: 1px solid rgba(245, 200, 0, .35);
      border-radius: 12px;
      padding: 14px 14px 10px;
      box-shadow: 0 0 22px rgba(245, 200, 0, .12);
    }
    .sg-ranking-head {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 10px;
      margin-bottom: 8px;
    }
    .sg-ranking-label {
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      letter-spacing: 2px;
      color: var(--gold);
    }
    .sg-ranking-total {
      font-family: 'Press Start 2P', monospace;
      color: #fff;
      font-size: 11px;
      letter-spacing: 1.5px;
    }
    .sg-ranking-total-num {
      font-size: 22px;
      color: var(--gold);
      margin-right: 3px;
      text-shadow: 0 0 10px rgba(245, 200, 0, .55);
    }
    .sg-ranking-total small {
      font-size: 10px;
      color: rgba(255, 255, 255, .6);
      margin-left: 2px;
    }
    .sg-ranking-bar {
      height: 6px;
      background: rgba(255, 255, 255, .08);
      border-radius: 999px;
      overflow: hidden;
      margin-bottom: 10px;
    }
    .sg-ranking-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--gold), #ffe26b);
      transition: width .5s ease;
      box-shadow: 0 0 10px rgba(245, 200, 0, .55);
    }
    .sg-ranking-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .sg-rank-row {
      display: grid;
      grid-template-columns: 20px 1fr auto 56px;
      align-items: center;
      gap: 8px;
      padding: 4px 2px;
      font-size: 11px;
      color: rgba(255, 255, 255, .85);
      border-bottom: 1px dashed rgba(255, 255, 255, .06);
    }
    .sg-rank-row:last-child { border-bottom: none; }
    .sg-rank-suit {
      font-size: 14px;
      color: var(--gold);
      text-align: center;
    }
    .sg-rank-name {
      font-size: 11px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .sg-rank-best {
      font-family: 'Press Start 2P', monospace;
      font-size: 10px;
      color: rgba(255, 255, 255, .75);
      letter-spacing: .5px;
    }
    .sg-rank-pts {
      font-family: 'Press Start 2P', monospace;
      font-size: 11px;
      color: var(--gold);
      text-align: right;
    }
    .sg-rank-pts small {
      font-size: 8px;
      color: rgba(245, 200, 0, .7);
      margin-left: 1px;
    }

    /* 共通結果画面 */
    .sg-result {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
      padding: 28px 16px 80px; /* 固定フッターのぶんだけ下を空ける（タブバーは games-page-body の padding-bottom が吸収） */
      text-align: center;
    }
    .sg-result-rank {
      font-family: 'Press Start 2P', monospace;
      font-size: 26px;
      color: var(--gold);
      letter-spacing: 3px;
      text-shadow: 0 0 14px rgba(245, 200, 0, .55);
      margin: 6px 0 0;
    }
    .sg-result-rank.sg-rank-perfect {
      color: #ffe26b;
      text-shadow: 0 0 18px rgba(255, 226, 107, .85);
      animation: sgPerfectPulse 1s ease-in-out infinite;
    }
    .sg-result-rank.sg-rank-d {
      color: rgba(255, 255, 255, .55);
      text-shadow: none;
    }
    @keyframes sgPerfectPulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.06); }
    }
    .sg-result-primary {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }
    .sg-result-primary-label {
      font-family: 'Press Start 2P', monospace;
      font-size: 9px;
      color: rgba(255, 255, 255, .6);
      letter-spacing: 2px;
    }
    .sg-result-primary-value {
      font-family: 'Press Start 2P', monospace;
      font-size: 18px;
      color: #fff;
      letter-spacing: 1.5px;
    }
    .sg-result-primary-value .sg-num {
      color: var(--gold);
      font-size: 30px;
      margin-right: 4px;
      text-shadow: 0 0 10px rgba(245, 200, 0, .4);
    }
    .sg-result-primary-unit {
      font-size: 13px;
      color: rgba(255, 255, 255, .7);
      margin-left: 2px;
    }
    .sg-result-secondary {
      display: flex;
      gap: 18px;
      flex-wrap: wrap;
      justify-content: center;
    }
    .sg-result-secondary-row {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
    }
    .sg-result-secondary-label {
      font-family: 'Press Start 2P', monospace;
      font-size: 8px;
      color: rgba(255, 255, 255, .55);
      letter-spacing: 1.5px;
    }
    .sg-result-secondary-value {
      font-family: 'Press Start 2P', monospace;
      font-size: 13px;
      color: rgba(255, 255, 255, .85);
    }
    .sg-best-flag {
      margin-top: 4px;
      padding: 8px 16px;
      background: linear-gradient(180deg, #ffe26b, var(--gold));
      color: var(--primary);
      font-family: 'Press Start 2P', monospace;
      font-size: 13px;
      letter-spacing: 2px;
      border-radius: 6px;
      box-shadow: 0 0 24px rgba(245, 200, 0, .65);
      animation: sgBestFlag .6s ease-out, sgBestFlagShine 1.8s ease-in-out infinite .6s;
    }
    @keyframes sgBestFlag {
      0% { transform: scale(.5) rotate(-6deg); opacity: 0; }
      60% { transform: scale(1.14) rotate(2deg); opacity: 1; }
      100% { transform: scale(1) rotate(0deg); opacity: 1; }
    }
    @keyframes sgBestFlagShine {
      0%, 100% { box-shadow: 0 0 24px rgba(245, 200, 0, .65); }
      50% { box-shadow: 0 0 32px rgba(255, 226, 107, .9); }
    }
    .sg-extra-btns {
      display: flex;
      flex-direction: column;
      gap: 8px;
      width: 100%;
      align-items: center;
      margin-top: 2px;
    }
    .sg-extra-btn {
      font-family: 'Press Start 2P', monospace;
      letter-spacing: 2px;
      border-radius: 6px;
      padding: 10px 18px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .12s ease, opacity .15s;
      background: transparent;
      color: rgba(255, 255, 255, .72);
      border: 1px solid rgba(255, 255, 255, .28);
      font-size: 9px;
    }
    .sg-extra-btn:active { transform: scale(.96); opacity: .85; }

    /* 結果画面フッター（fixed、タブバーの直上に固定） */
    .sg-result-footer {
      position: fixed;
      left: 0;
      right: 0;
      bottom: calc(var(--tab-height) + var(--safe-bottom));
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 8px;
      align-items: center;
      padding: 10px 12px;
      background: linear-gradient(180deg, rgba(26, 35, 60, 0), rgba(26, 35, 60, .92) 30%, rgba(26, 35, 60, .98));
      backdrop-filter: blur(4px);
      border-top: 1px solid rgba(255, 255, 255, .06);
      z-index: 50;
    }
    @media (min-width: 900px) {
      /* PC はタブバーが無い構造なので一番下に固定 */
      .sg-result-footer { bottom: 0; }
    }
    .sg-back-btn,
    .sg-share-btn,
    .sg-restart-btn {
      font-family: 'Press Start 2P', monospace;
      border-radius: 6px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform .12s ease, opacity .15s;
      letter-spacing: 1.5px;
      padding: 10px 12px;
      font-size: 10px;
    }
    .sg-back-btn {
      background: transparent;
      color: rgba(255, 255, 255, .75);
      border: 1px solid rgba(255, 255, 255, .25);
    }
    .sg-share-btn {
      background: #000;
      color: #fff;
      border: 1px solid rgba(255, 255, 255, .2);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      justify-content: center;
    }
    .sg-share-x {
      font-family: 'Inter', 'Hiragino Sans', system-ui, sans-serif;
      font-weight: 900;
      font-size: 14px;
      letter-spacing: 0;
    }
    .sg-restart-btn {
      background: var(--primary);
      color: var(--gold);
      border: 2px solid var(--gold);
      font-size: 10px;
      padding: 10px 14px;
      box-shadow: 0 0 0 2px var(--primary), 0 0 14px rgba(245, 200, 0, .45);
      animation: sgRestartGlow 2.4s ease-in-out infinite;
    }
    .sg-back-btn:active,
    .sg-share-btn:active,
    .sg-restart-btn:active { transform: scale(.96); opacity: .88; }
    @keyframes sgRestartGlow {
      0%, 100% { box-shadow: 0 0 0 2px var(--primary), 0 0 14px rgba(245, 200, 0, .45); }
      50% { box-shadow: 0 0 0 2px var(--primary), 0 0 22px rgba(245, 200, 0, .8); }
    }

    /* 紙吹雪（BEST更新時） */
    .sg-confetti-host {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      overflow: hidden;
      z-index: 4;
    }
    .sg-confetti-piece {
      position: absolute;
      top: -12px;
      width: 8px;
      height: 14px;
      opacity: 0;
      animation: sgConfettiFall linear forwards;
    }
    @keyframes sgConfettiFall {
      0%   { transform: translateY(-20px) rotate(0deg); opacity: 0; }
      10%  { opacity: 1; }
      100% { transform: translateY(560px) rotate(720deg); opacity: 0; }
    }

    /* カウントダウン（3→2→1→GO） */
    .sg-countdown-overlay {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(14, 22, 44, .74);
      backdrop-filter: blur(2px);
      z-index: 100;
      pointer-events: none;
    }
    .sg-countdown-num {
      font-family: 'Press Start 2P', monospace;
      font-size: 72px;
      color: var(--gold);
      letter-spacing: 4px;
      text-shadow: 0 0 30px rgba(245, 200, 0, .8);
      line-height: 1;
    }
    .sg-countdown-num.sg-countdown-pop {
      animation: sgCountPop .5s ease-out;
    }
    .sg-countdown-num.sg-countdown-go {
      color: #ffe26b;
      font-size: 56px;
    }
    @keyframes sgCountPop {
      0%   { transform: scale(.4); opacity: 0; }
      55%  { transform: scale(1.18); opacity: 1; }
      100% { transform: scale(1); opacity: 1; }
    }
    .games-page-body { position: relative; }

    @media (prefers-reduced-motion: reduce) {
      .sg-restart-btn,
      .sg-best-flag,
      .sg-result-rank.sg-rank-perfect,
      .sg-confetti-piece,
      .sg-countdown-num {
        animation: none;
      }
    }

    /* ── Venue Section ── */
    .venue-card {
      background: #fff;
      border-radius: 14px;
      overflow: hidden;
      box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
    }

    .venue-info {
      padding: 14px 16px;
      display: flex;
      align-items: flex-start;
      gap: 12px;
    }

    .venue-info .vi-pin {
      font-size: 18px;
      flex-shrink: 0;
      margin-top: 1px;
    }

    .venue-info .vi-name {
      font-size: 14px;
      font-weight: 700;
      color: #111;
      margin-bottom: 4px;
    }

    .venue-info .vi-zip {
      font-size: 11px;
      color: #888;
      font-family: 'Inter', sans-serif;
      margin-bottom: 2px;
    }

    .venue-info .vi-address {
      font-size: 12px;
      color: #555;
      line-height: 1.6;
    }

    .venue-map {
      width: 100%;
      height: 200px;
      border: none;
      display: block;
      border-top: 1px solid #eee;
    }

    .venue-map-link {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 12px;
      font-size: 12px;
      font-weight: 700;
      color: var(--accent);
      font-family: 'Inter', sans-serif;
      text-decoration: none;
      border-top: 1px solid #eee;
      background: #fff;
      min-height: 44px;
    }

    .venue-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      border-top: 1px solid #eee;
      background: #fff;
    }

    .venue-action-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 12px 8px;
      min-height: 44px;
      font-size: 12px;
      font-weight: 700;
      color: var(--accent);
      font-family: 'Inter', 'Hiragino Sans', sans-serif;
      text-decoration: none;
      background: transparent;
      border: none;
      border-right: 1px solid #eee;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }

    .venue-action-btn:last-child {
      border-right: none;
    }

    .venue-action-btn:active {
      background: #f5f5f5;
    }

    /* ── Follow Section（アイコンのみ横並び） ── */
    .follow-row {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 36px;
      padding: 12px 0 4px;
    }

    .follow-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 48px;
      height: 48px;
      text-decoration: none;
      transition: transform .15s ease, opacity .15s ease;
    }

    .follow-icon img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }

    .follow-icon:hover {
      transform: translateY(-2px);
    }

    .follow-icon:active {
      opacity: .6;
    }

    /* ── スクロール滑らか化 ── */
    html {
      -webkit-overflow-scrolling: touch;
      scroll-behavior: smooth;
    }

    /* ページ描画をGPUレイヤーへ */
    .page.active {
      will-change: auto;
      transform: translateZ(0);
    }

    /* HOME: 最下部の余白を紺で塗りつぶし（最後の section-block の下の白を消す） */
    .page:has(.lucky-section) {
      display: flex;
      flex-direction: column;
      min-height: 100%;
    }

    .page:has(.lucky-section)>.section-block:last-of-type {
      margin-bottom: 0;
    }

    .page:has(.lucky-section)::after {
      content: '';
      flex: 1 1 auto;
      min-height: 0;
      background: #153364;
      margin-top: -1px;
      /* 最後のセクションとの間に髪の毛隙間が出ないように */
    }

    /* モーダルのスクロールがボディに伝播しない */
    .modal-content {
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
    }

    /* タブのちらつき防止 */
    .day-tab {
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
    }


    /* ── Utilities ── */
    .container {
      max-width: 480px;
      margin: 0 auto;
    }

    .empty-state {
      text-align: center;
      padding: 60px 20px;
      color: var(--text-light);
    }

    .empty-state .empty-icon {
      font-size: 48px;
      margin-bottom: 12px;
    }

    .empty-state p {
      font-size: 14px;
      margin-bottom: 16px;
    }

    .empty-state-action {
      background: var(--blue);
      color: #fff;
      border: none;
      border-radius: 22px;
      padding: 10px 22px;
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      min-height: 44px;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
      transition: transform .1s, background .15s;
      box-shadow: 0 3px 12px rgba(15, 52, 96, .3);
    }

    .empty-state-action:hover {
      background: #0a2548;
    }

    .empty-state-action:active {
      transform: scale(.96);
    }

    /* ── Desktop adaptation ── */
    #pc-deco-right {
      display: none;
    }

    #pc-main-logo {
      display: none;
    }

    .pc-marquee {
      display: none;
    }

    /* ── PC Marquee（上下で無限に流れるテキスト） ── */
    @keyframes pc-marquee-ltr {
      from {
        transform: translateX(-50%);
      }

      to {
        transform: translateX(0%);
      }
    }

    @keyframes pc-marquee-rtl {
      from {
        transform: translateX(0%);
      }

      to {
        transform: translateX(-50%);
      }
    }

    /* ══════════════════════════════════════════
   Tablet/PC レイアウト共通変数
   画面幅に応じてレイアウトが破綻しないよう
   全ての PC 装飾配置を CSS 変数で統一管理
   ══════════════════════════════════════════ */
    @media (min-width: 481px) {
      :root {
        /* 端末フレーム（スマホ風） */
        --pc-frame-w: min(400px, calc(100vw - 32px));
        /* サイドバー（左タブ・右デコ）最小幅
           「トーナメントリスト」「メインスケジュール」のラベルが途切れないよう幅を確保 */
        --pc-sidebar-w: clamp(240px, 24vw, 300px);
        /* 端末フレームとサイドバーの余白 */
        --pc-gap: clamp(12px, 2vw, 32px);
        /* ロゴとサイドバーの余白 */
        --pc-logo-gap: clamp(8px, 1.5vw, 32px);
        /* 片側に必要な空間 = サイドバー + gap */
        --pc-side-min: calc(var(--pc-sidebar-w) + var(--pc-gap));
      }

      html,
      body {
        height: 100%;
      }

      body {
        background: #3a6db5;
        padding-bottom: 0;
        overflow: hidden;
        /* 本体スクロールを止めて #app 内でスクロール */
      }

      /* PC/タブレットではヘッダー非表示 */
      .app-header {
        display: none !important;
      }

      /* 上下に流れる無限マーキー */
      .pc-marquee {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        width: 100vw;
        overflow: hidden;
        pointer-events: none;
        z-index: 1;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
      }

      .pc-marquee--top {
        top: 0;
      }

      .pc-marquee--bottom {
        bottom: 0;
      }

      .pc-marquee-track {
        display: flex;
        width: max-content;
        white-space: nowrap;
        will-change: transform;
      }

      .pc-marquee--top .pc-marquee-track {
        animation: pc-marquee-ltr 90s linear infinite;
      }

      .pc-marquee--bottom .pc-marquee-track {
        animation: pc-marquee-rtl 90s linear infinite;
      }

      .pc-marquee-item {
        flex: 0 0 auto;
        padding: 18px 48px;
        font-family: 'Inter', 'Noto Sans JP', sans-serif;
        font-size: clamp(28px, 4.2vw, 64px);
        font-weight: 900;
        letter-spacing: .04em;
        line-height: 1;
        color: transparent;
        -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.55);
        text-stroke: 1.5px rgba(255, 255, 255, 0.55);
        user-select: none;
      }

      .pc-marquee-item .dot {
        display: inline-block;
        margin: 0 22px;
        color: rgba(255, 255, 255, 0.55);
        -webkit-text-stroke: 0;
      }

      /* #app は角丸の長方形フレームのみ（スマホっぽい外枠だけ） */
      #app {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: var(--pc-frame-w);
        max-width: 400px;
        height: min(840px, calc(100vh - 40px));
        min-height: unset;
        margin: 0;
        background: var(--surface-alt);
        border-radius: 36px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
        z-index: 10;
      }

      /* main を内部スクロール領域にする */
      main {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 0;
        -webkit-overflow-scrolling: touch;
        /* 端で止めて、バウンス・ボディへのスクロール伝播を防ぐ */
        overscroll-behavior: none;
        overscroll-behavior-y: none;
      }

      /* day-tabs の sticky 基準はヘッダー不在につき 0 */
      .day-tabs {
        top: 0 !important;
      }

      /* PC 左サイドメインロゴ（タブバーの左・上下中央）
     中央の端末フレーム(--pc-frame-w)・サイドバー(--pc-sidebar-w)・余白(--pc-gap, --pc-logo-gap)
     を累積した位置に配置。幅は使用可能空間を超えないよう min() でクランプ */
      #pc-main-logo {
        display: block;
        position: fixed;
        top: 50%;
        /* 画面中央から左へ: フレーム半分 + 余白 + サイドバー + ロゴ余白 */
        right: calc(50% + (var(--pc-frame-w) / 2) + var(--pc-gap) + var(--pc-sidebar-w) + var(--pc-logo-gap));
        transform: translateY(-50%);
        /* ロゴ幅 = 「左側空き領域 - サイドバー - 余白 - 最低マージン」を超えない */
        width: min(220px,
            calc((100vw - var(--pc-frame-w)) / 2 - var(--pc-gap) - var(--pc-sidebar-w) - var(--pc-logo-gap) - 24px));
        height: auto;
        z-index: 50;
        user-select: none;
        cursor: pointer;
        transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), filter .25s ease;
        transform-origin: center center;
        will-change: transform;
      }

      /* 画面が狭い場合はロゴを隠して破綻を防ぐ（端末フレーム+両サイドバー+ロゴ2つ分） */
      @media (max-width: 1279px) {
        #pc-main-logo {
          display: none !important;
        }
      }

      #pc-main-logo:hover {
        transform: translateY(-50%) scale(1.08);
        filter: drop-shadow(0 6px 24px rgba(255, 216, 77, .35));
      }

      #pc-main-logo:focus-visible {
        outline: 3px solid #ffd84d;
        outline-offset: 6px;
        border-radius: 12px;
        transform: translateY(-50%) scale(1.08);
      }

      #pc-main-logo:active {
        transform: translateY(-50%) scale(.96);
      }

      #pc-main-logo.spinning {
        animation: pc-main-logo-spin .9s cubic-bezier(.34, 1.56, .64, 1);
      }

      @keyframes pc-main-logo-spin {
        0% {
          transform: translateY(-50%) rotate(0deg) scale(1);
        }

        50% {
          transform: translateY(-50%) rotate(180deg) scale(1.12);
        }

        100% {
          transform: translateY(-50%) rotate(360deg) scale(1);
        }
      }

      /* PC: タブバーを左側縦型メニューに変更
     端末フレーム(--pc-frame-w)の左隣にサイドバー(--pc-sidebar-w)を配置 */
      .tab-bar {
        position: fixed;
        top: 50%;
        left: auto;
        right: calc(50% + (var(--pc-frame-w) / 2) + var(--pc-gap));
        bottom: auto;
        transform: translateY(-50%);
        width: var(--pc-sidebar-w);
        min-width: 240px;
        max-width: 300px;
        height: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 18px 14px;
        border-top: none;
        border: 2px solid #3a6db5;
        border-radius: 20px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
        gap: 4px;
      }

      /* 画面が極端に狭い場合はサイドタブを隠してスマホ表示にフォールバック
         サイドバー幅を広げたので、フレーム+gap+サイドバーが左半分に収まる閾値まで引き上げる */
      @media (max-width: 940px) {
        body {
          overflow: auto !important;
        }

        .app-header {
          display: flex !important;
        }

        .tab-bar {
          position: fixed !important;
          top: auto !important;
          bottom: 0 !important;
          left: 0 !important;
          right: 0 !important;
          transform: none !important;
          width: auto !important;
          min-width: 0 !important;
          max-width: none !important;
          height: calc(var(--tab-height) + var(--safe-bottom)) !important;
          flex-direction: row !important;
          border-radius: 0 !important;
          border: none !important;
          border-top: 1px solid var(--border) !important;
          padding: 0 !important;
          box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06) !important;
          background: #fff !important;
        }

        #app {
          position: static !important;
          transform: none !important;
          width: 100% !important;
          max-width: 100% !important;
          height: auto !important;
          min-height: 100vh !important;
          border-radius: 0 !important;
          box-shadow: none !important;
          background: var(--surface-alt) !important;
        }

        #pc-deco-right {
          display: none !important;
        }

        .pc-marquee {
          display: none !important;
        }

        main {
          padding-top: calc(var(--header-height) + var(--safe-top)) !important;
        }
      }

      .tab-bar .tab-item {
        flex: 0 0 auto;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 14px 14px;
        border-radius: 12px;
        width: 100%;
        color: #153364;
        font-weight: 700;
      }

      .tab-bar .tab-item:hover {
        background: #eef3fa;
      }

      .tab-bar .tab-item.active {
        background: #eef3fa;
        color: var(--accent);
      }

      .tab-bar .tab-item .tab-icon {
        font-size: 22px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }

      .tab-bar .tab-item .tab-svg-icon {
        width: 28px;
        height: 28px;
        opacity: 0.8;
      }

      .tab-bar .tab-item.active .tab-svg-icon {
        opacity: 1;
      }

      .tab-bar .tab-item .tab-label {
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 0;
        /* PC サイドバーでは省略せず全文表示 */
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
      }

      /* モーダルは #app の transform により #app 内に収まる */
      .modal-overlay {
        max-width: unset;
        left: 0;
        transform: none;
      }

      /* ── PC Right Deco Panel ──
     端末フレーム(--pc-frame-w)の右隣に配置。画面幅が足りなければ縮退 */
      #pc-deco-right {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 50%;
        transform: translateY(-50%);
        left: calc(50% + (var(--pc-frame-w) / 2) + var(--pc-gap));
        width: calc((100vw - var(--pc-frame-w)) / 2 - var(--pc-gap) * 2);
        max-width: 600px;
        min-width: 220px;
        max-height: calc(100vh - 80px);
      }

      /* デコパネル用の余白が確保できない画面幅では非表示 */
      @media (max-width: 1100px) {
        #pc-deco-right {
          display: none !important;
        }
      }

      .pc-deco-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 16px;
        width: 100%;
        height: 100%;
        max-height: calc(100vh - 100px);
        padding: 8px;
        box-sizing: border-box;
      }

      .pc-deco-cell {
        position: relative;
        overflow: visible;
        min-height: 0;
        cursor: pointer;
        perspective: 600px;
      }

      .pc-deco-card {
        width: 100%;
        height: 100%;
        border-radius: 14px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.08);
        transform-style: preserve-3d;
        transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
        will-change: transform;
      }

      .pc-deco-cell:hover .pc-deco-card {
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
      }

      .pc-deco-bg {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        pointer-events: none;
      }

      /* キャラクター：カード上端から飛び出す */
      .pc-deco-chara {
        position: absolute;
        bottom: 50%;
        left: 50%;
        transform: translateX(-50%) translateY(60%) scale(0.7);
        width: 75%;
        z-index: 20;
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
        filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
        object-fit: contain;
      }

      .pc-deco-cell:hover .pc-deco-chara {
        opacity: 1;
        transform: translateX(-50%) translateY(-30%) scale(1.05);
      }

      /* 下段（3番目・4番目）は下方向に飛び出す */
      .pc-deco-grid>.pc-deco-cell:nth-child(3) .pc-deco-chara,
      .pc-deco-grid>.pc-deco-cell:nth-child(4) .pc-deco-chara {
        bottom: auto;
        top: 50%;
        transform: translateX(-50%) translateY(-60%) scale(0.7);
      }

      .pc-deco-grid>.pc-deco-cell:nth-child(3):hover .pc-deco-chara,
      .pc-deco-grid>.pc-deco-cell:nth-child(4):hover .pc-deco-chara {
        transform: translateX(-50%) translateY(30%) scale(1.05);
      }
    }

    /* ═══════════════════════════════════════════
   アクセシビリティ関連
   ═══════════════════════════════════════════ */

    /* スクリーンリーダー専用テキスト（視覚的には隠す） */
    .sr-only {
      position: absolute !important;
      width: 1px !important;
      height: 1px !important;
      padding: 0 !important;
      margin: -1px !important;
      overflow: hidden !important;
      clip: rect(0, 0, 0, 0) !important;
      white-space: nowrap !important;
      border: 0 !important;
    }

    /* スキップリンク（キーボード/スクリーンリーダー向け） */
    .skip-to-main {
      position: fixed;
      top: 8px;
      left: 50%;
      transform: translateX(-50%) translateY(-200%);
      z-index: 10000;
      background: #153364;
      color: #ffd84d;
      padding: 10px 18px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 700;
      font-family: 'Noto Sans JP', sans-serif;
      text-decoration: none;
      box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
      transition: transform .2s ease;
    }

    .skip-to-main:focus {
      transform: translateX(-50%) translateY(0);
      outline: 3px solid #ffd84d;
      outline-offset: 3px;
    }

    /* キーボード操作時のフォーカスリング（マウス操作時には出さない） */
    :focus {
      outline: none;
    }

    a:focus-visible,
    button:focus-visible,
    [role="button"]:focus-visible,
    .tab-item:focus-visible,
    .day-tab:focus-visible,
    .follow-icon:focus-visible,
    .interview-card:focus-visible,
    .lucky-draw-btn:focus-visible,
    .modal-close-x:focus-visible,
    .banner-dots>*:focus-visible,
    .venue-map-link:focus-visible {
      outline: 3px solid #ffd84d;
      outline-offset: 3px;
      border-radius: 6px;
    }

    .tab-item:focus-visible {
      outline-offset: -3px;
      border-radius: 10px;
    }

    .interview-card:focus-visible {
      outline-offset: 4px;
    }

    /* ラベルのコントラスト：スート色アクセントが付くので個別指定（色は section-block 側で上書き） */

    /* 画像が遷移中のガタつき防止 */
    img {
      max-width: 100%;
    }

    /* モーション抑制ユーザー向け：アニメーション停止 */
    @media (prefers-reduced-motion: reduce) {

      *,
      *::before,
      *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
      }

      /* マーキューは完全停止 */
      .pc-marquee-track {
        animation: none !important;
        transform: none !important;
      }

      /* バナースライダーの自動めくりは JS 側で止めるのが理想だが、
     アニメーション無効化で視覚上は瞬間切替になる */
      .banner-track {
        transition: none !important;
      }

      /* ラッキーハンドのカードめくり等の装飾的な動きも即時反映 */
      .playing-card-inner {
        transition: none !important;
      }

      /* PC デコ画像のホバー浮き上がりも静止 */
      .pc-deco-card,
      .pc-deco-chara {
        transition: none !important;
      }

      /* メインロゴの回転・拡大は無効化（translateY(-50%) の静的変形は保持） */
      #pc-main-logo {
        transition: none !important;
        animation: none !important;
        transform: translateY(-50%) !important;
      }
    }

    /* ============================================================
       ひみつのじゅもん — 入口トリガー（SPADIE 占いの下）
       ============================================================ */
    .secret-trigger-wrap {
      display: flex;
      justify-content: center;
      margin: -8px 0 24px;
    }

    .secret-trigger {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      min-width: 96px;
      padding: 8px 18px;
      background: transparent;
      color: var(--text-light);
      border: 1.5px dashed var(--text-light);
      border-radius: 9999px;
      font-family: 'Courier New', 'MS Gothic', 'Osaka-Mono', monospace;
      font-size: 14px;
      font-weight: 800;
      letter-spacing: 4px;
      cursor: pointer;
      opacity: 0.6;
      -webkit-tap-highlight-color: transparent;
      transition: opacity 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
    }

    .secret-trigger:hover,
    .secret-trigger:focus-visible {
      opacity: 1;
      color: var(--primary);
      border-color: var(--primary);
      outline: none;
    }

    .secret-trigger:active {
      transform: scale(0.96);
    }

    /* ============================================================
       ひみつのじゅもん — ドラクエ風 8bit 入力モーダル
       #secret ハッシュ起動 → じゅもん入力 → 正解時に写真を表示
       ============================================================ */
    .spell-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 2000;
      padding: 16px;
      /* iOS safe-area 対応 */
      padding-top: calc(16px + env(safe-area-inset-top, 0px));
      padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .spell-overlay.active {
      display: flex;
    }

    .spell-window {
      background: #000;
      color: #fff;
      border: 3px solid #fff;
      border-radius: 8px;
      box-shadow: 0 0 0 6px #000, 0 0 0 9px #fff, 0 16px 40px rgba(0, 0, 0, 0.6);
      padding: 24px 22px;
      width: 100%;
      max-width: 360px;
      font-family: 'Courier New', 'DotGothic16', 'MS Gothic', 'Osaka-Mono', monospace;
      font-weight: 700;
      letter-spacing: 1px;
      line-height: 1.7;
    }

    .spell-title {
      font-size: 13px;
      color: #ffe04d;
      margin: 0 0 10px;
      letter-spacing: 2px;
    }

    .spell-text {
      font-size: 15px;
      line-height: 1.8;
      min-height: 3.2em;
      margin: 0 0 14px;
      white-space: pre-wrap;
    }

    .spell-text .caret {
      display: inline-block;
      width: 0.6em;
      height: 1em;
      background: #fff;
      vertical-align: -2px;
      margin-left: 2px;
      animation: spell-caret 0.9s steps(2, end) infinite;
    }

    @keyframes spell-caret {

      0%,
      50% {
        opacity: 1;
      }

      50.01%,
      100% {
        opacity: 0;
      }
    }

    .spell-input {
      width: 100%;
      background: #000;
      color: #fff;
      border: 2px solid #fff;
      border-radius: 4px;
      padding: 10px 12px;
      font-family: inherit;
      font-size: 16px;
      /* iOS ズーム回避のため 16px 以上 */
      font-weight: 700;
      letter-spacing: 2px;
      outline: none;
      box-sizing: border-box;
      -webkit-appearance: none;
      ime-mode: active;
    }

    .spell-input:focus {
      border-color: #ffe04d;
      box-shadow: 0 0 0 2px rgba(255, 224, 77, 0.25);
    }

    .spell-btns {
      display: flex;
      gap: 10px;
      margin-top: 14px;
    }

    .spell-btn {
      flex: 1 1 0;
      background: #000;
      color: #fff;
      border: 2px solid #fff;
      border-radius: 4px;
      padding: 10px 8px;
      font-family: inherit;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 2px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform 0.08s, background 0.15s, color 0.15s;
    }

    .spell-btn:hover,
    .spell-btn:focus-visible {
      background: #ffe04d;
      color: #000;
      outline: none;
    }

    .spell-btn:active {
      transform: scale(0.96);
    }

    .spell-btn.primary {
      color: #ffe04d;
      border-color: #ffe04d;
    }

    .spell-btn.primary:hover,
    .spell-btn.primary:focus-visible {
      background: #ffe04d;
      color: #000;
    }

    .spell-window.shake {
      animation: spell-shake 0.4s;
    }

    @keyframes spell-shake {

      0%,
      100% {
        transform: translateX(0);
      }

      20% {
        transform: translateX(-6px);
      }

      40% {
        transform: translateX(6px);
      }

      60% {
        transform: translateX(-4px);
      }

      80% {
        transform: translateX(4px);
      }
    }

    /* ── 写真モーダル（正解時） ── */
    .spell-photo-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.94);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 2100;
      padding: 16px;
    }

    .spell-photo-overlay.active {
      display: flex;
    }

    .spell-photo-wrap {
      position: relative;
      max-width: 100%;
      max-height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .spell-photo-img {
      max-width: 100%;
      max-height: calc(100vh - 160px);
      max-height: calc(100svh - 160px);
      object-fit: contain;
      border-radius: 6px;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
      animation: spell-photo-pop 0.35s cubic-bezier(0.18, 0.9, 0.32, 1.2);
    }

    @keyframes spell-photo-pop {
      0% {
        transform: scale(0.6);
        opacity: 0;
      }

      100% {
        transform: scale(1);
        opacity: 1;
      }
    }

    .spell-photo-close {
      position: absolute;
      top: -8px;
      right: -8px;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: #fff;
      color: #000;
      border: none;
      font-size: 22px;
      font-weight: 800;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
      -webkit-tap-highlight-color: transparent;
    }

    .spell-photo-caption {
      position: absolute;
      top: 100%;
      margin-top: 12px;
      left: 0;
      right: 0;
      text-align: center;
      color: #ffe04d;
      font-family: 'Courier New', 'DotGothic16', 'MS Gothic', 'Osaka-Mono', monospace;
      font-weight: 700;
      font-size: 20px;
      letter-spacing: 3px;
      line-height: 1.4;
    }
