@font-face {
  font-family: AntonLocal;
  src: url("vendor/fonts/anton.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0c;
  --bg-elev: #141418;
  --bg-row: #1a1a20;
  --line: #2a2a32;
  --text: #f3f3f5;
  --muted: #9a9aa8;
  --s: #3ddc5a;
  --a: #b6f27a;
  --b: #f5e04a;
  --c: #f5a623;
  --d: #f26b3a;
  --f: #e23b3b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --can-w: 74px;
  --can-h: 136px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(61, 220, 90, 0.08), transparent 50%),
    radial-gradient(900px 400px at 100% 0%, rgba(226, 59, 59, 0.07), transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  line-height: 1.4;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand h1 {
  margin: 0;
  font-family: AntonLocal, Impact, "Arial Black", sans-serif;
  font-size: 28px;
  letter-spacing: 0.04em;
  font-weight: 400;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font: 600 13px/1 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:hover { background: #222228; border-color: #444; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--s); outline-offset: 2px; }
.btn-primary {
  background: var(--s);
  color: #06210c;
  border-color: var(--s);
}
.btn-primary:hover { background: #62e874; }
.btn-ghost { color: var(--muted); }
.btn[disabled] { opacity: 0.6; cursor: wait; }

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.board {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 14px 14px;
  box-shadow: var(--shadow);
}
.board-head { padding: 0 8px 14px; }
.board-head h2 {
  margin: 0;
  font-family: AntonLocal, Impact, "Arial Black", sans-serif;
  font-size: 34px;
  letter-spacing: 0.05em;
  font-weight: 400;
}
.board-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.tier-row {
  display: flex;
  min-height: calc(var(--can-h) + 36px);
  margin-bottom: 8px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-row);
  border: 1px solid #23232b;
}
.tier-row:last-child { margin-bottom: 0; }

.tier-label {
  width: 76px;
  flex: 0 0 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: AntonLocal, Impact, "Arial Black", sans-serif;
  font-size: 48px;
  letter-spacing: 0.02em;
  color: #111;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}
.tier-s .tier-label { background: var(--s); }
.tier-a .tier-label { background: var(--a); }
.tier-b .tier-label { background: var(--b); }
.tier-c .tier-label { background: var(--c); }
.tier-d .tier-label { background: var(--d); }
.tier-f .tier-label { background: var(--f); }

.tier-drop, .pool {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 8px 6px;
  padding: 8px 10px;
  min-height: calc(var(--can-h) + 36px);
  flex: 1;
}
.tier-drop.drag-over { background: #222230; }

.pool-section { margin-top: 28px; }
.pool-head { padding: 0 4px 10px; }
.pool-head h2 {
  margin: 0;
  font-family: AntonLocal, Impact, sans-serif;
  font-size: 24px;
  letter-spacing: 0.04em;
  font-weight: 400;
}
.pool-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.pool {
  min-height: 170px;
  background: var(--bg-elev);
  border: 1px dashed #3a3a46;
  border-radius: 16px;
  padding: 12px;
}

.can {
  width: var(--can-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.can:active { cursor: grabbing; }
.can img {
  width: var(--can-w);
  height: var(--can-h);
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.55));
}
.can-name {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
  color: #d4d4dc;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sortable-ghost { opacity: 0.35; }
.sortable-chosen img { transform: scale(1.04); }
.sortable-drag { cursor: grabbing; }

.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px 32px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #f3f3f5;
  color: #111;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 50;
  box-shadow: var(--shadow);
}

@media (max-width: 700px) {
  :root { --can-w: 62px; --can-h: 114px; }
  .brand h1 { font-size: 22px; }
  .board-head h2 { font-size: 26px; }
  .tier-label { width: 54px; flex-basis: 54px; font-size: 34px; }
  .top-inner { padding: 10px 12px; }
  .can-name { font-size: 9px; }
}

.can { position: relative; }
.can.is-menu-open { z-index: 30; }
.can.is-menu-open img { outline: 2px solid #f3f3f5; outline-offset: 2px; border-radius: 6px; }

.tier-menu {
  position: fixed;
  z-index: 80;
  min-width: 176px;
  padding: 6px;
  background: #1c1c22;
  border: 1px solid #3a3a46;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}
.tier-menu-title {
  margin: 0;
  padding: 6px 10px 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tier-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: 650 15px/1.1 "Segoe UI", system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}
.tier-menu button:hover,
.tier-menu button:focus-visible {
  background: #2a2a34;
  outline: none;
}
.tier-menu button.is-current {
  background: #2a2a34;
}
.tier-swatch {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: AntonLocal, Impact, "Arial Black", sans-serif;
  font-size: 15px;
  color: #111;
  letter-spacing: 0.02em;
}
.tier-swatch.swatch-s { background: var(--s); }
.tier-swatch.swatch-a { background: var(--a); }
.tier-swatch.swatch-b { background: var(--b); }
.tier-swatch.swatch-c { background: var(--c); }
.tier-swatch.swatch-d { background: var(--d); }
.tier-swatch.swatch-f { background: var(--f); }
.tier-swatch.swatch-pool {
  background: #2e2e38;
  color: #f3f3f5;
  font-size: 11px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
}

@media (max-width: 700px) {
  .tier-menu { min-width: 196px; }
  .tier-menu button { padding: 12px 12px; font-size: 16px; }
  .tier-swatch { width: 28px; height: 28px; flex-basis: 28px; }
}
