:root {
  --bg: #0a1628;
  --panel: #132238;
  --panel-border: #2a4a6e;
  --accent: #f0a020;
  --accent-hover: #ffc04d;
  --btn: #1e4d8c;
  --btn-hover: #2a6bb8;
  --danger: #c44;
  --text: #e8eef5;
  --muted: #8aa4c0;
  --board-shadow: rgba(0, 0, 0, 0.45);
  --header-h: 3rem;
  --footer-h: 2.75rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: linear-gradient(180deg, #1a3a5c 0%, var(--bg) 40%, #050a12 100%);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.2rem;
  background: rgba(10, 22, 40, 0.92);
  border-bottom: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(6px);
}

.top-bar h1 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--accent);
}

.game-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.panel-game-meta {
  flex-shrink: 0;
  margin: 0 0 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.4;
  word-break: break-word;
}

.layout {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0.75rem;
  min-height: 0;
}

.panel-left {
  width: min(300px, 32vw);
  min-width: 260px;
  flex-shrink: 0;
  max-height: calc(100vh - var(--header-h) - var(--footer-h) - 1.5rem);
  overflow-y: auto;
}

.left-tools-top {
  flex-shrink: 0;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.left-tools-top .tool-row select {
  flex: 1 1 100%;
  min-width: 0;
}

.left-tools-top .comment-box textarea {
  min-height: 4.5rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.tab {
  flex: 1;
  padding: 0.35rem 0.25rem;
  border: none;
  border-radius: 4px;
  background: #1a3050;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
}

.tab.active {
  background: var(--accent);
  color: #1a1200;
  font-weight: 600;
}

.tab-body {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.tab-body.hidden {
  display: none;
}

.move-list,
.game-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
}

.game-list li .step-text {
  word-break: break-all;
}

.move-list li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.move-list li .step-marker {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid transparent;
  opacity: 0;
}

.move-list li.active .step-marker {
  border-left-color: var(--accent);
  opacity: 1;
}

.move-list li .step-text {
  flex: 1;
  min-width: 0;
}

.move-list li:hover {
  background: rgba(255, 255, 255, 0.06);
}

.move-list li.active {
  background: rgba(240, 160, 32, 0.22);
  border-left-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.move-list li.variation {
  padding-left: 1rem;
  color: var(--muted);
}

.tree-toolbar {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.tree-toolbar button {
  flex: 1;
  font-size: 0.75rem;
  padding: 0.3rem;
}

.variation-tree {
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  color: var(--muted);
}

.info-list {
  margin: 0;
  font-size: 0.82rem;
}

.info-list dt {
  color: var(--accent);
  margin-top: 0.4rem;
}

.info-list dd {
  margin: 0.15rem 0 0 0;
  color: var(--text);
}

.board-area {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 30px;
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  padding-bottom: 0.25rem;
  min-width: 0;
  max-width: 100%;
}

.board-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  flex: 0 1 auto;
  background: linear-gradient(180deg, rgba(26, 58, 92, 0.55) 0%, transparent 100%);
}

.board-side-rail {
  flex-shrink: 0;
  padding: 0.35rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  align-self: flex-start;
}

.board-markup-rail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.board-action-tools {
  display: grid;
  grid-template-columns: repeat(2, 2.35rem);
  gap: 0.35rem;
  margin: 0;
}

.board-shape-wrap {
  position: relative;
}

.shape-tool-popover {
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 0;
  z-index: 30;
  display: flex;
  gap: 0.35rem;
  padding: 0.4rem 0.45rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.shape-tool-popover.hidden {
  display: none;
}

.shape-tool-popover::after {
  content: '';
  position: absolute;
  left: 0.7rem;
  bottom: -6px;
  border: 6px solid transparent;
  border-top-color: #fff;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.08));
}

.shape-tool-popover .mark-btn.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mark-btn-shape-line {
  background: linear-gradient(180deg, #f0a878 0%, #e87858 100%);
}

.mark-btn-shape-line::before {
  width: auto;
  height: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-38deg);
  border-radius: 0;
  background: none;
  box-shadow: none;
  content: '';
  display: block;
  width: 1.1rem;
  height: 0;
  border-top: 2.5px solid #5c3818;
}

.mark-btn-shape-line::after {
  display: none;
}

.mark-btn-shape-circle::before {
  width: 0.88rem;
  height: 0.88rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: none;
  box-shadow: none;
  border: 2.5px solid #5c3818;
}

.mark-btn-shape-circle::after {
  display: none;
}

.shape-tool-popover .mark-btn::before,
.shape-tool-popover .mark-btn::after {
  box-shadow: none;
}

.shape-tool-popover .mark-btn-shape-rect::before {
  width: 1.1rem;
  height: 0.52rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 0;
  background: none;
  box-shadow: none;
  border: 2.5px solid #5c3818;
}

.mark-btn-shape-rect::after {
  display: none;
}

.markup-tools .mark-btn-action-text,
.board-action-tools .mark-btn-action-text {
  font-size: 0.72rem;
  font-weight: 800;
  color: #4a2800;
  line-height: 2.35rem;
  text-align: center;
}

.markup-tools .mark-btn-action-text::before,
.markup-tools .mark-btn-action-text::after,
.board-action-tools .mark-btn-action-text::before,
.board-action-tools .mark-btn-action-text::after {
  display: none;
}

.markup-tools-grid .board-shape-wrap {
  width: 2.35rem;
  height: 2.35rem;
}

/* 「图」：空心正方形（图形工具入口） */
.markup-tools .mark-btn-fig::before {
  width: 0.82rem;
  height: 0.82rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 0;
  background: none;
  box-shadow: none;
  border: 2.5px solid #c22;
}

.markup-tools .mark-btn-fig::after {
  display: none;
}

#goBoard.draw-line,
#goBoard.draw-rect {
  cursor: crosshair;
}

.board-playback-grid {
  margin-top: 0.15rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.board-trial-btn.place-btn {
  width: 100%;
  height: 2.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #4a2800;
  text-align: center;
  line-height: 2.35rem;
  padding: 0;
  background: linear-gradient(180deg, #f5d76e 0%, #d4a82a 100%);
  border: 1px solid rgba(240, 160, 32, 0.45);
}

.board-trial-btn.place-btn::before,
.board-trial-btn.place-btn::after {
  display: none;
}

.board-trial-btn.place-btn:hover {
  filter: brightness(1.06);
}

.board-trial-btn.place-btn.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px rgba(240, 160, 32, 0.5);
  color: #1a1200;
}

.board-fullscreen-btn.place-btn {
  width: 100%;
  height: 2.35rem;
  margin-top: 0.5rem;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 2.35rem;
  background: linear-gradient(180deg, #2a5080 0%, #1a3050 100%);
  border-left: 1px solid var(--panel-border);
  border-right: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
  border-radius: 6px;
}

.board-fullscreen-btn.place-btn::before,
.board-fullscreen-btn.place-btn::after {
  display: none;
}

.board-fullscreen-btn.place-btn:hover {
  background: linear-gradient(180deg, #356aa0 0%, #244870 100%);
  border-color: var(--accent);
}

.board-fullscreen-btn.place-btn.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  color: var(--accent);
}

html:fullscreen,
html:-webkit-full-screen {
  background: linear-gradient(180deg, #1a3a5c 0%, var(--bg) 40%, #050a12 100%);
}

html:fullscreen body,
html:-webkit-full-screen body {
  min-height: 100%;
  height: 100%;
}

html:fullscreen .layout,
html:-webkit-full-screen .layout {
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - var(--header-h) - var(--footer-h) - 1.5rem);
}

html:fullscreen #goBoard,
html:-webkit-full-screen #goBoard {
  max-height: calc(100vh - var(--header-h) - var(--footer-h) - 2rem);
}

.markup-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 2.35rem);
  grid-auto-rows: 2.35rem;
  gap: 0.35rem;
  margin: 0;
}

#goBoard {
  max-width: 100%;
  max-height: calc(100vh - var(--header-h) - var(--footer-h) - 1.5rem);
  border-radius: 4px;
  box-shadow: 0 8px 32px var(--board-shadow);
  cursor: crosshair;
  background: transparent;
}

#goBoard.draw-curve {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath stroke='%23f0a020' stroke-width='2' fill='none' d='M4 18 Q12 4 20 14'/%3E%3C/svg%3E") 4 20, crosshair;
}

#goBoard.draw-circle {
  cursor: crosshair;
}

#goBoard.erase-mode {
  cursor: cell;
}

.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.tool-row .label {
  font-size: 0.75rem;
  color: var(--muted);
  width: 100%;
}

button,
.file-btn,
select {
  font-family: inherit;
  font-size: 0.8rem;
}

button,
.file-btn {
  padding: 0.35rem 0.55rem;
  border: none;
  border-radius: 5px;
  background: var(--btn);
  color: var(--text);
  cursor: pointer;
}

button:hover,
.file-btn:hover {
  background: var(--btn-hover);
}

button.active:not(.place-btn) {
  background: var(--accent);
  color: #1a1200;
}

.file-btn {
  display: inline-block;
}

select {
  flex: 1;
  min-width: 0;
  padding: 0.35rem;
  border-radius: 5px;
  border: 1px solid var(--panel-border);
  background: #1a3050;
  color: var(--text);
}

.tool-trial {
  background: linear-gradient(135deg, #333 50%, #f5f5f5 50%);
  border: 1px solid rgba(240, 160, 32, 0.45);
  color: var(--accent);
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 5px;
  cursor: pointer;
}

.tool-trial:hover {
  filter: brightness(1.08);
}

.tool-trial.active {
  background: var(--accent);
  color: #1a1200;
  border-color: var(--accent-hover);
}

.place-btn {
  position: relative;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid rgba(240, 160, 32, 0.45);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  font-size: 0;
  flex-shrink: 0;
}

.place-btn-alt {
  background: linear-gradient(180deg, #f0a878 0%, #e87858 100%);
}

.place-btn-black,
.place-btn-white {
  background: linear-gradient(180deg, #f5d76e 0%, #d4a82a 100%);
}

.place-btn::before,
.place-btn::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.place-btn-alt::before {
  width: 0.95rem;
  height: 0.95rem;
  left: 0.42rem;
  top: 0.42rem;
  background: radial-gradient(circle at 32% 28%, #555 0%, #111 72%);
}

.place-btn-alt::after {
  width: 0.95rem;
  height: 0.95rem;
  right: 0.42rem;
  bottom: 0.42rem;
  background: radial-gradient(circle at 32% 28%, #fff 0%, #ddd 72%);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.place-btn-black::before {
  width: 1.35rem;
  height: 1.35rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 32% 28%, #555 0%, #111 72%);
}

.place-btn-white::before {
  width: 1.35rem;
  height: 1.35rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 32% 28%, #fff 0%, #e8e0d0 72%);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.place-btn:hover {
  filter: brightness(1.06);
}

.place-btn.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px rgba(240, 160, 32, 0.5);
}

/* 标注钮：与「黑」「白」相同的黄橙渐变方钮 */
.markup-tools .mark-btn,
.board-action-tools .mark-btn {
  background: linear-gradient(180deg, #f5d76e 0%, #d4a82a 100%);
}

.markup-tools .mark-btn::before,
.board-action-tools .mark-btn::before {
  box-shadow: none;
}

.board-action-tools .mark-btn.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px rgba(240, 160, 32, 0.5);
}

.markup-tools .mark-btn-tr::after,
.markup-tools .mark-btn-sq::after,
.markup-tools .mark-btn-cr::after,
.markup-tools .mark-btn-ma::after,
.markup-tools .mark-btn-lb::after,
.markup-tools .mark-btn-curve::after {
  display: none;
}

.markup-tools .mark-btn-tr::before {
  width: 0;
  height: 0;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -42%);
  border-radius: 0;
  border-left: 0.42rem solid transparent;
  border-right: 0.42rem solid transparent;
  border-bottom: 0.72rem solid #c22;
  background: none;
}

.markup-tools .mark-btn-sq::before {
  width: 0.78rem;
  height: 0.78rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 1px;
  background: #c22;
}

.markup-tools .mark-btn-cr::before {
  width: 0.82rem;
  height: 0.82rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #c22;
}

.markup-tools .mark-btn-ma::before {
  width: auto;
  height: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 0;
  background: none;
  content: '×';
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  color: #c22;
  font-family: 'Microsoft YaHei', sans-serif;
}

.markup-tools .mark-btn-lb::before {
  width: auto;
  height: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 0;
  background: none;
  content: 'A';
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  color: #c22;
  font-family: 'Microsoft YaHei', sans-serif;
}

.markup-tools .mark-btn-curve::before {
  width: auto;
  height: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 0;
  background: none;
  content: '⌇';
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  color: #c22;
  font-family: 'Microsoft YaHei', sans-serif;
}

.markup-tools .mark-btn-curve::after {
  display: none;
}

.markup-tools .mark-btn-brush,
.board-action-tools .mark-btn-brush {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='10.5' y='2' width='3' height='6' rx='1' fill='%236b3f1f'/%3E%3Crect x='5' y='8' width='14' height='4' rx='1' fill='%237a5230'/%3E%3Crect x='5' y='9.5' width='14' height='1.2' fill='%23c9a86c'/%3E%3Cpath fill='%236b3f1f' d='M5 12h2.4v7H5v-5c0-.9.5-1.6 1.2-1.6zm2.9 0H10.3v8H7.9v-5.2c0-.7.4-1.3 1-1.3zm2.9 0h2.4v8h-2.4v-5.2c0-.7.4-1.3 1-1.3zm2.9 0H18v7h-2.4v-5c0-.9.5-1.6 1.2-1.6zm2.9 0h2.2v6.5h-2.2v-4.2c0-.8.4-1.4 1-1.4z'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #f5d76e 0%, #d4a82a 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: center, 0 0;
  background-size: 1.35rem 1.35rem, 100% 100%;
}

.markup-tools .mark-btn-brush::before,
.markup-tools .mark-btn-brush::after,
.board-action-tools .mark-btn-brush::before,
.board-action-tools .mark-btn-brush::after {
  display: none;
}

/* 擦除钮：斜放长方体线描 */
.board-action-tools .mark-btn-erase {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%236b3f1f' stroke-width='1.35' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M6.2 15.8 13.8 18.8 18.2 12.2 10.6 9.2z'/%3E%3Cpath d='M6.2 15.8 10.6 9.2 8.8 6.8 4.4 13.4z'/%3E%3Cpath d='M10.6 9.2 18.2 12.2 16.4 9.8 8.8 6.8z'/%3E%3Cpath d='M4.4 13.4 8.8 6.8 16.4 9.8 13.8 18.8z'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #f5d76e 0%, #d4a82a 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: center, 0 0;
  background-size: 1.5rem 1.5rem, 100% 100%;
}

.board-action-tools .mark-btn-erase::before,
.board-action-tools .mark-btn-erase::after {
  display: none;
}

.playback-grid {
  display: grid;
  grid-template-columns: repeat(2, 2.35rem);
  grid-auto-rows: 2.35rem;
  gap: 0.35rem;
  margin: 0;
}

.playback-grid button {
  width: 2.35rem;
  height: 2.35rem;
  min-width: 0;
  padding: 0;
  margin: 0;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1;
}

.playback-grid .btn-skip5 {
  font-size: 0;
  position: relative;
}

.playback-grid .btn-skip5::before,
.playback-grid .btn-skip5::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-top: 0.38rem solid transparent;
  border-bottom: 0.38rem solid transparent;
}

.playback-grid .btn-skip5-back::before {
  left: 30%;
  border-right: 0.48rem solid #1a1200;
}

.playback-grid .btn-skip5-back::after {
  left: 58%;
  border-right: 0.48rem solid #1a1200;
}

.playback-grid .btn-skip5-forward::before {
  left: 30%;
  border-left: 0.48rem solid #1a1200;
}

.playback-grid .btn-skip5-forward::after {
  left: 58%;
  border-left: 0.48rem solid #1a1200;
}

.playback-grid #btnPlay {
  grid-column: 1 / -1;
  width: 100%;
}

.playback-grid .move-indicator {
  grid-column: 1 / -1;
  flex: none;
  height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

.playback-grid #btnToggleCoords {
  grid-column: 1 / -1;
  width: 100%;
  height: 2.35rem;
  font-size: 0.68rem;
  padding: 0 0.2rem;
  white-space: nowrap;
}

.playback button {
  background: var(--accent);
  color: #1a1200;
  font-weight: 600;
}

.playback button:hover {
  background: var(--accent-hover);
}

.playback #btnToggleCoords.active {
  background: var(--accent);
  color: #1a1208;
  border-color: var(--accent);
}

.playback-grid #btnPlay.btn-play-auto:not(.playing) {
  font-size: 0.68rem;
  font-weight: 700;
  color: #1a1200;
  letter-spacing: 0.05em;
}

.playback #btnPlay.playing {
  background: var(--danger);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.move-indicator {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  color: var(--accent);
}

.comment-box h3 {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.comment-box textarea {
  width: 100%;
  resize: vertical;
  border-radius: 5px;
  border: 1px solid var(--panel-border);
  background: #0d1a2a;
  color: var(--text);
  padding: 0.4rem;
  font-family: inherit;
  font-size: 0.82rem;
}

.comment-box button {
  margin-top: 0.35rem;
  width: 100%;
}

.status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding: 0.45rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid var(--panel-border);
  font-size: 0.82rem;
  flex-shrink: 0;
}

.status-bar .zoom {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .layout {
    justify-content: center;
  }

  .board-area {
    top: var(--header-h);
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
  }

  .board-wrap {
    order: 1;
  }

  .board-side-rail {
    order: 2;
    align-self: flex-start;
  }

  .panel-left {
    order: 3;
    width: 100%;
    max-width: 300px;
    max-height: none;
  }
}
