:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #66706d;
  --line: #dbe2df;
  --paper: #fbfcf9;
  --panel: #ffffff;
  --accent: #216e61;
  --accent-2: #9f3f34;
  --accent-3: #c79a2f;
  --wash: #eef5f1;
  --topbar-bg: rgba(251, 252, 249, 0.92);
  --button-bg: #ffffff;
  --button-hover: #f4faf7;
  --input-bg: #ffffff;
  --detail-bg: #fbfcf9;
  --chip-bg: #f0f4f2;
  --modal-bg: #ffffff;
  --empty-bg: #ffffff;
  --dashboard-bg: linear-gradient(180deg, #f8fbf8 0%, #edf5f1 100%);
  --primary-bg: #123b34;
  --primary-hover: #174b42;
  --pill-bg: rgba(33, 110, 97, 0.1);
  --pill-border: rgba(33, 110, 97, 0.25);
  --pill-ink: #17332d;
  --special-pill-bg: rgba(255, 255, 255, 0.82);
  --special-pill-border: rgba(122, 79, 159, 0.3);
  --special-pill-ink: #271a33;
  --quantity-watermark: rgba(17, 24, 22, 0.28);
  --quantity-watermark-special: rgba(122, 79, 159, 0.38);
  --quantity-watermark-missing: rgba(17, 24, 22, 0.16);
  --shadow: 0 14px 40px rgba(27, 36, 33, 0.09);
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8f0ed;
  --muted: #a4b4af;
  --line: #32413c;
  --paper: #101715;
  --panel: #18221f;
  --accent: #62c7ad;
  --accent-2: #ec786e;
  --accent-3: #e2bf59;
  --wash: #23322e;
  --topbar-bg: rgba(16, 23, 21, 0.92);
  --button-bg: #1d2a26;
  --button-hover: #243731;
  --input-bg: #121b18;
  --detail-bg: #121b18;
  --chip-bg: #24342f;
  --modal-bg: #17211e;
  --empty-bg: #17211e;
  --dashboard-bg: linear-gradient(180deg, #17231f 0%, #101715 100%);
  --primary-bg: #2e8d79;
  --primary-hover: #36a88f;
  --pill-bg: rgba(98, 199, 173, 0.14);
  --pill-border: rgba(98, 199, 173, 0.28);
  --pill-ink: #e8f0ed;
  --special-pill-bg: rgba(232, 240, 237, 0.88);
  --special-pill-border: rgba(98, 199, 173, 0.42);
  --special-pill-ink: #10201c;
  --quantity-watermark: rgba(232, 240, 237, 0.34);
  --quantity-watermark-special: rgba(98, 199, 173, 0.42);
  --quantity-watermark-missing: rgba(232, 240, 237, 0.20);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

[data-theme="retro"] {
  --ink: #2b2418;
  --muted: #71664f;
  --line: #d7c49c;
  --paper: #f5e8c8;
  --panel: #fff7dc;
  --accent: #5f7f4f;
  --accent-2: #a0472d;
  --accent-3: #c18a2c;
  --wash: #ead9aa;
  --topbar-bg: rgba(245, 232, 200, 0.92);
  --button-bg: #fff7dc;
  --button-hover: #f0dfae;
  --input-bg: #fff7dc;
  --detail-bg: #fbefcb;
  --chip-bg: #efdfb0;
  --modal-bg: #fff7dc;
  --empty-bg: #fff7dc;
  --dashboard-bg: linear-gradient(180deg, #f8edcf 0%, #ead9aa 100%);
  --primary-bg: #5f7f4f;
  --primary-hover: #4e6d3f;
  --pill-bg: rgba(95, 127, 79, 0.16);
  --pill-border: rgba(95, 127, 79, 0.32);
  --pill-ink: #2b2418;
  --special-pill-bg: rgba(255, 247, 220, 0.86);
  --special-pill-border: rgba(160, 71, 45, 0.36);
  --special-pill-ink: #352313;
  --quantity-watermark: rgba(43, 36, 24, 0.30);
  --quantity-watermark-special: rgba(160, 71, 45, 0.40);
  --quantity-watermark-missing: rgba(43, 36, 24, 0.17);
}

[data-theme="neon"] {
  color-scheme: dark;
  --ink: #f4f7ff;
  --muted: #9db5d8;
  --line: #2c3a68;
  --paper: #070817;
  --panel: #11152a;
  --accent: #00e0ff;
  --accent-2: #ff4fd8;
  --accent-3: #f5ff5b;
  --wash: #1a2148;
  --topbar-bg: rgba(7, 8, 23, 0.92);
  --button-bg: #141a34;
  --button-hover: #1d2854;
  --input-bg: #0d1126;
  --detail-bg: #0d1126;
  --chip-bg: #1b2450;
  --modal-bg: #10152d;
  --empty-bg: #10152d;
  --dashboard-bg: linear-gradient(180deg, #101536 0%, #070817 100%);
  --primary-bg: #007a91;
  --primary-hover: #009fbd;
  --pill-bg: rgba(0, 224, 255, 0.14);
  --pill-border: rgba(0, 224, 255, 0.38);
  --pill-ink: #f4f7ff;
  --special-pill-bg: rgba(244, 247, 255, 0.9);
  --special-pill-border: rgba(255, 79, 216, 0.5);
  --special-pill-ink: #15112d;
  --quantity-watermark: rgba(0, 224, 255, 0.42);
  --quantity-watermark-special: rgba(255, 79, 216, 0.48);
  --quantity-watermark-missing: rgba(244, 247, 255, 0.22);
  --shadow: 0 20px 60px rgba(0, 224, 255, 0.14);
}

[data-theme="red"] {
  --ink: #251514;
  --muted: #7a5a55;
  --line: #e6c8c1;
  --paper: #fff7f4;
  --panel: #ffffff;
  --accent: #a93225;
  --accent-2: #7d1d17;
  --accent-3: #d78e42;
  --wash: #f6ded8;
  --topbar-bg: rgba(255, 247, 244, 0.92);
  --button-hover: #fff0eb;
  --dashboard-bg: linear-gradient(180deg, #fff4ef 0%, #f8ded6 100%);
  --primary-bg: #8f2a20;
  --primary-hover: #a93225;
  --pill-bg: rgba(169, 50, 37, 0.1);
  --pill-border: rgba(169, 50, 37, 0.26);
  --pill-ink: #251514;
  --special-pill-bg: rgba(255, 247, 244, 0.86);
  --special-pill-border: rgba(169, 50, 37, 0.38);
  --special-pill-ink: #3d1712;
  --quantity-watermark: rgba(143, 42, 32, 0.30);
  --quantity-watermark-special: rgba(169, 50, 37, 0.40);
  --quantity-watermark-missing: rgba(37, 21, 20, 0.17);
}

[data-theme="blue"] {
  --ink: #111b27;
  --muted: #536474;
  --line: #c8d9e8;
  --paper: #f4f9ff;
  --panel: #ffffff;
  --accent: #276ca3;
  --accent-2: #684fa0;
  --accent-3: #2f9a9a;
  --wash: #dfedf8;
  --topbar-bg: rgba(244, 249, 255, 0.92);
  --button-hover: #edf6ff;
  --dashboard-bg: linear-gradient(180deg, #f2f8ff 0%, #dfeef9 100%);
  --primary-bg: #1f5d8e;
  --primary-hover: #276ca3;
  --pill-bg: rgba(39, 108, 163, 0.1);
  --pill-border: rgba(39, 108, 163, 0.28);
  --pill-ink: #111b27;
  --special-pill-bg: rgba(244, 249, 255, 0.88);
  --special-pill-border: rgba(104, 79, 160, 0.38);
  --special-pill-ink: #181c38;
  --quantity-watermark: rgba(31, 93, 142, 0.30);
  --quantity-watermark-special: rgba(104, 79, 160, 0.40);
  --quantity-watermark-missing: rgba(17, 27, 39, 0.17);
}

[data-theme="black"] {
  color-scheme: dark;
  --ink: #f1eee8;
  --muted: #b4aca0;
  --line: #403b35;
  --paper: #11100e;
  --panel: #1c1915;
  --accent: #b79b64;
  --accent-2: #8c3630;
  --accent-3: #d1bd85;
  --wash: #2c2721;
  --topbar-bg: rgba(17, 16, 14, 0.92);
  --button-bg: #26221d;
  --button-hover: #332d26;
  --input-bg: #151310;
  --detail-bg: #151310;
  --chip-bg: #302a23;
  --modal-bg: #1c1915;
  --empty-bg: #1c1915;
  --dashboard-bg: linear-gradient(180deg, #211d18 0%, #11100e 100%);
  --primary-bg: #6e5731;
  --primary-hover: #8a6b3c;
  --pill-bg: rgba(183, 155, 100, 0.16);
  --pill-border: rgba(183, 155, 100, 0.34);
  --pill-ink: #f1eee8;
  --special-pill-bg: rgba(241, 238, 232, 0.9);
  --special-pill-border: rgba(183, 155, 100, 0.48);
  --special-pill-ink: #211910;
  --quantity-watermark: rgba(241, 238, 232, 0.38);
  --quantity-watermark-special: rgba(183, 155, 100, 0.46);
  --quantity-watermark-missing: rgba(241, 238, 232, 0.22);
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.34);
}

[data-theme="green"] {
  --ink: #122018;
  --muted: #536a5c;
  --line: #c6ddcf;
  --paper: #f4fbf6;
  --panel: #ffffff;
  --accent: #23784a;
  --accent-2: #8d3f31;
  --accent-3: #8aa43a;
  --wash: #dff0e5;
  --topbar-bg: rgba(244, 251, 246, 0.92);
  --button-hover: #ecf8ef;
  --dashboard-bg: linear-gradient(180deg, #f2fbf4 0%, #ddf0e3 100%);
  --primary-bg: #1f6c42;
  --primary-hover: #23784a;
  --pill-bg: rgba(35, 120, 74, 0.1);
  --pill-border: rgba(35, 120, 74, 0.28);
  --pill-ink: #122018;
  --special-pill-bg: rgba(244, 251, 246, 0.88);
  --special-pill-border: rgba(35, 120, 74, 0.38);
  --special-pill-ink: #112718;
  --quantity-watermark: rgba(31, 108, 66, 0.30);
  --quantity-watermark-special: rgba(35, 120, 74, 0.40);
  --quantity-watermark-missing: rgba(18, 32, 24, 0.17);
}

[data-theme="pride"] {
  --ink: #171320;
  --muted: #665f72;
  --line: #e3d9ec;
  --paper: #fff9fb;
  --panel: #ffffff;
  --accent: #7b2ff2;
  --accent-2: #e43f6f;
  --accent-3: #f9a620;
  --wash: #f4ecff;
  --topbar-bg: rgba(255, 249, 251, 0.92);
  --button-bg: #ffffff;
  --button-hover: #fff0f7;
  --input-bg: #ffffff;
  --detail-bg: #fffbfd;
  --chip-bg: #f7edff;
  --modal-bg: #ffffff;
  --empty-bg: #ffffff;
  --dashboard-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 249, 251, 0.94) 100%),
    linear-gradient(135deg, #e40303 0%, #ff8c00 18%, #ffed00 34%, #008026 52%, #24408e 70%, #732982 100%);
  --primary-bg: #7b2ff2;
  --primary-hover: #6424c9;
  --pill-bg: rgba(123, 47, 242, 0.1);
  --pill-border: rgba(123, 47, 242, 0.28);
  --pill-ink: #171320;
  --special-pill-bg: rgba(255, 255, 255, 0.9);
  --special-pill-border: rgba(228, 63, 111, 0.42);
  --special-pill-ink: #28142e;
  --quantity-watermark: rgba(123, 47, 242, 0.32);
  --quantity-watermark-special: rgba(228, 63, 111, 0.42);
  --quantity-watermark-missing: rgba(23, 19, 32, 0.18);
  --shadow: 0 18px 46px rgba(123, 47, 242, 0.13);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 3vw, 2.15rem);
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
}

h3 {
  margin-bottom: 5px;
  font-size: 1rem;
  line-height: 1.2;
}

.actions,
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-theme-control {
  min-height: 38px;
  border: 1px solid #b8c6c1;
  border-radius: 8px;
  padding: 0 8px 0 10px;
  color: var(--ink);
  background: var(--button-bg);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.top-theme-control[hidden] {
  display: none;
}

.top-theme-control span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.top-theme-control select {
  min-height: 30px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}

.top-theme-control select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

.icon-button,
.gear-button,
.primary-button,
.secondary-button,
.share-filter-button {
  min-height: 38px;
  border: 1px solid #b8c6c1;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--button-bg);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.icon-button:hover,
.gear-button:hover,
.primary-button:hover,
.secondary-button:hover,
.share-filter-button:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.icon-button:active,
.gear-button:active,
.primary-button:active,
.secondary-button:active,
.share-filter-button:active {
  transform: translateY(1px);
}

.gear-button {
  width: 38px;
  padding: 0;
  font-size: 1.12rem;
}

main {
  display: grid;
  gap: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 79px);
}

.share-only .topbar,
.share-only .command-menu {
  display: none;
}

body:not(.is-authenticated) .nav-bottom {
  display: none;
}

.share-only .app-shell {
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.share-only .shared-card-band,
.share-only .deck-share-band,
.share-only .favorites-share-band,
.share-only .wishlist-share-band,
.share-only .container-share-band,
.share-only .store-share-band {
  min-height: 100vh;
}

.command-menu {
  position: sticky;
  top: 79px;
  align-self: start;
  height: calc(100vh - 79px);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.command-menu nav {
  display: grid;
  gap: 8px;
}

.command-menu .nav-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.nav-command {
  width: 100%;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  font-weight: 800;
}

.home-icon,
.dashboard-icon,
.collection-icon,
.sets-icon,
.favorites-icon,
.missing-icon,
.sale-icon,
.storefront-icon,
.wishlist-icon,
.catalog-search-icon,
.import-icon,
.browse-decks-icon,
.notification-icon,
.admin-icon,
.profile-icon,
.settings-icon,
.blog-post-icon,
.login-icon,
.logout-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.notification-nav-command {
  position: relative;
}

.nav-unread-dot,
.notification-read-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #d32f2f;
  box-shadow: 0 0 0 2px var(--panel);
}

.nav-unread-dot {
  margin-left: auto;
}

.nav-unread-dot[hidden] {
  display: none;
}

.notification-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 4px;
  height: 9px;
  border: 1.8px solid currentColor;
  border-radius: 8px 8px 5px 5px;
  border-bottom-width: 2px;
}

.notification-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 3px;
  width: 4px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: 0 -11px 0 -1px currentColor;
}

.admin-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-radius: 3px 3px 5px 5px;
}

.admin-icon::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 3px;
  height: 7px;
  border: 1.8px solid currentColor;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.profile-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 6px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}

.profile-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  height: 7px;
  border: 1.8px solid currentColor;
  border-radius: 8px 8px 4px 4px;
}

.blog-post-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 10px;
  height: 13px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
  background: linear-gradient(currentColor 0 0) 3px 5px / 5px 1.5px,
    linear-gradient(currentColor 0 0) 3px 8px / 4px 1.5px;
  background-repeat: no-repeat;
}

.blog-post-icon::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 9px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  transform: rotate(-43deg);
  box-shadow: -6px 0 0 -0.4px currentColor;
}

.settings-icon::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 -6px 0 -4px currentColor, 0 6px 0 -4px currentColor, 6px 0 0 -4px currentColor, -6px 0 0 -4px currentColor;
}

.settings-icon::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: currentColor;
}

.logout-icon::before {
  content: "";
  position: absolute;
  inset: 3px 7px 3px 2px;
  border: 1.8px solid currentColor;
  border-right: 0;
  border-radius: 3px 0 0 3px;
}

.logout-icon::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 8px;
  width: 9px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: -2px -3px 0 -1px currentColor, -2px 3px 0 -1px currentColor;
}

.login-icon::before {
  content: "";
  position: absolute;
  inset: 3px 2px 3px 7px;
  border: 1.8px solid currentColor;
  border-left: 0;
  border-radius: 0 3px 3px 0;
}

.login-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 9px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: 2px -3px 0 -1px currentColor, 2px 3px 0 -1px currentColor;
}

.favorites-icon::before {
  content: "☆";
  position: absolute;
  inset: -3px 0 0;
  font-size: 1.25rem;
  line-height: 1;
}

.wishlist-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%),
    linear-gradient(0deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%),
    color-mix(in srgb, var(--panel) 78%, transparent);
}

.wishlist-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 5px;
  border: 1.7px solid currentColor;
  border-radius: 8px 8px 2px 8px;
  box-shadow: 6px 0 0 -0.2px color-mix(in srgb, currentColor 100%, transparent);
  transform: rotate(-18deg);
}

.home-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  height: 9px;
  border: 1.8px solid currentColor;
  border-top: 0;
  border-radius: 2px;
}

.home-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-left: 1.8px solid currentColor;
  border-top: 1.8px solid currentColor;
  transform: rotate(45deg);
  border-radius: 2px 0 0 0;
}

.dashboard-icon::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 10px 0 0 currentColor, 0 10px 0 currentColor, 10px 10px 0 currentColor;
}

.collection-icon::before,
.collection-icon::after,
.sets-icon::before,
.sets-icon::after {
  content: "";
  position: absolute;
  border: 1.7px solid currentColor;
  border-radius: 3px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.collection-icon::before {
  inset: 2px 5px 4px 1px;
}

.collection-icon::after {
  inset: 5px 1px 1px 5px;
}

.sets-icon::before {
  inset: 2px 5px 4px 1px;
  box-shadow: 3px 3px 0 -1px currentColor;
}

.sets-icon::after {
  inset: 5px 1px 1px 5px;
  background:
    linear-gradient(90deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%),
    color-mix(in srgb, var(--panel) 82%, transparent);
}

.missing-icon::before {
  content: "";
  position: absolute;
  inset: 2px 3px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.missing-icon::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 7px;
  height: 1.8px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor;
}

.sale-icon::before {
  content: "$";
  position: absolute;
  inset: 1px;
  display: grid;
  place-items: center;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1;
}

.storefront-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 4px;
  height: 5px;
  border: 1.8px solid currentColor;
  border-radius: 3px 3px 1px 1px;
  background:
    linear-gradient(90deg, currentColor 0 15%, transparent 15% 30%, currentColor 30% 45%, transparent 45% 60%, currentColor 60% 75%, transparent 75%);
}

.storefront-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 3px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.catalog-search-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 10px;
  height: 10px;
  border: 1.9px solid currentColor;
  border-radius: 50%;
}

.catalog-search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  right: 1px;
  bottom: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: center;
}

.import-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 2px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.import-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 6px;
  border: 1.8px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.deck-icon {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 19px;
  flex: 0 0 auto;
}

.deck-icon::before,
.deck-icon::after {
  content: "";
  position: absolute;
  border: 1.7px solid currentColor;
  border-radius: 3px;
  background: color-mix(in srgb, var(--panel) 76%, transparent);
}

.deck-icon::before {
  inset: 1px 4px 4px 1px;
  transform: rotate(-7deg);
}

.deck-icon::after {
  inset: 4px 1px 1px 4px;
  background: color-mix(in srgb, var(--button-bg) 88%, transparent);
}

.browse-decks-icon::before,
.browse-decks-icon::after {
  content: "";
  position: absolute;
}

.browse-decks-icon::before {
  inset: 2px 4px 4px 1px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  box-shadow: 5px 3px 0 -1px color-mix(in srgb, currentColor 72%, transparent);
}

.browse-decks-icon::after {
  right: 1px;
  bottom: 1px;
  width: 7px;
  height: 7px;
  border: 1.7px solid currentColor;
  border-radius: 50%;
  box-shadow: 4px 4px 0 -2px currentColor;
}

.add-to-deck-icon {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.add-to-deck-icon::before,
.add-to-deck-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.add-to-deck-icon::before {
  inset: 2px 5px 4px 1px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
  background: color-mix(in srgb, var(--panel) 76%, transparent);
  transform: rotate(-7deg);
  box-shadow: 4px 4px 0 -1px color-mix(in srgb, currentColor 40%, transparent);
}

.add-to-deck-icon::after {
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) center / 7px 1.8px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.8px 7px no-repeat,
    var(--button-bg);
  border: 1.6px solid currentColor;
}

.storage-check-icon,
.storage-x-icon {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}

.storage-check-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 8px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.storage-x-icon::before,
.storage-x-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 9px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.storage-x-icon::before {
  transform: rotate(45deg);
}

.storage-x-icon::after {
  transform: rotate(-45deg);
}

.container-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.container-icon::before,
.container-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.binder-icon::before {
  inset: 1px 4px 1px 2px;
  border: 1.8px solid currentColor;
  border-left-width: 4px;
  border-radius: 3px;
}

.binder-icon::after {
  top: 5px;
  bottom: 5px;
  left: 7px;
  border-left: 1.5px solid currentColor;
  opacity: 0.55;
}

.box-icon::before {
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 11px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}

.box-icon::after {
  left: 4px;
  right: 4px;
  top: 2px;
  height: 5px;
  border: 1.8px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.other-icon::before {
  inset: 3px;
  border: 1.8px solid currentColor;
  border-radius: 50% 50% 50% 6px;
  transform: rotate(-45deg);
}

.other-icon::after {
  inset: 7px;
  border-radius: 50%;
  background: currentColor;
}

.nav-command:hover,
.nav-command.is-active {
  border-color: var(--line);
  color: var(--ink);
  background: var(--button-hover);
}

.page-shell {
  min-width: 0;
}

.app-page[hidden] {
  display: none;
}

#authNameField[hidden],
#authPasswordField[hidden] {
  display: none !important;
}

.home-band,
.dashboard-band,
.collection-band,
.sets-band,
.decks-band,
.containers-band,
.missing-band,
.sale-band,
.notifications-band,
.admin-band,
.import-band,
.settings-band,
.shared-card-band,
.deck-editor-band,
.deck-share-band,
.favorites-share-band,
.container-share-band,
.wishlist-share-band,
.store-share-band,
.user-profile-band,
.set-band {
  padding: clamp(18px, 4vw, 44px) clamp(16px, 4vw, 48px);
}

.dashboard-band {
  background: var(--dashboard-bg);
  border-bottom: 1px solid var(--line);
}

.home-band {
  min-height: 100vh;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, transparent), transparent 38%),
    radial-gradient(circle at 85% 12%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 32%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 18px;
}

.home-hero h2 {
  max-width: 900px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.home-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.6;
}

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

.home-stat-card {
  min-height: 118px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--panel) 92%, var(--accent)), var(--panel));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.home-stat-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.home-stat-card strong {
  color: var(--text);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.home-stat-card-feature {
  min-height: 100%;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 20%, var(--panel)), var(--panel)),
    var(--panel);
}

.home-stat-card-feature strong {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

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

.metadata-metric-grid {
  margin-bottom: 18px;
}

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

.metric {
  min-height: 92px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-width: 0;
}

.metric span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.metric strong {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.metric:nth-child(3) strong.positive,
.delta.positive {
  color: var(--accent);
}

.metric:nth-child(3) strong.negative,
.delta.negative {
  color: var(--accent-2);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.panel {
  min-height: 360px;
  padding: 16px;
}

.chart-panel {
  min-height: 440px;
}

.panel-head,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.panel-head span,
.card-meta,
.card-stats,
.status {
  color: var(--muted);
  font-size: 0.86rem;
}

.panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.compact-button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.78rem;
}

#historyChart {
  width: 100%;
  height: clamp(340px, 48vw, 390px);
  display: block;
  margin-top: 10px;
  overflow: visible;
}

.top-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.set-completion-panel {
  grid-column: 1 / -1;
}

.set-completion-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.set-completion-item {
  width: 100%;
  appearance: none;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #111816;
  border-radius: 8px;
  color: inherit;
  background: var(--panel);
  cursor: pointer;
}

.set-completion-item:hover {
  background: var(--button-hover);
  transform: translateY(-1px);
}

.set-completion-item strong,
.set-completion-item span {
  display: block;
}

.set-completion-item span {
  color: var(--muted);
  font-size: 0.8rem;
}

.set-completion-item b {
  color: var(--ink);
  font-size: 0.95rem;
}

.set-progress {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--chip-bg);
}

.set-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-3), var(--accent));
}

.top-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.top-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.top-item img {
  width: 46px;
  height: 64px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--wash);
}

.top-item strong,
.top-item span {
  display: block;
}

.top-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

.top-item .value {
  color: var(--ink);
  font-weight: 800;
}

.collection-band {
  background: var(--paper);
}

.decks-band,
.sets-band,
.containers-band {
  min-height: calc(100vh - 79px);
  background: var(--paper);
}

.deck-share-band,
.favorites-share-band,
.wishlist-share-band,
.container-share-band {
  min-height: calc(100vh - 79px);
  background: var(--dashboard-bg);
}

.section-head {
  align-items: end;
  margin-bottom: 16px;
}

.filters input,
.filters select {
  min-height: 38px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
}

.filters input {
  width: min(320px, 76vw);
  padding: 0 12px;
}

.filters select {
  padding: 0 34px 0 10px;
}

.view-toggle {
  display: inline-flex;
  min-height: 38px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  overflow: hidden;
  background: var(--input-bg);
}

.view-toggle button {
  min-width: 64px;
  border: 0;
  border-right: 1px solid #c7d1cd;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.view-toggle button:last-child {
  border-right: 0;
}

.view-toggle button.is-active {
  color: #ffffff;
  background: var(--primary-bg);
}

.share-filter-button {
  width: 38px;
  padding: 0;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.export-actions {
  display: inline-flex;
  min-height: 38px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  overflow: hidden;
  background: var(--input-bg);
}

.export-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  border-right: 1px solid #c7d1cd;
  padding: 0 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 850;
}

.export-actions a:last-child {
  border-right: 0;
}

.export-actions a:hover {
  background: var(--button-hover);
}

.status {
  min-height: 22px;
  margin-bottom: 12px;
}

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid #111816;
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.bulk-bar[hidden] {
  display: none;
}

.bulk-bar span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 16px;
}

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

.card-list-row {
  display: grid;
  grid-template-columns: 30px 74px minmax(0, 1fr) minmax(260px, auto) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card-list-row.is-special {
  border-color: rgba(122, 79, 159, 0.28);
  background:
    linear-gradient(135deg, rgba(159, 63, 52, 0.09), rgba(199, 154, 47, 0.09) 24%, rgba(33, 110, 97, 0.08) 50%, rgba(39, 108, 163, 0.09) 74%, rgba(122, 79, 159, 0.09)),
    var(--panel);
}

.card-list-row.is-missing {
  opacity: 0.58;
  filter: grayscale(0.85);
  border-style: dashed;
  box-shadow: none;
}

.list-card-art {
  display: block;
  width: 74px;
  height: 103px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--wash);
}

.list-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.list-card-copy h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 1.06rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.card-list-row.is-special .list-card-copy h3 {
  color: transparent;
  background: linear-gradient(92deg, #9f3f34 0%, #c79a2f 18%, #216e61 38%, #276ca3 58%, #7a4f9f 78%, #9f3f34 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.list-card-copy .card-meta,
.list-card-copy .card-type {
  margin-bottom: 4px;
}

.list-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.list-pills span {
  border-radius: 999px;
  background: var(--chip-bg);
  padding: 6px 9px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.list-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  align-items: center;
}

.missing-page-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  margin: -4px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--panel) 82%, var(--wash));
  color: var(--muted);
  box-shadow: var(--shadow);
}

.missing-page-intro strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.missing-page-intro span {
  font-size: 0.86rem;
}

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

.catalog-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid #111816;
  border-radius: 8px;
  padding: clamp(18px, 4vw, 30px);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 92%, var(--accent)), var(--panel-soft));
  box-shadow: var(--shadow);
}

.catalog-welcome-copy {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.catalog-welcome-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  max-width: 820px;
}

.catalog-welcome-copy p {
  margin: 0;
  max-width: 660px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.55;
}

.catalog-welcome-copy span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.catalog-welcome-copy a {
  color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.catalog-welcome-stack {
  position: relative;
  justify-self: end;
  width: min(100%, 210px);
  aspect-ratio: 5 / 7;
}

.welcome-card {
  position: absolute;
  inset: 0;
  border: 1px solid #111816;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.welcome-card-back {
  transform: translate(-20px, 12px) rotate(-8deg);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent-2) 26%, var(--panel)), var(--panel));
}

.welcome-card-mid {
  transform: translate(-7px, 4px) rotate(4deg);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent-3) 22%, var(--panel)), var(--panel-soft));
}

.welcome-card-front {
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--wash) 82%, transparent), transparent 55%),
    var(--panel);
}

.welcome-card-front span {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  height: 42%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--panel)), color-mix(in srgb, var(--accent-2) 18%, var(--panel-soft)));
}

.welcome-card-front strong {
  position: relative;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.welcome-card-front small {
  position: relative;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.catalog-search-heading {
  margin-bottom: 10px;
}

.catalog-search-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.catalog-search-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.catalog-search-main {
  max-width: 760px;
}

.catalog-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.catalog-advanced-grid input,
.catalog-advanced-grid select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--input-bg);
}

.catalog-checkbox-filter {
  min-height: 38px;
  align-self: end;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--input-bg);
  color: var(--ink);
}

.catalog-checkbox-filter input {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  accent-color: var(--accent);
}

.catalog-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.catalog-result-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.catalog-result-card:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  transform: translateY(-1px);
}

.catalog-result-card.is-owned {
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
}

.catalog-result-card.is-special {
  border-color: rgba(122, 79, 159, 0.28);
  background:
    linear-gradient(135deg, rgba(159, 63, 52, 0.08), rgba(199, 154, 47, 0.08) 24%, rgba(33, 110, 97, 0.07) 50%, rgba(39, 108, 163, 0.08) 74%, rgba(122, 79, 159, 0.08)),
    var(--panel);
}

.catalog-result-art {
  display: block;
  aspect-ratio: 5 / 7;
  background: var(--wash);
  overflow: hidden;
  cursor: pointer;
}

.catalog-result-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-result-copy {
  display: grid;
  gap: 7px;
  padding: 13px 14px 8px;
}

.catalog-result-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.catalog-result-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.catalog-result-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-result-pills span {
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
}

.catalog-result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 14px;
  cursor: default;
}

.catalog-add-button {
  min-height: 36px;
  flex: 1 1 auto;
  border-radius: 8px;
}

.missing-card-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px 10px 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.missing-card-art {
  display: block;
  width: 70px;
  height: 98px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--wash);
}

.missing-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.missing-card-main {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.missing-card-title-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.missing-card-title-row h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.06rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.missing-card-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.missing-card-pills,
.missing-market-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.missing-card-pills {
  justify-content: flex-end;
  flex: 0 0 auto;
  max-width: 48%;
}

.missing-card-pills span {
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}

.missing-market-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  color: var(--ink);
  background: var(--button-bg);
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
}

.missing-market-links a:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.missing-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.remove-missing-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(159, 63, 52, 0.34);
  border-radius: 7px;
  color: #9f3f34;
  background: transparent;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

.remove-missing-button:hover {
  border-color: #9f3f34;
  background: rgba(159, 63, 52, 0.14);
}

.remove-list-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M15 9l-6 6'/%3E%3Cpath d='M9 9l6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M15 9l-6 6'/%3E%3Cpath d='M9 9l6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

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

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

.notification-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.notification-row.is-unread {
  border-color: color-mix(in srgb, #d32f2f 48%, var(--line));
  background:
    linear-gradient(90deg, rgba(211, 47, 47, 0.08), transparent 42%),
    var(--panel);
}

.notification-open-button {
  width: 100%;
  min-height: 64px;
  border: 0;
  padding: 12px 14px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
}

.notification-row:not(.is-unread) .notification-read-dot {
  opacity: 0;
}

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

.notification-open-button strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.notification-open-button small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.notification-detail-form textarea {
  resize: vertical;
}

.notification-store-link {
  justify-self: start;
  text-decoration: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(440px, 1.15fr) minmax(360px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.admin-panel .panel-head h3 {
  margin: 0;
}

.admin-server-panel {
  grid-column: 1 / -1;
}

.admin-server-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-server-details div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--panel) 88%, var(--accent) 6%);
}

.admin-server-details dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-server-details dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.admin-users-list,
.admin-reports-list {
  display: grid;
  gap: 10px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px 104px max-content max-content;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.admin-user-row.is-banned {
  border-color: rgba(159, 63, 52, 0.44);
  background:
    linear-gradient(90deg, rgba(159, 63, 52, 0.1), transparent 45%),
    var(--panel);
}

.admin-user-main {
  min-width: 0;
}

.admin-user-main strong,
.admin-user-main span,
.admin-user-main small,
.admin-user-row label span {
  display: block;
}

.admin-user-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-main span,
.admin-user-main small,
.admin-user-row label span {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.78rem;
}

.admin-user-row select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  color: var(--ink);
  background: var(--field-bg);
}

.admin-ban-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-ban-toggle input {
  width: 18px;
  height: 18px;
}

.admin-log-viewer {
  min-height: 420px;
  max-height: 62vh;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 72%, #000 8%);
  font: 0.78rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

.admin-report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.admin-report-row.is-pending {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 58%),
    var(--panel);
}

.admin-report-main {
  min-width: 0;
}

.admin-report-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.admin-report-title strong {
  color: var(--ink);
}

.admin-report-title span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.admin-report-row p,
.admin-report-row blockquote {
  margin: 8px 0 0;
}

.admin-report-row p {
  color: var(--ink);
  font-size: 0.92rem;
  white-space: pre-wrap;
}

.admin-report-row blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  white-space: pre-wrap;
}

.admin-report-row small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-report-row a {
  color: var(--accent);
  text-decoration: none;
}

.admin-report-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-modal textarea {
  min-height: 130px;
  resize: vertical;
}

.profile-image-preview {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  color: var(--muted);
  font-weight: 800;
}

.profile-image-preview img {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
}

.user-profile-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.user-profile-card {
  display: grid;
  gap: 18px;
}

.user-profile-hero {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(16px, 3vw, 26px);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 48%),
    var(--panel);
  box-shadow: var(--shadow);
}

.user-profile-avatar {
  width: 128px;
  height: 128px;
  border: 1px solid var(--line);
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--field-bg);
  color: var(--accent);
  font-size: 3rem;
  font-weight: 950;
}

.user-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-hero h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
}

.user-profile-hero p:not(.eyebrow) {
  max-width: 74ch;
  white-space: pre-wrap;
}

.user-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.user-profile-stats article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.user-profile-stats span,
.user-profile-stats strong {
  display: block;
}

.user-profile-stats span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.user-profile-stats strong {
  margin-top: 4px;
  font-size: 1.35rem;
}

.user-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.user-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.user-profile-left,
.user-profile-right {
  display: grid;
  gap: 16px;
}

.profile-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.profile-compose-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.profile-compose-form textarea,
.profile-comment-form input,
.profile-reply-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--field-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
}

.profile-compose-form textarea {
  min-height: 86px;
  resize: vertical;
}

.profile-feed-list,
.profile-post-list,
.profile-comments,
.profile-friend-list {
  display: grid;
  gap: 10px;
}

.profile-feed-item,
.profile-post,
.profile-comment {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 84%, var(--field-bg) 16%);
}

.profile-comment.is-reply {
  margin-left: 18px;
  background: color-mix(in srgb, var(--panel) 72%, var(--accent) 7%);
}

.profile-feed-item p,
.profile-post p,
.profile-comment p {
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.card-blog-modal textarea {
  min-height: 180px;
  resize: vertical;
}

.card-blog-preview {
  margin-bottom: 12px;
}

.card-blog-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 52%),
    var(--field-bg);
  text-decoration: none;
}

.card-blog-card img {
  width: 58px;
  border-radius: 5px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.deck-blog-thumb {
  width: 58px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.deck-blog-thumb img {
  width: 34px;
  margin-left: -18px;
  border-radius: 4px;
}

.deck-blog-thumb img:first-child {
  margin-left: 0;
}

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

.card-blog-card small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 850;
}

.profile-post-card-link {
  margin-top: 10px;
}

.card-blog-list {
  display: grid;
  gap: 10px;
  max-height: min(48vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.card-blog-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--field-bg);
}

.card-blog-row p {
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.profile-feed-author,
.profile-friend-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.profile-feed-author strong,
.profile-feed-author a,
.profile-friend-row {
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
}

.profile-feed-author span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.profile-mini-avatar {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--field-bg);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 950;
}

.profile-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-comment-form,
.profile-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.profile-friend-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--field-bg);
}

.compact-empty {
  min-height: 64px;
  padding: 14px;
}

.profile-deck-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.profile-deck-card {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  background: var(--panel);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.profile-deck-card strong,
.profile-deck-card span {
  position: relative;
  z-index: 1;
  display: block;
}

.profile-deck-card strong {
  font-size: 1.05rem;
}

.profile-deck-card span {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 850;
}

.sale-card-row {
  display: grid;
  grid-template-columns: 64px minmax(170px, 1fr) max-content max-content minmax(72px, 88px) minmax(94px, 112px) 34px 34px;
  gap: 10px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.store-front-band .card-row {
  cursor: pointer;
}

.store-front-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--pill-ink);
  background: var(--pill-bg);
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.store-front-detail-modal {
  width: min(1040px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.store-front-detail-body {
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
}

.store-front-card-detail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--panel) 82%, transparent), var(--panel)),
    var(--card-detail-bg-image, none) center / cover no-repeat,
    var(--panel);
}

.store-front-card-detail.is-special {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--panel) 72%, transparent), var(--panel)),
    linear-gradient(125deg, rgba(255, 92, 168, 0.24), rgba(67, 176, 255, 0.18), rgba(255, 218, 86, 0.2)),
    var(--card-detail-bg-image, none) center / cover no-repeat,
    var(--panel);
}

.store-front-card-detail .shared-card-art {
  width: min(100%, 240px);
}

.store-front-detail-scryfall {
  margin-top: 10px;
}

.store-front-market-details {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.store-front-sellers {
  display: grid;
  gap: 8px;
}

.store-front-sellers-head,
.store-front-seller-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 120px 42px;
  gap: 10px;
  align-items: center;
}

.store-front-sellers-head {
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.store-front-seller-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: var(--detail-bg);
  cursor: pointer;
  text-align: left;
}

.store-front-seller-row:hover {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  background: var(--button-hover);
}

.store-front-seller-row.is-current-user {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.store-front-seller-row strong,
.store-front-seller-row small {
  display: block;
}

.store-front-seller-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.store-front-seller-row b {
  justify-self: end;
}

.store-front-favorite-button {
  justify-self: end;
}

.store-front-favorite-button.is-favorite,
.favorite-store-remove {
  color: #b37505;
  border-color: color-mix(in srgb, #b37505 45%, var(--line));
  background: color-mix(in srgb, #f4c66a 20%, var(--button-bg));
}

.sale-card-art {
  display: block;
  width: 64px;
  height: 89px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--wash);
}

.sale-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.sale-card-copy h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.sale-card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.sale-available,
.sale-value-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--pill-ink);
  background: var(--pill-bg);
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.sale-inline-field,
.sale-readonly-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.sale-inline-field input,
.sale-readonly-field output {
  width: 100%;
  box-sizing: border-box;
  min-height: 34px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 8px;
  color: var(--ink);
  background: var(--input-bg);
  font-size: 0.88rem;
  font-weight: 850;
}

.sale-readonly-field output {
  display: grid;
  place-items: center;
  background: var(--detail-bg);
}

.mark-sold-button,
.remove-sale-button {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

.mark-sold-button {
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
}

.mark-sold-button:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.remove-sale-button {
  border: 1px solid rgba(159, 63, 52, 0.34);
  color: #9f3f34;
}

.remove-sale-button:hover {
  border-color: #9f3f34;
  background: rgba(159, 63, 52, 0.14);
}

.delete-card-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(159, 63, 52, 0.34);
  border-radius: 7px;
  color: #9f3f34;
  background: transparent;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  line-height: 1;
}

.delete-card-button:hover {
  border-color: #9f3f34;
  background: rgba(159, 63, 52, 0.14);
}

.delete-card-button:disabled,
.card-list-row .share-button:disabled,
.edit-button:disabled,
.refresh-card-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.card-row {
  display: block;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  min-width: 0;
}

.card-tile-art-bg {
  position: absolute;
  z-index: 1;
  inset: -16%;
  background-image: var(--card-tile-bg-image, none);
  background-repeat: no-repeat;
  background-position: right -12px center;
  background-size: min(78%, 380px) auto;
  opacity: 0.24;
  filter: blur(1.2px) saturate(1.18);
  transform: rotate(-7deg) scale(1.08);
  pointer-events: none;
}

.card-row::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--panel) 90%, transparent) 0%, color-mix(in srgb, var(--panel) 78%, transparent) 100%);
  pointer-events: none;
}

.card-row.is-special .card-tile-art-bg {
  opacity: 0.30;
  filter: blur(1.2px) saturate(1.38) contrast(1.04);
}

.quantity-watermark {
  position: absolute;
  right: 10px;
  bottom: 0;
  z-index: 2;
  color: var(--quantity-watermark);
  font-size: clamp(7rem, 13vw, 10.5rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.78;
  text-shadow: 0 1px 0 color-mix(in srgb, var(--panel) 35%, transparent);
  pointer-events: none;
  user-select: none;
}

.card-row.is-special .quantity-watermark {
  color: var(--quantity-watermark-special);
}

.card-row.is-missing .quantity-watermark {
  color: var(--quantity-watermark-missing);
}

.card-row.is-special {
  border-color: rgba(122, 79, 159, 0.28);
  background:
    linear-gradient(135deg, rgba(159, 63, 52, 0.10), rgba(199, 154, 47, 0.10) 24%, rgba(33, 110, 97, 0.09) 50%, rgba(39, 108, 163, 0.10) 74%, rgba(122, 79, 159, 0.10)),
    #fffdf8;
  box-shadow: 0 18px 45px rgba(58, 47, 76, 0.14);
}

.card-row.is-missing {
  border-style: dashed;
  opacity: 0.58;
  filter: grayscale(0.85);
  box-shadow: none;
}

.card-row.is-missing .owned-value::after {
  content: "Not owned";
  display: inline-block;
  margin-left: 8px;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: var(--chip-bg);
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: middle;
}

.collection-card-head {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
}

.select-card-wrap {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 36px;
}

.select-card-wrap[hidden] {
  display: none;
}

.select-card-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.select-card-checkbox:disabled {
  cursor: not-allowed;
}

.title-wrap {
  min-width: 0;
  flex: 1 1 auto;
}

.collection-card-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.55vw, 1.28rem);
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.card-row.is-special .collection-card-head h3 {
  color: transparent;
  background: linear-gradient(92deg, #9f3f34 0%, #c79a2f 18%, #216e61 38%, #276ca3 58%, #7a4f9f 78%, #9f3f34 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.favorite-button,
.wishlist-button,
.modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid #c7d1cd;
  border-radius: 999px;
  color: var(--ink);
  background: var(--button-bg);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  line-height: 1;
}

.wishlist-button {
  position: relative;
}

.wishlist-button[hidden] {
  display: none !important;
}

.favorite-button::before {
  content: "☆";
  font-size: 1.34rem;
}

.wishlist-button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 15px;
  width: 17px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%),
    linear-gradient(0deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%);
  transform: translateX(-50%);
}

.wishlist-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 18px;
  height: 9px;
  background:
    radial-gradient(ellipse at 5px 5px, transparent 0 2px, currentColor 2.1px 4px, transparent 4.1px),
    radial-gradient(ellipse at 13px 5px, transparent 0 2px, currentColor 2.1px 4px, transparent 4.1px),
    linear-gradient(90deg, transparent 43%, currentColor 43%, currentColor 57%, transparent 57%);
  transform: translateX(-50%);
}

.favorite-button.is-favorite {
  border-color: rgba(199, 154, 47, 0.72);
  color: #9b7118;
  background: #fff8e4;
}

.favorite-button.is-favorite::before {
  content: "★";
}

.wishlist-button.is-wishlist {
  border-color: color-mix(in srgb, var(--accent) 72%, #1f2937);
  color: var(--accent);
  background: color-mix(in srgb, var(--button-hover) 72%, #fff);
}

.wishlist-button.is-wishlist::before {
  background: currentColor;
}

.wishlist-button.is-wishlist::after {
  background:
    radial-gradient(ellipse at 5px 5px, transparent 0 2px, currentColor 2.1px 4px, transparent 4.1px),
    radial-gradient(ellipse at 13px 5px, transparent 0 2px, currentColor 2.1px 4px, transparent 4.1px),
    linear-gradient(90deg, transparent 43%, currentColor 43%, currentColor 57%, transparent 57%);
}

.wishlist-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.favorite-button:hover,
.wishlist-button:hover,
.modal-close:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.refresh-card-button.is-spinning {
  animation: spin-refresh 0.8s linear infinite;
}

@keyframes spin-refresh {
  to {
    transform: rotate(360deg);
  }
}

.card-divider {
  position: relative;
  z-index: 3;
  height: 1px;
  margin: 0 16px;
  background: linear-gradient(90deg, var(--line), rgba(33, 110, 97, 0.22), var(--line));
}

.collection-card-body {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px 16px;
}

.card-art {
  display: block;
  width: 104px;
  height: 145px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--wash);
  align-self: start;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-main {
  min-width: 0;
}

.card-meta {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.card-type {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.variant-summary-table {
  display: grid;
  gap: 5px;
  width: 100%;
  margin: 10px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: color-mix(in srgb, var(--panel) 78%, var(--accent-soft));
}

.variant-summary-header,
.variant-summary-row {
  display: grid;
  grid-template-columns: minmax(64px, 0.75fr) minmax(0, 1.7fr) minmax(34px, auto);
  gap: 8px;
  align-items: center;
}

.variant-summary-header {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.variant-summary-row {
  min-width: 0;
  border-radius: 7px;
  padding: 5px 6px;
  background: var(--detail-bg);
}

.variant-summary-row.is-special-variant {
  background:
    linear-gradient(92deg, rgba(159, 63, 52, 0.10), rgba(199, 154, 47, 0.10) 24%, rgba(33, 110, 97, 0.09) 50%, rgba(39, 108, 163, 0.10) 74%, rgba(122, 79, 159, 0.10)),
    var(--detail-bg);
}

.variant-summary-row strong,
.variant-summary-row b {
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.15;
}

.variant-summary-row b {
  justify-self: end;
  font-weight: 950;
}

.variant-condition-list {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px;
}

.variant-condition-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 3px 6px;
  color: var(--pill-ink);
  background: var(--pill-bg);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.1;
}

.variant-condition-chip small {
  color: inherit;
  font-size: 0.64rem;
  opacity: 0.82;
}

.card-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
}

.card-stats .stats-break {
  flex-basis: 100%;
  height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.card-stats span {
  border-radius: 999px;
  background: var(--chip-bg);
  padding: 5px 9px;
}

.card-stats .owned-value {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: var(--chip-bg);
  padding: 5px 9px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.15;
}

.card-stats .delta {
  flex-basis: auto;
  width: fit-content;
}

.card-stats .condition-pill,
.card-stats .variant-pill,
.card-stats .type-pill,
.card-stats .color-pill,
.list-pills .condition-pill,
.list-pills .type-pill,
.list-pills .color-pill {
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-weight: 850;
}

.card-row.is-special .card-stats .condition-pill,
.card-row.is-special .card-stats .variant-pill,
.card-row.is-special .card-stats .type-pill,
.card-row.is-special .card-stats .color-pill,
.card-list-row.is-special .list-pills .condition-pill,
.card-list-row.is-special .list-pills .type-pill,
.card-list-row.is-special .list-pills .color-pill {
  border-color: var(--special-pill-border);
  background: var(--special-pill-bg);
  color: var(--special-pill-ink);
}

.card-stats .color-pill,
.list-pills .color-pill,
.deck-card-tags .color-pill {
  border-color: color-mix(in srgb, var(--accent-2) 36%, var(--pill-border));
}

.card-footer {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 16px 16px;
}

.card-storage-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex: 1 1 0;
}

.card-primary-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.deck-membership-button,
.container-membership-button,
.edit-button,
.refresh-card-button,
.blog-card-button,
.scryfall-button,
.share-button {
  width: 34px;
  height: 34px;
  border: 1px solid #c7d1cd;
  border-radius: 7px;
  color: var(--ink);
  background: var(--button-bg);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.refresh-card-button {
  font-size: 1rem;
}

.edit-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.edit-icon::before {
  content: "";
  position: absolute;
  width: 13px;
  height: 4px;
  top: 6px;
  left: 2px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
  background: color-mix(in srgb, var(--button-bg) 88%, transparent);
  transform: rotate(-45deg);
  transform-origin: center;
}

.edit-icon::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 1.8px;
  right: 1px;
  bottom: 2px;
  border-radius: 999px;
  background: currentColor;
}

.deck-membership-button {
  color: var(--accent);
}

.container-membership-button {
  color: var(--accent-3);
}

.deck-membership-button[hidden],
.container-membership-button[hidden] {
  display: none;
}

.deck-membership-button:hover,
.container-membership-button:hover,
.edit-button:hover,
.refresh-card-button:hover,
.blog-card-button:hover,
.scryfall-button:hover,
.share-button:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.card-list-row .deck-membership-button,
.card-list-row .container-membership-button,
.card-list-row .edit-button,
.card-list-row .blog-card-button,
.card-list-row .refresh-card-button {
  width: 34px;
  height: 34px;
}

.share-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.shared-deck-favorite-button.is-favorite {
  border-color: var(--accent-3);
  background: color-mix(in srgb, var(--accent-3) 20%, var(--button-bg));
  color: var(--accent-3);
}

.copy-deck-icon {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 17px;
}

.copy-deck-icon::before,
.copy-deck-icon::after {
  content: "";
  position: absolute;
  border: 1.8px solid currentColor;
  border-radius: 3px;
  background: color-mix(in srgb, var(--button-bg) 86%, transparent);
}

.copy-deck-icon::before {
  inset: 4px 1px 1px 4px;
}

.copy-deck-icon::after {
  inset: 1px 5px 5px 1px;
}

.scryfall-button {
  color: var(--accent-2);
  font-size: 0.82rem;
}

.shared-card-band,
.card-detail-band {
  min-height: calc(100vh - 79px);
  background: var(--dashboard-bg);
}

.set-band {
  min-height: calc(100vh - 79px);
  background: var(--paper);
}

.shared-card-shell,
.card-detail-shell,
.set-page-shell {
  max-width: 980px;
  margin: 0 auto;
}

.set-page-shell {
  max-width: 1400px;
}

.card-detail-shell {
  max-width: 1380px;
}

.set-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  align-items: end;
  margin-bottom: 18px;
  border: 1px solid #111816;
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.set-hero h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  line-height: 1.05;
}

.set-hero span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.set-hero b {
  color: var(--ink);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
}

.set-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.set-hero-actions .primary-button {
  white-space: nowrap;
}

.set-progress-large {
  height: 14px;
}

.shared-card {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 34px);
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(16px, 3vw, 26px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.shared-card.is-special {
  border-color: rgba(122, 79, 159, 0.28);
  background:
    linear-gradient(135deg, rgba(159, 63, 52, 0.10), rgba(199, 154, 47, 0.10) 24%, rgba(33, 110, 97, 0.09) 50%, rgba(39, 108, 163, 0.10) 74%, rgba(122, 79, 159, 0.10)),
    var(--panel);
}

.shared-card-art {
  display: block;
  width: 100%;
  max-width: 330px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--wash);
  box-shadow: 0 18px 44px rgba(17, 24, 22, 0.18);
}

.shared-card-art img {
  display: block;
  width: 100%;
  aspect-ratio: 488 / 680;
  object-fit: cover;
}

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

.shared-card-copy h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.shared-card.is-special .shared-card-copy h2 {
  color: transparent;
  background: linear-gradient(92deg, #9f3f34 0%, #c79a2f 18%, #216e61 38%, #276ca3 58%, #7a4f9f 78%, #9f3f34 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.shared-card-copy p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

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

.shared-card-details div {
  min-width: 0;
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--detail-bg);
}

.shared-card-details dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.shared-card-details dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.editable-card-detail {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr) 58px;
}

.editable-card-detail::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -14%;
  background-image: var(--card-detail-bg-image);
  background-repeat: no-repeat;
  background-position: right 42% center;
  background-size: min(76%, 620px) auto;
  opacity: 0.13;
  filter: blur(2px) saturate(1.18);
  transform: rotate(-6deg) scale(1.08);
  pointer-events: none;
}

.editable-card-detail::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--panel) 90%, transparent) 0%, color-mix(in srgb, var(--panel) 80%, transparent) 52%, color-mix(in srgb, var(--panel) 68%, transparent) 100%);
  pointer-events: none;
}

.editable-card-detail.is-special::before {
  opacity: 0.16;
  filter: blur(2px) saturate(1.38) contrast(1.04);
}

.editable-card-detail > * {
  position: relative;
  z-index: 1;
}

.card-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 370px);
  gap: 18px;
  align-items: start;
}

.card-detail-media {
  display: grid;
  gap: 12px;
  justify-items: start;
}

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

.detail-storage-button,
.detail-action-button {
  width: 46px;
  height: 46px;
  border: 1px solid #c7d1cd;
  border-radius: 9px;
  color: var(--ink);
  background: var(--button-bg);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
}

.detail-storage-button {
  width: 42px;
  height: 42px;
}

.detail-storage-button:hover,
.detail-action-button:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.detail-storage-button.is-stored {
  color: #116b3a;
  border-color: color-mix(in srgb, #1f9d55 46%, var(--line));
  background: color-mix(in srgb, #1f9d55 12%, var(--button-bg));
}

.detail-storage-button.is-missing-storage {
  color: #b42318;
  border-color: color-mix(in srgb, #d92d20 42%, var(--line));
  background: color-mix(in srgb, #d92d20 10%, var(--button-bg));
}

.detail-storage-button.is-add {
  color: var(--accent);
}

.detail-storage-button:disabled,
.detail-action-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.card-detail-toolbar {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  justify-content: flex-start;
}

.detail-scryfall-button {
  color: var(--accent-2);
}

.detail-card-page-button {
  color: var(--accent);
}

.detail-scryfall-json-button {
  color: var(--accent-3);
  font-size: 0.92rem;
}

.open-card-page-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.open-card-page-icon::before {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.open-card-page-icon::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 1px;
  width: 9px;
  height: 2px;
  background: currentColor;
  transform: rotate(-45deg);
  transform-origin: right center;
}

.detail-delete-button {
  border-color: rgba(159, 63, 52, 0.34);
  color: #9f3f34;
}

.detail-delete-button:hover {
  border-color: #9f3f34;
  background: rgba(159, 63, 52, 0.14);
}

.card-detail-insights {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.card-insight-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.compact-panel-head {
  margin-bottom: 10px;
}

.compact-panel-head h2 {
  font-size: 1.05rem;
}

.card-price-chart-wrap {
  --chart-normal: color-mix(in srgb, var(--accent) 70%, white);
  --chart-normal-front: color-mix(in srgb, var(--accent) 58%, white);
  --chart-special-back: color-mix(in srgb, var(--accent-2) 72%, black);
  --chart-special-front: color-mix(in srgb, var(--accent-2) 62%, white);
  color: var(--chart-normal-front);
}

.card-price-chart {
  display: block;
  width: 100%;
  min-height: 170px;
  overflow: visible;
}

.card-price-chart .card-price-grid,
.card-price-chart .card-price-axis {
  stroke: var(--line);
  stroke-width: 1;
}

.card-price-chart .card-price-scale-label,
.card-price-chart .card-price-date-label {
  fill: var(--muted);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: var(--panel);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.card-price-chart .card-price-date-label {
  font-size: 0.54rem;
}

.card-price-chart .card-price-area {
  fill: url("#cardPriceAreaNormal");
}

.card-price-chart .card-price-area.is-special {
  fill: url("#cardPriceAreaSpecial");
}

.card-price-chart .card-price-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-price-chart .card-price-line.is-special {
  stroke: var(--chart-special-back);
  stroke-width: 5.5;
  opacity: 0.78;
}

.card-price-chart .card-price-line.is-normal {
  stroke: var(--chart-normal-front);
  stroke-width: 3.5;
}

.card-price-chart circle {
  stroke: var(--panel);
  stroke-width: 2;
}

.card-price-chart circle.is-special {
  fill: var(--chart-special-front);
}

.card-price-chart circle.is-normal {
  fill: var(--chart-normal-front);
}

.card-price-chart-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.card-price-chart-meta strong {
  color: var(--ink);
  font-size: 1.35rem;
}

.card-price-chart-meta span {
  font-weight: 900;
}

.card-price-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.card-price-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--pill-ink);
  background: var(--pill-bg);
  font-size: 0.72rem;
  font-weight: 850;
}

.card-price-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--chart-normal-front);
}

.card-price-legend .is-special i {
  background: var(--chart-special-back);
}

.card-price-empty {
  display: grid;
  min-height: 170px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--detail-bg);
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
}

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

.card-meta-grid div,
.card-meta-grid button {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  background: var(--detail-bg);
  color: inherit;
  font: inherit;
  text-align: left;
}

.card-meta-grid strong,
.card-meta-grid button strong {
  color: var(--accent);
  font-size: 1.05rem;
  line-height: 1;
}

.card-meta-grid span,
.card-meta-grid button span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.card-meta-action {
  justify-items: start;
  color: inherit;
  cursor: pointer;
}

.card-meta-action:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.card-meta-action:disabled {
  cursor: default;
  opacity: 0.68;
}

.card-meta-action:disabled:hover {
  border-color: var(--line);
  background: var(--detail-bg);
}

.card-meta-drilldown-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.card-meta-drilldown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--detail-bg);
  text-decoration: none;
}

.card-meta-drilldown-row:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.card-meta-drilldown-row strong,
.card-meta-drilldown-row span {
  display: block;
}

.card-meta-drilldown-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.store-contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.store-contact-list a,
.store-contact-list > span {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  color: var(--ink);
  background: var(--detail-bg);
  text-decoration: none;
}

.store-contact-list a:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.store-contact-list strong {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1;
  text-transform: uppercase;
}

.store-contact-list span span,
.store-contact-list a span {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.card-notes-form {
  display: grid;
  gap: 10px;
}

.card-notes-form textarea {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: var(--input-bg);
  font: inherit;
  line-height: 1.45;
}

.card-notes-form textarea:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 18%, transparent);
}

.trash-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2'/%3E%3Cpath d='M19 6l-1 14c0 1-1 2-2 2H8c-1 0-2-1-2-2L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2'/%3E%3Cpath d='M19 6l-1 14c0 1-1 2-2 2H8c-1 0-2-1-2-2L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.detail-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.detail-pill-row span {
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--pill-ink);
  background: var(--pill-bg);
  font-size: 0.82rem;
  font-weight: 850;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.card-detail-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.card-detail-lower-grid.is-comments-only {
  grid-template-columns: minmax(0, 1fr);
}

.purchase-history-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.purchase-history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.purchase-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto) 34px;
  gap: 12px;
  align-items: center;
  border: 1px solid #dfe7e3;
  border-radius: 8px;
  padding: 12px;
  background: var(--detail-bg);
}

.purchase-history-row strong,
.purchase-history-row b,
.purchase-history-row span {
  display: block;
}

.purchase-history-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.purchase-history-row small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 3px;
  text-align: right;
}

.purchase-history-row b {
  color: var(--ink);
  text-align: right;
}

.purchase-history-row.is-sale b {
  color: #9f3f34;
}

.purchase-history-row.is-adjustment b {
  color: var(--accent);
}

.delete-movement-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(159, 63, 52, 0.34);
  border-radius: 7px;
  color: #9f3f34;
  background: transparent;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

.delete-movement-button:hover {
  border-color: #9f3f34;
  background: rgba(159, 63, 52, 0.14);
}

.purchase-history-row > div:nth-of-type(2) span {
  text-align: right;
}

.card-comment-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.card-comment-form textarea {
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: var(--input-bg);
  font: inherit;
  line-height: 1.45;
}

.card-comment-form textarea:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 18%, transparent);
}

.card-comment-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.card-comment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border: 1px solid #dfe7e3;
  border-radius: 8px;
  padding: 12px;
  background: var(--detail-bg);
}

.card-comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.78rem;
}

.card-comment-author {
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.card-comment-author:hover {
  color: var(--accent);
}

.card-comment-row p {
  grid-column: 1;
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.report-content-button {
  justify-self: start;
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.report-content-button:hover {
  color: #9f3f34;
}

.card-comment-row > .report-content-button {
  grid-column: 1;
}

.comment-upvote-button {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  min-width: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  background: var(--button-bg);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-weight: 900;
}

.comment-upvote-button.is-active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--button-bg));
}

.comment-upvote-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 22, 0.48);
  backdrop-filter: blur(8px);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-overlay-stacked {
  z-index: 52;
  background: rgba(17, 24, 22, 0.28);
}

#shareOverlay {
  z-index: 50;
}

.edit-modal {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--modal-bg);
  box-shadow: 0 24px 80px rgba(17, 24, 22, 0.24);
}

.add-modal {
  width: min(860px, 100%);
  max-height: min(820px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--modal-bg);
  box-shadow: 0 24px 80px rgba(17, 24, 22, 0.24);
}

.sale-modal {
  width: min(1080px, 100%);
  max-height: min(880px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--modal-bg);
  box-shadow: 0 24px 80px rgba(17, 24, 22, 0.24);
}

.edit-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.edit-modal-head h2 {
  font-size: 1.25rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.modal-close {
  flex: 0 0 auto;
}

.edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.edit-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.edit-form input,
.edit-form select,
.edit-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--input-bg);
  color: var(--ink);
  font-weight: 500;
}

.edit-form input,
.edit-form select {
  min-height: 40px;
}

.edit-form textarea {
  padding-top: 10px;
  resize: vertical;
}

.full-field,
.edit-form-wide,
.modal-actions {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.primary-button {
  background: var(--primary-bg);
  border-color: var(--primary-bg);
  color: #ffffff;
}

.primary-button:hover {
  color: #ffffff;
  background: var(--primary-hover);
}

.secondary-button {
  background: var(--button-bg);
}

.add-search-form,
.add-card-form {
  padding: 18px;
}

.add-search-form {
  padding-bottom: 0;
}

.add-search-form label,
.add-card-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.edit-form .checkbox-field,
.add-card-form .checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  align-self: end;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--input-bg);
  color: var(--ink);
}

.edit-form .checkbox-field input,
.add-card-form .checkbox-field input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
}

.edit-form .checkbox-field span,
.add-card-form .checkbox-field span {
  font-size: 0.82rem;
  font-weight: 800;
}

.search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.search-control input,
.search-button,
.add-card-form input,
.add-card-form select {
  min-height: 40px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
}

.search-control input,
.add-card-form input,
.add-card-form select {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
}

.search-button {
  cursor: pointer;
  font-size: 1rem;
}

.search-button:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.add-search-status {
  min-height: 22px;
  padding: 8px 18px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.add-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding: 10px 18px 0;
}

.add-result {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-width: 0;
  border: 1px solid #dfe7e3;
  border-radius: 8px;
  padding: 9px;
  background: var(--detail-bg);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.add-result:hover,
.add-result.is-selected {
  border-color: var(--accent);
  background: var(--button-hover);
}

.add-result img,
.selected-add-card img {
  width: 52px;
  height: 72px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--wash);
}

.add-result strong,
.add-result span {
  display: block;
}

.add-result strong {
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.add-result span,
.selected-add-card span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.add-result .owned-count,
.selected-add-card .owned-count {
  margin-top: 4px;
  color: #17332d;
  font-size: 0.8rem;
  font-weight: 800;
}

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

.selected-add-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--detail-bg);
}

.settings-modal {
  width: min(520px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--modal-bg);
  box-shadow: 0 24px 80px rgba(17, 24, 22, 0.24);
}

.share-modal {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--modal-bg);
  box-shadow: 0 24px 80px rgba(17, 24, 22, 0.24);
}

.share-content {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.share-content label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.share-content input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--input-bg);
  color: var(--ink);
  font-weight: 700;
}

.settings-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.settings-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.settings-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--input-bg);
  color: var(--ink);
}

.settings-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--input-bg);
  color: var(--ink);
}

.password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.password-toggle {
  min-height: 40px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 0.75rem;
  background: var(--panel-soft);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.subtle-button {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.subtle-button:hover {
  border-color: var(--line);
  color: var(--ink);
}

.settings-form textarea {
  width: 100%;
  min-height: 104px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 10px;
  background: var(--input-bg);
  color: var(--ink);
  resize: vertical;
}

.settings-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 18px;
}

.settings-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.danger-panel {
  padding-bottom: 18px;
}

.danger-panel .settings-help,
.settings-danger-actions {
  margin: 0 18px 14px;
}

.settings-danger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.decks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}

.sets-overview-shell,
.sets-detail-shell {
  max-width: 1400px;
  margin: 0 auto;
}

.sets-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
}

.set-card .eyebrow {
  color: var(--accent);
}

.set-card strong {
  color: var(--accent);
}

.set-card .set-card-progress {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.set-card .set-card-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.set-detail-head {
  margin-bottom: 18px;
}

.set-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.set-detail-actions .secondary-button {
  min-height: 34px;
}

.set-missing-wishlist-button {
  color: var(--accent);
}

.set-missing-wishlist-button .wishlist-icon {
  width: 18px;
  height: 18px;
}

.set-detail-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
}

.deck-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  appearance: none;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: end;
  min-height: 132px;
  border: 1px solid #111816;
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  color: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.deck-card > :not(.deck-card-art-stack) {
  position: relative;
  z-index: 2;
}

.deck-blog-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 1px solid #c7d1cd;
  border-radius: 7px;
  color: var(--ink);
  background: var(--button-bg);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

.deck-blog-button:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.deck-card.has-deck-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--panel) 0%, color-mix(in srgb, var(--panel) 82%, transparent) 46%, color-mix(in srgb, var(--panel) 38%, transparent) 100%);
}

.deck-card-art-stack {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.deck-card-art-stack img {
  position: absolute;
  right: calc(10px + (var(--slot) * 42px));
  top: 50%;
  width: 66px;
  height: 92px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  opacity: 0.42;
  filter: saturate(1.28) contrast(1.04);
  box-shadow: 0 12px 24px rgb(0 0 0 / 0.24);
  transform: translateY(-50%) rotate(calc(-5deg + (var(--slot) * 2deg)));
}

.deck-card-art-stack img:nth-child(2n) {
  top: 53%;
}

.deck-card-art-stack img:nth-child(3n) {
  top: 47%;
}

.deck-card:hover {
  background: var(--button-hover);
  transform: translateY(-1px);
}

.deck-card:hover .deck-card-art-stack img {
  opacity: 0.52;
}

.browse-decks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 14px;
}

.browse-deck-card {
  display: block;
  min-height: 0;
  padding: 14px;
  cursor: default;
}

.browse-deck-card.has-deck-preview::after {
  background:
    linear-gradient(90deg, var(--panel) 0%, color-mix(in srgb, var(--panel) 88%, transparent) 52%, color-mix(in srgb, var(--panel) 46%, transparent) 100%);
}

.browse-deck-head,
.browse-deck-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.browse-deck-head h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.browse-deck-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.browse-deck-actions .share-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
}

.browse-deck-actions .is-favorite {
  color: #b37505;
  border-color: color-mix(in srgb, #b37505 45%, var(--line));
  background: color-mix(in srgb, #f4c66a 20%, var(--button-bg));
}

.browse-deck-meta {
  margin-top: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.browse-deck-meta strong {
  color: var(--accent);
}

.browse-deck-description {
  position: relative;
  z-index: 2;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.browse-deck-card-table {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  font-size: 0.78rem;
}

.browse-deck-card-table th,
.browse-deck-card-table td {
  padding: 7px 8px;
  text-align: left;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  vertical-align: top;
}

.browse-deck-card-table th {
  color: var(--muted);
  background: color-mix(in srgb, var(--button-bg) 70%, transparent);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.browse-deck-card-table td:first-child {
  width: 58%;
  font-weight: 850;
  color: var(--ink);
}

.browse-deck-card-table tr:last-child td {
  border-bottom: 0;
}

.browse-deck-card-row {
  cursor: pointer;
}

.browse-deck-card-row:hover td,
.browse-deck-card-row:focus-visible td {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.browse-deck-card-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.browse-deck-more,
.browse-deck-empty {
  position: relative;
  z-index: 2;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.deck-card h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.35rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.deck-card h3 span {
  min-width: 0;
}

.browse-deck-card .browse-deck-head h3 {
  margin: 0;
  display: block;
  font-size: 1.18rem;
  line-height: 1.12;
}

.container-card h3 .container-icon {
  color: var(--accent-3);
}

.wishlist-list-card h3 .wishlist-icon {
  color: var(--accent-2);
}

.wishlist-open-button {
  appearance: none;
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.wishlist-card-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.wishlist-card-actions .share-button {
  width: 36px;
  height: 36px;
}

.favorites-mixed-shell {
  display: grid;
  gap: 16px;
}

.favorites-card-grid,
.favorites-card-list {
  width: 100%;
}

.favorite-decks-section {
  display: grid;
  gap: 10px;
}

.favorite-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.favorite-decks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}

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

.favorite-store-row {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

.favorite-store-row .wishlist-card-actions {
  align-self: center;
}

.favorite-deck-card .deck-icon,
.favorite-deck-share-row .deck-icon {
  color: var(--accent);
}

.send-icon {
  position: relative;
  width: 17px;
  height: 17px;
  display: inline-block;
  transform: rotate(-18deg);
}

.send-icon::before {
  content: "";
  position: absolute;
  inset: 2px 1px 3px 2px;
  clip-path: polygon(0 0, 100% 50%, 0 100%, 24% 55%);
  background: currentColor;
}

.send-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 8px;
  height: 1px;
  background: var(--panel);
  transform: rotate(-18deg);
  opacity: 0.9;
}

.deck-card strong {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

.deck-card span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.deck-card .container-location {
  grid-column: auto;
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.import-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.import-panel > .import-icon,
.import-panel > .collection-icon {
  color: var(--accent);
}

.import-panel h3 {
  margin: 0;
  font-size: 1.25rem;
}

.import-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.import-panel input[type="file"] {
  width: 100%;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 10px;
  background: var(--input-bg);
  color: var(--ink);
}

.import-wizard {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.import-steps span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--muted);
  background: var(--field-bg);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.import-steps span.is-active {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--field-bg));
}

.import-steps span.is-complete {
  color: var(--accent);
}

.import-step-panel {
  display: grid;
  gap: 14px;
  min-height: 260px;
}

.import-source-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: stretch;
}

.import-source-grid textarea,
.import-mapping-row select,
.import-wizard-row input,
.import-wizard-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: var(--input-bg);
  font: inherit;
}

.import-source-grid textarea {
  min-height: 190px;
  resize: vertical;
}

.import-mapping-table {
  display: grid;
  gap: 8px;
}

.import-mapping-head,
.import-mapping-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(180px, 1fr) 92px;
  gap: 10px;
  align-items: center;
}

.import-mapping-head {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.import-mapping-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--detail-bg);
}

.import-mapping-row strong {
  color: var(--ink);
}

.import-mapping-row span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.import-json-preview {
  display: grid;
  gap: 10px;
}

.import-json-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--detail-bg);
}

.import-json-card.needs-review {
  border-color: rgba(159, 63, 52, 0.34);
}

.import-json-card strong,
.import-json-card span {
  display: block;
}

.import-json-card span,
.import-json-card p {
  color: var(--muted);
  font-size: 0.86rem;
}

.import-wizard-rows,
.import-recap-rows {
  display: grid;
  gap: 10px;
}

.import-wizard-row {
  display: grid;
  grid-template-columns: 28px minmax(150px, 0.9fr) minmax(180px, 1fr) 72px minmax(220px, 1fr) 36px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--detail-bg);
}

.import-wizard-row.needs-review {
  border-color: rgba(159, 63, 52, 0.34);
}

.import-wizard-row > b {
  color: var(--ink);
  text-align: center;
}

.import-recap-rows h4 {
  margin: 10px 0 0;
}

.import-recap-list {
  display: grid;
  gap: 8px;
}

.import-recap-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--detail-bg);
}

.import-recap-list span {
  color: var(--muted);
  font-size: 0.84rem;
}

.import-progress {
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}

.import-progress[hidden] {
  display: none;
}

.import-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
}

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

.import-progress-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 68%, transparent);
}

.import-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 58%, #ffffff));
  transition: width 180ms ease;
}

.import-wizard-actions {
  justify-content: flex-end;
}

.import-review-modal {
  width: min(1180px, 100%);
  max-height: min(860px, calc(100vh - 28px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--modal-bg);
  box-shadow: 0 24px 80px rgba(17, 24, 22, 0.24);
}

.import-review-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 850;
}

.import-issues {
  display: grid;
  gap: 6px;
  padding: 0 18px;
}

.import-issues div {
  border: 1px solid rgba(159, 63, 52, 0.28);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--accent-2);
  background: rgba(159, 63, 52, 0.08);
  font-size: 0.84rem;
  font-weight: 800;
}

.import-review-rows {
  display: grid;
  gap: 9px;
  padding: 16px 18px;
}

.import-review-row {
  display: grid;
  grid-template-columns: 28px minmax(170px, 0.95fr) minmax(190px, 1fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--detail-bg);
}

.import-review-row.needs-review {
  border-color: rgba(159, 63, 52, 0.34);
}

.import-row-check {
  display: grid;
  place-items: center;
}

.import-row-source strong,
.import-row-match strong {
  display: block;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.import-row-source span,
.import-row-match span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.import-row-tools {
  display: grid;
  gap: 7px;
}

.import-row-tools select {
  min-height: 38px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 9px;
  background: var(--input-bg);
  color: var(--ink);
}

.import-review-actions {
  padding: 0 18px 18px;
}

.deck-detail-modal {
  width: min(820px, 100%);
  max-height: min(820px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--modal-bg);
  box-shadow: 0 24px 80px rgba(17, 24, 22, 0.24);
}

.deck-modal-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.modal-subtitle {
  display: block;
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.danger-icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(159, 63, 52, 0.44);
  border-radius: 8px;
  color: #9f3f34;
  background: rgba(159, 63, 52, 0.08);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.danger-icon-button:hover,
.remove-deck-card-button:hover {
  border-color: #9f3f34;
  background: rgba(159, 63, 52, 0.14);
}

.danger-action-button {
  min-height: 38px;
  border: 1px solid rgba(159, 63, 52, 0.44);
  border-radius: 8px;
  padding: 0 13px;
  color: #9f3f34;
  background: rgba(159, 63, 52, 0.08);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 900;
}

.danger-action-button:hover {
  border-color: #9f3f34;
  background: rgba(159, 63, 52, 0.14);
}

.deck-detail-list {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.deck-editor-shell {
  max-width: 1280px;
  margin: 0 auto;
}

.deck-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 18px;
  align-items: start;
}

.deck-editor-main,
.deck-editor-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.deck-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 18px 0;
}

.deck-editor-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.deck-editor-head span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

.deck-editor-card-list {
  padding-top: 14px;
}

.deck-editor-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.deck-editor-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.deck-editor-form input,
.deck-editor-form textarea {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--input-bg);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.35;
  resize: vertical;
}

.deck-editor-form textarea {
  min-height: 96px;
}

.deck-editor-form .deck-private-toggle {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--detail-bg);
  cursor: pointer;
}

.deck-private-toggle input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--accent);
}

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

.deck-private-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: none;
}

.deck-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.deck-editor-delete {
  justify-content: center;
}

.deck-json-button {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
}

.extract-json-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.extract-json-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 2px;
  height: 6px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.extract-json-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 1px;
  width: 5px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.json-modal {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-strong);
}

.json-modal-content {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.json-modal-content textarea {
  width: 100%;
  min-height: 360px;
  resize: vertical;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: var(--input-bg);
  font: 0.82rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.deck-import-modal {
  width: min(920px, calc(100vw - 28px));
}

.deck-import-modal .json-modal-content textarea {
  min-height: 220px;
}

.modal-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.import-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.import-mode-row label,
.file-import-field {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.file-import-field {
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 88%, var(--accent-soft));
}

.deck-import-preview {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 90%, var(--accent-soft));
}

.deck-import-preview-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.deck-import-preview-head strong {
  color: var(--ink);
}

.deck-import-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.deck-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--input-bg);
}

.deck-import-row.needs-review {
  border-color: #d97706;
  background: color-mix(in srgb, #f59e0b 14%, var(--input-bg));
}

.deck-import-row label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.deck-import-row input {
  width: min(320px, 100%);
  min-height: 34px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--panel);
  font-size: 0.92rem;
  text-transform: none;
}

.deck-import-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.deck-import-row.needs-review p {
  color: #92400e;
}

.deck-import-row > span {
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.84rem;
}

.wishlist-detail-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 16px 12px;
}

.wishlist-detail-toolbar input,
.wishlist-detail-toolbar select {
  min-height: 38px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--input-bg);
  font-weight: 800;
}

.wishlist-detail-grid {
  padding: 0 16px 16px;
}

.wishlist-card-row.is-fulfilled {
  border-color: color-mix(in srgb, var(--accent-2) 44%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 42%),
    var(--panel);
}

.shared-wishlist-market-links {
  margin-top: 8px;
}

.assign-wishlist-preview {
  display: grid;
  gap: 8px;
}

.assign-wishlist-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--detail-bg);
}

.assign-wishlist-card img {
  width: 46px;
  height: 64px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--wash);
}

.assign-wishlist-card strong,
.assign-wishlist-card span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.assign-wishlist-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.card-decks-list {
  display: grid;
  gap: 9px;
}

.card-deck-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--detail-bg);
  cursor: pointer;
  font-weight: 850;
  text-align: left;
}

.card-deck-link .deck-icon {
  color: var(--accent);
}

.card-deck-link small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.card-container-link .container-icon {
  color: var(--accent-3);
}

.card-container-link span {
  display: grid;
  gap: 2px;
}

.card-container-link small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.card-deck-link:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.deck-card-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--detail-bg);
}

.deck-card-preview-trigger {
  cursor: pointer;
}

.deck-card-preview-trigger:hover,
.deck-card-preview-trigger:focus-visible {
  border-color: var(--accent);
  background: var(--button-hover);
  outline: none;
}

.deck-card-row.is-short {
  border-color: color-mix(in srgb, #b86a1e 48%, var(--line));
  background: color-mix(in srgb, #f3b35c 14%, var(--detail-bg));
}

.deck-card-row img {
  width: 46px;
  height: 64px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--wash);
}

.deck-card-row strong,
.deck-card-row span {
  display: block;
}

.deck-card-row strong {
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.deck-card-row span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.deck-card-row .deck-inventory-status {
  width: fit-content;
  margin-top: 6px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--pill-ink);
  background: var(--pill-bg);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
}

.deck-card-row .deck-inventory-status.is-short {
  border-color: color-mix(in srgb, #b86a1e 56%, var(--pill-border));
  color: #6f3900;
  background: #fff0cf;
}

.deck-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.deck-card-row .deck-card-tags span,
.deck-card-search-result .deck-card-tags span {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
}

.deck-card-row b {
  color: var(--ink);
  font-size: 0.9rem;
  white-space: nowrap;
}

.deck-card-preview-modal {
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--dashboard-bg);
  box-shadow: var(--shadow-strong);
}

.deck-card-preview-shell {
  padding: 0 18px 18px;
}

.deck-card-preview-card {
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) 54px;
  gap: 18px;
}

.deck-card-preview-card .shared-card-copy h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
}

.deck-card-preview-card .shared-card-details {
  margin-top: 16px;
}

.remove-deck-card-button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(159, 63, 52, 0.34);
  border-radius: 7px;
  color: #9f3f34;
  background: transparent;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  line-height: 1;
}

.deck-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 16px;
}

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

.deck-card-search-results {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding: 10px 18px 18px;
}

.deck-card-search-result {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  color: var(--ink);
  background: var(--detail-bg);
  text-align: left;
}

.deck-card-search-result:hover {
  border-color: var(--accent);
  background: var(--button-hover);
}

.deck-card-search-result img {
  width: 46px;
  height: 64px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--wash);
}

.deck-card-search-result strong,
.deck-card-search-result small {
  display: block;
}

.deck-card-search-result strong {
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.deck-card-search-result small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.deck-card-search-result b {
  color: var(--ink);
  font-size: 0.84rem;
  white-space: nowrap;
}

.deck-quantity-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.deck-quantity-field input {
  width: 74px;
  min-height: 34px;
  border: 1px solid #c7d1cd;
  border-radius: 8px;
  padding: 0 8px;
  color: var(--ink);
  background: var(--input-bg);
  font-weight: 850;
}

.deck-add-card-button {
  min-height: 34px;
  padding: 0 12px;
}

.assign-deck-cards {
  display: grid;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
}

.inline-create-button {
  width: fit-content;
  justify-self: start;
}

.sale-cards {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.sale-modal-row {
  display: grid;
  grid-template-columns: 28px 42px minmax(0, 1fr) 88px auto 96px 120px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--detail-bg);
}

.sale-modal-check {
  display: grid;
  place-items: center;
}

.sale-modal-row img {
  width: 42px;
  height: 58px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--wash);
}

.sale-modal-card-copy {
  min-width: 0;
}

.sale-modal-card-copy strong,
.sale-modal-card-copy span {
  display: block;
}

.sale-modal-card-copy strong {
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.sale-modal-card-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.assign-deck-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--detail-bg);
}

.assign-deck-card img {
  width: 42px;
  height: 58px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--wash);
}

.assign-deck-card strong,
.assign-deck-card span {
  display: block;
}

.assign-deck-card strong {
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.assign-deck-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.assign-container-cards {
  display: grid;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
  padding-right: 2px;
}

.assign-container-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 82px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--detail-bg);
}

.assign-container-row img {
  width: 38px;
  height: 53px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--wash);
}

.assign-container-row strong,
.assign-container-row span {
  display: block;
}

.assign-container-row strong {
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.assign-container-row span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.assign-container-row label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.assign-container-row input {
  width: 100%;
  min-height: 36px;
  margin-top: 4px;
  border: 1px solid #c7d1cd;
  border-radius: 7px;
  padding: 0 8px;
  background: var(--input-bg);
  color: var(--ink);
}

.deck-share-shell {
  max-width: 1220px;
  margin: 0 auto;
}

.shared-deck-card {
  border: 1px solid #111816;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.shared-deck-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 0;
}

.shared-deck-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
  align-content: start;
}

.shared-deck-actions .share-button {
  width: 42px;
  height: 42px;
}

.shared-deck-action-status {
  grid-column: 1 / -1;
  min-width: 180px;
  text-align: right;
}

.shared-deck-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

.shared-deck-head span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

.shared-deck-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
  padding: 16px;
}

.shared-deck-list {
  padding: 0;
}

.shared-deck-notes {
  display: grid;
  gap: 12px;
}

.shared-note-box {
  min-height: 126px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--input-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.shared-note-box-large {
  min-height: 238px;
}

.shared-note-box p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.wishlist-shared-row.is-fulfilled {
  opacity: 0.62;
  background: color-mix(in srgb, var(--panel-soft) 74%, var(--button-bg));
}

.wishlist-shared-row.is-fulfilled strong,
.wishlist-shared-row.is-fulfilled b {
  color: var(--muted);
}

.favorite-decks-share-list {
  display: grid;
  gap: 10px;
  padding: 16px 16px 0;
}

.favorite-deck-share-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.selected-add-card strong {
  display: block;
  margin-bottom: 3px;
  line-height: 1.15;
}

.selected-add-card p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.selected-add-card[hidden] {
  display: none;
}

.primary-button:disabled,
.search-button:disabled,
.icon-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed #aab8b3;
  border-radius: 8px;
  color: var(--muted);
  background: var(--empty-bg);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .command-menu {
    position: sticky;
    top: 79px;
    z-index: 8;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px clamp(16px, 4vw, 48px);
  }

  .command-menu nav {
    display: flex;
    flex-wrap: wrap;
  }

  .nav-command {
    width: auto;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-meta-grid,
  .metric-grid,
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .deck-editor-layout {
    grid-template-columns: 1fr;
  }

  .shared-deck-content {
    grid-template-columns: 1fr;
  }

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

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

  .admin-user-row {
    grid-template-columns: minmax(0, 1fr) 130px 104px;
  }

  .admin-report-row {
    grid-template-columns: 1fr;
  }

  .admin-report-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

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

  .user-profile-layout {
    grid-template-columns: 1fr;
  }

  .admin-user-row .admin-save-user-button,
  .admin-user-row .admin-delete-user-button {
    justify-self: start;
  }

  .chart-panel {
    grid-column: 1 / -1;
  }

  .card-list-row {
    grid-template-columns: 30px 64px minmax(0, 1fr) auto;
  }

  .missing-card-row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
  }

  .sale-card-row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
  }

  .store-front-card-detail {
    grid-template-columns: 1fr;
  }

  .store-front-market-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sale-available,
  .sale-value-pill {
    grid-column: span 1;
  }

  .sale-card-row .sale-inline-field {
    grid-column: 2 / 4;
    width: min(100%, 220px);
  }

  .sale-modal-row {
    grid-template-columns: 28px 42px minmax(0, 1fr) 88px auto;
  }

  .sale-modal-row .sale-inline-field {
    grid-column: span 1;
  }

  .missing-card-art {
    width: 64px;
    height: 89px;
  }

  .missing-card-title-row {
    display: grid;
  }

  .missing-card-pills {
    justify-content: flex-start;
    max-width: none;
  }

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

  .import-source-grid,
  .import-mapping-head,
  .import-mapping-row,
  .import-wizard-row,
  .import-recap-list article {
    grid-template-columns: 1fr;
  }

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

  .import-review-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .import-row-tools {
    grid-column: 2 / -1;
  }

  .list-pills {
    grid-column: 3 / 5;
    justify-content: flex-start;
  }

  .list-actions {
    grid-column: 4 / 5;
    grid-row: 1 / 2;
  }

  .list-card-art {
    width: 64px;
    height: 89px;
  }
}

@media (max-width: 720px) {
  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .home-meta-grid,
  .metric-grid,
  .dashboard-grid,
  .cards-grid,
  .sets-grid {
    grid-template-columns: 1fr;
  }

  .deck-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .admin-server-details {
    grid-template-columns: 1fr;
  }

  .user-profile-hero {
    grid-template-columns: 1fr;
  }

  .user-profile-stats,
  .profile-deck-list {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: 280px;
  }

  .chart-panel {
    min-height: 400px;
  }

  .shared-card {
    grid-template-columns: 1fr;
  }

  .card-detail-layout {
    grid-template-columns: 1fr;
  }

  .card-detail-lower-grid {
    grid-template-columns: 1fr;
  }

  .editable-card-detail {
    grid-template-columns: 1fr;
  }

  .card-detail-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .shared-card-art {
    max-width: min(300px, 100%);
  }

  .purchase-history-row {
    grid-template-columns: 1fr;
  }

  .purchase-history-row b,
  .purchase-history-row > div:nth-of-type(2) span,
  .purchase-history-row small {
    text-align: left;
  }

  .card-comment-row {
    grid-template-columns: 1fr;
  }

  .comment-upvote-button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    flex-direction: row;
  }

  .collection-card-body {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .card-art {
    width: 86px;
    height: 120px;
  }

  .edit-form,
  .add-card-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-card-head {
    align-items: flex-start;
  }

  .card-list-row {
    grid-template-columns: 28px 58px minmax(0, 1fr);
  }

  .missing-card-row {
    grid-template-columns: 58px minmax(0, 1fr) 34px;
    align-items: start;
  }

  .sale-card-row {
    grid-template-columns: 58px minmax(0, 1fr) 34px;
    align-items: start;
  }

  .store-front-sellers-head {
    display: none;
  }

  .store-front-seller-row {
    grid-template-columns: 1fr;
  }

  .store-front-seller-row b {
    justify-self: start;
  }

  .store-front-market-details {
    grid-template-columns: 1fr;
  }

  .sale-available,
  .sale-value-pill,
  .sale-card-row .sale-inline-field {
    grid-column: 2 / 4;
    justify-self: stretch;
  }

  .remove-sale-button {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
  }

  .sale-modal-row {
    grid-template-columns: 28px 42px minmax(0, 1fr);
  }

  .sale-modal-row .sale-readonly-field,
  .sale-modal-row .sale-value-pill,
  .sale-modal-row .sale-inline-field {
    grid-column: 3 / 4;
    justify-self: start;
  }

  .missing-card-art {
    width: 58px;
    height: 81px;
  }

  .missing-market-links a {
    flex: 1 1 calc(50% - 7px);
  }

  .list-card-art {
    width: 58px;
    height: 81px;
  }

  .list-pills,
  .list-actions {
    grid-column: 2 / 4;
  }

  .list-actions {
    grid-row: auto;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .catalog-welcome {
    grid-template-columns: 1fr;
  }

  .catalog-welcome-stack {
    justify-self: start;
    width: min(58vw, 170px);
    margin-left: 20px;
  }

  .sale-card-row {
    grid-template-columns: 52px minmax(0, 1fr) 34px;
    gap: 10px;
    padding: 9px;
  }

  .sale-card-art {
    width: 52px;
    height: 73px;
  }

  .sale-inline-field {
    width: 100%;
  }

  .sale-modal-row {
    grid-template-columns: 24px 40px minmax(0, 1fr);
  }

  .missing-card-row {
    grid-template-columns: 52px minmax(0, 1fr) 34px;
    gap: 10px;
    padding: 9px;
  }

  .missing-card-art {
    width: 52px;
    height: 73px;
  }

  .missing-market-links a {
    flex-basis: 100%;
  }

  .shared-card-details {
    grid-template-columns: 1fr;
  }

  .deck-card-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .deck-card-row b {
    grid-column: 2 / 3;
  }

  .remove-deck-card-button {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
  }

  .deck-detail-footer {
    flex-wrap: wrap;
  }

  .deck-card-search-result {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .deck-card-search-result .deck-quantity-field,
  .deck-card-search-result .deck-add-card-button {
    grid-column: 2 / 3;
    justify-self: start;
  }

  .assign-deck-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .assign-deck-card .deck-quantity-field {
    grid-column: 2 / 3;
    justify-self: start;
  }
}

@media (max-width: 430px) {
  .collection-card-head {
    flex-direction: column;
  }

  .card-actions {
    align-self: flex-start;
  }

  .collection-card-body {
    grid-template-columns: 1fr;
  }

  .card-art {
    width: min(160px, 100%);
    height: auto;
    aspect-ratio: 5 / 7;
  }

  .card-art img {
    object-position: top;
  }

  .edit-form,
  .add-card-form {
    grid-template-columns: 1fr;
  }
}
