
  :root {
    --header-bg: #1565c0;
    --header-hover: #1976d2;
    --app-bg: #f4f5f7;
    --sidebar-bg: #ffffff;
    --panel-bg: #ffffff;
    --border-color: #e0e0e0;
    --text-main: #212121;
    --text-muted: #757575;
    --text-soft: #9e9e9e;
    --brand-blue: #0288d1;
    --brand-blue-active: #0288d1;
    --active-item-bg: #0288d1;
    
    /* Board Theme Variables (defaults to Wood/Tan) */
    --board-light: #ebd0a4;
    --board-dark: #b58863;
    --board-border: #3b332a;
    --coord-on-light: #b58863;
    --coord-on-dark: #ebd0a4;

    --correct-color: #81b64c;
    --correct-bg: #f0f8ea;
    --error-color: #e53935;
    --error-bg: #fdecea;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  }

  /* Board Themes */
  [data-theme="chesscom"] {
    --board-light: #eeeed2;
    --board-dark: #769656;
    --board-border: #42552f;
    --coord-on-light: #769656;
    --coord-on-dark: #eeeed2;
  }
  [data-theme="wood"] {
    --board-light: #ebd0a4;
    --board-dark: #b58863;
    --board-border: #3b332a;
    --coord-on-light: #b58863;
    --coord-on-dark: #ebd0a4;
  }
  [data-theme="blue"] {
    --board-light: #dee3e6;
    --board-dark: #8ca2ad;
    --board-border: #526771;
    --coord-on-light: #8ca2ad;
    --coord-on-dark: #dee3e6;
  }
  [data-theme="slate"] {
    --board-light: #e1e1e1;
    --board-dark: #70757a;
    --board-border: #44484b;
    --coord-on-light: #70757a;
    --coord-on-dark: #e1e1e1;
  }
  [data-theme="walnut"] {
    --board-light: #dfc7a8;
    --board-dark: #8b5a2b;
    --board-border: #4a2f14;
    --coord-on-light: #8b5a2b;
    --coord-on-dark: #dfc7a8;
  }
  [data-theme="ice"] {
    --board-light: #f0f8ff;
    --board-dark: #4682b4;
    --board-border: #234b6b;
    --coord-on-light: #4682b4;
    --coord-on-dark: #f0f8ff;
  }

  body.classroom-page * { box-sizing: border-box; margin: 0; padding: 0; }
  .chess-classroom-wrapper, .chess-classroom-wrapper * { box-sizing: border-box; }

  body.classroom-page {
    font-family: var(--font-family);
    background-color: var(--app-bg);
    color: var(--text-main);
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .chess-classroom-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--app-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    margin: 8px 0;
  }

  /* Top Navigation Bar: Clean Brand Only */
  header.top-nav {
    background-color: var(--header-bg);
    height: 52px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
    z-index: 100;
  }

  .brand-area {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
  }
  .brand-icon {
    font-size: 26px;
    line-height: 1;
    color: #ffd54f;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  }
  .brand-name {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: #ffffff;
  }
  .brand-tag {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
  }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  /* Real-Time Board Theme Selector */
  .theme-selector-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    padding: 5px 12px;
    border-radius: 20px;
    gap: 8px;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    transition: background 0.2s;
  }
  .theme-selector-box:hover {
    background: rgba(255, 255, 255, 0.28);
  }
  .theme-selector-box select {
    background: #ffffff;
    color: #212121;
    border: none;
    outline: none;
    font-size: 12px;
    font-weight: 700;
    border-radius: 12px;
    padding: 4px 10px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  }

  .coach-mode-badge {
    background: #4caf50;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 16px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s, background 0.2s;
  }
  .coach-mode-badge:hover {
    transform: scale(1.03);
    background: #43a047;
  }
  .coach-mode-badge.student-mode {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
  }

  .sound-nav-btn {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background 0.2s;
  }
  .sound-nav-btn:hover {
    background: rgba(255, 255, 255, 0.28);
  }

  /* Main Workspace Layout */
  .workspace-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr 390px;
    overflow: hidden;
    height: 740px;
    min-height: 700px;
  }
  body.classroom-page .workspace-layout {
    height: calc(100vh - 52px);
  }

  /* Left Sidebar Curriculum */
  aside.sidebar {
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    user-select: none;
  }

  .sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: #fafafa;
  }
  .sidebar-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    transition: all 0.2s;
  }
  .sidebar-tab.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
    background: #ffffff;
  }

  .course-badge-card {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
  }
  .course-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  }
  .course-meta {
    overflow: hidden;
    flex: 1;
  }
  .course-title {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .course-author {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 600;
  }

  .curriculum-tree {
    flex: 1;
    padding: 8px 0;
  }

  .chapter-block {
    margin-bottom: 6px;
  }
  .chapter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #37474f;
    background: #f8fafc;
    border-top: 1px solid #eef2f6;
    border-bottom: 1px solid #eef2f6;
  }

  .progress-ring-badge {
    position: relative;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .progress-ring-badge svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
  }
  .progress-ring-badge circle.bg {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 2.5;
  }
  .progress-ring-badge circle.fg {
    fill: none;
    stroke: #0288d1;
    stroke-width: 2.5;
    stroke-dasharray: 60;
    stroke-dashoffset: 45;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.35s ease;
  }
  .progress-ring-badge span {
    position: absolute;
    font-size: 8.5px;
    font-weight: 800;
    color: #455a64;
  }

  .sub-lesson-list {
    list-style: none;
    position: relative;
    padding: 4px 0;
  }
  .sub-lesson-list::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    right: 23px;
    width: 1.5px;
    background: repeating-linear-gradient(to bottom, #d0d7de 0, #d0d7de 4px, transparent 4px, transparent 8px);
    z-index: 1;
  }

  .lesson-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 12.5px;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    text-decoration: none;
  }
  .lesson-row:hover {
    background: #f0f4f8;
  }

  .lesson-row.active {
    background: var(--active-item-bg) !important;
    color: #ffffff !important;
    font-weight: 600;
  }
  .lesson-row.active .status-indicator {
    border-color: #ffffff;
    background: transparent;
  }
  .lesson-row.active .status-indicator.completed {
    background: #ffffff;
    border-color: #ffffff;
  }
  .lesson-row.active .status-indicator.completed svg {
    fill: var(--active-item-bg);
  }

  .lesson-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
  }

  .status-indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1.5px solid #bdbdbd;
    background: #ffffff;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
  }
  .status-indicator.completed {
    background: #0288d1;
    border-color: #0288d1;
  }
  .status-indicator.completed svg {
    width: 9px;
    height: 9px;
    fill: #ffffff;
  }

  /* Center Board Column */
  main.board-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    position: relative;
    overflow: hidden;
  }

  .board-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 580px;
  }

  .board-frame {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    border: 2px solid var(--board-border);
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
    border-radius: 2px;
    user-select: none;
    transition: border-color 0.25s;
  }

  .chess-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 100%;
    height: 100%;
  }

  .square {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
  }
  .square.light {
    background-color: var(--board-light);
  }
  .square.dark {
    background-color: var(--board-dark);
  }

  /* In-Square Coordinates */
  .coord-rank {
    position: absolute;
    top: 3px;
    left: 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    user-select: none;
  }
  .coord-file {
    position: absolute;
    bottom: 3px;
    right: 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    user-select: none;
  }
  .square.dark .coord-rank,
  .square.dark .coord-file {
    color: var(--coord-on-dark);
  }
  .square.light .coord-rank,
  .square.light .coord-file {
    color: var(--coord-on-light);
  }

  /* Highlights & Indicators */
  .square.selected {
    background-color: rgba(246, 246, 105, 0.72) !important;
  }
  .square.move-origin-highlight {
    background-color: rgba(205, 220, 57, 0.55) !important;
  }
  .square.move-dest-highlight {
    background-color: rgba(139, 195, 74, 0.65) !important;
  }
  .square.piece-ring-highlight::after {
    content: "";
    position: absolute;
    width: 86%;
    height: 86%;
    border: 4px solid #4caf50;
    border-radius: 50%;
    pointer-events: none;
    z-index: 15;
    box-sizing: border-box;
  }

  .square.target-hint {
    box-shadow: inset 0 0 0 4px #4caf50;
    animation: pulse-border 1.2s infinite ease-in-out;
  }
  @keyframes pulse-border {
    0%, 100% { box-shadow: inset 0 0 0 4px #4caf50; }
    50% { box-shadow: inset 0 0 0 7px #81c784; }
  }

  .square.correct-target {
    background-color: rgba(129, 182, 76, 0.75) !important;
  }
  .square.wrong-target {
    background-color: rgba(229, 57, 53, 0.65) !important;
  }

  /* Legal Move Hint Dots & Capture Rings */
  .move-dest-dot {
    position: absolute;
    width: 28%;
    height: 28%;
    background: rgba(0, 0, 0, 0.24);
    border-radius: 50%;
    pointer-events: none;
    z-index: 8;
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.15s;
  }
  .square:hover .move-dest-dot {
    transform: scale(1.25);
    background: rgba(0, 0, 0, 0.38);
  }
  .square.can-capture {
    position: relative;
  }
  .square.can-capture::after {
    content: "";
    position: absolute;
    width: 82%;
    height: 82%;
    border: 4px solid rgba(0, 0, 0, 0.28);
    border-radius: 50%;
    pointer-events: none;
    z-index: 12;
    box-sizing: border-box;
    animation: pulse-capture 1.5s infinite ease-in-out;
  }
  @keyframes pulse-capture {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.06); opacity: 1; }
  }

  /* Pieces */
  .piece-wrapper {
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: grab;
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .piece-wrapper:active {
    cursor: grabbing;
  }
  .piece-wrapper.dragging {
    opacity: 0.08;
  }
  .piece-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.22));
    pointer-events: none;
  }

  #drag-ghost {
    position: fixed;
    width: 64px;
    height: 64px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    display: none;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.35));
  }

  #arrow-svg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 14;
  }

  /* Under-board controls bar matching media_1789464227627.png */
  .underboard-nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 2px;
  }

  .nav-step-group {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .step-btn {
    background: #ffffff;
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    width: 38px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #455a64;
    transition: all 0.15s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }
  .step-btn:hover {
    background: #eceff1;
    border-color: #b0bec5;
    color: #263238;
  }
  .step-btn:active {
    transform: translateY(1px);
  }

  .btn-continue {
    background: #0288d1;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 8px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(2, 136, 209, 0.35);
    transition: all 0.18s;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .btn-continue:hover {
    background: #0277bd;
    box-shadow: 0 3px 8px rgba(2, 136, 209, 0.45);
    transform: translateY(-1px);
  }
  .btn-continue:active {
    transform: translateY(1px);
  }

  .board-info-tip {
    font-size: 12px;
    color: var(--text-soft);
    font-weight: 500;
  }

  /* Right Instruction & Commentary Panel */
  aside.instruction-panel {
    background-color: var(--panel-bg);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .instruction-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
  }
  .card-title {
    font-size: 15.5px;
    font-weight: 700;
    color: #263238;
  }
  .card-tools {
    display: flex;
    gap: 6px;
  }
  .card-tools-btn {
    background: none;
    border: none;
    color: #78909c;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
  }
  .card-tools-btn:hover {
    background: #f0f4f8;
    color: #37474f;
  }

  .card-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
  }

  /* Walkthrough Move List & Commentary (Matching Screenshots) */
  .walkthrough-move-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .walkthrough-step-item {
    cursor: pointer;
    transition: transform 0.15s;
  }
  .walkthrough-step-item:hover {
    opacity: 0.95;
  }

  .step-move-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    font-size: 13.5px;
    font-weight: 700;
    color: #37474f;
  }
  .step-move-badge {
    background: #eceff1;
    color: #37474f;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
  }
  .step-move-header.active-header .step-move-badge {
    background: #0288d1;
    color: #ffffff;
  }

  .step-commentary-box {
    background-color: #dcf2e3;
    color: #1b4d24;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.48;
    border-left: 3px solid transparent;
    transition: all 0.2s;
  }
  .walkthrough-step-item.active-step .step-commentary-box {
    background-color: #c8e6c9;
    border-left: 3px solid #2e7d32;
    box-shadow: 0 1px 4px rgba(46, 125, 50, 0.18);
  }

  .step-commentary-box strong {
    color: #0d3814;
  }

  /* Drill / Quiz View */
  .instruction-prompt {
    font-size: 14.5px;
    line-height: 1.5;
    color: #37474f;
    margin-bottom: 16px;
  }

  .feedback-box {
    padding: 12px 14px;
    border-radius: 8px;
    margin-top: 14px;
    font-size: 13.5px;
    display: none;
    animation: fadeIn 0.25s ease-out;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .feedback-box.correct {
    background-color: var(--correct-bg);
    border: 1px solid rgba(129, 182, 76, 0.4);
    color: #2e7d32;
  }
  .feedback-box.wrong {
    background-color: var(--error-bg);
    border: 1px solid rgba(229, 57, 53, 0.4);
    color: #c62828;
  }
  .feedback-title {
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .btn-next-step {
    background-color: #81b64c;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    transition: background 0.15s;
  }
  .btn-next-step:hover {
    background-color: #72a53f;
  }

  .teacher-guide-box {
    margin-top: 16px;
    padding: 12px 14px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.45;
    color: #5d4037;
  }
  .teacher-guide-header {
    font-weight: 700;
    color: #e65100;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  /* Sandbox Drills */
  .sandbox-controls {
    display: none;
    margin-top: 16px;
    padding: 12px;
    background: #e8eaf6;
    border-radius: 8px;
    font-size: 12.5px;
  }
  .sandbox-controls.active {
    display: block;
  }
  .piece-selector-bar {
    display: flex;
    gap: 6px;
    margin: 8px 0;
  }
  .piece-btn {
    flex: 1;
    padding: 6px 0;
    background: #ffffff;
    border: 1px solid #c5cae9;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.15s;
  }
  .piece-btn.active {
    background: #3f51b5;
    color: #ffffff;
    border-color: #3f51b5;
  }
  .sandbox-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
  }
  .btn-sandbox-action {
    flex: 1;
    padding: 6px 8px;
    background: #ffffff;
    border: 1px solid #c5cae9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 600;
  }

  /* Bottom Card Section (Quiz - White to play!) */
  .card-footer {
    border-top: 1px solid var(--border-color);
    padding: 12px 18px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .quiz-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .quiz-sub {
    font-size: 14.5px;
    font-weight: 700;
    color: #2e7d32;
  }

  /* Bottom Utility Toolbar */
  .utility-toolbar {
    height: 46px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 10px;
    background: #ffffff;
  }
  .tool-icon-btn {
    background: none;
    border: none;
    color: #757575;
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.15s;
  }
  .tool-icon-btn:hover {
    background: #f0f4f8;
    color: #212121;
  }
  .tool-icon-btn svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
  }
  .tool-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #0288d1;
    color: #ffffff;
    font-size: 8.5px;
    font-weight: 800;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Floating Toast */
  #toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(33, 33, 33, 0.94);
    color: #ffffff;
    padding: 9px 20px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 10000;
  }
  #toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  @media (max-width: 1024px) {
    .workspace-layout {
      grid-template-columns: 240px 1fr 320px;
    }
  }

  @media (max-width: 900px) {
    .workspace-layout {
      grid-template-columns: 1fr;
      height: auto;
      min-height: auto;
    }
    aside.sidebar, .board-stage, aside.instruction-panel {
      height: auto;
      max-height: none;
    }
    .board-container {
      padding: 16px 8px;
    }
  }

