:root {
  color-scheme: dark;
  --bg: #080b12;
  --panel: #121722;
  --panel-soft: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);
  --text: #f2f5fb;
  --muted: #8d96aa;
  --faint: #5f687b;
  --accent: #7c9cff;
  --accent-strong: #9bb2ff;
  --danger: #ff6b7a;
  --success: #67d99a;
  --warning: #ffc35c;
  --card-size: 88px;
  --radius: 18px;
  --font-sans: "Segoe UI", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 650px at 12% -20%, rgba(124, 156, 255, 0.13), transparent 62%),
    radial-gradient(900px 600px at 100% 0%, rgba(255, 93, 115, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
svg {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.page-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 28%);
}

.app-header,
.app-main,
.app-footer { position: relative; z-index: 1; }

.app-header {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  user-select: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.brand-mark i { display: block; height: 4px; border-radius: 99px; }
.brand-mark i:nth-child(1) { width: 100%; background: #ff5d73; }
.brand-mark i:nth-child(2) { width: 78%; background: #ffd166; }
.brand-mark i:nth-child(3) { width: 55%; background: #4cc9f0; }

.brand-word {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #b8c1d8;
}

.brand-word strong { color: var(--text); font-weight: 900; }

.board-heading { flex: 1 1 300px; min-width: 0; }

.board-heading h1 {
  margin: 0;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.board-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(255, 195, 92, 0.1);
}

.connection[data-state="online"] .connection-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(103, 217, 154, 0.12);
}

.connection[data-state="offline"] {
  color: #ffadb5;
  border-color: rgba(255, 107, 122, 0.27);
}

.connection[data-state="offline"] .connection-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 107, 122, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: #dfe5f2;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease, color 0.16s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: var(--border-strong);
}

.btn:active { transform: translateY(1px); }

.btn:focus-visible,
.card:focus-visible,
.empty-hint:focus-visible,
.tier-settings:focus-visible,
.card-delete:focus-visible,
.color-swatch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  border-color: rgba(124, 156, 255, 0.36);
  background: linear-gradient(180deg, #8ca8ff, #6d8df5);
  color: #111523;
  box-shadow: 0 6px 20px rgba(103, 132, 235, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  border-color: rgba(155, 178, 255, 0.8);
  background: linear-gradient(180deg, #a1b8ff, #7d9aff);
}

.btn-ghost { background: rgba(255, 255, 255, 0.035); }
.btn-danger { color: #ffadb5; border-color: rgba(255, 107, 122, 0.24); background: rgba(255, 107, 122, 0.08); }
.btn-danger:hover { background: rgba(255, 107, 122, 0.15); border-color: rgba(255, 107, 122, 0.45); }
.btn-small { min-height: 32px; padding: 6px 11px; font-size: 11.5px; }

.app-main {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 8px;
  flex: 1 0 auto;
}

.board {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 300px;
}

.tier-row {
  --tier-color: #596273;
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 112px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  background: linear-gradient(100deg, color-mix(in srgb, var(--tier-color) 7%, var(--panel)), var(--panel) 45%);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.08);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.tier-row:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 15px 46px rgba(0, 0, 0, 0.15);
}

.tier-row.drag-over {
  border-color: color-mix(in srgb, var(--tier-color) 65%, white);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tier-color) 30%, transparent), 0 14px 42px rgba(0, 0, 0, 0.18);
}

.tier-row.file-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(124, 156, 255, 0.35), 0 0 32px rgba(124, 156, 255, 0.11);
}

.tier-label {
  position: relative;
  flex: 0 0 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 18px 10px;
  border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px);
  background: var(--tier-color);
  color: #10141c;
  user-select: none;
}

.tier-label-name {
  max-width: 100%;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.045em;
  text-align: center;
  overflow-wrap: anywhere;
}

.tier-label-count {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0.52;
}

.tier-settings {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid rgba(16, 20, 28, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.25);
  color: rgba(16, 20, 28, 0.64);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.16s ease, background 0.16s ease;
}

.tier-settings svg { width: 13px; height: 13px; stroke-width: 2.3; }
.tier-row:hover .tier-settings, .tier-settings:focus-visible { opacity: 1; }
.tier-settings:hover { background: rgba(255, 255, 255, 0.48); }

.tier-zone {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
  padding: 11px 14px;
}

.tier-items {
  position: relative;
  width: 100%;
  min-height: calc(var(--card-size) + 4px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 9px;
}

.card {
  position: relative;
  flex: 0 0 auto;
  width: var(--card-size);
  height: var(--card-size);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #1a2030;
  box-shadow: 0 5px 13px rgba(0, 0, 0, 0.27);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
  pointer-events: none;
}

.card.is-broken { display: grid; place-items: center; background: linear-gradient(145deg, #232b3c, #171c28); }
.card-fallback { padding: 8px; color: var(--faint); font-size: 9px; line-height: 1.35; text-align: center; }

.card:hover {
  z-index: 2;
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34);
}

.card:active { cursor: grabbing; }

.card-delete {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  padding: 0 0 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(12, 15, 23, 0.86);
  color: #ffc4ca;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.14s ease, transform 0.14s ease, background 0.14s ease;
}

.card:hover .card-delete, .card:focus-within .card-delete { opacity: 1; transform: scale(1); }
.card-delete:hover { background: #b53243; color: white; }

.card.drag-source {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 12px;
  background: #1a2030;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.48);
  pointer-events: none;
  will-change: transform;
  opacity: 0.94;
}

.drag-ghost img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 11px; }
.drag-ghost .card-delete { display: none; }

.drop-marker {
  flex: 0 0 4px;
  width: 4px;
  height: var(--card-size);
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(124, 156, 255, 0.25), 0 0 20px rgba(124, 156, 255, 0.9);
  animation: marker-pulse 0.7s ease-in-out infinite alternate;
}

@keyframes marker-pulse { from { opacity: 0.62; } to { opacity: 1; } }

body.is-dragging { cursor: grabbing; user-select: none; }
body.is-dragging .card { cursor: grabbing; }
body:has(dialog[open]) { overflow: hidden; }

.empty-hint {
  width: 100%;
  min-height: calc(var(--card-size) - 2px);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.empty-hint:hover {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.035);
}

.empty-hint b { color: var(--accent-strong); font-size: 15px; font-weight: 500; }

.pool-row {
  margin-top: 3px;
  --tier-color: #30394a;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
  border-style: dashed;
}

.pool-row .tier-label {
  background: linear-gradient(150deg, #252d3d, #1a202c);
  color: #bac4d8;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.pool-row .tier-label-name { font-size: 17px; letter-spacing: 0.01em; }
.pool-row .empty-hint { min-height: 92px; }
.pool-row.drag-over { border-color: var(--accent); }

.board-loading { display: flex; flex-direction: column; gap: 10px; }

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 112px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.skeleton-row span {
  flex: 0 0 94px;
  align-self: stretch;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.skeleton-row i {
  width: var(--card-size);
  height: var(--card-size);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  animation: skeleton-pulse 1.4s ease-in-out infinite alternate;
}

@keyframes skeleton-pulse { from { opacity: 0.4; } to { opacity: 0.85; } }

.usage-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  padding: 14px 3px 0;
  color: var(--faint);
  font-size: 11px;
}

.hint b { color: var(--muted); font-weight: 700; }

.app-footer {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

dialog {
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
}

dialog::backdrop {
  background: rgba(3, 6, 12, 0.74);
  backdrop-filter: blur(7px);
}

.panel-dialog {
  width: min(440px, calc(100vw - 28px));
  max-width: none;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: #111620;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.panel-dialog form { padding: 25px; }

.panel-heading { margin-bottom: 22px; }
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 0.13em; }
.panel-heading h2 { margin: 0; font-size: 21px; letter-spacing: -0.03em; }

.field { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; border: 0; padding: 0; }
.field > span, .field legend { padding: 0; color: var(--muted); font-size: 11.5px; font-weight: 700; }

.field input {
  width: 100%;
  height: 43px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 156, 255, 0.13); }
.field input::placeholder { color: var(--faint); font-weight: 500; }

.color-picker { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }

.color-swatch {
  width: 31px;
  height: 31px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.color-swatch:hover { transform: scale(1.1); }
.color-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #111620, 0 0 0 4px var(--swatch); }

.panel-actions { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.panel-actions .spacer { flex: 1; }
.panel-actions .btn { min-height: 38px; padding-inline: 13px; }

.lightbox-dialog {
  width: min(980px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100vh - 28px);
}

.lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 28px);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: #111620;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.lightbox-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  padding: 20px 20px 0;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.04), transparent 68%);
}

#lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  border-radius: 11px;
  object-fit: contain;
}

.lightbox-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px 17px;
}

.lightbox-meta p { margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0 0 2px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  background: rgba(9, 12, 19, 0.72);
  color: #e8edf8;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover { background: rgba(40, 48, 66, 0.95); }

.toast-region {
  position: fixed;
  z-index: 500;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(440px, calc(100vw - 24px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  max-width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(20, 26, 38, 0.96);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  color: #dce3f1;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  animation: toast-in 0.2s ease-out;
}

.toast[data-kind="error"] { border-color: rgba(255, 107, 122, 0.4); color: #ffc2c8; }
.toast[data-kind="success"] { border-color: rgba(103, 217, 154, 0.35); color: #baf2d3; }
.toast.is-leaving { animation: toast-out 0.18s ease-in forwards; }

@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(5px); } }

.file-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  padding: 14px;
  border: 2px dashed transparent;
  background: rgba(7, 10, 17, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.file-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  border-color: rgba(124, 156, 255, 0.7);
  background: rgba(7, 10, 17, 0.34);
}

.file-overlay-banner {
  position: absolute;
  top: 22px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border: 1px solid rgba(124, 156, 255, 0.35);
  border-radius: 12px;
  background: rgba(18, 24, 37, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  transform: translateX(-50%);
  white-space: nowrap;
}

.file-overlay-banner svg { width: 23px; height: 23px; color: var(--accent); }
.file-overlay-banner strong { display: block; font-size: 13px; }
.file-overlay-banner span { display: block; margin-top: 1px; color: var(--muted); font-size: 10.5px; }

.noscript { padding: 24px; text-align: center; color: var(--danger); }

@media (max-width: 1000px) {
  .app-header, .app-main, .app-footer { width: calc(100% - 32px); }
  :root { --card-size: 78px; }
  .tier-label { flex-basis: 88px; }
}

@media (max-width: 720px) {
  .app-header { width: calc(100% - 24px); padding: 18px 0 15px; gap: 12px; }
  .brand-mark { width: 30px; height: 30px; padding: 6px; }
  .brand-word { font-size: 12px; }
  .board-heading { flex-basis: 100%; order: 3; }
  .board-heading h1 { font-size: 21px; }
  .board-heading p { font-size: 11.5px; }
  .header-actions { flex: 1 1 auto; gap: 6px; }
  .connection { height: 32px; padding-inline: 9px; }
  .btn { min-height: 35px; padding: 8px 11px; font-size: 11.5px; }
  .app-main { width: calc(100% - 24px); }
  :root { --card-size: 68px; }
  .tier-row { min-height: 94px; border-radius: 15px; }
  .tier-label { flex-basis: 70px; padding: 14px 6px; border-radius: 14px 0 0 14px; }
  .tier-label-name { font-size: clamp(17px, 4.4vw, 23px); }
  .tier-label-count { font-size: 9px; }
  .tier-zone { padding: 9px; }
  .tier-items { min-height: calc(var(--card-size) + 2px); gap: 7px; }
  .tier-settings { opacity: 0.78; width: 22px; height: 22px; top: 5px; right: 5px; }
  .card { border-radius: 10px; }
  .card img { border-radius: 9px; }
  .card-delete { top: -6px; right: -6px; width: 22px; height: 22px; opacity: 1; transform: none; font-size: 15px; }
  .empty-hint { min-height: calc(var(--card-size) - 2px); font-size: 10.5px; }
  .pool-row .empty-hint { min-height: 74px; }
  .usage-hints { gap: 5px 12px; padding-top: 11px; font-size: 10px; }
  .app-footer { width: calc(100% - 24px); padding-bottom: 16px; font-size: 9.5px; }
  .panel-dialog form { padding: 20px; }
  .lightbox-dialog { width: calc(100vw - 16px); }
  .lightbox-stage { padding: 13px 13px 0; }
  .lightbox-meta { padding: 11px 14px 13px; }
  #lightbox-image { max-height: calc(100vh - 132px); }
}

@media (max-width: 480px) {
  .brand-word { display: none; }
  .connection { margin-left: auto; }
  .header-actions { flex: 1 1 100%; }
  .header-actions .btn { flex: 1; }
  .board-heading { order: 3; }
  :root { --card-size: 59px; }
  .tier-label { flex-basis: 58px; }
  .tier-label-name { font-size: 16px; }
  .tier-label-count { display: none; }
  .tier-zone { padding: 8px 7px; }
  .tier-items { gap: 6px; }
  .usage-hints .hint:nth-child(4) { display: none; }
  .file-overlay-banner { top: 14px; max-width: calc(100vw - 30px); padding: 11px 14px; white-space: normal; }
  .file-overlay-banner span { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}