
      .game {
        display: grid;
        grid-template-rows: auto 1fr auto;
        min-height: 0;
        height: 100%;
        overflow: hidden;
      }

      .game-head {
        padding: 22px 24px 14px;
        border-bottom: 1px solid rgba(255, 219, 151, 0.16);
        display: flex;
        justify-content: space-between;
        gap: 12px;
        align-items: center;
      }

      .game-head-actions {
        display: inline-flex;
        align-items: center;
        gap: 12px;
      }

      .head-action-btn {
        min-width: 40px;
        min-height: 40px;
      }

      .status {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--muted);
      }

      .status-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--accent-2);
        box-shadow: 0 0 16px rgba(139, 207, 157, 0.65);
      }

      .status-dot.offline {
        background: var(--danger);
        box-shadow: 0 0 16px rgba(255, 138, 115, 0.55);
      }

      #desk {
        padding: 12px 14px 8px;
        overflow: auto;
        white-space: pre-wrap;
        font-size: 0.94rem;
        line-height: 1.55;
        min-height: 0;
        background: linear-gradient(180deg, rgba(255, 245, 220, 0.03), rgba(255, 245, 220, 0.015));
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: flex-start;
      }

      #desk p {
        margin: 0 0 6px;
        animation: reveal 160ms ease-out;
        padding: 6px 10px;
        border-radius: 10px;
        border-left: 3px solid rgba(255, 219, 151, 0.1);
        background: rgba(255, 245, 220, 0.04);
      }

      #desk p.system {
        color: var(--accent);
      }

      #desk p.type-command {
        color: #ffe2a8;
        background: rgba(227, 180, 93, 0.12);
        border-left-color: rgba(227, 180, 93, 0.65);
        font-weight: 700;
      }

      #desk p.type-move {
        color: #d8f2ff;
        background: rgba(128, 194, 227, 0.12);
        border-left-color: rgba(128, 194, 227, 0.7);
      }

      #desk p.type-combat {
        color: #ffd0c5;
        background: rgba(201, 86, 65, 0.12);
        border-left-color: rgba(255, 120, 93, 0.72);
      }

      #desk p.type-reward {
        color: #d6ffd6;
        background: rgba(94, 170, 102, 0.14);
        border-left-color: rgba(126, 212, 120, 0.72);
      }

      #desk p.type-chat {
        color: #f8e2ff;
        background: rgba(177, 122, 215, 0.12);
        border-left-color: rgba(202, 146, 255, 0.72);
      }

      #desk p.type-info {
        color: var(--text);
        background: rgba(255, 245, 220, 0.06);
        border-left-color: rgba(255, 219, 151, 0.24);
      }

      #desk p.type-warn {
        color: #ffd8bd;
        background: rgba(191, 116, 54, 0.12);
        border-left-color: rgba(255, 167, 89, 0.72);
      }

      .cmd-link {
        display: inline-block;
        margin: 0 0.12rem;
        padding: 0.05rem 0.45rem;
        border: 0;
        border-radius: 999px;
        background: rgba(227, 180, 93, 0.18);
        color: var(--accent);
        font: inherit;
        cursor: pointer;
        vertical-align: baseline;
      }

      .composer {
        padding: 8px 12px 10px;
        border-top: 1px solid rgba(255, 219, 151, 0.08);
        position: sticky;
        bottom: 0;
        background: linear-gradient(180deg, rgba(49, 33, 17, 0.86), rgba(76, 53, 31, 0.9));
        z-index: 5;
        box-shadow: 0 -6px 16px rgba(28, 15, 6, 0.12);
        opacity: 0.78;
        transition: opacity 140ms ease, background 140ms ease, box-shadow 140ms ease;
      }

      .composer:hover,
      .composer:focus-within {
        opacity: 1;
        background: linear-gradient(180deg, rgba(49, 33, 17, 0.93), rgba(76, 53, 31, 0.96));
        box-shadow: 0 -8px 20px rgba(28, 15, 6, 0.16);
      }

      input {
        width: 100%;
        border: 1px solid rgba(255, 219, 151, 0.2);
        border-radius: 12px;
        padding: 10px 12px;
        font: inherit;
        color: var(--text);
        background: rgba(255, 245, 220, 0.07);
      }

      input:focus {
	outline: 2px solid rgba(227, 180, 93, 0.55);
	outline-offset: 2px;
      }

      @media (prefers-reduced-motion: reduce) {
        * {
          animation: none !important;
          transition: none !important;
          scroll-behavior: auto !important;
        }
      }

      button {
        border: 0;
        border-radius: 14px;
        padding: 0 22px;
        font: inherit;
        font-weight: 700;
        color: #2d1708;
        background: linear-gradient(180deg, #f4cf86, #dca34e);
        cursor: pointer;
      }

      .hintbar {
        margin-top: 8px;
        color: var(--muted);
        font-size: 0.72rem;
      }

      .character-panel {
        display: grid;
        gap: 12px;
      }

      .character-info-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
      }

      .character-info-item {
        padding: 8px;
        border-radius: 10px;
        background: rgba(255, 245, 220, 0.06);
      }

      .character-info-item .meta-label {
        display: block;
        color: var(--muted);
        font-size: 0.65rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 2px;
      }

      .character-info-item .meta-value {
        color: var(--text);
        font-size: 0.95rem;
      }

      .stat-grid {
        display: grid;
        gap: 8px;
      }

      .stat-box {
        padding: 8px;
        border-radius: 10px;
        background: rgba(255, 245, 220, 0.06);
      }

      .stat-box strong {
        display: block;
        color: var(--muted);
        font-size: 0.65rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 2px;
      }

      .modal-backdrop {
        position: fixed;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(16, 10, 5, 0.72);
        backdrop-filter: blur(4px);
        z-index: 20;
      }

      .modal-backdrop.hidden {
        display: none;
      }

      .modal {
        width: min(460px, calc(100vw - 24px));
        padding: 22px;
        border-radius: 18px;
        background: linear-gradient(180deg, rgba(34, 21, 10, 0.98), rgba(56, 36, 18, 0.98));
        border: 1px solid rgba(255, 219, 151, 0.24);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
      }

      .modal h2 {
        margin: 0 0 10px;
        font-size: 1.4rem;
      }

      .modal p {
        margin: 0 0 14px;
        color: var(--muted);
        line-height: 1.6;
      }

      .modal-grid {
        display: grid;
        gap: 10px;
      }

      .hidden {
        display: none !important;
      }

      .selector-preview {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 12px;
        align-items: center;
        padding: 10px 12px;
        border-radius: 14px;
        background: rgba(255, 245, 220, 0.06);
      }

      .selector-preview-body {
        display: grid;
        grid-template-columns: 112px 1fr;
        gap: 12px;
        align-items: center;
      }

      .selector-preview img {
        width: 112px;
        height: 112px;
        object-fit: cover;
        border-radius: 12px;
        border: 1px solid rgba(255, 219, 151, 0.2);
        background: rgba(255, 245, 220, 0.05);
      }

      .selector-nav {
        width: 42px;
        height: 42px;
        border-radius: 999px;
        padding: 0;
        font-size: 1.2rem;
      }

      .selector-preview-text {
        color: var(--muted);
        font-size: 0.9rem;
        line-height: 1.5;
      }

      .choice-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
      }

      .choice-card {
        display: grid;
        gap: 8px;
        padding: 10px;
        border-radius: 14px;
        background: rgba(255, 245, 220, 0.06);
        border: 1px solid rgba(255, 219, 151, 0.12);
        cursor: pointer;
      }

      .choice-card.active {
        border-color: rgba(255, 219, 151, 0.6);
        box-shadow: 0 0 0 2px rgba(255, 219, 151, 0.16);
        background: rgba(255, 245, 220, 0.1);
      }

      .choice-card img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 12px;
        background: rgba(255, 245, 220, 0.05);
      }

      .choice-card strong {
        font-size: 0.98rem;
      }

      .choice-card span {
        color: var(--muted);
        font-size: 0.84rem;
        line-height: 1.4;
      }

      .modal-actions {
        display: flex;
        justify-content: flex-end;
        margin-top: 12px;
      }

      .toast {
        position: fixed;
        top: 16px;
        right: 16px;
        max-width: min(380px, calc(100vw - 32px));
        padding: 12px 14px;
        border-radius: 14px;
        background: rgba(34, 21, 10, 0.94);
        color: var(--text);
        border: 1px solid rgba(255, 219, 151, 0.2);
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
        z-index: 30;
      }

      .toast.hidden {
        display: none;
      }

      @keyframes reveal {
        from { opacity: 0; transform: translateY(4px); }
        to { opacity: 1; transform: translateY(0); }
      }

      @media (max-width: 900px) {
        body {
          overflow: auto;
          height: auto;
        }

        .shell {
          grid-template-columns: 1fr;
          width: 100%;
          height: auto;
          min-height: 100vh;
          padding: 12px;
          gap: 12px;
        }

        .room-panel {
          order: 2;
        }

        .game {
          order: 3;
          min-height: 60vh;
        }

        .rightbar {
          order: 1;
        }

        button {
          padding: 16px 22px;
        }

        .control-row,
        .say-row {
          grid-template-columns: 1fr;
        }

        .dir-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }
