/* Modern theme for pointer-driven tablet and desktop layouts. The mobile implementation
   remains owned by mobile-theme.css/mobile-pages.css below 761px. */
@media (min-width: 761px) {
  body.dark.mobile-modern {
    --bg:#121210;
    --surface:#1a1a17;
    --surface-2:#22221e;
    --surface-3:#2b2a25;
    --ink:#f0eadc;
    --muted:#9c9585;
    --line:#2e2d27;
    --brand:#d8b46c;
    --brand-2:#ecd49b;
    --mt-accent-soft:rgba(216,180,108,.12);
    --mt-gold:#d8b46c;
    --mt-gold-soft:rgba(216,180,108,.13);
    --mt-radius-lg:24px;
    --mt-radius-md:16px;
    --mt-radius-full:999px;
    --mt-shadow:0 24px 60px rgba(0,0,0,.42);
    --mp-soft:rgba(255,255,255,.025);
    --mp-card:color-mix(in srgb,var(--surface-2) 78%,var(--bg));
    --mp-line:var(--line);
    --mp-shadow-soft:0 8px 24px rgba(0,0,0,.24);
    --mp-gold-soft:var(--mt-gold-soft);
    --mp-danger-soft:rgba(173,73,63,.1);
    --font-display:"Cormorant Garamond",Georgia,serif;
    --font-ui:"Inter",sans-serif;
    --mt-stage-plate:#070707;
    --mt-stage-top:#181816;
    --mt-stage-outer:var(--bg);
    --mt-podium:radial-gradient(ellipse 28% 31% at 13% 82%,rgba(255,255,255,.18),transparent 70%),radial-gradient(ellipse 28% 31% at 87% 82%,rgba(255,255,255,.18),transparent 70%),radial-gradient(ellipse 62% 46% at 50% 54%,rgba(216,180,108,.3),transparent 68%),radial-gradient(ellipse 66% 22% at 50% 88%,rgba(210,177,107,.27),transparent 70%);
    color-scheme:dark;
    font-family:var(--font-ui);
    color:var(--ink);
    background:radial-gradient(circle at 78% -15%,rgba(216,180,108,.07),transparent 34%),radial-gradient(circle at 4% 72%,rgba(216,180,108,.03),transparent 32%),var(--bg);
  }

  body.dark.mobile-modern.mobile-light {
    --bg:#f5f0e6;
    --surface:#fffdf8;
    --surface-2:#eee8dc;
    --surface-3:#e7dfd0;
    --ink:#24291f;
    --muted:#827d70;
    --line:#dfd7c8;
    --brand:#1f3a2e;
    --brand-2:#385848;
    --mt-accent-soft:rgba(31,58,46,.085);
    --mt-gold:#bc974b;
    --mt-gold-soft:rgba(188,151,75,.12);
    --mt-shadow:0 22px 58px rgba(61,48,28,.11);
    --mp-soft:rgba(93,76,44,.032);
    --mp-shadow-soft:0 8px 22px rgba(61,48,28,.075);
    --mt-stage-plate:#bfb49d;
    --mt-stage-top:#e9e3d8;
    --mt-stage-outer:var(--bg);
    --mt-podium:radial-gradient(ellipse 28% 31% at 13% 82%,rgba(255,255,255,.75),transparent 70%),radial-gradient(ellipse 28% 31% at 87% 82%,rgba(255,255,255,.75),transparent 70%),radial-gradient(ellipse 60% 43% at 50% 54%,rgba(255,255,255,.94),transparent 64%),radial-gradient(ellipse 64% 18% at 50% 89%,rgba(84,61,28,.13),transparent 74%);
    color-scheme:light;
    background:radial-gradient(circle at 78% -18%,rgba(194,165,108,.13),transparent 37%),radial-gradient(circle at 2% 72%,rgba(84,112,91,.07),transparent 34%),var(--bg);
  }

  /* The card stage is a lit showcase in both appearances: spotlight, reflection and the foil
     effects are built for a light backdrop and drown on a dark one. In the dark appearance the
     stage therefore carries the light palette of its own; the panel next to it stays dark. */
  body.dark.mobile-modern:not(.mobile-light) .card-stage {
    --bg:#f5f0e6;--surface:#fffdf8;--surface-2:#eee8dc;--surface-3:#e7dfd0;--ink:#24291f;--muted:#827d70;--line:#dfd7c8;
    --brand:#1f3a2e;--brand-2:#385848;--mt-shadow:0 22px 58px rgba(61,48,28,.11);--mp-shadow-soft:0 8px 22px rgba(61,48,28,.075);
    --mt-stage-plate:#bfb49d;--mt-stage-top:#e9e3d8;--mt-stage-outer:#f5f0e6;
    --mt-podium:radial-gradient(ellipse 28% 31% at 13% 82%,rgba(255,255,255,.75),transparent 70%),radial-gradient(ellipse 28% 31% at 87% 82%,rgba(255,255,255,.75),transparent 70%),radial-gradient(ellipse 60% 43% at 50% 54%,rgba(255,255,255,.94),transparent 64%),radial-gradient(ellipse 64% 18% at 50% 89%,rgba(84,61,28,.13),transparent 74%);
    color-scheme:light;
  }

  body.dark.mobile-modern :is(button,input,select,textarea) { font-family:var(--font-ui); }
  body.dark.mobile-modern :is(h1,h2,h3,.brand-word,.modal-price) { font-family:var(--font-display);letter-spacing:-.015em; }
  body.dark.mobile-modern :is(h1,h2,h3,h4,b,strong) { color:var(--ink); }
  body.dark.mobile-modern :is(p,small,label) { color:var(--muted); }
  body.dark.mobile-modern .mobile-tabbar { display:none; }

  /* Desktop shell */
  body.dark.mobile-modern .app-shell { padding-left:226px; }
  body.dark.mobile-modern .sidebar {
    width:226px;padding:22px 14px 16px;border-right:1px solid color-mix(in srgb,var(--line) 72%,transparent);
    background:linear-gradient(180deg,color-mix(in srgb,var(--surface) 94%,var(--bg)),color-mix(in srgb,var(--surface) 86%,var(--bg)));color:var(--ink);
    box-shadow:12px 0 40px rgba(39,31,18,.045);
  }
  body.dark.mobile-modern .brand { min-height:48px;padding:0 10px 24px;color:var(--ink); }
  body.dark.mobile-modern .brand-symbol { color:var(--brand); }
  body.dark.mobile-modern .brand-word { gap:4px;font-size:16px;letter-spacing:.09em; }
  body.dark.mobile-modern .brand-word b { color:var(--ink); }
  body.dark.mobile-modern .brand-word span { color:var(--brand); }
  body.dark.mobile-modern .sidebar-collapse {
    right:12px;top:50%;width:28px;height:28px;transform:translateY(-50%);border:1px solid var(--line);
    background:var(--surface-2);color:var(--muted);box-shadow:none;
  }
  body.dark.mobile-modern .sidebar-collapse:hover { background:var(--surface-3);color:var(--ink); }
  body.dark.mobile-modern .main-nav { gap:7px; }
  body.dark.mobile-modern .nav-item {
    position:relative;min-height:48px;gap:10px;padding:0 10px;border-radius:15px;color:var(--muted);font-size:12px;font-weight:650;
  }
  body.dark.mobile-modern .nav-item:hover { background:color-mix(in srgb,var(--surface-2) 58%,transparent);color:var(--ink); }
  body.dark.mobile-modern .nav-item.active {
    background:color-mix(in srgb,var(--surface-2) 84%,var(--brand) 16%);color:var(--ink);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand) 13%,transparent);
  }
  body.dark.mobile-modern .nav-icon { display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border-radius:11px;transition:background .18s ease,color .18s ease,transform .18s ease; }
  body.dark.mobile-modern .nav-item:hover .nav-icon { transform:translateX(1px); }
  body.dark.mobile-modern .nav-item.active .nav-icon { background:var(--surface);color:var(--brand);box-shadow:0 4px 12px rgba(39,31,18,.07); }
  body.dark.mobile-modern .nav-icon svg { display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round; }
  body.dark.mobile-modern .count-badge { min-width:22px;padding:3px 7px;background:var(--mt-gold-soft);color:var(--mt-gold);font-size:10px; }
  body.dark.mobile-modern .edit-panel {
    display:flex;align-items:center;gap:10px;margin:10px 0 14px;padding:10px;border:0;border-radius:17px;
    background:color-mix(in srgb,var(--surface-2) 72%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--line) 55%,transparent);
  }
  body.dark.mobile-modern .edit-panel.on { background:color-mix(in srgb,var(--surface-2) 72%,var(--brand) 28%);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand) 22%,transparent); }
  body.dark.mobile-modern .edit-panel-icon { display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:11px;background:var(--surface);color:var(--muted);transition:.2s ease; }
  body.dark.mobile-modern .edit-panel-icon svg { width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
  body.dark.mobile-modern .edit-panel.on .edit-panel-icon { background:var(--brand);color:var(--surface);box-shadow:0 5px 14px color-mix(in srgb,var(--brand) 24%,transparent); }
  body.dark.mobile-modern .edit-panel-copy { min-width:0;flex:1; }
  body.dark.mobile-modern .edit-panel-copy strong,body.dark.mobile-modern .edit-panel-copy span { display:block;white-space:nowrap; }
  body.dark.mobile-modern .edit-panel-copy strong { color:var(--ink);font-size:11px;line-height:1.2; }
  body.dark.mobile-modern .edit-panel-copy span { margin-top:3px;color:var(--muted);font-size:9.5px;line-height:1.2; }
  body.dark.mobile-modern .switch { position:relative;inset:auto;width:40px;height:24px;flex:0 0 40px;padding:3px;border:0;background:color-mix(in srgb,var(--muted) 25%,var(--surface));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--line) 78%,transparent); }
  body.dark.mobile-modern .switch span { width:18px;height:18px;background:var(--surface);box-shadow:0 2px 6px rgba(0,0,0,.18); }
  body.dark.mobile-modern .switch[aria-checked="true"] { background:var(--brand);box-shadow:none; }
  body.dark.mobile-modern .switch[aria-checked="true"] span { transform:translateX(16px); }
  body.dark.mobile-modern .switch:focus-visible { outline:2px solid var(--brand);outline-offset:3px; }
  body.dark.mobile-modern .user-menu { min-height:54px;padding:11px 8px 0;border-color:color-mix(in srgb,var(--line) 72%,transparent); }
  body.dark.mobile-modern .edit-panel p,body.dark.mobile-modern .user-menu small { color:var(--muted); }
  body.dark.mobile-modern .avatar { background:var(--mt-gold-soft);color:var(--brand);box-shadow:none; }
  body.dark.mobile-modern .user-popup {
    border:1px solid var(--line);background:var(--surface);box-shadow:var(--mt-shadow);
  }
  body.dark.mobile-modern .topbar {
    height:76px;padding:0 34px;border:0;border-bottom:1px solid color-mix(in srgb,var(--line) 68%,transparent);
    background:color-mix(in srgb,var(--bg) 88%,transparent);box-shadow:0 12px 32px rgba(52,41,23,.035);
    backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);
  }
  body.dark.mobile-modern .global-game-picker { position:relative;display:grid;place-items:center;width:46px;height:46px;margin-right:12px; }
  body.dark.mobile-modern .global-game-icon {
    display:block;width:28px;height:28px;background:var(--brand);pointer-events:none;
    -webkit-mask:var(--tcg-icon) center/contain no-repeat;mask:var(--tcg-icon) center/contain no-repeat;
  }
  body.dark.mobile-modern .global-game-filter { position:absolute;inset:0;width:100%;min-width:0;height:100%;margin:0;padding:0;border:0;border-radius:50%;opacity:0;cursor:pointer; }
  body.dark.mobile-modern .global-search {
    width:min(560px,55vw);height:44px;padding:0 16px;border:1px solid var(--line);border-radius:var(--mt-radius-full);
    background:var(--surface-2);color:var(--muted);box-shadow:inset 0 1px rgba(255,255,255,.22);
  }
  body.dark.mobile-modern .global-search:hover { border-color:color-mix(in srgb,var(--brand) 35%,var(--line));background:var(--surface); }
  body.dark.mobile-modern .global-search kbd,body.dark.mobile-modern .search-input-wrap kbd {
    border-color:var(--line);background:var(--surface);color:var(--muted);box-shadow:none;
  }
  body.dark.mobile-modern .content { min-height:calc(100vh - 76px);padding:34px clamp(26px,3.2vw,58px) 72px;background:transparent;color:var(--ink); }
  body.dark.mobile-modern .content>* { width:100%;max-width:1560px;margin-inline:auto; }

  body.sidebar-collapsed.dark.mobile-modern .app-shell { padding-left:82px; }
  body.sidebar-collapsed.dark.mobile-modern .sidebar { width:82px;padding-inline:14px; }
  body.sidebar-collapsed.dark.mobile-modern .sidebar-collapse { right:12px;transform:translateY(-50%) rotate(180deg); }
  /* Edit mode shows in the top bar as a green pencil; a click on it ends edit mode. Without these
     rules the unstyled icon filled its box and read as a dark square. */
  body.dark.mobile-modern .edit-indicator {
    place-items:center;width:38px;height:38px;padding:0;border-radius:50%;cursor:pointer;
    background:color-mix(in srgb,var(--brand) 16%,transparent);color:var(--brand);
    box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand) 40%,transparent);transition:background .15s ease;
  }
  body.dark.mobile-modern .edit-indicator:hover { background:color-mix(in srgb,var(--brand) 28%,transparent); }
  body.dark.mobile-modern.editing .edit-indicator { display:grid; }
  body.dark.mobile-modern .edit-indicator svg { width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
  /* In the narrow rail the edit switch shrinks to its icon, which then is the switch (see
     main.js). The full panel does not fit there and used to spill over the page. */
  body.sidebar-collapsed.dark.mobile-modern .edit-panel { justify-content:center;margin-inline:auto;padding:8px;width:max-content;cursor:pointer; }
  body.sidebar-collapsed.dark.mobile-modern .edit-panel :is(.edit-panel-copy,.switch) { display:none; }

  /* Shared controls and focus/hover behaviour */
  body.dark.mobile-modern :is(.primary-button,.secondary-button,.danger-button,.icon-button,.select-control,.filter-search input) {
    min-height:40px;border-radius:var(--mt-radius-full);box-shadow:none;
  }
  body.dark.mobile-modern :is(.primary-button,.secondary-button,.danger-button) { display:inline-flex;align-items:center;justify-content:center;line-height:1; }
  body.dark.mobile-modern .icon-button { display:inline-grid;place-items:center;padding:0;line-height:1; }
  body.dark.mobile-modern .primary-button { border:0;background:var(--brand);color:var(--bg); }
  body.dark.mobile-modern .primary-button:hover { background:color-mix(in srgb,var(--brand) 87%,white);transform:translateY(-1px);box-shadow:0 8px 22px rgba(31,58,46,.14); }
  body.dark.mobile-modern :is(.secondary-button,.icon-button) {
    border:1px solid var(--line);background:var(--mp-card);color:var(--ink);
  }
  body.dark.mobile-modern :is(.select-control,.filter-search input) {
    border:1px solid var(--line);background:var(--surface-2);color:var(--ink);
  }
  body.dark.mobile-modern :is(.secondary-button,.icon-button):hover { background:var(--surface-2);border-color:color-mix(in srgb,var(--brand) 22%,var(--line)); }
  body.dark.mobile-modern .danger-button { border:1px solid rgba(173,73,63,.12);background:var(--mp-danger-soft);color:#aa625b; }
  body.dark.mobile-modern :is(button,a,input,select,textarea):focus-visible { outline:2px solid color-mix(in srgb,var(--brand) 65%,white);outline-offset:3px; }
  body.dark.mobile-modern .segmented { border:0;border-radius:var(--mt-radius-full);background:var(--surface-2); }
  body.dark.mobile-modern .segmented button { border-radius:var(--mt-radius-full); }
  body.dark.mobile-modern .segmented button.active { background:var(--mp-card);color:var(--ink);box-shadow:var(--mp-shadow-soft); }
  body.dark.mobile-modern .eyebrow { color:var(--mt-gold);font-size:9px;letter-spacing:.14em; }
  body.dark.mobile-modern .page-head { align-items:center;margin-bottom:24px; }
  body.dark.mobile-modern .page-head h1 { margin-bottom:4px;font-size:38px;font-weight:600; }
  body.dark.mobile-modern .page-head p { font-size:12px; }

  /* Collapsible filter component, shared by every catalogue page. */
  body.dark.mobile-modern .mobile-filter-shell { display:block;width:100%;margin:0 auto 20px; }
  body.dark.mobile-modern .mobile-filter-shell.is-open { position:relative;z-index:24; }
  body.dark.mobile-modern .mobile-filter-toggle {
    position:relative;display:flex;align-items:center;justify-content:flex-start;gap:10px;width:min(100%,360px);height:48px;margin-inline:auto;padding:0 48px;border:1px solid var(--line);
    border-radius:var(--mt-radius-full);background:var(--mp-soft);color:var(--ink);font-size:11px;font-weight:700;cursor:pointer;
  }
  body.dark.mobile-modern .mobile-filter-toggle:hover { background:var(--surface-2); }
  body.dark.mobile-modern .mobile-filter-toggle-icon { display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--mt-gold-soft);color:var(--brand); }
  body.dark.mobile-modern .mobile-filter-toggle svg { width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7; }
  body.dark.mobile-modern .mobile-filter-toggle>i { position:absolute;right:16px;color:var(--muted);font-style:normal;transition:transform .22s ease; }
  body.dark.mobile-modern .mobile-filter-body { display:block;max-height:0;overflow:hidden;opacity:0;pointer-events:none;transform:translateY(-5px);transition:max-height .32s ease,opacity .2s ease,transform .24s ease; }
  body.dark.mobile-modern .mobile-filter-shell.is-open .mobile-filter-body { max-height:1200px;overflow:visible;opacity:1;pointer-events:auto;transform:none; }
  body.dark.mobile-modern .mobile-filter-shell.is-open .mobile-filter-toggle>i { transform:rotate(180deg); }
  body.dark.mobile-modern .mobile-filter-surface { margin-top:10px;padding:14px;border-radius:22px;background:var(--mp-soft); }
  body.dark.mobile-modern .mobile-filter-surface>.shared-filter-content { margin:0!important; }
  body.dark.mobile-modern .mobile-filter-surface :is(.set-overview-toolbar,.browser-toolbar,.op-catalog-filterbar,.op-catalog-controls,.card-toolbar-sticky,.collection-filter-shell) { margin:0;padding:0;border:0;background:transparent;box-shadow:none; }
  body.dark.mobile-modern .op-catalog-filterbar { align-items:center;justify-content:center;gap:12px;overflow:visible; }
  body.dark.mobile-modern .mobile-filter-surface .op-filter-group { text-align:center; }
  body.dark.mobile-modern .mobile-filter-surface .op-filter-group>div { justify-content:center; }
  body.dark.mobile-modern .deck-catalog-filter-mobile {
    display:grid;grid-template-columns:minmax(0,1fr);gap:8px;width:100%;overflow:visible;
  }
  body.dark.mobile-modern .deck-catalog-filter-row {
    display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-width:0;
  }
  body.dark.mobile-modern .deck-catalog-filter-primary>.filter-search {
    flex:1 1 150px;min-width:120px;max-width:none;
  }
  body.dark.mobile-modern .deck-catalog-filter-primary>.filter-search input { width:100%; }
  body.dark.mobile-modern .deck-catalog-filter-primary>:is(.rarity-filter-anchor,.catalog-settings-control),
  body.dark.mobile-modern .deck-catalog-filter-primary>.op-filter-group { flex:0 0 auto; }
  body.dark.mobile-modern .deck-catalog-filter-secondary { gap:4px; }
  body.dark.mobile-modern .deck-catalog-filter-secondary>.op-filter-group { flex:0 0 auto;min-width:0; }
  body.dark.mobile-modern .deck-catalog-filter-secondary>.op-filter-group>div { gap:2px!important; }
  body.dark.mobile-modern .deck-catalog-filter-secondary :is(.op-image-filter,.op-color-filter,.op-number-filter,.lorcana-color-filter,.lorcana-icon-filter,.lorcana-cost-filter) {
    width:25px;height:25px;
  }
  body.dark.mobile-modern .deck-catalog-filter-secondary .lorcana-cost-filter img { width:25px;height:25px; }
  body.dark.mobile-modern .deck-catalog-filter-secondary .lorcana-cost-filter span { font-size:9.5px; }
  body.dark.mobile-modern .toolbar-filter-popup {
    border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);box-shadow:var(--mt-shadow);
  }
  body.dark.mobile-modern .set-switch-option:hover { background:var(--surface-2); }
  body.dark.mobile-modern .set-switch-option.active { background:var(--mt-accent-soft);color:var(--brand); }
  body.dark.mobile-modern.mobile-light .mobile-filter-surface .lorcana-cost-filter span { color:#273129;text-shadow:0 1px rgba(255,255,255,.8); }
  body.dark.mobile-modern.mobile-light .mobile-filter-surface .op-costs .op-image-filter { position:relative;opacity:.7; }
  body.dark.mobile-modern.mobile-light .mobile-filter-surface .op-costs .op-image-filter::before { content:"";position:absolute;inset:2px;background:#a77d2f;-webkit-mask:var(--op-cost-icon) center/contain no-repeat;mask:var(--op-cost-icon) center/contain no-repeat; }
  body.dark.mobile-modern.mobile-light .mobile-filter-surface .op-costs .op-image-filter>img { opacity:0; }
  body.dark.mobile-modern.mobile-light .mobile-filter-surface .op-costs .op-image-filter.active { opacity:1; }

  /* Dashboard */
  body.dark.mobile-modern .dashboard-shell { max-width:1460px; }
  body.dark.mobile-modern .dashboard-hero {
    display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"summary" "quick" "banner" "recent";
    gap:26px 34px;overflow:visible;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:var(--ink);
  }
  body.dark.mobile-modern .dashboard-hero::before,body.dark.mobile-modern .dashboard-hero::after { display:none; }
  body.dark.mobile-modern .hero-top { grid-area:summary;display:block; }
  body.dark.mobile-modern .hero-copy { display:none; }
  body.dark.mobile-modern .hero-summary {
    position:relative;display:grid;grid-template-columns:repeat(3,1fr);gap:0;overflow:hidden;min-height:92px;padding:3px;
    border:2px solid transparent;border-radius:24px;background:linear-gradient(var(--surface-2),var(--surface-2)) padding-box,linear-gradient(130deg,#8c6b2c 0%,#f2d78d 20%,#9c762f 44%,#f7e0a3 62%,#8c6b2c 100%) border-box;
    box-shadow:var(--mp-shadow-soft);
  }
  body.dark.mobile-modern .hero-summary:not(ophir-stat-pill)::before { content:"";position:absolute;inset:-45% auto -45% -18%;width:35%;transform:rotate(-24deg);background:linear-gradient(90deg,transparent,rgba(255,255,255,.6),transparent);animation:desktop-border-shine 5.5s linear 2;pointer-events:none; }
  @keyframes desktop-border-shine { to { left:118%; } }
  body.dark.mobile-modern .hero-summary div { position:relative;z-index:1;display:flex;min-width:0;flex-direction:column;justify-content:center;padding:15px 24px;text-align:center; }
  body.dark.mobile-modern .hero-summary div+div { border-left:1px solid var(--line); }
  body.dark.mobile-modern .hero-summary b { font:600 26px/1 var(--font-display);color:var(--ink); }
  body.dark.mobile-modern .hero-summary span { margin-top:7px;color:var(--muted);font-size:9px;letter-spacing:.1em; }
  body.dark.mobile-modern .dashboard-quick-nav { grid-area:quick;display:grid;grid-template-columns:repeat(5,1fr);gap:8px;width:min(100%,700px);justify-self:center; }
  body.dark.mobile-modern .dashboard-quick-nav button {
    display:grid;grid-template-rows:26px auto auto;place-items:center;min-width:0;padding:15px 8px;border:1px solid transparent;border-radius:18px;background:var(--surface-2);color:var(--muted);cursor:pointer;transition:.2s ease;
  }
  body.dark.mobile-modern .dashboard-quick-nav button:hover { transform:translateY(-2px);background:color-mix(in srgb,var(--surface-2) 88%,var(--mt-gold));box-shadow:var(--mp-shadow-soft); }
  body.dark.mobile-modern .dashboard-quick-nav button:first-child { border-color:var(--mt-gold);background:color-mix(in srgb,var(--surface-2) 88%,var(--mt-gold)); }
  body.dark.mobile-modern .dashboard-quick-nav svg { width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6; }
  body.dark.mobile-modern .dashboard-quick-nav span { margin-top:7px;color:var(--ink);font-size:9px;font-weight:650; }
  body.dark.mobile-modern .dashboard-quick-nav strong { margin-top:3px;color:var(--muted);font-size:11px;font-weight:500; }
  body.dark.mobile-modern .home-banner { grid-area:banner;padding:0;border:0; }
  body.dark.mobile-modern .home-banner-head { justify-content:flex-start; }
  body.dark.mobile-modern .home-banner-head .eyebrow { color:var(--ink);font:600 25px var(--font-display);text-transform:none;letter-spacing:0; }
  body.dark.mobile-modern .home-banner-viewport {
    position:relative;isolation:isolate;margin-inline:-14px;padding:20px 14px 28px;
    mask-image:none;-webkit-mask-image:none;
  }
  body.dark.mobile-modern .home-banner-viewport::before,
  body.dark.mobile-modern .home-banner-viewport::after {
    content:"";position:absolute;z-index:3;top:12px;bottom:20px;width:28px;pointer-events:none;
  }
  body.dark.mobile-modern .home-banner-viewport::before {
    left:0;
    background:linear-gradient(90deg,var(--bg) 0 13px,color-mix(in srgb,var(--bg) 70%,var(--ink)) 13px 14px,color-mix(in srgb,var(--bg) 78%,white) 14px 15px,color-mix(in srgb,var(--bg) 92%,transparent) 15px 19px,transparent 25px);
    filter:drop-shadow(4px 0 7px rgba(44,34,18,.1));
  }
  body.dark.mobile-modern .home-banner-viewport::after {
    right:0;
    background:linear-gradient(270deg,var(--bg) 0 13px,color-mix(in srgb,var(--bg) 70%,var(--ink)) 13px 14px,color-mix(in srgb,var(--bg) 78%,white) 14px 15px,color-mix(in srgb,var(--bg) 92%,transparent) 15px 19px,transparent 25px);
    filter:drop-shadow(-4px 0 7px rgba(44,34,18,.1));
  }
  body.dark.mobile-modern .home-banner-track { position:relative;z-index:1; }
  body.dark.mobile-modern .banner-card { flex-basis:132px;width:132px; }
  body.dark.mobile-modern .banner-card-meta { display:block;padding:9px 2px 0; }
  body.dark.mobile-modern .banner-card-meta b,body.dark.mobile-modern .banner-card-meta span { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  body.dark.mobile-modern .banner-card-meta b { font-size:10px; }
  body.dark.mobile-modern .banner-card-meta span { margin-top:4px;color:var(--muted);font-size:9px; }
  body.dark.mobile-modern .banner-card:hover .banner-card-art { transform:translateY(-8px) scale(1.07);box-shadow:0 23px 42px rgba(35,26,12,.2); }
  body.dark.mobile-modern .dashboard-recent { grid-area:recent;align-self:start; }
  body.dark.mobile-modern .dashboard-recent h2 { margin:0 0 12px;font:600 25px var(--font-display); }
  body.dark.mobile-modern .dashboard-recent-list { padding:8px 16px;border-radius:22px;background:radial-gradient(ellipse at center,color-mix(in srgb,var(--surface-2) 78%,var(--bg)),var(--bg) 78%); }
  body.dark.mobile-modern .dashboard-recent-row { grid-template-columns:46px minmax(0,1fr) auto;gap:12px;padding:12px 0;border-bottom:1px solid var(--line); }
  body.dark.mobile-modern .dashboard-recent-row:hover { transform:translateX(3px); }
  body.dark.mobile-modern .dashboard-recent-row img { width:44px;border-radius:6px; }
  body.dark.mobile-modern .dashboard-recent-copy b { font-size:11px; }
  body.dark.mobile-modern .dashboard-recent-copy small { font-size:9px; }
  body.dark.mobile-modern .dashboard-recent-price { font:600 12px var(--font-ui); }
  body.dark.mobile-modern .game-grid { display:none; }
  body.dark.mobile-modern .dashboard-account-button { display:block;margin:36px 0 0 auto;padding:0;border:0;background:none;color:var(--muted);font-size:11px;cursor:pointer; }

  /* Game, set, collection and watchlist pages */
  body.dark.mobile-modern .breadcrumbs { color:var(--muted); }
  body.dark.mobile-modern .breadcrumb-back { width:34px;height:34px;border-radius:50%;background:var(--surface);box-shadow:var(--mp-shadow-soft); }
  body.dark.mobile-modern .game-banner {
    min-height:104px;padding:20px 24px;border:1px solid var(--line);border-radius:24px;background:var(--mp-soft);color:var(--ink);box-shadow:none;
  }
  body.dark.mobile-modern .game-banner-symbol { width:112px;height:62px;background:transparent; }
  body.dark.mobile-modern .game-banner h1 { font-size:30px;font-weight:600; }
  body.dark.mobile-modern .game-banner p,body.dark.mobile-modern .banner-value span { color:var(--muted); }
  body.dark.mobile-modern .banner-value b { font:600 24px var(--font-display); }
  body.dark.mobile-modern .set-overview-groups { gap:34px; }
  body.dark.mobile-modern .set-group-head { padding-bottom:13px;border-color:var(--line); }
  body.dark.mobile-modern .set-group-head h3 { font:600 25px var(--font-display); }
  body.dark.mobile-modern .set-group-chevron { width:30px;height:30px;border-radius:50%;background:var(--surface-2); }
  body.dark.mobile-modern .set-grid { grid-template-columns:repeat(var(--set-cols,3),minmax(260px,1fr));gap:18px; }
  body.dark.mobile-modern .set-card { border:1px solid var(--line);border-radius:22px;background:var(--mp-soft);box-shadow:none; }
  body.dark.mobile-modern .set-card:hover { transform:translateY(-4px);border-color:color-mix(in srgb,var(--mt-gold) 40%,var(--line));box-shadow:var(--mp-shadow-soft); }
  body.dark.mobile-modern .set-art { height:132px;border:0;background:transparent;box-shadow:none; }
  body.dark.mobile-modern .set-art::after { background:linear-gradient(transparent,var(--surface-2));opacity:.45; }
  body.dark.mobile-modern .set-brand-logo { padding:10px 16px 24px; }
  body.dark.mobile-modern .set-card-info { background:transparent; }
  body.dark.mobile-modern .set-card h3 { font:600 20px var(--font-display);color:var(--ink); }
  body.dark.mobile-modern .badge { border-radius:var(--mt-radius-full);background:var(--mt-gold-soft);color:var(--mt-gold); }
  body.dark.mobile-modern .set-completion { border-color:var(--line); }
  body.dark.mobile-modern .set-compact-head {
    min-height:86px;padding:14px 18px;border:1px solid var(--line);border-radius:22px;background:var(--mp-soft);box-shadow:none;
  }
  body.dark.mobile-modern .set-compact-title h1 { font-size:25px;font-weight:600; }
  body.dark.mobile-modern .compact-stat { border-radius:13px;background:var(--surface-2); }
  body.dark.mobile-modern .compact-stat b { font-family:var(--font-display);font-size:15px; }
  body.dark.mobile-modern .card-grid { gap:22px 18px; }
  body.dark.mobile-modern .card-image-wrap { border-radius:12px;background:var(--surface-2);box-shadow:0 9px 22px rgba(45,32,12,.12); }
  body.dark.mobile-modern .card-tile:hover .card-image-wrap { transform:translateY(-8px);box-shadow:0 20px 34px rgba(45,32,12,.18); }
  body.dark.mobile-modern .card-info b { color:var(--ink);font-size:11px; }
  body.dark.mobile-modern .card-subline { color:var(--muted); }
  body.dark.mobile-modern .variant-chip { border-radius:var(--mt-radius-full);background:var(--mt-gold-soft);color:var(--mt-gold); }
  body.dark.mobile-modern .browser-summary { padding:6px;border:1px solid var(--line);border-radius:18px;background:var(--mp-soft);box-shadow:none; }
  body.dark.mobile-modern .browser-summary>div:not(.browser-summary-actions) { border-color:var(--line); }
  body.dark.mobile-modern .browser-summary b { font-family:var(--font-display);font-size:16px; }
  body.dark.mobile-modern .list-tabs button { border:1px solid var(--line);border-radius:var(--mt-radius-full);background:var(--mp-soft);box-shadow:none; }
  body.dark.mobile-modern .list-tabs button.active { border-color:var(--mt-gold);background:var(--mt-gold-soft);color:var(--ink);box-shadow:none; }
  body.dark.mobile-modern .watch-bulkbar {
    gap:9px;margin:0 auto 16px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--line) 72%,transparent);
    border-radius:18px;background:var(--mp-soft);box-shadow:none;
  }
  body.dark.mobile-modern .watch-bulkbar-all { color:var(--ink);font-size:10px; }
  body.dark.mobile-modern .watch-bulkbar-count { color:var(--muted);font-size:9px; }
  body.dark.mobile-modern .watch-bulkbar .select-control { height:38px;border-color:var(--line);background:var(--surface-2); }
  body.dark.mobile-modern .watch-bulkbar :is(.secondary-button,.danger-button) { min-height:38px;padding-inline:13px;font-size:9px; }
  body.dark.mobile-modern .watch-bulkbar :is(button,select):disabled { opacity:.38; }
  body.dark.mobile-modern .watch-selection-toggle.active { border-color:var(--mt-gold);background:var(--mp-gold-soft);color:var(--ink); }
  body.dark.mobile-modern .watch-selection-mode .card-tile:hover::after { border-color:color-mix(in srgb,var(--mt-gold) 42%,transparent);background:color-mix(in srgb,var(--mt-gold) 4%,transparent); }
  body.dark.mobile-modern .watch-selection-mode .card-tile.watch-selected::after { border-color:var(--mt-gold);background:color-mix(in srgb,var(--mt-gold) 10%,transparent);box-shadow:0 0 0 3px color-mix(in srgb,var(--mt-gold) 15%,transparent),0 10px 24px rgba(94,70,24,.15); }
  body.dark.mobile-modern .watch-bulkbar-all input {
    appearance:none;-webkit-appearance:none;display:grid;flex:0 0 auto;width:17px;height:17px;margin:0;place-items:center;
    border:1px solid var(--line);border-radius:5px;background:var(--surface);cursor:pointer;
  }
  body.dark.mobile-modern .watch-bulkbar-all input::after {
    content:"";width:8px;height:5px;transform:translateY(-1px) rotate(-45deg) scale(0);border-left:2px solid var(--bg);border-bottom:2px solid var(--bg);transition:transform .14s ease;
  }
  body.dark.mobile-modern .watch-bulkbar-all input:checked { border-color:var(--brand);background:var(--brand); }
  body.dark.mobile-modern .watch-bulkbar-all input:checked::after { transform:translateY(-1px) rotate(-45deg) scale(1); }
  body.dark.mobile-modern .watch-desired {
    gap:3px;margin-top:8px;padding:3px;border:0;border-radius:var(--mt-radius-full);background:var(--mp-soft);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--line) 72%,transparent);
  }
  body.dark.mobile-modern .watch-desired span { padding-left:8px;color:var(--muted);font-size:9px; }
  body.dark.mobile-modern .watch-desired button { width:28px;height:28px;border-radius:50%;background:var(--surface);color:var(--ink); }
  body.dark.mobile-modern .watch-desired button:hover { background:var(--surface-2); }
  body.dark.mobile-modern .watch-desired b { min-width:22px;color:var(--ink);font-size:10px; }
  body.dark.mobile-modern .content .watchlist-action-icon,
  body.dark.mobile-modern .modal-watch-bottom {
    border:1px solid color-mix(in srgb,var(--line) 80%,transparent);background:var(--surface);color:var(--muted);box-shadow:0 5px 14px rgba(0,0,0,.13);backdrop-filter:blur(8px);
  }
  body.dark.mobile-modern .content .watchlist-action-icon {
    width:38px;height:38px;padding:0;font-size:16px;
  }
  body.dark.mobile-modern .content .watchlist-action-icon.active,
  body.dark.mobile-modern .modal-watch-bottom.active {
    border-color:color-mix(in srgb,var(--mt-gold) 34%,var(--line));background:color-mix(in srgb,var(--surface) 94%,var(--mt-gold));color:var(--mt-gold);
  }
  body.dark.mobile-modern .content .quantity-control:not(.foil),
  body.dark.mobile-modern .content .quantity-control:not(.foil) :is(button,b) { color:#f7f3e9; }
  body.dark.mobile-modern .content .quantity-control.foil,
  body.dark.mobile-modern .content .quantity-control.foil :is(button,b) { color:#3a2604; }
  body.dark.mobile-modern .empty-state { border:1px dashed var(--line);border-radius:22px;background:var(--mp-soft); }
  body.dark.mobile-modern .empty-state b { font:600 22px var(--font-display); }
  body.dark.mobile-modern .settings-section { max-width:none;padding:24px;border:1px solid color-mix(in srgb,var(--line) 70%,transparent);border-radius:22px;background:var(--mp-soft);box-shadow:none; }
  body[data-route="settings"].dark.mobile-modern .content>.user-settings-page-head,
  body[data-route="settings"].dark.mobile-modern .content>.user-settings-layout { width:100%;max-width:1180px; }
  body[data-route="settings"].dark.mobile-modern .content>.user-settings-layout { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-flow:dense;align-items:start;gap:18px; }
  body.dark.mobile-modern .user-settings-card { position:relative;overflow:hidden;margin:0;padding:27px 28px;border:1px solid transparent;background:var(--surface-2);box-shadow:none; }
  body.dark.mobile-modern .settings-card-wide { grid-column:1/-1; }
  body.dark.mobile-modern .settings-card-profile { background:var(--surface-2); }
  body.dark.mobile-modern .user-settings-card-icon { width:46px;height:46px;border-radius:50%;background:color-mix(in srgb,var(--brand) 9%,var(--surface));color:var(--brand);box-shadow:0 7px 17px rgba(55,67,55,.08); }
  body.dark.mobile-modern .user-settings-card-head .eyebrow { color:var(--mt-gold); }
  body.dark.mobile-modern .user-settings-card .settings-field :is(input,.select-control) { border:0;background:color-mix(in srgb,var(--surface) 88%,transparent);color:var(--ink);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--line) 62%,transparent),0 5px 13px rgba(73,57,28,.025); }
  body.dark.mobile-modern .account-password-dialog { width:min(560px,calc(100vw - 44px));padding:24px;border:1px solid var(--line);border-radius:24px;background:var(--surface); }
  body.dark.mobile-modern .account-password-fields input { border-color:var(--line);background:var(--surface-2);color:var(--ink); }
  body.dark.mobile-modern .settings-card-language .settings-language-grid { grid-template-columns:1fr; }
  body.dark.mobile-modern .settings-language-field,
  body.dark.mobile-modern .highlight-setting { border:0!important;background:color-mix(in srgb,var(--surface) 48%,transparent)!important;box-shadow:none; }
  body.dark.mobile-modern .settings-language-field { display:grid;grid-template-columns:minmax(0,1fr) 94px;align-items:center;gap:14px; }
  body.dark.mobile-modern .appearance-settings-grid { background:color-mix(in srgb,var(--surface) 48%,transparent); }
  body.dark.mobile-modern .user-settings-card .appearance-settings-grid>.segmented { background:transparent; }
  body.dark.mobile-modern .user-settings-card .appearance-settings-grid>.segmented button.active { background:var(--surface);color:var(--ink);box-shadow:var(--mp-shadow-soft); }
  body.dark.mobile-modern .settings-language-game i { background:var(--surface); }
  body.dark.mobile-modern .highlight-setting input:checked+i { background:var(--brand); }
  body.dark.mobile-modern .highlight-setting input:checked+i::after { background:#f7f2e8; }
  body.dark.mobile-modern .user-settings-actions { margin-top:18px;padding-top:0;border:0; }
  body.dark.mobile-modern .settings-card-profile .user-settings-actions { padding-top:16px;border-top:1px solid color-mix(in srgb,var(--line) 55%,transparent); }
  body[data-route="admin"].dark.mobile-modern .content>.compact-page-head,
  body[data-route="admin"].dark.mobile-modern .content>.settings-section { width:100%;max-width:1180px; }
  body[data-route="admin"].dark.mobile-modern .content>.admin-settings-card { padding:27px 28px;border:1px solid transparent;background:var(--surface-2);box-shadow:none; }
  body[data-route="admin"].dark.mobile-modern .content>.settings-section:not(.oauth-admin-card) > :is(.admin-table,.admin-add,p,label) { width:100%;max-width:none; }
  body.dark.mobile-modern .settings-section h2 { font:600 21px var(--font-display); }
  body.dark.mobile-modern .settings-section :is(.mobile-theme-toggle,.mobile-appearance-toggle) { width:min(430px,100%);margin-top:12px; }
  body.dark.mobile-modern .settings-section :is(.mobile-theme-toggle,.mobile-appearance-toggle) button { flex:1; }
  body[data-route="settings"].dark.mobile-modern .appearance-settings-grid>:is(.mobile-theme-toggle,.mobile-appearance-toggle) { width:100%;max-width:none;margin-top:0; }
  body.dark.mobile-modern .checkbox-row input { accent-color:var(--brand); }
  body.dark.mobile-modern .admin-row { border:0;border-radius:16px;background:color-mix(in srgb,var(--surface) 48%,transparent);box-shadow:none; }
  body.dark.mobile-modern .oauth-admin-card {
    width:100%;max-width:1180px;padding:26px;border:1px solid transparent;background:var(--surface-2);box-shadow:none;
  }
  body.dark.mobile-modern .oauth-admin-icon { background:var(--mt-accent-soft);color:var(--brand); }
  body.dark.mobile-modern .oauth-admin-title>span { color:var(--mt-gold); }
  body.dark.mobile-modern .oauth-status,.oauth-source-badge { border-color:var(--line);background:var(--surface); }
  body.dark.mobile-modern .oauth-status.is-active { border-color:color-mix(in srgb,var(--brand) 24%,var(--line));background:var(--mt-accent-soft);color:var(--brand); }
  body.dark.mobile-modern .oauth-lock-notice { border-color:color-mix(in srgb,var(--mt-gold) 24%,var(--line));background:var(--mt-gold-soft); }
  body.dark.mobile-modern .oauth-lock-notice svg { stroke:var(--mt-gold); }
  body.dark.mobile-modern .oauth-toggle-row { border-color:color-mix(in srgb,var(--line) 72%,transparent);background:var(--mp-soft); }
  body.dark.mobile-modern .oauth-toggle-control input:checked+span { background:var(--brand); }
  body.dark.mobile-modern .oauth-form-group { border-color:color-mix(in srgb,var(--line) 64%,transparent);background:var(--mp-soft); }
  body.dark.mobile-modern .oauth-form-group-head>span { background:var(--mt-gold-soft);color:var(--mt-gold);box-shadow:none; }
  body.dark.mobile-modern .oauth-field em { background:var(--mt-gold-soft);color:var(--mt-gold); }
  body.dark.mobile-modern .oauth-field input,
  body.dark.mobile-modern .oauth-field .select-control { border-color:var(--line);background:var(--surface);color:var(--ink); }
  body.dark.mobile-modern .oauth-admin-actions { border-top:1px solid color-mix(in srgb,var(--line) 62%,transparent);padding-top:16px; }
  body.dark.mobile-modern .price-source-dialog { width:min(860px,calc(100vw - 44px));padding:24px;border:1px solid var(--line);border-radius:24px;background:var(--surface); }
  body.dark.mobile-modern .price-source-row { border-color:var(--line);background:var(--mp-soft); }
  body.dark.mobile-modern .price-source-game-logo { background:var(--surface-2); }
  body.dark.mobile-modern .price-source-row :is(select,input) { border-color:var(--line);background:var(--surface);color:var(--ink); }

  /* Deck overview and desktop editor */
  body.dark.mobile-modern .deck-page-head h1 { font-size:38px;font-weight:600; }
  body.dark.mobile-modern .deck-overview-grid { grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:18px; }
  body.dark.mobile-modern :is(.deck-overview-card,.deck-create-card) { min-height:176px;padding:20px;border:1px solid var(--line);border-radius:24px;background:var(--mp-soft);box-shadow:none; }
  body.dark.mobile-modern .deck-overview-card:hover { transform:translateY(-4px);box-shadow:var(--mp-shadow-soft); }
  body.dark.mobile-modern .deck-stack { flex-basis:102px;width:102px;height:142px; }
  body.dark.mobile-modern .deck-stack-card { left:9px;top:10px;width:84px;height:117px;border-radius:9px; }
  body.dark.mobile-modern .deck-overview-badge .deck-overview-format { color:var(--mt-gold);font-size:9px; }
  body.dark.mobile-modern .deck-overview-badge h3 { font:600 24px var(--font-display); }
  body.dark.mobile-modern .deck-overview-stats b { font:600 20px var(--font-display); }
  body.dark.mobile-modern .deck-overview-missing { border-radius:var(--mt-radius-full);font-size:9px; }
  body.dark.mobile-modern .deck-create-card>span { border-radius:50%;background:var(--mt-gold-soft);color:var(--mt-gold); }
  body.dark.mobile-modern .deck-shell-editor { gap:18px;max-width:1720px; }
  body.dark.mobile-modern :is(.deck-editor,.deck-catalog) { border:1px solid var(--line);border-radius:24px;background:var(--mp-soft);box-shadow:none; }
  body.dark.mobile-modern .deck-editor-head { min-height:62px;padding:11px 14px;border-color:var(--line); }
  body.dark.mobile-modern .deck-editor-head input { font:600 23px var(--font-display); }
  body.dark.mobile-modern :is(.deck-editor-head,.sheet-head) .compact-back-button,body.dark.mobile-modern .deck-header-menu-button { border:1px solid var(--line);border-radius:50%;background:var(--surface); }
  body.dark.mobile-modern .deck-rules-button { display:flex;align-items:center;gap:5px;color:var(--brand); }
  body.dark.mobile-modern .deck-rules-button svg { width:14px;height:14px;fill:none;stroke:currentColor; }
  body.dark.mobile-modern .op-deck-overview { grid-template-columns:126px 1fr;padding:16px;border-bottom:1px solid var(--line); }
  body.dark.mobile-modern .op-leader-panel { background:transparent;box-shadow:none; }
  body.dark.mobile-modern .deck-stat-chips { display:grid;grid-template-columns:repeat(4,minmax(92px,1fr));grid-auto-rows:auto;gap:8px; }
  body.dark.mobile-modern .deck-stat-chips>div { width:auto;height:auto;min-height:62px;padding:10px;border:1px solid var(--line);border-radius:16px;background:var(--surface-2);box-shadow:none; }
  body.dark.mobile-modern .deck-stat-chips b { font:600 16px var(--font-display); }
  body.dark.mobile-modern .op-section-head h2 { font:600 22px var(--font-display); }
  body.dark.mobile-modern .op-section-head>b { border-radius:var(--mt-radius-full);background:var(--mt-gold-soft); }
  body.dark.mobile-modern .deck-card-tile { border-radius:14px;background:var(--surface-2);box-shadow:none; }
  body.dark.mobile-modern .deck-qty { border-color:var(--line);border-radius:10px;background:var(--surface); }
  body.dark.mobile-modern .deck-qty button { background:var(--surface-2);color:var(--ink); }
  body.dark.mobile-modern .deck-catalog-title { padding:15px 17px;border-color:var(--line); }
  body.dark.mobile-modern .deck-catalog-title b { font:600 21px var(--font-display); }
  body.dark.mobile-modern .deck-catalog .catalog-card-list { scrollbar-color:var(--line) transparent; }
  body.dark.mobile-modern .catalog-card:hover { background:var(--surface-2); }
  body.dark.mobile-modern .catalog-deck-counter { border:1px solid var(--line);background:color-mix(in srgb,var(--surface) 94%,transparent)!important;color:var(--ink);box-shadow:var(--mp-shadow-soft); }
  body.dark.mobile-modern .catalog-deck-counter button,body.dark.mobile-modern .catalog-deck-counter b { color:var(--ink)!important; }

  /* Search and utility dialogs */
  body.dark.mobile-modern .overlay { background:rgba(31,28,21,.48);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px); }
  body.dark.mobile-modern :is(.search-dialog,.utility-dialog,.deck-add-dialog) { border:1px solid var(--line);border-radius:24px;background:var(--surface);color:var(--ink);box-shadow:var(--mt-shadow); }
  body.dark.mobile-modern .search-input-wrap { border-color:var(--line); }
  body.dark.mobile-modern .search-input-wrap input { color:var(--ink); }
  body.dark.mobile-modern .search-result:hover { background:var(--surface-2); }
  body.dark.mobile-modern .close-button { display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--ink); }
  body.dark.mobile-modern .export-card { border-color:var(--line);border-radius:16px;background:var(--mp-soft); }

  /* Card detail: podium owns the complete left half; information remains independently scrollable. */
  body.dark.mobile-modern #card-modal { align-items:center;padding:24px;overflow:hidden; }
  body.dark.mobile-modern .card-dialog { width:min(1240px,calc(100vw - 48px));height:min(730px,calc(100vh - 48px));min-height:600px;border:1px solid color-mix(in srgb,var(--line) 68%,transparent);border-radius:30px;background:var(--bg);color:var(--ink);box-shadow:0 38px 110px rgba(33,27,16,.28); }
  body.dark.mobile-modern .card-modal-layout { display:grid;grid-template-columns:minmax(500px,1.35fr) minmax(420px,.85fr);grid-template-rows:minmax(0,1fr) auto;height:100%;min-height:0;background:var(--bg); }
  body.dark.mobile-modern .card-stage { position:relative;grid-column:1;grid-row:1/3;min-width:0;min-height:0;padding:0;overflow:hidden;background:none; }
  body.dark.mobile-modern .stage-backdrop { display:block;position:absolute;inset:0;z-index:0;background:linear-gradient(to top,rgba(0,0,0,.05),rgba(0,0,0,.1)),linear-gradient(to top,var(--mt-stage-plate),var(--mt-stage-top) 88%);pointer-events:none; }
  body.dark.mobile-modern .stage-backdrop::before { content:"";position:absolute;left:0;right:0;top:var(--plate-edge-center-y,84%);bottom:0;background:var(--mt-stage-outer); }
  body.dark.mobile-modern .stage-backdrop::after { content:"";position:absolute;left:0;top:var(--plate-edge-top-y,80%);width:100%;height:var(--plate-edge-height,9%);border-radius:50%;background:var(--mt-stage-outer); }
  body.dark.mobile-modern .card-stage::before { content:"";position:absolute;left:50%;top:60%;z-index:0;width:94%;height:48%;transform:translate(-50%,-50%);border-radius:50%;background:var(--mt-podium);pointer-events:none; }
  body.dark.mobile-modern .stage-platform-wrap { display:block;position:absolute;left:50%;bottom:7%;z-index:1;width:90%;transform:translateX(-50%);filter:drop-shadow(0 3px 3px rgba(255,255,255,.55)) drop-shadow(0 -2px 3px rgba(0,0,0,.16));pointer-events:none; }
  body.dark.mobile-modern .stage-platform-svg { display:block;position:static;width:100%;height:auto; }
  body.dark.mobile-modern .stage-platform-wrap::after { content:"";position:absolute;inset:0;z-index:1;background:#d8b97b;mix-blend-mode:multiply;opacity:.24;mask:url(../glass-plate.svg) 0 0/100% 100% no-repeat;-webkit-mask:url(../glass-plate.svg) 0 0/100% 100% no-repeat; }
  body.dark.mobile-modern .stage-flare-anchor { display:block;position:absolute;left:var(--plate-left,5%);top:var(--plate-top,81%);z-index:2;width:var(--plate-width,90%);height:var(--plate-height,13%);pointer-events:none; }
  body.dark.mobile-modern .stage-flare-anchor::before,body.dark.mobile-modern .stage-flare-anchor::after { content:"";position:absolute;top:calc(var(--flare-edge-local-y,26%) - 5px);z-index:1;width:var(--spotlight-width,220px);height:var(--spotlight-height,520px);background:radial-gradient(ellipse 62% 88% at var(--spotlight-source-x) 80%,rgba(255,255,255,.8),rgba(255,255,255,.46) 14%,rgba(255,255,255,.2) 34%,rgba(255,255,255,.06) 60%,transparent 82%);filter:blur(5px); }
  body.dark.mobile-modern .stage-flare-anchor::before { --spotlight-source-x:30%;left:10%;transform-origin:30% 80%;transform:translate(-30%,-80%) rotate(var(--spotlight-left-angle,28deg)); }
  body.dark.mobile-modern .stage-flare-anchor::after { --spotlight-source-x:70%;left:90%;transform-origin:70% 80%;transform:translate(-70%,-80%) rotate(var(--spotlight-right-angle,-28deg)); }
  body.dark.mobile-modern .stage-flare { position:absolute;top:calc(var(--flare-edge-local-y,26%) - 5px);z-index:2;width:1px;height:1px;mix-blend-mode:screen; }
  body.dark.mobile-modern .stage-flare.left { left:10%; }
  body.dark.mobile-modern .stage-flare.right { left:90%; }
  body.dark.mobile-modern .stage-flare::before { content:"";position:absolute;left:50%;top:50%;width:130px;height:130px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.96) 0 3%,rgba(255,255,255,.54) 9%,rgba(255,255,255,.18) 30%,transparent 72%);filter:blur(1.5px); }
  body.dark.mobile-modern .stage-flare::after { content:"";position:absolute;left:50%;top:50%;width:24px;height:24px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle,#fff 0 8%,rgba(255,255,255,.9) 18%,rgba(255,255,255,.4) 40%,transparent 72%);box-shadow:0 0 9px 2px rgba(255,255,255,.5),0 0 25px 6px rgba(255,255,255,.2); }
  body.dark.mobile-modern .stage-flare i { position:absolute;left:0;top:0;display:block;width:var(--ray-length,90px);height:var(--ray-size,1px);transform:translateY(-50%) rotate(var(--ray-angle));transform-origin:0 50%;border-radius:999px;background:linear-gradient(90deg,rgba(255,255,255,var(--ray-alpha,.45)),rgba(255,255,255,.14) 38%,transparent);filter:blur(.45px); }
  body.dark.mobile-modern .stage-flare-cross { display:block;position:absolute;left:50%;top:15%;z-index:1;width:340px;height:720px;transform:translate(-50%,-50%);background:radial-gradient(ellipse at center,rgba(255,255,255,.34),rgba(255,255,255,.14) 38%,rgba(255,255,255,.04) 62%,transparent 78%);pointer-events:none; }
  body.dark.mobile-modern .modal-card-frame-wrap { display:block;position:absolute;left:50%;top:var(--plate-contact-y,84%);z-index:3;width:min(350px,calc((100% - 100px) * .62));max-height:560px;aspect-ratio:5/7;transform:translate(-50%,-100%); }
  body.dark.mobile-modern .modal-card-frame { position:relative;width:100%;height:100%;max-height:none;aspect-ratio:auto;border-radius:10px;box-shadow:none; }
  body.dark.mobile-modern .modal-card-frame-wrap::before { content:"";position:absolute;left:50%;top:50%;z-index:-1;width:150%;height:136%;transform:translate(-50%,-50%);background:radial-gradient(ellipse 44% 68% at 18% 78%,rgba(255,255,255,.5),rgba(255,255,255,.2) 35%,rgba(255,255,255,.06) 59%,transparent 77%),radial-gradient(ellipse 44% 68% at 82% 78%,rgba(255,255,255,.5),rgba(255,255,255,.2) 35%,rgba(255,255,255,.06) 59%,transparent 77%);filter:blur(7px);pointer-events:none; }
  body.dark.mobile-modern .modal-card-frame-wrap::after { content:"";position:absolute;left:60%;bottom:0;z-index:1;width:150px;height:150px;transform:translate(-50%,50%);background:radial-gradient(circle,rgba(255,255,255,.28),transparent 70%);pointer-events:none; }
  body.dark.mobile-modern .modal-card-reflection-mask { display:block;position:absolute;top:100%;left:0;z-index:-1;width:100%;height:28%;mask-image:url(#mt-reflection-mask);-webkit-mask-image:url(#mt-reflection-mask);pointer-events:none; }
  body.dark.mobile-modern .modal-card-reflection-mirror,body.dark.mobile-modern .modal-card-reflection-perspective { position:absolute;inset:0;pointer-events:none; }
  body.dark.mobile-modern .modal-card-reflection-mirror { transform:scaleY(-1); }
  body.dark.mobile-modern .modal-card-reflection-perspective { perspective:900px; }
  body.dark.mobile-modern .modal-card-reflection { display:block;position:absolute;inset:auto;width:100%;height:100%;transform:rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));transform-style:preserve-3d;transition:transform .4s ease-out;border-radius:10px;object-fit:cover;filter:blur(2px);mask-image:linear-gradient(to top,rgba(0,0,0,.18),transparent 11.2%);-webkit-mask-image:linear-gradient(to top,rgba(0,0,0,.18),transparent 11.2%);pointer-events:none; }
  body.dark.mobile-modern .card-tilt-zone.is-dragging .modal-card-reflection { transition:none; }
  body.dark.mobile-modern .card-nav-button { top:50%;z-index:5;width:44px;height:58px;border:0;background:transparent;color:color-mix(in srgb,var(--ink) 55%,transparent);font:300 38px var(--font-ui);transition:.18s; }
  body.dark.mobile-modern .card-nav-button:hover:not(:disabled) { color:var(--ink);transform:translateY(-2px) scale(1.08); }
  body.dark.mobile-modern .card-nav-button.prev { left:24px; }
  body.dark.mobile-modern .card-nav-button.next { right:24px; }
  body.dark.mobile-modern .card-nav-button:disabled { opacity:.13; }
  body.dark.mobile-modern .variant-hint { display:none; }

  body.dark.mobile-modern .card-modal-layout>.close-button,body.dark.mobile-modern .modal-menu-button { position:absolute;top:18px;z-index:30;display:grid;width:38px;height:38px;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--ink);box-shadow:var(--mp-shadow-soft); }
  body.dark.mobile-modern .card-modal-layout>.close-button { left:18px;right:auto;font-size:22px; }
  body.dark.mobile-modern .modal-quick-menu-wrap { display:block;position:absolute;top:18px;left:66px;right:auto;z-index:30; }
  body.dark.mobile-modern .modal-menu-button { position:static;font-size:17px; }
  body.dark.mobile-modern .modal-quick-menu { position:absolute;top:46px;left:0;right:auto;width:330px;max-height:calc(100vh - 120px);overflow:auto;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--mt-shadow); }
  body.dark.mobile-modern .modal-relationship-title { margin-bottom:12px;font:600 22px var(--font-display); }
  body.dark.mobile-modern .modal-side { grid-column:2;grid-row:1;min-height:0;overflow:hidden;background:var(--bg);color:var(--ink); }
  body.dark.mobile-modern .modal-head { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 14px;padding:34px 28px 18px;border:0; }
  body.dark.mobile-modern .modal-head>.eyebrow,body.dark.mobile-modern .modal-head>p { display:none; }
  body.dark.mobile-modern .modal-head h2 { grid-column:1;grid-row:1;margin:0;font:600 32px/1.05 var(--font-display);color:var(--ink); }
  body.dark.mobile-modern .modal-price { grid-column:2;grid-row:1;display:block;font:700 24px/1 var(--font-display);color:var(--ink);white-space:nowrap; }
  body.dark.mobile-modern .card-title-sub { grid-column:1;grid-row:2;display:block;margin-top:-2px;font:500 14px var(--font-display);color:var(--muted); }
  body.dark.mobile-modern .modal-set-line { grid-column:1;grid-row:3;display:block;color:var(--muted);font-size:11px; }
  body.dark.mobile-modern .modal-rarity-line { grid-column:2;grid-row:3;display:block;color:var(--muted);font-size:10px;text-align:right;white-space:nowrap; }
  body.dark.mobile-modern .meta-sep { margin:0 7px;color:var(--muted); }
  body.dark.mobile-modern .modal-head .language-switcher { display:none; }
  body.dark.mobile-modern .language-switcher button { border:0;border-radius:var(--mt-radius-full);background:var(--mp-soft);color:var(--muted);box-shadow:none; }
  body.dark.mobile-modern .language-switcher button.active { background:var(--surface);color:var(--ink);box-shadow:var(--mp-shadow-soft); }
  body.dark.mobile-modern .modal-tabs { height:42px;margin:0 28px 8px;padding:3px;gap:3px;border:0;border-radius:17px;background:rgba(0,0,0,.035); }
  body.dark.mobile-modern .modal-tabs button { height:100%;padding:0;border:0;border-radius:14px;color:var(--muted);font-size:11px; }
  body.dark.mobile-modern .modal-tabs button.active { border:0;background:var(--surface);color:var(--ink);box-shadow:0 3px 9px rgba(36,30,19,.09); }
  body.dark.mobile-modern .modal-content { min-height:0;padding:12px 28px 22px;background:var(--bg);scrollbar-color:var(--line) transparent; }
  body.dark.mobile-modern .modal-content .detail-section-title { color:var(--muted); }
  body.dark.mobile-modern .variant-selector { grid-template-columns:repeat(2,minmax(0,1fr));gap:7px; }
  body.dark.mobile-modern .desktop-variant-settings { margin:0 0 14px; }
  body.dark.mobile-modern .desktop-variant-settings .variant-selector { margin:0; }
  body.dark.mobile-modern .desktop-language-switcher { display:flex;gap:5px;margin:10px 0 0; }
  body.dark.mobile-modern .variant-option { gap:8px;padding:7px;border:1px solid transparent;border-radius:14px;background:var(--mp-soft);box-shadow:none; }
  body.dark.mobile-modern .variant-option:hover { background:var(--surface-2); }
  body.dark.mobile-modern .variant-option.active { border-color:var(--line);background:var(--surface);box-shadow:var(--mp-shadow-soft); }
  body.dark.mobile-modern .variant-option b { font-size:10px; }
  body.dark.mobile-modern .variant-option small { color:var(--muted); }
  body.dark.mobile-modern .modal-content :is(.mobile-collection-controls,.collection-info-grid,.watchlist-picker) { display:none; }
  body.dark.mobile-modern .modal-info-grid { grid-template-columns:1fr;gap:0;border-top:1px solid var(--line); }
  body.dark.mobile-modern .modal-info-grid .detail-field { display:flex;align-items:center;justify-content:space-between;min-height:44px;padding:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none; }
  body.dark.mobile-modern .modal-info-grid .detail-field:last-child { border-bottom:0; }
  body.dark.mobile-modern :is(.modal-info-set,.modal-info-rarity,.modal-info-source) { display:none; }
  body.dark.mobile-modern .rules-text { color:var(--ink);font-size:12px;line-height:1.7; }
  body.dark.mobile-modern .rules-keyword { display:block;width:max-content;max-width:calc(100% + 28px);margin:0 0 9px -28px;padding:6px 16px 6px 28px;border-radius:0 var(--mt-radius-full) var(--mt-radius-full) 0;background:rgba(0,0,0,.035);font-size:10px;letter-spacing:.05em; }
  body.dark.mobile-modern .modal-tabs+.modal-content .price-hero { display:none; }
  body.dark.mobile-modern .market-metrics { margin-top:0; }
  body.dark.mobile-modern .market-metrics>div { border-radius:14px;background:var(--surface-2);box-shadow:none; }
  body.dark.mobile-modern .market-source-link { justify-content:center;min-height:44px;border:1px solid var(--line);border-radius:var(--mt-radius-full);background:var(--surface); }
  body.dark.mobile-modern .market-source-link>span:first-child,body.dark.mobile-modern .market-source-link small { display:none; }
  body.dark.mobile-modern .price-refresh { height:44px;border:0;border-radius:var(--mt-radius-full);background:var(--brand);color:var(--bg); }
  body.dark.mobile-modern .relationship { border-color:var(--line); }
  body.dark.mobile-modern .relationship span { background:var(--mt-accent-soft);color:var(--brand); }

  body.dark.mobile-modern .modal-action-bar { display:block;position:relative;grid-column:2;grid-row:2;z-index:20;padding:0 28px 20px;background:var(--bg); }
  body.dark.mobile-modern .modal-footer-actions { display:flex;align-items:center;gap:9px;padding:12px 0 0; }
  body.dark.mobile-modern .modal-footer-quantity { display:flex;flex:1;align-items:center;height:46px;overflow:hidden;border:1px solid var(--line);border-radius:var(--mt-radius-full);background:var(--surface); }
  body.dark.mobile-modern .modal-footer-quantity-label { display:grid;align-self:stretch;min-width:76px;place-items:center;padding:0 14px;border-right:1px solid var(--line);color:var(--muted);font-size:10px;font-weight:650; }
  body.dark.mobile-modern .modal-footer-quantity button { width:42px;height:44px;padding:0;border:0;background:none;color:var(--ink);font-size:18px;cursor:pointer; }
  body.dark.mobile-modern .modal-footer-quantity b { flex:1;min-width:34px;text-align:center;font-size:12px; }
  body.dark.mobile-modern .modal-footer-quantity .modal-footer-advanced-toggle { width:36px;height:30px;border-left:1px solid var(--line);border-radius:0;color:var(--muted); }
  body.dark.mobile-modern .modal-footer-advanced-toggle svg { display:block;width:16px;height:16px;margin:auto;fill:none;stroke:currentColor;stroke-width:1.6;transition:transform .22s ease; }
  body.dark.mobile-modern .modal-footer-advanced-toggle[aria-expanded="true"] svg { transform:rotate(180deg); }
  body.dark.mobile-modern .modal-watch-bottom { display:grid;width:46px;height:46px;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--brand);font-size:19px;cursor:pointer; }
  body.dark.mobile-modern .modal-footer-advanced { display:none;max-height:330px;overflow:auto;margin-top:12px;padding:10px 0 0;border-top:1px solid var(--line); }
  body.dark.mobile-modern .modal-action-bar.is-expanded .modal-footer-advanced { display:block;animation:desktop-advanced-in .22s ease both; }
  @keyframes desktop-advanced-in { from { opacity:0;transform:translateY(8px); } }
  body.dark.mobile-modern .modal-footer-advanced>.detail-section-title:first-child { display:none; }
  body.dark.mobile-modern .condition-rows,body.dark.mobile-modern .graded-rows { gap:0; }
  body.dark.mobile-modern .condition-row,body.dark.mobile-modern .graded-row { min-height:46px;padding:5px 2px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none; }
  body.dark.mobile-modern .condition-row:last-child,body.dark.mobile-modern .graded-row:last-child { border-bottom:0; }
  body.dark.mobile-modern .condition-row .controls,body.dark.mobile-modern .graded-row .controls { display:grid;grid-template-columns:repeat(3,1fr);width:132px;height:36px;overflow:hidden;border:1px solid var(--line);border-radius:12px; }
  body.dark.mobile-modern .condition-row .controls button,body.dark.mobile-modern .graded-row .controls button { width:auto;height:34px;border:0;background:transparent;color:var(--ink); }
  body.dark.mobile-modern .condition-row .controls b,body.dark.mobile-modern .graded-row .controls b { display:grid;height:34px;place-items:center;border-inline:1px solid var(--line); }
}

/* Tablet: persistent navigation rail, two-column content where useful, modal remains a true split view. */
@media (min-width:761px) and (max-width:1179px) {
  body.dark.mobile-modern .app-shell,body.sidebar-collapsed.dark.mobile-modern .app-shell { padding-left:82px; }
  body.dark.mobile-modern .sidebar,body.sidebar-collapsed.dark.mobile-modern .sidebar { width:82px;padding-inline:14px; }
  body.dark.mobile-modern .sidebar-collapse { display:none; }
  body.dark.mobile-modern .brand { justify-content:center;padding-inline:0; }
  body.dark.mobile-modern .brand-word,body.dark.mobile-modern .nav-item:not([role="menuitem"])>span:not(.nav-icon),body.dark.mobile-modern .sidebar-label,body.dark.mobile-modern .edit-panel :is(.edit-panel-copy,.switch),body.dark.mobile-modern .user-menu-info,body.dark.mobile-modern .user-menu>form { display:none; }
  body.dark.mobile-modern .edit-panel { justify-content:center;margin-inline:auto;padding:8px;width:max-content;cursor:pointer; }
  body.dark.mobile-modern .nav-item:not([role="menuitem"]) { justify-content:center;padding:0; }
  body.dark.mobile-modern .nav-icon { width:auto; }
  body.dark.mobile-modern .user-menu { justify-content:center;padding-inline:0; }
  body.dark.mobile-modern .content { padding-inline:26px; }
  body.dark.mobile-modern .dashboard-hero { grid-template-columns:minmax(0,1fr);grid-template-areas:"summary" "quick" "banner" "recent"; }
  body.dark.mobile-modern .set-grid { grid-template-columns:repeat(2,minmax(240px,1fr)); }
  body.dark.mobile-modern .set-compact-head { align-items:flex-start;flex-wrap:wrap; }
  body.dark.mobile-modern .compact-stats { width:100%;margin-left:0;overflow:auto; }
  body.dark.mobile-modern .card-dialog { width:calc(100vw - 32px);height:min(700px,calc(100vh - 32px)); }
  body.dark.mobile-modern .card-modal-layout { grid-template-columns:minmax(380px,1.05fr) minmax(360px,.95fr); }
  body.dark.mobile-modern .modal-card-frame-wrap { width:min(310px,calc((100% - 70px) * .66)); }
  body.dark.mobile-modern .stage-platform-wrap { bottom:16%; }
  body.dark.mobile-modern .modal-head { padding-inline:22px; }
  body.dark.mobile-modern .modal-head h2 { font-size:27px; }
  body.dark.mobile-modern .modal-tabs,body.dark.mobile-modern .modal-content,body.dark.mobile-modern .modal-action-bar { margin-inline:0;padding-inline:22px; }
  body.dark.mobile-modern .deck-shell-editor { display:grid;grid-template-columns:1fr; }
  body.dark.mobile-modern .deck-catalog-open-button { display:flex;align-items:center;gap:12px;width:calc(100% - 28px);margin:14px;padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);cursor:pointer; }
  body.dark.mobile-modern .deck-catalog-open-button svg { width:32px;height:32px;padding:7px;border-radius:50%;background:var(--mt-gold-soft);fill:none;stroke:var(--brand); }
  body.dark.mobile-modern .deck-catalog-open-button>span { display:flex;flex:1;flex-direction:column;text-align:left; }
  body.dark.mobile-modern .deck-catalog-open-button>i { font-style:normal; }
  body.dark.mobile-modern .deck-catalog-backdrop { position:fixed;inset:0;z-index:64;display:block;border:0;background:rgba(31,28,21,.36);opacity:0;pointer-events:none;backdrop-filter:blur(4px);transition:opacity .2s; }
  body.dark.mobile-modern .deck-catalog-backdrop.is-open { opacity:1;pointer-events:auto; }
  body.dark.mobile-modern .deck-catalog { position:fixed;top:24px;right:24px;bottom:24px;z-index:65;display:flex;width:min(650px,calc(100vw - 130px));max-height:none;flex-direction:column;opacity:0;pointer-events:none;transform:translateX(24px);box-shadow:var(--mt-shadow);transition:.22s ease; }
  body.dark.mobile-modern .deck-catalog.is-open { opacity:1;pointer-events:auto;transform:none; }
  body.dark.mobile-modern .deck-catalog-close { display:grid;width:38px;height:38px;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--surface); }
  body.dark.mobile-modern .deck-catalog .catalog-card-list { flex:1;max-height:none; }
}

@media (min-width:761px) and (max-width:840px) {
  body.dark.mobile-modern .dashboard-hero { grid-template-columns:1fr;grid-template-areas:"summary" "quick" "banner" "recent"; }
  body.dark.mobile-modern .card-modal-layout { grid-template-columns:minmax(330px,1fr) minmax(330px,1fr); }
  body.dark.mobile-modern .modal-head h2 { font-size:24px; }
  body.dark.mobile-modern .modal-price { font-size:19px; }
}

/* Desktop workspace: deck and catalogue stay visible side by side. */
@media (min-width:1180px) {
  body.dark.mobile-modern .deck-shell.deck-shell-editor { grid-template-columns:minmax(560px,1fr) minmax(520px,1.15fr);align-items:start; }
  body.dark.mobile-modern .deck-catalog { position:sticky;top:96px;display:flex;max-height:calc(100vh - 122px);flex-direction:column;opacity:1;pointer-events:auto; }
  body.dark.mobile-modern .deck-catalog .catalog-card-list { flex:1;max-height:none; }
  body.dark.mobile-modern :is(.deck-catalog-open-button,.deck-catalog-backdrop,.deck-catalog-close) { display:none; }
}

@media (min-width:1500px) {
  body.dark.mobile-modern .dashboard-hero { grid-template-columns:minmax(0,1fr); }
  body.dark.mobile-modern .set-grid { grid-template-columns:repeat(var(--set-cols,3),minmax(290px,1fr)); }
}

@media (prefers-reduced-motion:reduce) {
  body.dark.mobile-modern .hero-summary::before { animation:none; }
}

/* ---- Design polish (October 2026) ------------------------------------------------------------
   Filters: on a wide screen the panel is simply open -- a closed toggle in the middle of the page
   only hid the controls. The bar reads left to right in one rhythm: every control 40px high,
   groups 14px apart, the zoom pushed to the end. The deckbuilder's catalogue keeps its toggle:
   it lives in a narrow side panel. */
@media (min-width:1024px) {
  /* Only the vertical margins: the column is centred by .content>* (margin-inline:auto, max-width). */
  body.dark.mobile-modern .content>.mobile-filter-shell { margin-top:0;margin-bottom:22px; }
  body.dark.mobile-modern .content>.mobile-filter-shell>.mobile-filter-toggle { display:none; }
  body.dark.mobile-modern .content>.mobile-filter-shell>.mobile-filter-body { max-height:none;overflow:visible;opacity:1;pointer-events:auto;transform:none;transition:none; }
  body.dark.mobile-modern .content>.mobile-filter-shell .mobile-filter-surface { margin-top:0;padding:10px 12px;border:1px solid var(--line);border-radius:20px; }
  body.dark.mobile-modern .content>.mobile-filter-shell .op-catalog-filterbar { display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:10px 14px; }
  body.dark.mobile-modern .content>.mobile-filter-shell .op-catalog-filterbar>* { flex:0 0 auto;margin:0; }
  body.dark.mobile-modern .content>.mobile-filter-shell .op-filter-group>div { display:flex;align-items:center;justify-content:flex-start;gap:6px; }
  body.dark.mobile-modern .content>.mobile-filter-shell .filter-search { flex:1 1 170px;min-width:150px;max-width:260px; }
  body.dark.mobile-modern .content>.mobile-filter-shell .filter-search input { width:100%;height:40px;font-size:13px; }
  body.dark.mobile-modern .content>.mobile-filter-shell :is(.secondary-button,.icon-button,.set-switch-trigger) { min-height:40px; }
  body.dark.mobile-modern .content>.mobile-filter-shell .icon-button { width:40px;height:40px; }
  body.dark.mobile-modern .content>.mobile-filter-shell .zoom-control { margin-left:auto; }
  /* A long set name must not push the zoom into its own row: the switcher shows what fits. */
  body.dark.mobile-modern .content>.mobile-filter-shell .set-switch-trigger { display:inline-block;max-width:230px;height:40px;line-height:38px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap; }
  body.dark.mobile-modern .content>.mobile-filter-shell .set-overview-toolbar { display:flex;flex-wrap:wrap;align-items:center;gap:10px; }
  body.dark.mobile-modern .content>.mobile-filter-shell .set-overview-toolbar>h2 { margin-right:auto; }
}

@media (min-width:761px) {
  /* One Piece's costs: as quiet as every other game's chips until chosen, not ten gold coins. */
  body.dark.mobile-modern .op-costs .op-image-filter { width:30px;height:30px; }
  body.dark.mobile-modern.mobile-light .mobile-filter-surface .op-costs .op-image-filter { opacity:1; }
  body.dark.mobile-modern.mobile-light .mobile-filter-surface .op-costs .op-image-filter::before { background:color-mix(in srgb,var(--muted) 60%,transparent); }
  body.dark.mobile-modern.mobile-light .mobile-filter-surface .op-costs .op-image-filter.active::before { background:var(--mt-gold,#a77d2f); }

  /* The set header: title, date and kind on the left as one block, the numbers beside it. The
     title wraps instead of running under the numbers. */
  body.dark.mobile-modern .content .set-compact-head { display:grid;grid-template-columns:minmax(220px,max-content) minmax(0,1fr);grid-template-areas:"title stats" "badges stats";align-items:center;gap:6px 28px; }
  body.dark.mobile-modern .content .set-compact-head>.set-compact-title { grid-area:title;min-width:0; }
  body.dark.mobile-modern .content .set-compact-head>.compact-badges { grid-area:badges;display:flex;flex-wrap:wrap;gap:5px;margin:0; }
  body.dark.mobile-modern .content .set-compact-head>.compact-badges:empty { display:none; }
  body.dark.mobile-modern .content .set-compact-head>.compact-badges .badge { white-space:nowrap; }
  body.dark.mobile-modern .content .set-compact-head>ophir-stat-pill { grid-area:stats;width:100%;margin:0; }
  body.dark.mobile-modern .content .set-compact-title h1 { display:block;max-width:340px;white-space:normal;line-height:1.1; }
  body.dark.mobile-modern .content .set-compact-title h1>span { display:block;margin-bottom:4px;color:var(--mt-gold,var(--brand));font:750 10px var(--font-ui);letter-spacing:.12em; }
  body.dark.mobile-modern .content .set-compact-title h1>small { display:block;margin-top:5px;color:var(--muted);font:500 11px var(--font-ui); }
}

@media (min-width:761px) and (max-width:1179px) {
  body.dark.mobile-modern .content .set-compact-head { grid-template-columns:minmax(0,1fr);grid-template-areas:"title" "badges" "stats"; }
}

/* ---- Design polish, round 2 (every width) ------------------------------------------------------
   The light palette: muted text, gold, green and red dark enough to read as text on cream (WCAG
   AA, 4.5:1 for small text). The dark palette's values had been in effect for both. */
body.dark.mobile-modern.mobile-light { --muted:#6b665a;--mt-gold:#8c6b27;--success:#2b7553;--danger:#b23f37;--mp-danger-soft:rgba(178,63,55,.09); }
html { background:var(--bg,#f5f0e6); }

/* Notices on a deck: their own colours per theme (the light theme's "b" colour made the title
   invisible on the dark red). */
body.dark.mobile-modern .deck-validation b { color:inherit; }
body.dark.mobile-modern.mobile-light .deck-validation.invalid { background:#f9e5e2;color:#8f2d26;box-shadow:inset 0 0 0 1px #ecc4be; }
body.dark.mobile-modern.mobile-light .deck-validation.valid { background:#e3f1e9;color:#1f5e41;box-shadow:inset 0 0 0 1px #bcdcc9; }
body.dark.mobile-modern.mobile-light .deck-validation small { opacity:.9; }

/* Tags and labels on cream: text dark enough to read. */
body.dark.mobile-modern.mobile-light .set-code { color:var(--ink); }
body.dark.mobile-modern.mobile-light .set-kind { color:var(--muted); }
body.dark.mobile-modern.mobile-light .sheet-kind-wts { background:rgba(196,110,22,.13);color:#8a4a0c; }
body.dark.mobile-modern.mobile-light .sheet-kind-wtt { background:rgba(36,118,170,.12);color:#1c5a85; }
body.dark.mobile-modern.mobile-light .sheet-kind-wtb { background:rgba(47,125,74,.12);color:#225c37; }
body.dark.mobile-modern.mobile-light .sheet-kind-wttf { background:rgba(109,74,168,.12);color:#52367f; }
body.dark.mobile-modern.mobile-light :is(.sheet-kind-wts-wtt,.sheet-kind-wtb-wttf) { color:var(--ink); }
body.dark.mobile-modern.mobile-light .deck-overview-missing.missing { background:rgba(178,63,55,.1);color:#9a352e; }
body.dark.mobile-modern.mobile-light .deck-overview-missing.complete { background:rgba(43,117,83,.1);color:#24664a; }
body.dark.mobile-modern.mobile-light .badge { color:#7a5c1f; }
/* Game logos (several are white) on a dark tile, in both themes. */
body.dark.mobile-modern .settings-language-game i { background:#22261f; }

/* Chips of every filter: one shape (a pill), and an unmistakable chosen state. */
body.dark.mobile-modern .content .op-filter-chip { height:32px;padding:0 12px;border-radius:999px;font-size:11px;letter-spacing:.02em; }
body.dark.mobile-modern .content .op-filter-chip.active { background:var(--brand);color:var(--bg);box-shadow:none; }
body.dark.mobile-modern:not(.mobile-light) .content .op-filter-chip.active { background:var(--mt-gold);color:#17140d; }
/* Lorcana's inkwell icons are pale line art: drawn in the text colour on cream. */
body.dark.mobile-modern.mobile-light .content :is(.lorcana-icon-filter,.lorcana-cost-filter) img { filter:brightness(.42) contrast(1.4); }
body.dark.mobile-modern.mobile-light .content :is(.lorcana-icon-filter,.lorcana-cost-filter,.lorcana-color-filter) { opacity:.75; }
body.dark.mobile-modern.mobile-light .content :is(.lorcana-icon-filter,.lorcana-cost-filter,.lorcana-color-filter).active { opacity:1; }

/* The shared filter parts (js/filters.js). */
body.dark.mobile-modern .content .filter-sort { display:inline-flex;align-items:center;gap:8px;margin:0;color:var(--muted);font-size:11px;font-weight:700; }
body.dark.mobile-modern .content .filter-sort>span { white-space:nowrap; }
body.dark.mobile-modern .content .filter-sort .select-control { width:auto;min-width:132px;min-height:40px;font-size:13px; }
body.dark.mobile-modern .content .filter-more-button { display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;font-size:13px; }
body.dark.mobile-modern .content .filter-more-button svg { width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round; }
body.dark.mobile-modern .content .zoom-control input { width:96px; }

/* Card tiles: chips stay whole (they wrap as a unit), the price gets its own line when narrow. */
body.dark.mobile-modern .content .variant-chips { flex-wrap:wrap;overflow:visible;row-gap:4px; }
body.dark.mobile-modern .content .variant-chip { white-space:nowrap; }

/* The deals list: fixed columns, so the cards and the amounts line up from row to row. */
@media (min-width:761px) {
  body.dark.mobile-modern .content .deal-row { grid-template-columns:minmax(0,220px) minmax(0,1fr) 230px; }
  body.dark.mobile-modern .content .deal-row-end { display:grid;grid-template-columns:1fr 124px;align-items:center;gap:12px;width:100%;justify-items:end; }
  body.dark.mobile-modern .content .deal-row-end .deal-status { justify-self:stretch;text-align:center; }
}

/* Settings: the profile switch reads like the others, with room before the form below it. */
body.dark.mobile-modern .content .public-profile-switch { margin-bottom:14px; }
body.dark.mobile-modern .content .public-profile-switch small a { overflow-wrap:anywhere; }
body.dark.mobile-modern .content .public-profile-games { display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px; }

/* The filter panel's chevron is an icon, centred, not a text glyph. */
body.dark.mobile-modern .content .mobile-filter-toggle>i { display:grid;place-items:center;top:50%;width:18px;height:18px;margin-top:-9px;font-size:0;line-height:0; }
body.dark.mobile-modern .content .mobile-filter-toggle>i::before { content:"";width:7px;height:7px;border-right:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform:translateY(-2px) rotate(45deg); }

@media (min-width:1024px) {
  /* Cards stepper row of "Auflage" belongs to the bar above it: same left edge, not centred. */
  body.dark.mobile-modern .content .tile-edition-row { justify-content:flex-start;margin-top:-10px;margin-bottom:18px;padding-left:4px; }
  /* Deckbuilder catalogue (a narrow side panel): search across the full width, icons at full size. */
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.filter-search { flex:1 1 100%;order:-1; }
  body.dark.mobile-modern .content .deck-catalog-filter-primary { flex-wrap:wrap; }
  body.dark.mobile-modern .deck-catalog-filter-secondary :is(.op-image-filter,.op-color-filter,.op-number-filter,.lorcana-color-filter,.lorcana-icon-filter,.lorcana-cost-filter) { width:30px;height:30px; }
  body.dark.mobile-modern .deck-catalog-filter-secondary .lorcana-cost-filter img { width:30px;height:30px; }
}

@media (min-width:1024px) {
  /* Every card filter bar in two rows: the controls on top (search, set, rarity, sort, more, zoom
     at the end), the game's own filters below a hairline -- the same on every page, whatever
     the screen width. */
  body.dark.mobile-modern .content>.mobile-filter-shell .op-catalog-filterbar:has(>.op-filter-group)::after { content:"";flex:0 0 100%;order:4;height:0;border-top:1px solid var(--line); }
  body.dark.mobile-modern .content>.mobile-filter-shell .op-catalog-filterbar>.filter-sort { order:1; }
  body.dark.mobile-modern .content>.mobile-filter-shell .op-catalog-filterbar>.catalog-settings-control { order:2; }
  body.dark.mobile-modern .content>.mobile-filter-shell .op-catalog-filterbar>.zoom-control { order:3; }
  body.dark.mobile-modern .content>.mobile-filter-shell .op-catalog-filterbar>.op-filter-group { order:5; }
  /* Dashboard: the shortcuts span the width of the numbers above them. */
  body.dark.mobile-modern .content .dashboard-quick-nav { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;width:100%; }
  body.dark.mobile-modern .content .dashboard-quick-nav>button { width:100%; }
  body.dark.mobile-modern .content .dashboard-quick-nav span { font-size:12px; }
}
/* Settings inputs read at the size of the rest of the form; status chips of eBay in the same
   capitals as the status of a deal. */
body.dark.mobile-modern .user-settings-card .settings-field :is(input,.select-control) { font-size:13px; }
body.dark.mobile-modern .content .ebay-chip { text-transform:uppercase;letter-spacing:.05em; }

/* ---- Design polish, round 3 ------------------------------------------------------------------ */
/* The old classic theme's grey (".dark .card-subline") won on phones: the tile's meta line in the
   theme's muted colour at every width. */
body.dark.mobile-modern .card-subline { color:var(--muted); }
/* The page behind the page: the theme's background, also where the body ends. */
html:has(body.mobile-modern.mobile-light) { background:#f5f0e6; }
html:has(body.mobile-modern:not(.mobile-light)) { background:#121210; }
/* The set switcher shows what fits, with an ellipsis -- at every width (a long One Piece name
   ran into the next button on a phone). */
body.dark.mobile-modern .content .set-switch-trigger { display:block;min-width:0;max-width:100%;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap; }
body.dark.mobile-modern .content .set-switch-control { min-width:0;max-width:100%; }
/* The count of a card at the bottom right of its picture, for every game: at the top it covered
   the printed name. In the app it sits in .variant-badges (Lorcana stacks one per finish there),
   on the public page on its own. While editing, the quantity control shows the count already. */
body.dark.mobile-modern .content .variant-badges { top:auto;bottom:.7em;flex-direction:column-reverse; }
body.dark.mobile-modern .content .variant-badges>.owned-pill { position:static; }
body.dark.mobile-modern .content .card-image-wrap>.owned-pill { top:auto;bottom:.7em; }
body.editing.dark.mobile-modern .content .variant-badges { display:none; }
/* One Piece costs as number chips: round, the same height as the others. */
body.dark.mobile-modern .content .op-cost-chip { width:32px;padding:0;font-variant-numeric:tabular-nums; }
/* The sets overview: its controls at the height and size of every other filter bar. */
body.dark.mobile-modern .content .set-overview-toolbar :is(.select-control,.secondary-button) { min-height:40px;font-size:13px; }
/* Chevrons of collapsible groups as an icon, centred. */
body.dark.mobile-modern .content .set-group-chevron { display:grid;place-items:center;font-size:0; }
body.dark.mobile-modern .content .set-group-chevron::before { content:"";width:7px;height:7px;border-right:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .2s ease; }
body.dark.mobile-modern .content .set-group.collapsed .set-group-chevron::before { transform:translateX(-1px) rotate(-45deg); }
/* Game logos in the settings large enough to recognise. */
body.dark.mobile-modern .settings-language-game i { width:38px;height:38px; }
body.dark.mobile-modern .settings-language-game img { width:30px;height:30px; }
/* Deals summary: label and amount as pairs in a grid. */
body.dark.mobile-modern .content .deal-totals { display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:6px 22px; }
@media (min-width:761px) {
  /* The rarity popup stays within the page and wraps its chips. */
  body.dark.mobile-modern .content .rarity-popup { flex-wrap:wrap!important;width:max-content;max-width:min(520px,calc(100vw - 420px)); }
}

/* ---- Design polish, round 4 ------------------------------------------------------------------ */
/* Popovers of the filter bar: one surface and shadow, dark or light. */
body.dark.mobile-modern .content .toolbar-filter-popup { background:var(--surface);border:1px solid var(--line);box-shadow:0 18px 44px rgba(0,0,0,.28); }
body.dark.mobile-modern.mobile-light .content .toolbar-filter-popup { box-shadow:0 18px 44px rgba(61,48,28,.14); }
/* The kind of a set (corner label) in the palette's muted tone, also in the dark. */
body.dark.mobile-modern .set-kind { color:var(--muted); }
/* eBay: the buttons in the head of "Meine Angebote" at the height of its filter chips' row. */
body.dark.mobile-modern .content .ebay-section .sheet-section-head :is(.secondary-button,.primary-button) { min-height:32px;padding:0 14px;font-size:12px; }
/* Deckbuilder catalogue: the game's icons at the height of its chips. */
@media (min-width:1024px) {
  body.dark.mobile-modern .deck-catalog-filter-secondary :is(.op-image-filter,.op-color-filter,.lorcana-color-filter,.lorcana-icon-filter,.lorcana-cost-filter) { width:32px;height:32px; }
}
/* Admin: a provider's actions on one line, the delete button at its end. */
body.dark.mobile-modern .content .admin-row-actions { display:flex;flex-wrap:nowrap;align-items:center;gap:6px; }
body.dark.mobile-modern .content .admin-row-actions>.icon-button { flex:none;margin-left:auto; }

/* Lorcana's foil count: solid gold with dark text, and a mark -- not told apart by colour alone. */
body.dark.mobile-modern .content .variant-badge.tier-foil { background:#d6b05a;color:#241905;box-shadow:0 0 0 1px rgba(255,236,180,.55) inset,0 3px 10px rgba(0,0,0,.18); }
body.dark.mobile-modern .content .variant-badge.tier-foil::before { content:"✦";margin-right:1px;font-size:.85em; }
body.dark.mobile-modern .content .variant-badge.tier-foil.missing { opacity:.55; }
@media (min-width:1024px) {
  body.dark.mobile-modern .deck-catalog-filter-secondary .op-color-filter { padding:1px; }
}
