* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; background: #1b1b1f; color: #eee; }

.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; background: #111; position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 18px; margin: 0; margin-right: auto; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
button { cursor: pointer; border: 0; border-radius: 6px; padding: 6px 10px; background: #3a3a44; color: #eee; }
button:hover { background: #4a4a57; }
.status { font-size: 13px; opacity: .85; min-width: 80px; }
.status.ok { color: #8fe28f; }
.status.err { color: #ff9a9a; }

.board { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.tier { display: flex; align-items: stretch; background: #26262c; border-radius: 8px; overflow: hidden; min-height: 84px; }
.tier-head { display: flex; flex-direction: column; gap: 4px; justify-content: center; align-items: center;
  width: 96px; padding: 6px; color: #000; }
.tier-label { width: 80px; text-align: center; font-weight: 700; border: 0; border-radius: 4px; background: rgba(255,255,255,.75); }
.tier-head input[type=color] { width: 36px; height: 20px; border: 0; background: none; padding: 0; }
.tier-del { background: rgba(0,0,0,.25); color: #fff; padding: 2px 6px; font-size: 12px; }

.list { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; flex: 1; align-content: flex-start; }
.pool-section { padding: 0 16px 24px; }
.pool-section h2 { font-size: 14px; opacity: .8; }
.pool { background: #202026; border-radius: 8px; min-height: 90px; }

.card { position: relative; width: 80px; }
.card .thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; background: #333; display: block; }
.card .cap { font-size: 11px; text-align: center; word-break: break-word; margin-top: 2px; }
.card-del { position: absolute; top: -6px; right: -6px; background: #c0392b; color: #fff; border-radius: 50%;
  width: 18px; height: 18px; line-height: 1; padding: 0; font-size: 11px; display: none; }
.card:hover .card-del { display: block; }
.drag-ghost { opacity: .4; }

dialog { border: 0; border-radius: 10px; padding: 16px; background: #26262c; color: #eee; min-width: 280px; }
dialog::backdrop { background: rgba(0,0,0,.5); }
dialog label { display: block; margin: 8px 0; font-size: 14px; }
dialog input[type=text], dialog input[type=url] { width: 100%; padding: 6px; border-radius: 6px; border: 1px solid #444; background: #1b1b1f; color: #eee; }
dialog .or { text-align: center; opacity: .6; margin: 4px 0; }
dialog .err { color: #ff9a9a; min-height: 16px; font-size: 13px; }
dialog menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 8px 0 0; }

.recovery { padding: 24px; background: #2a2030; border-radius: 8px; }
.recovery h2 { margin-top: 0; }

.tier-arrows { display: flex; flex-direction: row; gap: 2px; }
.tier-arrow { padding: 0 6px; font-size: 10px; line-height: 1.4; background: rgba(0,0,0,.25); color: #fff; }
.tier-arrow:disabled { opacity: .3; cursor: default; }
#admin-btn.owner-on { background: #2e7d32; }

.card.text-chip { width: auto; min-width: 56px; min-height: 38px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; padding: 4px 12px; }
.card.text-chip .cap { color: #1b1b1f; font-weight: 600; font-size: 13px; margin-top: 0; word-break: normal; }
