@font-face {
  font-family: "PackScapeTitle";
  src: url("./assets/ui_elements/theme_pixel/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "PackScapeBody";
  src: url("./assets/ui_elements/theme_pixel/VT323-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #22170f;
  --bg-elev: #2e1f14;
  --bg-deep: #160f09;
  --panel: rgba(46, 31, 20, 0.92);
  --panel-strong: rgba(58, 40, 24, 0.96);
  --panel-inner: rgba(24, 16, 10, 0.8);
  --line: #b28e58;
  --line-soft: rgba(178, 142, 88, 0.35);
  --gold: #e2c284;
  --gold-bright: #f6daa2;
  --text: #f4e4c0;
  --text-dim: #ccb288;
  --danger: #d98d82;
  --success: #8ec59d;
  --shadow: rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --topbar-h: 70px;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(226, 194, 132, 0.9) rgba(31, 21, 13, 0.92);
}

*::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

*::-webkit-scrollbar-track {
  background:
    linear-gradient(180deg, rgba(14, 10, 7, 0.88), rgba(38, 25, 16, 0.92));
  border: 1px solid rgba(178, 142, 88, 0.4);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background:
    linear-gradient(180deg, rgba(242, 216, 158, 0.98), rgba(177, 133, 74, 0.96));
  border: 2px solid rgba(35, 24, 15, 0.96);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 236, 189, 0.22);
}

*::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, rgba(249, 227, 177, 1), rgba(196, 149, 82, 0.98));
}

*::-webkit-scrollbar-corner {
  background: rgba(18, 13, 8, 0.96);
}

html, body {
  margin: 0;
  height: 100%;
  background: linear-gradient(180deg, #2c1d12 0%, #22170f 18%, #1a120c 100%);
  color: var(--text);
  font-family: "PackScapeBody", monospace;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(246, 218, 162, 0.06) 0 1px, transparent 1px),
    radial-gradient(circle at 75% 35%, rgba(246, 218, 162, 0.05) 0 1px, transparent 1px),
    radial-gradient(circle at 45% 85%, rgba(246, 218, 162, 0.05) 0 1px, transparent 1px);
  background-size: 120px 120px, 180px 180px, 150px 150px;
  opacity: 0.8;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(246, 218, 162, 0.05), transparent 22%),
    linear-gradient(0deg, rgba(246, 218, 162, 0.04), transparent 16%);
  mix-blend-mode: screen;
}

.shell {
  height: 100dvh;
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  overflow: hidden;
}

.toast-stack {
  position: fixed;
  top: calc(var(--topbar-h) + 16px);
  right: 18px;
  z-index: 70;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px 13px;
  border-radius: 14px;
  border: 2px solid rgba(226, 194, 132, 0.66);
  background:
    linear-gradient(180deg, rgba(248, 228, 172, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(68, 47, 28, 0.96), rgba(42, 28, 17, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(246, 218, 162, 0.1),
    0 12px 24px rgba(0, 0, 0, 0.32);
  animation: toast-enter 220ms ease-out;
}

.toast-card.tone-gold {
  border-color: rgba(226, 194, 132, 0.72);
}

.toast-card.tone-success {
  border-color: rgba(142, 197, 157, 0.9);
  background:
    linear-gradient(180deg, rgba(171, 233, 191, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(48, 64, 42, 0.97), rgba(29, 38, 24, 0.97));
}

.toast-card.tone-token {
  border-color: rgba(169, 214, 156, 0.96);
  background:
    linear-gradient(180deg, rgba(226, 255, 182, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(58, 73, 34, 0.98), rgba(33, 42, 20, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(232, 255, 206, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.34);
}

.toast-title {
  font-family: "PackScapeTitle", monospace;
  font-size: 10px;
  line-height: 1.3;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.28);
}

.toast-card.tone-success .toast-title,
.toast-card.tone-token .toast-title {
  color: #eef7d7;
}

.toast-body {
  font-size: 21px;
  line-height: 1;
  color: var(--text);
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translate3d(14px, -4px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px 26px;
  background: rgba(66, 47, 31, 1);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.topbar-left-spacer {
  min-width: 0;
  width: 100%;
}

.topbar-nav {
  display: flex;
  justify-content: center;
  gap: 14px;
  justify-self: center;
}

.menu-action-btn,
.nav-btn,
.pill-btn,
.action-btn,
.slot-btn,
.page-chip,
.dialog-btn {
  appearance: none;
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, rgba(248, 228, 172, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(112, 77, 43, 0.95), rgba(84, 57, 32, 0.95));
  color: var(--text);
  font-family: "PackScapeTitle", monospace;
  font-size: 11px;
  line-height: 1;
  padding: 13px 18px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(246, 218, 162, 0.12), 0 6px 14px rgba(0, 0, 0, 0.2);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.menu-action-btn:hover,
.nav-btn:hover,
.pill-btn:hover,
.action-btn:hover,
.slot-btn:hover,
.page-chip:hover,
.dialog-btn:hover {
  transform: translateY(-1px);
  border-color: var(--gold-bright);
}

.nav-btn.is-active {
  background:
    linear-gradient(180deg, rgba(248, 228, 172, 0.14), transparent 44%),
    linear-gradient(180deg, rgba(133, 91, 52, 0.98), rgba(98, 66, 37, 0.98));
  box-shadow: inset 0 0 0 1px rgba(246, 218, 162, 0.18), 0 0 0 2px rgba(246, 218, 162, 0.1);
}

.currency {
  display: flex;
  gap: 12px;
  justify-self: end;
}

.currency-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 122px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: linear-gradient(180deg, rgba(248, 228, 172, 0.08), rgba(88, 60, 34, 0.98));
  box-shadow: inset 0 0 0 1px rgba(246, 218, 162, 0.08);
}

.currency-pill img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  image-rendering: pixelated;
}

.currency-label {
  font-family: "PackScapeBody", monospace;
  font-size: 18px;
  color: var(--text);
}

.page {
  padding: 18px 28px 20px;
  min-height: 0;
  overflow: hidden;
}

.page-frame {
  max-width: 1460px;
  margin: 0 auto;
  height: 100%;
  min-height: 0;
  display: grid;
  gap: 14px;
}

.page-frame.is-menu,
.page-frame.is-view {
  grid-template-rows: auto minmax(0, 1fr);
}

.page-frame.is-menu {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.title-wrap {
  display: flex;
  justify-content: center;
  margin: 0;
}

.title-plate {
  position: relative;
  min-width: 460px;
  max-width: min(840px, 92vw);
  padding: 20px 28px 18px;
  border-radius: 18px;
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 238, 196, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(86, 58, 34, 0.98), rgba(62, 42, 26, 0.98));
  box-shadow: 0 14px 22px var(--shadow), inset 0 0 0 1px rgba(246, 218, 162, 0.08);
  text-align: center;
}

.title-plate::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 12px;
  border: 1px solid rgba(246, 218, 162, 0.16);
}

.title-plate.is-screen-title {
  min-width: 340px;
  padding: 14px 22px 12px;
}

.title-text {
  position: relative;
  font-family: "PackScapeTitle", monospace;
  font-size: clamp(26px, 4vw, 52px);
  color: var(--gold-bright);
  text-shadow: 3px 3px 0 rgba(14, 10, 7, 0.9);
}

.title-sub {
  position: relative;
  margin-top: 10px;
  font-family: "PackScapeBody", monospace;
  font-size: 24px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.title-divider {
  width: min(320px, 42vw);
  height: 4px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226, 194, 132, 0.15), var(--gold), rgba(226, 194, 132, 0.15));
}

.title-plate.is-screen-title .title-text {
  font-size: clamp(22px, 2.8vw, 34px);
}

.title-plate.is-screen-title .title-divider {
  width: min(180px, 24vw);
  margin-top: 10px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(360px, 1.1fr);
  gap: 28px;
  min-height: 0;
}

.menu-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  grid-template-columns: minmax(560px, 620px) minmax(420px, 520px);
  gap: 34px;
  align-items: start;
}

.panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 238, 196, 0.04), transparent 36%),
    var(--panel);
  box-shadow: 0 18px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 12px;
  border: 1px solid rgba(246, 218, 162, 0.14);
  pointer-events: none;
}

.panel-header {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 14px 16px 0;
  padding: 8px 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: linear-gradient(180deg, rgba(112, 77, 43, 0.95), rgba(84, 57, 32, 0.96));
  font-family: "PackScapeTitle", monospace;
  font-size: 10px;
  color: var(--text);
  white-space: nowrap;
}

.panel-body {
  padding: 18px 20px 20px;
  min-height: 0;
}

.stack {
  display: grid;
  gap: 18px;
}

.save-slot {
  display: grid;
  grid-template-columns: 12px 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 2px solid rgba(162, 122, 76, 0.9);
  background: linear-gradient(180deg, rgba(72, 52, 34, 0.96), rgba(58, 41, 25, 0.96));
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.save-slot.is-active {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 2px rgba(246, 218, 162, 0.12);
}

.save-slot.is-selected:not(.is-active) {
  border-color: rgba(240, 204, 136, 0.92);
  box-shadow: 0 0 0 1px rgba(246, 218, 162, 0.12);
}

.save-slot:hover {
  transform: translateY(-1px);
}

.slot-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(112, 88, 64, 0.95);
  box-shadow: inset 0 0 0 1px rgba(42, 28, 16, 0.45);
}

.save-slot.is-selected .slot-status-dot {
  background: rgba(214, 184, 130, 0.98);
}

.save-slot.is-active .slot-status-dot {
  background: rgba(136, 220, 154, 0.98);
}

.avatar-box {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  border: 2px solid rgba(226, 194, 132, 0.65);
  background: rgba(18, 12, 8, 0.85);
  overflow: hidden;
}

.avatar-box img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  image-rendering: pixelated;
}

.slot-avatar-fallback {
  font-family: "PackScapeBody", monospace;
  font-size: 26px;
  line-height: 1;
  color: rgba(206, 180, 142, 0.9);
}

.slot-name {
  font-family: "PackScapeTitle", monospace;
  font-size: 11px;
  line-height: 1.05;
  margin-bottom: 0;
}

.slot-name-hit {
  display: block;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.slot-copy {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}

.slot-meta,
.slot-last,
.body-copy,
.metric-value,
.card-meta,
.status-pill,
.dialog-copy,
.input,
.select {
  font-family: "PackScapeBody", monospace;
}

.slot-meta {
  font-size: 17px;
  line-height: 1;
  color: rgba(214, 188, 148, 0.9);
}

.slot-last {
  margin-top: 0;
  font-size: 16px;
  line-height: 1;
  color: rgba(198, 170, 130, 0.96);
}

.slot-meta.is-empty,
.slot-last.is-empty {
  color: rgba(204, 178, 136, 0.82);
}

.slot-actions {
  display: grid;
  gap: 8px;
}

.slot-btn {
  min-width: 92px;
  padding: 10px 12px;
  font-size: 9px;
}

.save-footer,
.toolbar,
.dialog-actions,
.meta-row,
.view-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.save-footer {
  margin-top: 12px;
}

.save-footer.is-desktop-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.save-footer.is-desktop-menu-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.action-btn {
  padding: 14px 18px;
  font-size: 10px;
}

.action-btn.is-secondary-action {
  min-height: 48px;
}

.menu-actions-panel,
.save-panel {
  height: 100%;
}

.menu-right-stack {
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
  height: 100%;
  min-height: 0;
}

.save-panel {
  min-height: 540px;
  max-height: 620px;
}

.menu-actions-panel {
  min-height: 336px;
  max-height: 380px;
}

.menu-patch-panel {
  height: 100%;
  min-height: 188px;
}

.save-panel::before,
.menu-actions-panel::before,
.menu-patch-panel::before {
  inset: 8px;
  border-color: rgba(236, 204, 142, 0.18);
}

.save-panel-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px 16px 16px;
}

.save-panel-body > .stack {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.menu-actions-body {
  display: grid;
  place-items: center;
  padding: 16px 18px 18px;
}

.menu-actions-grid {
  width: min(100%, 470px);
  display: grid;
  gap: 12px;
}

.menu-action-btn {
  width: 100%;
  min-height: 60px;
  padding: 16px 24px;
  font-size: 12px;
}

.save-panel-head {
  display: grid;
  gap: 4px;
}

.save-panel-title {
  font-family: "PackScapeTitle", monospace;
  font-size: 14px;
  color: var(--text);
}

.save-panel-hint {
  font-family: "PackScapeBody", monospace;
  font-size: 15px;
  color: rgba(214, 188, 146, 0.9);
}

.save-model-note {
  font-family: "PackScapeBody", monospace;
  font-size: 17px;
  line-height: 1;
  color: rgba(235, 214, 174, 0.92);
  text-align: center;
}

.save-slots-stack {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  gap: 10px;
}

.menu-footer-note {
  justify-self: center;
  align-self: end;
  font-family: "PackScapeBody", monospace;
  font-size: 18px;
  color: rgba(204, 178, 136, 0.78);
}

.menu-patch-body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px 18px 18px;
}

.menu-patch-title {
  font-family: "PackScapeTitle", monospace;
  font-size: 10px;
  color: rgba(244, 230, 202, 0.98);
}

.menu-patch-title.is-notes {
  margin-top: 4px;
}

.menu-version-line,
.menu-patch-note {
  font-family: "PackScapeBody", monospace;
}

.menu-version-line {
  font-size: 18px;
  color: rgba(214, 188, 146, 0.96);
}

.menu-patch-list {
  display: grid;
  gap: 8px;
}

.menu-patch-note {
  font-size: 16px;
  line-height: 1.12;
  color: rgba(198, 170, 130, 0.95);
}

.dialog-avatar-picker {
  width: min(940px, 97vw);
}

.dialog-avatar-picker-body {
  gap: 12px;
}

.avatar-picker-page {
  justify-self: end;
  font-family: "PackScapeBody", monospace;
  font-size: 18px;
  color: rgba(182, 220, 244, 0.92);
}

.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.avatar-choice-tile {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  gap: 8px;
  justify-items: center;
  cursor: pointer;
}

.avatar-choice-frame {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 2px solid rgba(118, 206, 240, 0.92);
  background: rgba(10, 18, 30, 0.76);
  transition: transform 120ms ease, border-color 120ms ease;
}

.avatar-choice-frame img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  image-rendering: pixelated;
}

.avatar-choice-tile:hover .avatar-choice-frame,
.avatar-choice-tile:focus-visible .avatar-choice-frame {
  transform: translateY(-2px);
  border-color: rgba(184, 228, 248, 0.98);
}

.avatar-choice-name {
  width: 100%;
  min-height: 30px;
  font-family: "PackScapeBody", monospace;
  font-size: 14px;
  line-height: 1.05;
  color: rgba(214, 188, 146, 0.94);
  text-align: center;
}

.avatar-picker-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.body-copy {
  font-size: 28px;
  line-height: 1.15;
  color: var(--text-dim);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 16px;
  border-radius: 14px;
  border: 2px solid rgba(226, 194, 132, 0.45);
  background: rgba(22, 15, 9, 0.78);
}

.metric-label {
  font-family: "PackScapeTitle", monospace;
  font-size: 9px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.metric-value {
  font-size: 30px;
  color: var(--text);
}

.view-switcher {
  margin-top: 4px;
}

.page-chip {
  font-size: 9px;
  padding: 11px 14px;
}

.page-chip.is-active {
  border-color: var(--gold-bright);
  background:
    linear-gradient(180deg, rgba(248, 228, 172, 0.14), transparent 44%),
    linear-gradient(180deg, rgba(133, 91, 52, 0.98), rgba(98, 66, 37, 0.98));
}

.content-grid {
  display: grid;
  gap: 28px;
  min-height: 0;
}

.view-stage {
  min-height: 0;
  overflow: hidden;
  display: grid;
}

.view-stage > * {
  min-height: 0;
}

.packs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  min-height: 0;
}

.pack-card {
  padding: 14px 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(226, 194, 132, 0.5);
  background: rgba(22, 15, 9, 0.78);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.screen-card {
  padding: 14px 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(226, 194, 132, 0.5);
  background: rgba(22, 15, 9, 0.78);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 10px;
}

 .packs-view-body .pack-card {
  padding: 0;
  background: rgba(22, 15, 9, 0.82);
  overflow: hidden;
}

.packs-view-body .pack-card-hit {
  appearance: none;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 14px 14px 16px;
  background: transparent;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 10px;
  cursor: pointer;
  text-align: inherit;
}

.packs-view-body .pack-card-hit:disabled {
  cursor: default;
}

.pack-card.is-clickable {
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.pack-card.is-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(246, 218, 162, 0.85);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.pack-card.is-empty {
  opacity: 0.72;
}

.view-panel {
  height: 100%;
}

.packs-view-panel {
  grid-template-rows: minmax(0, 1fr);
}

.packs-view-body {
  overflow: hidden;
  display: grid;
  align-content: center;
  padding: 6px 12px 12px;
}

.packs-view-body .packs-grid {
  height: 100%;
  align-content: center;
  gap: 14px;
}

.desktop-pack-card {
  min-height: 0;
  border-radius: 14px;
  border: 2px solid rgba(226, 194, 132, 0.52);
  background:
    linear-gradient(180deg, rgba(248, 228, 172, 0.05), transparent 28%),
    rgba(54, 38, 24, 0.96);
  overflow: hidden;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.desktop-pack-card.is-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(246, 218, 162, 0.9);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.26);
}

.desktop-pack-card.is-empty {
  opacity: 0.72;
}

.desktop-pack-hit {
  appearance: none;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 10px 10px 12px;
  display: grid;
  grid-template-rows: 230px 116px;
  gap: 8px;
  cursor: pointer;
  text-align: inherit;
}

.desktop-pack-hit:disabled {
  cursor: default;
}

.desktop-pack-art {
  display: grid;
  place-items: center;
  height: 230px;
  border-radius: 12px;
  border: 1px solid rgba(226, 194, 132, 0.42);
  background: rgba(14, 9, 6, 0.92);
  overflow: hidden;
  align-self: start;
}

.desktop-pack-art img {
  width: auto;
  height: auto;
  max-width: 98%;
  max-height: 218px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.28));
}

.desktop-pack-meta {
  min-height: 116px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 3px;
  padding: 10px 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(168, 128, 82, 0.82);
  background: rgba(40, 28, 18, 0.94);
  overflow: hidden;
}

.desktop-pack-title {
  font-family: "PackScapeTitle", monospace;
  font-size: 11px;
  line-height: 1.1;
  color: var(--text);
  text-align: center;
}

.desktop-pack-price {
  font-family: "PackScapeBody", monospace;
  font-size: 21px;
  line-height: 1;
  color: #d6e4b6;
}

.desktop-pack-count {
  font-family: "PackScapeBody", monospace;
  font-size: 16px;
  line-height: 1;
  color: var(--text-dim);
}

.desktop-pack-progress {
  width: 100%;
  height: 10px;
  margin-top: 8px;
  align-self: end;
}

.pack-art {
  display: grid;
  place-items: center;
  height: 224px;
  border-radius: 12px;
  border: 1px solid rgba(226, 194, 132, 0.4);
  background: rgba(14, 9, 6, 0.88);
  overflow: hidden;
}

.pack-art img {
  max-width: 100%;
  max-height: 208px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.28));
}

.pack-meta-panel {
  display: grid;
  gap: 5px;
  padding: 10px 12px 11px;
  border-radius: 12px;
  border: 1px solid rgba(226, 194, 132, 0.3);
  background: rgba(54, 36, 22, 0.9);
}

.pack-card-title {
  margin-bottom: 0;
}

.pack-count {
  text-align: center;
}

.pack-progress {
  margin-top: 0;
}

.buy-price {
  color: #d6e4b6;
  text-align: center;
}

.packs-view-body .pack-card-cta {
  font-family: "PackScapeBody", monospace;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  color: var(--text-dim);
}

.card-title {
  font-family: "PackScapeTitle", monospace;
  font-size: 11px;
  margin-bottom: 10px;
}

.card-meta {
  font-size: 24px;
  color: var(--text-dim);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(226, 194, 132, 0.6);
  background: rgba(18, 12, 8, 0.72);
  color: var(--text);
  font-size: 21px;
}

.status-pill.ok {
  color: #e8f5d6;
  border-color: rgba(142, 197, 157, 0.8);
}

.status-pill.warn {
  color: #ffe7cf;
  border-color: rgba(217, 141, 130, 0.75);
}

.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.screen-card h3,
.dialog-title {
  margin: 0 0 12px;
  font-family: "PackScapeTitle", monospace;
  font-size: 11px;
}

.screen-card p,
.screen-list,
.dialog-copy {
  margin: 0;
  font-size: 24px;
  color: var(--text-dim);
}

.screen-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.toolbar {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.input,
.select {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid rgba(226, 194, 132, 0.55);
  background: rgba(22, 15, 9, 0.88);
  color: var(--text);
  font-size: 24px;
}

.input::placeholder {
  color: rgba(204, 178, 136, 0.7);
}

.collection-view-body.is-desktop-clone {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.collection-tabs-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.collection-tab-btn {
  appearance: none;
  min-width: 86px;
  padding: 10px 10px 6px;
  border-radius: 12px;
  border: 2px solid rgba(226, 194, 132, 0.55);
  background: rgba(60, 40, 24, 0.96);
  color: var(--text);
  display: grid;
  gap: 6px;
  justify-items: center;
  cursor: pointer;
  font-family: "PackScapeBody", monospace;
}

.collection-tab-btn.is-active {
  border-color: rgba(246, 218, 162, 0.95);
  background: rgba(108, 76, 44, 0.98);
}

.collection-tab-label {
  font-family: "PackScapeTitle", monospace;
  font-size: 9px;
}

.collection-tab-count {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(226, 194, 132, 0.5);
  background: rgba(22, 15, 9, 0.9);
  font-size: 16px;
  line-height: 1;
  color: var(--text-dim);
}

.collection-controls-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.collection-search-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.collection-search-label {
  font-family: "PackScapeBody", monospace;
  font-size: 18px;
  color: var(--text-dim);
}

.collection-search-input {
  width: 100%;
}

.collection-sections-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.collection-section {
  display: grid;
  gap: 12px;
  align-content: start;
}

.collection-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px 0 16px;
  border-radius: 10px;
  border: 2px solid rgba(226, 194, 132, 0.46);
  background: rgba(94, 66, 38, 0.9);
}

.collection-section-title {
  font-family: "PackScapeTitle", monospace;
  font-size: 10px;
}

.collection-section-count {
  min-width: 34px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(246, 218, 162, 0.72);
  background: rgba(112, 78, 46, 0.96);
  text-align: center;
  font-size: 18px;
  line-height: 1;
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px 12px;
  align-content: start;
  justify-items: center;
}

.collection-card {
  display: grid;
  justify-items: center;
  width: 168px;
  height: 212px;
  content-visibility: auto;
  contain-intrinsic-size: 168px 212px;
}

.collection-card-face {
  position: relative;
  width: 160px;
  height: 204px;
  margin-top: 4px;
    background: var(--template-url) center / 100% 100% no-repeat;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.32));
}

.collection-card.is-locked .collection-card-face {
  filter: grayscale(1) saturate(0.35) brightness(0.82) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.26));
}

.collection-card-art {
  position: absolute;
  left: 15%;
  top: 11%;
  width: 70%;
  height: 43%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.collection-card-art img,
.template-card-art img,
.collection-card-art canvas,
.template-card-art canvas {
  display: block;
  image-rendering: pixelated;
}

.collection-card-art img,
.template-card-art img {
  width: auto;
  height: auto;
  max-width: 96%;
  max-height: 96%;
  transform: translateY(3px);
}

.collection-card.type-monster .collection-card-art img,
.template-card.type-monster .template-card-art img {
  max-width: 82%;
  max-height: 82%;
}

.collection-card.type-monster .collection-card-art img.is-tall,
.template-card.type-monster .template-card-art img.is-tall {
  max-width: 62%;
  max-height: 62%;
  transform: translateY(0);
}

.collection-card.type-monster .collection-card-art img.is-wide,
.template-card.type-monster .template-card-art img.is-wide {
  max-width: 84%;
  max-height: 78%;
}

.collection-card-name {
  position: absolute;
  left: 11%;
  top: 69.5%;
  width: 78%;
  height: 16%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0;
  padding: 0 4px 2px;
  text-align: center;
  z-index: 2;
  overflow: hidden;
}

.collection-card-name span {
  font-family: "PackScapeTitle", monospace;
  font-size: 9px;
  line-height: 0.9;
  color: #f5eacc;
  text-shadow:
    -1px 0 #14100c,
    1px 0 #14100c,
    0 -1px #14100c,
    0 1px #14100c;
}

.collection-card-name.is-compact span {
  font-size: 8px;
  line-height: 0.86;
}

.collection-card-tag {
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  min-width: 46px;
  max-width: 68px;
  padding: 1px 7px;
  border-radius: 8px;
  border: 1px solid rgba(246, 218, 162, 0.72);
  background: rgba(88, 60, 36, 0.98);
  text-align: center;
  font-size: 12px;
  line-height: 1;
  color: var(--text);
  z-index: 1;
}

.collection-card-tag.category-weapons,
.collection-card-tag.category-armour,
.collection-card-tag.category-ammunition,
.collection-card-tag.category-tools,
.collection-card-tag.category-food,
.collection-card-tag.category-potions {
  background: rgba(88, 60, 36, 0.98);
}

.collection-card-tag.category-mobs {
  background: rgba(60, 126, 86, 0.98);
}

.collection-card-tag.category-bosses {
  background: rgba(148, 62, 62, 0.98);
}

.collection-card-new {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(190, 245, 212, 0.95);
  background: rgba(62, 170, 112, 0.98);
  font-size: 13px;
  line-height: 1;
  color: #fff9f9;
}

.collection-empty-copy {
  grid-column: 1 / -1;
  padding: 16px 6px 8px;
}

.tasks-grid,
.report-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
  min-height: 0;
  height: 100%;
}

.task-list,
.report-list {
  display: grid;
  gap: 14px;
}

.report-list-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
}

.report-list-panel,
.report-grid > .stack > .panel {
  overflow: hidden;
}

.report-list-panel-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.report-grid > .panel,
.report-grid > .stack,
.tasks-grid > .stack {
  min-height: 0;
}

.report-grid > .stack,
.tasks-grid > .stack {
  display: grid;
  gap: 18px;
}

.report-grid > .stack {
  grid-template-rows: minmax(0, 1fr);
}

.report-right-stack {
  gap: 14px;
  grid-template-rows: minmax(132px, 0.8fr) minmax(172px, 0.94fr) minmax(0, 1fr);
}

.report-right-panel::before {
  inset: 9px;
}

.report-right-panel .panel-header {
  margin: 11px 13px 0;
  padding: 6px 12px;
  border-radius: 11px;
  font-size: 9px;
}

.report-right-panel .panel-body {
  padding: 12px 14px 14px;
}

.report-right-panel .body-copy {
  font-size: 22px;
  line-height: 1.12;
}

.tasks-grid > .stack:last-child {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.tasks-left-stack {
  grid-template-rows: minmax(0, 0.57fr) minmax(0, 0.43fr);
}

.tasks-right-stack {
  grid-template-rows: minmax(152px, 0.23fr) minmax(152px, 0.23fr) minmax(0, 1fr);
}

.tasks-grid .packs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tasks-pack-panel .panel-body,
.tasks-odds-panel .panel-body {
  overflow: hidden;
}

.tasks-pack-body {
  display: grid;
  align-content: center;
  padding: 6px 8px 10px;
}

.task-pack-grid {
  height: 100%;
  gap: 12px;
  align-content: center;
}

.task-pack-card {
  min-height: 0;
}

.task-pack-hit {
  padding: 10px 10px 12px;
  grid-template-rows: 196px minmax(0, 1fr);
  gap: 12px;
}

.task-pack-card .desktop-pack-art {
  height: 196px;
}

.task-pack-card .desktop-pack-art img {
  max-height: 184px;
}

.task-pack-meta {
  min-height: 0;
  gap: 6px;
  padding: 10px 10px 11px;
}

.task-pack-card .desktop-pack-title {
  font-size: 10px;
}

.task-pack-card .desktop-pack-price {
  font-size: 18px;
}

.task-pack-cta {
  font-family: "PackScapeBody", monospace;
  text-align: center;
}

.task-pack-cta {
  font-size: 16px;
  line-height: 1;
  color: #d8c9ac;
}

.tasks-grid .task-list {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.task-row,
.report-row {
  padding: 14px;
  border-radius: 14px;
  border: 2px solid rgba(226, 194, 132, 0.42);
  background: rgba(22, 15, 9, 0.68);
}

.task-active-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 0;
}

.template-card.is-task {
  width: 150px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.28));
}

.task-active-copy {
  display: grid;
  gap: 8px;
}

.task-active-icon-box {
  display: grid;
  place-items: center;
}

.task-active-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 10px;
  border: 1px solid rgba(168, 136, 94, 0.5);
  background: rgba(14, 10, 8, 0.74);
}

.task-active-icon img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  image-rendering: pixelated;
}

.task-active-title {
  font-family: "PackScapeTitle", monospace;
  font-size: 11px;
  line-height: 1.1;
  color: #f5ecd6;
  text-shadow: 1px 1px 0 rgba(10, 8, 6, 0.98);
}

.task-active-progress {
  margin-top: 0;
}

.task-active-meta {
  font-family: "PackScapeBody", monospace;
  font-size: 18px;
  line-height: 1.04;
  color: #e8d6b6;
  text-shadow: 1px 1px 0 rgba(10, 8, 6, 0.9);
}

.task-active-meta.is-bounty {
  color: #d0ba98;
}

.task-odds-shell {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 6px;
  padding: 10px 14px 12px;
}

.task-odds-heading {
  font-family: "PackScapeBody", monospace;
  font-size: 14px;
  line-height: 1.05;
  color: rgba(192, 174, 144, 0.95);
  width: min(100%, 520px);
}

.task-odds-heading.is-secondary {
  margin-top: 2px;
}

.task-odds-row {
  display: grid;
  grid-template-columns: minmax(88px, 118px) minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  width: min(100%, 520px);
}

.task-odds-label {
  font-family: "PackScapeBody", monospace;
  font-size: 16px;
  line-height: 1.05;
  color: #ebe1cd;
}

.task-odds-progress {
  margin-top: 0;
  height: 9px;
}

.task-odds-row.is-gold .task-odds-progress > span {
  background: linear-gradient(90deg, rgba(208, 172, 112, 0.88), rgba(225, 208, 176, 0.96));
}

.task-odds-row.is-green .task-odds-progress > span {
  background: linear-gradient(90deg, rgba(116, 176, 122, 0.88), rgba(210, 236, 190, 0.96));
}

.task-odds-pct {
  font-family: "PackScapeBody", monospace;
  font-size: 15px;
  text-align: right;
}

.task-odds-row.is-gold .task-odds-pct {
  color: #e1d0b0;
}

.task-odds-row.is-green .task-odds-pct {
  color: #d2ecbe;
}

.task-history-panel .panel-body {
  padding-top: 12px;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-row {
  position: relative;
  display: grid;
  grid-template-columns: 5px 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 88px;
  border-width: 1px;
}

.task-row-accent {
  width: 5px;
  height: calc(100% - 8px);
  border-radius: 3px;
  background: var(--task-accent-fill, #7c7060);
  border: 1px solid var(--task-accent-border, #cec2aa);
}

.task-row-icon-box {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid rgba(168, 136, 94, 0.52);
  background: rgba(14, 10, 8, 0.78);
}

.task-row-icon-box img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  image-rendering: pixelated;
}

.task-row-copy {
  min-width: 0;
}

.task-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  min-width: 0;
}

.task-row-rarity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--task-rarity-border, #cec2aa);
  background: var(--task-rarity-fill, #7c7060);
  color: var(--task-rarity-text, #f6eedc);
  font-family: "PackScapeBody", monospace;
  font-size: 14px;
  white-space: nowrap;
}

.task-row-title {
  min-width: 0;
  font-family: "PackScapeTitle", monospace;
  font-size: 10px;
  line-height: 1.08;
  color: #eee2cc;
  text-shadow: 1px 1px 0 rgba(10, 8, 6, 0.95);
}

.task-row-meta {
  font-family: "PackScapeBody", monospace;
  font-size: 17px;
  line-height: 1.04;
  color: #d6c2a0;
  text-shadow: 1px 1px 0 rgba(10, 8, 6, 0.9);
}

.report-row {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  min-height: 94px;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.report-row:hover,
.report-row.is-selected {
  transform: translateY(-1px);
  border-color: rgba(246, 218, 162, 0.9);
  background: linear-gradient(180deg, rgba(106, 72, 42, 0.96), rgba(82, 55, 31, 0.96));
}

.report-row-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid rgba(226, 194, 132, 0.38);
  background: rgba(12, 8, 5, 0.82);
}

.report-row-icon img,
.report-detail-icon img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  image-rendering: pixelated;
}

.report-row-copy {
  min-width: 0;
}

.report-row-name {
  margin-bottom: 6px;
  font-family: "PackScapeTitle", monospace;
  font-size: 10px;
  line-height: 1.08;
  color: #f6ddb2;
  text-shadow:
    1px 1px 0 rgba(10, 8, 6, 0.98),
    0 0 10px rgba(246, 218, 162, 0.08);
}

.report-row-meta {
  font-family: "PackScapeBody", monospace;
  font-size: 18px;
  line-height: 1.05;
  color: #ddc79d;
  text-shadow: 1px 1px 0 rgba(12, 10, 8, 0.92);
}

.report-search-wrap {
  width: 100%;
  display: block;
}

.report-search {
  width: 100%;
}

.report-detail-panel,
.report-session-panel,
.report-progress-panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.report-detail-panel {
  display: grid;
  align-items: center;
  justify-items: start;
}

.report-session-shell,
.report-progress-shell {
  display: grid;
  gap: 8px;
  height: 100%;
  min-height: 0;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(168, 136, 94, 0.72);
  background: rgba(40, 28, 18, 0.64);
  box-shadow: inset 0 0 0 1px rgba(248, 228, 172, 0.04);
  overflow: hidden;
}

.report-detail-card {
  display: grid;
  grid-template-columns: 76px minmax(232px, 300px);
  gap: 14px;
  align-items: center;
  min-height: 0;
  width: min(100%, 408px);
  justify-content: start;
  margin-inline: 0;
}

.report-detail-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 10px;
  border: 1px solid rgba(226, 194, 132, 0.58);
  background: rgba(12, 9, 6, 0.92);
  box-shadow: inset 0 0 0 1px rgba(246, 218, 162, 0.08);
}

.report-detail-icon img {
  display: block;
  object-position: center center;
}

.report-detail-copy {
  display: grid;
  gap: 2px;
  align-content: center;
  min-width: 0;
  width: 100%;
}

.report-detail-name {
  font-family: "PackScapeTitle", monospace;
  font-size: 12px;
  line-height: 1.12;
  margin-bottom: 6px;
  color: #f6ddb2;
  text-shadow:
    1px 1px 0 rgba(10, 8, 6, 0.98),
    0 0 10px rgba(246, 218, 162, 0.08);
}

.report-detail-meta {
  font-family: "PackScapeBody", monospace;
  font-size: 15px;
  color: #dbc49d;
  margin-bottom: 3px;
  text-shadow: 1px 1px 0 rgba(12, 10, 8, 0.9);
}

.report-detail-meta.is-kc {
  color: #f8e484;
}

.report-variant-label {
  margin-top: 4px;
}

.report-variant,
.report-kills-input {
  width: min(280px, 100%);
}

.report-variant {
  margin-top: 6px;
  width: 100%;
  max-width: 280px;
}

.report-form {
  display: grid;
  gap: 6px;
}

.report-actions {
  margin-top: auto;
  justify-content: flex-end;
}

.report-gold-card {
  padding: 12px;
  border-color: rgba(226, 194, 132, 0.52);
  background: linear-gradient(180deg, rgba(48, 34, 22, 0.96), rgba(28, 20, 13, 0.96));
}

.report-submit-btn {
  min-width: 166px;
  padding: 11px 16px;
}

.report-killed-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-width: 150px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 2px solid rgba(226, 194, 132, 0.42);
  background: rgba(44, 30, 20, 0.9);
}

.report-killed-strip.is-killed {
  border-color: rgba(170, 238, 176, 0.6);
}

.report-killed-strip.is-not-killed {
  border-color: rgba(246, 156, 146, 0.58);
}

.report-killed-label {
  font-family: "PackScapeTitle", monospace;
  font-size: 10px;
  color: var(--text);
}

.report-killed-state {
  font-family: "PackScapeTitle", monospace;
  font-size: 11px;
}

.report-killed-strip.is-killed .report-killed-state {
  color: #aaeeb0;
}

.report-killed-strip.is-not-killed .report-killed-state {
  color: #f49c92;
}

.report-progress-block {
  display: grid;
  gap: 4px;
}

.report-progress-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.report-progress-summary {
  font-family: "PackScapeBody", monospace;
  font-size: 14px;
  line-height: 1;
  color: #f6e6c2;
  text-align: right;
  white-space: nowrap;
}

.report-progress-panel .card-meta {
  font-size: 15px;
  line-height: 1.02;
}

.report-progress-panel .progress {
  margin-top: 0;
}

.progress {
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  border: 1px solid rgba(226, 194, 132, 0.52);
  overflow: hidden;
  background: rgba(10, 6, 4, 0.72);
}

.report-session-panel,
.report-progress-panel,
.report-detail-panel {
  min-height: 0;
  overflow: hidden;
}

.report-session-shell {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.report-progress-shell {
  align-content: start;
}

.report-session-panel .metric-label,
.report-progress-panel .metric-label {
  margin-bottom: 8px;
}

.report-session-panel .metric-value {
  font-size: 24px;
}

.report-session-panel .input,
.report-session-panel .select,
.report-detail-panel .select {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 20px;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(226, 194, 132, 0.85), rgba(246, 218, 162, 0.98));
}

.footer-note {
  margin-top: 26px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(226, 194, 132, 0.35);
  background: rgba(18, 12, 8, 0.62);
  font-family: "PackScapeBody", monospace;
  font-size: 22px;
  color: var(--text-dim);
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}

.dialog {
  width: min(560px, 96vw);
  border-radius: 18px;
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 238, 196, 0.06), transparent 28%),
    rgba(44, 29, 18, 0.98);
  box-shadow: 0 24px 32px rgba(0, 0, 0, 0.42);
}

.dialog-pack-menu {
  width: min(500px, 96vw);
}

.dialog-task-pack-menu {
  width: min(430px, 96vw);
}

.dialog-pack-menu .dialog {
  overflow: hidden;
}

.dialog-opening {
  width: min(860px, 96vw);
}

.dialog-reveal {
  width: min(860px, 96vw);
}

.dialog-head {
  padding: 18px 20px 0;
}

.dialog-body {
  padding: 12px 20px 20px;
  display: grid;
  gap: 14px;
}

.dialog-actions {
  justify-content: flex-end;
}

.dialog-opening .dialog-body,
.dialog-reveal .dialog-body {
  justify-items: center;
}

.dialog-opening,
.dialog-reveal,
.opening-stage,
.reveal-stage,
.opening-stage-arena,
.reveal-stage-arena,
.opening-pack-scene,
.reveal-stack,
.template-card,
.reveal-flip-card,
.reveal-flip-inner,
.reveal-face,
.dialog-opening .dialog-copy,
.dialog-reveal .dialog-copy,
.reveal-footer,
.reveal-footer-pill,
.reveal-footer-sub {
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.dialog-opening .dialog-copy,
.dialog-reveal .dialog-copy {
  text-align: center;
}

.dialog-opening .dialog-actions,
.dialog-reveal .dialog-actions {
  justify-content: center;
}

.dialog-btn {
  font-size: 9px;
}

.dialog-pack-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}

.dialog-pack-head .dialog-title {
  margin: 0;
}

.dialog-close-btn {
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid rgba(168, 130, 84, 0.96);
  background: rgba(90, 62, 40, 0.96);
  color: var(--text);
  font-family: "PackScapeBody", monospace;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.dialog-pack-body {
  justify-items: center;
  gap: 16px;
}

.dialog-pack-body.is-desktop-pack-menu {
  gap: 14px;
  padding: 10px 22px 20px;
}

.dialog-task-pack-body {
  gap: 14px;
}

.dialog-pack-copy {
  text-align: center;
}

.task-pack-menu-actions {
  width: 100%;
}

.dialog-pack-hero {
  display: grid;
  place-items: center;
}

.dialog-pack-hero img {
  width: min(220px, 48vw);
  max-height: 210px;
  object-fit: contain;
  image-rendering: pixelated;
}

.dialog-pack-meta {
  display: grid;
  gap: 14px;
}

.dialog-pack-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dialog-pack-actions.is-desktop-stack {
  width: 100%;
  grid-template-columns: 1fr;
  gap: 10px;
}

.dialog-pack-btn {
  appearance: none;
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 58px;
  padding: 11px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(248, 228, 172, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(112, 77, 43, 0.95), rgba(84, 57, 32, 0.95));
  color: var(--text);
  cursor: pointer;
  font-family: "PackScapeBody", monospace;
}

.dialog-pack-btn:hover {
  border-color: var(--gold-bright);
}

.dialog-pack-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dialog-pack-btn-main {
  font-family: "PackScapeTitle", monospace;
  font-size: 11px;
}

.dialog-pack-btn-sub {
  font-size: 18px;
  color: var(--gold-bright);
}

.dialog-pack-hint {
  font-family: "PackScapeBody", monospace;
  font-size: 20px;
  color: rgba(174, 152, 124, 0.86);
}

.dialog-draft {
  width: min(1120px, 97vw);
  max-height: min(760px, 88vh);
}

.dialog-draft-preparing {
  width: min(440px, 94vw);
}

.dialog-draft-body {
  padding: 0 16px 16px;
  gap: 0;
}

.draft-board {
  position: relative;
  width: min(100%, 1084px);
  min-height: min(626px, calc(88vh - 120px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 10px 16px 18px;
  border-radius: 20px;
  border: 2px solid rgba(136, 102, 66, 0.98);
  background: rgba(26, 18, 13, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(245, 225, 183, 0.06),
    0 18px 28px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  justify-self: center;
}

.draft-board::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  border: 1px solid rgba(236, 204, 142, 0.12);
}

.draft-board::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 6px;
  height: 22%;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, rgba(122, 176, 228, 0.12), transparent 82%);
  pointer-events: none;
}

.draft-board-copy,
.draft-board-rule,
.draft-grid {
  position: relative;
  z-index: 1;
}

.draft-board-copy {
  padding-top: 8px;
  text-align: center;
  font-family: "PackScapeBody", monospace;
  font-size: 20px;
  color: rgba(215, 190, 150, 0.96);
}

.draft-board-rule {
  width: calc(100% - 20px);
  height: 1px;
  justify-self: center;
  background: linear-gradient(90deg, rgba(188, 214, 238, 0.08), rgba(188, 214, 238, 0.62), rgba(188, 214, 238, 0.08));
}

.draft-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  min-height: 0;
}

.draft-grid.is-spreading .draft-choice {
  pointer-events: none;
}

.draft-choice {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  min-width: 0;
  min-height: 0;
  display: block;
  outline: none;
}

.draft-choice:disabled {
  cursor: default;
}

.draft-choice-shell {
  display: grid;
  padding: 8px;
  border-radius: 14px;
  border: 2px solid rgb(120, 92, 62);
  background: rgba(42, 28, 20, 1);
  box-shadow: inset 0 0 0 1px rgba(246, 218, 162, 0.06);
}

.draft-choice.is-spreading .draft-choice-shell {
  animation: draft-card-spread 1260ms cubic-bezier(0.22, 0.8, 0.22, 1) both;
}

.draft-choice.is-ready .draft-choice-shell {
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.draft-choice.is-ready:hover .draft-choice-shell,
.draft-choice.is-ready:focus-visible .draft-choice-shell {
  transform: translateY(-6px);
  border-color: rgb(214, 170, 98);
  box-shadow:
    inset 0 0 0 1px rgba(246, 218, 162, 0.12),
    0 16px 24px rgba(0, 0, 0, 0.32);
}

.draft-choice.is-ready:hover .template-card,
.draft-choice.is-ready:focus-visible .template-card {
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.42));
}

.opening-stage {
  min-height: 404px;
  width: 100%;
  display: grid;
  place-items: center;
}

.opening-stage-arena,
.reveal-stage-arena {
  position: relative;
  width: min(calc(100% - 40px), 640px);
  height: min(640px, calc(100vh - 280px));
  border-radius: 14px;
  background: rgba(14, 10, 8, 0.96);
  overflow: hidden;
  justify-self: center;
}

.opening-stage-arena {
  display: grid;
  place-items: center;
}

.opening-pack-scene {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
}

.opening-pack-main {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  margin-top: -28px;
  animation: opening-pack-shake 1.32s linear both;
}

.opening-pack {
  width: min(272px, 54vw);
  max-height: 286px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.35));
}

.opening-pack-body-frame {
  position: relative;
  width: min(272px, 54vw);
  height: 286px;
  overflow: hidden;
  z-index: 2;
  clip-path: inset(13.8% 0 0 0);
}

.opening-pack-body {
  position: relative;
  z-index: 2;
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.opening-pack-back {
  position: absolute;
  width: min(272px, 54vw);
  max-height: 286px;
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% + var(--depth) * -4px), calc(-50% + var(--depth) * 4px)) scale(calc(1 - var(--depth) * 0.014));
  opacity: calc(0.82 - var(--depth) * 0.18);
}

.opening-pack-top-strip {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(208px, 41vw);
  height: 13.8%;
  transform: translateX(-50%);
  overflow: hidden;
  animation: opening-strip-tear 1.32s cubic-bezier(0.22, 0.8, 0.22, 1) both;
  z-index: 3;
}

.opening-pack-top-strip .opening-pack {
  width: 100%;
  max-height: none;
  object-fit: fill;
  transform: translateY(0);
}

.opening-pack-peek-window {
  position: absolute;
  left: 50%;
  top: -2%;
  width: 58%;
  height: 46%;
  transform: translateX(-50%);
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.opening-peek-card {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 1;
  width: 160px;
  aspect-ratio: 128 / 189;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.3));
  animation: opening-peek-rise 1.32s cubic-bezier(0.22, 0.8, 0.22, 1) both;
  transform: translateX(-50%);
}

.opening-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reveal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.reveal-card {
  min-height: 180px;
}

.reveal-stage {
  display: grid;
  gap: 12px;
  justify-items: center;
  width: 100%;
}

.reveal-stage-arena {
  display: grid;
  place-items: center;
}

.reveal-stack {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reveal-back-card {
  position: absolute;
  width: 208px;
  aspect-ratio: 128 / 189;
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% - 2px), calc(-50% + 4px)) scale(0.988);
  opacity: 0.92;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.22));
}

.template-card {
  position: relative;
  width: 208px;
  height: 265px;
  background: var(--template-url) center / 100% 100% no-repeat;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.35));
}

.template-card.is-reveal {
  animation: reveal-float 2s ease-in-out infinite;
  will-change: transform;
  transform: translateZ(0);
}

.template-card.is-card-back {
  display: grid;
  place-items: center;
  background: transparent;
}

.template-card-backface {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.35));
}

.reveal-flip-card {
  position: relative;
  width: 208px;
  height: 265px;
  perspective: 1200px;
}

.reveal-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.reveal-flip-inner.is-flipping {
  animation: reveal-card-flip 660ms cubic-bezier(0.22, 0.8, 0.22, 1) both;
}

.reveal-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}

.reveal-face-front {
  transform: rotateY(180deg);
}

.template-card-shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}

.template-card-shine::before {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  width: 22%;
  left: -35%;
  background: rgba(255, 248, 218, 0.28);
  clip-path: polygon(0 0, 50% 0, 100% 100%, 50% 100%);
  transform: skewX(-10deg);
  animation: card-shine-sweep 740ms ease-out both;
}

.template-card.is-draft {
  width: 100%;
  max-width: 196px;
  height: auto;
  aspect-ratio: 128 / 189;
  justify-self: center;
  transition: filter 160ms ease;
}

.template-card-art {
  position: absolute;
  left: 15%;
  top: 11%;
  width: 70%;
  height: 43%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.template-card-name {
  position: absolute;
  left: 11%;
  top: 69.5%;
  width: 78%;
  height: 16%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0;
  padding: 0 4px 2px;
  text-align: center;
  z-index: 2;
  overflow: hidden;
}

.template-card-name span {
  font-family: "PackScapeTitle", monospace;
  font-size: 9px;
  line-height: 0.9;
  color: #f5eacc;
  text-shadow:
    -1px 0 #14100c,
    1px 0 #14100c,
    0 -1px #14100c,
    0 1px #14100c;
}

.template-card-name.is-compact span {
  font-size: 8px;
  line-height: 0.86;
}

.reveal-meta {
  display: grid;
  gap: 14px;
}

.reveal-footer {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.reveal-footer-pill {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(226, 194, 132, 0.66);
  background: rgba(66, 44, 28, 0.92);
  font-family: "PackScapeTitle", monospace;
  font-size: 10px;
  line-height: 1;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(246, 218, 162, 0.08);
}

.reveal-footer-sub {
  font-size: 20px;
  line-height: 1;
  color: var(--text-dim);
}

@keyframes reveal-float {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(0, -1px, 0);
  }
  50% {
    transform: translate3d(0, -4px, 0);
  }
  75% {
    transform: translate3d(0, -1px, 0);
  }
}

@keyframes opening-pack-shake {
  0% {
    transform: translateY(0px);
  }
  20% {
    transform: translate(2px, -2px);
  }
  32% {
    transform: translate(-3px, 2px);
  }
  44% {
    transform: translate(4px, -1px);
  }
  58% {
    transform: translate(-2px, 1px);
  }
  70% {
    transform: translate(0px, 0px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes opening-peek-rise {
  0%, 54% {
    transform: translateX(-50%) translateY(90px);
    opacity: 0;
  }
  72% {
    transform: translateX(-50%) translateY(-122px);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-144px);
    opacity: 1;
  }
}

@keyframes opening-strip-tear {
  0%, 26% {
    transform: translateX(-50%) translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-58px) rotate(-12deg) scale(1.01);
    opacity: 1;
  }
}

@keyframes reveal-card-flip {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(180deg);
  }
}

@keyframes card-shine-sweep {
  0% {
    left: -35%;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    left: 118%;
    opacity: 0;
  }
}

@keyframes draft-card-spread {
  0% {
    transform: translate(var(--draft-from-x), var(--draft-from-y)) scale(0.9) rotate(var(--draft-tilt));
    opacity: 0.82;
  }

  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes opening-pulse {
  0%, 100% {
    transform: scale(0.96);
    opacity: 0.74;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

.pill-btn {
  font-size: 9px;
  padding: 11px 14px;
}

.inline-link {
  color: var(--gold-bright);
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: center;
    height: auto;
  }

  .currency {
    justify-content: center;
  }

  .main-grid,
  .tasks-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .packs-grid,
  .collections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .report-grid > .stack {
    grid-template-rows: auto auto auto;
  }

  .report-progress-head {
    display: grid;
    gap: 4px;
  }

  .report-progress-summary {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 14px 12px 16px;
  }

  .title-plate {
    min-width: 0;
    width: 100%;
    padding-inline: 16px;
  }

  .report-search-wrap {
    grid-template-columns: 1fr;
  }

  .report-actions {
    justify-content: flex-start;
  }

  .report-detail-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .report-detail-copy {
    width: 100%;
  }

  .topbar-nav {
    flex-wrap: wrap;
  }

  .save-slot {
    grid-template-columns: 10px 56px 1fr;
  }

  .slot-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .avatar-picker-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .avatar-picker-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dialog-pack-hero,
  .dialog-pack-actions,
  .reveal-stage {
    grid-template-columns: 1fr;
  }

  .draft-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .draft-board {
    min-height: auto;
  }

  .reveal-stack {
    min-height: 420px;
  }
}
