
      :root {
        --bg: #040d07;
        --bg2: #0b2213;
        --panel: rgba(10, 30, 18, 0.92);
        --line: rgba(160, 255, 180, 0.18);
        --text: #eafff0;
        --muted: #9cc7a8;
        --accent: #ffd84a;
        --hot: #ff4a6a;
        --cool: #5ab8ff;
        --good: #6bff9a;
        --font: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif;
        --fx: 'Dela Gothic One', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
        /* 夜の森の筐体という単一のダークな世界観で統一する */
        color-scheme: dark;
      }
      * { box-sizing: border-box; }
      html, body {
        margin: 0;
        height: 100%;
        background: radial-gradient(ellipse at 50% 20%, #12361e 0%, var(--bg) 70%) fixed;
        background-color: var(--bg);
        color: var(--text);
        font-family: var(--font);
        overflow: hidden;
        overscroll-behavior: none;
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        touch-action: none;
      }
      #app { display: flex; width: 100%; height: 100%; }
      #stage { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; position: relative; }
      #game { display: block; touch-action: none; border-radius: 14px; box-shadow: 0 0 60px rgba(80, 255, 140, 0.15), 0 20px 60px rgba(0, 0, 0, 0.7); }
      #panel {
        width: 320px; flex: none; height: 100%; overflow-y: auto; padding: 16px 14px 24px;
        background: var(--panel); border-left: 1px solid var(--line); backdrop-filter: blur(6px);
        touch-action: pan-y; -webkit-user-select: text; user-select: text;
      }
      #panel h2 { font-family: var(--fx); font-weight: 400; font-size: 18px; margin: 18px 0 8px; color: var(--accent); letter-spacing: 0.05em; }
      #panel h2:first-child { margin-top: 0; }
      .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
      .cell { background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; }
      .cell .k { font-size: 11px; color: var(--muted); }
      .cell .v { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
      .cell.wide { grid-column: span 2; }
      .v.hot { color: var(--hot); }
      .v.gold { color: var(--accent); }
      .v.good { color: var(--good); }
      .v.cool { color: var(--cool); }
      #slump { width: 100%; height: 120px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 10px; display: block; }
      #history { list-style: none; padding: 0; margin: 0; font-size: 13px; }
      #history li { display: flex; justify-content: space-between; padding: 5px 8px; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
      #history li .tag { font-weight: 900; padding: 0 6px; border-radius: 6px; font-size: 11px; }
      .tag.k { background: var(--hot); color: #fff; }
      .tag.n { background: var(--cool); color: #002; }
      .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
      button.ui {
        font-family: var(--font); font-weight: 900; font-size: 14px; color: var(--text); cursor: pointer;
        background: linear-gradient(180deg, #2a6a3a, #133a1f); border: 1px solid rgba(160, 255, 180, 0.35);
        border-radius: 12px; padding: 10px 8px; touch-action: manipulation;
      }
      button.ui:hover { filter: brightness(1.15); }
      button.ui.gold { background: linear-gradient(180deg, #ffd84a, #b8780a); color: #2a1600; }
      button.ui.red { background: linear-gradient(180deg, #ff5a6a, #8a0a1a); }
      .note { font-size: 11px; color: var(--muted); line-height: 1.6; }
      #drawerBtn {
        display: none; position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 10px; z-index: 20;
        font-family: var(--font); font-weight: 900; font-size: 13px; color: var(--text);
        background: rgba(10, 40, 20, 0.85); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px;
      }
      #panelClose { display: none; }
      #scrim { display: none; }
      @media (max-width: 899px) {
        #panel { position: fixed; right: 0; top: 0; bottom: 0; z-index: 30; transform: translateX(105%); transition: transform 0.25s ease; width: min(340px, 92vw); padding-top: calc(12px + env(safe-area-inset-top)); }
        #panel.open { transform: none; }
        #drawerBtn { display: block; }
        /* スマホではデータ画面が開閉ボタンを覆うので、画面内に閉じるボタンを置く */
        #panelClose { display: block; position: sticky; top: 0; z-index: 1; width: 100%; margin-bottom: 14px; }
        #scrim { position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.5); }
        #scrim.open { display: block; }
      }
      .overlay {
        position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
        background: rgba(2, 10, 5, 0.82); backdrop-filter: blur(4px); padding: 16px;
      }
      .overlay.hidden { display: none; }
      .card {
        width: min(460px, 100%); max-height: 88vh; overflow-y: auto; background: linear-gradient(180deg, #123a20, #071a0e);
        border: 1px solid rgba(160, 255, 180, 0.35); border-radius: 18px; padding: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
        touch-action: pan-y; -webkit-user-select: text; user-select: text;
      }
      .card h3 { font-family: var(--fx); font-weight: 400; margin: 0 0 12px; color: var(--accent); font-size: 22px; }
      .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
      .row select, .row input[type='range'] { font-family: var(--font); font-size: 14px; }
      .row select { background: #0b2213; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
      .zk { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
      .zk .lock { color: #567; }
      .zk .rel { font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; }
      .tests { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
      #title { flex-direction: column; text-align: center; background: radial-gradient(ellipse at 50% 30%, #1d5a30 0%, #030a05 75%); cursor: pointer; }
      #title .logo { font-family: var(--fx); font-size: clamp(54px, 15vw, 96px); line-height: 1; background: linear-gradient(180deg, #f2ffe8, #7dff6a 45%, #1d9a3a 60%, #a8ff7a); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 2px #032a0c; filter: drop-shadow(0 0 18px rgba(120, 255, 150, 0.6)); }
      #title .sub { font-family: var(--fx); font-size: clamp(20px, 5vw, 30px); color: var(--accent); margin-top: 6px; text-shadow: 0 2px 0 #4a2a00; }
      #title .tap { margin-top: 34px; font-weight: 900; font-size: 20px; animation: blink 1.1s infinite; }
      #title .warn { margin-top: 26px; max-width: 420px; font-size: 12px; color: var(--muted); line-height: 1.7; }
      #title .loading { margin-top: 10px; font-size: 12px; color: var(--muted); }
      @keyframes blink { 50% { opacity: 0.25; } }
      #toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; background: rgba(0, 0, 0, 0.8); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; font-weight: 800; font-size: 14px; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
      #toast.show { opacity: 1; }
    