﻿/* Links & QR cabinet (lk-*). Tokens only. */
.lk-err { min-height: 0; font-size: 12.5px; color: var(--critical-text); margin-top: 4px; }
.lk-err:empty { display: none; }

.lk-slug-row { display: flex; gap: 8px; align-items: stretch; }
.lk-slug {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.lk-slug:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lk-slug span { padding: 9px 2px 9px 12px; color: var(--muted); font-size: 14px; white-space: nowrap; background: var(--surface-2); align-self: stretch; display: flex; align-items: center; padding-right: 6px; border-right: 1px solid var(--line); }
.lk-slug input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 9px 10px; font-size: 14px; }
.lk-slug-row .btn { height: auto; min-height: 40px; }

/* Table */
.lk-table tbody tr { cursor: pointer; }
.lk-table tbody tr.is-selected { background: var(--accent-soft); }
.lk-table tbody tr.is-selected:hover { background: var(--accent-soft); }
.lk-short { white-space: nowrap; color: var(--muted); font-size: 13.5px; }
.lk-short b { color: var(--text); font-weight: 600; }
.lk-dest { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.lk-actions { display: inline-flex; gap: 6px; }
.lk-actions .btn { height: 30px; padding: 0 11px; font-size: 13px; }
.lk-actions .lk-del:hover { border-color: var(--critical); color: var(--critical-text); }
.lk-danger { background: var(--critical); color: var(--accent-ink); }
.lk-danger:hover { opacity: 0.9; }

/* Detail */
.lk-detail { display: flex; flex-direction: column; }
.lk-detail-head { min-width: 0; flex: 1; }
.lk-detail-head .dm-card-title { overflow-wrap: anywhere; }
.lk-detail-head .lk-dest { max-width: 100%; }
.lk-detail-body { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 18px; align-items: start; }
.lk-qr-box { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.lk-qr-box .btn { width: 100%; padding: 0 10px; }
.lk-qr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; line-height: 0; }
.lk-qr svg { width: 100%; height: auto; }
.lk-qr-big { max-width: 280px; margin: 4px auto 12px; }
.lk-qr-hint { text-align: center; margin-bottom: 16px; }
.lk-modal-text { margin: 8px 0 18px; }
.lk-modal-actions { justify-content: flex-end; }

.lk-total { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; }
.lk-total-num { font: 650 30px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; display: inline-block; }
.lk-total-num.bump { animation: lk-bump 0.45s ease; color: var(--accent); }
.lk-mini-title { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }

.lk-chart { position: relative; }
.lk-bars { display: flex; align-items: flex-end; gap: 2px; height: 96px; border-bottom: 1px solid var(--axis); }
.lk-bar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.lk-bar { width: 100%; background: var(--series-1); border-radius: 4px 4px 0 0; transition: height 0.35s ease, opacity 0.15s; }
.lk-bars:hover .lk-bar { opacity: 0.55; }
.lk-bars:hover .lk-bar-col.is-hover .lk-bar { opacity: 1; }
.lk-bar.is-new { animation: lk-grow 0.5s ease; }
.lk-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.lk-stats-host { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.lk-stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.lk-stat-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 8px; align-items: center; font-size: 13.5px; margin-bottom: 8px; }
.lk-stat-row .lk-meter { grid-column: 1 / -1; margin-top: 4px; }
.lk-stat-row:not(:has(.lk-flag)) { grid-template-columns: minmax(0, 1fr) auto; }
.lk-flag { font-size: 15px; line-height: 1; }
.lk-stat-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.lk-stat-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.lk-meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.lk-meter span { display: block; height: 100%; border-radius: 999px; background: var(--series-1); transition: width 0.35s ease; }

/* Giveaway */
.lk-gw { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
.lk-gw-text { min-height: 200px; }
.lk-gw-stats { margin: 6px 0 12px; }
.lk-gw-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 14px; }
.lk-inline { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; }
.lk-inline .dm-label { margin: 0; }
.lk-gw-count { width: 72px; }
.lk-gw-toggle { cursor: pointer; }

.lk-gw-stage {
  position: relative;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 16px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.lk-gw-reel { flex: 1; display: grid; place-items: center; text-align: center; font: 650 22px/1.2 var(--font-display); color: var(--text); overflow-wrap: anywhere; }
.lk-gw-reel.is-idle { font: 400 14px/1.4 var(--font); color: var(--muted); }
.lk-gw-reel.is-spinning { color: var(--accent); animation: lk-flicker 0.14s steps(2) infinite; }
.lk-gw-reel.is-hidden { display: none; }
.lk-gw-winners { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; justify-content: center; }
.lk-gw-winners li {
  counter-increment: win;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
  overflow-wrap: anywhere;
  animation: lk-pop 0.4s ease backwards;
}
.lk-gw-winners li::before {
  content: counter(win);
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  background: var(--accent);
  color: var(--accent-ink);
}
.lk-gw-winners li:nth-child(2) { animation-delay: 0.08s; }
.lk-gw-winners li:nth-child(3) { animation-delay: 0.16s; }
.lk-gw-winners li:nth-child(4) { animation-delay: 0.24s; }
.lk-gw-winners li:nth-child(5) { animation-delay: 0.32s; }
.lk-gw-seed { margin-top: 10px; font-size: 12.5px; }

.lk-burst { position: absolute; left: 50%; top: 45%; width: 0; height: 0; pointer-events: none; }
.lk-burst i {
  position: absolute;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: 0;
  animation: lk-confetti 1.2s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.lk-burst i:nth-child(3n) { width: 7px; height: 7px; border-radius: 50%; }

@keyframes lk-bump { 40% { transform: scale(1.12); } }
@keyframes lk-grow { from { transform: scaleY(0.6); transform-origin: bottom; } }
@keyframes lk-flicker { 50% { opacity: 0.7; } }
@keyframes lk-pop { from { opacity: 0; transform: translateY(6px) scale(0.96); } }
@keyframes lk-confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 60px)) rotate(var(--rot)); }
}

@media (max-width: 900px) {
  .lk-gw { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .lk-detail-body { grid-template-columns: 1fr; }
  .lk-qr-box { max-width: 200px; margin: 0 auto; width: 100%; }
  .lk-stats-grid { grid-template-columns: 1fr; gap: 12px; }
  .lk-slug span { font-size: 12.5px; padding-left: 8px; }
  .lk-dest { max-width: 160px; }
}
