/* ==========================================================================
   LAME CARDS — the viewer. The card itself is drawn on canvas; this is just
   the window it arrives in, borrowing the existing panel chrome.
   ========================================================================== */

.lc {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: clamp(10px, 3vw, 32px);
}
.lc[hidden] { display: none !important; }

.lc__backdrop {
  position: absolute; inset: 0;
  background: color-mix(in oklab, var(--ink-950) 84%, transparent);
  backdrop-filter: blur(6px);
}

.lc__panel {
  position: relative;
  width: min(1000px, 100%);
  max-height: calc(100dvh - clamp(20px, 6vw, 64px));
  display: grid; grid-template-rows: auto 1fr;
  overflow: hidden;
  animation: lc-in 220ms var(--ease-out);
}
@keyframes lc-in { from { opacity: 0; transform: translateY(10px) scale(.99); } }
@media (prefers-reduced-motion: reduce) { .lc__panel { animation: none; } }

.lc__x {
  width: 24px; height: 20px; display: grid; place-items: center;
  border: 1px solid var(--ink-500); border-radius: 2px;
  color: var(--bone-400); font-size: 13px; line-height: 1;
}
.lc__x:hover { background: var(--rust-600); color: #fff; border-color: var(--rust-400); }

.lc__body {
  display: grid; gap: var(--s-4);
  padding: var(--s-4);
  overflow: auto; min-height: 0;
  overscroll-behavior: contain;
}
@media (min-width: 860px) {
  .lc__body { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
}

/* --- the card ------------------------------------------------------------ */
.lc__stage {
  display: grid; place-items: center;
  padding: clamp(8px, 1.6vw, 16px);
  border: 1px solid var(--line); border-radius: var(--r-2);
  background:
    repeating-conic-gradient(rgba(255,255,255,.014) 0 25%, transparent 0 50%) 0 0 / 22px 22px,
    var(--ink-950);
  min-width: 0;
}
.lc__canvas {
  display: block;
  width: auto; height: auto;
  max-width: 100%;
  max-height: min(58dvh, 520px);
  border-radius: var(--r-1);
  box-shadow: 0 20px 46px -18px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.6);
}

/* --- side rail ----------------------------------------------------------- */
.lc__side { display: grid; gap: var(--s-3); align-content: start; min-width: 0; }

.lc__types { display: flex; flex-wrap: wrap; gap: 4px; }
.lc__type {
  padding: 7px 10px;
  border: 1px solid var(--ink-500); border-radius: var(--r-1);
  color: var(--bone-400);
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease),
              border-color var(--dur-1) var(--ease);
}
.lc__type:hover { color: var(--bone-100); background: var(--ink-700); }
.lc__type.is-on {
  color: var(--ink-950); background: var(--gold-400); border-color: var(--gold-300); font-weight: 700;
}

.lc__sharelabel {
  font-size: var(--t-xs); letter-spacing: .16em; text-transform: uppercase;
  color: var(--bone-500);
}
.lc__share {
  background: var(--ink-950);
  border: 1px solid var(--line); border-left: 2px solid var(--gold-400);
  border-radius: var(--r-2);
  padding: 10px 12px;
  font-size: var(--t-sm); line-height: 1.55; color: var(--bone-100);
  overflow-wrap: anywhere;
}

.lc__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.lc__actions .btn { flex: 1 1 auto; }
.lc__actions .btn.is-done { --btn-fg: var(--go-400); --btn-line: #2c5c2b; }

.lc__status {
  font-size: var(--t-xs); line-height: 1.6; color: var(--bone-500);
  min-height: 2.6em;
}

/* --- mobile: the card stays the hero ------------------------------------- */
@media (max-width: 859px) {
  .lc { padding: 0; }
  .lc__panel {
    width: 100%; max-width: none; height: 100dvh; max-height: 100dvh;
    border-radius: 0; border-inline: 0;
  }
  .lc__canvas { max-height: min(46dvh, 420px); }
  .lc__actions .btn { flex: 1 1 45%; min-height: 44px; }
  .lc__type { min-height: 34px; }
  .lc__types { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .lc__types::-webkit-scrollbar { display: none; }
}

/* --- the launcher grid inside CARDS.EXE ---------------------------------- */
.lc-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 6px; }
.lc-menu__item {
  display: grid; gap: 4px; justify-items: start; text-align: left;
  padding: 10px;
  border: 1px solid var(--ink-500); border-radius: var(--r-2);
  background: linear-gradient(180deg, var(--ink-700), var(--ink-800));
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.lc-menu__item:hover { border-color: var(--gold-400); background: var(--ink-600); }
.lc-menu__name {
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--bone-100); font-weight: 700;
}
.lc-menu__hint { font-size: 10px; color: var(--bone-500); line-height: 1.4; }
