:root{
      color-scheme: dark;
      --panel: rgba(15, 18, 28, 0.72);
      --line: rgba(255, 255, 255, 0.14);
      --text: #f4f7fb;
      --muted: rgba(244, 247, 251, 0.62);
      --accent: #35e8c5;
      --warn: #ff6f91;
      --dev-hud-gap: 2px;
      /* 1vw / 1vh 相当の px。JS(updateLayout)が window.innerWidth/innerHeight から上書きし、
         背景(WebGLキャンバス)と同一の計測値で playfield 矩形を組む。CSS の 100vh/100vw は iOS の
         回転後に JS の innerHeight と食い違う(large/visual viewport)ため、ここで一本化する。 */
      --vw: 1vw;
      --vh: 1vh;
      --playfield-width: min(
        calc(var(--vw) * 100 - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)),
        calc(var(--vh) * 57.325)
      );
      --playfield-height: calc(var(--playfield-width) * 1.666667);
    }
*{
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
      /* iOS の長押し/ドラッグが「テキスト選択」ジェスチャになると、選択ハイライトが出るだけでなく
         合成 click が別要素(⚙設定ボタン等)へズレて飛び、設定が"勝手に開く"原因になっていた。
         iOS Safari は無印 user-select を 16.4 未満で無視するため -webkit- 必須。callout も無効化する。 */
      -webkit-touch-callout: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
    }
html,
    body{
      width: 100%;
      height: 100%;
      margin: 0;
      overflow: hidden;
      touch-action: none;
      background: #080a11;
      color: var(--text);
      font-family: ui-rounded, "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
    }
canvas{
      position: fixed;
      inset: 0;
      display: block;
      cursor: crosshair;
      /* ゲーム面でのダブルタップ拡大/パン等のブラウザ既定ジェスチャを無効化(iOSの部分拡大対策)。 */
      touch-action: none;
    }
.hud{
      position: fixed;
      z-index: 5;
      top: 50%;
      left: 50%;
      width: var(--playfield-width);
      height: calc(var(--playfield-width) * 1.666667);
      transform: translate(-50%, -50%);
      pointer-events: none;
    }
#app-version{
      display: block; /* 版＋ビルド番号は公開版でも常時表示（不具合報告の切り分け用） */
      position: fixed;
      left: calc((var(--vw) * 100 - var(--playfield-width)) / 2);
      bottom: max(
        calc(2px + env(safe-area-inset-bottom, 0px)),
        calc((var(--vh) * 100 - var(--playfield-height)) / 2 - 1em - var(--dev-hud-gap))
      );
      z-index: 10;
      pointer-events: none;
      font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
      letter-spacing: 0.5px;
      color: rgba(255, 255, 255, 0.55);
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
      user-select: none;
    }
.panel{
      background: var(--panel);
      border: 1px solid var(--line);
      box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }
.player-hud{
      position: absolute;
      top: 15px;
      right: 10px;
      left: 10px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
    }
.round-timer{
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-width: 54px;
      margin-left: 1ch;
      padding: 0 2px;
      color: #075064;
      text-align: center;
      line-height: 1;
      transform-origin: center;
      transition: color 200ms ease;
    }
.round-timer-label{
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.04em;
      margin-bottom: 1px;
      opacity: 0.82;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
    }
.round-timer .round-time{
      display: block;
      font-size: 32px;
      font-weight: 1000;
      font-variant-numeric: tabular-nums;
      line-height: 1;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85), 0 2px 8px rgba(0, 75, 110, 0.28);
      /* 拡大は「上端」を基点に下へ伸ばす。center bottom だと拡大時に上の「のこり」へ
         数字がめり込むので、origin を top にして必ず下方向（盤面側）へ広げる。 */
      transform-origin: center top;
      transition: transform 200ms ease;
    }
.round-timer[hidden]{
      display: none;
    }
.round-timer.is-zero{
      visibility: hidden;
    }
.round-timer.is-danger{
      color: #c43a2d;
    }
.round-timer.is-danger .round-time{
      transform: translateY(3px) scale(1.35);
    }
.round-timer.is-final{
      color: #d62f43;
    }
.round-timer.is-final .round-time{
      transform: translateY(6px) scale(2.15);
      animation: timer-final-blink 0.55s ease-in-out infinite;
    }


    @keyframes timer-final-blink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.2; }
    }.round-announcement,
    .chain-effect{
      position: absolute;
      z-index: 4;
      left: 50%;
      pointer-events: none;
      user-select: none;
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.65);
      font-weight: 1000;
      line-height: 1;
      white-space: nowrap;
      text-align: center;
    }
.round-announcement{
      top: 43%;
      color: #fff;
      font-size: clamp(58px, 15vw, 104px);
      letter-spacing: 0.05em;
      text-shadow:
        0 5px 0 rgba(4, 79, 99, 0.7),
        0 10px 28px rgba(0, 42, 70, 0.48);
    }
.round-announcement[data-mode="start"]{
      color: #dffff9;
    }
.round-announcement[data-mode="timeup"]{
      color: #fff2ba;
      font-size: clamp(42px, 11vw, 76px);
    }
.round-announcement.is-showing{
      animation: round-announcement-pop 0.88s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
.round-announcement[data-mode="start"].is-showing{
      animation-duration: 1.15s;
    }
.round-announcement[data-mode="timeup"].is-showing{
      animation: round-announcement-hold 0.95s cubic-bezier(0.16, 1, 0.3, 1) both;
    }


    @keyframes round-announcement-hold {
      0% { opacity: 0; transform: translate(-50%, -50%) scale(0.45) rotate(-5deg); }
      28% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(1deg); }
      62% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
      100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    }.chain-effect{
      top: 34%;
      color: #f3fffd;
      font-size: clamp(34px, 8vw, 54px);
      font-style: italic;
      -webkit-text-stroke: 1px #22667a;
      text-shadow:
        0 3px 0 #287c91,
        0 5px 14px rgba(6, 49, 72, 0.42);
    }
.chain-effect.is-showing{
      animation: chain-effect-pop 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
    }


    @keyframes timer-danger-pulse {
      0%, 100% { filter: brightness(1); }
      50% { filter: brightness(1.22); }
    }

    @keyframes round-announcement-pop {
      0% { opacity: 0; transform: translate(-50%, -50%) scale(0.45) rotate(-5deg); }
      22% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(1deg); }
      62% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
      100% { opacity: 0; transform: translate(-50%, -62%) scale(0.92); }
    }

    @keyframes chain-effect-pop {
      0% { opacity: 0; transform: translate(-50%, -50%) scale(0.35) rotate(-8deg); }
      24% { opacity: 1; transform: translate(-50%, -50%) scale(1.16) rotate(2deg); }
      66% { opacity: 1; transform: translate(-50%, -55%) scale(1); }
      100% { opacity: 0; transform: translate(-50%, -82%) scale(0.86); }
    }.round-announcement[data-mode="countdown"]{
      color: #dffff9;
      font-size: clamp(86px, 24vw, 168px);
      letter-spacing: 0;
    }
.round-announcement[data-mode="countdown"].is-showing{
      animation: round-announcement-count 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
    }


    @keyframes round-announcement-count {
      0% { opacity: 0; transform: translate(-50%, -50%) scale(1.55); }
      28% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
      72% { opacity: 1; transform: translate(-50%, -50%) scale(0.98); }
      100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    }.replay-tap{
      position: absolute;
      z-index: 5;
      width: 110px;
      height: 110px;
      margin: -55px 0 0 -55px;
      border-radius: 50%;
      border: 4px solid rgba(53, 223, 244, 0.92);
      box-shadow: 0 0 16px rgba(53, 223, 244, 0.55);
      pointer-events: none;
      opacity: 0;
    }
.replay-tap.is-showing{
      animation: replay-tap-ping 0.6s ease-out both;
    }

    @keyframes replay-tap-ping {
      0% { transform: scale(0.18); opacity: 0.95; }
      100% { transform: scale(1); opacity: 0; }
    }.rotate-prompt{
      position: fixed;
      inset: 0;
      z-index: 60;
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 20px;
      background: #080a11;
      color: #eaf6ff;
      text-align: center;
      padding: 32px;
    }
.rotate-prompt-icon{
      font-size: 76px;
      line-height: 1;
      animation: rotate-prompt-hint 2.4s ease-in-out infinite;
    }
.rotate-prompt-text{
      font-size: 20px;
      font-weight: 800;
      max-width: 16em;
      line-height: 1.55;
    }

    @keyframes rotate-prompt-hint {
      0%, 55%, 100% { transform: rotate(0deg); }
      75%, 95% { transform: rotate(-90deg); }
    }
    /* タッチ端末を横向きにしたときだけ前面に出す（PC の横長ウィンドウは対象外）。 */
    @media (orientation: landscape) and (pointer: coarse) {.rotate-prompt{ display: flex; }

    }.player-stats,
    .player-controls{
      display: flex;
      align-items: center;
      gap: 6px;
    }
.player-stat{
      position: relative;
      min-width: 86px;
      height: 48px;
      padding: 6px 12px 5px;
      overflow: hidden;
      display: grid;
      align-content: center;
      gap: 1px;
      border: 1px solid rgba(255, 255, 255, 0.78);
      border-radius: 15px;
      color: #075064;
      background:
        radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.82) 0 3px, transparent 4px),
        linear-gradient(180deg, rgba(244, 255, 255, 0.91), rgba(157, 235, 240, 0.76));
      box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.74),
        inset 0 -3px 7px rgba(21, 147, 174, 0.13),
        0 5px 14px rgba(0, 75, 110, 0.22);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
.player-stat.best-stat{
      min-width: 86px;
    }
.player-label{
      font-size: 8px;
      font-weight: 900;
      letter-spacing: 0.09em;
      color: rgba(5, 82, 102, 0.72);
      text-transform: uppercase;
    }
.player-value{
      font-variant-numeric: tabular-nums;
      font-weight: 950;
      font-size: 22px;
      line-height: 1;
      letter-spacing: -0.02em;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
    }
.game-control{
      position: relative;
      width: 44px;
      height: 44px;
      padding: 0;
      display: grid;
      place-items: center;
      border: 1px solid rgba(255, 255, 255, 0.86);
      border-radius: 50%;
      color: #075064;
      background:
        radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.96) 0 4px, transparent 5px),
        linear-gradient(155deg, rgba(230, 255, 255, 0.94), rgba(74, 211, 224, 0.88));
      box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.78),
        inset 0 -4px 8px rgba(0, 111, 145, 0.16),
        0 5px 14px rgba(0, 75, 110, 0.24);
      pointer-events: auto;
      transition: transform 120ms ease, filter 120ms ease;
    }
.game-control:hover{
      filter: brightness(1.06);
    }
.game-control:active{
      transform: scale(0.91);
    }
.game-control:focus-visible{
      outline: 2px solid #fff;
      outline-offset: 2px;
    }
.ai-player-hud{
      position: absolute;
      z-index: 5;
      top: 70px;
      left: 50%;
      min-width: 188px;
      max-width: min(82vw, 360px);
      padding: 7px 13px;
      transform: translateX(-50%);
      border: 1px solid rgba(126, 249, 231, 0.74);
      border-radius: 999px;
      color: #eafffb;
      background: rgba(8, 30, 42, 0.82);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.26);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      font-size: 12px;
      font-weight: 900;
      line-height: 1.25;
      letter-spacing: 0.035em;
      text-align: center;
      white-space: nowrap;
      pointer-events: none;
    }
.ai-player-hud[hidden]{ display: none; }
.pause-icon{
      position: relative;
      width: 18px;
      height: 19px;
    }
.pause-icon::before,
    .pause-icon::after{
      content: "";
      position: absolute;
      top: 1px;
      width: 5px;
      height: 17px;
      border-radius: 3px;
      background: currentColor;
      box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    }
.pause-icon::before{
      left: 2px;
    }
.pause-icon::after{
      right: 2px;
    }
.game-control.is-paused .pause-icon::before{
      top: 1px;
      left: 3px;
      width: 0;
      height: 0;
      border-top: 9px solid transparent;
      border-bottom: 9px solid transparent;
      border-left: 14px solid currentColor;
      border-radius: 2px;
      background: transparent;
      box-shadow: none;
    }
.game-control.is-paused .pause-icon::after{
      display: none;
    }
.restart-icon{
      margin-top: -2px;
      font: 900 29px/1 Arial, sans-serif;
    }
.sr-only{
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
button{
      appearance: none;
      border: 0;
      color: var(--text);
      background: transparent;
      font: inherit;
      cursor: pointer;
    }
.button{
      height: 40px;
      min-width: 42px;
      border-radius: 8px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--line);
      /* Opaque panel tint (not faint white) so button labels stay legible over the
         bright water-tank background, not just the dark desktop margins. */
      background: var(--panel);
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      font-weight: 800;
      pointer-events: auto;
      white-space: nowrap;
    }
.button:hover{
      background: rgba(38, 47, 77, 0.86);
    }
.button.primary{
      background: linear-gradient(135deg, #35e8c5, #4f8cff);
      color: #071014;
      font-weight: 900;
      padding-inline: 14px;
    }
.panel{
      position: fixed;
      z-index: 6;
      left: calc(14px + env(safe-area-inset-left, 0px));
      bottom: calc(14px + env(safe-area-inset-bottom, 0px));
      width: min(360px, calc(100vw - 28px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
      border-radius: 8px;
      padding: 12px;
      display: grid;
      gap: 10px;
      pointer-events: auto;
    }
.game-over-ranking-list{
      list-style: none;
      margin: 0;
      padding: 0;
      max-height: 220px;
      overflow-y: auto;
      display: grid;
      gap: 4px;
    }
.ranking-row{
      min-height: 27px;
      display: grid;
      grid-template-columns: 26px minmax(0, 1fr) 76px 34px 50px;
      gap: 6px;
      align-items: center;
      padding: 4px 7px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.46);
      font-size: 12px;
      font-weight: 800;
    }
.ranking-row.top-rank{
      background: rgba(255, 255, 255, 0.72);
    }
.ranking-row.is-me{
      outline: 2px solid rgba(53, 232, 197, 0.7);
      background: rgba(186, 255, 245, 0.72);
    }
.ranking-rank{
      font-variant-numeric: tabular-nums;
      color: #087082;
      text-align: center;
    }
.ranking-name{
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
.ranking-score{
      justify-self: end;
      text-align: right;
      font-variant-numeric: tabular-nums;
      color: #042f38;
      font-size: 14px;
      font-weight: 950;
      white-space: nowrap;
    }
.ranking-chain{
      justify-self: start;
      color: #d25358;
      font-size: 11px;
      font-weight: 1000;
      font-variant-numeric: tabular-nums;
      text-align: left;
    }
.ranking-replay{
      justify-self: start;
      min-width: 44px;
      height: 24px;
      padding: 0 9px;
      border-radius: 999px;
      color: #064352;
      background: linear-gradient(135deg, #a9fff1, #a8d9ff);
      border: 1px solid rgba(24, 169, 184, 0.28);
      font-size: 11px;
      font-weight: 900;
      line-height: 1;
    }
.ranking-replay:disabled{
      opacity: 0.58;
    }
.ranking-empty,
    .game-over-rank{
      border-radius: 10px;
      padding: 7px 8px;
      background: rgba(255, 255, 255, 0.44);
      color: rgba(6, 67, 82, 0.78);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.35;
    }
.game-over-top10{
      border-radius: 10px;
      padding: 7px 10px;
      text-align: center;
      font-size: 13px;
      font-weight: 950;
      color: #08474f;
      background: linear-gradient(180deg, rgba(64, 224, 200, 0.92), rgba(190, 245, 238, 0.86));
      border: 1px solid rgba(255, 255, 255, 0.7);
      box-shadow: 0 4px 12px rgba(0, 120, 120, 0.18);
    }
.game-over-top10[hidden]{ display: none; }
.game-over-card{
      pointer-events: auto;
      position: relative;
      width: min(350px, calc(100vw - 34px));
      display: grid;
      gap: 10px;
      padding: 17px;
      border-radius: 18px;
      background: rgba(232, 255, 255, 0.84);
      border: 1px solid rgba(255, 255, 255, 0.78);
      color: #064352;
      text-align: center;
      box-shadow: 0 22px 56px rgba(0, 60, 90, 0.24);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
    }
.game-over-close{
      position: absolute;
      top: 10px;
      right: 10px;
      width: 34px;
      height: 34px;
      padding: 0;
      border-radius: 50%;
      color: #075064;
      background: rgba(255, 255, 255, 0.76);
      border: 1px solid rgba(7, 80, 100, 0.14);
      font-size: 20px;
      font-weight: 900;
      box-shadow: 0 4px 12px rgba(0, 75, 110, 0.14);
    }
.game-over-kicker{
      color: #087082;
      font-size: 11px;
      font-weight: 900;
      letter-spacing: 0.16em;
    }
.game-over-card h1{
      margin: 0;
      font-size: 23px;
      line-height: 1.1;
      color: #053943;
    }
.game-over-score{
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: end;
      padding: 10px 12px;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.56);
      text-align: left;
    }
.game-over-score span{
      color: rgba(6, 67, 82, 0.72);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }
.game-over-score strong{
      font-size: 32px;
      line-height: 0.95;
      font-variant-numeric: tabular-nums;
      color: #042f38;
    }
.game-over-score .final-chain{
      color: #d25358;
      font-size: 24px;
    }
.game-over-share{
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px;
    }
.game-over-share .button{
      min-width: 0;
      height: 38px;
      padding-inline: 10px;
      border-color: rgba(6, 67, 82, 0.15);
      color: #064352;
      background: rgba(255, 255, 255, 0.62);
      box-shadow: 0 5px 14px rgba(0, 75, 110, 0.12);
      font-size: 13px;
      touch-action: manipulation;
    }
.game-over-share .button:hover{
      background: rgba(255, 255, 255, 0.82);
    }
.game-over-share .button:disabled{
      cursor: wait;
      opacity: 0.58;
    }
.game-over-share .result-share-primary{
      grid-column: 1 / -1;
      color: #063e42;
      background: linear-gradient(135deg, rgba(53, 232, 197, 0.82), rgba(79, 140, 255, 0.72));
    }
.game-over-share-status{
      min-height: 17px;
      margin: -3px 0 0;
      color: rgba(6, 67, 82, 0.72);
      font-size: 11px;
      font-weight: 800;
      line-height: 1.4;
    }
.game-over-copy-fallback{
      width: 100%;
      min-height: 58px;
      resize: none;
      padding: 8px 10px;
      border: 1px solid rgba(6, 67, 82, 0.18);
      border-radius: 10px;
      color: #064352;
      background: rgba(255, 255, 255, 0.76);
      font: 700 11px/1.45 "Hiragino Sans", system-ui, sans-serif;
    }
.game-over-copy-fallback[hidden]{
      display: none;
    }
.result-sheet-studio{
      position: fixed;
      inset: 0;
      z-index: 30;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: max(14px, env(safe-area-inset-top, 0px)) 14px max(14px, env(safe-area-inset-bottom, 0px));
      background: rgba(2, 14, 28, 0.86);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      pointer-events: auto;
    }
.result-sheet-studio[hidden]{
      display: none;
    }
.result-sheet-studio-card{
      position: relative;
      width: min(430px, calc(100vw - 28px));
      max-height: calc(100vh - 28px);
      display: grid;
      gap: 9px;
      justify-items: center;
      padding: 12px;
      border: 1px solid rgba(255, 255, 255, 0.28);
      border-radius: 22px;
      background: rgba(6, 38, 62, 0.92);
      box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
    }
.result-sheet-studio-close{
      position: absolute;
      z-index: 2;
      top: 8px;
      right: 8px;
      width: 34px;
      height: 34px;
      border-radius: 999px;
      color: #073b4a;
      background: rgba(244, 255, 255, 0.88);
      font-size: 20px;
      font-weight: 900;
      box-shadow: 0 5px 16px rgba(0, 0, 0, 0.24);
    }
.result-sheet-studio-canvas{
      position: static;
      inset: auto;
      display: block;
      width: min(100%, calc((100vh - 150px) * 0.8), 504px);
      height: auto;
      aspect-ratio: 4 / 5;
      border-radius: 16px;
      background: #168ebd;
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
      cursor: default;
    }
.result-sheet-studio-status{
      min-height: 20px;
      margin: 0;
      color: #e9ffff;
      font-size: 13px;
      font-weight: 900;
      text-align: center;
    }
.result-sheet-studio-actions{
      width: 100%;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px;
    }
.result-sheet-studio-actions[hidden]{
      display: none;
    }
.result-sheet-studio-actions .button{
      min-width: 0;
      height: 38px;
      color: #073b4a;
      background: rgba(239, 255, 255, 0.88);
      font-size: 13px;
      box-shadow: 0 5px 14px rgba(0, 0, 0, 0.2);
    }
.result-sheet-studio-actions .primary{
      grid-column: 1 / -1;
    }
.panel.collapsed{
      display: none;
    }
.row{
      display: grid;
      grid-template-columns: 86px 1fr 44px;
      gap: 10px;
      align-items: center;
    }
.row.face-row{
      grid-template-columns: 86px 1fr 116px;
    }
.row.face-row .value{
      font-size: 11px;
      line-height: 1.2;
      text-align: right;
      overflow-wrap: anywhere;
    }
.face-preview-tools{
      display: grid;
      gap: 8px;
    }
#face-preview-toggle{
      height: 32px;
      border-radius: 8px;
      border: 1px solid rgba(170, 198, 255, 0.24);
      background: rgba(18, 24, 38, 0.92);
      color: #eaf2ff;
      font-weight: 800;
      cursor: pointer;
    }
.face-preview-lab.collapsed{
      display: none;
    }
#face-preview-grid{
      display: grid;
      gap: 8px;
    }
.face-preview-row{
      display: grid;
      grid-template-columns: 92px repeat(3, minmax(72px, 1fr));
      gap: 6px;
      align-items: center;
    }
.face-preview-state{
      color: #aebad3;
      font-size: 10px;
      font-weight: 800;
      line-height: 1.15;
      overflow-wrap: anywhere;
      white-space: pre-line;
    }
.face-preview-card{
      display: grid;
      gap: 3px;
      padding: 4px;
      border-radius: 8px;
      border: 1px solid rgba(170, 198, 255, 0.16);
      background: rgba(11, 16, 27, 0.86);
      color: #dce8ff;
      cursor: pointer;
    }
.face-preview-card.selected{
      border-color: rgba(49, 240, 216, 0.98);
      box-shadow: 0 0 0 1px rgba(49, 240, 216, 0.22), 0 0 18px rgba(49, 240, 216, 0.18);
    }
.face-preview-canvas{
      position: static;
      inset: auto;
      width: 100%;
      aspect-ratio: 1;
      border-radius: 6px;
      background: rgba(7, 11, 20, 0.86);
      cursor: pointer;
      image-rendering: auto;
    }
.face-preview-label{
      font-size: 10px;
      font-weight: 900;
      line-height: 1.1;
      text-align: center;
      white-space: normal;
    }
.tune-head{
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
.tune-title{
      font-weight: 900;
      font-size: 13px;
      letter-spacing: 0.04em;
    }
#tune-reset{
      height: 30px;
      min-width: 0;
      padding-inline: 12px;
      font-size: 12px;
      font-weight: 800;
    }
.group-label{
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.08em;
      color: var(--accent);
      text-transform: uppercase;
      margin-top: 2px;
    }
.physics-preset-grid{
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
.physics-preset-button{
      min-width: 0;
      height: auto;
      min-height: 58px;
      padding: 8px 10px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      gap: 3px;
      line-height: 1.25;
      text-align: left;
      white-space: normal;
    }
.physics-preset-button.is-active{
      border-color: rgba(53, 232, 197, 0.92);
      background: linear-gradient(135deg, rgba(53, 232, 197, 0.3), rgba(79, 140, 255, 0.3));
      box-shadow: 0 0 0 1px rgba(53, 232, 197, 0.2);
    }
.physics-preset-name{
      color: var(--text);
      font-size: 13px;
      font-weight: 900;
    }
.physics-preset-description{
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
    }
.physics-advanced{
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.025);
    }
.physics-advanced[open]{
      display: grid;
      gap: 10px;
    }
.physics-advanced > summary{
      cursor: pointer;
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
    }
.physics-advanced input:disabled{
      opacity: 0.55;
      cursor: not-allowed;
    }
.tune-head-actions{
      display: flex;
      align-items: center;
      gap: 6px;
    }
#settings-close{
      height: 30px;
      min-width: 0;
      width: 34px;
      padding-inline: 0;
      font-size: 15px;
      font-weight: 800;
    }
.settings-tabs{
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 4px;
    }
.settings-tab{
      min-width: 0;
      height: 30px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.10);
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      border: 1px solid var(--line);
      cursor: pointer;
    }
.settings-tab.is-active{
      background: linear-gradient(135deg, #35e8c5, #4f8cff);
      color: #06231f;
      border-color: transparent;
    }
.tab-page{
      display: none;
      grid-auto-flow: row;
      gap: 10px;
    }
.tab-page.is-active{
      display: grid;
    }
.tab-placeholder{
      font-size: 12px;
      color: var(--muted);
      line-height: 1.55;
      padding: 4px 2px;
    }
.row.select-row{
      grid-template-columns: 96px 1fr;
    }
.row select{
      width: 100%;
      height: 32px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--text);
      font: inherit;
      font-weight: 700;
      padding-inline: 8px;
    }
.row input[type="number"],
    .row input[type="text"]{
      width: 100%;
      height: 32px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--text);
      font: inherit;
      font-weight: 700;
      padding-inline: 8px;
    }
.row.button-pair{
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
    }
.row.button-trio{
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
    }
.row.button-trio .button{
      height: auto;
      min-height: 40px;
      padding: 6px 4px;
      font-size: 12px;
      white-space: normal;
      line-height: 1.3;
      text-align: center;
    }
.param-help{
      margin: -5px 0 2px;
      font-size: 11px;
    }
.param-help summary{
      cursor: pointer;
      font-weight: 700;
      color: var(--accent);
      list-style: none;
    }
.param-help summary::-webkit-details-marker{
      display: none;
    }
.param-help summary::before{
      content: '？ 解説';
    }
.param-help[open] summary::before{
      content: '▾ 解説を閉じる';
    }
.param-help-body{
      margin-top: 4px;
      padding: 6px 8px;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.05);
      color: var(--muted);
      line-height: 1.55;
    }
.settings-footer{
      display: grid;
      gap: 8px;
      margin-top: 4px;
      padding-top: 10px;
      border-top: 1px solid var(--line);
    }
.settings-footer .button{
      width: 100%;
    }
.title-mode-actions{
      display: grid;
      align-items: center;
      justify-content: center;
      gap: 9px;
    }
.title-secondary{
      pointer-events: auto;
      height: 42px;
      min-width: min(210px, 58vw);
      padding-inline: 18px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.4);
      background: rgba(12, 18, 30, 0.5);
      color: #eafcff;
      font-size: 15px;
      font-weight: 800;
      letter-spacing: 0.04em;
      cursor: pointer;
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }
.title-secondary:hover{ background: rgba(20, 30, 50, 0.62); }
.title-secondary:active{ transform: scale(0.97); }
.title-secondary.ai-demo{
      border-color: rgba(126, 249, 231, 0.72);
      background: rgba(5, 82, 92, 0.56);
    }
.title-secondary.ai-demo:hover{ background: rgba(7, 103, 113, 0.68); }
.title-menu-button{
      position: absolute;
      z-index: 2;
      top: 12px;
      right: 12px;
      width: 46px;
      height: 46px;
      padding: 0;
      display: grid;
      place-items: center;
      border: 1px solid rgba(255, 255, 255, 0.48);
      border-radius: 50%;
      color: #eafcff;
      background: rgba(3, 73, 83, 0.18);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 3px 10px rgba(0, 35, 48, 0.18);
      backdrop-filter: blur(5px);
      -webkit-backdrop-filter: blur(5px);
      pointer-events: auto;
      cursor: pointer;
      transition: background 0.2s ease, border-color 0.2s ease, transform 0.25s ease;
    }
.title-menu-button:hover,
    .title-menu-button.is-open{
      border-color: rgba(255, 255, 255, 0.8);
      background: rgba(3, 73, 83, 0.34);
    }
.title-menu-button.is-open{
      transform: rotate(90deg);
    }
.title-menu-unread-dot{
      position: absolute;
      top: 5px;
      right: 5px;
      width: 9px;
      height: 9px;
      border: 2px solid rgba(232, 255, 255, 0.96);
      border-radius: 50%;
      background: #ffd84d;
      box-shadow: 0 0 0 1px rgba(62, 42, 0, 0.14), 0 0 12px rgba(255, 216, 77, 0.72);
      pointer-events: none;
    }
.title-menu-unread-dot[hidden]{
      display: none;
    }
.title-menu-lines,
    .title-menu-lines::before,
    .title-menu-lines::after{
      width: 21px;
      height: 2px;
      border-radius: 999px;
      background: currentColor;
    }
.title-menu-lines{
      position: relative;
    }
.title-menu-lines::before,
    .title-menu-lines::after{
      content: "";
      position: absolute;
      left: 0;
    }
.title-menu-lines::before{ top: -7px; }
.title-menu-lines::after{ top: 7px; }
.title-menu-popover{
      position: absolute;
      z-index: 1;
      top: 12px;
      right: 12px;
      width: 46px;
      height: 46px;
      pointer-events: none;
    }
.title-menu-item{
      --menu-x: 0px;
      --menu-y: 0px;
      position: absolute;
      top: 0;
      right: 0;
      width: 46px;
      height: 46px;
      padding: 0;
      display: grid;
      place-items: center;
      border: 1px solid rgba(255, 255, 255, 0.64);
      border-radius: 50%;
      color: #f3ffff;
      background: rgba(4, 75, 87, 0.56);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 5px 15px rgba(0, 35, 48, 0.2);
      backdrop-filter: blur(7px);
      -webkit-backdrop-filter: blur(7px);
      text-decoration: none;
      font-size: 20px;
      font-weight: 950;
      opacity: 0;
      pointer-events: none;
      cursor: pointer;
      transform: translate(0, 0) scale(0.18);
      transform-origin: top right;
      transition:
        transform 0.32s cubic-bezier(0.2, 0.9, 0.25, 1.22),
        opacity 0.18s ease,
        background 0.18s ease;
    }
.title-menu-item:nth-child(1){ --menu-x: -56px; --menu-y: 0px; transition-delay: 0ms; }
.title-menu-item:nth-child(2){ --menu-x: -112px; --menu-y: 0px; transition-delay: 34ms; }
.title-menu-item:nth-child(3){ --menu-x: -56px; --menu-y: 56px; transition-delay: 68ms; }
.title-menu-item:nth-child(4){ --menu-x: -112px; --menu-y: 56px; transition-delay: 102ms; }
.title-menu-item:nth-child(5){ --menu-x: -56px; --menu-y: 112px; transition-delay: 136ms; }
.title-menu-item:nth-child(6){ --menu-x: -112px; --menu-y: 112px; transition-delay: 170ms; }
.title-menu-item:nth-child(7){ --menu-x: -56px; --menu-y: 168px; transition-delay: 204ms; }
.title-menu-popover.is-open .title-menu-item{
      opacity: 1;
      pointer-events: auto;
      transform: translate(var(--menu-x), var(--menu-y)) scale(1);
    }
.title-menu-item:hover{
      background: rgba(4, 91, 104, 0.84);
      transform: translate(var(--menu-x), var(--menu-y)) scale(1.06);
    }
.title-menu-item.is-active{
      color: #163128;
      border-color: rgba(255, 248, 185, 0.96);
      background: rgba(255, 225, 106, 0.9);
    }
.title-menu-news{
      position: relative;
      font-size: 24px;
    }
.title-menu-item-dot{
      position: absolute;
      top: 4px;
      right: 4px;
      width: 9px;
      height: 9px;
      border: 2px solid rgba(243, 255, 255, 0.96);
      border-radius: 50%;
      background: #ffd84d;
      box-shadow: 0 0 10px rgba(255, 216, 77, 0.72);
      pointer-events: none;
    }
.title-menu-item-dot[hidden]{
      display: none;
    }
.title-modal-overlay{
      position: fixed;
      inset: 0;
      z-index: 15;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(4, 19, 31, 0.48);
      backdrop-filter: blur(9px);
      -webkit-backdrop-filter: blur(9px);
    }
.title-modal-overlay[hidden]{
      display: none;
    }
.title-modal-card{
      width: min(390px, calc(100vw - 28px));
      max-height: min(620px, calc(100vh - 36px));
      overflow-y: auto;
      display: grid;
      gap: 15px;
      padding: 18px;
      border: 1px solid rgba(255, 255, 255, 0.82);
      border-radius: 24px;
      color: #064352;
      background: rgba(230, 255, 255, 0.95);
      box-shadow: 0 24px 70px rgba(0, 47, 76, 0.36);
    }
.title-modal-head{
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
.title-modal-title{
      margin: 0;
      font-size: 21px;
      font-weight: 950;
      letter-spacing: 0.04em;
    }
.title-modal-close{
      width: 34px;
      height: 34px;
      padding: 0;
      border-radius: 50%;
      color: #075064;
      background: rgba(255, 255, 255, 0.76);
      border: 1px solid rgba(7, 80, 100, 0.14);
      font-size: 20px;
      font-weight: 900;
    }
.daily-result-overlay{
      position: fixed;
      inset: 0;
      z-index: 22;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(4, 19, 31, 0.22);
    }
.daily-result-overlay[hidden]{
      display: none;
    }
.daily-result-card{
      position: relative;
      box-sizing: border-box;
      width: min(300px, calc(100vw - 36px));
      max-height: calc(100vh - 36px);
      display: grid;
      justify-items: center;
      gap: 4px;
      padding: 22px 20px 20px;
      border: 1px solid rgba(255, 255, 255, 0.85);
      border-radius: 24px;
      color: #064352;
      background: rgba(233, 255, 255, 0.97);
      box-shadow: 0 20px 60px rgba(0, 47, 76, 0.34);
      text-align: center;
      animation: dailyResultCardIn 0.28s ease both;
    }
.daily-result-title{
      margin: 0 0 2px;
      font-size: 15px;
      font-weight: 900;
      letter-spacing: 0.06em;
      color: #0a6076;
      opacity: 0.9;
    }
.daily-result-rank-row{
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }
.daily-result-rank{
      font-size: 52px;
      font-weight: 950;
      line-height: 1.05;
      color: #04394a;
    }
.daily-result-score{
      font-size: 26px;
      font-weight: 900;
      color: #0a6076;
    }
.daily-result-unit{
      font-size: 0.46em;
      font-weight: 900;
      margin-left: 2px;
      opacity: 0.78;
    }
.daily-result-message{
      margin: 8px 0 2px;
      font-size: 13px;
      font-weight: 800;
      color: #0a6076;
      opacity: 0.85;
    }
.daily-result-ok{
      margin-top: 8px;
      min-width: 124px;
      padding: 9px 18px;
      border: none;
      border-radius: 999px;
      font-size: 15px;
      font-weight: 900;
      color: #fff;
      background: linear-gradient(180deg, #36c5e0, #1aa6c8);
      box-shadow: 0 8px 18px rgba(26, 166, 200, 0.4);
      cursor: pointer;
    }
.daily-result-close{
      position: absolute;
      top: 8px;
      right: 8px;
      width: 30px;
      height: 30px;
      padding: 0;
      border-radius: 50%;
      color: #075064;
      background: rgba(255, 255, 255, 0.78);
      border: 1px solid rgba(7, 80, 100, 0.14);
      font-size: 18px;
      font-weight: 900;
      cursor: pointer;
    }
.daily-result-medal{
      --medal-base: #f0b400;
      --medal-mid: #ffd84a;
      --medal-light: #fff5b7;
      --medal-dark: #9d6600;
      --medal-number: #6c4600;
      position: relative;
      flex: none;
      width: 42px;
      height: 48px;
      image-rendering: pixelated;
      filter: drop-shadow(0 4px 0 rgba(0, 47, 76, 0.16)) drop-shadow(0 7px 7px rgba(0, 47, 76, 0.18));
    }
.daily-result-medal[hidden]{
      display: none;
    }
.daily-result-medal::before,
    .daily-result-medal::after{
      content: "";
      position: absolute;
      display: block;
      image-rendering: pixelated;
    }
.daily-result-medal::before{
      left: 50%;
      top: 0;
      width: 20px;
      height: 23px;
      transform: translateX(-50%);
      background:
        linear-gradient(90deg, #2d7bd6 0 34%, #fff5f0 34% 66%, #e84c65 66% 100%);
      box-shadow: inset 0 -4px 0 rgba(3, 45, 80, 0.18), 0 0 0 2px rgba(255, 255, 255, 0.7);
      clip-path: polygon(0 0, 100% 0, 100% 78%, 75% 78%, 75% 100%, 50% 82%, 25% 100%, 25% 78%, 0 78%);
    }
.daily-result-medal::after{
      content: attr(data-medal-rank);
      left: 4px;
      bottom: 0;
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      color: var(--medal-number);
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
      font-size: 15px;
      font-weight: 950;
      line-height: 1;
      text-shadow: 1px 0 var(--medal-light), 0 1px rgba(255, 255, 255, 0.42);
      background:
        linear-gradient(var(--medal-light), var(--medal-light)) 9px 7px / 9px 4px no-repeat,
        linear-gradient(rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.34)) 7px 12px / 4px 9px no-repeat,
        linear-gradient(rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.16)) 24px 25px / 5px 4px no-repeat,
        linear-gradient(var(--medal-mid), var(--medal-mid)) 5px 10px / 24px 17px no-repeat,
        var(--medal-base);
      clip-path: polygon(
        24% 0, 76% 0,
        76% 12%, 88% 12%,
        88% 24%, 100% 24%,
        100% 76%, 88% 76%,
        88% 88%, 76% 88%,
        76% 100%, 24% 100%,
        24% 88%, 12% 88%,
        12% 76%, 0 76%,
        0 24%, 12% 24%,
        12% 12%, 24% 12%
      );
    }
.daily-result-medal.is-gold{
      --medal-base: #f0b400;
      --medal-mid: #ffd84a;
      --medal-light: #fff5b7;
      --medal-dark: #9d6600;
      --medal-number: #6c4600;
    }
.daily-result-medal.is-silver{
      --medal-base: #aebbc6;
      --medal-mid: #dfe8ef;
      --medal-light: #ffffff;
      --medal-dark: #64717d;
      --medal-number: #344451;
    }
.daily-result-medal.is-bronze{
      --medal-base: #b86c32;
      --medal-mid: #e49a55;
      --medal-light: #ffd9ad;
      --medal-dark: #7d431f;
      --medal-number: #5b3219;
    }
.daily-result-medal.show{
      animation: dailyResultMedalPop 0.42s cubic-bezier(0.22, 1.2, 0.4, 1) both;
    }


    @keyframes dailyResultCardIn {
      from { transform: translateY(8px) scale(0.97); opacity: 0; }
      to { transform: none; opacity: 1; }
    }

    @keyframes dailyResultMedalPop {
      0% { transform: scale(0.3); opacity: 0; }
      70% { transform: scale(1.12); opacity: 1; }
      100% { transform: scale(1); }
    }.jelly-appearance-settings{
      display: grid;
      gap: 14px;
      margin: 16px 0;
    }
.jelly-appearance-settings [hidden]{ display: none !important; }
.jelly-appearance-settings select{ min-width: 0; }
.player-setting-list{
      display: grid;
      gap: 14px;
    }
.player-setting-field{
      display: grid;
      gap: 7px;
    }
.player-setting-field > span{
      font-size: 12px;
      font-weight: 900;
      color: rgba(6, 67, 82, 0.78);
    }
.player-setting-field input[type="text"],
    .player-setting-field select{
      width: 100%;
      height: 42px;
      padding: 0 12px;
      border: 1px solid rgba(7, 80, 100, 0.2);
      border-radius: 12px;
      color: #064352;
      background: rgba(255, 255, 255, 0.82);
      font: inherit;
      font-weight: 800;
    }
.player-volume-row{
      display: grid;
      grid-template-columns: 1fr 42px;
      align-items: center;
      gap: 10px;
    }
.player-volume-row input{
      width: 100%;
      accent-color: #1bbfb7;
    }
.player-volume-value{
      font-size: 12px;
      font-weight: 950;
      text-align: right;
      font-variant-numeric: tabular-nums;
    }
.player-setting-status{
      min-height: 18px;
      margin: -4px 0 0;
      color: rgba(6, 67, 82, 0.7);
      font-size: 11px;
      font-weight: 800;
      text-align: center;
    }
.announcement-list{
      display: grid;
      gap: 10px;
    }
.announcement-card{
      display: grid;
      gap: 7px;
      padding: 12px;
      border: 1px solid rgba(7, 80, 100, 0.14);
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.72);
    }
.announcement-meta{
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      color: rgba(6, 67, 82, 0.68);
      font-size: 11px;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
    }
.announcement-title{
      margin: 0;
      color: #064352;
      font-size: 15px;
      font-weight: 950;
      line-height: 1.35;
    }
.announcement-body{
      margin: 0;
      padding-left: 1.2em;
      color: rgba(6, 67, 82, 0.82);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.55;
    }
.player-settings-link{
      justify-self: center;
      margin: -4px 0 0;
      padding: 4px 6px;
      border: 0;
      background: none;
      color: rgba(6, 67, 82, 0.74);
      font: inherit;
      font-size: 12px;
      font-weight: 850;
      text-decoration: underline;
      text-underline-offset: 3px;
      cursor: pointer;
    }
.player-settings-link:hover,
    .player-settings-link:focus-visible{
      color: #064352;
    }
.player-setting-name-row{
      gap: 7px;
    }
.player-name-current-wrap{
      display: flex;
      align-items: center;
      gap: 10px;
    }
.player-name-current-text{
      flex: 1 1 auto;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 16px;
      font-weight: 900;
      color: #064352;
    }
.player-name-edit-button{
      flex: 0 0 auto;
      height: 36px;
      padding: 0 14px;
      border: 1px solid rgba(7, 80, 100, 0.2);
      border-radius: 11px;
      color: #075064;
      background: rgba(255, 255, 255, 0.86);
      font: inherit;
      font-size: 13px;
      font-weight: 900;
      cursor: pointer;
    }
.title-name-chip{
      margin-top: 10px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      max-width: min(82vw, 320px);
      padding: 8px 14px;
      border: 1px solid rgba(255, 255, 255, 0.72);
      border-radius: 999px;
      color: #f4ffff;
      background: rgba(8, 49, 70, 0.42);
      font: inherit;
      font-size: 13px;
      font-weight: 850;
      cursor: pointer;
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
    }
.title-name-chip[hidden]{
      display: none;
    }
.title-name-chip-value{
      max-width: 14em;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 950;
    }
.title-name-chip-edit{
      margin-left: 2px;
      opacity: 0.85;
    }
.name-edit-card{
      gap: 16px;
    }
.name-edit-body{
      display: grid;
      gap: 12px;
    }
.name-edit-input{
      width: 100%;
      height: 46px;
      padding: 0 14px;
      border: 1px solid rgba(7, 80, 100, 0.22);
      border-radius: 13px;
      color: #064352;
      background: rgba(255, 255, 255, 0.9);
      font: inherit;
      font-size: 18px;
      font-weight: 800;
      text-align: center;
    }
.name-edit-error{
      margin: 0;
      min-height: 16px;
      color: #c0392b;
      font-size: 12px;
      font-weight: 850;
      text-align: center;
    }
.name-edit-error[hidden]{
      display: none;
    }
.name-edit-actions{
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: center;
    }
.name-edit-auto{
      white-space: nowrap;
      font-size: 13px;
    }
.name-edit-note{
      margin: 0;
      color: rgba(6, 67, 82, 0.7);
      font-size: 11px;
      font-weight: 750;
      line-height: 1.6;
      text-align: center;
    }
.feedback-card{
      gap: 13px;
    }
.feedback-desc{
      margin: -4px 0 0;
      color: rgba(6, 67, 82, 0.82);
      font-size: 13px;
      font-weight: 800;
      line-height: 1.5;
    }
.feedback-field{
      display: grid;
      gap: 7px;
    }
.feedback-label{
      font-size: 13px;
      font-weight: 900;
      color: #064352;
    }
.feedback-categories{
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
.feedback-category{
      min-height: 38px;
      padding: 7px 13px;
      border: 1px solid rgba(7, 80, 100, 0.22);
      border-radius: 999px;
      color: #075064;
      background: rgba(255, 255, 255, 0.86);
      font: inherit;
      font-size: 13px;
      font-weight: 850;
      cursor: pointer;
    }
.feedback-category[aria-checked="true"]{
      color: #04313f;
      background: linear-gradient(135deg, #9bf0e2, #7cc4ff);
      border-color: rgba(27, 191, 183, 0.7);
      box-shadow: 0 6px 16px rgba(0, 47, 76, 0.16);
    }
.feedback-category:focus-visible{
      outline: 2px solid #1bbfb7;
      outline-offset: 2px;
    }
.feedback-textarea{
      width: 100%;
      box-sizing: border-box;
      min-height: 96px;
      max-height: 40vh;
      padding: 11px 13px;
      border: 1px solid rgba(7, 80, 100, 0.22);
      border-radius: 13px;
      color: #064352;
      background: rgba(255, 255, 255, 0.9);
      font: inherit;
      font-size: 15px;
      font-weight: 700;
      line-height: 1.5;
      resize: vertical;
    }
.feedback-input{
      width: 100%;
      box-sizing: border-box;
      height: 44px;
      padding: 0 13px;
      border: 1px solid rgba(7, 80, 100, 0.22);
      border-radius: 12px;
      color: #064352;
      background: rgba(255, 255, 255, 0.9);
      font: inherit;
      font-size: 15px;
      font-weight: 700;
    }
.feedback-count{
      justify-self: end;
      color: rgba(6, 67, 82, 0.62);
      font-size: 11px;
      font-weight: 850;
      font-variant-numeric: tabular-nums;
    }
.feedback-note{
      color: rgba(6, 67, 82, 0.7);
      font-size: 11px;
      font-weight: 750;
      line-height: 1.55;
    }
.feedback-error{
      margin: 0;
      min-height: 16px;
      color: #c0392b;
      font-size: 12px;
      font-weight: 850;
    }
.feedback-error[hidden]{
      display: none;
    }
.feedback-submit,
    .feedback-done{
      width: 100%;
      height: 46px;
    }
.feedback-submit:disabled{
      opacity: 0.6;
      cursor: progress;
    }
.feedback-done[hidden]{
      display: none;
    }
.feedback-status{
      margin: -4px 0 0;
      min-height: 16px;
      color: #0a6076;
      font-size: 12px;
      font-weight: 850;
      text-align: center;
      line-height: 1.5;
      white-space: pre-line;
    }
.feedback-status.is-error{
      color: #c0392b;
    }
.feedback-privacy{
      margin: 0;
      color: rgba(6, 67, 82, 0.62);
      font-size: 10.5px;
      font-weight: 750;
      line-height: 1.55;
      text-align: center;
    }
.game-over-feedback{
      pointer-events: auto;
      justify-self: center;
      margin: 0;
      padding: 4px 6px;
      border: 0;
      background: none;
      color: rgba(6, 67, 82, 0.66);
      font: inherit;
      font-size: 11px;
      font-weight: 750;
      text-decoration: underline;
      text-underline-offset: 3px;
      cursor: pointer;
    }
.game-over-feedback:hover,
    .game-over-feedback:focus-visible{
      color: #064352;
    }
.game-over-name[hidden]{
      display: none;
    }
.game-over-name{
      display: grid;
      gap: 6px;
      margin: 2px 0 4px;
    }
.game-over-name.is-prominent{
      padding: 13px 14px;
      border: 1px solid rgba(27, 191, 183, 0.5);
      border-radius: 16px;
      background: rgba(231, 255, 252, 0.96);
      box-shadow: 0 10px 30px rgba(0, 47, 76, 0.18);
    }
.game-over-name-registered{
      font-size: 13px;
      font-weight: 950;
      color: #0a8f86;
      letter-spacing: 0.02em;
    }
.game-over-name-label{
      font-size: 11px;
      font-weight: 850;
      color: rgba(6, 67, 82, 0.66);
    }
.game-over-name-value{
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      flex-wrap: wrap;
    }
.game-over-name-value strong{
      font-size: 20px;
      font-weight: 950;
      color: #064352;
      word-break: break-word;
    }
.game-over-name-edit{
      flex: 0 0 auto;
      padding: 5px 12px;
      border: 1px solid rgba(7, 80, 100, 0.22);
      border-radius: 999px;
      color: #075064;
      background: rgba(255, 255, 255, 0.92);
      font: inherit;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
    }
.game-over-name-note{
      font-size: 11px;
      font-weight: 750;
      color: rgba(6, 67, 82, 0.62);
    }
.game-over-name.is-mini{
      grid-auto-flow: column;
      justify-content: center;
      align-items: baseline;
      gap: 8px;
      font-size: 12px;
    }
.game-over-name.is-mini .game-over-name-mini-text{
      font-weight: 900;
      color: rgba(6, 67, 82, 0.82);
    }
.game-over-name.is-mini .game-over-name-edit{
      padding: 3px 10px;
      font-size: 11px;
    }
.how-to-list{
      margin: 0;
      padding-left: 1.4em;
      display: grid;
      gap: 12px;
      font-size: 14px;
      font-weight: 750;
      line-height: 1.65;
    }
.how-to-tips{
      display: grid;
      gap: 18px;
      margin-top: 2px;
      padding-top: 14px;
      border-top: 1px solid rgba(7, 80, 100, 0.16);
    }
.how-to-tips-heading{
      margin: 0;
      font-size: 16px;
      font-weight: 950;
      letter-spacing: 0.04em;
      color: #06414f;
    }
.how-to-tip{
      display: grid;
      justify-items: center;
      gap: 8px;
    }
.how-to-tip-title{
      margin: 0;
      font-size: 15px;
      font-weight: 950;
      color: #0a6076;
      text-align: center;
    }
.how-to-figure{
      margin: 0;
      width: min(230px, 82%);
      border-radius: 16px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.7);
      box-shadow: 0 8px 22px rgba(0, 47, 76, 0.22);
    }
.how-to-figure-svg{
      display: block;
      width: 100%;
      height: auto;
    }
.how-to-tip-desc{
      margin: 0;
      font-size: 13px;
      font-weight: 750;
      line-height: 1.6;
      color: #06414f;
      text-align: center;
    }
.legal-doc{
      display: grid;
      gap: 16px;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.7;
      color: #06414f;
    }
.legal-doc section{
      display: grid;
      gap: 8px;
    }
.legal-doc h3{
      margin: 0;
      font-size: 14px;
      font-weight: 950;
      letter-spacing: 0.02em;
    }
.legal-doc ul{
      margin: 0;
      padding-left: 1.3em;
      display: grid;
      gap: 8px;
    }
.legal-contact{
      margin: 0;
      font-weight: 850;
    }
.legal-contact a{
      color: #0a6d86;
      font-weight: 900;
      word-break: break-all;
    }
.legal-updated{
      margin: 0;
      font-size: 11px;
      font-weight: 800;
      color: rgba(6, 67, 82, 0.62);
    }
.puni-showcase{
      display: grid;
      gap: 8px;
      justify-items: center;
      padding: 22px 18px;
      border-radius: 22px;
      border: 1px solid rgba(255, 143, 203, 0.5);
      background: radial-gradient(120% 120% at 50% 0%, rgba(255, 143, 203, 0.18), rgba(255, 255, 255, 0.04));
      text-align: center;
    }
.puni-score-cap{ font-size: 13px; font-weight: 900; letter-spacing: 0.18em; color: #ff8fcb; }
.puni-score-value{
      font-size: 60px;
      font-weight: 950;
      line-height: 1;
      color: #fff;
      text-shadow: 0 2px 18px rgba(255, 143, 203, 0.65);
      font-variant-numeric: tabular-nums;
    }
.puni-pink-badge{ font-size: 14px; font-weight: 900; padding: 4px 12px; border-radius: 999px; }
.puni-pink-on{ color: #4a0b2c; background: linear-gradient(135deg, #ffc2e2, #ff8fcb); }
.puni-pink-off{ color: var(--muted); border: 1px solid var(--line); }
.puni-comfort{ display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.puni-comfort-letter{ font-size: 30px; font-weight: 950; line-height: 1; }
.puni-comfort-S .puni-comfort-letter{ color: #5cffd0; }
.puni-comfort-A .puni-comfort-letter{ color: #8be36b; }
.puni-comfort-B .puni-comfort-letter{ color: #ffd166; }
.puni-comfort-C .puni-comfort-letter{ color: var(--warn); }
.puni-comfort-label{ font-size: 13px; font-weight: 800; color: var(--muted); }
.puni-comfort-advice{ font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.5; }
.puni-showcase-sub{ margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.title-modal-overlay.pause-overlay{
      z-index: 13;
    }
.pause-menu-actions{
      display: grid;
      gap: 9px;
    }
.pause-menu-button{
      height: 46px;
      padding: 0 14px;
      border-radius: 14px;
      border: 1px solid rgba(7, 80, 100, 0.18);
      color: #064352;
      background: rgba(255, 255, 255, 0.82);
      font: inherit;
      font-size: 15px;
      font-weight: 900;
      letter-spacing: 0.04em;
      cursor: pointer;
    }
.pause-menu-button:active{
      transform: translateY(1px);
    }
.pause-menu-button.is-primary{
      color: #053943;
      background: linear-gradient(135deg, #a9fff1, #a8d9ff);
      border-color: rgba(255, 255, 255, 0.86);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
.restart-confirm-note{
      margin: 0;
      color: rgba(6, 67, 82, 0.72);
      font-size: 13px;
      font-weight: 800;
      line-height: 1.6;
      text-align: center;
    }
body.practice-active .round-timer,
    body.practice-active .game-over-ranking-list,
    body.practice-active .game-over-share,
    body.practice-active .game-over-share-status{
      display: none !important;
    }
.title-ranking-overlay{
      position: fixed;
      inset: 0;
      z-index: 14;
      display: flex;
      align-items: stretch;
      justify-content: center;
      padding: max(12px, env(safe-area-inset-top, 0px)) 14px max(14px, env(safe-area-inset-bottom, 0px));
      background:
        linear-gradient(180deg, rgba(186, 247, 235, 0.50), rgba(8, 70, 82, 0.34)),
        rgba(4, 26, 32, 0.30);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
    }
.title-ranking-overlay[hidden]{
      display: none;
    }
.title-ranking-card{
      width: min(540px, 100%);
      overflow: hidden;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr) auto;
      gap: 10px;
      padding: 12px 14px 14px;
      border: 1px solid rgba(255, 255, 255, 0.78);
      border-radius: 24px;
      color: #064352;
      background:
        linear-gradient(180deg, rgba(244, 255, 254, 0.92), rgba(214, 245, 248, 0.9)),
        rgba(232, 255, 255, 0.84);
      box-shadow: 0 24px 70px rgba(0, 60, 90, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.85);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }
.title-ranking-head{
      display: flex;
      align-items: center;
      gap: 10px;
    }
.title-ranking-title{
      margin: 0;
      font-size: 21px;
      font-weight: 950;
      letter-spacing: 0.04em;
      color: #eafffb;
      text-shadow:
        0 2px 0 rgba(6, 67, 82, 0.55),
        0 0 4px rgba(6, 67, 82, 0.5);
    }
.title-ranking-back{
      flex: 0 0 auto;
      width: 40px;
      height: 40px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      color: #075064;
      background: rgba(255, 255, 255, 0.92);
      border: 1px solid rgba(7, 80, 100, 0.18);
      font-size: 20px;
      font-weight: 900;
      box-shadow: 0 3px 0 rgba(0, 75, 110, 0.2);
    }
.title-ranking-back:active{
      transform: translateY(2px);
      box-shadow: none;
    }
.title-ranking-panel{
      min-height: 0;
      display: grid;
      grid-template-rows: auto auto minmax(0, 1fr) auto auto;
      gap: 8px;
    }
.title-ranking-actions{
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
.title-ranking-action{
      height: 50px;
      border-radius: 16px;
      color: #ffffff;
      background: linear-gradient(180deg, #4fc7b3, #2f93a8);
      border: 1px solid rgba(255, 255, 255, 0.4);
      font-size: 16px;
      font-weight: 950;
      letter-spacing: 0.02em;
      text-shadow: 0 1px 0 rgba(6, 50, 60, 0.4);
      box-shadow: 0 4px 0 rgba(0, 75, 110, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
.title-ranking-action.is-primary{
      color: #ffffff;
      background: linear-gradient(135deg, #3fe6c5, #4f8cff);
      text-shadow: 0 1px 0 rgba(10, 60, 80, 0.45);
      box-shadow: 0 4px 0 rgba(15, 110, 120, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    }
.title-ranking-action:active{
      transform: translateY(2px);
      box-shadow: none;
    }
.title-ranking-mode-tabs{
      flex: 1 1 auto;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 4px;
      align-items: end;
    }
.title-ranking-mode-tab{
      min-width: 0;
      height: 42px;
      border-radius: 18px 18px 7px 7px;
      color: rgba(7, 80, 96, 0.5);
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(214, 243, 240, 0.5));
      border: 1px solid rgba(7, 110, 120, 0.18);
      font-size: clamp(13px, 3.2vw, 16px);
      font-weight: 950;
      line-height: 1.05;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
      transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
    }
.title-ranking-mode-tab.is-active{
      color: #ffffff;
      background: linear-gradient(180deg, #2fd0c4, #138aa0);
      border-color: rgba(255, 255, 255, 0.65);
      text-shadow: 0 1px 2px rgba(6, 50, 60, 0.5);
      box-shadow:
        0 6px 16px rgba(15, 120, 130, 0.4),
        0 0 0 2px rgba(53, 232, 197, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
      transform: translateY(-1px);
    }
.title-ranking-tabs{
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      padding: 6px 10px 4px;
    }
.title-ranking-tab{
      height: 34px;
      border-radius: 10px;
      color: rgba(7, 80, 96, 0.55);
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(206, 238, 236, 0.52));
      border: 1px solid rgba(7, 110, 120, 0.2);
      font-size: 14px;
      font-weight: 950;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
      transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
    }
.title-ranking-tab.is-active{
      color: #ffffff;
      background: linear-gradient(180deg, #2fd0c4, #138aa0);
      border-color: rgba(255, 255, 255, 0.65);
      text-shadow: 0 1px 2px rgba(6, 50, 60, 0.45);
      box-shadow:
        0 5px 14px rgba(15, 120, 130, 0.38),
        0 0 0 2px rgba(53, 232, 197, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
      transform: translateY(-1px);
    }
.title-ranking-list{
      list-style: none;
      margin: 0;
      padding: 0;
      display: grid;
      gap: 0;
      grid-auto-rows: max-content;
      min-height: 0;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      border: 1px solid rgba(7, 110, 120, 0.28);
      border-radius: 10px 10px 18px 18px;
      background: rgba(212, 245, 246, 0.5);
    }
.title-ranking-list .title-ranking-row,
    .title-ranking-self .title-ranking-row{
      /* 列幅を全行で固定し、各列が縦に綺麗に揃うようにする（flex だと名前幅で崩れる）。 */
      --rk-rank: 30px;
      /* スコアは5桁（カンマ込みでも6〜7字）で十分。列を詰めることで、
         オンラインは名前(1fr)が左で伸び・マイスコアは日時(1fr)が右で伸びる。 */
      --rk-score: 70px;
      --rk-chain: 38px;
      --rk-replay: 56px;
      min-height: 44px;
      display: grid;
      align-items: center;
      gap: 7px;
      padding: 6px 12px;
      border-radius: 0;
      border-bottom: 1px solid rgba(7, 90, 100, 0.14);
      background: rgba(255, 255, 255, 0.66);
      color: #0a5566;
      font-size: 13px;
      font-weight: 900;
      outline: none;
    }
.title-ranking-row.is-online{
      grid-template-columns: var(--rk-rank) minmax(0, 1fr) var(--rk-score) var(--rk-chain) var(--rk-replay);
    }
.title-ranking-row.is-local{
      grid-template-columns: var(--rk-rank) var(--rk-score) var(--rk-chain) var(--rk-replay) minmax(0, 1fr);
    }
.title-ranking-row.is-online .title-ranking-row-time{ display: none; }
.title-ranking-row.is-local .title-ranking-row-name{ display: none; }
.title-ranking-list .title-ranking-row:nth-child(even){
      background: rgba(206, 243, 243, 0.55);
      color: #0c5e6e;
    }
.title-ranking-list .title-ranking-row.is-top-1{
      background: linear-gradient(90deg, rgba(64, 224, 200, 0.9), rgba(190, 245, 238, 0.82));
      color: #08474f;
    }
.title-ranking-list .title-ranking-row.is-top-2{
      background: rgba(176, 236, 232, 0.74);
      color: #0d5663;
    }
.title-ranking-list .title-ranking-row.is-top-3{
      background: rgba(202, 238, 236, 0.7);
      color: #136069;
    }
.title-ranking-list .title-ranking-row.is-placeholder{
      opacity: 0.6;
    }
.title-ranking-row-rank{
      justify-self: center;
      width: 28px;
      height: 28px;
      display: inline-grid;
      place-items: center;
      border-radius: 50%;
      color: #0a6072;
      background: rgba(255, 255, 255, 0.72);
      border: 2px solid rgba(7, 110, 120, 0.4);
      font-size: 13px;
      font-weight: 950;
      font-variant-numeric: tabular-nums;
    }
.title-ranking-row.is-top-1 .title-ranking-row-rank,
    .title-ranking-row.is-top-2 .title-ranking-row-rank,
    .title-ranking-row.is-top-3 .title-ranking-row-rank{
      color: #ffffff;
      text-shadow: 0 1px 0 rgba(6, 56, 66, 0.5);
      background: linear-gradient(180deg, #54dcc8, #2497ab);
      border-color: rgba(255, 255, 255, 0.92);
    }
.title-ranking-row-score{
      justify-self: end;
      text-align: right;
      min-width: 0;
      color: inherit;
      font-size: clamp(15px, 3.4vw, 19px);
      font-weight: 950;
      letter-spacing: 0;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
.title-ranking-row-name{
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-align: left;
      color: rgba(8, 80, 92, 0.86);
      font-size: 13px;
      font-weight: 850;
    }
.title-ranking-row-time{
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-align: left;
      color: rgba(8, 86, 98, 0.74);
      font-size: 11.5px;
      font-weight: 800;
      font-variant-numeric: tabular-nums;
    }
.title-ranking-list .title-ranking-row:nth-child(even) .title-ranking-row-name,
    .title-ranking-list .title-ranking-row:nth-child(even) .title-ranking-row-time{
      color: rgba(8, 86, 98, 0.82);
    }
.title-ranking-row.is-local.is-date .title-ranking-row-time{
      margin-left: -8px;
    }
.title-ranking-row-chain{
      justify-self: start;
      text-align: left;
      color: #d25358;
      font-size: 12px;
      font-weight: 950;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
.title-ranking-row-replay-cell{
      display: flex;
      align-items: center;
      justify-content: flex-start;
      min-width: 0;
    }
.title-ranking-row-replay{
      flex: 0 0 auto;
      min-width: 40px;
      height: 24px;
      padding: 0 8px;
      border-radius: 999px;
      color: #ffffff;
      background: linear-gradient(180deg, #45cdbe, #2497ab);
      border: 1px solid rgba(255, 255, 255, 0.45);
      font-size: 11px;
      font-weight: 950;
      line-height: 1;
    }
.title-ranking-self{
      margin-top: 1px;
      border: 1px solid rgba(20, 150, 150, 0.5);
      border-radius: 14px;
      background: linear-gradient(180deg, rgba(226, 255, 252, 0.97), rgba(196, 240, 238, 0.96));
      box-shadow: 0 4px 14px rgba(0, 90, 100, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.85);
      overflow: hidden;
    }
.title-ranking-self[hidden]{ display: none; }
.title-ranking-self .title-ranking-row{
      min-height: 46px;
      background: transparent;
      border-bottom: none;
      color: #06545f;
    }
.title-ranking-self .title-ranking-row-name{ color: #0a6a78; font-weight: 950; }
.title-ranking-self .title-ranking-row-rank{
      color: #ffffff;
      background: linear-gradient(180deg, #36c3c0, #2090a6);
      border-color: rgba(255, 255, 255, 0.85);
    }
.title-ranking-overlay[data-view="online"] .title-ranking-list .title-ranking-row.is-me{
      outline: 2px solid rgba(30, 170, 170, 0.6);
      outline-offset: -2px;
    }
.title-ranking-status{
      min-height: 18px;
      margin: 0;
      color: rgba(8, 82, 94, 0.78);
      font-size: 11px;
      font-weight: 800;
      text-align: center;
    }
.title-ranking-remaining{
      margin: 2px 0 6px;
      color: rgba(8, 84, 96, 0.92);
      font-size: 12px;
      font-weight: 900;
      letter-spacing: 0.02em;
      text-align: center;
      font-variant-numeric: tabular-nums;
    }
.title-ranking-remaining[hidden]{ display: none; }
.replay-bar{
      position: fixed;
      z-index: 9;
      top: calc(58px + env(safe-area-inset-top, 0px));
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      align-items: center;
      gap: 8px;
      max-width: calc(100vw - 28px);
      padding: 5px 8px 5px 6px;
      border-radius: 999px;
      color: #064352;
      background: rgba(238, 252, 255, 0.78);
      border: 1px solid rgba(255, 255, 255, 0.7);
      box-shadow: 0 6px 20px rgba(0, 60, 90, 0.16);
      backdrop-filter: blur(14px) saturate(1.15);
      -webkit-backdrop-filter: blur(14px) saturate(1.15);
      pointer-events: auto;
      opacity: 0.92;
      transition: opacity 200ms ease;
    }
.replay-bar:hover{ opacity: 1; }
.replay-bar[hidden]{
      display: none;
    }
.replay-bar-info{
      display: flex;
      flex-direction: column;
      gap: 3px;
      min-width: 0;
      padding-right: 2px;
    }
.replay-bar-title{
      max-width: 42vw;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 11.5px;
      font-weight: 900;
      line-height: 1.1;
    }
.replay-bar-track{
      position: relative;
      width: clamp(76px, 32vw, 138px);
      height: 3px;
      border-radius: 999px;
      background: rgba(7, 80, 100, 0.16);
      overflow: hidden;
    }
.replay-bar-fill{
      position: absolute;
      inset: 0 auto 0 0;
      width: 0%;
      border-radius: 999px;
      background: linear-gradient(90deg, #2bb6cc, #19d2e4);
      transition: width 120ms linear;
    }
.replay-bar-fill.is-error{
      background: linear-gradient(90deg, #e8804a, #f0577a);
    }
.replay-bar-btn{
      flex: 0 0 auto;
      display: grid;
      place-items: center;
      width: 30px;
      height: 30px;
      padding: 0;
      border-radius: 50%;
      color: #064352;
      background: rgba(255, 255, 255, 0.86);
      border: 1px solid rgba(24, 169, 184, 0.28);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 6px rgba(0, 75, 110, 0.12);
      cursor: pointer;
      transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
    }
.replay-bar-btn:hover{ filter: brightness(1.05); }
.replay-bar-btn:active{ transform: scale(0.9); }
.replay-bar-btn:disabled{ opacity: 0.4; cursor: default; }
.replay-bar-btn:focus-visible{ outline: 2px solid #19d2e4; outline-offset: 2px; }
.replay-bar-toggle{ width: 34px; height: 34px; background: rgba(255, 255, 255, 0.96); }
.replay-bar-restart{ font: 900 19px/1 Arial, sans-serif; }
.replay-bar-exit{ font: 900 18px/1 Arial, sans-serif; color: #2c6475; }
.replay-bar-toggle .pause-icon{ width: 14px; height: 15px; }
.replay-bar-toggle .pause-icon::before,
    .replay-bar-toggle .pause-icon::after{
      top: 0;
      width: 4px;
      height: 15px;
      border-radius: 2px;
    }
.replay-bar-toggle.is-paused .pause-icon::before{
      top: 0;
      left: 3px;
      width: 0;
      height: 0;
      border-top: 8px solid transparent;
      border-bottom: 8px solid transparent;
      border-left: 12px solid currentColor;
      border-radius: 2px;
      background: transparent;
      box-shadow: none;
    }
.replay-bar-toggle.is-paused .pause-icon::after{
      display: none;
    }
body.replay-active #pause,
    body.replay-active #reset,
    body.replay-active #toggle-settings{
      display: none;
    }
input[type="range"]{
      width: 100%;
      accent-color: var(--accent);
    }
.toast{
      position: fixed;
      z-index: 7;
      left: 50%;
      bottom: calc(24px + env(safe-area-inset-bottom, 0px));
      transform: translateX(-50%);
      max-width: calc(100vw - 32px);
      text-align: center;
      padding: 10px 14px;
      border-radius: 8px;
      background: rgba(9, 12, 20, 0.82);
      border: 1px solid var(--line);
      color: var(--muted);
      font-size: 13px;
      pointer-events: none;
    }
.overlay{
      position: fixed;
      inset: 0;
      z-index: 8;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(4, 6, 12, 0.5);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
.overlay.visible{
      display: flex;
    }
.overlay.restart-only{
      background: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      pointer-events: none;
      align-items: center;
      padding: 0 16px;
    }
.overlay.restart-only .button{
      pointer-events: auto;
      font-size: 18px;
      padding: 14px 30px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    }
.dialog{
      width: min(360px, calc(100vw - 36px));
      border-radius: 8px;
      padding: 20px;
      background: rgba(15, 18, 28, 0.9);
      border: 1px solid var(--line);
      text-align: center;
    }
.dialog h1{
      margin: 0 0 8px;
      font-size: 24px;
    }
.dialog p{
      margin: 0 0 18px;
      color: var(--muted);
      line-height: 1.6;
    }
.title-screen{
      --title-playfield-width: min(
        calc(var(--vw) * 100 - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)),
        calc(var(--vh) * 57.325)
      );
      position: fixed;
      inset: 0;
      z-index: 9;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: clamp(14px, 3vh, 30px);
      /* 背後の水槽デモのスライムを暗くしないよう、暗幕/ヴィネットは置かない（透明）。
         ロゴはドロップシャドウ、ボタンは自前の背景で可読性を確保している。 */
      background: transparent;
      opacity: 1;
      transition: opacity 0.5s ease;
      padding: env(safe-area-inset-top, 0px) 16px env(safe-area-inset-bottom, 0px);
    }
.title-menu-anchor{
      position: absolute;
      z-index: 3;
      top: 50%;
      left: 50%;
      width: var(--title-playfield-width);
      height: calc(var(--title-playfield-width) * 1.666667);
      transform: translate(-50%, -50%);
      pointer-events: none;
    }
.title-screen.hide{
      opacity: 0;
      pointer-events: none;
    }
.title-screen.hide .title-start,
    .title-screen.hide .title-share-play,
    .title-screen.hide .title-secondary,
    .title-screen.hide .title-menu-anchor,
    .title-screen.hide .title-menu-button,
    .title-screen.hide .title-menu-popover,
    .title-screen.hide .title-menu-item{
      pointer-events: none;
    }
.title-logo-heading{
      margin: 0;
      padding: 0;
      /* タイトル画面の左右 padding を越えて、ゲーム画面の幅を使う。 */
      width: calc(100% + 32px);
      padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
      font-size: inherit;
      font-weight: inherit;
      line-height: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
.title-logo{
      width: 100%;
      max-height: 40vh;
      object-fit: contain;
      filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.4));
      animation: title-logo-bob 3.4s ease-in-out infinite;
    }
.title-early-access{
      position: absolute;
      right: max(12px, env(safe-area-inset-right, 0px));
      bottom: max(12px, env(safe-area-inset-bottom, 0px));
      margin: 0;
      color: rgba(244, 247, 251, 0.85);
      font-size: 12px;
      font-weight: 600;
      line-height: 1.4;
      letter-spacing: 0.04em;
      text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
      pointer-events: none;
    }
body:not(.is-prod) .title-screen{
      padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
    }
.title-tagline{
      margin: 0;
      max-width: min(560px, 88vw);
      text-align: center;
      font-size: clamp(13px, 3.2vw, 17px);
      font-weight: 600;
      line-height: 1.5;
      color: var(--muted);
    }


    @keyframes title-logo-bob {
      0%, 100% { transform: translateY(0) rotate(-0.6deg); }
      50% { transform: translateY(-10px) rotate(0.6deg); }
    }.title-logo-fallback{
      font-weight: 900;
      font-size: clamp(40px, 12vw, 96px);
      letter-spacing: 0.04em;
      text-align: center;
      line-height: 1.05;
      color: #eafcff;
      text-shadow: 0 6px 24px rgba(53, 232, 197, 0.5), 0 2px 0 rgba(79, 140, 255, 0.6);
    }
.title-logo-fallback span{
      display: block;
      margin-top: 6px;
      font-size: clamp(13px, 3.4vw, 20px);
      font-weight: 800;
      letter-spacing: 0.36em;
      color: var(--accent);
      text-shadow: none;
    }
.title-start{
      pointer-events: auto;
      height: 60px;
      min-width: min(280px, 72vw);
      padding-inline: 30px;
      border-radius: 999px;
      border: 0;
      font-size: 22px;
      font-weight: 900;
      letter-spacing: 0.06em;
      color: #06231f;
      background: linear-gradient(135deg, #35e8c5, #4f8cff);
      box-shadow: 0 14px 34px rgba(53, 232, 197, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.5);
      cursor: pointer;
      animation: title-start-pulse 1.6s ease-in-out infinite;
    }
.title-start:hover{ filter: brightness(1.06); }
.title-start:active{ transform: scale(0.96); }
.title-share-status{
      pointer-events: none;
      max-width: min(360px, 86vw);
      margin: 0 auto;
      padding: 8px 16px;
      border-radius: 16px;
      font-size: 14px;
      font-weight: 700;
      line-height: 1.4;
      text-align: center;
      color: #06231f;
      background: rgba(255, 255, 255, 0.86);
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    }
.title-share-status[hidden]{ display: none; }
.title-share-play{
      pointer-events: auto;
      height: 54px;
      min-width: min(280px, 72vw);
      padding-inline: 28px;
      border-radius: 999px;
      border: 0;
      font-size: 19px;
      font-weight: 900;
      letter-spacing: 0.04em;
      color: #2a1300;
      background: linear-gradient(135deg, #ffd66b, #ff9a3c);
      box-shadow: 0 12px 28px rgba(255, 154, 60, 0.42), inset 0 2px 0 rgba(255, 255, 255, 0.5);
      cursor: pointer;
    }
.title-share-play:hover{ filter: brightness(1.06); }
.title-share-play:active{ transform: scale(0.96); }
.title-share-play[hidden]{ display: none; }


    @keyframes title-start-pulse {
      0%, 100% { transform: scale(1); box-shadow: 0 14px 34px rgba(53, 232, 197, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.5); }
      50% { transform: scale(1.045); box-shadow: 0 18px 44px rgba(53, 232, 197, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.5); }
    }body.title-active .hud,
    body.title-active .panel,
    body.title-active .toast{
      display: none !important;
    }
body.title-active #back-to-title{
      display: none;
    }


    @media (prefers-reduced-motion: reduce) {.title-logo, .title-start, .round-timer, .round-timer .round-time, .round-announcement, .chain-effect, .rotate-prompt-icon{ animation: none; }
.title-menu-button, .title-menu-item{ transition: none; }
.daily-result-card, .daily-result-medal.show{ animation: none; }

    }

    @media (max-width: 720px) {.player-hud{
        top: 12px;
        right: 8px;
        left: 8px;
        gap: 6px;
      }
.round-timer{
        min-width: 50px;
      }
.round-timer .round-time{
        font-size: 29px;
      }
.round-timer-label{
        font-size: 9px;
      }
.player-stats,
      .player-controls{
        gap: 5px;
      }
.player-stat{
        min-width: 78px;
        height: 44px;
        padding: 5px 9px 4px;
        border-radius: 14px;
      }
.player-stat.best-stat{
        min-width: 78px;
      }
.player-label{
        font-size: 7px;
      }
.player-value{
        font-size: 20px;
      }
.game-control{
        width: 40px;
        height: 40px;
      }
.title-mode-actions{
        gap: 7px;
      }
.title-secondary{
        min-width: min(200px, 62vw);
        padding-inline: 14px;
        font-size: 14px;
      }
.title-menu-button{
        top: 10px;
        right: 10px;
        width: 43px;
        height: 43px;
      }
.title-menu-popover{
        top: 10px;
        right: 10px;
        width: 43px;
        height: 43px;
      }
.title-menu-item{
        width: 43px;
        height: 43px;
      }
.title-menu-item:nth-child(1){ --menu-x: -51px; --menu-y: 0px; }
.title-menu-item:nth-child(2){ --menu-x: -102px; --menu-y: 0px; }
.title-menu-item:nth-child(3){ --menu-x: -51px; --menu-y: 51px; }
.title-menu-item:nth-child(4){ --menu-x: -102px; --menu-y: 51px; }
.title-menu-item:nth-child(5){ --menu-x: -51px; --menu-y: 102px; }
.title-menu-item:nth-child(6){ --menu-x: -102px; --menu-y: 102px; }
.title-menu-item:nth-child(7){ --menu-x: -51px; --menu-y: 153px; }

    }

    /* スマホ全般（〜480px）: オンラインランキングの名前が 6 字ほどしか出ない問題の本対応。
       固定列（スコア/連鎖/再生）とギャップ・周囲の余白を詰めて名前列(1fr)へ幅を回し、
       名前を 10 字以上＋「…」まで見せる。401〜430px（iPhone Plus/Pro Max・Pixel 等）も
       確実にカバーするため 400px ではなく 480px で発動させる。 */
    @media (max-width: 480px) {.title-ranking-overlay{ padding-inline: 8px; }
.title-ranking-card{ padding-inline: 10px; }
.title-ranking-list .title-ranking-row,
      .title-ranking-self .title-ranking-row{
        --rk-rank: 28px;
        /* スコアは現状4桁まで（カンマ込みでも "9,999"=5字）。右寄せで余白が出ないよう
           5字にスナップする幅まで詰め、余った分は名前列(1fr)へ回す。 */
        --rk-score: 48px;
        --rk-chain: 28px;
        --rk-replay: 46px;
        gap: 4px;
        padding-inline: 8px;
      }
.title-ranking-row-name{
        font-size: 12.5px;
        letter-spacing: -0.01em;
      }

    }

    @media (max-width: 400px) {.player-hud{
        right: 6px;
        left: 6px;
      }
.player-stats,
      .player-controls{
        gap: 4px;
      }
.player-stat{
        min-width: 72px;
        height: 42px;
        padding-inline: 8px;
      }
.player-stat.best-stat{
        min-width: 72px;
      }
.player-value{
        font-size: 19px;
      }
.game-control{
        width: 38px;
        height: 38px;
      }
.result-sheet-studio-card{
        width: calc(100vw - 18px);
        padding: 9px;
      }
.result-sheet-studio-canvas{
        width: min(100%, calc((100vh - 140px) * 0.8));
      }

    }.loading-screen{
      position: fixed;
      inset: 0;
      z-index: 20;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: clamp(22px, 5vh, 40px);
      background: #080a11;
      transition: opacity 0.45s ease;
      padding: env(safe-area-inset-top, 0px) 24px env(safe-area-inset-bottom, 0px);
    }
.loading-screen.hide{
      opacity: 0;
      pointer-events: none;
    }
.loading-wordmark{
      font-weight: 900;
      /* 文字サイズは従来の半分（clamp 42–92px → 21–46px）。 */
      font-size: clamp(21px, 6.5vw, 46px);
      letter-spacing: 0.04em;
      color: #eafcff;
      text-shadow: 0 6px 24px rgba(53, 232, 197, 0.5), 0 2px 0 rgba(79, 140, 255, 0.6);
    }
.loading-bar{
      width: min(420px, 76vw);
      height: 12px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.12);
      overflow: hidden;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
    }
.loading-bar-fill{
      height: 100%;
      width: 0%;
      border-radius: 999px;
      background: linear-gradient(90deg, #35e8c5, #4f8cff);
      transition: width 0.25s ease;
    }
.loading-pct{
      font-variant-numeric: tabular-nums;
      font-weight: 800;
      font-size: 13px;
      letter-spacing: 0.08em;
      color: rgba(244, 247, 251, 0.7);
    }
.loading-warn{
      display: none;
      max-width: min(440px, 86vw);
      text-align: center;
      font-weight: 800;
      font-size: clamp(15px, 4.2vw, 19px);
      line-height: 1.55;
      color: #ffd76a;
      text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }
.loading-screen.boot-warn .loading-warn{ display: block; }
.loading-screen.ready .loading-warn{ display: none; }
.loading-start{
      display: none;
      appearance: none;
      border: 0;
      cursor: pointer;
      padding: 16px 48px;
      border-radius: 999px;
      font-weight: 1000;
      font-size: clamp(20px, 5.4vw, 30px);
      letter-spacing: 0.06em;
      color: #06303a;
      background: linear-gradient(135deg, #7af5dd, #4fd0ff);
      box-shadow: 0 10px 30px rgba(53, 232, 197, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.6);
      transition: transform 120ms ease, box-shadow 160ms ease;
    }
.loading-start:active{
      transform: translateY(2px) scale(0.98);
      box-shadow: 0 5px 16px rgba(53, 232, 197, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.6);
    }
.loading-screen.ready .loading-bar,
    .loading-screen.ready .loading-pct{
      display: none;
    }
.loading-screen.ready .loading-start{
      display: inline-block;
      animation: loading-start-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    }


    @keyframes loading-start-pop {
      0% { opacity: 0; transform: scale(0.7); }
      100% { opacity: 1; transform: scale(1); }
    }#install-banner{
      position: fixed;
      z-index: 11;
      left: 50%;
      bottom: calc(18px + env(safe-area-inset-bottom, 0px));
      transform: translateX(-50%) translateY(16px);
      width: min(420px, calc(100vw - 24px));
      display: none;
      flex-direction: column;
      gap: 10px;
      padding: 14px 14px 12px;
      border-radius: 16px;
      background: rgba(12, 16, 26, 0.92);
      border: 1px solid var(--line);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease, transform 0.3s ease;
    }
#install-banner.show{
      display: flex;
      opacity: 1;
      transform: translateX(-50%) translateY(0);
      pointer-events: auto;
    }
body:not(.title-active) #install-banner{
      display: none !important;
    }
.install-row{
      display: flex;
      align-items: center;
      gap: 12px;
    }
.install-icon{
      width: 44px;
      height: 44px;
      border-radius: 12px;
      flex: 0 0 auto;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }
.install-text{
      flex: 1 1 auto;
      min-width: 0;
    }
.install-title{
      font-weight: 800;
      font-size: 14px;
      color: var(--text);
      letter-spacing: 0.02em;
    }
.install-desc{
      margin-top: 2px;
      font-size: 12px;
      line-height: 1.4;
      color: var(--muted);
    }
.install-close{
      flex: 0 0 auto;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.06);
      color: var(--muted);
      font-size: 16px;
      line-height: 1;
      cursor: pointer;
    }
.install-actions{
      display: flex;
      gap: 8px;
    }
.install-cta{
      flex: 1 1 auto;
      padding: 10px 14px;
      border-radius: 10px;
      border: none;
      font-weight: 800;
      font-size: 14px;
      color: #04221d;
      background: linear-gradient(90deg, #35e8c5, #4f8cff);
      cursor: pointer;
    }
.install-ios-steps{
      display: none;
      font-size: 12px;
      line-height: 1.5;
      color: var(--muted);
      background: rgba(255, 255, 255, 0.04);
      border-radius: 10px;
      padding: 8px 10px;
    }
.install-ios-steps b{
      color: var(--text);
    }
#install-banner.ios .install-actions{
      display: none;
    }
#install-banner.ios .install-ios-steps{
      display: block;
    }
#update-banner{
      position: fixed;
      z-index: 12;
      left: 50%;
      top: calc(14px + env(safe-area-inset-top, 0px));
      transform: translateX(-50%) translateY(-16px);
      width: min(420px, calc(100vw - 24px));
      display: none;
      flex-direction: column;
      gap: 10px;
      padding: 14px 14px 12px;
      border-radius: 16px;
      background: rgba(12, 16, 26, 0.92);
      border: 1px solid var(--line);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease, transform 0.3s ease;
    }
#update-banner.show{
      display: flex;
      opacity: 1;
      transform: translateX(-50%) translateY(0);
      pointer-events: auto;
    }
#desktop-game-window,
    #desktop-calculator{ display: none; }
html.desktop-game-window-enabled #desktop-game-window{
      position: fixed;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      display: flex;
      flex-direction: column;
      gap: 6px;
      z-index: 40;
    }
html.desktop-game-window-enabled.desktop-game-calc #desktop-game-window{ display: none; }
html.desktop-game-window-enabled #desktop-game-toolbar{
      height: 36px;
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      padding: 0 8px;
      border-radius: 12px;
      background: rgba(8, 30, 44, 0.85);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
      color: #eafcff;
      box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.7);
      user-select: none;
    }
html.desktop-game-window-enabled .desktop-calc-button{
      width: 28px;
      height: 26px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.06);
      color: #cfeefb;
      font: inherit;
      font-size: 15px;
      line-height: 1;
      cursor: pointer;
    }
html.desktop-game-window-enabled .desktop-calc-button:hover{ background: rgba(255, 255, 255, 0.14); }
html.desktop-game-window-enabled.desktop-game-calc #desktop-calculator{
      position: fixed;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 260px;
      padding: 14px;
      border-radius: 18px;
      background: #1c1c1e;
      box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
      z-index: 40;
      user-select: none;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }
html.desktop-game-window-enabled #desktop-calculator .calc-topbar{
      display: flex;
      justify-content: flex-end;
      height: 22px;
    }
html.desktop-game-window-enabled #desktop-calculator .calc-power{
      width: 28px;
      height: 22px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: #6b6b70;
      font-size: 14px;
      line-height: 1;
      cursor: pointer;
    }
html.desktop-game-window-enabled #desktop-calculator .calc-power:hover{ color: #c9c9ce; }
html.desktop-game-window-enabled #desktop-calculator .calc-display{
      min-height: 56px;
      display: flex;
      align-items: flex-end;
      justify-content: flex-end;
      padding: 0 6px 6px;
      color: #fff;
      font-size: 44px;
      font-weight: 300;
      line-height: 1;
      overflow: hidden;
      white-space: nowrap;
    }
html.desktop-game-window-enabled #desktop-calculator .calc-keys{
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
    }
html.desktop-game-window-enabled #desktop-calculator .calc-key{
      height: 52px;
      border: none;
      border-radius: 999px;
      background: #333336;
      color: #fff;
      font-size: 22px;
      font-weight: 500;
      cursor: pointer;
    }
html.desktop-game-window-enabled #desktop-calculator .calc-key:active{ filter: brightness(1.3); }
html.desktop-game-window-enabled #desktop-calculator .calc-key[data-variant="fn"]{
      background: #a5a5a5;
      color: #1c1c1e;
    }
html.desktop-game-window-enabled #desktop-calculator .calc-key[data-variant="op"]{
      background: #ff9f0a;
      color: #fff;
    }
html.desktop-game-window-enabled #desktop-calculator .calc-key[data-wide="1"]{
      grid-column: span 2;
      justify-self: stretch;
      text-align: left;
      padding-left: 22px;
    }
html.desktop-game-window-enabled #desktop-game-stage{
      position: relative;
      flex: 0 0 auto;
      overflow: hidden;
      border-radius: 16px;
      background: #070b14;
      box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
    }
html.desktop-game-window-enabled #desktop-game-scaler{
      position: absolute;
      top: 0;
      left: 0;
      width: 410px;
      height: 683px;
      transform-origin: top left;
    }
html.desktop-game-window-enabled #desktop-game-scaler > canvas{
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }
html.desktop-game-window-enabled #desktop-game-scaler > #app{
      position: absolute;
      inset: 0;
    }
#round-timer, .session-recovery[hidden], .title-start[hidden], .title-secondary[hidden]{ display: none !important; }
.session-recovery{ display: grid; gap: 12px; justify-items: center; max-width: 100%; }
#session-status, #session-pause-status{ margin: 0; max-width: 300px; font-size: 13px; line-height: 1.5; color: #eafffb; text-align: center; }
#session-status{ background: rgba(16, 62, 76, .75); border-radius: 12px; padding: 8px 12px; }
#session-pause-status{ color: #174c5b; }
.title-screen.hide .session-recovery button{ pointer-events: none; }
.chain-bonus{ display: block; font-size: 0.48em; line-height: 1.2; margin-top: 0.1em; }

