:root {
  --bg: #090b12;
  --bg-deep: #05060a;
  --surface: rgba(20, 23, 35, 0.92);
  --surface-2: #181c29;
  --surface-3: #202536;
  --surface-glass: rgba(23, 27, 41, 0.76);
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f5f7ff;
  --muted: #9aa2ba;
  --faint: #6c748a;
  --accent: #8b5cf6;
  --accent-rgb: 139, 92, 246;
  --accent-2: #c084fc;
  --good: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --info: #38bdf8;
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
  --topbar: 64px;
  --nav: 74px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

body[data-accent="blue"] {
  --accent: #0ea5e9;
  --accent-rgb: 14, 165, 233;
  --accent-2: #67e8f9;
}

body[data-accent="green"] {
  --accent: #22c55e;
  --accent-rgb: 34, 197, 94;
  --accent-2: #a3e635;
}

body[data-accent="ember"] {
  --accent: #f97316;
  --accent-rgb: 249, 115, 22;
  --accent-2: #facc15;
}

body[data-theme="light"] {
  --bg: #f4f5fb;
  --bg-deep: #e8eaf3;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-2: #ffffff;
  --surface-3: #eef0f7;
  --surface-glass: rgba(255, 255, 255, 0.83);
  --line: rgba(31, 38, 59, 0.09);
  --line-strong: rgba(31, 38, 59, 0.16);
  --text: #161a28;
  --muted: #5f6679;
  --faint: #8a91a3;
  --shadow: 0 18px 55px rgba(52, 52, 80, 0.13);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: var(--bg-deep);
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 40% -20%, rgba(var(--accent-rgb), .13), transparent 42%),
    linear-gradient(180deg, var(--bg-deep), var(--bg));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  transition: color .35s ease, background-color .35s ease;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.app-shell {
  position: relative;
  width: min(100%, 680px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .08;
  pointer-events: none;
  background: var(--accent);
}

.ambient-one {
  top: 8%;
  right: -120px;
}

.ambient-two {
  bottom: 4%;
  left: -160px;
  background: var(--accent-2);
}

.topbar {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 50%;
  display: flex;
  width: min(100%, 680px);
  height: calc(var(--topbar) + env(safe-area-inset-top));
  padding: calc(9px + env(safe-area-inset-top)) 18px 9px;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 81%, transparent);
  backdrop-filter: blur(22px) saturate(150%);
}

.brand-button {
  display: flex;
  padding: 0;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: transparent;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), .6);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 24px rgba(var(--accent-rgb), .24);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
}

.brand-mark::before {
  width: 120%;
  height: 7px;
  background: var(--bg-deep);
  transform: rotate(-12deg);
}

.brand-mark::after {
  width: 11px;
  height: 11px;
  border: 3px solid var(--bg-deep);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
}

.brand-mark span {
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: inherit;
}

.brand-type {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.45px;
}

.brand-type b {
  color: var(--accent-2);
  font-weight: 850;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.format-pill,
.icon-button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface-glass);
}

.format-pill {
  padding: 0 12px;
  gap: 7px;
  border-radius: 99px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .35px;
}

.format-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .1);
  animation: pulse 2.2s infinite;
}

.icon-button {
  width: 38px;
  padding: 0;
  border-radius: 50%;
}

.icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-view {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--topbar) + env(safe-area-inset-top) + 16px) 16px calc(var(--nav) + env(safe-area-inset-bottom) + 26px);
}

.app-view.view-enter {
  animation: view-in .34s var(--ease) both;
}

.page-head {
  display: flex;
  margin: 5px 2px 18px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 6px;
  align-items: center;
  gap: 7px;
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.25px;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 16px;
  height: 1px;
  content: "";
  background: currentColor;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 5px;
  font-size: clamp(29px, 8vw, 40px);
  line-height: 1.02;
  letter-spacing: -1.25px;
}

h2 {
  margin-bottom: 5px;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: -.65px;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
  letter-spacing: -.25px;
}

p {
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.faint {
  color: var(--faint);
}

.tiny {
  font-size: 11px;
}

.small {
  font-size: 13px;
}

.strong {
  color: var(--text);
  font-weight: 700;
}

.section {
  margin-top: 25px;
}

.section-head {
  display: flex;
  margin: 0 2px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
}

.text-button {
  padding: 6px 0;
  color: var(--accent-2);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.card,
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card {
  border-radius: var(--radius);
}

.panel {
  padding: 18px;
  border-radius: var(--radius);
}

.hero {
  position: relative;
  min-height: 285px;
  padding: 24px 20px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), .28);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 25%, rgba(var(--accent-rgb), .36), transparent 35%),
    linear-gradient(145deg, rgba(var(--accent-rgb), .17), var(--surface) 54%);
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  right: -35px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  content: "";
  border: 1px solid rgba(var(--accent-rgb), .18);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(var(--accent-rgb), .045),
    0 0 0 58px rgba(var(--accent-rgb), .025);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 65%;
}

.hero h1 {
  max-width: 310px;
  margin: 5px 0 10px;
}

.hero h1 span {
  color: var(--accent-2);
}

.hero p {
  max-width: 320px;
  margin-bottom: 19px;
  font-size: 13px;
}

.hero-art {
  position: absolute;
  z-index: 1;
  right: -19px;
  bottom: -30px;
  width: 43%;
  max-width: 190px;
  transform: rotate(8deg);
  filter: drop-shadow(0 23px 25px rgba(0, 0, 0, .55));
  animation: card-float 5s ease-in-out infinite;
}

.hero-art img {
  display: block;
  width: 100%;
  aspect-ratio: 0.718;
  border-radius: 7% / 5%;
  object-fit: cover;
  background: var(--surface-3);
}

.hero-stats {
  position: absolute;
  z-index: 3;
  right: 15px;
  top: 18px;
  display: grid;
  gap: 6px;
}

.mini-stat {
  min-width: 66px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: rgba(8, 10, 17, .73);
  backdrop-filter: blur(10px);
}

body[data-theme="light"] .mini-stat {
  background: rgba(255, 255, 255, .82);
}

.mini-stat strong,
.mini-stat small {
  display: block;
}

.mini-stat strong {
  font-size: 14px;
}

.mini-stat small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .75px;
  text-transform: uppercase;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  min-height: 44px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 760;
  transition: transform .2s var(--ease), filter .2s ease, border-color .2s ease;
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.danger-button:active {
  transform: scale(.97);
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 68%, #fff));
  box-shadow: 0 10px 28px rgba(var(--accent-rgb), .25);
}

.primary-button svg,
.secondary-button svg,
.ghost-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
}

.danger-button {
  border: 1px solid rgba(251, 113, 133, .25);
  color: var(--danger);
  background: rgba(251, 113, 133, .1);
}

.full-button {
  width: 100%;
}

.button-badge {
  padding: 2px 6px;
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, .16);
  font-size: 9px;
}

.dashboard-strip {
  display: grid;
  margin-top: 13px;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.dashboard-metric {
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-glass);
}

.dashboard-metric strong,
.dashboard-metric span {
  display: block;
}

.dashboard-metric strong {
  margin-bottom: 2px;
  font-size: 17px;
}

.dashboard-metric span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.quick-card {
  position: relative;
  min-height: 112px;
  padding: 15px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: var(--surface);
}

.quick-card::after {
  position: absolute;
  right: -20px;
  bottom: -35px;
  width: 90px;
  height: 90px;
  content: "";
  border-radius: 50%;
  background: rgba(var(--accent-rgb), .1);
}

.quick-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 11px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .12);
}

.quick-icon svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-card strong,
.quick-card small {
  position: relative;
  z-index: 1;
  display: block;
}

.quick-card strong {
  font-size: 13px;
}

.quick-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.horizontal-scroll {
  display: grid;
  margin: 0 -16px;
  padding: 2px 16px 16px;
  grid-auto-columns: minmax(250px, 78%);
  grid-auto-flow: column;
  gap: 11px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.deck-card {
  position: relative;
  min-height: 174px;
  padding: 17px;
  overflow: hidden;
  scroll-snap-align: start;
  text-align: left;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 21px;
  background:
    radial-gradient(circle at 92% 17%, color-mix(in srgb, var(--deck-accent) 30%, transparent), transparent 37%),
    var(--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.deck-card-art {
  position: absolute;
  right: -1px;
  bottom: -27px;
  width: 112px;
  transform: rotate(7deg);
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .55));
}

.deck-card-art img {
  width: 100%;
  aspect-ratio: .718;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-3);
}

.deck-card-copy {
  position: relative;
  z-index: 2;
  width: calc(100% - 86px);
}

.centerpiece-label {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: color-mix(in srgb, var(--deck-accent) 72%, var(--text));
  font-size: 8px;
  font-weight: 780;
  letter-spacing: .25px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  min-height: 23px;
  padding: 0 8px;
  align-items: center;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--deck-accent, var(--accent)) 40%, transparent);
  border-radius: 99px;
  color: color-mix(in srgb, var(--deck-accent, var(--accent)) 72%, #fff);
  background: color-mix(in srgb, var(--deck-accent, var(--accent)) 10%, transparent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .45px;
  text-transform: uppercase;
}

.deck-card h3 {
  margin: 10px 0 5px;
  font-size: 17px;
  line-height: 1.12;
}

.deck-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 10px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.deck-mini-metrics {
  display: flex;
  margin-top: 12px;
  gap: 11px;
  color: var(--muted);
  font-size: 10px;
}

.deck-mini-metrics strong {
  color: var(--text);
}

.format-card {
  display: grid;
  padding: 17px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
}

.format-ring {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(52, 211, 153, .24);
  border-radius: 50%;
  color: var(--good);
  background: rgba(52, 211, 153, .09);
  font-size: 12px;
  font-weight: 850;
}

.format-copy strong,
.format-copy small {
  display: block;
}

.format-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.chevron {
  color: var(--faint);
  font-size: 22px;
}

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

.feature-chip {
  display: flex;
  min-height: 48px;
  padding: 10px 11px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface-glass);
  font-size: 11px;
}

.feature-chip i {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .12);
  font-style: normal;
  font-size: 12px;
}

.form-panel {
  padding: 18px;
}

.field {
  margin-bottom: 21px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-label {
  display: flex;
  margin-bottom: 9px;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 12px;
  font-weight: 730;
}

.field-label span:last-child {
  color: var(--accent-2);
  font-size: 11px;
}

.segmented {
  display: grid;
  padding: 4px;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-deep);
}

.segmented.two {
  grid-template-columns: repeat(2, 1fr);
}

.segmented.four {
  grid-template-columns: repeat(4, 1fr);
}

.segment {
  min-height: 37px;
  padding: 0 7px;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.segment.active {
  color: var(--text);
  background: var(--surface-3);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}

.select,
.search-input,
.text-input,
.import-area {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  background: var(--bg-deep);
}

.select,
.text-input {
  height: 46px;
  padding: 0 13px;
}

.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.range-wrap {
  display: grid;
  grid-template-columns: 1fr 54px;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  width: 100%;
  height: 5px;
  appearance: none;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) var(--range, 50%), var(--surface-3) var(--range, 50%));
}

input[type="range"]::-webkit-slider-thumb {
  width: 21px;
  height: 21px;
  appearance: none;
  border: 4px solid var(--surface-2);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.range-value {
  display: grid;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .09);
  font-size: 12px;
  font-weight: 800;
}

.toggle-row {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
}

.toggle-row:first-child {
  border-top: 0;
}

.toggle-copy strong,
.toggle-copy small {
  display: block;
}

.toggle-copy strong {
  font-size: 12px;
}

.toggle-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.switch {
  position: relative;
  width: 45px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: var(--surface-3);
  transition: background .25s ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  content: "";
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .3);
  transition: transform .25s var(--ease);
}

.switch.on {
  background: var(--accent);
}

.switch.on::after {
  transform: translateX(20px);
}

.forge-note {
  display: flex;
  margin: 12px 0 17px;
  padding: 12px;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid rgba(56, 189, 248, .18);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(56, 189, 248, .07);
  font-size: 10px;
}

.forge-note i {
  color: var(--info);
  font-style: normal;
}

.generator-button {
  position: relative;
  min-height: 55px;
  overflow: hidden;
  font-size: 14px;
}

.generator-button::before {
  position: absolute;
  top: -90%;
  left: -25%;
  width: 35%;
  height: 280%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: rotate(25deg);
  animation: shine 3.5s infinite;
}

.search-bar {
  position: relative;
  margin-bottom: 13px;
}

.search-input {
  height: 47px;
  padding: 0 42px 0 42px;
}

.search-bar svg {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}

.search-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
}

.filter-scroll {
  display: flex;
  margin: 0 -16px 15px;
  padding: 0 16px 3px;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  height: 34px;
  padding: 0 12px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 700;
}

.filter-chip.active {
  border-color: rgba(var(--accent-rgb), .45);
  color: var(--text);
  background: rgba(var(--accent-rgb), .13);
}

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

.meta-card {
  position: relative;
  min-height: 242px;
  padding: 13px;
  overflow: hidden;
  text-align: left;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 70% 5%, color-mix(in srgb, var(--deck-accent) 18%, transparent), transparent 43%),
    var(--surface);
}

.meta-art {
  display: flex;
  height: 114px;
  margin-bottom: 12px;
  align-items: flex-end;
  justify-content: center;
}

.meta-art img {
  width: 79px;
  max-height: 112px;
  border-radius: 6px;
  object-fit: cover;
  transform: rotate(3deg);
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .45));
}

.meta-card h3 {
  margin-bottom: 3px;
  font-size: 13px;
  line-height: 1.15;
}

.meta-card p {
  margin-bottom: 10px;
  font-size: 9px;
}

.meta-card-stats {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.meta-card-stats strong {
  display: block;
  color: var(--text);
  font-size: 11px;
}

.sort-row {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sort-row > span {
  color: var(--muted);
  font-size: 10px;
}

.mini-select {
  height: 34px;
  padding: 0 29px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background-color: var(--surface);
  font-size: 10px;
}

.deck-hero {
  position: relative;
  min-height: 246px;
  margin: 0 -16px;
  padding: 25px 18px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 30%, color-mix(in srgb, var(--deck-accent) 35%, transparent), transparent 35%),
    linear-gradient(180deg, color-mix(in srgb, var(--deck-accent) 12%, transparent), transparent);
}

.deck-hero::after {
  position: absolute;
  right: -50px;
  bottom: -90px;
  width: 250px;
  height: 250px;
  content: "";
  border: 1px solid color-mix(in srgb, var(--deck-accent) 20%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 35px color-mix(in srgb, var(--deck-accent) 4%, transparent);
}

.deck-hero-copy {
  position: relative;
  z-index: 3;
  width: 60%;
}

.deck-hero h1 {
  margin: 8px 0 8px;
  font-size: 30px;
}

.deck-hero p {
  display: -webkit-box;
  margin-bottom: 15px;
  overflow: hidden;
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.deck-hero-art {
  position: absolute;
  z-index: 2;
  right: 13px;
  bottom: -17px;
  width: 132px;
  transform: rotate(6deg);
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .55));
}

.deck-hero-art img {
  width: 100%;
  border-radius: 8px;
  background: var(--surface-3);
}

.deck-total {
  display: inline-flex;
  height: 30px;
  padding: 0 10px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--muted);
  background: var(--surface-glass);
  font-size: 10px;
  font-weight: 700;
}

.deck-total strong {
  color: var(--text);
}

.deck-total.invalid {
  border-color: rgba(251, 113, 133, .4);
  color: var(--danger);
}

.deck-actions {
  display: grid;
  margin: 0 0 14px;
  grid-template-columns: 1fr 1fr 46px;
  gap: 8px;
}

.deck-actions button {
  padding-left: 8px;
  padding-right: 8px;
}

.tab-scroll {
  position: sticky;
  z-index: 20;
  top: calc(var(--topbar) + env(safe-area-inset-top) - 1px);
  display: flex;
  margin: 0 -16px 14px;
  padding: 8px 16px;
  gap: 5px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 87%, transparent);
  backdrop-filter: blur(18px);
  scrollbar-width: none;
}

.tab-scroll::-webkit-scrollbar {
  display: none;
}

.tab {
  height: 34px;
  padding: 0 12px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 730;
}

.tab.active {
  color: var(--text);
  background: var(--surface-3);
}

.validation-banner {
  display: flex;
  margin-bottom: 11px;
  padding: 12px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(52, 211, 153, .2);
  border-radius: 14px;
  background: rgba(52, 211, 153, .08);
}

.validation-banner.invalid {
  border-color: rgba(251, 113, 133, .2);
  background: rgba(251, 113, 133, .08);
}

.validation-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--good);
  background: rgba(52, 211, 153, .12);
  font-weight: 850;
}

.validation-banner.invalid .validation-icon {
  color: var(--danger);
  background: rgba(251, 113, 133, .12);
}

.validation-copy strong,
.validation-copy small {
  display: block;
}

.validation-copy strong {
  font-size: 11px;
}

.validation-copy small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.category-block {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.category-head {
  display: flex;
  height: 44px;
  padding: 0 13px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 760;
}

.category-count {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.card-row {
  display: grid;
  min-height: 62px;
  padding: 7px 9px;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.card-row:last-child {
  border-bottom: 0;
}

.card-thumb {
  position: relative;
  width: 35px;
  height: 49px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .08), transparent 70%),
    var(--surface-3);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity .25s ease;
}

.card-thumb img.loaded {
  opacity: 1;
}

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

.card-row-copy strong,
.card-row-copy small {
  display: block;
}

.card-row-copy strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-row-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count-stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-deep);
}

.count-stepper button {
  display: grid;
  width: 28px;
  height: 31px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  font-size: 17px;
}

.count-stepper strong {
  width: 23px;
  text-align: center;
  font-size: 11px;
}

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

.gallery-card {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 9px;
  background: var(--surface-3);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .25);
  aspect-ratio: .718;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity .3s ease, transform .3s var(--ease);
}

.gallery-card img.loaded {
  opacity: 1;
}

.gallery-card:active img {
  transform: scale(.97);
}

.gallery-count {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 850;
}

.guide-hero {
  padding: 18px;
  border-left: 3px solid var(--deck-accent, var(--accent));
}

.guide-hero p {
  margin: 0;
  font-size: 12px;
}

.timeline {
  position: relative;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 13px;
  width: 1px;
  content: "";
  background: var(--line-strong);
}

.timeline li {
  position: relative;
  display: grid;
  min-height: 52px;
  padding-bottom: 12px;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline i {
  position: relative;
  z-index: 1;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .35);
  border-radius: 50%;
  color: var(--accent-2);
  background: var(--surface-2);
  font-style: normal;
  font-size: 9px;
  font-weight: 850;
}

.sequence-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sequence-list li {
  display: flex;
  padding: 10px 0;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.sequence-list li:last-child {
  border-bottom: 0;
}

.sequence-list li::before {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  content: "✓";
  border-radius: 7px;
  color: var(--good);
  background: rgba(52, 211, 153, .1);
  font-size: 10px;
  font-weight: 800;
}

.matchup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.matchup-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.matchup-card.good {
  border-top-color: rgba(52, 211, 153, .45);
}

.matchup-card.bad {
  border-top-color: rgba(251, 113, 133, .45);
}

.matchup-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
}

.matchup-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

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

.score-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.score-top {
  display: flex;
  margin-bottom: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.score-top strong {
  color: var(--text);
  font-size: 14px;
}

.bar {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.bar i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.analytics-summary {
  display: grid;
  margin-bottom: 10px;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.analytics-stat {
  padding: 13px 8px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.analytics-stat strong,
.analytics-stat span {
  display: block;
}

.analytics-stat strong {
  color: var(--accent-2);
  font-size: 17px;
}

.analytics-stat span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.hand-grid {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.hand-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-3);
  aspect-ratio: .718;
}

.hand-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hand-card small {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 12px 4px 4px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-row {
  display: grid;
  margin-top: 10px;
  grid-template-columns: 72px 1fr 34px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
}

.distribution-row strong {
  color: var(--text);
  text-align: right;
  font-size: 10px;
}

.progress-wrap {
  margin-bottom: 16px;
}

.progress-copy {
  display: flex;
  margin-bottom: 7px;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.progress-copy span {
  color: var(--muted);
}

.progress-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.progress-bar i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--good));
  transition: width .35s var(--ease);
}

.check-row {
  display: grid;
  min-height: 58px;
  padding: 7px 3px;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.check-row:last-child {
  border-bottom: 0;
}

.owned-step {
  display: flex;
  align-items: center;
  gap: 4px;
}

.owned-step button {
  display: grid;
  width: 26px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-3);
}

.owned-step strong {
  width: 21px;
  text-align: center;
  font-size: 10px;
}

.complete-row {
  opacity: .58;
}

.complete-row .card-row-copy strong {
  text-decoration: line-through;
}

.tool-tabs {
  display: grid;
  margin-bottom: 14px;
  padding: 4px;
  grid-auto-columns: minmax(74px, 1fr);
  grid-auto-flow: column;
  gap: 3px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-deep);
  scrollbar-width: none;
}

.tool-tabs::-webkit-scrollbar {
  display: none;
}

.tool-tab {
  min-height: 38px;
  padding: 0 4px;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  font-weight: 730;
}

.tool-tab.active {
  color: var(--text);
  background: var(--surface-3);
}

.import-area {
  min-height: 180px;
  padding: 13px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.55;
}

.result-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.result-list li {
  display: flex;
  padding: 8px 0;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.result-list li:last-child {
  border-bottom: 0;
}

.result-list i {
  font-style: normal;
}

.result-list .pass i {
  color: var(--good);
}

.result-list .fail i {
  color: var(--danger);
}

.result-list .warn i {
  color: var(--warn);
}

.compare-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.compare-table {
  width: 100%;
  margin-top: 13px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 10px 5px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 10px;
}

.compare-table th:first-child,
.compare-table td:first-child {
  color: var(--muted);
  text-align: left;
}

.compare-table th {
  overflow: hidden;
  max-width: 110px;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner {
  color: var(--good);
  font-weight: 800;
}

.library-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.library-row {
  display: grid;
  min-height: 62px;
  padding: 7px 9px;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.library-row:last-child {
  border-bottom: 0;
}

.add-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .25);
  border-radius: 11px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .09);
  font-size: 18px;
}

.settings-group {
  margin-bottom: 13px;
  padding: 5px 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.accent-picker {
  display: flex;
  gap: 8px;
}

.accent-dot {
  width: 29px;
  height: 29px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.accent-dot.active {
  box-shadow: 0 0 0 2px var(--text);
}

.empty-state {
  padding: 34px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
}

.empty-state i {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 16px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .1);
  font-style: normal;
  font-size: 21px;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.source-note {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--faint);
  background: var(--surface-glass);
  font-size: 9px;
}

.source-note a {
  color: var(--accent-2);
}

.bottom-nav {
  position: fixed;
  z-index: 60;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, 680px);
  height: calc(var(--nav) + env(safe-area-inset-bottom));
  padding: 7px 9px calc(7px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(24px) saturate(155%);
}

.nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  border-radius: 13px;
  color: var(--faint);
  background: transparent;
  font-size: 8px;
  font-weight: 700;
  transition: color .2s ease, background .2s ease, transform .2s var(--ease);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active {
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .09);
}

.nav-item.active::before {
  position: absolute;
  top: 2px;
  width: 22px;
  height: 2px;
  content: "";
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent);
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  visibility: hidden;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s ease, visibility .25s ease;
}

.modal.open {
  visibility: visible;
  opacity: 1;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(5px);
}

.modal-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  max-height: 91vh;
  max-height: 91dvh;
  padding: 10px 17px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 27px 27px 0 0;
  background: var(--surface-2);
  box-shadow: 0 -25px 70px rgba(0, 0, 0, .45);
  transform: translateY(105%);
  transition: transform .34s var(--ease);
}

.modal.open .modal-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: 99px;
  background: var(--line-strong);
}

.sheet-head {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 20px;
}

.close-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-3);
  font-size: 19px;
}

.card-modal-art {
  display: block;
  width: min(82%, 370px);
  margin: 0 auto 17px;
  border-radius: 12px;
  background: var(--surface-3);
  box-shadow: 0 22px 45px rgba(0, 0, 0, .4);
}

.card-modal-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.card-modal-meta div {
  padding: 11px 8px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.card-modal-meta strong,
.card-modal-meta small {
  display: block;
}

.card-modal-meta small {
  color: var(--muted);
  font-size: 8px;
}

.export-box {
  width: 100%;
  min-height: 330px;
  padding: 13px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: var(--bg-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.5;
}

.format-marks {
  display: grid;
  margin: 13px 0;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.format-mark {
  display: grid;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(52, 211, 153, .25);
  border-radius: 16px;
  color: var(--good);
  background: rgba(52, 211, 153, .08);
  font-size: 21px;
  font-weight: 900;
}

.toast {
  position: fixed;
  z-index: 150;
  right: 50%;
  bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 14px);
  display: flex;
  visibility: hidden;
  min-width: 170px;
  max-width: min(90%, 420px);
  min-height: 43px;
  padding: 10px 14px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  background: rgba(23, 27, 41, .96);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(50%, 10px);
  backdrop-filter: blur(15px);
  font-size: 11px;
  font-weight: 680;
  transition: opacity .22s ease, transform .22s var(--ease), visibility .22s ease;
}

.toast.show {
  visibility: visible;
  opacity: 1;
  transform: translate(50%, 0);
}

.splash {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(var(--accent-rgb), .17), transparent 35%),
    var(--bg-deep);
  transition: opacity .5s ease, visibility .5s ease;
}

.splash.hidden {
  visibility: hidden;
  opacity: 0;
}

.splash-orbit {
  position: relative;
  display: grid;
  width: 95px;
  height: 95px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .15);
  border-radius: 50%;
  animation: orbit 4s linear infinite;
}

.splash-orbit::after {
  position: absolute;
  top: 5px;
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 13px var(--accent);
}

.brand-mark--large {
  width: 59px;
  height: 59px;
}

.brand-mark--large::before {
  height: 10px;
}

.brand-mark--large::after {
  width: 17px;
  height: 17px;
  border-width: 4px;
}

.splash-copy {
  margin-top: 19px;
  text-align: center;
}

.splash-copy strong,
.splash-copy small {
  display: block;
}

.splash-copy strong {
  font-size: 22px;
  letter-spacing: -.5px;
}

.splash-copy em {
  color: var(--accent-2);
  font-style: normal;
}

.splash-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.thinking {
  padding: 21px 0 9px;
  text-align: center;
}

.thinking-orb {
  position: relative;
  width: 74px;
  height: 74px;
  margin: 0 auto 17px;
  border: 1px solid rgba(var(--accent-rgb), .25);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .3), transparent 65%);
  animation: orbit 2s linear infinite;
}

.thinking-orb::before,
.thinking-orb::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent);
}

.thinking-orb::before {
  top: 4px;
  left: 31px;
  width: 8px;
  height: 8px;
}

.thinking-orb::after {
  right: 4px;
  bottom: 15px;
  width: 5px;
  height: 5px;
}

.thinking-steps {
  margin: 15px 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.thinking-steps li {
  display: flex;
  padding: 9px 4px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.thinking-steps i {
  color: var(--good);
  font-style: normal;
}

.generated-result {
  padding: 15px;
  border: 1px solid rgba(var(--accent-rgb), .25);
  border-radius: 16px;
  background: rgba(var(--accent-rgb), .08);
}

.generated-result strong {
  color: var(--accent-2);
}

.generated-reasons {
  margin: 11px 0 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 10px;
}

.generated-reasons li {
  margin-top: 5px;
}

.synergy-quick {
  border-color: rgba(56, 189, 248, .25);
  background:
    radial-gradient(circle at 100% 100%, rgba(56, 189, 248, .16), transparent 54%),
    var(--surface);
}

.synergy-button {
  display: grid;
  min-height: 76px;
  margin-top: 10px;
  padding: 13px 15px;
  grid-template-columns: 38px 1fr;
  align-items: center;
  column-gap: 11px;
  text-align: left;
  border: 1px solid rgba(56, 189, 248, .27);
  border-radius: 17px;
  color: var(--text);
  background:
    radial-gradient(circle at 0 50%, rgba(56, 189, 248, .14), transparent 38%),
    var(--surface);
}

.synergy-button > span {
  display: grid;
  width: 38px;
  height: 38px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 12px;
  color: #7dd3fc;
  background: rgba(56, 189, 248, .12);
  font-size: 22px;
}

.synergy-button strong,
.synergy-button small {
  display: block;
}

.synergy-button strong {
  align-self: end;
  font-size: 13px;
}

.synergy-button small {
  align-self: start;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.set-preview-row,
.set-strip {
  display: grid;
  margin-right: -16px;
  margin-left: -16px;
  padding: 2px 16px 12px;
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.set-preview-row {
  grid-auto-columns: minmax(178px, 53%);
}

.set-strip {
  grid-auto-columns: minmax(210px, 64%);
  margin-bottom: 12px;
}

.set-preview-row::-webkit-scrollbar,
.set-strip::-webkit-scrollbar {
  display: none;
}

.set-preview {
  display: grid;
  min-height: 118px;
  padding: 13px;
  scroll-snap-align: start;
  align-content: end;
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--set-accent) 32%, var(--line));
  border-radius: 17px;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 0, color-mix(in srgb, var(--set-accent) 28%, transparent), transparent 50%),
    var(--surface);
}

.set-preview img {
  width: 105px;
  height: 43px;
  margin-bottom: 9px;
  object-fit: contain;
  object-position: left center;
}

.set-preview strong,
.set-preview small {
  display: block;
}

.set-preview strong {
  font-size: 12px;
}

.set-preview small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.collector-dashboard {
  display: grid;
  margin-bottom: 15px;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.collector-dashboard > div {
  padding: 11px 5px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-glass);
}

.collector-dashboard strong,
.collector-dashboard span {
  display: block;
}

.collector-dashboard strong {
  color: var(--accent-2);
  font-size: 16px;
}

.collector-dashboard span {
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.set-chip-card {
  display: grid;
  min-height: 65px;
  padding: 9px 11px;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  scroll-snap-align: start;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: var(--surface);
  opacity: .72;
}

.set-chip-card.active {
  border-color: color-mix(in srgb, var(--set-accent) 60%, white 8%);
  box-shadow: inset 0 0 24px color-mix(in srgb, var(--set-accent) 12%, transparent);
  opacity: 1;
}

.set-chip-card img {
  width: 62px;
  height: 40px;
  object-fit: contain;
}

.set-chip-card strong,
.set-chip-card small {
  display: block;
}

.set-chip-card strong {
  font-size: 10px;
}

.set-chip-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.set-hero {
  position: relative;
  display: grid;
  min-height: 182px;
  padding: 17px;
  grid-template-columns: 35% minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--set-accent) 40%, var(--line));
  border-radius: 24px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--set-accent-2) 20%, transparent), transparent 46%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--set-accent) 18%, transparent), transparent 44%),
    var(--surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .18);
}

.set-hero-logo {
  display: grid;
  min-height: 115px;
  padding: 10px;
  place-items: center;
  border-radius: 17px;
  background: rgba(255, 255, 255, .055);
}

.set-hero-logo img {
  width: 100%;
  max-height: 88px;
  object-fit: contain;
}

.set-hero-copy {
  min-width: 0;
}

.set-hero-copy h2 {
  margin: 8px 0 4px;
  font-size: 22px;
  line-height: 1.05;
}

.set-hero-copy p,
.set-hero-copy small {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
}

.status-pill {
  display: inline-flex;
  min-height: 23px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid rgba(52, 211, 153, .26);
  border-radius: 99px;
  color: var(--good);
  background: rgba(52, 211, 153, .09);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.status-pill.upcoming {
  border-color: rgba(251, 191, 36, .28);
  color: var(--warn);
  background: rgba(251, 191, 36, .09);
}

.collection-progress {
  height: 6px;
  margin: 13px 0 6px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.collection-progress span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--set-accent), var(--set-accent-2));
  transition: width .35s var(--ease);
}

.legality-note {
  display: grid;
  margin: 12px 0;
  padding: 11px;
  grid-template-columns: 27px 1fr;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(251, 191, 36, .2);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(251, 191, 36, .06);
  font-size: 9px;
}

.legality-note i {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  color: var(--warn);
  background: rgba(251, 191, 36, .11);
  font-style: normal;
}

.legality-note strong {
  color: var(--text);
}

.set-search {
  margin-top: 14px;
}

.set-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.set-card-tile {
  position: relative;
  min-width: 0;
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  transition: transform .2s var(--ease), border-color .2s ease, opacity .2s ease;
}

.set-card-tile.owned {
  border-color: rgba(52, 211, 153, .4);
}

.set-card-tile.favorite::before {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  display: grid;
  width: 23px;
  height: 23px;
  content: "★";
  place-items: center;
  border-radius: 50%;
  color: #fde047;
  background: rgba(9, 11, 18, .82);
  font-size: 12px;
}

.set-card-image {
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: .718;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-3);
}

.set-card-image img {
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity .22s ease, transform .25s var(--ease);
}

.set-card-image img.loaded {
  opacity: 1;
}

.set-card-tile:active {
  transform: scale(.98);
}

.set-card-tile.owned .set-card-image img {
  filter: saturate(1.04);
}

.set-card-meta {
  display: grid;
  min-height: 47px;
  padding: 8px 2px 1px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
}

.set-card-meta strong,
.set-card-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-card-meta strong {
  font-size: 9px;
}

.set-card-meta small {
  color: var(--muted);
  font-size: 8px;
}

.set-owned-toggle {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-3);
  font-size: 15px;
}

.set-owned-toggle.on {
  border-color: rgba(52, 211, 153, .35);
  color: var(--good);
  background: rgba(52, 211, 153, .1);
}

.load-more {
  margin-top: 13px;
}

.set-card-modal-art {
  width: min(280px, 82%);
  margin: 6px auto 15px;
  aspect-ratio: .718;
  overflow: hidden;
  border-radius: 15px;
  background: var(--surface-3);
  box-shadow: 0 22px 46px rgba(0, 0, 0, .45);
}

.set-card-modal-art img {
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity .25s ease;
}

.set-card-modal-art img.loaded {
  opacity: 1;
}

.set-modal-status {
  display: flex;
  margin-bottom: 13px;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
}

.toolkit-lead {
  background:
    radial-gradient(circle at 100% 0, rgba(var(--accent-rgb), .2), transparent 45%),
    var(--surface);
}

.toolkit-lead h2,
.update-hero h2 {
  margin: 8px 0 6px;
}

.update-hero {
  background:
    radial-gradient(circle at 100% 0, rgba(52, 211, 153, .15), transparent 45%),
    var(--surface);
}

.update-facts {
  display: grid;
  margin-top: 15px;
  gap: 7px;
}

.update-facts > div {
  display: grid;
  padding: 10px;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-glass);
}

.update-facts strong {
  color: var(--accent-2);
  font-size: 9px;
  text-transform: uppercase;
}

.update-facts span {
  color: var(--muted);
  font-size: 9px;
}

.update-prompt {
  min-height: 290px;
  margin-bottom: 10px;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% { opacity: 1; }
  50% { opacity: .45; }
}

@keyframes card-float {
  0%,
  100% { transform: rotate(8deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-8px); }
}

@keyframes shine {
  0% { left: -45%; }
  50%,
  100% { left: 125%; }
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

@media (min-width: 540px) {
  .quick-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .meta-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

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

@media (max-width: 365px) {
  .app-view {
    padding-right: 12px;
    padding-left: 12px;
  }

  .horizontal-scroll,
  .filter-scroll {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero-content {
    width: 70%;
  }

  .hero-art {
    right: -25px;
    width: 45%;
  }

  .hero-stats {
    display: none;
  }

  .deck-hero h1 {
    font-size: 26px;
  }

  .segmented.four {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottom-nav {
    padding-right: 5px;
    padding-left: 5px;
  }

  .nav-item {
    font-size: 7px;
  }

  .nav-item svg {
    width: 18px;
    height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}

.install-section {
  margin-top: 18px;
}

.install-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  padding: 14px;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), .26);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0 0, rgba(var(--accent-rgb), .2), transparent 50%),
    var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .15);
}

.install-card img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(var(--accent-rgb), .24);
}

.install-copy {
  min-width: 0;
}

.install-copy strong,
.install-copy small {
  display: block;
}

.install-copy strong {
  margin-top: 2px;
  font-size: 13px;
}

.install-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.install-button {
  min-height: 38px;
  padding-right: 14px;
  padding-left: 14px;
}

.instruction-list {
  display: grid;
  margin: 16px 0;
  padding-left: 26px;
  gap: 12px;
  color: var(--muted);
}

.instruction-list li {
  padding-left: 4px;
}

.instruction-list strong {
  color: var(--text);
}

.install-tip {
  display: grid;
  padding: 13px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}

.install-tip strong {
  color: var(--good);
  font-size: 11px;
}

.install-tip span {
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 430px) {
  .install-card {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .install-card img {
    width: 50px;
    height: 50px;
  }

  .install-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}
