    html, body {
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
    }

    :root {
      --app-header-h: 0px;
      --app-footer-h: 0px;
      --spade-color: #0f0f0f;
      --club-color: #747474;
    }

    #playBackBtn {
      position: fixed;
      top: 12px;
      left: 12px;
      z-index: 1700;
      width: 86px;
      border: 1px solid rgba(244, 198, 89, 0.78);
      border-radius: 10px;
      background: linear-gradient(180deg, rgba(48, 35, 10, 0.96), rgba(24, 18, 8, 0.96));
      color: #ffe7b0;
      text-decoration: none;
      padding: 10px 14px;
      text-align: center;
      font-weight: 800;
      letter-spacing: 0.02em;
      line-height: 1;
      box-shadow:
        inset 0 1px 0 rgba(255, 232, 176, 0.24),
        0 8px 20px rgba(0, 0, 0, 0.32),
        0 0 18px rgba(244, 198, 89, 0.22);
    }
    #playBackBtn:hover {
      background: linear-gradient(180deg, rgba(68, 48, 12, 0.98), rgba(34, 24, 8, 0.98));
      border-color: rgba(255, 221, 134, 0.96);
    }

    #boardStatus {
      top: 58px;
      left: 12px;
    }

    #scoreboard {
      top: 152px;
      left: 12px;
      right: auto;
      bottom: auto;
    }

    #playedNotice {
      position: fixed;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      z-index: 1250;
      width: min(640px, 90vw);
      border: 1px solid rgba(244, 198, 89, 0.62);
      border-radius: 12px;
      background: rgba(20, 24, 30, 0.92);
      color: #ecf1f8;
      padding: 14px 16px;
      text-align: center;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
      display: none;
    }
    #playedNotice .title {
      margin: 0 0 6px;
      color: #ffe0a0;
      font-weight: 800;
      letter-spacing: 0.02em;
      font-size: 17px;
    }
    #playedNotice .meta {
      margin: 0;
      color: #d0dbeb;
      font-size: 14px;
    }
    #status.tab-lock-blocked {
      left: 50%;
      top: 50%;
      bottom: auto;
      transform: translate(-50%, -50%);
      width: min(520px, 88vw);
      padding: 16px 18px;
      border-color: rgba(244, 198, 89, 0.72);
      background: rgba(20, 24, 30, 0.94);
      color: #ffe0a0;
      text-align: center;
      font-size: 16px;
      font-weight: 800;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }
    #replayControls {
      display: none;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      width: 100%;
    }
    #replayControls.is-visible {
      display: grid;
    }
    .replay-btn {
      min-height: 58px;
      border: 1px solid rgba(255, 255, 255, 0.22);
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.08);
      color: #fff;
      font-size: 34px;
      font-weight: 800;
      line-height: 1;
      cursor: pointer;
      transition: background 140ms ease, border-color 140ms ease, opacity 140ms ease;
    }
    .replay-btn:hover {
      background: rgba(255, 255, 255, 0.16);
      border-color: rgba(255, 255, 255, 0.34);
    }
    .replay-btn:disabled {
      opacity: 0.38;
      cursor: default;
    }
    #replayCaption {
      display: none;
      grid-column: 1 / -1;
      margin-top: 2px;
      text-align: center;
      color: #d0dbeb;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.02em;
    }
    #replayCaption.is-visible {
      display: block;
    }

    @media (max-width: 1400px) {
      #replayControls {
        width: 120px;
        align-self: flex-end;
      }
    }

    @media (max-width: 1024px) {
      #replayControls {
        width: 120px;
        align-self: flex-end;
        gap: 8px;
      }

      .replay-btn {
        min-height: 52px;
        border-radius: 10px;
        font-size: 26px;
      }

      #replayCaption {
        font-size: 12px;
      }
    }

    @media (max-width: 640px) {
      #replayControls {
        width: 72px;
        margin-top: 12px;
        align-self: flex-end;
        gap: 4px;
      }

      .replay-btn {
        min-height: 40px;
        border-radius: 7px;
        font-size: 18px;
      }

      #replayCaption {
        margin-top: 0;
        font-size: 10px;
      }
    }
    #previousTrickButton {
      display: none;
      width: 100%;
      border: 1px solid rgba(255,255,255,0.2);
      border-radius: 10px;
      background: rgba(0,0,0,0.35);
      color: #fff;
      padding: 10px 12px;
      font-weight: 700;
      text-align: center;
      cursor: pointer;
      box-shadow: var(--shadow);
      backdrop-filter: blur(2px);
    }
    #previousTrickButton.is-visible {
      display: block;
    }
    #previousTrickButton:hover {
      background: rgba(0,0,0,0.5);
      border-color: rgba(255,255,255,0.32);
    }
    #previousTrickModal {
      position: fixed;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(0,0,0,0.68);
      z-index: 3900;
      backdrop-filter: blur(2px);
    }
    #previousTrickModal.open {
      display: flex;
    }
    .previous-trick-dialog {
      position: relative;
      width: min(560px, 92vw);
      min-height: min(470px, 82vh);
      border: 1px solid rgba(255,255,255,0.28);
      border-radius: 12px;
      background: rgba(12, 16, 20, 0.94);
      color: #fff;
      box-shadow: 0 18px 48px rgba(0,0,0,0.48);
      padding: 18px 18px 20px;
    }
    .previous-trick-close {
      position: absolute;
      top: 8px;
      right: 10px;
      width: 30px;
      height: 30px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 0;
      border-radius: 50%;
      background: rgba(255,255,255,0.08);
      color: #fff;
      font-size: 21px;
      line-height: 1;
      cursor: pointer;
    }
    .previous-trick-close:hover {
      background: rgba(255,255,255,0.16);
    }
    .previous-trick-title {
      padding-right: 36px;
      color: #ffe0a0;
      font-size: 18px;
      font-weight: 800;
      letter-spacing: 0.02em;
      line-height: 1.2;
    }
    .previous-trick-stage {
      --previous-card-w: clamp(58px, 12vw, 86px);
      position: relative;
      height: min(340px, 56vh);
      margin-top: 18px;
      border-radius: 10px;
      background:
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.08), rgba(255,255,255,0) 58%),
        rgba(7, 80, 38, 0.74);
      border: 1px solid rgba(255,255,255,0.14);
      overflow: hidden;
    }
    .previous-trick-meta {
      min-height: 20px;
      margin-top: 12px;
      text-align: center;
      color: #d0dbeb;
      font-size: 15px;
      font-weight: 700;
    }
    .previous-trick-card {
      position: absolute;
      width: var(--previous-card-w);
      height: calc(var(--previous-card-w) * 1.625);
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.84);
      transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease;
      pointer-events: none;
      z-index: calc(10 + var(--play-order));
    }
    .previous-trick-card.N {
      left: 50%;
      top: 24%;
    }
    .previous-trick-card.E {
      left: 72%;
      top: 50%;
    }
    .previous-trick-card.S {
      left: 50%;
      top: 76%;
    }
    .previous-trick-card.W {
      left: 28%;
      top: 50%;
    }
    .previous-trick-card.is-played {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
    @media (max-width: 1400px) {
      #playBackBtn {
        width: 58px;
        padding: 8px 6px;
        font-size: 11px;
      }

      #scoreboard {
        top: 122px;
      }

      #previousTrickButton {
        width: min(180px, calc(100vw - 24px));
        align-self: flex-end;
      }
    }

    @media (max-width: 640px) {
      #previousTrickButton {
        position: relative;
        width: 42px;
        height: 42px;
        padding: 0;
        font-size: 0;
        line-height: 1;
      }

      #previousTrickButton::before {
        content: '';
        position: absolute;
        left: 8px;
        top: 6px;
        width: 15px;
        height: 20px;
        border: 2px solid currentColor;
        border-radius: 3px;
        background: rgba(255,255,255,0.08);
        box-shadow:
          5px 4px 0 -1px rgba(0,0,0,0.35),
          5px 4px 0 1px currentColor;
        transform: rotate(-8deg);
      }

      #previousTrickButton::after {
        content: '';
        position: absolute;
        left: 12px;
        top: 10px;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: #f4c659;
        box-shadow: 6px 7px 0 #d32f2f;
        transform: rotate(-8deg);
      }

      .previous-trick-dialog {
        min-height: min(390px, 82vh);
        padding: 14px;
      }

      .previous-trick-stage {
        --previous-card-w: clamp(46px, 17vw, 64px);
        height: min(278px, 54vh);
      }
    }
