:root {
  --bg: #101213;
  --bg-soft: #171b1d;
  --panel: #22282b;
  --panel-strong: #2a3236;
  --text: #f2f5f7;
  --muted: #9aa6ad;
  --accent: #39ff14;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

@font-face {
  font-family: "Calibri";
  src: url("./fonts/calibri.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Calibri";
  src: url("./fonts/calibrib.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Calibri";
  src: url("./fonts/calibrii.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Calibri";
  src: url("./fonts/calibriz.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Times New Roman";
  src: url("./fonts/times.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Times New Roman";
  src: url("./fonts/timesbd.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Times New Roman";
  src: url("./fonts/timesi.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Times New Roman";
  src: url("./fonts/timesbi.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

body {
  margin: 0;
  font-family: "Calibri", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1f262a 0%, #111415 45%, #0a0c0d 100%);
  color: var(--text);
  overflow: hidden;
}

.read-only .panel {
  opacity: 0.5;
}

.hidden {
  display: none !important;
}

.annotation-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

.annotation-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  justify-content: center;
}

.annotation-view-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.annotation-view-hash {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.annotation-view-note {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: #171c1f;
  border: 1px solid #2a3236;
  border-radius: 10px;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.annotation-view-note.empty {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  padding: 0;
}

.annotation-view-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.annotation-view-votes {
  display: flex;
  align-items: center;
  gap: 6px;
}

#annotationViewBack {
  align-self: flex-end;
  width: auto;
}

.discussion-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  flex: 1;
  min-height: 0;
}

.discussion-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.discussion-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.discussion-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.comment {
  background: #171c1f;
  border: 1px solid #2a3236;
  border-radius: 10px;
  padding: 8px 10px;
}

.comment.comment-own {
  border-color: rgba(57, 255, 20, 0.6);
  box-shadow: inset 0 0 0 1px rgba(30, 120, 20, 0.25);
}

.comment-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.comment-body {
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.comment-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.comment-reply {
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.comment-delete {
  font-size: 12px;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.comment-delete:disabled {
  opacity: 0.5;
  cursor: default;
}

.comment-indent {
  margin-left: 18px;
}

.discussion-form textarea {
  background: #0f1213;
  border: 1px solid #2a3236;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  resize: vertical;
  min-height: 70px;
}

.discussion-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discussion-hint {
  font-size: 12px;
  color: var(--muted);
}

.discussion-actions {
  margin-top: auto;
}

#discussionEditBtn {
  width: 100%;
}

.annotation-panel {
  display: flex;
  flex-direction: column;
}

.browse-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-height: calc(100vh - 190px);
}

.browse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.browse-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.browse-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-strong) 100%);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  min-height: 200px;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
}

.browse-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #2a3236;
  background: #101416;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.browse-card:hover {
  border-color: rgba(57, 255, 20, 0.55);
  background: #0f1510;
  color: #c8ffb8;
}

.browse-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browse-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.browse-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.browse-meta img {
  width: 14px;
  height: 14px;
  filter: brightness(0) saturate(100%) invert(79%) sepia(6%) saturate(223%) hue-rotate(167deg)
    brightness(90%) contrast(87%);
}

.browse-actions {
  display: flex;
  justify-content: center;
}

.annotation-notes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  padding-right: 4px;
}

.annotation-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.annotation-status {
  font-size: 13px;
  color: var(--muted);
}

#annotationSortSelect {
  background: #0f1213;
  border: 1px solid #2a3236;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.annotation-note {
  background: #1a1f22;
  border: 1px solid #2a3236;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 160ms ease, border-color 160ms ease, transform 200ms ease;
  cursor: pointer;
}

.annotation-note:hover {
  background: #14181a;
  border-color: #3a4348;
}

.annotation-note.hovered {
  background: #14181a;
  border-color: #3a4348;
  transform: translateY(0);
}

.annotation-note-meta {
  font-size: 12px;
  color: var(--muted);
}

.annotation-note-text {
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
}

.annotation-note-text.empty {
  color: #c6cbd0;
  background: #14181b;
  border: 1px solid #2b3337;
  border-radius: 10px;
  padding: 6px 8px;
  display: inline-block;
  width: fit-content;
}

.annotation-note-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.annotation-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 6px 0 2px;
}

.annotation-selected-title.hidden {
  display: none;
}

.annotation-selected-title {
  margin: 0 0 6px;
}

.annotation-section-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vote-btn {
  background: transparent;
  border: 1px solid #2a3236;
  color: var(--text);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vote-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.vote-score {
  font-size: 12px;
  color: var(--muted);
  min-width: 18px;
  text-align: center;
}

.vote-icon {
  width: 16px;
  height: 16px;
  display: block;
  filter: brightness(0) saturate(100%) invert(100%);
}

.vote-btn.up.active .vote-icon {
  filter: brightness(0) saturate(100%) invert(76%) sepia(62%) saturate(748%) hue-rotate(60deg)
    brightness(112%) contrast(101%);
}

.vote-btn.down.active .vote-icon {
  filter: brightness(0) saturate(100%) invert(24%) sepia(84%) saturate(6248%) hue-rotate(353deg)
    brightness(103%) contrast(104%);
}

.vote-btn.up.active {
  border-color: rgba(57, 255, 20, 0.6);
  color: #39ff14;
}

.vote-btn.down.active {
  border-color: rgba(255, 45, 45, 0.7);
  color: #ff2d2d;
}

.annotation-notes.hidden {
  display: none;
}

.page {
  height: 100vh;
  padding: 28px clamp(20px, 4vw, 52px) 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.topbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.meta {
  color: var(--muted);
  font-size: 15px;
  max-width: 520px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: clamp(18px, 3vw, 40px);
  min-height: calc(100vh - 190px);
  flex: 1;
  overflow: hidden;
}

.panel {
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-strong) 100%);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tab {
  background: #111518;
  border: 1px solid #2a3236;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.tab.active {
  background: var(--accent);
  color: #0b110b !important;
  border-color: transparent;
}

.tab-text.active {
  color: #0b110b;
}

.tab-hints {
  border-color: rgba(255, 45, 45, 0.5);
  color: #ffb3b3;
}

.tab-notes {
  border-color: rgba(255, 216, 77, 0.5);
  color: #ffe8a1;
}

.tab.tab-text {
  border-color: rgba(57, 255, 20, 0.7);
  color: #c8ffb8;
}

.tab-hints.active {
  background: #ff2d2d;
  color: #1a0a0a;
}

.tab-notes.active {
  background: #ffd84d;
  color: #2a2204;
}

.tab-text:hover {
  background: rgba(57, 255, 20, 0.12);
  border-color: rgba(57, 255, 20, 0.5);
}

.tab-hints:hover {
  background: rgba(255, 45, 45, 0.18);
  border-color: rgba(255, 45, 45, 0.8);
}

.tab-notes:hover {
  background: rgba(255, 216, 77, 0.18);
  border-color: rgba(255, 216, 77, 0.8);
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  min-height: 0;
}

.tab-panel.active {
  display: flex;
}

.tab-panel.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select {
  background: #0f1213;
  border: 1px solid #2a3236;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.field input[type="range"] {
  padding: 0;
  border: none;
  background: transparent;
  height: 26px;
}

.btn {
  border: none;
  background: var(--accent);
  color: #0b110b;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.btn-secondary {
  background: #2f363a;
  color: var(--text);
  border: 1px solid #3b4449;
}

.btn-secondary.active {
  background: var(--accent);
  color: #0b110b;
  border-color: transparent;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.account-menu {
  position: relative;
}

.account-menu summary {
  list-style: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #2f363a;
  background: #121516;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
}

.account-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: #0f1213;
  border: 1px solid #2a3236;
  border-radius: 12px;
  min-width: 140px;
  padding: 8px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 20;
}

.account-menu[open] .account-dropdown {
  display: block;
}

.account-dropdown a,
.account-dropdown .account-link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  background: transparent;
  border: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.account-dropdown a:hover,
.account-dropdown .account-link:hover {
  background: #1c2124;
}

.canvas-wrap {
  background: var(--panel);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 60vh;
  flex: 1;
  overflow: hidden;
}

.canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.file-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pdf-vote-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-vote-frame {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 6px;
  border-radius: 999px;
  border: 1px solid #2a3236;
  background: #0f1213;
}

.pdf-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #2a3236;
  background: #111518;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.pdf-vote-btn img {
  width: 14px;
  height: 14px;
  filter: brightness(0) saturate(100%) invert(79%) sepia(6%) saturate(223%) hue-rotate(167deg)
    brightness(90%) contrast(87%);
}

.pdf-vote-btn.active {
  background: rgba(57, 255, 20, 0.12);
  border-color: rgba(57, 255, 20, 0.6);
  color: #baffaa;
}

.pdf-vote-btn.down.active {
  background: rgba(255, 45, 45, 0.12);
  border-color: rgba(255, 45, 45, 0.7);
  color: #ffb3b3;
}

.pdf-vote-btn.down.active img {
  filter: brightness(0) saturate(100%) invert(24%) sepia(84%) saturate(6248%) hue-rotate(353deg)
    brightness(103%) contrast(104%);
}

.pdf-vote-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pdf-vote-score {
  font-size: 15px;
  color: var(--muted);
  min-width: 18px;
  text-align: right;
  margin-left: -6px;
  margin-top: 3px;
}

.canvas-header h2 {
  margin: 0;
  font-size: 18px;
}

.canvas-header p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.file-title {
  margin-top: 8px;
  font-size: 36px !important;
  font-weight: 800 !important;
  line-height: 1.2;
  color: var(--text);
  word-break: break-all;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-wrap input {
  background: #0f1213;
  border: 1px solid #2a3236;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  min-width: 180px;
}

.toggle-row {
  display: flex;
  gap: 8px;
}

.size-row {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 8px;
  align-items: center;
}

#sizeInput {
  background: #0f1213;
  border: 1px solid #2a3236;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  width: 100%;
}

#colorPicker {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#colorSwatch {
  width: 48px;
  height: 32px;
  padding: 0;
  justify-content: center;
  align-items: center;
}

#colorSwatch .swatch-letter {
  font-size: 18px;
  font-weight: 700;
  font-family: "Times New Roman", serif;
  color: #39ff14;
  line-height: 1;
}

textarea#notesInput {
  background: #0f1213;
  border: 1px solid #2a3236;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  min-height: 140px;
  resize: vertical;
}

.canvas-body {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 16px;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.canvas {
  background: repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.04) 0px,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 28px
    ),
    #0d1011;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 100%;
  position: relative;
}

svg {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

#heatmapCanvas {
  position: absolute;
  inset: 18px;
  z-index: 3;
  pointer-events: none;
}

image {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.overlay-text {
  fill: var(--accent);
  font-size: 28px;
  font-weight: 600;
  dominant-baseline: middle;
}

.text-box {
  fill: transparent;
  stroke: rgba(57, 255, 20, 0.5);
  stroke-width: 1.5;
}

.resize-handle {
  fill: var(--accent);
  stroke: #0a120a;
  stroke-width: 2;
  cursor: nwse-resize;
}

.annotation-preview {
  fill: var(--accent);
  stroke: #0a120a;
  stroke-width: 2;
  pointer-events: none;
}

.annotation-anchor {
  fill: var(--accent);
  stroke: #0a120a;
  stroke-width: 2;
  cursor: pointer;
  fill-opacity: 0.6;
  stroke-opacity: 0.9;
  transition: fill-opacity 0.12s ease, stroke-opacity 0.12s ease;
}

.annotation-anchor.annotation-anchor-other {
  fill: #ffd84d;
  stroke: #2a2204;
}

.annotation-anchor:hover,
.annotation-anchor[data-hovered="1"] {
  fill-opacity: 1;
  stroke-opacity: 1;
}

.hover-circle {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1;
  pointer-events: none;
  mix-blend-mode: difference;
}

.text-group:not(.active) .text-box,
.text-group:not(.active) .resize-handle {
  display: none;
}

.text-group {
  cursor: grab;
}

.text-group.dragging {
  cursor: grabbing;
}

.editable-text {
  cursor: text;
}

.text-editor {
  display: inline-block;
  min-width: 20px;
  min-height: 18px;
  outline: none;
  white-space: pre;
}

.hint-arrow {
  stroke: #ff2d2d;
  stroke-width: 3;
  fill: none;
}

.hint-hit {
  stroke: transparent;
  stroke-width: 18;
  fill: none;
  cursor: pointer;
}

.hint-handle {
  fill: #ff2d2d;
  stroke: #7a1a1a;
  stroke-width: 2;
  cursor: pointer;
}

.context-menu {
  position: absolute;
  top: 0;
  left: 0;
  background: #111518;
  border: 1px solid #2a3236;
  border-radius: 10px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.context-menu button {
  background: #1a2023;
  color: var(--text);
  border: 1px solid #2a3236;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}

.context-menu button:hover {
  background: #2a3236;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 10, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.confirm-dialog {
  background: #171c1f;
  border: 1px solid #2a3236;
  border-radius: 14px;
  padding: 16px;
  min-width: 260px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.confirm-title {
  font-size: 14px;
  font-weight: 700;
}

.confirm-text {
  font-size: 13px;
  color: var(--muted);
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.minimap {
  background: #111518;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.minimap-title {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.minimap-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 10px;
  background: #0c0f11;
}

#minimapSvg {
  width: 100%;
  height: auto;
  display: block;
}

#minimapHeatmap {
  opacity: 0.6;
}

#minimapViewport {
  fill: rgba(90, 90, 90, 0.2);
  stroke: rgb(57, 255, 20);
  stroke-width: 4;
}

.minimap-hint {
  font-size: 11px;
  color: var(--muted);
}

.minimap-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.minimap-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.minimap-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

#minimapPageInput {
  background: #0f1213;
  border: 1px solid #2a3236;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  width: 100%;
}

.coffee-link {
  position: fixed;
  right: clamp(20px, 4vw, 52px);
  bottom: 10px;
  font-size: 12px;
  color: #9aa3a8;
  text-decoration: none;
  padding: 4px 0;
  border: none;
  background: transparent;
  transition: color 0.15s ease;
  z-index: 5;
}

.coffee-link:hover {
  color: var(--text);
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .canvas-body {
    grid-template-columns: 1fr;
  }
  .minimap {
    min-height: 180px;
  }
}
