    :root {
      --heat: 0;
      --ink: #17202a;
      --muted: #607086;
      --line: rgba(23, 32, 42, 0.1);
      --panel: rgba(255, 255, 255, 0.84);
      --green: #1f7a5d;
      --blue: #266fdd;
      --orange: #d86428;
    }

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

    html {
      scroll-behavior: smooth;
    }

    body {
      min-height: 100vh;
      font-family: Arial, "Noto Sans KR", sans-serif;
      color: var(--ink);
      background:
        radial-gradient(circle at top left, rgba(57, 183, 138, 0.28), transparent 34%),
        radial-gradient(circle at bottom right, rgba(255, 190, 82, 0.32), transparent 32%),
        linear-gradient(135deg, #f7fafc 0%, #e9eef3 100%);
      overflow-x: hidden;
    }

    body::before,
    body::after {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 0;
    }

    body::before {
      background:
        radial-gradient(circle at center, transparent 0 34%, rgba(255, 0, 0, calc(var(--heat) * 0.28)) 82%),
        linear-gradient(135deg, rgba(255, 45, 45, calc(var(--heat) * 0.3)), rgba(255, 136, 0, calc(var(--heat) * 0.16)));
      opacity: calc(0.08 + var(--heat) * 0.95);
      mix-blend-mode: multiply;
    }

    body::after {
      background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, calc(var(--heat) * 0.06)) 0,
        rgba(255, 255, 255, calc(var(--heat) * 0.06)) 1px,
        transparent 1px,
        transparent 9px
      );
      opacity: calc(var(--heat) * 0.35);
    }

    a {
      color: inherit;
    }

    .site {
      position: relative;
      z-index: 1;
      width: min(1080px, 100%);
      margin: 0 auto;
      padding: 18px;
    }

    .site-header,
    .site-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 14px 4px;
    }

    .brand {
      font-size: 20px;
      font-weight: 900;
      text-decoration: none;
    }

    .nav {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      color: var(--muted);
      font-size: 14px;
      font-weight: 800;
    }

    .nav a,
    .nav button {
      border: 0;
      padding: 0;
      color: inherit;
      background: transparent;
      cursor: pointer;
      font: inherit;
      font-weight: inherit;
      text-decoration: none;
    }

    .nav a:hover,
    .nav button:hover {
      color: var(--ink);
    }

    .game-shell {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 300px;
      gap: 18px;
      align-items: start;
    }

    .game {
      min-height: min(820px, calc(100vh - 120px));
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .game.shake {
      animation: screenShake 110ms linear;
    }

    .top-panel {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    .panel,
    .stat,
    .stage,
    .result-box,
    .leaderboard,
    .ad-box {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow:
        0 18px 55px rgba(31, 41, 55, 0.12),
        0 0 calc(var(--heat) * 42px) rgba(255, 47, 47, calc(var(--heat) * 0.2));
      backdrop-filter: blur(14px);
    }

    .stat {
      padding: 18px 16px;
      text-align: center;
    }

    .stat span {
      display: block;
      color: var(--muted);
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 6px;
    }

    .stat strong {
      display: block;
      font-size: clamp(32px, 8vw, 54px);
      line-height: 1;
      letter-spacing: 0;
      transition: color 140ms ease, text-shadow 140ms ease, transform 120ms ease;
    }

    body.heat-active .stat strong {
      color: #d72828;
      text-shadow: 0 0 calc(var(--heat) * 24px) rgba(255, 43, 43, 0.65);
    }

    .stat strong.count-pop {
      transform: scale(1.13);
    }

    .stage {
      flex: 1;
      min-height: 520px;
      padding: clamp(18px, 4vw, 36px);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 22px;
      text-align: center;
    }

    h1 {
      font-size: clamp(32px, 7vw, 62px);
      line-height: 1.05;
      letter-spacing: 0;
    }

    h2 {
      font-size: clamp(24px, 4vw, 34px);
      letter-spacing: 0;
    }

    h3 {
      font-size: 20px;
      letter-spacing: 0;
    }

    p {
      line-height: 1.65;
    }

    .subtitle {
      max-width: 620px;
      color: var(--muted);
      font-size: clamp(16px, 3vw, 19px);
      line-height: 1.55;
      margin: 14px auto 24px;
    }

    .primary-button,
    .retry-button,
    .submit-button,
    .click-zone {
      border: 0;
      border-radius: 8px;
      cursor: pointer;
      font-family: inherit;
      font-weight: 900;
      transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }

    .primary-button,
    .retry-button,
    .submit-button {
      min-height: 56px;
      padding: 0 24px;
      color: #ffffff;
      background: var(--green);
      box-shadow: 0 14px 26px rgba(31, 122, 93, 0.32);
      font-size: 19px;
    }

    .retry-button {
      background: var(--orange);
      box-shadow: 0 14px 26px rgba(216, 100, 40, 0.28);
    }

    .submit-button {
      background: var(--blue);
      box-shadow: 0 14px 26px rgba(38, 111, 221, 0.24);
    }

    .primary-button:hover,
    .retry-button:hover,
    .submit-button:hover,
    .click-zone:hover {
      filter: brightness(1.04);
    }

    .primary-button:active,
    .retry-button:active,
    .submit-button:active {
      transform: scale(0.97);
    }

    .submit-button:disabled {
      cursor: not-allowed;
      filter: grayscale(0.4) brightness(0.9);
      transform: none;
    }

    .click-zone {
      position: relative;
      overflow: hidden;
      width: min(520px, 100%);
      aspect-ratio: 1 / 1;
      max-height: min(520px, 58vh);
      color: #ffffff;
      background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, calc(0.18 + var(--heat) * 0.24)), transparent 24%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent 38%),
        linear-gradient(135deg, #266fdd 0%, #20a36b 48%, #f0a329 76%, #ff2d2d 100%);
      box-shadow:
        0 24px 45px rgba(38, 111, 221, 0.24),
        0 0 calc(var(--heat) * 82px) rgba(255, 34, 34, 0.82),
        inset 0 -12px 0 rgba(0, 0, 0, 0.14),
        inset 0 0 calc(var(--heat) * 70px) rgba(255, 36, 36, 0.7);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      user-select: none;
      filter: saturate(calc(1 + var(--heat) * 1.8)) contrast(calc(1 + var(--heat) * 0.18));
    }

    .click-zone::before {
      content: "";
      position: absolute;
      inset: -35%;
      background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, calc(var(--heat) * 0.45)), transparent, rgba(255, 0, 0, calc(var(--heat) * 0.38)), transparent);
      opacity: calc(var(--heat) * 0.85);
      animation: heatSpin 1.1s linear infinite;
    }

    .click-zone::after {
      content: "";
      position: absolute;
      width: calc(130px + var(--heat) * 160px);
      height: calc(130px + var(--heat) * 160px);
      border-radius: 50%;
      background: radial-gradient(circle, rgba(255, 255, 255, 0.62), rgba(255, 35, 35, 0.3) 36%, transparent 70%);
      opacity: 0;
      transform: scale(0.45);
      pointer-events: none;
    }

    .click-zone:active,
    .click-zone.pop {
      transform: scale(0.955);
    }

    .click-zone.pop::after {
      animation: clickShock 180ms ease-out;
    }

    .click-zone[disabled] {
      cursor: not-allowed;
      filter: grayscale(0.25) brightness(0.86);
    }

    .click-zone[disabled]::before,
    .click-zone[disabled]::after {
      display: none;
    }

    .click-label,
    .click-hint {
      position: relative;
      z-index: 1;
    }

    .click-label {
      font-size: clamp(32px, 8vw, 70px);
      line-height: 1;
      letter-spacing: 0;
      text-shadow: 0 0 calc(8px + var(--heat) * 26px) rgba(255, 255, 255, 0.75);
    }

    .click-hint {
      font-size: clamp(16px, 4vw, 24px);
      opacity: 0.92;
    }

    .result {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(290px, 0.85fr);
      gap: 18px;
      width: 100%;
      align-items: start;
      text-align: left;
    }

    .summary {
      display: grid;
      gap: 16px;
    }

    .result-box,
    .leaderboard,
    .panel {
      padding: clamp(18px, 4vw, 28px);
    }

    .result-title,
    .leaderboard-title {
      color: var(--muted);
      font-size: 15px;
      font-weight: 800;
      margin-bottom: 8px;
    }

    .result-number {
      font-size: clamp(38px, 9vw, 70px);
      font-weight: 900;
      line-height: 1;
    }

    .rating {
      color: var(--ink);
      font-size: clamp(24px, 6vw, 38px);
      font-weight: 900;
      line-height: 1.25;
    }

    .score-form {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
    }

    .nickname-input {
      width: 100%;
      min-height: 56px;
      border: 1px solid rgba(23, 32, 42, 0.16);
      border-radius: 8px;
      padding: 0 16px;
      color: var(--ink);
      font: inherit;
      font-size: 18px;
      font-weight: 800;
      outline: none;
      background: #ffffff;
    }

    .nickname-input:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 4px rgba(38, 111, 221, 0.14);
    }

    .form-message,
    .leaderboard-status {
      min-height: 22px;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.45;
    }

    .leaderboard-title-row {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    .leaderboard-title {
      color: var(--ink);
      font-size: 24px;
      margin-bottom: 0;
    }

    .leaderboard-badge {
      color: var(--green);
      font-size: 13px;
      font-weight: 900;
      white-space: nowrap;
    }

    .rank-list {
      list-style: none;
      display: grid;
      gap: 8px;
    }

    .rank-item {
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      min-height: 46px;
      padding: 10px 12px;
      border-radius: 8px;
      background: rgba(247, 250, 252, 0.95);
      border: 1px solid rgba(23, 32, 42, 0.08);
    }

    .rank-number {
      color: var(--blue);
      font-weight: 900;
      font-size: 18px;
      text-align: center;
    }

    .rank-name {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 900;
    }

    .rank-score {
      text-align: right;
      color: var(--muted);
      font-size: 14px;
      font-weight: 800;
      white-space: nowrap;
    }

    .empty-rank {
      padding: 18px;
      color: var(--muted);
      background: rgba(247, 250, 252, 0.95);
      border: 1px dashed rgba(23, 32, 42, 0.2);
      border-radius: 8px;
      text-align: center;
    }

    .actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .sidebar {
      display: grid;
      gap: 14px;
      position: sticky;
      top: 18px;
    }

    .ad-box {
      min-height: 280px;
      padding: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.5;
    }

    .panel h2,
    .panel h3 {
      margin-bottom: 10px;
    }

    .panel p + p,
    .panel ul,
    .panel ol {
      margin-top: 10px;
    }

    .panel ul,
    .panel ol {
      padding-left: 20px;
      line-height: 1.7;
      color: var(--muted);
    }

    .policy-links {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 14px;
      color: var(--blue);
      font-weight: 800;
    }

    .modal {
      position: fixed;
      inset: 0;
      z-index: 5;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(12, 18, 28, 0.58);
      backdrop-filter: blur(8px);
    }

    .modal.is-open {
      display: flex;
    }

    .modal-panel {
      width: min(720px, 100%);
      max-height: min(760px, calc(100vh - 36px));
      overflow: auto;
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid rgba(255, 255, 255, 0.5);
      border-radius: 8px;
      box-shadow: 0 26px 80px rgba(0, 0, 0, 0.24);
      padding: clamp(22px, 5vw, 34px);
    }

    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 16px;
    }

    .modal-close {
      width: 42px;
      height: 42px;
      flex: 0 0 auto;
      border: 0;
      border-radius: 8px;
      color: #ffffff;
      background: var(--ink);
      cursor: pointer;
      font-size: 26px;
      line-height: 1;
    }

    .modal-body {
      color: var(--muted);
      line-height: 1.7;
    }

    .modal-body p + p,
    .modal-body ul,
    .modal-body ol {
      margin-top: 12px;
    }

    .modal-body ul,
    .modal-body ol {
      padding-left: 22px;
    }

    .hidden {
      display: none;
    }

    @keyframes heatSpin {
      to {
        transform: rotate(360deg);
      }
    }

    @keyframes clickShock {
      0% {
        opacity: calc(0.2 + var(--heat) * 0.75);
        transform: scale(0.3);
      }
      100% {
        opacity: 0;
        transform: scale(1.45);
      }
    }

    @keyframes screenShake {
      0%, 100% { transform: translate3d(0, 0, 0); }
      25% { transform: translate3d(calc(var(--heat) * -6px), calc(var(--heat) * 3px), 0); }
      50% { transform: translate3d(calc(var(--heat) * 5px), calc(var(--heat) * -3px), 0); }
      75% { transform: translate3d(calc(var(--heat) * -3px), calc(var(--heat) * -2px), 0); }
    }

    @media (max-width: 900px) {
      .game-shell {
        grid-template-columns: 1fr;
      }

      .sidebar {
        position: static;
      }

    }

    @media (max-width: 760px) {
      .result {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 560px) {
      .site {
        padding: 12px;
      }

      .site-header,
      .site-footer {
        align-items: flex-start;
        flex-direction: column;
      }

      .game {
        min-height: auto;
        gap: 14px;
      }

      .top-panel {
        gap: 10px;
      }

      .stat {
        padding: 14px 10px;
      }

      .stat span {
        font-size: 13px;
      }

      .stage {
        min-height: 460px;
        padding: 18px;
      }

      .click-zone {
        max-height: 390px;
      }

      .score-form {
        grid-template-columns: 1fr;
      }

      .submit-button,
      .retry-button {
        width: 100%;
      }

      .actions {
        display: grid;
      }
    }

