@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/outfit-400.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --text: #221c16;
  --muted: #6b6258;
  --paper: rgba(255, 250, 240, 0.86);
  --paper-strong: #fff9ed;
  --line: rgba(38, 30, 20, 0.14);
  --line-strong: rgba(38, 30, 20, 0.26);
  --orange: #f28b2e;
  --gold: #ffc857;
  --green: #79b870;
  --blue: #5e9df8;
  --rose: #ef8d72;
  --shadow: 0 20px 54px rgba(65, 47, 28, 0.18);
  --card-width: 228px;
  --card-height: 262px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: "Outfit", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(60, 48, 36, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 48, 36, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 16% 18%, rgba(255, 203, 96, 0.44), transparent 26%),
    radial-gradient(circle at 82% 28%, rgba(106, 171, 255, 0.36), transparent 24%),
    linear-gradient(135deg, #fbf1db 0%, #eef6f7 46%, #fff7ec 100%);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.board-world,
.connection-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 2200px;
  height: 1400px;
  transform-origin: 0 0;
}

.board-world {
  z-index: 2;
  pointer-events: none;
}

.connection-layer {
  z-index: 1;
  pointer-events: auto;
  overflow: visible;
}

.overlay-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  transform-origin: 0 0;
}

.connection-base {
  fill: none;
  stroke: rgba(64, 49, 34, 0.25);
  stroke-width: 3;
  stroke-linecap: round;
  pointer-events: none;
}

.connection-beam {
  fill: none;
  stroke: rgba(255, 180, 65, 0.96);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 22 140;
  filter: drop-shadow(0 0 8px rgba(255, 185, 64, 0.9));
  animation: beamMove 1.7s linear infinite;
  pointer-events: none;
}

.connection-preview {
  fill: none;
  stroke: rgba(242, 139, 46, 0.72);
  stroke-width: 3;
  stroke-dasharray: 8 8;
  pointer-events: none;
}

.connection-hit {
  fill: none;
  stroke: rgba(255, 255, 255, 0);
  stroke-width: 28;
  stroke-linecap: round;
  pointer-events: stroke;
  cursor: pointer;
}

.connection-selected {
  stroke: rgba(242, 139, 46, 0.78);
  stroke-width: 5;
}

.connection-label {
  fill: #8a5a1d;
  font-family: inherit;
  font-size: 15px;
  paint-order: stroke;
  stroke: rgba(255, 250, 240, 0.92);
  stroke-width: 5px;
  stroke-linejoin: round;
  pointer-events: none;
}

.connection-panel {
  position: absolute;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.connection-label-input {
  width: 150px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(70, 48, 28, 0.14);
  font-size: 0.85rem;
}

.connection-panel .connection-delete {
  position: static;
  transform: none;
}

.connection-delete {
  position: absolute;
  z-index: 20;
  min-width: 48px;
  height: 30px;
  border: 1px solid rgba(148, 52, 30, 0.22);
  border-radius: 8px;
  background: rgba(255, 240, 236, 0.94);
  color: #94341e;
  box-shadow: 0 10px 24px rgba(70, 48, 28, 0.16);
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

@keyframes beamMove {
  to {
    stroke-dashoffset: -162;
  }
}

.top-dock,
.drawer,
.timeline-drawer,
.edge-tab {
  position: fixed;
  z-index: 10;
}

.top-dock {
  z-index: 40;
}

.edge-tab {
  z-index: 50;
}

.top-dock {
  left: 50%;
  top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(1180px, calc(100vw - 36px));
  padding: 22px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 251, 242, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transform: translate(-50%, -110%);
  transition: transform 180ms ease;
}

body.top-open .top-dock {
  transform: translate(-50%, 0);
}

.top-dock h1 {
  margin: 2px 0 0;
  font-family: "Outfit", "Noto Sans SC", sans-serif;
  font-size: 2rem;
  line-height: 1;
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-family: "Outfit", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.toolbar,
.panel-head,
.inspector-actions,
.timeline-header,
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.top-dock .toolbar {
  justify-content: center;
  flex-wrap: wrap;
}

.tool-button,
.danger-button,
.edge-tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 15px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(68, 51, 31, 0.1);
}

.tool-button.active {
  background: rgba(255, 199, 87, 0.55);
  border-color: rgba(242, 139, 46, 0.42);
}

.danger-button {
  background: #fff0ec;
  color: #94341e;
}

.zoom-indicator,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-family: "Outfit", sans-serif;
  font-size: 0.86rem;
}

.edge-tab {
  padding: 8px 12px;
  background: rgba(255, 248, 236, 0.92);
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
}

.edge-tab:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.top-tab {
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
}

.left-tab {
  left: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
}

.right-tab {
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
}

.bottom-tab {
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
}

.drawer {
  top: 0;
  width: min(560px, calc(100vw - 56px));
  height: 100vh;
  padding: 30px;
  overflow-y: auto;
  background: rgba(255, 249, 238, 0.78);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: transform 200ms ease;
}

.left-drawer {
  left: 0;
  transform: translateX(calc(-100% + 2px));
}

.right-drawer {
  right: 0;
  transform: translateX(calc(100% - 2px));
}

body.left-open .left-drawer {
  transform: translateX(0);
}

body.right-open .right-drawer {
  transform: translateX(0);
}

.timeline-drawer {
  left: 24px;
  right: 24px;
  bottom: 0;
  max-height: 68vh;
  padding: 30px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: rgba(255, 249, 238, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transform: translateY(calc(100% - 2px));
  transition: transform 200ms ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(90, 70, 40, 0.35) transparent;
}

body.timeline-open .timeline-drawer {
  transform: translateY(0);
}

.panel {
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.brand-panel h2,
.panel h3,
.timeline-header h2 {
  margin: 4px 0 0;
  font-family: "Outfit", "Noto Sans SC", sans-serif;
  line-height: 1.1;
}

.brand-panel p,
.note,
.empty-state,
.timeline-card p,
.timeline-card span,
.world-card p {
  color: var(--muted);
}

.type-grid,
.summary-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.type-chip,
.summary-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  text-align: left;
}

.type-chip strong,
.summary-item strong {
  display: block;
  font-family: "Outfit", "Noto Sans SC", sans-serif;
}

.type-chip span,
.summary-item p {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

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

.world-card {
  position: absolute;
  width: var(--card-width);
  min-height: var(--card-height);
  padding: 14px;
  border: 1px solid rgba(69, 53, 35, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.94);
  box-shadow: 0 18px 32px rgba(63, 45, 27, 0.14);
  user-select: none;
  cursor: grab;
  transition: box-shadow 140ms ease, border-color 140ms ease;
}

.world-card:hover,
.world-card.selected {
  border-color: rgba(242, 139, 46, 0.58);
  box-shadow: 0 20px 42px rgba(242, 139, 46, 0.16);
}

.world-card.dragging {
  cursor: grabbing;
  opacity: 0.96;
}

.world-card[data-type="world"] {
  background: linear-gradient(160deg, rgba(255, 244, 218, 0.97), rgba(255, 251, 242, 0.94));
}

.world-card[data-type="character"] {
  background: linear-gradient(160deg, rgba(255, 247, 233, 0.97), rgba(255, 241, 230, 0.94));
}

.world-card[data-type="scene"] {
  background: linear-gradient(160deg, rgba(242, 255, 241, 0.97), rgba(236, 251, 240, 0.94));
}

.world-card[data-type="item"] {
  background: linear-gradient(160deg, rgba(240, 247, 255, 0.97), rgba(232, 244, 255, 0.94));
}

.world-card[data-type="event"] {
  background: linear-gradient(160deg, rgba(255, 249, 230, 0.97), rgba(255, 244, 217, 0.94));
}

.world-card[data-type="story"] {
  background: linear-gradient(160deg, rgba(255, 241, 237, 0.97), rgba(255, 235, 228, 0.94));
}

.card-type,
.card-role {
  display: inline-flex;
  align-items: center;
  max-width: 105px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-image {
  height: 92px;
  margin: 12px 0;
  border: 1px solid rgba(54, 42, 28, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.16)),
    var(--card-color, rgba(255, 199, 128, 0.55));
  background-size: cover;
  background-position: center;
}

.card-title {
  margin: 0;
  font-family: "Outfit", "Noto Sans SC", sans-serif;
  font-size: 1.08rem;
  line-height: 1.28;
}

.card-summary {
  min-height: 42px;
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.48;
  white-space: pre-line;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.card-tag {
  padding: 5px 7px;
  border: 1px solid rgba(54, 42, 28, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.72rem;
}

.anchor {
  position: absolute;
  z-index: 4;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 120ms ease, transform 120ms ease;
}

.world-card:hover .anchor,
.world-card.selected .anchor,
.world-card.connecting .anchor {
  opacity: 1;
}

.world-card {
  pointer-events: auto;
}

.anchor:hover {
  transform: translate(-50%, -50%) scale(1.22);
}

.anchor::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid #fffaf0;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 0 0 2px rgba(242, 139, 46, 0.3), 0 0 14px rgba(255, 175, 50, 0.72);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.anchor-top {
  left: 50%;
  top: 0;
}

.anchor-right {
  left: 100%;
  top: 50%;
}

.anchor-bottom {
  left: 50%;
  top: 100%;
}

.anchor-left {
  left: 0;
  top: 50%;
}

.inspector-form {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.story-type-hidden {
  display: none;
}

.inspector-form label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 1.08rem;
}

.inspector-form input,
.inspector-form textarea,
.inspector-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.55;
}

.image-preview {
  min-height: 96px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.image-thumb {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  background-size: cover;
  background-position: center;
}

.image-thumb-wrap {
  position: relative;
  aspect-ratio: 1;
}

.image-thumb-wrap .image-thumb {
  width: 100%;
  height: 100%;
}

.image-thumb-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(148, 52, 30, 0.25);
  border-radius: 999px;
  background: rgba(255, 240, 236, 0.95);
  color: #94341e;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(70, 48, 28, 0.18);
  opacity: 0;
  transition: opacity 120ms ease;
}

.image-thumb-wrap:hover .image-thumb-delete {
  opacity: 1;
}

.color-field {
  display: grid;
  gap: 9px;
}

.color-field-label {
  color: var(--muted);
  font-size: 1.08rem;
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatch {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid rgba(69, 53, 35, 0.16);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
}

.color-swatch:hover {
  transform: scale(1.12);
}

.color-swatch.active {
  border-color: rgba(242, 139, 46, 0.85);
  box-shadow: 0 0 0 3px rgba(242, 139, 46, 0.25);
}

.image-viewer-panel {
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}

.image-viewer-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}

.empty-state,
.note {
  line-height: 1.65;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  align-items: start;
}

.timeline-actions {
  display: flex;
  justify-content: flex-end;
  margin: 12px 0 0;
}

.timeline-column {
  min-height: 190px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  overflow: hidden;
}

.timeline-column.dragging {
  opacity: 0.55;
}

.timeline-column.drop-before {
  box-shadow: inset 4px 0 0 rgba(242, 139, 46, 0.72);
}

.timeline-column.drop-after {
  box-shadow: inset -4px 0 0 rgba(242, 139, 46, 0.72);
}

.timeline-column h4 {
  margin: 0 0 10px;
  font-family: "Outfit", "Noto Sans SC", sans-serif;
}

.timeline-card {
  position: relative;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid rgba(54, 42, 28, 0.1);
  border-radius: 8px;
  background: rgba(255, 247, 230, 0.9);
}

.timeline-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.timeline-card-actions .tool-button {
  padding: 6px 8px;
  font-size: 0.76rem;
}

.timeline-card strong {
  display: block;
  font-size: 1.02rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-card p,
.timeline-card span {
  margin: 5px 0 0;
  font-size: 0.92rem;
}

.timeline-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 1;
}

.timeline-card p span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 2px;
}

.timeline-card p:nth-of-type(3),
.timeline-card p:nth-of-type(4) {
  -webkit-line-clamp: 2;
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 18, 14, 0.56);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 249, 238, 0.98);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.timeline-editor-form {
  display: grid;
  gap: 16px;
}

.timeline-editor-form label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 1.05rem;
}

.timeline-editor-form input,
.timeline-editor-form textarea,
.timeline-editor-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 1.03rem;
  line-height: 1.5;
}

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

.share-panel {
  width: min(420px, calc(100vw - 32px));
}

.share-tip {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.share-qr-box {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.share-qr-box svg {
  width: 200px;
  height: 200px;
}

.share-link-input {
  width: 100%;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 0.9rem;
}

.recent-docs-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.recent-doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.recent-doc-item:hover {
  background: rgba(255, 255, 255, 0.85);
}

.recent-doc-item.active {
  border-color: var(--orange);
  background: rgba(255, 255, 255, 0.9);
  cursor: default;
}

.recent-doc-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-doc-time {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.recent-doc-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.boards-menu {
  position: relative;
  display: inline-flex;
}

.boards-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 45;
  display: grid;
  gap: 8px;
  width: 280px;
  max-height: 320px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 249, 238, 0.98);
  box-shadow: var(--shadow);
}

.boards-menu-list.hidden {
  display: none;
}

#board-title {
  cursor: text;
  border-radius: 6px;
  padding: 2px 8px;
  outline: none;
  transition: background 120ms ease;
}

#board-title:hover {
  background: rgba(255, 255, 255, 0.6);
}

#board-title:focus {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.marquee-rect {
  position: fixed;
  z-index: 25;
  display: none;
  border: 1.5px dashed rgba(242, 139, 46, 0.85);
  background: rgba(242, 139, 46, 0.08);
  pointer-events: none;
}

.world-card.multi-selected {
  border-color: rgba(94, 157, 248, 0.75);
  box-shadow: 0 0 0 3px rgba(94, 157, 248, 0.25), 0 20px 42px rgba(94, 157, 248, 0.16);
}

.minimap {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 249, 238, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.minimap.hidden {
  display: none;
}

.minimap-tab {
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  z-index: 50;
}

.minimap canvas {
  display: block;
  width: 250px;
  height: 170px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: crosshair;
}

.minimap .minimap-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.minimap .tool-button {
  padding: 7px 12px;
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .drawer {
    width: min(94vw, 560px);
    padding: 22px;
  }

  .top-dock {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-grid {
    grid-template-columns: repeat(6, minmax(170px, 1fr));
  }

  .top-dock {
    width: calc(100vw - 20px);
  }
}
