/* Ophir Cards modern mobile pages
   The active card-detail work intentionally stays in mobile-theme.css.
   This file only targets application chrome and #content, which is a sibling
   of every overlay/modal in index.html. */

.mobile-profile-button,.mobile-topbar-title,.dashboard-account-button { display:none; }
.deck-catalog-open-button,.deck-catalog-close,.deck-catalog-backdrop { display:none; }
.mobile-filter-shell,.mobile-filter-body { display:contents; }
.mobile-filter-toggle { display:none; }
.global-game-picker { display:contents; }
.global-game-icon { display:none; }
.deck-header-menu-button svg,.deck-rules-button svg,.deck-transfer-option svg {
  width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}
.deck-transfer-dialog { width:min(430px,calc(100% - 32px));min-height:0; }
.deck-transfer-options { display:grid;gap:9px;margin-top:18px; }
.deck-transfer-option {
  display:flex;align-items:center;gap:12px;width:100%;padding:13px;border:1px solid var(--line);border-radius:13px;
  background:var(--surface-2);color:var(--ink);text-align:left;cursor:pointer;
}
.deck-transfer-option>svg { flex:0 0 34px;width:34px;height:34px;padding:7px;border-radius:50%;background:var(--surface); }
.deck-transfer-option>span { display:flex;flex:1;min-width:0;flex-direction:column;gap:3px; }
.deck-transfer-option b { font-size:11px; }
.deck-transfer-option small { color:var(--muted);font-size:9.5px; }
.deck-transfer-option>i { color:var(--muted);font:500 22px/1 var(--font-display);font-style:normal; }
.deck-transfer-option.danger { color:#b3625b; }

@media (max-width:760px) {
  body.dark.mobile-modern {
    --mp-card:rgba(27,27,24,.92);
    --mp-soft:rgba(36,36,32,.7);
    --mp-line:rgba(240,234,220,.06);
    --mp-shadow:0 12px 34px rgba(0,0,0,.22);
    --mp-shadow-soft:0 7px 20px rgba(0,0,0,.14);
    --mp-gold-soft:rgba(216,180,108,.12);
    --mp-danger-soft:rgba(207,106,98,.12);
    --mp-control:42px;
  }
  body.dark.mobile-modern.mobile-light {
    --mp-card:rgba(232,226,214,.78);
    --mp-soft:rgba(241,236,226,.74);
    --mp-line:rgba(47,52,42,.075);
    --mp-shadow:0 12px 34px rgba(54,43,25,.075);
    --mp-shadow-soft:0 7px 20px rgba(54,43,25,.055);
    --mp-gold-soft:rgba(201,169,97,.14);
    --mp-danger-soft:rgba(173,73,63,.075);
  }

  body.dark.mobile-modern::before {
    content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
    background:radial-gradient(circle at 82% 2%,rgba(216,180,108,.06),transparent 28%),radial-gradient(circle at 8% 44%,rgba(216,180,108,.03),transparent 34%);
  }
  body.dark.mobile-modern.mobile-light::before {
    background:radial-gradient(circle at 82% 2%,rgba(201,169,97,.11),transparent 29%),radial-gradient(circle at 7% 48%,rgba(75,105,82,.055),transparent 35%);
  }

  /* App chrome */
  body.dark.mobile-modern .app-shell { min-height:100dvh; }
  body.dark.mobile-modern .topbar {
    position:fixed;inset:0 0 auto;z-index:40;height:auto;min-height:68px;padding:calc(11px + env(safe-area-inset-top)) 16px 11px;gap:9px;
    border:0;background:color-mix(in srgb,var(--bg) 88%,transparent);box-shadow:none;
    backdrop-filter:blur(22px) saturate(1.15);-webkit-backdrop-filter:blur(22px) saturate(1.15);
  }
  body.dark.mobile-modern .topbar .global-game-picker {
    position:relative;display:grid;flex:0 0 42px;width:42px;height:42px;place-items:center;
    border:1px solid var(--mp-line);border-radius:50%;background:var(--mp-card);box-shadow:var(--mp-shadow-soft);overflow:hidden;
  }
  body.dark.mobile-modern .topbar .global-game-icon {
    display:block;width:27px;height:27px;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 .topbar .global-game-filter {
    appearance:none;-webkit-appearance:none;position:absolute;inset:0;z-index:2;width:100%;min-width:0;max-width:none;height:100%;margin:0;padding:0;
    border:0;border-radius:50%;background:transparent;box-shadow:none;opacity:0;cursor:pointer;
  }
  body.dark.mobile-modern .topbar .global-search {
    min-width:0;height:var(--mp-control);margin:0;padding:0 14px;gap:9px;border:1px solid var(--mp-line);
    background:var(--mp-soft);box-shadow:none;color:var(--muted);
  }
  body.dark.mobile-modern .topbar .global-search>span:first-child { font-size:19px;line-height:1; }
  body.dark.mobile-modern .topbar .global-search>span:nth-child(2)::after { content:"Search";font-size:11px; }
  body.dark.mobile-modern:not([data-route="dashboard"]) .topbar .global-search { order:1;flex:1 1 auto; }
  body.dark.mobile-modern:not([data-route="dashboard"]) .topbar .global-game-picker { order:2; }
  body.dark.mobile-modern:not([data-route="dashboard"]) .topbar .top-actions { order:3; }
  body.dark.mobile-modern .top-actions { display:none;margin-left:0; }
  body.dark.mobile-modern.editing .top-actions { display:flex; }
  body.dark.mobile-modern .edit-indicator {
    width:30px;height:30px;padding:0;place-items:center;border:1px solid rgba(210,180,108,.22);border-radius:50%;
    background:var(--mp-gold-soft);color:var(--mt-gold);font-size:0;letter-spacing:0;
  }
  body.dark.mobile-modern.editing .edit-indicator { display:grid; }
  body.dark.mobile-modern .edit-indicator svg { width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
  body.dark.mobile-modern .mobile-profile-button {
    display:none;flex:0 0 42px;width:42px;height:42px;padding:0;place-items:center;border:1px solid var(--mp-line);
    border-radius:50%;background:var(--mp-card);color:var(--muted);box-shadow:var(--mp-shadow-soft);cursor:pointer;
  }
  body.dark.mobile-modern .mobile-profile-button svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round; }
  body.dark.mobile-modern .mobile-profile-button.active { background:var(--mp-gold-soft);color:var(--brand); }
  body.dark.mobile-modern .content {
    min-height:100dvh;padding:calc(80px + env(safe-area-inset-top)) 16px calc(112px + env(safe-area-inset-bottom));
    background:transparent;color:var(--ink);overflow-x:clip;
  }
  body.dark.mobile-modern.deck-catalog-visible { overflow:hidden; }
  body.dark.mobile-modern .content>:first-child { animation:mp-page-in .28s ease both; }
  @keyframes mp-page-in { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:none} }

  body.dark.mobile-modern .mobile-tabbar {
    display:grid;left:50%;right:auto;bottom:10px;width:calc(100% - 24px);max-width:430px;min-height:68px;transform:translateX(-50%);
    grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;justify-content:initial;
    padding:7px 12px calc(7px + env(safe-area-inset-bottom));border:1px solid var(--mp-line);border-radius:28px;
    background:color-mix(in srgb,var(--surface) 92%,transparent);box-shadow:0 14px 38px rgba(0,0,0,.2);
    backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);
  }
  body.dark.mobile-modern.mobile-light .mobile-tabbar { box-shadow:0 14px 38px rgba(54,43,25,.12); }
  body.dark.mobile-modern .mt-tab {
    justify-self:center;width:46px;height:46px;padding:0;transition:color .18s ease,background .18s ease,transform .18s ease,box-shadow .18s ease;
  }
  body.dark.mobile-modern .mt-tab>svg {
    position:absolute;top:50%;left:50%;display:block;margin:0;transform:translate(-50%,-50%);transform-origin:center;
  }
  body.dark.mobile-modern .mt-tab:active { transform:scale(.92); }
  body.dark.mobile-modern .mt-tab.active:not(.mt-tab-add) {
    background:#efe2bd;color:#16392d;
    box-shadow:inset 0 0 0 1px rgba(194,156,77,.12),var(--mp-shadow-soft);
  }
  body.dark.mobile-modern .mt-tab.active:not(.mt-tab-add) svg { fill:currentColor;stroke:currentColor; }
  body.dark.mobile-modern .mt-tab-add {
    width:52px;height:52px;margin-top:0;border:1px solid rgba(255,255,255,.14);
    background:radial-gradient(circle at 38% 30%,#2b5947 0,#173a2e 52%,#10271f 100%);color:#fff;
    box-shadow:inset 0 1px 1px rgba(255,255,255,.13),0 8px 18px rgba(8,18,13,.32);
  }
  body.dark.mobile-modern .mt-tab-add svg {
    width:22px;height:22px;fill:none;stroke-width:2;transform:translate(-50%,calc(-50% - 1px));
  }
  body.dark.mobile-modern.editing .mt-tab-add {
    border-color:rgba(236,213,156,.48);background:radial-gradient(circle at 38% 30%,#2b5947 0,#173a2e 52%,#10271f 100%);color:#fff;
    box-shadow:0 0 0 5px rgba(210,180,108,.14),inset 0 1px 1px rgba(255,255,255,.13),0 10px 24px rgba(8,18,13,.34);
  }
  body.dark.mobile-modern.editing .mt-tab-add svg { fill:none; }

  /* Shared hierarchy and controls */
  body.dark.mobile-modern .content :is(h1,h2,h3) { text-wrap:balance; }
  body.dark.mobile-modern .content :is(h1,h2,h3,h4,b,strong) { color:var(--ink); }
  body.dark.mobile-modern .content :is(.page-head h1,.dashboard-hero h1,.game-banner h1,.set-compact-title h1,.toolbar h2,.deck-overview-head h1,.deck-editor-head input,.deck-catalog-title b,.op-section-head h2) {
    font-family:var(--font-display);font-weight:600;letter-spacing:-.018em;color:var(--ink);
  }
  body.dark.mobile-modern .content .eyebrow { color:var(--mt-gold);font-size:9.5px;font-weight:750;letter-spacing:.14em;text-transform:uppercase; }
  body.dark.mobile-modern .content .muted,
  body.dark.mobile-modern .content :is(p,small) { color:var(--muted); }
  body.dark.mobile-modern .content .page-head { display:flex;align-items:flex-start;flex-direction:row;gap:12px;margin:4px 0 22px; }
  body.dark.mobile-modern .content .page-head>div:first-child { min-width:0; }
  body.dark.mobile-modern .content .page-head h1 { margin:2px 0 4px;font-size:31px;line-height:1.02; }
  body.dark.mobile-modern .content .page-head p { max-width:290px;font-size:11px;line-height:1.45; }
  body.dark.mobile-modern .content .page-head-actions { flex:0 0 auto;margin-left:auto; }

  body.dark.mobile-modern .content .mobile-filter-shell { display:block;width:100%;margin:0 auto 16px; }
  body.dark.mobile-modern .content .mobile-filter-shell.is-open { position:relative;z-index:24; }
  body.dark.mobile-modern .content .mobile-filter-toggle {
    position:relative;display:flex;width:min(100%,340px);height:46px;margin-inline:auto;padding:0 44px;align-items:center;justify-content:flex-start;gap:10px;border:1px solid var(--mp-line);
    border-radius:var(--mt-radius-full);background:var(--mp-soft);color:var(--ink);box-shadow:none;font:650 10px/1 var(--font-ui);cursor:pointer;
  }
  body.dark.mobile-modern .content .mobile-filter-toggle-icon {
    display:grid;width:27px;height:27px;place-items:center;border-radius:50%;background:var(--mp-gold-soft);color:var(--brand);
  }
  body.dark.mobile-modern .content .mobile-filter-toggle svg {
    width:16px;height:16px;fill:var(--surface);stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;
  }
  body.dark.mobile-modern .content .mobile-filter-toggle>i {
    position:absolute;right:14px;color:var(--muted);font:500 18px/1 var(--font-display);font-style:normal;transition:transform .22s ease;
  }
  body.dark.mobile-modern .content .mobile-filter-body {
    display:block;max-height:0;overflow:hidden;opacity:0;pointer-events:none;transform:translateY(-5px);
    transition:max-height .32s cubic-bezier(.2,.7,.2,1),opacity .18s ease,transform .25s ease;
  }
  body.dark.mobile-modern .content .mobile-filter-shell.is-open .mobile-filter-body { max-height:1700px;overflow:visible;opacity:1;pointer-events:auto;transform:none; }
  body.dark.mobile-modern .content .mobile-filter-shell.is-open .mobile-filter-toggle>i { transform:rotate(180deg); }
  body.dark.mobile-modern .content .mobile-filter-body>:first-child { margin-top:10px; }
  body.dark.mobile-modern .content .mobile-filter-body>:last-child { margin-bottom:0; }

  body.dark.mobile-modern .content :is(.primary-button,.secondary-button,.danger-button,.icon-button,.select-control,.filter-search input) {
    min-height:var(--mp-control);border-radius:var(--mt-radius-full);font-family:var(--font-ui);
  }
  body.dark.mobile-modern .content .primary-button {
    padding-inline:18px;border:0;background:linear-gradient(145deg,#315443,#183326);color:#f7f2e8;
    box-shadow:0 8px 17px rgba(7,18,12,.2);font-size:11px;font-weight:700;
  }
  body.dark.mobile-modern .content :is(.secondary-button,.icon-button) {
    border:1px solid var(--mp-line);background:var(--mp-card);color:var(--ink);box-shadow:var(--mp-shadow-soft);
  }
  body.dark.mobile-modern .content .danger-button {
    border:1px solid color-mix(in srgb,var(--danger) 16%,transparent);background:var(--mp-danger-soft);color:var(--danger);box-shadow:none;
  }
  body.dark.mobile-modern .content :is(.select-control,.filter-search input) {
    border:1px solid var(--mp-line);background:var(--mp-soft);color:var(--ink);box-shadow:none;
  }
  body.dark.mobile-modern .content .filter-search span { left:14px;top:11px;color:var(--muted); }
  body.dark.mobile-modern .content .filter-search input { height:var(--mp-control);padding-left:38px; }
  body.dark.mobile-modern .content :is(.select-control,.filter-search input):focus {
    border-color:color-mix(in srgb,var(--brand) 28%,transparent)!important;box-shadow:0 0 0 3px var(--mt-accent-soft)!important;
  }
  body.dark.mobile-modern .content .segmented {
    padding:4px;border:0;border-radius:var(--mt-radius-full);background:var(--mp-soft);box-shadow:inset 0 0 0 1px var(--mp-line);
  }
  body.dark.mobile-modern .content .segmented button { height:34px;border-radius:var(--mt-radius-full); }
  body.dark.mobile-modern .content .segmented button.active { background:var(--mp-card);color:var(--ink);box-shadow:var(--mp-shadow-soft); }
  body.dark.mobile-modern .content .badge { border:0;border-radius:var(--mt-radius-full);background:var(--mp-gold-soft);color:var(--mt-gold);font-size:9.5px; }
  body.dark.mobile-modern .content .empty-state {
    min-height:210px;padding:58px 24px;border:1px dashed var(--mp-line);border-radius:var(--mt-radius-lg);background:var(--mp-soft);
  }
  body.dark.mobile-modern .content .empty-state b { font-family:var(--font-display);font-size:22px;font-weight:600; }
  body.dark.mobile-modern .content .page-loader span { border-color:var(--mp-line);border-top-color:var(--brand); }

  /* Dashboard */
  body.dark.mobile-modern .content .dashboard-shell {
    display:flex;min-height:calc(100dvh - 205px);max-width:none;flex-direction:column;
  }
  body.dark.mobile-modern .content .dashboard-hero { gap:18px;min-height:0;margin:0 0 24px;padding:10px 0 0;overflow:visible;border:0;border-radius:0;background:none;box-shadow:none; }
  body.dark.mobile-modern .content .dashboard-hero::before,
  body.dark.mobile-modern .content .dashboard-hero::after { display:none; }
  body.dark.mobile-modern .content .hero-top { display:block; }
  body.dark.mobile-modern .content .hero-copy { display:none; }
  body.dark.mobile-modern .content .dashboard-hero h1 { max-width:320px;margin:0 0 7px;font-size:34px;line-height:1.02; }
  body.dark.mobile-modern .content .dashboard-hero p { max-width:315px;font-size:11px;line-height:1.55; }
  body.dark.mobile-modern .content .hero-summary {
    position:relative;isolation:isolate;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;
    margin-top:0;padding:15px 6px;overflow:hidden;border:2px solid color-mix(in srgb,var(--mt-gold) 82%,#76531e);border-radius:var(--mt-radius-lg);
    background:var(--mp-soft);
    box-shadow:var(--mp-shadow-soft),0 0 14px color-mix(in srgb,var(--mt-gold) 18%,transparent);
  }
  body.dark.mobile-modern .content .hero-summary:not(ophir-stat-pill)::before {
    content:"";position:absolute;z-index:2;inset:0;padding:2px;pointer-events:none;border-radius:inherit;
    background-image:linear-gradient(125deg,transparent 18%,rgba(255,244,205,.38) 31%,#fffef5 43%,#fff 50%,#f4d58d 59%,transparent 78%);
    background-size:148px 100%;background-repeat:no-repeat;background-position:-160px 0;
    -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
    -webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude;
    animation:mp-summary-shine 3.4s ease-in-out 2; /* finite for the same reason as stat-pill-shine */
  }
  @keyframes mp-summary-shine {
    0%,12%{background-position:-160px 0}
    82%,100%{background-position:calc(100% + 160px) 0}
  }
  body.dark.mobile-modern .content .hero-summary div { position:relative;z-index:1;min-width:0;padding:0 10px;text-align:center; }
  body.dark.mobile-modern .content .hero-summary div+div { border-left:1px solid var(--mp-line); }
  body.dark.mobile-modern .content .hero-summary b { font:600 17px/1.1 var(--font-display);color:var(--ink); }
  body.dark.mobile-modern .content .hero-summary span { margin-top:5px;color:var(--muted);font-size:9px;letter-spacing:.09em; }
  body.dark.mobile-modern .content .dashboard-quick-nav {
    display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;
  }
  body.dark.mobile-modern .content .dashboard-quick-nav button {
    display:grid;min-width:0;min-height:62px;padding:7px 4px 6px;place-items:center;align-content:center;gap:4px;
    border:1px solid var(--mp-line);border-radius:16px;background:var(--mp-soft);color:var(--ink);cursor:pointer;
  }
  body.dark.mobile-modern .content .dashboard-quick-nav button:active { transform:scale(.96); }
  body.dark.mobile-modern .content .dashboard-quick-nav svg {
    width:21px;height:21px;fill:none;stroke:var(--brand);stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round;
  }
  body.dark.mobile-modern .content .dashboard-quick-nav span { overflow:hidden;width:100%;font-size:9.5px;font-weight:650;text-align:center;text-overflow:ellipsis; }
  body.dark.mobile-modern .content .dashboard-quick-nav strong {
    color:var(--muted);font:600 10px/1 var(--font-ui);font-variant-numeric:tabular-nums;
  }
  body.dark.mobile-modern .content .home-banner {
    width:calc(100% + 32px);margin:0 0 0 -16px;padding:13px 0 5px;border:0;border-radius:0;background:transparent;box-shadow:none;
  }
  body.dark.mobile-modern .content .home-banner-head { justify-content:flex-start;padding:0 16px; }
  body.dark.mobile-modern .content .home-banner-head .eyebrow {
    color:var(--ink);font:600 16px/1.1 var(--font-display);letter-spacing:-.01em;text-transform:none;
  }
  body.dark.mobile-modern .content .home-banner-viewport {
    padding:18px 0 15px;
    mask-image:linear-gradient(90deg,transparent 0,#000 24px,#000 100%);
    -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 24px,#000 100%);
  }
  body.dark.mobile-modern .content .home-banner-track { --banner-gap:7px;gap:0; }
  body.dark.mobile-modern .content .banner-card { flex:0 0 96px;width:96px; }
  body.dark.mobile-modern .content .banner-card-art { width:96px;border-radius:9px;box-shadow:0 8px 16px rgba(0,0,0,.18); }
  body.dark.mobile-modern .content .banner-card-meta { display:block;min-width:0;padding:7px 2px 0; }
  body.dark.mobile-modern .content .banner-card-meta b,
  body.dark.mobile-modern .content .banner-card-meta span { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  body.dark.mobile-modern .content .banner-card-meta b { color:var(--ink);font-size:9.5px;font-weight:600; }
  body.dark.mobile-modern .content .banner-card-meta span { margin-top:3px;color:var(--muted);font-size:9px;font-variant-numeric:tabular-nums; }
  body.dark.mobile-modern .content .dashboard-recent {
    width:calc(100% + 32px);margin:-2px 0 0 -16px;padding:0 16px 4px;background:transparent;
  }
  body.dark.mobile-modern .content .dashboard-recent h2 {
    margin:0 0 9px;font:600 18px/1.1 var(--font-display);letter-spacing:-.015em;color:var(--ink);
  }
  body.dark.mobile-modern .content .dashboard-recent-list {
    width:calc(100% + 32px);margin-left:-16px;padding:0 16px;border-top:1px solid var(--mp-line);
    background:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.052) 50%,transparent 100%);
  }
  body.dark.mobile-modern .content .dashboard-recent-row {
    display:grid;width:100%;min-height:68px;padding:8px 2px;grid-template-columns:39px minmax(0,1fr) auto;align-items:center;gap:10px;
    border:0;border-bottom:1px solid var(--mp-line);background:transparent;color:var(--ink);text-align:left;cursor:pointer;
  }
  body.dark.mobile-modern .content .dashboard-recent-row:last-child { border-bottom:0; }
  body.dark.mobile-modern .content .dashboard-recent-row img {
    display:block;width:36px;aspect-ratio:5/7;border-radius:5px;object-fit:cover;box-shadow:0 4px 10px rgba(0,0,0,.14);
  }
  body.dark.mobile-modern .content .dashboard-recent-copy { display:block;min-width:0; }
  body.dark.mobile-modern .content .dashboard-recent-copy b,
  body.dark.mobile-modern .content .dashboard-recent-copy small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  body.dark.mobile-modern .content .dashboard-recent-copy b { font-size:10px;font-weight:600; }
  body.dark.mobile-modern .content .dashboard-recent-copy small { margin-top:4px;font-size:9.5px; }
  body.dark.mobile-modern .content .dashboard-recent-price { padding-left:8px;font:600 11px/1 var(--font-ui);white-space:nowrap; }
  body[data-route="dashboard"].dark.mobile-modern .topbar {
    display:grid;grid-template-columns:1fr auto auto;grid-template-rows:42px 39px;gap:12px 10px;
    height:114px;padding:14px 16px 7px;
  }
  body[data-route="dashboard"].dark.mobile-modern .topbar .mobile-topbar-title {
    display:block;grid-column:1;grid-row:1;align-self:end;margin:0;color:var(--ink);
    font:600 23px/1 var(--font-display);letter-spacing:-.02em;
  }
  body[data-route="dashboard"].dark.mobile-modern .topbar .global-game-picker { grid-column:3;grid-row:1;align-self:center; }
  body[data-route="dashboard"].dark.mobile-modern .topbar .mobile-profile-button { display:none; }
  body[data-route="dashboard"].dark.mobile-modern .topbar .top-actions { grid-column:2;grid-row:1;justify-self:end;align-self:center; }
  body[data-route="dashboard"].dark.mobile-modern .topbar .global-search {
    grid-column:1 / -1;grid-row:2;width:100%;height:39px;margin:0;
  }
  body[data-route="dashboard"].dark.mobile-modern .content {
    padding-top:calc(115px + env(safe-area-inset-top));
  }
  body.dark.mobile-modern .content .game-grid {
    display:none;
  }
  body.dark.mobile-modern .content .dashboard-account-button {
    display:inline-flex;flex:0 0 40px;min-width:112px;height:40px;margin-top:auto;padding:0 20px;align-self:center;
    align-items:center;justify-content:center;border:1px solid var(--mp-line);border-radius:var(--mt-radius-full);background:var(--mp-soft);
    color:var(--ink);box-shadow:var(--mp-shadow-soft);font:600 10px/1 var(--font-ui);cursor:pointer;
  }
  @media (prefers-reduced-motion:reduce) { body.dark.mobile-modern .content .hero-summary::before { animation:none; } }
  body.dark.mobile-modern .content .game-tile {
    width:100%;min-height:205px;border:1px solid var(--mp-line);border-radius:var(--mt-radius-lg);
    background:var(--mp-card);box-shadow:var(--mp-shadow);scroll-snap-align:none;
  }
  body.dark.mobile-modern .content .game-visual { height:120px;padding:20px 24px;background:transparent; }
  body.dark.mobile-modern .content .game-logo { width:min(225px,84%);height:75px; }
  body.dark.mobile-modern .content .game-info { padding:13px 18px 17px;border-top:1px solid var(--mp-line);background:transparent; }
  body.dark.mobile-modern .content .game-main-stat { margin-bottom:10px; }
  body.dark.mobile-modern .content .game-main-stat b { font:600 19px var(--font-display); }
  body.dark.mobile-modern .content .game-main-stat span { color:var(--muted);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase; }
  body.dark.mobile-modern .content .game-stats { font-size:9px; }
  body.dark.mobile-modern .content .game-stats b { color:var(--ink); }
  body.dark.mobile-modern .content .progress-track { height:3px;margin-bottom:9px;background:var(--mt-accent-soft); }

  /* Game and set overview */
  body.dark.mobile-modern .content .breadcrumbs { gap:6px;margin:2px 0 12px;font-size:9px; }
  body.dark.mobile-modern .content .breadcrumb-back { display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--mp-card);box-shadow:var(--mp-shadow-soft);font-size:15px; }
  body.dark.mobile-modern .content .game-banner {
    display:grid;grid-template-columns:72px 1fr;gap:13px;margin-bottom:22px;padding:16px;border:0;
    border-radius:var(--mt-radius-lg);background:var(--mp-soft);color:var(--ink);box-shadow:none;
  }
  body.dark.mobile-modern .content .game-banner-symbol { width:72px;height:50px;border:0;background:transparent; }
  body.dark.mobile-modern .content .game-banner h1 { margin:0 0 3px;font-size:23px; }
  body.dark.mobile-modern .content .game-banner p { color:var(--muted);font-size:9.5px; }
  body.dark.mobile-modern .content .game-banner .banner-value {
    display:flex;grid-column:1/-1;align-items:end;justify-content:space-between;margin:0;padding-top:12px;border-top:1px solid var(--mp-line);text-align:left;
  }
  body.dark.mobile-modern .content .banner-value b { font:600 19px var(--font-display); }
  body.dark.mobile-modern .content .banner-value span { max-width:150px;color:var(--muted);font-size:9px;text-align:right; }
  body.dark.mobile-modern .content .set-overview-toolbar { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:0;padding:10px;border-radius:var(--mt-radius-lg);background:var(--mp-soft); }
  body.dark.mobile-modern .content .set-overview-toolbar h2 { display:none; }
  body.dark.mobile-modern .content .set-overview-toolbar :is(.all-cards-button,#set-type-filter,#set-sort,#set-direction) { width:100%;max-width:none; }
  body.dark.mobile-modern .content .set-overview-toolbar .zoom-control { display:none; }
  body.dark.mobile-modern .content .set-overview-groups { gap:24px; }
  body.dark.mobile-modern .content .set-group-head { gap:8px;margin-bottom:12px;padding:0 2px 10px;border-bottom:1px solid var(--mp-line); }
  body.dark.mobile-modern .content .set-group-head h3 { font:600 20px var(--font-display); }
  body.dark.mobile-modern .content .set-group-chevron { width:26px;height:26px;border-radius:50%;background:var(--mp-soft); }
  body.dark.mobile-modern .content .set-grid { grid-template-columns:1fr;gap:14px; }
  body.dark.mobile-modern .content .set-card { border:1px solid color-mix(in srgb,var(--mp-line) 62%,transparent);border-radius:var(--mt-radius-lg);background:var(--mp-soft);box-shadow:none; }
  body.dark.mobile-modern .content .set-art { height:124px;border:0;background:transparent;box-shadow:inset 0 -1px var(--mp-line); }
  body.dark.mobile-modern .content .set-art::after { background:linear-gradient(transparent,color-mix(in srgb,var(--surface) 90%,transparent));opacity:.88; }
  body.dark.mobile-modern.mobile-light .content .set-art::after { background:linear-gradient(transparent,rgba(245,240,230,.94)); }
  body.dark.mobile-modern .content .set-brand-logo { padding:10px 18px 24px; }
  body.dark.mobile-modern .content .set-code { color:var(--ink);font-size:9px; }
  body.dark.mobile-modern .content .set-kind { color:var(--muted);font-size:9.5px; }
  body.dark.mobile-modern .content .set-card-info { padding:15px 16px 13px;background:transparent; }
  body.dark.mobile-modern .content .set-card h3 { margin-bottom:4px;font:600 19px var(--font-display); }
  body.dark.mobile-modern .content .set-meta { color:var(--muted);font-size:9.5px; }
  body.dark.mobile-modern .content .set-completion { gap:0;margin-top:12px;padding-top:11px;border-color:var(--mp-line); }
  body.dark.mobile-modern .content .set-completion span { flex:1;min-width:0;font-size:8.5px; }
  body.dark.mobile-modern .content .set-completion b { margin-top:2px;font-size:10px; }
  body.dark.mobile-modern.mobile-light .content :is(.game-logo,.game-banner-symbol img) {
    filter:brightness(0) saturate(100%) invert(17%) sepia(11%) saturate(1125%) hue-rotate(101deg) brightness(88%) contrast(94%);
  }

  /* Set browser and all-cards page. */
  body.dark.mobile-modern .content .set-compact-head {
    display:block;min-height:0;margin-bottom:14px;padding:14px 15px;border:0;
    border-radius:var(--mt-radius-lg);background:var(--mp-soft);box-shadow:none;
  }
  body.dark.mobile-modern .content .set-compact-title h1 { display:block;font-size:25px;line-height:1.05;white-space:normal; }
  body.dark.mobile-modern .content .set-compact-title h1>span { display:block;margin-bottom:5px;color:var(--mt-gold);font:750 9.5px var(--font-ui);letter-spacing:.12em; }
  body.dark.mobile-modern .content .set-compact-title h1 small { display:block;margin-top:6px;color:var(--muted);font:500 9.5px var(--font-ui); }
  body.dark.mobile-modern .content .compact-badges { display:flex;margin-top:10px; }
  body.dark.mobile-modern .content .compact-stats { display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:13px 0 0;padding-top:12px;border-top:1px solid var(--mp-line); }
  body.dark.mobile-modern .content .compact-stat,
  body.dark.mobile-modern .content .compact-stat:not(:first-child):not(.value) { display:block;min-width:0;padding:8px;border-radius:12px;background:var(--mp-soft);text-align:center; }
  body.dark.mobile-modern .content .compact-stat.value { min-width:0; }
  body.dark.mobile-modern .content .compact-stat span { font-size:8.5px; }
  body.dark.mobile-modern .content .compact-stat b { font:600 13px var(--font-display); }
  body.dark.mobile-modern .content .card-toolbar-sticky { position:static;z-index:auto;margin-bottom:16px;background:transparent;box-shadow:none;backdrop-filter:none; }
  body.dark.mobile-modern .content :is(.op-catalog-filterbar,.op-catalog-controls) {
    gap:9px;padding:10px;border:0;border-radius:var(--mt-radius-lg);background:var(--mp-soft);box-shadow:none;
  }
  body.dark.mobile-modern .content .op-catalog-filterbar { display:flex;flex-wrap:wrap;overflow:visible; }
  body.dark.mobile-modern .content .op-catalog-filterbar>.filter-search { flex:1 0 100%; }
  body.dark.mobile-modern .content .set-switch-trigger { max-width:190px;border-radius:var(--mt-radius-full);background:var(--mp-soft); }
  body.dark.mobile-modern .content :is(.toolbar-filter-popup,.set-switch-popup) {
    max-width:calc(100vw - 32px);border:1px solid var(--mp-line);border-radius:var(--mt-radius-md);background:var(--surface);box-shadow:0 18px 42px rgba(0,0,0,.28);
  }
  body.dark.mobile-modern .content .op-filter-group { min-width:0; }
  body.dark.mobile-modern .content .op-filter-group>span { color:var(--muted);font-size:9px;letter-spacing:.09em; }
  body.dark.mobile-modern .content .op-filter-group>div { max-width:100%;overflow-x:auto;scrollbar-width:none; }
  body.dark.mobile-modern .content .op-filter-chip { border-color:var(--mp-line);background:var(--mp-soft);color:var(--muted); }
  body.dark.mobile-modern .content .op-filter-chip.active { border-color:transparent;background:var(--mt-accent-soft);color:var(--brand); }

  /* Mobile catalogue filter card: controls form one centered composition.
     Rarity expands in-flow inside this card, immediately above the cost row,
     instead of becoming a viewport-clipped absolute popup. */
  body.dark.mobile-modern .content .catalog-filter-mobile {
    display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;justify-items:center;gap:10px 8px;
    overflow:visible;
  }
  body.dark.mobile-modern .content .catalog-filter-mobile>.filter-search { grid-column:1/-1;width:100%; }
  body.dark.mobile-modern .content .catalog-filter-mobile>.set-switch-control { grid-column:1;grid-row:1;justify-self:stretch; }
  body.dark.mobile-modern .content .catalog-filter-mobile>.set-switch-control>.set-switch-trigger { width:100%;max-width:none; }
  body.dark.mobile-modern .content .catalog-filter-mobile>.rarity-filter-anchor { display:contents; }
  body.dark.mobile-modern .content .catalog-filter-mobile>.rarity-filter-anchor>.secondary-button { grid-column:2;grid-row:1;white-space:nowrap; }
  body.dark.mobile-modern .content .catalog-filter-mobile>.catalog-settings-control { grid-column:3;grid-row:1; }
  body.dark.mobile-modern .content .catalog-filter-mobile>.catalog-settings-control>.icon-button { width:42px;height:42px; }
  body.dark.mobile-modern .content .catalog-filter-mobile .rarity-popup {
    position:static;grid-column:1/-1;grid-row:2;width:100%;max-width:none;padding:10px 8px;border:0;border-radius:14px;
    justify-content:center;flex-direction:row!important;flex-wrap:wrap;background:var(--mp-soft);box-shadow:inset 0 0 0 1px var(--mp-line);transform:none;
  }
  body.dark.mobile-modern .content .catalog-filter-mobile>.op-filter-group {
    grid-column:1/-1;width:100%;padding-top:9px;border-top:1px solid var(--mp-line);text-align:center;
  }
  body.dark.mobile-modern .content .catalog-filter-mobile>.op-filter-group>div { justify-content:center;overflow:visible; }
  body.dark.mobile-modern .content .catalog-filter-mobile .rarity-popup .op-image-filter { width:32px;height:32px; }
  body.dark.mobile-modern .content .catalog-filter-mobile:has(>.filter-search)>.set-switch-control,
  body.dark.mobile-modern .content .catalog-filter-mobile:has(>.filter-search)>.rarity-filter-anchor>.secondary-button,
  body.dark.mobile-modern .content .catalog-filter-mobile:has(>.filter-search)>.catalog-settings-control { grid-row:2; }
  body.dark.mobile-modern .content .catalog-filter-mobile:has(>.filter-search) .rarity-popup { grid-row:3; }

  body.dark.mobile-modern .content .card-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px; }
  body.dark.mobile-modern .content .card-tile { font-size:10px; }
  body.dark.mobile-modern .content .card-image-wrap { border-radius:12px;background:var(--mp-soft);box-shadow:0 8px 18px rgba(0,0,0,.16); }
  body.dark.mobile-modern.mobile-light .content .card-image-wrap { box-shadow:0 8px 18px rgba(52,42,24,.11); }
  body.dark.mobile-modern .content .card-info { padding:9px 2px 0; }
  body.dark.mobile-modern .content .card-info b { font-size:10px;font-weight:650; }
  body.dark.mobile-modern .content .card-subline { gap:4px;font-size:9px; }
  body.dark.mobile-modern .content .card-price { color:var(--ink);font-weight:700; }
  body.dark.mobile-modern .content .watch-button { border:1px solid rgba(255,255,255,.08);background:rgba(20,31,24,.82);color:#f0e8d8; }
}

@media (max-width:760px) {
  /* Collection and watchlists */
  body.dark.mobile-modern .content .compact-page-head { align-items:center;margin:3px 0 15px; }
  body.dark.mobile-modern .content .compact-page-head .eyebrow,
  body.dark.mobile-modern .content .compact-page-head p { display:none; }
  body.dark.mobile-modern .content .compact-page-head h1 { margin:0;font-size:27px; }
  body.dark.mobile-modern .content .compact-page-head .page-head-actions :is(.primary-button,.secondary-button) {
    min-height:38px;padding:0 13px;white-space:nowrap;font-size:9px;
  }
  body.dark.mobile-modern .content .browser-summary {
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin-bottom:13px;padding:6px;
    border:0;border-radius:var(--mt-radius-lg);background:var(--mp-soft);box-shadow:none;overflow:visible;
  }
  body.dark.mobile-modern .content .browser-summary>div:not(.browser-summary-actions) { min-width:0;padding:10px 6px;border:0;text-align:center; }
  body.dark.mobile-modern .content .browser-summary>div:not(.browser-summary-actions)+div:not(.browser-summary-actions) { border-left:1px solid var(--mp-line); }
  body.dark.mobile-modern .content .browser-summary span { font-size:8.5px; }
  body.dark.mobile-modern .content .browser-summary b { overflow:hidden;margin-top:4px;font:600 14px var(--font-display);text-overflow:ellipsis; }
  body.dark.mobile-modern .content .browser-summary-actions {
    grid-column:1/-1;justify-content:flex-end;margin:6px 0 0;padding:9px 2px 1px;border-top:1px solid var(--mp-line);
  }
  body.dark.mobile-modern .content .browser-summary-actions :is(.secondary-button,.danger-button) { min-height:34px; }
  body.dark.mobile-modern .content .browser-toolbar {
    display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:18px;padding:10px;
    border:0;border-radius:var(--mt-radius-lg);background:var(--mp-soft);box-shadow:none;
  }
  body.dark.mobile-modern .content .browser-toolbar .filter-search { grid-column:1/-1; }
  body.dark.mobile-modern .content .browser-toolbar .select-control { width:100%;max-width:none;min-width:0; }
  body.dark.mobile-modern .content .list-tabs { gap:9px;margin:0 -16px 13px;padding:0 16px 6px;scrollbar-width:none; }
  body.dark.mobile-modern .content .list-tabs::-webkit-scrollbar { display:none; }
  body.dark.mobile-modern .content .list-tabs button {
    min-width:150px;padding:11px 13px;border:1px solid var(--mp-line);border-radius:var(--mt-radius-md);
    background:var(--mp-soft);color:var(--muted);box-shadow:none;
  }
  body.dark.mobile-modern .content .list-tabs button.active {
    border-color:color-mix(in srgb,var(--mt-gold) 38%,transparent);background:var(--mp-gold-soft);color:var(--ink);
  }
  body.dark.mobile-modern .content .watch-bulkbar {
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:0 0 13px;padding:10px;
    border:0;border-radius:var(--mt-radius-lg);background:var(--mp-soft);box-shadow:none;
  }
  body.dark.mobile-modern .content .watch-bulkbar-all { align-self:center;color:var(--ink);font-size:9px; }
  body.dark.mobile-modern .content .watch-bulkbar-count { align-self:center;margin:0;color:var(--muted);font-size:9.5px;text-align:right; }
  body.dark.mobile-modern .content .watch-bulkbar .select-control { grid-column:1/-1;width:100%;max-width:none;height:38px; }
  body.dark.mobile-modern .content .watch-bulkbar :is(.secondary-button,.danger-button) { width:100%;min-height:36px;padding-inline:10px;font-size:9.5px; }
  body.dark.mobile-modern .content .watch-bulkbar :is(button,select):disabled { opacity:.38; }
  body.dark.mobile-modern .content .watch-selection-toggle.active { border-color:var(--mt-gold);background:var(--mp-gold-soft);color:var(--ink); }
  body.dark.mobile-modern .content .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 .content .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 .content .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 .content .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 .content .watch-bulkbar-all input:checked { border-color:var(--brand);background:var(--brand); }
  body.dark.mobile-modern .content .watch-bulkbar-all input:checked::after { transform:translateY(-1px) rotate(-45deg) scale(1); }
  body.dark.mobile-modern .content .watch-desired {
    gap:2px;margin-top:7px;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(--mp-line) 70%,transparent);
  }
  body.dark.mobile-modern .content .watch-desired span { padding-left:7px;color:var(--muted);font-size:8.5px;letter-spacing:.08em; }
  body.dark.mobile-modern .content .watch-desired button { width:27px;height:27px;border-radius:50%;background:var(--surface);color:var(--ink);font-size:13px; }
  body.dark.mobile-modern .content .watch-desired button:hover { background:var(--surface-2); }
  body.dark.mobile-modern .content .watch-desired b { min-width:20px;color:var(--ink);font-size:10px; }
  body.dark.mobile-modern .content .watchlist-action-icon {
    width:34px;height:34px;padding:0;border:1px solid color-mix(in srgb,var(--line) 80%,transparent);background:var(--surface);color:var(--muted);font-size:15px;box-shadow:0 5px 14px rgba(0,0,0,.16);backdrop-filter:blur(8px);
  }
  body.dark.mobile-modern .content .watchlist-action-icon.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 .content .all-card-groups { gap:30px; }
  body.dark.mobile-modern .content .set-card-divider {
    gap:10px;margin-bottom:14px;padding:10px 3px;border-bottom:1px solid var(--mp-line);
  }
  body.dark.mobile-modern .content .set-card-divider img { width:58px;height:32px; }
  body.dark.mobile-modern .content .set-card-divider h2 { font:600 18px var(--font-display); }
  body.dark.mobile-modern .content .set-card-divider span { color:var(--mt-gold);font-size:9px; }
  body.dark.mobile-modern .content .set-card-divider small { width:auto;margin-left:auto;font-size:9px; }
  body.dark.mobile-modern .content :is(.owned-pill,.variant-badge) {
    background:color-mix(in srgb,#102019 86%,transparent);color:#f6f0e5;box-shadow:0 3px 10px rgba(0,0,0,.15);
  }
  body.dark.mobile-modern .content .watch-button { opacity:0; }
  body.dark.mobile-modern .content .card-tile:hover .watch-button,
  body.dark.mobile-modern .content .watch-button:focus-visible { opacity:1; }
  body.dark.mobile-modern .content :is(.quantity-control,.quick-add) {
    border:1px solid rgba(255,255,255,.08);border-radius:var(--mt-radius-full);background:rgba(16,32,25,.91);box-shadow:0 5px 16px rgba(0,0,0,.22);
  }
  /* The foil control keeps its gold: the dark background above made its dark numbers unreadable. */
  body.dark.mobile-modern .content :is(.quantity-control,.quick-add).foil {
    border-color:rgba(255,224,140,.5);background:linear-gradient(120deg,#7a4e0e,#f7d67a 42%,#a8721c 58%,#ffe9ab);
  }
  body.dark.mobile-modern .content .variant-chip { border-radius:var(--mt-radius-full);background:var(--mp-gold-soft);color:var(--mt-gold); }

  /* Settings and administration */
  body.dark.mobile-modern .content .settings-section {
    width:100%;max-width:none;margin-bottom:13px;padding:18px;border:0;
    border-radius:var(--mt-radius-lg);background:var(--mp-soft);box-shadow:none;
  }
  body.dark.mobile-modern .content .settings-section h2 { margin:0 0 5px;font:600 21px var(--font-display); }
  body.dark.mobile-modern .content .settings-section>.muted { line-height:1.5; }
  body.dark.mobile-modern .content .user-settings-page-head,
  body.dark.mobile-modern .content .user-settings-layout { max-width:none; }
  body.dark.mobile-modern .content .user-settings-layout { display:flex;gap:11px; }
  body.dark.mobile-modern .content .user-settings-card { margin:0;padding:16px 14px;border:1px solid var(--mp-line);background:var(--mp-soft);box-shadow:none; }
  body.dark.mobile-modern .content .user-settings-card-head { align-items:flex-start;gap:11px;margin-bottom:14px; }
  body.dark.mobile-modern .content .user-settings-card-icon { width:39px;height:39px;border-radius:12px;background:var(--mt-accent-soft);color:var(--brand); }
  body.dark.mobile-modern .content .user-settings-card-icon svg { width:20px;height:20px; }
  body.dark.mobile-modern .content .user-settings-card-head .eyebrow { color:var(--mt-gold);font-size:8.5px; }
  body.dark.mobile-modern .content .user-settings-card-head h2 { margin-bottom:2px;font-size:19px; }
  body.dark.mobile-modern .content .user-settings-card-head p { font-size:9.5px; }
  body.dark.mobile-modern .content .user-settings-status { align-self:center;padding:6px 8px;font-size:8.5px; }
  body.dark.mobile-modern .content .settings-grid { grid-template-columns:1fr;gap:10px; }
  body.dark.mobile-modern .content .settings-field { padding:11px 12px;border-radius:var(--mt-radius-md);background:var(--mp-soft); }
  body.dark.mobile-modern .content .user-settings-card .settings-field { padding:0;background:transparent; }
  body.dark.mobile-modern .content .user-settings-card .settings-field :is(input,.select-control) { height:40px;border-color:var(--mp-line);background:var(--surface);color:var(--ink);font-size:9px; }
  body.dark.mobile-modern .content .user-settings-actions { margin-top:13px;padding-top:12px; }
  body.dark.mobile-modern .content .user-settings-actions :is(.primary-button,.secondary-button) { width:100%; }
  body.dark.mobile-modern .content .appearance-settings-grid { display:flex;gap:0;padding:4px;background:color-mix(in srgb,var(--surface) 46%,transparent); }
  body.dark.mobile-modern .content .appearance-settings-grid>.segmented { width:100%;margin:0; }
  body.dark.mobile-modern .content .settings-language-field { display:grid;grid-template-columns:minmax(0,1fr) 76px;align-items:center;gap:8px;min-height:46px;padding:7px 8px!important;border:0!important;background:color-mix(in srgb,var(--surface) 46%,transparent)!important; }
  body.dark.mobile-modern .content .settings-card-language .settings-language-grid { gap:5px; }
  body.dark.mobile-modern .content .settings-card-language .settings-language-field .select-control { width:76px;height:34px; }
  body.dark.mobile-modern .content .highlight-settings-list { grid-template-columns:1fr;gap:7px; }
  body.dark.mobile-modern .content .highlight-setting { border:0;background:color-mix(in srgb,var(--surface) 46%,transparent)!important; }
  body.dark.mobile-modern .content .account-settings-actions { align-items:stretch;flex-direction:column; }
  body.dark.mobile-modern .content .account-settings-actions .password-settings-status { min-height:28px;margin:0; }
  body.dark.mobile-modern .account-password-overlay { align-items:flex-end;padding:12px; }
  body.dark.mobile-modern .account-password-overlay .account-password-dialog { width:100%;min-height:0;padding:18px;border:1px solid var(--mp-line);border-radius:24px;background:var(--surface); }
  body.dark.mobile-modern .account-password-dialog .close-button { display:grid;width:34px;height:34px;place-items:center;border:1px solid var(--mp-line);border-radius:50%;background:var(--surface-2);color:var(--ink); }
  body.dark.mobile-modern .account-password-dialog-head h2 { font:600 24px var(--font-display); }
  body.dark.mobile-modern .account-password-dialog-head p { font-size:9.5px; }
  body.dark.mobile-modern .account-password-fields label { color:var(--muted); }
  body.dark.mobile-modern .account-password-fields input { height:42px;border-color:var(--mp-line);background:var(--surface);color:var(--ink); }
  body.dark.mobile-modern .account-password-actions { flex-wrap:nowrap; }
  body.dark.mobile-modern .account-password-actions :is(.primary-button,.secondary-button) { flex:1;color:#f7f2e8; }
  body.dark.mobile-modern .account-password-actions .secondary-button { color:var(--ink); }
  body.dark.mobile-modern .content .settings-checklist { gap:7px; }
  body.dark.mobile-modern .content .checkbox-row { min-height:42px;padding:9px 11px;border-radius:13px;background:var(--mp-soft);font-size:10px; }
  body.dark.mobile-modern .content .checkbox-row input { accent-color:var(--brand); }
  body.dark.mobile-modern .content :is(.mobile-theme-toggle,.mobile-appearance-toggle) { width:100%;margin-top:12px; }
  body.dark.mobile-modern .content :is(.mobile-theme-toggle,.mobile-appearance-toggle) button { flex:1; }
  body.dark.mobile-modern .content .admin-table { gap:9px; }
  body.dark.mobile-modern .content .admin-section-head { align-items:center; }
  body.dark.mobile-modern .content .admin-settings-card { border:1px solid var(--mp-line);background:var(--mp-soft);box-shadow:none; }
  body.dark.mobile-modern .content .admin-settings-card-head { align-items:flex-start;margin-bottom:12px; }
  body.dark.mobile-modern .content .admin-settings-card-head .admin-price-source-button { min-width:0;width:auto; }
  body.dark.mobile-modern .content .admin-price-source-button { min-height:36px;padding-inline:12px;font-size:9.5px; }
  body.dark.mobile-modern .admin-price-source-overlay { align-items:flex-end;padding:12px; }
  body.dark.mobile-modern .admin-price-source-overlay .price-source-dialog { width:100%;min-height:0;max-height:calc(100dvh - 24px);padding:18px;overflow:auto;border:1px solid var(--mp-line);border-radius:24px;background:var(--surface); }
  body.dark.mobile-modern .price-source-dialog-head { align-items:flex-start;margin-bottom:16px; }
  body.dark.mobile-modern .price-source-dialog-head h2 { font:600 24px var(--font-display); }
  body.dark.mobile-modern .price-source-dialog-head p { max-width:250px;font-size:9.5px;line-height:1.45; }
  body.dark.mobile-modern .price-source-dialog .close-button { display:grid;width:34px;height:34px;place-items:center;border:1px solid var(--mp-line);border-radius:50%;background:var(--surface-2);color:var(--ink); }
  body.dark.mobile-modern .price-source-row { grid-template-columns:1fr;align-items:stretch;gap:10px;padding:12px; }
  body.dark.mobile-modern .price-source-game { margin-bottom:2px; }
  body.dark.mobile-modern .price-source-dialog .price-source-row label { color:var(--muted); }
  body.dark.mobile-modern .price-source-actions { position:sticky;bottom:-18px;margin:14px -18px -18px;padding:13px 18px 18px;background:linear-gradient(180deg,transparent,var(--surface) 18%); }
  body.dark.mobile-modern .price-source-actions .primary-button { color:#f7f2e8; }
  body.dark.mobile-modern .content .admin-row {
    display:grid;grid-template-columns:1fr auto;gap:10px;padding:12px;border:0;
    border-radius:var(--mt-radius-md);background:color-mix(in srgb,var(--surface) 46%,transparent);box-shadow:none;
  }
  body.dark.mobile-modern .content .admin-row-head,
  body.dark.mobile-modern .content .admin-config-editor,
  body.dark.mobile-modern .content .admin-error,
  body.dark.mobile-modern .content .admin-row>label { grid-column:1/-1; }
  body.dark.mobile-modern .content .admin-row-actions { grid-column:1/-1;flex-wrap:wrap; }
  body.dark.mobile-modern .content .admin-row-actions .secondary-button { flex:1; }
  body.dark.mobile-modern .content .admin-form-grid { grid-template-columns:1fr; }
  body.dark.mobile-modern .content .admin-code-editor { max-width:100%;font-size:9px; }
  body.dark.mobile-modern .content .oauth-admin-card { padding:17px 14px;border:1px solid var(--mp-line);background:var(--mp-soft);box-shadow:none; }
  body.dark.mobile-modern .content .oauth-admin-head { grid-template-columns:42px minmax(0,1fr) auto;gap:11px;padding-bottom:0; }
  body.dark.mobile-modern .content .oauth-admin-icon { width:42px;height:42px;border-radius:13px;background:var(--mt-accent-soft);color:var(--brand); }
  body.dark.mobile-modern .content .oauth-admin-icon svg { width:22px;height:22px; }
  body.dark.mobile-modern .content .oauth-admin-title>span { color:var(--mt-gold);font-size:8.5px; }
  body.dark.mobile-modern .content .oauth-admin-title h2 { margin-bottom:2px;font-size:19px; }
  body.dark.mobile-modern .content .oauth-admin-title p { font-size:9.5px; }
  body.dark.mobile-modern .content .oauth-admin-state { grid-column:1/3;grid-row:2;justify-content:flex-start; }
  body.dark.mobile-modern .content .oauth-collapse-icon { grid-column:3;grid-row:1;width:31px;height:31px; }
  body.dark.mobile-modern .content .oauth-admin-card[open] .oauth-admin-summary { padding-bottom:14px; }
  body.dark.mobile-modern .content :is(.oauth-status,.oauth-source-badge) { min-height:25px;padding-inline:9px;border-color:var(--mp-line);background:var(--surface);font-size:8.5px; }
  body.dark.mobile-modern .content .oauth-status.is-active { border-color:color-mix(in srgb,var(--brand) 24%,var(--mp-line));background:var(--mt-accent-soft);color:var(--brand); }
  body.dark.mobile-modern .content .oauth-lock-notice { padding:11px;border-color:color-mix(in srgb,var(--mt-gold) 24%,var(--mp-line));background:var(--mp-gold-soft); }
  body.dark.mobile-modern .content .oauth-lock-notice svg { stroke:var(--mt-gold); }
  body.dark.mobile-modern .content .oauth-admin-form { gap:10px;margin-top:12px; }
  body.dark.mobile-modern .content .oauth-toggle-row { min-height:58px;padding:10px 11px;border-color:color-mix(in srgb,var(--mp-line) 70%,transparent);background:var(--mp-soft); }
  body.dark.mobile-modern .content .oauth-toggle-copy b { font-size:9px; }
  body.dark.mobile-modern .content .oauth-toggle-copy small { max-width:230px;font-size:9px; }
  body.dark.mobile-modern .content .oauth-toggle-control input:checked+span { background:var(--brand); }
  body.dark.mobile-modern .content .oauth-form-group { padding:12px 10px;border-color:color-mix(in srgb,var(--mp-line) 62%,transparent);background:var(--mp-soft); }
  body.dark.mobile-modern .content .oauth-form-group-head { align-items:flex-start;margin-bottom:11px; }
  body.dark.mobile-modern .content .oauth-form-group-head>span { width:24px;height:24px;background:var(--mp-gold-soft);color:var(--mt-gold);box-shadow:none;font-size:8.5px; }
  body.dark.mobile-modern .content .oauth-form-group-head b { font-size:9px; }
  body.dark.mobile-modern .content .oauth-form-group-head small { font-size:9px;line-height:1.35; }
  body.dark.mobile-modern .content .admin-form .oauth-provider-grid,
  body.dark.mobile-modern .content .admin-form .oauth-endpoint-grid,
  body.dark.mobile-modern .content .admin-form .oauth-claims-grid { grid-template-columns:1fr;gap:9px; }
  body.dark.mobile-modern .content .oauth-field-wide { grid-column:auto; }
  body.dark.mobile-modern .content .oauth-field em { background:var(--mp-gold-soft);color:var(--mt-gold); }
  body.dark.mobile-modern .content .oauth-field input,
  body.dark.mobile-modern .content .oauth-field .select-control { height:39px;border-color:var(--mp-line);background:var(--surface);color:var(--ink);font-size:9px; }
  body.dark.mobile-modern .content .oauth-admin-actions { align-items:stretch;flex-direction:column;padding-top:12px;border-top:1px solid color-mix(in srgb,var(--mp-line) 62%,transparent); }
  body.dark.mobile-modern .content .oauth-admin-actions>span { margin:0;font-size:9px; }
  body.dark.mobile-modern .content .oauth-admin-actions .primary-button { width:100%; }

  /* Deck overview */
  body.dark.mobile-modern .content .deck-overview-head { margin-bottom:18px; }
  body.dark.mobile-modern .content .deck-overview-grid { grid-template-columns:1fr;gap:13px; }
  body.dark.mobile-modern .content :is(.deck-overview-card,.deck-create-card) {
    min-height:116px;padding:13px;gap:10px;border:1px solid color-mix(in srgb,var(--mp-line) 62%,transparent);border-radius:var(--mt-radius-lg);
    background:var(--mp-soft);box-shadow:none;
  }
  body.dark.mobile-modern .content .deck-overview-card { overflow:hidden; }
  body.dark.mobile-modern .content .deck-overview-card:hover { box-shadow:none; }
  body.dark.mobile-modern .content .deck-stack { flex:0 0 61px;width:61px;height:86px; }
  body.dark.mobile-modern .content .deck-stack-card { left:5px;top:6px;width:51px;height:72px;border-radius:7px; }
  body.dark.mobile-modern .content .deck-stack-back-2 { transform:rotate(8deg); }
  body.dark.mobile-modern .content .deck-stack-back-1 { transform:rotate(-6deg); }
  body.dark.mobile-modern .content .deck-stack-top { transform:rotate(-2deg);box-shadow:0 8px 18px rgba(0,0,0,.25); }
  body.dark.mobile-modern .content .deck-overview-card:hover .deck-stack-top { transform:rotate(-7deg) translate(-2px,-3px) scale(1.03);box-shadow:0 12px 22px rgba(0,0,0,.28); }
  body.dark.mobile-modern .content .deck-overview-badge { gap:5px; }
  body.dark.mobile-modern .content .deck-overview-badge .deck-overview-format { color:var(--mt-gold);font-size:9px; }
  body.dark.mobile-modern .content .deck-overview-badge h3 { font:600 18px var(--font-display); }
  body.dark.mobile-modern .content .deck-overview-stats { align-items:flex-start;flex-direction:column;gap:5px;margin-top:3px; }
  body.dark.mobile-modern .content .deck-overview-stats b { font:600 15px var(--font-display); }
  body.dark.mobile-modern .content .deck-overview-missing { padding:4px 8px;border-radius:var(--mt-radius-full);font-size:9.5px; }
  body.dark.mobile-modern .content .deck-create-card { min-height:106px;border-style:dashed;box-shadow:none; }
  body.dark.mobile-modern .content .deck-create-card>span { width:46px;height:46px;border-radius:50%;background:var(--mp-gold-soft);color:var(--mt-gold); }
  body.dark.mobile-modern .content .deck-empty {
    min-height:310px;margin:68px 0 0;padding:40px 24px;border:1px dashed var(--mp-line);border-radius:var(--mt-radius-lg);
    background:var(--mp-soft);box-shadow:none;
  }
  body.dark.mobile-modern .content .deck-empty>span { color:var(--brand); }
  body.dark.mobile-modern .content .deck-empty h2 { font:600 24px var(--font-display); }
  body.dark.mobile-modern .content .deck-empty p { max-width:250px;line-height:1.45; }

  /* Deck editor and catalogue */
  body.dark.mobile-modern .content .deck-shell.deck-shell-editor { display:flex;flex-direction:column;gap:16px; }
  body.dark.mobile-modern .content>.deck-shell.deck-shell-editor { animation:none; }
  body.dark.mobile-modern .content :is(.deck-editor,.deck-catalog) {
    overflow:hidden;border:1px solid color-mix(in srgb,var(--mp-line) 72%,transparent);border-radius:var(--mt-radius-lg);background:var(--mp-soft);box-shadow:none;
  }
  body.dark.mobile-modern .content .deck-editor-head {
    display:grid;grid-template-columns:38px minmax(0,1fr) 38px 38px;gap:7px;padding:11px;
    border-bottom:1px solid var(--mp-line);background:transparent;
  }
  body.dark.mobile-modern .content :is(.deck-editor-head,.sheet-head) .compact-back-button {
    grid-column:1;grid-row:1;width:38px;height:38px;border:1px solid var(--mp-line);border-radius:50%;background:var(--mp-soft);color:var(--ink);
  }
  body.dark.mobile-modern .content .deck-title-field { grid-column:2/4;grid-row:1;min-width:0; }
  body.dark.mobile-modern .content .deck-title-field input { width:100%;height:38px;padding:0 6px;border:0;background:transparent;font-size:20px; }
  body.dark.mobile-modern .content .deck-editor-head #deck-format { grid-column:1/3;grid-row:2;width:100%;max-width:none;height:38px;min-height:38px; }
  body.dark.mobile-modern .content .deck-editor-head>.deck-rules-button {
    grid-column:3/5;grid-row:2;display:flex;min-height:38px;align-items:center;justify-content:center;gap:6px;
    border:1px solid var(--mp-line);border-radius:var(--mt-radius-full);background:var(--mp-soft);color:var(--ink);font-size:9px;font-weight:650;text-decoration:none;
  }
  body.dark.mobile-modern .content .deck-editor-head>.icon-button { width:38px;height:38px;min-height:38px; }
  body.dark.mobile-modern .content .deck-editor-head>#deck-actions-open {
    grid-column:4;grid-row:1;border-color:var(--mp-line);background:var(--mp-soft);color:var(--ink);
  }
  body.dark.mobile-modern .content .op-deck-overview { grid-template-columns:100px 1fr;gap:12px;padding:14px;border-bottom:1px solid var(--mp-line); }
  body.dark.mobile-modern .content .op-leader-panel { padding:0;background:transparent; }
  body.dark.mobile-modern .content .op-leader-card { width:82px; }
  body.dark.mobile-modern .content .op-deck-stats,
  body.dark.mobile-modern .content .deck-stat-chips { display:flex;min-width:0;align-content:flex-start;align-items:flex-start;flex-wrap:nowrap;gap:4px; }
  body.dark.mobile-modern .content .deck-stat-chips { width:100%; }
  body.dark.mobile-modern .content .deck-stat-chips>div,
  body.dark.mobile-modern .content .deck-purchase-summary>div {
    min-width:64px;padding:8px;border:1px solid var(--mp-line);border-radius:13px;background:var(--mp-soft);text-align:center;
  }
  body.dark.mobile-modern .content .deck-stat-chips>div {
    flex:1 1 0;width:auto;height:auto;min-width:0;min-height:44px;aspect-ratio:auto;justify-content:center;gap:3px;padding:7px 3px;
  }
  body.dark.mobile-modern .content :is(.deck-stat-chips,.deck-purchase-summary) span { font-size:8.5px; }
  body.dark.mobile-modern .content :is(.deck-stat-chips,.deck-purchase-summary) b { font:600 12px var(--font-display); }
  body.dark.mobile-modern .content .op-deck-section { padding-top:0;border-top:1px solid var(--mp-line); }
  body.dark.mobile-modern .content .op-section-head { padding:14px 14px 10px; }
  body.dark.mobile-modern .content .op-section-head h2 { margin-top:2px;font-size:20px; }
  body.dark.mobile-modern .content .op-section-head>b { padding:6px 9px;border-radius:var(--mt-radius-full);background:var(--mp-gold-soft);font-size:9px; }
  body.dark.mobile-modern .content .deck-card-list.deck-card-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:10px 12px 15px; }
  body.dark.mobile-modern .content .deck-card-row { border-color:var(--mp-line);background:transparent; }
  body.dark.mobile-modern .content .deck-card-tile-image { border-radius:10px; }
  body.dark.mobile-modern .content .deck-catalog-open-button {
    display:flex;align-items:center;gap:11px;width:calc(100% - 24px);min-height:54px;margin:11px 12px;padding:8px 11px;
    border:1px solid var(--mp-line);border-radius:16px;background:var(--mp-soft);color:var(--ink);box-shadow:var(--mp-shadow-soft);text-align:left;cursor:pointer;
  }
  body.dark.mobile-modern .content .deck-catalog-open-button svg {
    flex:0 0 32px;width:32px;height:32px;padding:7px;border-radius:50%;background:var(--mp-gold-soft);fill:none;stroke:var(--brand);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;
  }
  body.dark.mobile-modern .content .deck-catalog-open-button>span { display:flex;flex:1;min-width:0;flex-direction:column;gap:2px; }
  body.dark.mobile-modern .content .deck-catalog-open-button b { font-size:11px; }
  body.dark.mobile-modern .content .deck-catalog-open-button small { color:var(--muted);font-size:9.5px; }
  body.dark.mobile-modern .content .deck-catalog-open-button>i { color:var(--muted);font:500 24px/1 var(--font-display);font-style:normal; }
  body.dark.mobile-modern .content .deck-catalog-backdrop {
    position:fixed;inset:0;z-index:64;display:block;border:0;background:rgba(12,15,12,.42);opacity:0;pointer-events:none;
    backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);transition:opacity .2s ease;
  }
  body.dark.mobile-modern .content .deck-catalog-backdrop.is-open { opacity:1;pointer-events:auto; }
  body.dark.mobile-modern .content .deck-catalog {
    position:fixed;inset:calc(76px + env(safe-area-inset-top)) 10px 12px;z-index:65;display:flex;max-height:none;min-height:0;flex-direction:column;
    border-radius:26px;background:color-mix(in srgb,var(--surface) 96%,transparent);opacity:0;pointer-events:none;transform:translateY(28px) scale(.985);
    box-shadow:0 24px 70px rgba(0,0,0,.3);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);transition:opacity .2s ease,transform .24s ease;
  }
  body.dark.mobile-modern.mobile-light .content .deck-catalog { box-shadow:0 24px 70px rgba(54,43,25,.2); }
  body.dark.mobile-modern .content .deck-catalog.is-open { opacity:1;pointer-events:auto;transform:none; }
  body.dark.mobile-modern .content .deck-catalog-title { display:flex;align-items:center;gap:10px;padding:15px;border-color:var(--mp-line); }
  body.dark.mobile-modern .content .deck-catalog-title>div { flex:1;min-width:0; }
  body.dark.mobile-modern .content .deck-catalog-close {
    display:grid;flex:0 0 38px;width:38px;height:38px;padding:0;place-items:center;border:1px solid var(--mp-line);border-radius:50%;background:var(--mp-soft);color:var(--ink);font-size:22px;cursor:pointer;
  }
  body.dark.mobile-modern .content .deck-catalog-title b { font-size:21px; }
  body.dark.mobile-modern .content .deck-catalog-title span { font-size:9.5px; }
  body.dark.mobile-modern .content .op-catalog-controls {
    display:grid;grid-template-columns:1fr 1fr;margin:0 10px 8px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;
  }
  body.dark.mobile-modern .content .op-catalog-controls .filter-search { grid-column:1/-1; }
  body.dark.mobile-modern .content .op-catalog-controls .toolbar-spacer { display:none; }
  body.dark.mobile-modern .content .op-catalog-controls .catalog-view-tools { grid-column:1/-1; }
  body.dark.mobile-modern .content .deck-catalog>.mobile-filter-shell { width:auto;margin:0 10px 10px; }
  body.dark.mobile-modern .content .deck-catalog>.mobile-filter-shell .op-catalog-controls { margin:10px 0 8px; }
  body.dark.mobile-modern .content .deck-catalog>.mobile-filter-shell .deck-game-filterbar { margin:0; }
  body.dark.mobile-modern .content .deck-catalog-filter-mobile {
    display:flex;flex-direction:column;align-items:stretch;gap:9px;
  }
  body.dark.mobile-modern .content .deck-catalog-filter-row { width:100%;min-width:0; }
  body.dark.mobile-modern .content .deck-catalog-filter-primary {
    display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:center;gap:9px 8px;
  }
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.filter-search { grid-column:1/-1;width:100%; }
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.rarity-filter-anchor { display:contents; }
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.rarity-filter-anchor>.secondary-button {
    grid-column:1;grid-row:2;width:100%;justify-self:stretch;
  }
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.rarity-filter-anchor>.rarity-popup {
    grid-column:1/-1;grid-row:3;
  }
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.catalog-settings-control { grid-column:2;grid-row:2; }
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.catalog-settings-control>.icon-button { width:42px;height:42px; }
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.op-filter-group {
    grid-column:1/-1;width:100%;padding-top:9px;border-top:1px solid var(--mp-line);text-align:center;
  }
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.op-filter-group>div { justify-content:center;overflow:visible; }
  body.dark.mobile-modern .content .deck-catalog-filter-secondary {
    display:flex;flex-direction:column;align-items:stretch;gap:0;width:100%;
  }
  body.dark.mobile-modern .content .deck-catalog-filter-secondary>.op-filter-group {
    width:100%;padding-top:9px;border-top:1px solid var(--mp-line);text-align:center;
  }
  body.dark.mobile-modern .content .deck-catalog-filter-secondary>.op-filter-group>div { justify-content:center;overflow:visible; }
  body.dark.mobile-modern .content .deck-catalog-filter-secondary>.op-filter-group:first-child { border-top:0; }
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.rarity-filter-anchor:has(.rarity-popup:not(.hidden))~.op-filter-group { grid-row:4; }
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.rarity-filter-anchor:has(.rarity-popup.hidden)~.op-filter-group { grid-row:3; }
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.op-filter-group+.op-filter-group { grid-row:auto; }
  body.dark.mobile-modern .content .deck-catalog-filter-primary>.catalog-settings-control {
    position:relative;
  }
  body.dark.mobile-modern .content .deck-catalog-filter-mobile .toolbar-filter-popup .catalog-view-tools {
    display:block;padding:0;border:0;
  }
  body.dark.mobile-modern .content .deck-catalog-filter-mobile .toolbar-filter-popup .catalog-view-tools>div {
    display:flex;align-items:center;justify-content:space-between;
  }
  body.dark.mobile-modern .content .deck-game-filterbar { justify-content:center;align-items:flex-end;overflow:visible; }
  body.dark.mobile-modern .content .deck-game-filterbar>.op-filter-group { text-align:center; }
  body.dark.mobile-modern .content .deck-game-filterbar>.op-filter-group>div { justify-content:center; }
  body.dark.mobile-modern .content .deck-catalog .catalog-card-list { flex:1;min-height:100px;max-height:none;padding:7px 10px 14px; }
  body.dark.mobile-modern .content .catalog-card { min-height:54px;margin-bottom:3px;padding:6px;border-radius:12px;background:transparent; }
  body.dark.mobile-modern .content .catalog-card:hover { background:var(--mp-soft); }
  body.dark.mobile-modern .content .catalog-card-grid-list { grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;padding:10px; }
  body.dark.mobile-modern .content .catalog-card-grid { padding-bottom:7px; }
  body.dark.mobile-modern .content .catalog-grid-image { border-radius:10px; }

  /* Remove the remaining hard-coded graphite controls from the light mobile
     deck workspace while retaining the equivalent dark-theme contrast. */
  body.dark.mobile-modern .content .deck-card-tile {
    background:var(--mp-soft);box-shadow:inset 0 0 0 1px var(--mp-line);
  }
  body.dark.mobile-modern .content .deck-qty {
    border-color:var(--mp-line);border-radius:9px;background:var(--surface);color:var(--ink);
  }
  body.dark.mobile-modern .content .deck-qty button {
    background:var(--mp-soft);color:var(--ink);
  }
  body.dark.mobile-modern .content .deck-qty b { color:var(--ink); }
  body.dark.mobile-modern .content .catalog-deck-counter {
    border:1px solid var(--mp-line);border-radius:9px;background:color-mix(in srgb,var(--surface) 94%,transparent)!important;
    color:var(--ink);box-shadow:var(--mp-shadow-soft);backdrop-filter:blur(8px);
  }
  body.dark.mobile-modern .content .catalog-deck-counter button { color:var(--ink)!important; }
  body.dark.mobile-modern .content .catalog-deck-counter button:disabled { color:var(--muted)!important; }
  body.dark.mobile-modern .content .catalog-deck-counter b { border-inline-color:var(--mp-line);color:var(--ink)!important; }
  body.dark.mobile-modern .content .deck-auto-label { background:var(--mp-soft);color:var(--muted); }

  body.dark.mobile-modern .deck-transfer-dialog {
    width:calc(100% - 32px);min-height:0;padding:20px;border:1px solid var(--mp-line);border-radius:24px;
    background:color-mix(in srgb,var(--surface) 97%,transparent);box-shadow:var(--mp-shadow);color:var(--ink);
  }
  body.dark.mobile-modern .deck-transfer-dialog h2 { margin:3px 0 0;font:600 25px var(--font-display); }
  body.dark.mobile-modern .deck-transfer-option { border-color:var(--mp-line);border-radius:16px;background:var(--mp-soft); }
  body.dark.mobile-modern .deck-transfer-option>svg { background:var(--mp-gold-soft);color:var(--brand); }
  body.dark.mobile-modern .deck-transfer-option.danger { border-color:rgba(173,73,63,.09);background:var(--mp-danger-soft);color:#aa625b; }
  body.dark.mobile-modern .deck-transfer-option.danger>svg { background:rgba(173,73,63,.1);color:#aa625b; }

  /* Shared filter-panel component. Every page contributes only its controls;
     the component owns the surface, spacing, animation and visual hierarchy. */
  body.dark.mobile-modern .content .mobile-filter-surface {
    margin-top:10px;padding:10px;border-radius:var(--mt-radius-lg);background:var(--mp-soft);
  }
  body.dark.mobile-modern .content .mobile-filter-surface>.shared-filter-content { margin:0!important; }
  body.dark.mobile-modern .content .mobile-filter-surface :is(.set-overview-toolbar,.browser-toolbar,.op-catalog-filterbar,.op-catalog-controls) {
    margin:0;padding:0;border:0;background:transparent;box-shadow:none;
  }
  body.dark.mobile-modern .content .mobile-filter-surface :is(.card-toolbar-sticky,.collection-filter-shell) {
    margin:0;background:transparent;box-shadow:none;
  }
  body.dark.mobile-modern .content .mobile-filter-surface .browser-toolbar,
  body.dark.mobile-modern .content .mobile-filter-surface .set-overview-toolbar { gap:9px; }
  body.dark.mobile-modern .content .mobile-filter-surface :is(.select-control,.secondary-button,.set-switch-trigger) {
    border-color:transparent;background:var(--mp-card);box-shadow:var(--mp-shadow-soft);
  }
  body.dark.mobile-modern.mobile-light .content .mobile-filter-surface .op-costs .op-image-filter {
    position:relative;opacity:.72;
  }
  body.dark.mobile-modern.mobile-light .content .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;
    filter:drop-shadow(0 2px 3px rgba(86,61,18,.18));
  }
  body.dark.mobile-modern.mobile-light .content .mobile-filter-surface .op-costs .op-image-filter>img { opacity:0; }
  body.dark.mobile-modern.mobile-light .content .mobile-filter-surface .op-costs .op-image-filter.active { opacity:1; }
  body.dark.mobile-modern.mobile-light .content .mobile-filter-surface .lorcana-cost-filter span {
    color:#28352d;text-shadow:0 1px 0 rgba(255,255,255,.82),0 1px 2px rgba(63,48,19,.18);
  }
  body.dark.mobile-modern.mobile-light .content .mobile-filter-surface .lorcana-cost-filter.active span { color:#17231c; }
  body.dark.mobile-modern .content .deck-catalog>.mobile-filter-shell .mobile-filter-surface { padding:10px; }
  body.dark.mobile-modern .content .deck-catalog>.mobile-filter-shell .op-catalog-controls { margin:0 0 9px; }
  body.dark.mobile-modern .content .deck-catalog>.mobile-filter-shell .deck-game-filterbar { margin:0; }

  /* App feedback, outside all overlays. */
  body.dark.mobile-modern .toast-stack { left:16px;right:16px;bottom:92px; }
  body.dark.mobile-modern .toast {
    border:1px solid var(--mp-line);border-radius:var(--mt-radius-md);background:color-mix(in srgb,var(--surface) 94%,transparent);
    color:var(--ink);box-shadow:var(--mp-shadow);backdrop-filter:blur(18px);
  }
  body.dark.mobile-modern :is(.back-to-top,.offline-indicator) { bottom:96px; }
  body.dark.mobile-modern .back-to-top {
    right:16px;width:42px;height:42px;border:1px solid var(--mp-line);background:var(--surface);color:var(--ink);box-shadow:var(--mp-shadow);
  }
  body.dark.mobile-modern .offline-indicator {
    left:16px;right:16px;padding:10px 14px;border-radius:var(--mt-radius-full);background:#3b321d;color:#e8cb8c;box-shadow:var(--mp-shadow);
  }
}

/* ---- Design polish (October 2026) ------------------------------------------------------------ */
@media (max-width:760px) {
  /* The search field in the top bar speaks German like everything else. */
  body.dark.mobile-modern .topbar .global-search>span:nth-child(2)::after { content:"Suchen"; }
  /* Page title and its buttons: the buttons go below when they do not fit beside the title,
     instead of squeezing it onto two lines. */
  body.dark.mobile-modern .content .compact-page-head { flex-wrap:wrap;gap:10px; }
  body.dark.mobile-modern .content .compact-page-head h1 { white-space:nowrap; }
  /* A row of actions under a summary shares the width -- three buttons ran off the left edge. */
  body.dark.mobile-modern .content .browser-summary-row>.browser-summary-actions { display:flex;flex-wrap:wrap;gap:6px; }
  body.dark.mobile-modern .content .browser-summary-row>.browser-summary-actions>* { flex:1 1 auto;min-height:36px;padding-inline:12px;font-size:11px;white-space:nowrap; }
  /* Filter rows inside the panel: one gap everywhere. */
  body.dark.mobile-modern .content .mobile-filter-surface .op-filter-group>div { gap:6px; }
  body.dark.mobile-modern .content .op-costs .op-image-filter { width:28px;height:28px; }
  body.dark.mobile-modern.mobile-light .content .mobile-filter-surface .op-costs .op-image-filter { opacity:1; }
  body.dark.mobile-modern.mobile-light .content .mobile-filter-surface .op-costs .op-image-filter::before { background:color-mix(in srgb,var(--muted) 60%,transparent); }
  body.dark.mobile-modern.mobile-light .content .mobile-filter-surface .op-costs .op-image-filter.active::before { background:var(--mt-gold,#a77d2f); }
}

/* ---- Design polish, round 2 (phones) ----------------------------------------------------------- */
@media (max-width:760px) {
  /* Seven tabs: Start, Sammlung, Sets · Bearbeiten · Watchlist, Decks, Tausch. */
  body.dark.mobile-modern .mobile-tabbar { grid-template-columns:repeat(7,minmax(0,1fr));padding-inline:8px; }
  body.dark.mobile-modern .mt-tab:not(.mt-tab-add) { width:42px;height:42px; }
  body.dark.mobile-modern .mt-tab-add { width:50px;height:50px; }
  /* The shared filter parts in the panel's grid: "more" stays a compact square, sort takes a row. */
  body.dark.mobile-modern .content .catalog-filter-mobile>.catalog-settings-control>.filter-more-button { width:42px;height:42px;min-height:42px;padding:0;justify-content:center; }
  body.dark.mobile-modern .content .catalog-filter-mobile>.catalog-settings-control>.filter-more-button>span { display:none; }
  body.dark.mobile-modern .content .catalog-filter-mobile>.filter-sort { grid-column:1/-1;justify-self:stretch;justify-content:space-between;padding-top:9px;border-top:1px solid var(--mp-line); }
  body.dark.mobile-modern .content .catalog-filter-mobile>.filter-sort .select-control { flex:1;min-width:0;max-width:240px; }
  /* Card tiles: number, rarity and language on one line, the price below it. */
  body.dark.mobile-modern .content .card-subline { flex-direction:column;align-items:flex-start;gap:2px; }
  body.dark.mobile-modern .content .card-subline span:last-child { margin-left:0; }
  /* Buttons: one type size, primary or not -- the colour says which is which. */
  body.dark.mobile-modern .content :is(.primary-button,.secondary-button,.danger-button) { font-size:13px; }
  body.dark.mobile-modern .content .primary-button svg { margin-right:6px; }
  /* Set tiles: the four numbers line up even where a label wraps. */
  body.dark.mobile-modern .content .set-completion span { display:flex;flex-direction:column;justify-content:flex-end; }
  /* Deals: the search field across the width. */
  body.dark.mobile-modern .content .deal-filters { flex-wrap:wrap; }
  body.dark.mobile-modern .content .deal-filters .filter-search,body.dark.mobile-modern .content .deal-filters input[type="search"] { flex:1 1 100%;width:100%; }
  /* Settings: the game switches in one column. */
  body.dark.mobile-modern .content .public-profile-games { grid-template-columns:1fr; }
}

/* ---- Design polish, round 3 (phones) ----------------------------------------------------------- */
@media (max-width:760px) {
  /* Text fields at 16px: smaller text makes iOS zoom into the page on focus. (Selects open the
     system picker instead and keep their compact size.) */
  body.dark.mobile-modern .content :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),textarea) { font-size:16px; }
  /* Sheet titles in the display face, as on the desktop. */
  body.dark.mobile-modern .content .sheet-overview-copy h3 { font-family:var(--font-display);font-weight:600; }
  /* Admin and other compact buttons keep their label on one line. */
  body.dark.mobile-modern .content .admin-row :is(.secondary-button,.primary-button),body.dark.mobile-modern .content .oauth-admin-card :is(.secondary-button,.primary-button) { white-space:nowrap; }
  /* eBay draft title: the counter below the field, the field keeps the width. */
  body.dark.mobile-modern .content .ebay-draft-titlebar { flex-wrap:wrap;gap:4px; }
  body.dark.mobile-modern .content .ebay-draft-titlebar .ebay-draft-title { flex:1 1 100%; }
  body.dark.mobile-modern .content .ebay-draft-titlebar .ebay-draft-count { margin-left:auto; }
  body.dark.mobile-modern .content .deal-totals { grid-template-columns:1fr 1fr; }
}

@media (max-width:760px) {
  /* The set switcher gets the room, rarity only what its label needs. */
  body.dark.mobile-modern .content .catalog-filter-mobile>.rarity-filter-anchor>.secondary-button { padding-inline:12px; }
  /* A provider's two actions share the row; its delete button sits in the row's top corner. */
  body.dark.mobile-modern .content .admin-row:has(>.admin-row-actions>.icon-button) { position:relative;padding-right:52px; }
  body.dark.mobile-modern .content .admin-row-actions { width:100%; }
  body.dark.mobile-modern .content .admin-row-actions>.secondary-button { flex:1 1 0;min-width:0;padding-inline:10px;white-space:nowrap; }
  body.dark.mobile-modern .content .admin-row-actions>.icon-button { position:absolute;top:10px;right:10px; }
}
