:root {
  --bg: #f3f5f8; --surface: #ffffff; --surface-2: #f7f8fa; --ink: #141821; --muted: #6f7685;
  --line: #e5e8ee; --brand: #5b50e6; --brand-2: #8b5cf6; --dark: #0c1221; --success: #18a675;
  --warning: #f59e0b; --danger: #e5484d; --shadow: 0 16px 50px rgba(28,35,60,.10); --radius: 18px;
  font-family: "DM Sans", system-ui, sans-serif; color: var(--ink); background: var(--bg); color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
h1,h2,h3,h4,p { margin-top: 0; }
h1,h2,h3 { font-family: "Manrope", sans-serif; letter-spacing: -.035em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { display:block; margin-bottom:10px; color:var(--brand); font-size:11px; font-weight:800; letter-spacing:.16em; }
.eyebrow.light { color:rgba(255,255,255,.62); }
.app-shell { min-height:100vh; padding-left:248px; transition:padding-left .22s ease; }
.sidebar { position:fixed; inset:0 auto 0 0; width:248px; z-index:30; display:flex; flex-direction:column; padding:25px 17px 18px; background:var(--dark); color:#fff; transition:width .22s ease,padding .22s ease; }
.brand { display:flex; align-items:center; gap:11px; padding:0 10px 28px; border:0; background:none; color:#fff; font:800 19px "Manrope"; cursor:pointer; }
.brand-mark { display:inline-grid; place-items:center; width:31px; height:31px; border-radius:9px; background:linear-gradient(145deg,#8075ff,#5247d8); color:#fff; font:800 17px "Manrope"; box-shadow:0 7px 20px rgba(91,80,230,.45); }
.sidebar-collapse { position:absolute;right:-12px;top:28px;z-index:2;display:grid;place-items:center;width:25px;height:25px;padding:0;border:1px solid #303a4d;border-radius:50%;background:#171f30;color:#9ea7b8;box-shadow:0 4px 12px rgba(0,0,0,.25);cursor:pointer;transition:.2s; }
body.sidebar-collapsed .app-shell{padding-left:78px}
body.sidebar-collapsed .sidebar{width:78px;padding-inline:14px}
body.sidebar-collapsed .sidebar-collapse{transform:rotate(180deg)}
body.sidebar-collapsed .brand{padding-inline:9px}
body.sidebar-collapsed .brand>span:last-child,body.sidebar-collapsed .nav-item:not([role="menuitem"])>span:not(.nav-icon),body.sidebar-collapsed .sidebar-label,body.sidebar-collapsed .edit-panel,body.sidebar-collapsed .user-menu-info,body.sidebar-collapsed .user-menu>form{display:none}
body.sidebar-collapsed .nav-item:not([role="menuitem"]){justify-content:center;padding:0}
body.sidebar-collapsed .nav-icon{width:auto}
body.sidebar-collapsed .user-menu{justify-content:center;padding-inline:0}
.main-nav { display:flex; flex-direction:column; gap:4px; }
.nav-item { display:flex; align-items:center; width:100%; min-height:43px; gap:12px; padding:0 13px; border:0; border-radius:10px; color:#9da6b7; background:transparent; text-align:left; font-weight:600; cursor:pointer; transition:.18s ease; }
.nav-item:hover { color:#fff; background:rgba(255,255,255,.06); }
.nav-item.active { color:#fff; background:rgba(104,91,239,.24); }
.nav-item.admin-only { display:none; }
body.is-admin .nav-item.admin-only { display:flex; }
.nav-icon { width:19px; font-size:19px; text-align:center; }
.count-badge { margin-left:auto; min-width:20px; padding:2px 6px; border-radius:20px; background:#665ce8; color:#fff; text-align:center; font-size:11px; }
.sidebar-label { padding:30px 13px 9px; color:#5f6879; font-size:10px; font-weight:800; letter-spacing:.15em; }
.sidebar-spacer { flex:1; }
.edit-panel { position:relative; margin:8px 3px 18px; padding:14px 46px 13px 14px; border:1px solid rgba(255,255,255,.08); border-radius:12px; background:rgba(255,255,255,.035); }
.edit-panel>div:first-child { display:flex; align-items:center; gap:8px; font-size:13px; }
.edit-panel p { margin:4px 0 0 16px; color:#697386; font-size:10px; }
.status-dot { width:8px; height:8px; border-radius:50%; background:#576172; }
.edit-panel.on { border-color:rgba(129,117,255,.4); background:rgba(93,80,230,.13); }
.edit-panel.on .status-dot { background:#8a7cff; box-shadow:0 0 0 4px rgba(126,111,255,.14); }
.switch { position:absolute; right:12px; top:17px; width:35px; height:20px; padding:2px; border:0; border-radius:20px; background:#394253; cursor:pointer; transition:.2s; }
.switch span { display:block; width:16px; height:16px; border-radius:50%; background:#fff; transition:.2s; }
.switch[aria-checked="true"] { background:#7064ef; }
.switch[aria-checked="true"] span { transform:translateX(15px); }
.user-menu { position:relative; display:flex; align-items:center; gap:10px; padding:14px 8px 0; border-top:1px solid rgba(255,255,255,.08); }
.user-menu-info { min-width:0; flex:1; }
.user-menu strong,.user-menu small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-menu strong { font-size:12px; }.user-menu small { margin-top:2px;color:#697386;font-size:10px; }
.user-menu>form button { border:0;background:transparent;color:#6c7586;cursor:pointer; }
.avatar { display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:50%;background:linear-gradient(145deg,#f59e0b,#ef4444);font:800 11px inherit;color:#fff;cursor:pointer;flex-shrink:0; }
.user-popup { position:absolute; left:0; bottom:calc(100% + 10px); width:212px; padding:6px; border-radius:12px; background:#171f30; box-shadow:0 16px 40px rgba(0,0,0,.5),0 0 0 1px rgba(255,255,255,.07); display:flex; flex-direction:column; gap:2px; z-index:40; }
.user-popup.hidden { display:none; }
.user-popup .nav-item { min-height:38px; }
.user-popup-logout { display:flex;margin:0; }
.user-popup-logout .nav-item { flex:1; }
.topbar { position:sticky; top:0; z-index:20; display:flex; align-items:center; height:72px; padding:0 38px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.9); backdrop-filter:blur(14px); }
.global-search { display:flex; align-items:center; gap:11px; width:min(455px,55vw); height:39px; padding:0 13px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); color:#8a909c; text-align:left; cursor:pointer; }
.global-game-filter{height:39px;min-width:135px;margin-right:10px;padding:0 30px 0 11px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--ink);font-size:11px;font-weight:800;outline:none}
.global-search span:nth-child(2){flex:1}.global-search kbd,.search-input-wrap kbd { padding:3px 6px;border:1px solid #d9dce2;border-radius:5px;background:#fff;color:#9aa0ab;font-size:10px;box-shadow:0 1px 1px #ddd; }
.top-actions { display:flex;align-items:center;gap:9px;margin-left:auto; }
.small-button,.icon-button,.secondary-button,.primary-button { border-radius:9px; cursor:pointer; font-weight:700; transition:.17s; }
.small-button { height:37px;padding:0 13px;border:1px solid var(--line);background:#fff;font-size:12px; }
.small-button.active { border-color:#f2b84b;background:#fff7df;color:#a26600; }
.icon-button { width:38px;height:38px;border:1px solid var(--line);background:#fff; }
.primary-button { min-height:40px;padding:0 18px;border:0;background:var(--brand);color:#fff;box-shadow:0 7px 18px rgba(91,80,230,.22); }
.primary-button:hover { background:#4d42d4; transform:translateY(-1px); }
.primary-button:disabled { opacity:.45;cursor:not-allowed;transform:none; }
.secondary-button { min-height:40px;padding:0 17px;border:1px solid var(--line);background:#fff; }
.edit-indicator { display:none;padding:7px 10px;border-radius:6px;background:#edeaff;color:#594ce0;font-size:9px;font-weight:800;letter-spacing:.1em; }
body.editing .edit-indicator { display:block; }
.content { min-height:calc(100vh - 72px); padding:38px 42px 70px; }
.page-loader { display:grid;place-items:center;height:60vh;color:var(--muted); }
.page-loader span { width:30px;height:30px;border:3px solid #ddd;border-top-color:var(--brand);border-radius:50%;animation:spin .7s linear infinite; }
.page-loader.compact { height:auto;padding:36px 0;gap:10px; }
.page-loader.compact span { width:22px;height:22px;border-width:2px; }
@keyframes spin { to{transform:rotate(360deg)} }
.page-head { display:flex;align-items:flex-end;gap:24px;margin-bottom:29px; }
.page-head h1 { margin:0 0 7px;font-size:30px; }
.page-head p { margin:0;color:var(--muted); }
.page-head-actions { display:flex;align-items:center;gap:9px;margin-left:auto; }
.dashboard-shell { max-width:1200px;margin-inline:auto; }
.dashboard-hero { position:relative;display:flex;flex-direction:column;gap:22px;overflow:hidden;min-height:210px;margin-bottom:29px;padding:38px 43px;border-radius:22px;background:linear-gradient(115deg,#11192c 0%,#1a2441 64%,#293259);color:#fff;box-shadow:var(--shadow); }
.dashboard-hero:before,.dashboard-hero:after { content:"";position:absolute;border:1px solid rgba(255,255,255,.08);border-radius:50%; }
.dashboard-hero:before { width:320px;height:320px;right:-30px;top:-156px;box-shadow:0 0 0 55px rgba(255,255,255,.018),0 0 0 115px rgba(255,255,255,.012); }
.dashboard-hero:after { width:120px;height:120px;right:210px;bottom:-80px; }
.hero-top { position:relative;z-index:2;display:flex;align-items:flex-end;justify-content:space-between;gap:28px;flex-wrap:wrap; }
.hero-copy { min-width:0; }
.dashboard-hero h1 { margin:0 0 10px;font-size:35px;max-width:570px;line-height:1.18; }
.dashboard-hero p { margin:0;max-width:550px;color:#9ca6b9;line-height:1.6; }
.hero-summary { display:flex;flex:0 0 auto;gap:28px; }
.hero-summary div { min-width:90px; }.hero-summary b,.hero-summary span { display:block; }.hero-summary b { font:800 20px "Manrope"; }.hero-summary span { margin-top:3px;color:#78849a;font-size:10px;text-transform:uppercase;letter-spacing:.08em; }
.section-title { display:flex;align-items:center;margin:0 0 16px; }
.section-title h2 { margin:0;font-size:17px; }.section-title span { margin-left:auto;color:var(--muted);font-size:12px; }
.home-banner { position:relative;z-index:2;overflow:hidden;padding-top:20px;border-top:1px solid rgba(255,255,255,.1);opacity:1;transition:opacity .42s ease; }
.home-banner.hidden { display:none; }
.home-banner.fading { opacity:0; }
.home-banner-head { display:flex;align-items:center;justify-content:center; }
.home-banner-head .eyebrow { margin:0;color:#aab4c1;font-size:10px;letter-spacing:.1em; }
.home-banner-head .eyebrow b { font-weight:800;letter-spacing:.1em; }
.home-banner-viewport { overflow:hidden;padding:34px 0;-webkit-mask-image:linear-gradient(90deg,transparent,#000 48px,#000 calc(100% - 48px),transparent);mask-image:linear-gradient(90deg,transparent,#000 48px,#000 calc(100% - 48px),transparent); }
.home-banner-track { --banner-gap:16px;display:flex;width:max-content;gap:0;animation:home-banner-scroll var(--marquee-duration,30s) linear infinite;will-change:transform; }
.home-banner-group { display:flex;gap:var(--banner-gap);padding-right:var(--banner-gap); }
.home-banner-track.paused { animation-play-state:paused; }
@keyframes home-banner-scroll { from{transform:translateX(0)} to{transform:translateX(-50%)} }
.banner-card { position:relative;flex:0 0 132px;width:132px;cursor:pointer; }
.banner-card:hover { z-index:2; }
.banner-card-art { aspect-ratio:5/7;border-radius:10px;background:#0b0e12;box-shadow:0 10px 22px rgba(0,0,0,.32);transition:transform .18s ease,box-shadow .18s ease; }
.banner-card-art img { display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit; }
.banner-card-meta { display:none; }
.banner-card:hover .banner-card-art { transform:scale(1.28);box-shadow:0 24px 44px rgba(0,0,0,.55),0 0 0 2px var(--accent,var(--brand-2)); }
.dashboard-recent h2 { margin:0 0 12px;font-size:18px; }
.dashboard-recent-list { display:grid; }
.dashboard-recent-row { display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 0;border:0;border-bottom:1px solid rgba(255,255,255,.08);background:transparent;color:inherit;text-align:left;cursor:pointer; }
.dashboard-recent-row:last-child { border-bottom:0; }
.dashboard-recent-row img { width:42px;aspect-ratio:5/7;border-radius:5px;object-fit:cover; }
.dashboard-recent-copy,.dashboard-recent-copy b,.dashboard-recent-copy small { display:block;min-width:0; }
.dashboard-recent-copy b,.dashboard-recent-copy small { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.dashboard-recent-copy small { margin-top:4px;color:#aab4c1; }
.dashboard-recent-price { font-weight:700;white-space:nowrap; }
/* With animations reduced in the system settings (also what Windows reports with its animation
   effects off, in a remote session or on battery saver) the reel does not move by itself. It
   becomes a row to scroll by hand instead of a strip cut off at the edge -- unless the user chose
   to have it move regardless (Settings > Highlights, .always-moving). */
@media(prefers-reduced-motion:reduce){
  .home-banner:not(.always-moving) .home-banner-track { animation:none; }
  .home-banner:not(.always-moving) .home-banner-group[aria-hidden] { display:none; }
  .home-banner:not(.always-moving) .home-banner-viewport { overflow-x:auto;scrollbar-width:thin; }
}
.settings-section { max-width:640px;margin-bottom:28px;padding:22px 24px;border-radius:14px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line); }
.settings-section h2 { margin:0 0 4px;font-size:16px; }
.settings-section .muted { font-size:11px; }
.settings-grid { display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-top:16px; }
.settings-field { display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:700; }
.settings-checklist { display:flex;flex-direction:column;gap:9px;margin-top:14px; }
.checkbox-row { display:flex;align-items:center;gap:9px;font-size:12px;cursor:pointer; }
.checkbox-row input { width:16px;height:16px;accent-color:var(--brand-2); }
.settings-subhead { margin-top:22px; }
.settings-hint { margin-top:16px;padding-top:14px;border-top:1px solid var(--line);font-size:10px;line-height:1.5; }
.settings-card-public .public-profile-theme { display:inline-flex;margin-top:10px; }
.user-settings-layout { display:flex;flex-direction:column;gap:16px;max-width:1120px; }
.user-settings-layout .user-settings-card { max-width:none;margin:0;padding:24px 26px; }
.user-settings-card-head { display:flex;align-items:center;gap:14px;margin-bottom:18px; }
.user-settings-card-head>div { min-width:0; }
.user-settings-card-head .eyebrow { display:block;margin-bottom:2px;font-size:9px; }
.user-settings-card-head h2 { margin:0 0 3px; }
.user-settings-card-head p { margin:0;color:var(--muted);font-size:9px;line-height:1.45; }
.user-settings-card-icon { display:grid;flex:0 0 auto;width:43px;height:43px;place-items:center;border-radius:14px;background:var(--surface-2);color:var(--brand); }
.user-settings-card-icon svg { width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round; }
.user-settings-card .settings-grid { margin-top:0; }
.user-settings-card .settings-grid-account,.user-settings-card .settings-grid-password { grid-template-columns:repeat(3,minmax(0,1fr)); }
.user-settings-card .settings-field { min-width:0;gap:7px;padding:0;background:transparent; }
.user-settings-card .settings-field>span:not(.settings-language-game) { color:var(--muted);font-size:9.5px;font-weight:750;letter-spacing:.025em; }
.user-settings-card .settings-field :is(input,.select-control) { width:100%;min-width:0;height:42px;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2);color:var(--ink);font:600 10px var(--font-ui);outline:none; }
.user-settings-card .settings-field :is(input,.select-control):focus { border-color:color-mix(in srgb,var(--brand) 45%,var(--line));box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 9%,transparent); }
.user-settings-actions { display:flex;justify-content:flex-end;margin-top:17px;padding-top:15px;border-top:1px solid var(--line); }
.user-settings-actions :is(button,a) { gap:8px;text-decoration:none; }
.user-settings-actions svg { width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.user-settings-status { display:inline-flex;align-items:center;gap:6px;margin-left:auto;padding:7px 10px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap; }
.user-settings-status i { width:6px;height:6px;border-radius:50%;background:var(--muted); }
.user-settings-status.is-connected { color:#197551; }.user-settings-status.is-connected i { background:#25a875;box-shadow:0 0 0 4px rgba(37,168,117,.12); }
.appearance-settings-grid { display:flex;flex-direction:column;gap:0;padding:4px;border-radius:17px;background:var(--surface-2); }
.user-settings-card .appearance-settings-grid>.segmented { width:100%;margin:0;padding:3px;border:0;border-radius:13px;background:transparent; }
.user-settings-card .appearance-settings-grid>.segmented+.segmented { padding-top:6px;border-top:1px solid var(--line);border-radius:0 0 13px 13px; }
.user-settings-card .appearance-settings-grid>.segmented button { flex:1;height:31px;border-radius:999px; }
.settings-language-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.settings-language-field { padding:12px!important;border:1px solid var(--line)!important;border-radius:14px;background:var(--surface-2)!important; }
.settings-language-game { display:flex;align-items:center;gap:9px;min-width:0; }
.settings-language-game i { display:grid;flex:0 0 auto;width:31px;height:31px;place-items:center;border-radius:9px;background:var(--surface); }
.settings-language-game img { display:block;width:23px;height:23px;object-fit:contain; }
.settings-language-game b { overflow:hidden;text-overflow:ellipsis;color:var(--ink);font-size:9px;white-space:nowrap; }
.settings-card-language .user-settings-card-head { margin-bottom:12px; }
.settings-card-language .settings-language-grid { gap:6px; }
.settings-card-language .settings-language-field { min-height:48px;padding:7px 8px!important; }
.settings-card-language .settings-language-game { gap:7px; }
.settings-card-language .settings-language-game i { width:28px;height:28px;border-radius:8px; }
.settings-card-language .settings-language-game img { width:20px;height:20px; }
.settings-card-language .settings-language-field .select-control { height:34px;padding-inline:10px; }
.highlight-settings-list { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
.highlight-setting { justify-content:space-between;min-height:58px;padding:11px 13px!important;border:1px solid var(--line);border-radius:14px!important;background:var(--surface-2)!important; }
.highlight-setting>span b,.highlight-setting>span small { display:block; }.highlight-setting>span b { color:var(--ink);font-size:10px; }.highlight-setting>span small { margin-top:3px;color:var(--muted);font-size:9.5px; }
.highlight-setting input { position:absolute;width:1px!important;height:1px!important;opacity:0;pointer-events:none; }
.highlight-setting>i { flex:0 0 auto;width:40px;height:23px;padding:3px;border-radius:999px;background:color-mix(in srgb,var(--muted) 25%,var(--surface));box-shadow:inset 0 0 0 1px var(--line);transition:.18s ease; }
.highlight-setting>i::after { content:"";display:block;width:17px;height:17px;border-radius:50%;background:var(--surface);box-shadow:0 2px 5px rgba(0,0,0,.16);transition:transform .18s ease; }
.highlight-setting input:checked+i { background:var(--brand);box-shadow:none; }.highlight-setting input:checked+i::after { transform:translateX(17px); }
.highlight-setting input:focus-visible+i { outline:2px solid var(--brand);outline-offset:3px; }
.user-settings-card .settings-hint { margin-bottom:0;color:var(--muted); }
.password-settings-status { display:flex;align-items:center;gap:9px;min-width:0;margin-right:auto;color:var(--ink); }
.password-settings-status i { flex:0 0 auto;width:7px;height:7px;border-radius:50%;background:#25a875;box-shadow:0 0 0 5px rgba(37,168,117,.1); }
.password-settings-status b { overflow:hidden;text-overflow:ellipsis;font-size:9px;white-space:nowrap; }
.account-settings-actions { align-items:center;gap:10px; }
.account-settings-actions #account-password-open svg { width:14px;height:14px; }
.account-password-dialog { width:min(540px,95vw); }
.account-password-dialog-head { align-items:center;margin-bottom:18px; }
.account-password-dialog-head p { margin:5px 0 0;color:var(--muted);font-size:10px; }
.account-password-fields { display:flex;flex-direction:column;gap:11px; }
.account-password-fields label { display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:9.5px;font-weight:750; }
.account-password-fields input { width:100%;height:43px;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2);color:var(--ink);font:600 10px var(--font-ui);outline:none; }
.account-password-fields input:focus { border-color:color-mix(in srgb,var(--brand) 45%,var(--line));box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 9%,transparent); }
.account-password-actions { margin-top:20px; }

.settings-section:has(.admin-table) { max-width:900px; }
.admin-table { display:flex;flex-direction:column;gap:10px;margin-top:14px; }
.admin-row { display:flex;flex-wrap:wrap;align-items:center;gap:14px;padding:12px 14px;border-radius:10px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line); }
.admin-row-head { display:flex;flex-direction:column;gap:2px;min-width:160px;margin-right:auto; }
.admin-row-head .muted { font-size:10px; }
.admin-row label { display:flex;flex-direction:column;gap:5px;font-size:10px;font-weight:700; }
.admin-row select,.admin-row input[type=file] { font-size:11px; }
.admin-game-row input[type=file]::file-selector-button { min-height:32px;margin-right:9px;padding:0 12px;border:0;border-radius:999px;background:var(--surface);color:var(--ink);font:700 9px var(--font-ui);cursor:pointer; }
.admin-section-head { display:flex;align-items:center;justify-content:space-between;gap:16px; }
.admin-section-head h2 { margin:0; }
.admin-settings-card-head { margin-bottom:14px; }
.admin-settings-card-head .admin-price-source-button { flex:0 0 auto;margin-left:auto; }
.admin-price-source-button { display:inline-flex;align-items:center;gap:7px; }
.admin-price-source-button svg { width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
.price-source-dialog { width:min(820px,95vw); }
.price-source-dialog-head { align-items:center;margin-bottom:18px; }
.price-source-dialog-head p { margin:5px 0 0;color:var(--muted);font-size:10px; }
.price-source-list { display:flex;flex-direction:column;gap:9px; }
.price-source-row { display:grid;grid-template-columns:minmax(190px,1fr) minmax(180px,.8fr) minmax(180px,.8fr);align-items:end;gap:14px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2); }
.price-source-game { display:flex;align-items:center;align-self:center;gap:11px;min-width:0; }
.price-source-game-logo { display:grid;flex:0 0 auto;width:42px;height:42px;place-items:center;border-radius:12px;background:var(--surface); }
.price-source-game-logo img { display:block;width:31px;height:31px;object-fit:contain; }
.price-source-game b,.price-source-game small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.price-source-game b { font-size:11px; }.price-source-game small { margin-top:3px;color:var(--muted);font-size:9.5px; }
.price-source-row label { min-width:0; }
.price-source-row :is(select,input) { width:100%;height:40px;padding:0 11px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:10px;outline:none; }
.price-source-row input:disabled { opacity:.4;cursor:not-allowed; }
.price-source-actions { padding-top:2px; }
.admin-status { display:flex;flex-direction:column;gap:2px;align-items:flex-start; }
.admin-status-badge { padding:3px 8px;border-radius:20px;font-size:9px;font-weight:800;text-transform:uppercase;background:#3a4152;color:#cfd6e4; }
.admin-status-badge.status-ok { background:#12432d;color:#7be0a8; }
.admin-status-badge.status-error { background:#4a1f24;color:#ff9da3; }
.admin-error { flex-basis:100%;font-size:10px;color:#ff9da3; }
.admin-row-actions { display:flex;gap:8px; }
.admin-config-editor { flex-basis:100%;display:flex;flex-direction:column;gap:8px;margin-top:6px; }
.admin-config-editor textarea { width:100%;font-family:ui-monospace,monospace;font-size:11px;padding:10px;border-radius:8px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);color:var(--ink); }
.admin-add { margin-top:16px;padding-top:14px;border-top:1px solid var(--line); }
.admin-add summary { cursor:pointer;font-size:12px;font-weight:700;color:var(--muted); }
.admin-form { display:flex;flex-direction:column;gap:10px;margin-top:12px;max-width:480px; }
.admin-form label { display:flex;flex-direction:column;gap:5px;font-size:11px;font-weight:700; }
.admin-form textarea { font-family:ui-monospace,monospace;font-size:11px;padding:10px;border-radius:8px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);color:var(--ink); }
.admin-form:has(.admin-form-grid) { max-width:none; }
.admin-config-editor .admin-form-grid,.admin-form .admin-form-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px 14px; }
.admin-user-fields :is(input:not([type=checkbox]),.select-control) { width:100%;min-width:0;height:38px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:11px;font-weight:600;outline:none; }
.admin-user-fields :is(input,.select-control):focus { border-color:color-mix(in srgb,var(--brand) 55%,var(--line));box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 10%,transparent); }
.admin-user-fields .radio-label { flex-direction:row;align-items:center;gap:8px;align-self:end;min-height:38px; }
.admin-user-fields~.primary-button,.admin-user-fields>.primary-button { align-self:flex-start; }
.admin-config-editor h4,.admin-form h4 { margin:18px 0 0;padding-top:14px;border-top:1px solid var(--line);font-size:12px; }
.admin-config-editor label,.admin-form-grid label { display:flex;flex-direction:column;gap:5px;font-size:10px;font-weight:700; }
.secondary-button.small { min-height:30px;padding:0 12px;font-size:10px;align-self:flex-start; }
.admin-code-editor { width:100%;resize:vertical;margin-top:8px; }
.oauth-admin-card { max-width:1080px;overflow:hidden; }
.oauth-admin-summary { display:block;list-style:none;cursor:pointer; }
.oauth-admin-summary::-webkit-details-marker { display:none; }
.oauth-admin-summary::marker { content:""; }
.oauth-admin-head { display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:15px;padding-bottom:0;border-bottom:0; }
.oauth-admin-card[open] .oauth-admin-summary { padding-bottom:18px;border-bottom:1px solid var(--line); }
.oauth-collapse-icon { display:grid;width:34px;height:34px;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--muted);transition:background .18s ease,color .18s ease; }
.oauth-collapse-icon svg { width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s ease; }
.oauth-admin-summary:hover .oauth-collapse-icon { background:var(--surface-2);color:var(--ink); }
.oauth-admin-summary:focus-visible { outline:2px solid var(--brand);outline-offset:5px;border-radius:12px; }
.oauth-admin-card[open] .oauth-collapse-icon svg { transform:rotate(180deg); }
.oauth-admin-card[open] .oauth-admin-body { animation:oauth-admin-expand .2s ease both; }
@keyframes oauth-admin-expand { from { opacity:0;transform:translateY(-6px); } }
.oauth-admin-icon { display:grid;width:48px;height:48px;place-items:center;border-radius:15px;background:var(--surface-2);color:var(--brand); }
.oauth-admin-icon svg { width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round; }
.oauth-admin-title>span { display:block;margin-bottom:3px;color:var(--brand);font-size:9.5px;font-weight:800;letter-spacing:.13em; }
.oauth-admin-title h2 { margin:0 0 4px; }
.oauth-admin-title p { margin:0;color:var(--muted);font-size:10px;line-height:1.45; }
.oauth-admin-state { display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap; }
.oauth-status,.oauth-source-badge { display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:0 10px;border:1px solid var(--line);border-radius:999px;background:var(--surface-2);color:var(--muted);font-size:9.5px;font-weight:800;letter-spacing:.05em;text-transform:uppercase; }
.oauth-status i { width:6px;height:6px;border-radius:50%;background:var(--muted); }
.oauth-status.is-active { color:#197551; }.oauth-status.is-active i { background:#25a875;box-shadow:0 0 0 4px rgba(37,168,117,.12); }
.oauth-lock-notice { display:flex;align-items:flex-start;gap:11px;margin-top:16px;padding:12px 14px;border:1px solid color-mix(in srgb,var(--warning) 26%,var(--line));border-radius:12px;background:color-mix(in srgb,var(--warning) 7%,var(--surface)); }
.oauth-lock-notice svg { flex:0 0 auto;width:18px;height:18px;fill:none;stroke:var(--warning);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
.oauth-lock-notice b,.oauth-lock-notice span { display:block; }.oauth-lock-notice b { margin-bottom:3px;font-size:10px; }.oauth-lock-notice span { color:var(--muted);font-size:9px;line-height:1.5; }
.oauth-admin-form { gap:14px;max-width:none;margin-top:16px; }
.admin-form .oauth-toggle-row { display:flex!important;flex-direction:row;align-items:center;justify-content:space-between;gap:18px;min-height:62px;padding:11px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);cursor:pointer; }
.oauth-toggle-copy b,.oauth-toggle-copy small { display:block; }.oauth-toggle-copy b { color:var(--ink);font-size:11px; }.oauth-toggle-copy small { margin-top:4px;color:var(--muted);font-size:9px;font-weight:500;line-height:1.4; }
.oauth-toggle-control { position:relative;flex:0 0 auto;width:42px;height:24px; }
.oauth-toggle-control input { position:absolute;width:1px;height:1px;opacity:0;pointer-events:none; }
.oauth-toggle-control>span { display:block;width:42px;height:24px;padding:3px;border-radius:999px;background:color-mix(in srgb,var(--muted) 28%,var(--surface));box-shadow:inset 0 0 0 1px var(--line);transition:.18s ease; }
.oauth-toggle-control>span::after { content:"";display:block;width:18px;height:18px;border-radius:50%;background:var(--surface);box-shadow:0 2px 6px rgba(0,0,0,.18);transition:transform .18s ease; }
.oauth-toggle-control input:checked+span { background:var(--brand);box-shadow:none; }.oauth-toggle-control input:checked+span::after { transform:translateX(18px); }
.oauth-toggle-control input:focus-visible+span { outline:2px solid var(--brand);outline-offset:3px; }.oauth-toggle-control input:disabled+span { opacity:.45;cursor:not-allowed; }
.oauth-form-group { padding:16px;border:1px solid var(--line);border-radius:15px;background:color-mix(in srgb,var(--surface-2) 58%,transparent); }
.oauth-form-group-head { display:flex;align-items:center;gap:10px;margin-bottom:14px; }
.oauth-form-group-head>span { display:grid;flex:0 0 auto;width:27px;height:27px;place-items:center;border-radius:50%;background:var(--surface);color:var(--brand);font-size:9.5px;font-weight:800;box-shadow:inset 0 0 0 1px var(--line); }
.oauth-form-group-head b,.oauth-form-group-head small { display:block; }.oauth-form-group-head b { font-size:11px; }.oauth-form-group-head small { margin-top:2px;color:var(--muted);font-size:9.5px;font-weight:500; }
.admin-form .oauth-provider-grid,.admin-form .oauth-endpoint-grid,.admin-form .oauth-claims-grid { gap:11px; }
.admin-form .oauth-provider-grid { grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); }
.admin-form .oauth-endpoint-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.admin-form .oauth-claims-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.admin-form-grid .oauth-field { min-width:0;gap:6px; }
.admin-form-grid .oauth-field>span { color:var(--muted);font-size:9.5px;font-weight:750;letter-spacing:.025em; }
.oauth-field em { margin-left:5px;padding:2px 6px;border-radius:999px;background:color-mix(in srgb,var(--brand) 10%,transparent);color:var(--brand);font-size:8.5px;font-style:normal;text-transform:uppercase; }
.oauth-field-wide { grid-column:1/-1; }
.oauth-field input,.oauth-field .select-control { width:100%;min-width:0;height:42px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:10px;outline:none; }
.oauth-field input:focus,.oauth-field .select-control:focus { border-color:color-mix(in srgb,var(--brand) 55%,var(--line));box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 10%,transparent); }
.oauth-field :is(input,.select-control):disabled { opacity:.55;cursor:not-allowed; }
.oauth-admin-actions { display:flex;align-items:center;justify-content:flex-end;gap:18px;padding-top:3px; }
.oauth-admin-actions>span { margin-right:auto;color:var(--muted);font-size:9.5px;line-height:1.45; }
.oauth-admin-actions .primary-button { gap:8px; }.oauth-admin-actions .primary-button svg { width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.game-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:34px; }
.game-tile { position:relative;overflow:hidden;min-height:190px;padding:0;border:0;border-radius:16px;background:transparent;text-align:left;cursor:pointer;box-shadow:inset 0 0 0 1px var(--line);transition:.2s; }
.game-tile:hover { transform:translateY(-2px);box-shadow:inset 0 0 0 1px var(--line),0 10px 24px rgba(31,39,66,.1); }
.game-visual { position:relative;height:100px;padding:16px;color:#fff;background:transparent; }
.game-visual:before { content:"";position:absolute;width:165px;height:165px;right:-28px;top:-38px;border:1px solid rgba(255,255,255,.19);border-radius:50%;box-shadow:0 0 0 35px rgba(255,255,255,.035); }
.game-symbol { position:absolute;right:27px;bottom:19px;font:800 70px "Manrope";opacity:.22;transform:rotate(-8deg); }
.module-label { font-size:10px;font-weight:800;letter-spacing:.13em;opacity:.72; }
.game-visual h3 { position:absolute;left:21px;bottom:20px;margin:0;max-width:230px;font-size:24px;line-height:1.05; }
.game-info { padding:14px 18px 18px;background:var(--surface-2); }
.game-main-stat { display:flex;align-items:baseline;gap:7px;margin-bottom:10px; }.game-main-stat b{font:800 16px "Manrope";}.game-main-stat span{color:var(--muted);font-size:10px;}
.progress-track { height:5px;overflow:hidden;border-radius:8px;background:#eef0f4; }.progress-track span{display:block;height:100%;border-radius:8px;background:var(--accent); }
.game-stats { display:flex;justify-content:space-between;align-items:center;margin-top:10px;color:var(--muted);font-size:11px; }.game-stats b{color:var(--ink);font-weight:800;}
.game-logo { transition:transform .2s ease; }
.game-tile:hover .game-logo { transform:scale(1.1); }
.activity-row { display:grid;grid-template-columns:repeat(3,1fr);gap:14px; }
.activity-card { display:flex;align-items:center;gap:13px;padding:15px 17px;border:1px solid var(--line);border-radius:14px;background:var(--surface); }
.activity-icon { display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#f0eeff;color:var(--brand);font-size:17px; }.activity-card b,.activity-card small{display:block}.activity-card b{font-size:12px}.activity-card small{margin-top:3px;color:var(--muted);font-size:10px;}
.breadcrumbs { display:flex;align-items:center;gap:8px;margin-bottom:15px;color:var(--muted);font-size:11px; }.breadcrumbs button{padding:0;border:0;background:none;color:inherit;cursor:pointer}.breadcrumbs b{color:var(--ink)}
.breadcrumb-back{display:grid;place-items:center;width:20px;height:20px;margin-right:2px;border-radius:6px;font-size:13px;color:var(--ink)!important}.breadcrumb-back:hover{background:var(--surface-2)}
.game-banner { display:flex;align-items:center;gap:14px;margin-bottom:18px;padding:16px 20px;border-radius:14px;color:#fff;background:linear-gradient(110deg,var(--accent),#141c31 75%); }
.game-banner-symbol { display:grid;place-items:center;width:43px;height:43px;border:1px solid rgba(255,255,255,.2);border-radius:12px;background:rgba(255,255,255,.1);font:800 20px "Manrope"; }
.game-banner h1 { margin:0 0 2px;font-size:21px; }.game-banner p{margin:0;color:rgba(255,255,255,.6);font-size:10px}.game-banner .banner-value{margin-left:auto;text-align:right}.banner-value b,.banner-value span{display:block}.banner-value b{font:800 18px "Manrope"}.banner-value span{font-size:9.5px;color:rgba(255,255,255,.55)}
.toolbar { display:flex;align-items:center;gap:10px;margin-bottom:21px; }
.toolbar h2 { margin:0;font-size:18px; }.toolbar-spacer{flex:1}
.segmented { display:flex;padding:3px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2); }.segmented button{height:30px;padding:0 11px;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:11px;font-weight:700;cursor:pointer}.segmented button.active{background:#fff;color:var(--ink);box-shadow:0 2px 6px rgba(0,0,0,.07)}
.zoom-control { display:flex;align-items:center;gap:8px;color:var(--muted);font-size:15px; }.zoom-control input{width:80px;accent-color:var(--brand);}
.set-grid { display:grid;grid-template-columns:repeat(var(--set-cols,3),minmax(230px,1fr));gap:18px; }
.set-overview-groups{display:flex;flex-direction:column;gap:30px}.set-group-head{display:flex;align-items:center;width:100%;gap:10px;margin:0 0 13px;padding:0 0 10px;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left;cursor:pointer}.set-group-head h3{margin:0;font-size:15px}.set-group-head span:not(.set-group-chevron){color:var(--muted);font-size:10px}.set-group-chevron{display:grid;place-items:center;width:20px;height:20px;color:var(--muted);font-size:15px;transform:rotate(0);transition:transform .18s}.set-group.collapsed .set-group-chevron{transform:rotate(-90deg)}.set-group.collapsed .set-group-head{margin-bottom:0}.set-group-body[hidden]{display:none}.set-overview-toolbar #set-type-filter{min-width:145px}.all-cards-button{min-height:36px}
.set-card { overflow:hidden;border:1px solid var(--line);border-radius:17px;background:var(--surface);cursor:pointer;transition:.2s;box-shadow:0 5px 22px rgba(32,40,65,.05); }
.set-card:hover{transform:translateY(-3px);box-shadow:0 13px 28px rgba(32,40,65,.1)}
.set-art { position:relative;height:132px;padding:18px;background:linear-gradient(140deg,var(--accent),#111827);color:#fff;overflow:hidden; }
.set-art:before{content:"";position:absolute;width:160px;height:160px;right:-30px;top:-65px;border:2px solid rgba(255,255,255,.16);border-radius:45% 55% 60% 40%;transform:rotate(30deg);box-shadow:0 0 0 25px rgba(255,255,255,.025)}
.set-code{position:relative;font-size:10px;font-weight:800;letter-spacing:.14em;opacity:.75}.set-emblem{position:absolute;right:22px;bottom:7px;font:800 56px "Manrope";opacity:.2}.set-card-info{padding:17px 18px}.set-card h3{margin:0 0 4px;font-size:16px}.set-meta{color:var(--muted);font-size:10px}.badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:12px}.badge{padding:4px 7px;border-radius:5px;background:#f0f1f4;color:#687080;font-size:9px;font-weight:700}.set-completion{display:flex;gap:13px;margin-top:14px;padding-top:13px;border-top:1px solid var(--line);font-size:9px;color:var(--muted)}.set-completion b{display:block;margin-top:2px;color:var(--ink);font-size:11px}
.stats-bar { display:grid;grid-template-columns:repeat(5,1fr);margin-bottom:20px;border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden; }
.stat-box { padding:15px 17px;border-right:1px solid var(--line); }.stat-box:last-child{border:0}.stat-box span{display:block;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em}.stat-box b{display:block;margin-top:3px;font:800 17px "Manrope"}.stat-box .mini-progress{margin-top:7px;height:3px;border-radius:4px;background:#eceef2}.mini-progress i{display:block;height:100%;border-radius:4px;background:var(--brand)}
.set-compact-head{display:flex;align-items:center;gap:24px;min-height:72px;margin-bottom:16px;padding:12px 17px;border:1px solid var(--line);border-radius:13px;background:var(--surface)}
.set-compact-title{min-width:0}.set-compact-title .breadcrumbs{margin:0 0 4px}.set-compact-title h1{display:flex;align-items:baseline;gap:9px;margin:0;font-size:20px;white-space:nowrap}.set-compact-title h1 span{color:var(--brand-2);font-size:11px;letter-spacing:.08em}.set-compact-title small{color:var(--muted);font-size:9px;font-weight:500}
.compact-stats{display:flex;align-items:stretch;gap:5px;margin-left:auto}.compact-stat{min-width:78px;padding:8px 10px;border-radius:8px;background:var(--surface-2)}.compact-stat span,.compact-stat b{display:block}.compact-stat span{color:var(--muted);font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.compact-stat b{margin-top:2px;font:800 13px "Manrope"}.compact-stat.value{min-width:102px}.compact-badges{display:flex;gap:4px}.compact-badges .badge{padding:3px 6px}
.card-toolbar { display:flex;align-items:center;gap:9px;margin-bottom:17px;flex-wrap:wrap; }
.toolbar-filter-anchor { position:relative; }
.toolbar-filter-popup { position:absolute;top:calc(100% + 8px);right:0;width:220px;padding:12px;border-radius:12px;background:#171f30;box-shadow:0 16px 40px rgba(0,0,0,.5),0 0 0 1px rgba(255,255,255,.07);display:flex;flex-direction:column;gap:10px;z-index:30; }
.toolbar-filter-popup.hidden { display:none; }
.toolbar-filter-popup label { display:flex;flex-direction:column;gap:5px;font-size:10px;font-weight:750;color:var(--muted);text-transform:uppercase;letter-spacing:.06em; }
.toolbar-filter-popup .select-control { width:100%; }
.filter-search { position:relative; }.filter-search span{position:absolute;left:11px;top:9px;color:var(--muted)}.filter-search input{width:210px;height:36px;padding:0 12px 0 32px;border:1px solid var(--line);border-radius:9px;background:#fff;outline:none}.filter-search input:focus{border-color:#958bec;box-shadow:0 0 0 3px #eeecff}
.select-control{height:36px;padding:0 29px 0 10px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#535b69;font-size:11px;font-weight:600;}
.card-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--card-size,155px),1fr));gap:var(--card-gap,17px);align-items:start; }
.all-card-groups{display:flex;flex-direction:column;gap:42px}.all-card-set{scroll-margin-top:92px}.set-card-divider{display:flex;align-items:center;gap:13px;margin:0 0 18px;padding:9px 2px 11px;border-bottom:1px solid var(--line)}.set-card-divider img{width:66px;height:34px;object-fit:contain;object-position:center}.set-card-divider div{min-width:0}.set-card-divider span,.set-card-divider h2{display:inline}.set-card-divider span{margin-right:8px;color:var(--brand-2);font-size:9px;font-weight:800;letter-spacing:.08em}.set-card-divider h2{margin:0;font-size:15px}.set-card-divider small{margin-left:auto;color:var(--muted);font-size:9px;white-space:nowrap}
.card-toolbar-sticky{position:sticky;top:82px;z-index:12;box-shadow:0 10px 26px rgba(0,0,0,.12);background:var(--surface)}
.card-toolbar-sticky .op-catalog-filterbar{overflow:visible;flex-wrap:wrap;align-items:center}
.card-filter-end{margin-left:auto}
.set-switch-trigger{white-space:nowrap}
.set-switch-popup{width:260px;max-height:60vh;overflow-y:auto}
.toolbar-filter-popup.align-left{left:0;right:auto}
.rarity-popup{flex-direction:row!important;flex-wrap:nowrap;width:max-content;gap:6px}
.set-switch-option{padding:8px 10px;border:0;border-radius:7px;background:transparent;color:var(--ink);font-size:10px;text-align:left;cursor:pointer;white-space:nowrap}
.set-switch-option:hover{background:var(--surface-2)}
.set-switch-option.active{background:var(--brand);color:#fff}
.back-to-top{position:fixed;right:28px;bottom:28px;width:46px;height:46px;border:0;border-radius:50%;background:var(--brand);color:#fff;font-size:18px;box-shadow:0 10px 24px rgba(0,0,0,.35);cursor:pointer;z-index:40;opacity:1;transition:opacity .2s,transform .2s}
.back-to-top.hidden{opacity:0;pointer-events:none;transform:translateY(8px)}
.offline-indicator{position:fixed;left:28px;bottom:28px;z-index:40;padding:9px 16px;border-radius:20px;background:#4a3410;color:#f7c873;font-size:11px;font-weight:700;box-shadow:0 10px 24px rgba(0,0,0,.35);opacity:1;transition:opacity .2s,transform .2s;pointer-events:none}
.offline-indicator.hidden{opacity:0;transform:translateY(8px)}
@media(max-width:760px){.offline-indicator{left:14px;bottom:14px;right:14px;text-align:center}}
.card-tile { position:relative;min-width:0;cursor:pointer;font-size:calc(var(--card-size,155px) / 15.5); }
/* A game's full card list or a large collection is thousands of tiles. Letting the browser skip
   layout and paint for the ones off screen cuts rebuilding such a view from ~4 s to well under 2 s.
   The skipped tiles keep an estimated (then remembered) height so the scrollbar stays put. The
   containment this implies would clip the hover frame and shadow, which reach outside the tile,
   so a tile being interacted with opts back out. */
.card-tile { content-visibility:auto;contain-intrinsic-height:auto calc(var(--card-size,155px) * 1.55 + 48px); }
.card-tile:hover,.card-tile:focus-within,.card-tile.watch-selected { content-visibility:visible; }
.card-image-wrap { position:relative;overflow:hidden;aspect-ratio:5/7;border-radius:calc(var(--card-size,155px) * .065);background:#dfe3ea;box-shadow:0 5px 14px rgba(23,30,50,.16);transition:.2s; }
.card-tile:hover .card-image-wrap{transform:translateY(-4px);box-shadow:0 13px 22px rgba(23,30,50,.22)}
.card-image-wrap img { display:block;width:100%;height:100%;object-fit:cover; }
.card-finish-frame{position:relative;isolation:isolate;overflow:hidden}
.card-finish-frame>img{position:relative;z-index:0}
.card-finish-frame.finish-foil:after,.card-finish-frame.finish-prismatic:after,.card-finish-frame.finish-prismatic:before,.card-finish-frame.finish-aurora:after,.card-finish-frame.finish-aurora:before{content:"";position:absolute;pointer-events:none;z-index:1}
.card-finish-frame.finish-foil:after{inset:0;background:linear-gradient(112deg,transparent 0%,rgba(84,205,255,.48) 20%,rgba(141,113,255,.54) 35%,rgba(255,255,255,.62) 50%,rgba(255,225,111,.48) 65%,rgba(86,244,205,.5) 80%,transparent 100%);background-size:260% 260%;mix-blend-mode:screen;opacity:.9;animation:foilSweep 5.5s ease-in-out infinite alternate}
.card-finish-frame.finish-foil:before{content:"";position:absolute;inset:0;pointer-events:none;z-index:1;background:linear-gradient(112deg,rgba(20,10,40,.16) 0%,transparent 25%,transparent 75%,rgba(20,10,40,.16) 100%);background-size:260% 260%;mix-blend-mode:multiply;opacity:.7;animation:foilSweep 5.5s ease-in-out infinite alternate}
.card-finish-frame.finish-prismatic:after{inset:0;background:conic-gradient(from 30deg at 50% 50%,rgba(86,210,255,.1) 0%,rgba(136,104,255,.12) 25%,rgba(255,97,190,.11) 50%,rgba(255,218,105,.1) 75%,rgba(86,210,255,.1) 100%);background-size:180% 180%;mix-blend-mode:screen;opacity:.45;animation:prismDrift 10s ease-in-out infinite alternate}
.card-finish-frame.finish-prismatic:before{inset:0;background:repeating-linear-gradient(128deg,transparent 0 27px,rgba(255,255,255,.06) 29px,transparent 32px 55px);mix-blend-mode:soft-light;opacity:.3;animation:prismLines 6s linear infinite}
.card-finish-frame.finish-aurora:after{inset:0;background:radial-gradient(ellipse at 18% 22%,rgba(91,225,255,.22),transparent 32%),radial-gradient(ellipse at 78% 30%,rgba(255,91,209,.2),transparent 34%),radial-gradient(ellipse at 58% 82%,rgba(121,255,174,.18),transparent 38%),radial-gradient(ellipse at 22% 77%,rgba(255,218,103,.14),transparent 33%);background-size:170% 170%;mix-blend-mode:screen;opacity:.55;animation:auroraBloom 8s ease-in-out infinite alternate}
.card-finish-frame.finish-aurora:before{inset:0;background:repeating-conic-gradient(from 22deg at 50% 46%,transparent 0 8deg,rgba(255,255,255,.05) 9deg,transparent 11deg 24deg);background-size:160% 160%;mix-blend-mode:overlay;opacity:.3;animation:auroraFacet 14s ease-in-out infinite alternate}
@keyframes foilSweep{0%{background-position:95% 5%}100%{background-position:5% 95%}}
@keyframes prismDrift{0%{background-position:15% 25%}100%{background-position:85% 75%}}
@keyframes prismLines{from{background-position:0 0}to{background-position:55px 0}}
@keyframes auroraBloom{from{background-position:0 0}to{background-position:100% 100%}}
@keyframes auroraFacet{0%{background-position:25% 35%}100%{background-position:75% 65%}}
.owned-pill,.watch-button{z-index:4}
.card-tile.missing .card-image-wrap img:not(.cycle-img) { filter:grayscale(.78);opacity:.46; }.card-tile.missing:hover .card-image-wrap img:not(.cycle-img){filter:grayscale(.25);opacity:.75}
.card-tile.missing .cycle-img.front{filter:grayscale(.78);opacity:.46;}.card-tile.missing .cycle-img.back{filter:grayscale(.78);}.card-tile.missing:hover .cycle-img.front{filter:grayscale(.25);opacity:.75;}.card-tile.missing:hover .cycle-img.back{filter:grayscale(.25);}
/* No backdrop-filter on anything that exists once per tile: behind an 87% opaque fill the blur is
   invisible, but each one is a separate blur pass the browser redoes while scrolling. */
.owned-pill { position:absolute;right:.7em;top:.7em;display:grid;place-items:center;min-width:2.4em;height:2.4em;padding:0 .6em;border-radius:2em;background:rgba(10,16,29,.87);color:#fff;font-size:1em;font-weight:800; }
.variant-badges { position:absolute;right:.7em;top:.7em;z-index:4;display:flex;flex-direction:column;align-items:flex-end;gap:.3em; }
.variant-badges:empty { display:none; }
.variant-badge { display:flex;align-items:center;gap:.2em;padding:.2em .6em;border-radius:2em;background:rgba(10,16,29,.87);color:#fff;font-size:.8em;font-weight:800;letter-spacing:.02em;white-space:nowrap; }
.variant-badge.missing { opacity:.42; }
.variant-badge.tier-foil { background:linear-gradient(120deg,#a86a1c,#f7d67a 45%,#a86a1c 55%,#f2b93b);color:#3a2604;box-shadow:0 0 0 1px rgba(255,224,140,.5) inset; }
.variant-badge.tier-premium { background:linear-gradient(90deg,#ff5f6d,#ffc371,#5bd1ff,#c86bff,#ff5f6d);background-size:320% 100%;color:#160822;box-shadow:0 0 0 1px rgba(255,255,255,.55) inset; }
/* Animated background-position repaints every frame; the badge shimmers while its card is hovered. */
.card-tile:hover .variant-badge.tier-premium { animation:premiumShimmer 3.2s linear infinite; }
@keyframes premiumShimmer{to{background-position:320% 0}}
.watch-button { position:absolute;left:.7em;top:.7em;display:grid;place-items:center;width:2.5em;height:2.5em;padding:0;border:0;border-radius:50%;background:rgba(12,18,33,.72);color:#fff;font-size:1.5em;cursor:pointer;opacity:0;pointer-events:none;transition:opacity .15s,transform .15s}.card-tile:hover .watch-button,.watch-button:focus-visible{opacity:1;pointer-events:auto}.watch-button.active{background:#fff;color:#ef476f}
.watchlist-action svg { display:block;width:1.15em;height:1.15em;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;pointer-events:none; }
.watchlist-action.active svg { fill:currentColor; }
.watchlist-action-wide { display:inline-flex;align-items:center;justify-content:center;gap:7px; }
.watchlist-action-wide svg { width:16px;height:16px; }
.playset-ribbons { position:relative;height:0;overflow:visible;z-index:5;display:flex;justify-content:flex-end;gap:.35em;padding-right:.8em;pointer-events:none; }
.playset-badge { min-width:1em;padding:.2em .3em .4em;display:flex;align-items:flex-start;justify-content:center;font-size:.6em;font-weight:800;height:1.5em;text-align:center;line-height:1.1;white-space:nowrap;clip-path:polygon(0 0,100% 0,100% 60%,50% 100%,0 60%);background:linear-gradient(160deg,#1c7a4d,#3fd88a 55%,#1c7a4d);color:#04150b;box-shadow:0 2px 6px rgba(0,0,0,.3); }
.playset-badge.foil { background:linear-gradient(160deg,#a86a1c,#f7d67a 55%,#a86a1c);color:#3a2604; }
.card-info { padding:10px 2px 0; }.card-info b{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px}.card-subline{display:flex;margin-top:3px;color:var(--muted);font-size:9px}.card-subline span:last-child{margin-left:auto}.variant-chips{display:flex;gap:3px;margin-top:6px;overflow:hidden}.variant-chip{padding:3px 5px;border-radius:4px;background:#edeaff;color:#6055d9;font-size:9.5px;font-weight:800;text-transform:uppercase}
.quick-add,.quantity-control { position:absolute;left:50%;bottom:9px;transform:translateX(-50%);z-index:3;display:none;align-items:center;border-radius:8px;background:rgba(10,16,29,.91);color:#fff;box-shadow:0 4px 12px rgba(0,0,0,.25);overflow:hidden; }
.quantity-control button{width:31px;height:30px;border:0;background:transparent;color:#fff;cursor:pointer;font-size:17px}.quantity-control b{display:grid;place-items:center;min-width:30px;height:30px;border-inline:1px solid rgba(255,255,255,.14);font-size:11px}
body.editing .card-tile .quantity-control{display:flex}
.quantity-stack,.quick-add-stack { position:absolute;left:50%;bottom:9px;transform:translateX(-50%);z-index:3;display:none;flex-direction:column;align-items:center;gap:3px; }
body.editing .card-tile .quantity-stack{display:flex}
.quantity-stack .quantity-control,.quick-add-stack .quick-add { position:static;left:auto;bottom:auto;transform:none;display:flex; }
.quantity-control.foil,.quick-add.foil { background:linear-gradient(120deg,#7a4e0e,#f7d67a 42%,#a8721c 58%,#ffe9ab);color:#3a2604;box-shadow:0 0 0 1px rgba(255,224,140,.6) inset,0 4px 12px rgba(168,114,28,.35); }
.quantity-control.foil button,.quantity-control.foil b { color:#3a2604; }
.quantity-control.foil b { border-inline-color:rgba(58,38,4,.22); }
.watch-desired { display:flex;align-items:center;gap:6px;margin-top:7px;padding:3px 4px 3px 8px;border:1px solid var(--line);border-radius:7px;background:var(--surface-2); }
.watch-desired span { color:var(--muted);font-size:9.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;margin-right:auto; }
.watch-desired button { width:1.7em;height:1.7em;border:0;border-radius:5px;background:transparent;color:var(--ink);cursor:pointer;font-size:12px;line-height:1; }
.watch-desired button:hover { background:var(--surface); }
.watch-desired b { min-width:1.4em;text-align:center;font-size:11px;font-variant-numeric:tabular-nums; }
.watch-bulkbar { display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:-4px 0 12px;padding:9px 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface); }
.watch-bulkbar-all { display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap; }
.watch-bulkbar-count { color:var(--muted);font-size:10px;font-weight:700;margin-right:auto; }
.watch-bulkbar .select-control { max-width:200px;height:36px; }
.watch-bulkbar button:disabled,.watch-bulkbar select:disabled { opacity:.4;cursor:not-allowed; }
.watch-selection-toggle { display:inline-flex;align-items:center;justify-content:center;gap:7px; }
.watch-selection-toggle.active { border-color:var(--brand);color:var(--brand); }
.watch-export-link { display:inline-flex;align-items:center;justify-content:center;color:var(--ink);text-decoration:none; }
.watch-selection-mode .card-tile { cursor:pointer; }
.watch-selection-mode .card-tile::after { content:"";position:absolute;inset:-6px;z-index:6;border:2px solid transparent;border-radius:12px;background:transparent;box-shadow:0 0 0 0 transparent;pointer-events:none;transition:border-color .16s,background .16s,box-shadow .16s,transform .16s; }
.watch-selection-mode .card-tile:hover::after { border-color:color-mix(in srgb,var(--brand) 36%,transparent);background:color-mix(in srgb,var(--brand) 4%,transparent); }
.watch-selection-mode .card-tile.watch-selected::after { border-color:var(--brand);background:color-mix(in srgb,var(--brand) 9%,transparent);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 14%,transparent),0 10px 24px color-mix(in srgb,var(--brand) 17%,transparent); }
.watch-selection-mode .card-tile.watch-selected .card-image-wrap { transform:translateY(-3px); }
.watch-selection-mode .watch-button { display:none; }

.card-flip-stack { position:relative;width:100%;height:100%; }
.cycle-img { position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;transition:opacity .75s ease; }
.cycle-img.front { z-index:2;opacity:1; }
.cycle-img.back { z-index:1;opacity:0; }
.empty-state { grid-column:1/-1;padding:70px 20px;text-align:center;color:var(--muted); }.empty-state b{display:block;margin-bottom:5px;color:var(--ink);font-size:16px}
/* While a dialog is open the page behind it stands still. The dialog's backdrop blurs what is
   under it, and a blur over something that moves (the dashboard reel, a shine) is redone for the
   whole window on every frame -- measured: twice the GPU load of the reel alone, for motion
   nobody can see. */
body:has(>.overlay:not(.hidden)) .app-shell :is(*,*::before,*::after) { animation-play-state:paused!important; }
.overlay { position:fixed;inset:0;z-index:100;display:flex;justify-content:center;align-items:flex-start;padding:7vh 22px;background:rgba(7,11,20,.7);backdrop-filter:blur(9px);overflow:auto; }
.search-dialog { width:min(720px,100%);border-radius:16px;background:#fff;box-shadow:0 30px 90px rgba(0,0,0,.36);overflow:hidden; }
.search-input-wrap { display:flex;align-items:center;gap:12px;padding:14px 17px;border-bottom:1px solid var(--line); }.search-input-wrap input{flex:1;border:0;outline:0;font-size:16px}.search-results{max-height:66vh;overflow:auto;padding:8px}.empty-search{display:grid;place-items:center;min-height:220px;color:var(--muted)}.empty-search b{color:var(--ink);font-size:17px}.empty-search span{margin-top:-75px}
.search-group-title{padding:10px 12px 6px;color:var(--muted);font-size:9px;font-weight:800;letter-spacing:.1em}.search-result{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border:0;border-radius:10px;background:transparent;text-align:left;cursor:pointer}.search-result:hover{background:#f4f3ff}.search-thumb{flex:0 0 auto;width:36px;height:49px;border-radius:4px}.search-thumb img{display:block;width:100%;height:100%;object-fit:cover}.search-result>div{flex:1}.search-result b,.search-result small{display:block}.search-result b{font-size:12px}.search-result small{margin-top:3px;color:var(--muted);font-size:10px}.search-price{font-weight:700}
.card-dialog { position:relative;width:min(1050px,96vw);min-height:640px;border-radius:20px;background:#101725;color:#fff;box-shadow:0 35px 100px rgba(0,0,0,.55);overflow:hidden; }
.card-modal-layout{position:relative;display:grid;grid-template-columns:minmax(390px,1fr) 390px;min-height:640px}.card-stage{position:relative;display:grid;place-items:center;padding:54px 65px;background:radial-gradient(circle at 50% 40%,#28334a,#101725 58%)}.modal-card-frame-wrap{display:contents}.modal-card-frame{width:min(340px,70%);max-height:540px;aspect-ratio:5/7;border-radius:15px;box-shadow:0 30px 55px rgba(0,0,0,.45)}.modal-card-image,.modal-card-frame .modal-card-image{display:block;width:100%;height:100%;aspect-ratio:5/7;object-fit:cover;border-radius:inherit}.card-nav-button{position:absolute;top:50%;width:38px;height:52px;border:1px solid rgba(255,255,255,.1);border-radius:9px;background:rgba(255,255,255,.06);color:#fff;cursor:pointer}.card-nav-button.prev{left:18px}.card-nav-button.next{right:18px}.variant-hint{position:absolute;left:50%;transform:translateX(-50%);opacity:.34;font-size:10px}.variant-hint.top{top:22px}.variant-hint.bottom{bottom:22px}.variant-hint button{border:0;background:none;color:#fff;cursor:pointer}.modal-side{background:#fff;color:var(--ink);display:flex;flex-direction:column;min-width:0}.modal-head{position:relative;padding:25px 25px 17px;border-bottom:1px solid var(--line)}.modal-head h2{margin:5px 35px 7px 0;font-size:21px;line-height:1.2}.modal-head p{margin:0;color:var(--muted);font-size:11px}.close-button{width:34px;height:34px;border:0;border-radius:8px;background:#f0f1f4;color:#727986;font-size:24px;line-height:1;cursor:pointer}.card-modal-layout>.close-button{position:absolute;right:17px;top:17px;z-index:5}.modal-price,.modal-set-line,.modal-rarity-line,.modal-quick-menu-wrap,.modal-action-bar,.modal-card-reflection,.stage-backdrop,.stage-platform-wrap,.stage-flare-anchor,.stage-flare-cross,.card-title-sub{display:none}.modal-tabs{display:flex;padding:0 18px;border-bottom:1px solid var(--line)}.modal-tabs button{flex:1;padding:15px 5px 12px;border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);font-size:10px;font-weight:700;cursor:pointer}.modal-tabs button.active{border-color:var(--brand);color:var(--brand)}.modal-content{flex:1;padding:22px 25px;overflow:auto}.variant-selector{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin-bottom:20px}.variant-option{display:flex;align-items:center;gap:8px;padding:8px;border:1px solid var(--line);border-radius:8px;background:#fff;text-align:left;cursor:pointer}.variant-option.active{border-color:#8c82f0;background:#f5f3ff}.variant-option .variant-thumb{flex:0 0 auto;width:28px;height:39px;border-radius:3px}.variant-thumb img{display:block;width:100%;height:100%;object-fit:cover}.variant-option b,.variant-option small{display:block}.variant-option b{font-size:10px}.variant-option small{color:var(--muted);font-size:9.5px}.detail-section{margin-bottom:22px}.detail-section-title{margin-bottom:10px;color:var(--muted);font-size:9px;font-weight:800;letter-spacing:.1em}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.detail-field{padding:11px;border-radius:9px;background:#f6f7f9}.detail-field span,.detail-field b{display:block}.detail-field span{color:var(--muted);font-size:9px}.detail-field b{margin-top:3px;font-size:11px}.modal-quantity{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border:1px solid var(--line);border-radius:10px}.modal-quantity .controls{display:flex;align-items:center;border:1px solid var(--line);border-radius:8px;overflow:hidden}.modal-quantity button{width:34px;height:32px;border:0;background:#f5f6f8;cursor:pointer;font-size:17px}.modal-quantity .controls b{min-width:35px;text-align:center}.modal-watch{width:100%;margin-top:10px}.price-hero{padding:17px;border-radius:12px;background:#111a2d;color:#fff}.price-hero span,.price-hero b{display:block}.price-hero span{color:#8490a6;font-size:9px;text-transform:uppercase}.price-hero b{margin-top:3px;font:800 27px "Manrope"}.price-hero small{color:#39c894}.price-bars{display:flex;align-items:end;gap:5px;height:100px;margin-top:18px;padding-top:10px;border-bottom:1px solid var(--line)}.price-bars i{flex:1;min-height:10px;border-radius:3px 3px 0 0;background:#8d84ee}
.price-history{margin-top:14px;padding:14px 15px 4px;border:1px solid var(--line);border-radius:12px}.price-history-loading,.price-history-empty{padding:20px 0;color:var(--muted);font-size:11px;text-align:center}.price-history-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:8px}.price-history-head>span{color:var(--muted);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.price-history-delta{font-size:12px;font-weight:800;white-space:nowrap}.price-history-delta.up{color:var(--success)}.price-history-delta.down{color:var(--danger)}.price-history-delta.flat{color:var(--muted)}.price-history-chart{width:100%}.price-history-chart svg{display:block;width:100%;height:88px;overflow:visible}.price-history-area{fill:var(--brand);fill-opacity:.14;stroke:none}.price-history-line{fill:none;stroke:var(--brand);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}.price-history-point{fill:var(--brand);opacity:.5;transition:opacity .15s}.price-history-point:hover{opacity:1}.price-history-range{display:flex;justify-content:space-between;margin:6px 0 4px;color:var(--muted);font-size:9px;font-weight:700}
.rules-text{line-height:1.6;color:#525a68}.relationship{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}.relationship span{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:#f0eeff;color:var(--brand)}.relationship b,.relationship small{display:block}.relationship b{font-size:11px}.relationship small{margin-top:2px;color:var(--muted);font-size:9px}
.language-switcher{display:flex;gap:5px;margin-top:12px}.language-switcher button{min-width:38px;padding:6px 10px;border:1px solid var(--line);border-radius:7px;background:transparent;color:var(--muted);font-size:10px;font-weight:800;cursor:pointer}.language-switcher button.active{border-color:rgba(140,130,240,.35);background:#f5f3ff;color:var(--brand)}
.price-source-link{display:flex;align-items:center;gap:11px;margin-top:14px;padding:12px 13px;border:1px solid var(--line);border-radius:9px;color:var(--ink);text-decoration:none;background:var(--surface-2);transition:.18s}.price-source-link:hover{border-color:var(--brand);background:#201e3d}.price-source-link span:first-child{display:grid;place-items:center;width:28px;height:28px;border-radius:7px;background:#302c61;color:#b9b2ff}.price-source-link div{flex:1}.price-source-link b,.price-source-link small{display:block}.price-source-link b{font-size:10px}.price-source-link small{margin-top:2px;color:var(--muted);font-size:9.5px}.price-source-link>span:last-child{color:var(--brand-2)}
.utility-dialog { width:min(780px,95vw);padding:26px;border-radius:18px;background:#fff;box-shadow:0 30px 90px rgba(0,0,0,.3); }.dialog-head{display:flex;align-items:flex-start;margin-bottom:24px}.dialog-head h2{margin:0;font-size:24px}.dialog-head .close-button{margin-left:auto}.import-form-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:10px}.utility-dialog label{display:flex;flex-direction:column;gap:6px;color:#575f6c;font-size:10px;font-weight:700}.utility-dialog select,.utility-dialog textarea{border:1px solid var(--line);border-radius:9px;background:#fff;outline:none}.utility-dialog select{height:38px;padding:0 9px}.import-mode-toggle{width:fit-content;margin-bottom:18px}.importexport-toggle{width:fit-content;margin-bottom:20px}.import-text-label{margin-top:15px}.utility-dialog textarea{padding:13px;resize:vertical;font:12px/1.6 monospace}.utility-dialog input[type="file"]{padding:8px 0;font-size:11px;color:var(--muted)}.json-filename{margin-left:6px;font-weight:700;color:var(--ink)}.format-help{margin:8px 0 15px;color:var(--muted);font-size:10px}.format-help code,.demo-hint code{padding:2px 5px;border-radius:4px;background:#f1f2f5}.import-preview{display:none;max-height:230px;overflow:auto;border:1px solid var(--line);border-radius:10px}.import-preview.visible{display:block}.import-row{display:grid;grid-template-columns:30px 1fr 90px;gap:10px;align-items:center;padding:9px 11px;border-bottom:1px solid var(--line);font-size:10px}.import-row:last-child{border:0}.import-row b,.import-row small{display:block}.import-row small{margin-top:2px;color:var(--muted)}.import-status{padding:4px 7px;border-radius:5px;text-align:center;font-size:9.5px;font-weight:800;text-transform:uppercase}.import-status.matched{background:#e7f8f1;color:#12805b}.import-status.ambiguous{background:#fff4d9;color:#986600}.import-status.not_found{background:#feecec;color:#b4232a}.dialog-actions{display:flex;align-items:center;gap:9px;margin-top:18px}.dialog-actions .spacer{flex:1}.radio-label{display:flex!important;flex-direction:row!important;align-items:center;gap:5px!important}.export-options{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px}.export-card{display:flex;align-items:center;gap:13px;padding:18px;border:1px solid var(--line);border-radius:12px;color:var(--ink);text-decoration:none;transition:.18s}.export-card:hover{border-color:#9b93ed;background:#f7f6ff;transform:translateY(-2px)}.file-icon{display:grid;place-items:center;width:43px;height:43px;border-radius:9px;background:#eceaff;color:var(--brand);font-weight:800}.export-card div{flex:1}.export-card b,.export-card small{display:block}.export-card b{font-size:12px}.export-card small{margin-top:3px;color:var(--muted);font-size:9px}
.collection-table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid var(--line);border-radius:13px;background:#fff;overflow:hidden}.collection-table th{padding:11px 14px;background:#f6f7f9;color:var(--muted);font-size:9px;text-align:left;text-transform:uppercase;letter-spacing:.07em}.collection-table td{padding:11px 14px;border-top:1px solid var(--line);font-size:11px}.table-card{display:flex;align-items:center;gap:10px}.table-card img{width:32px;height:45px;object-fit:cover;border-radius:4px}.table-card b,.table-card small{display:block}.table-card small{margin-top:3px;color:var(--muted);font-size:9px}.watch-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.watch-row{display:flex;align-items:center;gap:14px;padding:13px;border:1px solid var(--line);border-radius:13px;background:#fff;cursor:pointer}.watch-row img{width:55px;height:77px;object-fit:cover;border-radius:6px;box-shadow:0 4px 10px #ccd0d9}.watch-info{flex:1}.watch-info b,.watch-info small{display:block}.watch-info b{font-size:12px}.watch-info small{margin-top:4px;color:var(--muted);font-size:9px}.watch-price{text-align:right}.watch-price b,.watch-price small{display:block}.watch-price small{margin-top:3px;color:var(--success);font-size:9px}
.compact-page-head{margin-bottom:18px}.compact-page-head h1{font-size:26px}.browser-summary{display:flex;align-items:stretch;gap:1px;margin-bottom:13px;padding:5px;border:1px solid var(--line);border-radius:11px;background:var(--surface)}.browser-summary>div:not(.browser-summary-actions){min-width:120px;padding:8px 12px;border-right:1px solid var(--line)}.browser-summary span,.browser-summary b{display:block}.browser-summary span{color:var(--muted);font-size:9.5px;font-weight:800;letter-spacing:.08em}.browser-summary b{margin-top:2px;font:800 13px "Manrope"}.browser-summary-actions{display:flex;align-items:center;gap:7px;margin-left:auto;padding-right:5px}.browser-toolbar{padding:10px;border:1px solid var(--line);border-radius:11px;background:var(--surface)}.browser-toolbar .select-control{max-width:170px}.list-tabs{display:flex;gap:7px;margin:-4px 0 12px;overflow:auto;padding-bottom:2px}.list-tabs button{display:flex;align-items:center;gap:12px;min-width:145px;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);color:var(--muted);cursor:pointer;text-align:left}.list-tabs button.active{border-color:var(--brand);background:#211e3e;color:var(--ink)}.list-tabs b,.list-tabs span{display:block}.list-tabs b{font-size:10px}.list-tabs span{margin-left:auto;font-size:9.5px;white-space:nowrap}.danger-button{min-height:40px;padding:0 13px;border:1px solid #5c2932;border-radius:9px;background:#2b171e;color:#ff9da6;font-weight:700;cursor:pointer}.watchlist-picker{display:grid;grid-template-columns:1fr auto;gap:7px;margin-top:9px}.watchlist-picker .modal-watch{margin-top:0}
.advanced-toggle{width:100%;margin-top:10px}
.advanced-panel{margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}.advanced-panel.hidden{display:none}
.condition-rows{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}
.condition-row{display:flex;align-items:center;justify-content:space-between;padding:8px 11px;border:1px solid var(--line);border-radius:8px;font-size:10px}
.condition-row .controls,.graded-row .controls{display:flex;align-items:center;border:1px solid var(--line);border-radius:7px;overflow:hidden}
.condition-row .controls button,.graded-row .controls button{width:27px;height:27px;border:0;background:#f5f6f8;cursor:pointer;font-size:14px}
.condition-row .controls button:disabled{opacity:.35;cursor:default}
.condition-row .controls b,.graded-row .controls b{min-width:26px;text-align:center;font-size:10px}
.graded-rows{display:flex;flex-direction:column;gap:8px;margin-bottom:10px}
.graded-row{display:grid;grid-template-columns:1fr auto 100px;align-items:center;gap:8px;padding:9px 11px;border:1px solid var(--line);border-radius:8px}
.graded-row-label b{display:block;font-size:10px}.graded-row-label small{color:var(--muted);font-size:9.5px}
.graded-price-input{height:30px;padding:0 8px;border:1px solid var(--line);border-radius:6px;font-size:9px}
.graded-add-form{display:flex;flex-direction:column;gap:8px;margin-top:10px}.graded-add-form.hidden{display:none}
.graded-add-form input,.graded-add-form select{height:34px;padding:0 10px;border:1px solid var(--line);border-radius:7px;font-size:10px}
.deck-page-head{display:flex;align-items:center;margin-bottom:15px}.deck-page-head h1{margin:0;font-size:25px}.deck-page-head .primary-button{margin-left:auto}.deck-shell{display:grid;grid-template-columns:190px minmax(420px,1fr) 330px;gap:12px;align-items:start}.deck-list-panel,.deck-editor,.deck-catalog{border:1px solid var(--line);border-radius:13px;background:var(--surface);overflow:hidden}.deck-list-title{display:flex;padding:13px;color:var(--muted);font-size:9.5px;font-weight:800;letter-spacing:.08em}.deck-list-title span{margin-left:auto}.deck-list-item{display:flex;align-items:center;gap:9px;width:100%;padding:11px;border:0;border-top:1px solid var(--line);background:transparent;color:var(--ink);text-align:left;cursor:pointer}.deck-list-item:hover,.deck-list-item.active{background:#1b2435}.deck-list-item.active{box-shadow:inset 2px 0 var(--brand)}.deck-color{width:5px;height:34px;border-radius:4px}.deck-list-item div{min-width:0}.deck-list-item b,.deck-list-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.deck-list-item b{font-size:10px}.deck-list-item small{margin-top:3px;color:var(--muted);font-size:9.5px}.deck-editor-head{display:flex;align-items:center;gap:8px;padding:13px;border-bottom:1px solid var(--line)}.deck-editor-head>div{flex:1}.deck-editor-head input{display:block;width:100%;padding:0;border:0;background:transparent;color:var(--ink);font:800 17px "Manrope";outline:none}.deck-editor-head span{color:var(--muted);font-size:9.5px}.deck-editor-head a{color:#9d94ff;font-size:9.5px;text-decoration:none}.deck-validation{display:flex;align-items:center;gap:10px;margin:12px;padding:11px;border-radius:9px}.deck-validation.valid{background:#103126;color:#87e8c1}.deck-validation.invalid{background:#321d24;color:#ffadb4}.validation-icon{display:grid;place-items:center;width:27px;height:27px;border:1px solid currentColor;border-radius:50%;font-weight:800}.deck-validation div{flex:1}.deck-validation b,.deck-validation small{display:block}.deck-validation b{font-size:10px}.deck-validation small{margin-top:2px;opacity:.75;font-size:9.5px}.validation-count{font-size:9.5px}.zone-tabs{display:flex;padding:0 12px;border-bottom:1px solid var(--line)}.zone-tabs button{display:flex;gap:8px;padding:10px 12px;border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);cursor:pointer;font-size:9px}.zone-tabs button.active{border-color:var(--brand);color:var(--ink)}.zone-tabs b{color:var(--brand-2)}.deck-zone-head{display:flex;align-items:center;padding:14px 15px 8px}.deck-zone-head .eyebrow{margin:0}.deck-zone-head h2{margin:2px 0 0;font-size:15px}.deck-errors{display:flex;flex-direction:column;gap:2px;margin-left:auto;color:#ff9da6;font-size:9px;text-align:right}.deck-errors .warning{color:#f9c66d}.deck-card-list{padding:0 12px 13px;min-height:270px}.deck-card-row{display:flex;align-items:center;gap:9px;padding:7px;border-bottom:1px solid var(--line);cursor:pointer}.deck-card-row img{width:29px;height:41px;object-fit:cover;border-radius:3px}.deck-card-row>div:nth-child(2){flex:1;min-width:0}.deck-card-row b,.deck-card-row small{display:block}.deck-card-row b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px}.deck-card-row small{margin-top:2px;color:var(--muted);font-size:9px}.deck-card-price{color:var(--muted);font-size:9.5px}.deck-qty{display:flex!important;align-items:center;border:1px solid var(--line);border-radius:6px;overflow:hidden}.deck-qty button{width:26px;height:27px;border:0;background:var(--surface-2);color:var(--ink);cursor:pointer}.deck-qty b{min-width:24px;text-align:center}.deck-zone-empty{display:grid;place-items:center;height:200px;color:var(--muted);font-size:10px}.deck-catalog{position:sticky;top:88px;max-height:calc(100vh - 110px)}.deck-catalog-title{padding:13px;border-bottom:1px solid var(--line)}.deck-catalog-title div{display:flex}.deck-catalog-title b{font-size:11px}.deck-catalog-title span{margin-left:auto;color:var(--muted);font-size:9.5px}.deck-filter-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:9px;border-bottom:1px solid var(--line)}.deck-filter-grid .filter-search{grid-column:1/-1}.deck-filter-grid .filter-search input{width:100%}.deck-filter-grid .select-control{width:100%;min-width:0}.catalog-card-list{max-height:calc(100vh - 315px);overflow:auto;padding:5px}.catalog-card{display:flex;align-items:center;gap:8px;padding:6px;border-radius:7px}.catalog-card:hover{background:var(--surface-2)}.catalog-card img{width:30px;height:42px;object-fit:cover;border-radius:3px}.catalog-card div{flex:1;min-width:0}.catalog-card b,.catalog-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.catalog-card b{font-size:9.5px}.catalog-card small{margin-top:2px;color:var(--muted);font-size:9px}.catalog-card button{width:27px;height:27px;border:0;border-radius:6px;background:#292450;color:#bdb7ff;cursor:pointer}.deck-empty{display:grid;place-items:center;max-width:560px;margin:80px auto;padding:55px;border:1px solid var(--line);border-radius:16px;background:var(--surface);text-align:center}.deck-empty>span{font-size:40px;color:var(--brand-2)}.deck-empty h2{margin:12px 0 6px}.deck-empty p{color:var(--muted)}
.toast-stack{position:fixed;right:24px;bottom:24px;z-index:200;display:flex;flex-direction:column;gap:8px}.toast{display:flex;align-items:center;gap:13px;min-width:285px;padding:13px 15px;border-radius:11px;background:#131a29;color:#fff;box-shadow:0 15px 35px rgba(0,0,0,.3);animation:toastIn .24s ease}.toast span{flex:1;font-size:11px}.toast button{border:0;background:transparent;color:#a99fff;font-weight:700;cursor:pointer;font-size:10px}@keyframes toastIn{from{transform:translateY(15px);opacity:0}}
.login-body{background:#0c1221}.login-shell{display:grid;grid-template-columns:1.25fr .75fr;min-height:100vh}.login-art{position:relative;overflow:hidden;padding:36px 43px;color:#fff;background:radial-gradient(circle at 64% 35%,#4f46a9 0,#1d2754 29%,#0d152b 68%)}.login-brand{display:flex;align-items:center;gap:10px;font:800 18px "Manrope"}.login-quote{position:absolute;left:8%;bottom:10%;z-index:4}.login-quote h1{margin:0 0 19px;font-size:clamp(36px,4vw,64px);line-height:1.08}.login-quote p{max-width:520px;color:#909bb0;font-size:15px;line-height:1.6}.orbit{position:absolute;border:1px solid rgba(255,255,255,.09);border-radius:50%}.orbit-one{width:650px;height:650px;right:-100px;top:-120px;box-shadow:0 0 0 75px rgba(255,255,255,.015),0 0 0 150px rgba(255,255,255,.009)}.orbit-two{width:240px;height:240px;left:18%;top:20%;}.floating-card{position:absolute;z-index:2;width:170px;height:238px;padding:20px;border:1px solid rgba(255,255,255,.17);border-radius:16px;background:linear-gradient(145deg,rgba(255,255,255,.18),rgba(255,255,255,.04));box-shadow:0 25px 50px rgba(0,0,0,.27);backdrop-filter:blur(5px);transform:rotate(8deg)}.floating-card:after{content:"";position:absolute;inset:55px 20px 65px;border-radius:50%;background:radial-gradient(circle,#ac9eff,#6557da 40%,transparent 42%);opacity:.75}.floating-card span{font-size:9px;letter-spacing:.15em;opacity:.6}.floating-card b{position:absolute;bottom:18px;left:20px;font:700 18px "Manrope"}.card-a{right:15%;top:9%;}.card-b{right:39%;top:21%;transform:rotate(-12deg);opacity:.75}.card-c{right:3%;top:30%;transform:rotate(17deg);opacity:.48}.login-panel{position:relative;display:grid;place-items:center;padding:40px;background:#fff}.login-form{width:min(365px,100%)}.login-form h2{margin:0 0 8px;font-size:29px}.login-form>p{margin-bottom:27px}.login-form label{display:flex;flex-direction:column;gap:7px;margin:15px 0;color:#414855;font-size:11px;font-weight:700}.login-form input{height:43px;padding:0 13px;border:1px solid var(--line);border-radius:9px;outline:none}.login-form input:focus{border-color:#8a80ec;box-shadow:0 0 0 3px #eeecff}.login-button{display:flex;align-items:center;justify-content:space-between;width:100%;height:45px;margin-top:23px}.demo-hint{display:flex;justify-content:center;gap:6px;margin-top:17px;color:var(--muted);font-size:10px}.demo-hint>span:first-child{margin-right:5px}.form-error{padding:10px;border-radius:8px;background:#feecec;color:#b4232a;font-size:11px}.login-footer{position:absolute;bottom:18px;color:#a0a6b1;font-size:9px}.login-mobile-brand{display:none}.login-oauth-divider{display:flex;align-items:center;gap:10px;width:min(365px,100%);margin:19px 0;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.08em}.login-oauth-divider:before,.login-oauth-divider:after{content:"";flex:1;height:1px;background:var(--line)}.login-oauth-button{display:flex;align-items:center;justify-content:center;width:min(365px,100%);height:45px;text-decoration:none;text-align:center}
body.dark{--bg:#090e19;--surface:#131b2a;--surface-2:#0e1625;--ink:#edf1f8;--muted:#8893a8;--line:#253047;color-scheme:dark}.dark .topbar{background:rgba(10,16,28,.92)}.dark .global-search,.dark .small-button,.dark .icon-button,.dark .secondary-button,.dark .filter-search input,.dark .select-control,.dark .segmented button.active,.dark .variant-option,.dark .utility-dialog,.dark .modal-side,.dark .collection-table,.dark .watch-row{background:var(--surface);color:var(--ink)}.dark .global-search kbd,.dark .search-input-wrap kbd{background:#1e293b;border-color:#334155}.dark .badge,.dark .detail-field,.dark .modal-quantity button{background:#1c2637}.dark .search-dialog{background:var(--surface)}.dark .card-image-wrap{background:#1c2637}.dark .progress-track,.dark .mini-progress{background:#273144}.dark .segmented{background:#0c1422}.dark .search-result{color:var(--ink)}.dark .search-result:hover{background:#1d2540}.dark .login-panel{background:#0c1320}.dark .login-form input,.dark .utility-dialog select,.dark .utility-dialog textarea{background:#111a29;border-color:#29364b;color:var(--ink)}.dark .login-footer{color:#667187}.dark .rules-text{color:#aab3c2}.dark .price-hero{background:#080e1a}.dark .form-error{background:#3a1c25;color:#ff9da3}
@media(max-width:1050px){.game-grid{grid-template-columns:repeat(2,1fr)}.game-grid .game-tile:last-child{grid-column:1/-1}.set-grid{grid-template-columns:repeat(2,1fr)}.hero-summary{display:none}.card-modal-layout{grid-template-columns:1fr 360px}.watch-grid{grid-template-columns:1fr}}
@media(max-width:760px){.app-shell{padding-left:0}.sidebar{transform:translateX(-100%);transition:.25s}.topbar{height:62px;padding:0 14px}.global-search{flex:1;margin-left:8px}.global-search span:nth-child(2){font-size:0}.global-search span:nth-child(2):after{content:"Suchen";font-size:11px}.global-search kbd{display:none}.top-actions .small-button,.top-actions .icon-button{display:none}.content{padding:24px 16px 60px}.dashboard-hero{padding:27px 24px;min-height:230px}.dashboard-hero h1{font-size:29px}.game-grid{grid-template-columns:1fr}.game-grid .game-tile:last-child{grid-column:auto}.activity-row{grid-template-columns:1fr}.set-grid{grid-template-columns:1fr}.game-banner{padding:20px}.game-banner .banner-value{display:none}.toolbar{align-items:flex-start;flex-wrap:wrap}.toolbar-spacer{display:none}.stats-bar{grid-template-columns:repeat(3,1fr)}.stat-box:nth-child(4),.stat-box:nth-child(5){display:none}.card-toolbar{align-items:stretch}.filter-search{width:100%}.filter-search input{width:100%}.card-grid{grid-template-columns:repeat(auto-fill,minmax(115px,1fr));gap:13px}.card-info b{font-size:10px}.overlay{padding:0}.card-dialog{width:100%;min-height:100vh;border-radius:0}.card-modal-layout{display:block}.card-stage{height:49vh;min-height:390px;padding:45px}.modal-card-image{height:88%;width:auto}.modal-side{min-height:51vh}.card-nav-button{top:46%}.modal-head .close-button{position:fixed;top:14px;right:14px;z-index:20;box-shadow:0 4px 14px rgba(0,0,0,.4)}.utility-dialog{width:100%;min-height:100vh;border-radius:0;padding:22px}.import-form-grid{grid-template-columns:1fr 1fr}.import-form-grid label:last-child{grid-column:1/-1}.dialog-actions{flex-wrap:wrap}.dialog-actions .spacer{display:none}.export-options{grid-template-columns:1fr}.collection-table th:nth-child(3),.collection-table td:nth-child(3),.collection-table th:nth-child(4),.collection-table td:nth-child(4){display:none}.login-shell{display:block}.login-art{display:none}.login-panel{min-height:100vh;padding:28px}.login-mobile-brand{position:absolute;top:28px;left:28px;display:flex;align-items:center;gap:9px;font:800 17px "Manrope"}.login-footer{bottom:14px}.toast-stack{left:12px;right:12px;bottom:12px}.toast{min-width:0}.page-head{align-items:flex-start;flex-direction:column}.page-head-actions{margin-left:0}.zoom-control{display:none}}
@media(max-width:1050px){.compact-stat:nth-child(2),.compact-stat:nth-child(3){display:none}}
@media(max-width:1250px){.deck-shell{grid-template-columns:155px minmax(380px,1fr) 280px}.deck-catalog{position:static}.browser-toolbar .select-control{max-width:145px}}
@media(max-width:760px){.app-shell,body.sidebar-collapsed .app-shell{padding-left:0}.sidebar,body.sidebar-collapsed .sidebar{width:248px;padding:25px 17px 18px;transform:translateX(-100%)}.sidebar-collapse{display:none}body.sidebar-collapsed .brand>span:last-child,body.sidebar-collapsed .nav-item:not([role="menuitem"])>span:not(.nav-icon),body.sidebar-collapsed .sidebar-label,body.sidebar-collapsed .edit-panel,body.sidebar-collapsed .user-menu-info,body.sidebar-collapsed .user-menu>form{display:initial}body.sidebar-collapsed .nav-item{justify-content:flex-start;padding:0 13px}.content{padding-top:18px}.set-compact-head{align-items:flex-start;padding:11px 13px}.set-compact-title h1{white-space:normal;font-size:17px}.compact-stats{margin-left:auto}.compact-stat{min-width:65px}.compact-stat:not(:first-child):not(.value){display:none}.compact-stat.value{min-width:82px}.compact-badges{display:none}}
@media(max-width:900px){.deck-shell{grid-template-columns:1fr}.deck-list-panel{display:flex;overflow:auto}.deck-list-title{min-width:130px;align-items:center}.deck-list-item{min-width:150px;border-top:0;border-left:1px solid var(--line)}.deck-catalog{max-height:none}.catalog-card-list{max-height:420px}.browser-summary{overflow:auto}.browser-toolbar .select-control{max-width:none}.global-game-filter{min-width:105px}}
@media(max-width:420px){.card-grid{grid-template-columns:repeat(2,1fr)}.card-modal-layout{grid-template-columns:1fr}.modal-tabs button{font-size:9px}.watch-row{gap:10px}.watch-row img{width:45px;height:63px}}

/* Graphite visual system -------------------------------------------------- */
body.dark {
  --bg:#080a0e;
  --surface:#14181e;
  --surface-2:#1a1f26;
  --surface-3:#20262e;
  --ink:#f2f5fa;
  --muted:#a4acb8;
  --line:#0b0e13;
  --brand:#afbed2;
  --brand-2:#d7e2f1;
  --dark:#0d1015;
  --success:#7fc7aa;
  --warning:#d7ba78;
  --danger:#ff8f8f;
  --shadow:0 18px 55px rgba(0,0,0,.34);
  color:var(--ink);
  background:#080a0e;
  color-scheme:dark;
}

body.dark { background:radial-gradient(circle at 78% -8%,rgba(76,99,132,.075),transparent 31%),radial-gradient(circle at 8% 68%,rgba(53,69,92,.045),transparent 36%),linear-gradient(135deg,#080a0e 0%,#090c11 54%,#07090d 100%);background-attachment:fixed; }
.dark .content { background:transparent; }
.dark h1,.dark h2,.dark h3,.dark h4,.dark strong,.dark b { color:var(--ink); }
.dark p,.dark small,.dark label { color:var(--muted); }
.dark a { color:var(--brand-2); }

/* New brand mark */
.brand { min-height:44px;gap:10px;padding:0 10px 25px 7px; }
.brand-symbol { flex:0 0 38px;width:38px;height:38px;overflow:visible; }
.brand-symbol :is(.brand-card-back,.brand-card-front,.brand-card-line) { fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round; }
.brand-card-back { opacity:.34;stroke-width:1.35; }
.brand-card-front { stroke-width:1.65; }
.brand-card-line { color:var(--brand);stroke-width:1.45; }
.brand-card-spark { fill:var(--brand); }
.brand-word { display:flex;align-items:baseline;gap:3px;font:700 14px/1 "Manrope",sans-serif;letter-spacing:.13em; }
.brand-word b { color:#f2f5fa;font-weight:800; }
.brand-word span { color:var(--brand);font-weight:600; }
.sidebar-collapse { right:-13px;top:50%;width:23px;height:23px;border:0;border-radius:50%;background:#1b2027;color:#b5bfcd;box-shadow:0 2px 8px rgba(0,0,0,.35);transform:translateY(-50%); }
.sidebar-collapse:hover { background:#242b34;color:#fff; }
body.sidebar-collapsed .sidebar-collapse { transform:translateY(-50%) rotate(180deg); }
body.sidebar-collapsed .brand { padding:0 0 25px 0; }
body.sidebar-collapsed .brand-symbol { width:36px;height:36px;flex-basis:36px; }
body.sidebar-collapsed .brand>.brand-word { display:none; }

/* Shell and navigation */
.dark .sidebar { background:#0d1015;color:var(--ink);box-shadow:10px 0 34px rgba(0,0,0,.3); }
.dark .nav-item { color:#a4acb8; }
.dark .nav-item:hover { color:#f3f6fb;background:rgba(142,167,200,.055); }
.dark .nav-item.active { color:#fff;background:#1c222a;box-shadow:inset 2px 0 var(--brand); }
.dark .sidebar-label { color:#69717d; }
.dark .count-badge { background:#1b2633;color:#c9d7e8; }
.dark .edit-panel { border-color:transparent;background:#15191f;box-shadow:inset 0 0 0 1px #090c10; }
.dark .edit-panel p,.dark .user-menu small { color:#8f98a5; }
.dark .edit-panel.on { border-color:transparent;background:#1b222b;box-shadow:inset 0 0 0 1px rgba(175,190,210,.13); }
.dark .edit-panel.on .status-dot { background:var(--brand);box-shadow:0 0 0 4px rgba(175,190,210,.11); }
.dark .switch { background:#30363e; }.dark .switch[aria-checked="true"] { background:#74869d; }
.dark .user-menu { border-color:var(--line); }
.dark .user-menu>form button { color:#a4acb8; }
.dark .avatar { background:#202731;color:#d9e3ef;box-shadow:inset 0 0 0 1px #0c1015; }
.dark .topbar { border:0;background:rgba(12,15,20,.9);box-shadow:0 10px 32px rgba(0,0,0,.22);backdrop-filter:blur(18px); }

/* Controls: clear text, subtle structure */
.dark :is(.global-search,.global-game-filter,.small-button,.icon-button,.secondary-button,.filter-search input,.select-control,.segmented,.segmented button.active,.utility-dialog select,.utility-dialog textarea,.login-form input) {
  border-color:var(--line);background:var(--surface-2);color:var(--ink);
}
.dark :is(input,select,textarea)::placeholder { color:#747d89;opacity:1; }
.dark :is(input,select,textarea):focus { border-color:#090c10!important;box-shadow:0 0 0 3px rgba(118,142,174,.12)!important; }
.dark .global-search { color:#b3bdca; }
.dark .global-search kbd,.dark .search-input-wrap kbd { border-color:#0c1015;background:#222832;color:#bbc6d3;box-shadow:none; }
.dark .primary-button { background:var(--brand);color:#10151c;box-shadow:0 8px 22px rgba(0,0,0,.25); }
.dark .primary-button:hover { background:#c2cede; }
.dark .small-button.active { border-color:#0b0e13;background:#222a34;color:#d4dfed; }
.dark .edit-indicator { background:#202a36;color:#cfdaea; }
.dark .danger-button { border-color:rgba(255,143,143,.12);background:#211616;color:#ffaaa6; }

/* Dashboard */
.dark .dashboard-hero { display:flex;flex-direction:column;gap:22px;min-height:168px;padding:29px 33px;border:0;background:linear-gradient(118deg,#11151b 0%,#151a22 62%,#111720 100%);box-shadow:0 12px 36px rgba(0,0,0,.22); }
.dark .dashboard-hero:before,.dark .dashboard-hero:after { display:none; }
.dark .hero-top { align-items:end;gap:48px; }
.dark .hero-copy { min-width:0; }
.dark .dashboard-hero h1 { margin-bottom:7px;font-size:29px; }
.dark .dashboard-hero p { max-width:590px;color:#aab4c1; }
.dark .hero-summary { gap:24px; }
.dark .hero-summary b { font-size:17px; }.dark .hero-summary span { color:#8f9aa8;font-size:9px; }
.dark .home-banner { border-top-color:rgba(255,255,255,.08); }
.dark .eyebrow { color:var(--brand); }.dark .eyebrow.light { color:#c3cedc; }
.dark .game-tile { min-height:190px;border:0;background:transparent;box-shadow:inset 0 0 0 1px var(--line); }
.dark .game-tile:hover { box-shadow:inset 0 0 0 1px var(--line),0 10px 24px rgba(0,0,0,.28); }
.dark .game-visual { display:flex;justify-content:center;align-items:center;height:110px;padding:16px;background:transparent;color:var(--ink); }
.dark .game-visual:before { display:none; }
.game-logo { display:block;width:min(210px,80%);height:76px;object-fit:contain; }
.dark .game-info { padding:14px 18px 18px;background:var(--surface-2); }
.dark .game-main-stat { margin-bottom:9px; }.dark .game-main-stat b { font-size:16px; }.dark .game-main-stat span { color:#929daa; }
.dark .game-stats { color:#8f99a6;font-size:11px; }.dark .game-stats b { color:#e8edf5; }
.dark .progress-track,.dark .mini-progress { background:#252b33; }
.dark .progress-track span,.dark .mini-progress i { background:var(--brand); }
.dark .activity-card { border:0;background:transparent;box-shadow:none;padding:10px 2px; }
.dark .activity-icon { background:transparent;color:var(--brand); }

/* Top navigation controls use a separator darker than the controls themselves. */
.dark .topbar :is(.global-search,.global-game-filter) { border-color:#080b0f;background:rgba(26,31,38,.96);box-shadow:none; }

/* Game and set overview */
.dark .game-banner { border:0;background:linear-gradient(110deg,#1b2027,#10141a);box-shadow:inset 0 0 0 1px #0a0d11; }
.dark .game-banner-symbol { width:92px;height:46px;border:0;border-radius:0;background:transparent; }
.game-banner-symbol img { display:block;width:100%;height:100%;object-fit:contain; }
.dark .game-banner p,.dark .banner-value span { color:#98a3b0; }
.dark .set-card { border:0;background:var(--surface);box-shadow:0 7px 24px rgba(0,0,0,.22),inset 0 0 0 1px #0a0d11; }
.dark .set-card:hover { box-shadow:0 17px 36px rgba(0,0,0,.38),inset 0 0 0 1px #0c1015; }
.dark .set-art { display:grid;grid-template-columns:1fr auto;grid-template-rows:1fr auto;align-items:center;height:116px;padding:16px 18px;background:linear-gradient(145deg,#1c222a,#101419);color:var(--ink);box-shadow:inset 0 -1px #0b0e13; }
.dark .set-art:before { display:none; }
.set-brand-logo { position:absolute;inset:0;display:block;width:100%;height:100%;padding:7px 12px 20px;object-fit:contain;object-position:center;opacity:.96; }
.dark .set-art:after { content:"";position:absolute;inset:auto 0 0;height:43%;background:linear-gradient(transparent,rgba(8,11,15,.88));pointer-events:none; }
.set-code { position:relative;z-index:2;grid-column:1;grid-row:2;align-self:end;color:#e0e7f0;font-size:10px;letter-spacing:.08em;opacity:1; }
.set-kind { position:relative;z-index:2;grid-column:2;grid-row:2;align-self:end;color:#a9b4c1;font-size:9px;text-transform:none; }
.dark .set-card-info { background:var(--surface); }
.dark .set-card h3 { color:#eef3f9; }
.dark .badge { background:#20262e;color:#b8c2cf; }
.dark .set-completion { border-color:var(--line); }
.dark .stats-bar,.dark .set-compact-head { border:0;background:var(--surface);box-shadow:inset 0 0 0 1px #0a0d11; }
.dark .stat-box { border-color:var(--line); }
.dark .compact-stat { background:#1c2128; }
.dark .set-group-head{border-bottom-color:#0b0e13}.dark .set-group-head h3{color:#eef3f9}.dark .set-group-head span{color:#8f99a6}.dark .set-card-divider{border-bottom-color:#0b0e13}.dark .set-card-divider img{filter:drop-shadow(0 3px 8px rgba(0,0,0,.42))}.dark .card-toolbar-sticky{background:rgba(20,24,30,.94);backdrop-filter:blur(13px)}

/* Card browser and collection */
.dark .browser-toolbar,.dark .browser-summary { border:0;background:var(--surface);box-shadow:inset 0 0 0 1px #0a0d11; }
.dark .browser-summary>div:not(.browser-summary-actions) { border-color:var(--line); }
.dark .card-image-wrap { background:#20262e;box-shadow:0 7px 18px rgba(0,0,0,.34); }
.dark .card-tile:hover .card-image-wrap { box-shadow:0 16px 28px rgba(0,0,0,.48); }
.dark .owned-pill,.dark .watch-button,.dark .quick-add,.dark .quantity-control { background:rgba(13,17,22,.92); }
.dark .quick-add.foil,.dark .quantity-control.foil { background:linear-gradient(120deg,#7a4e0e,#f7d67a 42%,#a8721c 58%,#ffe9ab); }
.dark .watchlist-action.active { background:#dfe7f1;color:#9e4657; }
.dark .card-info b { color:#edf2f8; }.dark .card-subline { color:#a3acb8; }
.dark .variant-chip { background:#202a35;color:#cad7e6; }
.dark .collection-table { border:0;background:var(--surface);box-shadow:inset 0 0 0 1px #0a0d11; }
.dark .collection-table th { background:#191e25;color:#a3acb8; }
.dark .collection-table td { border-color:var(--line);color:var(--ink); }
.dark .watch-row { border:0;background:var(--surface);box-shadow:inset 0 0 0 1px #0a0d11; }
.dark .watch-row img { box-shadow:0 5px 15px rgba(0,0,0,.38); }
.dark .list-tabs button { border-color:transparent;background:#181d23;color:#a3acb8;box-shadow:inset 0 0 0 1px #090c10; }
.dark .list-tabs button.active { border-color:transparent;background:#212a35;color:var(--ink);box-shadow:inset 0 0 0 1px #0b0e13; }

/* Search, dialogs and details */
.dark .overlay { background:rgba(0,0,0,.76); }
.dark .search-dialog,.dark .utility-dialog { border:0;background:#14181e;color:var(--ink);box-shadow:0 35px 100px rgba(0,0,0,.6); }
.dark .search-input-wrap { border-color:var(--line); }.dark .search-input-wrap input { color:var(--ink); }
.dark .search-result { color:var(--ink); }.dark .search-result:hover { background:#20262e; }
.dark .utility-dialog label,.dark .login-form label { color:#c3ccd8; }
.dark .format-help code,.dark .demo-hint code { background:#20262e;color:#d8e1ec; }
.dark .import-preview { border-color:var(--line); }.dark .import-row { border-color:var(--line); }
.dark .export-card { border-color:var(--line);background:#181d23;color:var(--ink); }
.dark .export-card:hover { border-color:#0c1015;background:#1d242d; }
.dark .file-icon { background:#202a35;color:#ccd9e8; }
.dark .card-dialog { border:0;background:#0f1318;color:var(--ink); }
.dark .card-stage { background:radial-gradient(circle at 50% 40%,#282f38,#0e1217 62%); }
.dark .card-nav-button { border-color:#0a0d11;background:rgba(27,33,41,.86); }
.dark .modal-side { background:#14181e;color:var(--ink); }
.dark .modal-head { border-color:var(--line); }.dark .modal-head p { color:#a3acb8; }
.dark .close-button { background:#20262e;color:#c3ccd8; }
.dark .modal-tabs { border-color:var(--line); }.dark .modal-tabs button { color:#a3acb8; }.dark .modal-tabs button.active { color:var(--ink);border-color:var(--brand); }
.dark .detail-section-title { color:#a3acb8; }.dark .rules-text { color:#cbd4df; }
.dark .detail-field,.dark .modal-quantity,.dark .variant-option,.dark .condition-row,.dark .graded-row { border-color:transparent;background:#1b2027;color:var(--ink);box-shadow:inset 0 0 0 1px #0a0d11; }
.dark .advanced-panel { border-color:var(--line); }
.dark .condition-row .controls button,.dark .graded-row .controls button { background:#222832;color:var(--ink); }
.dark .graded-price-input,.dark .graded-add-form input,.dark .graded-add-form select { background:#1b2027;border-color:#0a0d11;color:var(--ink); }
.dark .variant-option.active { border-color:transparent;background:#212a35;box-shadow:inset 0 0 0 1px #0b0e13; }
.dark .language-switcher button { border-color:transparent;background:#1b2027;color:#a3acb8;box-shadow:inset 0 0 0 1px #0a0d11; }
.dark .language-switcher button.active { background:#202a35;color:#d3dfed;box-shadow:inset 0 0 0 1px #0b0e13; }
.dark .modal-quantity button { background:#222832;color:var(--ink); }
.dark .price-hero { background:#0e1217; }.dark .price-hero span { color:#a3acb8; }.dark .price-bars i { background:var(--brand); }.dark .price-source-link { border-color:var(--line);background:#191e25;color:var(--ink); }
.dark .price-source-link:hover { border-color:#0c1015;background:#1e2630; }
.market-metrics { display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px; }
.market-metrics>div { padding:12px;border-radius:9px;background:#191e25;box-shadow:inset 0 0 0 1px #0a0d11; }
.market-metrics span,.market-metrics b { display:block; }
.market-metrics span { color:var(--muted);font-size:9.5px;text-transform:uppercase;letter-spacing:.06em; }
.market-metrics b { margin-top:4px;color:var(--ink);font-size:11px; }
.price-refresh { width:100%;margin-top:10px; }
.manual-price { display:grid;gap:6px;margin-top:12px;padding:12px;border-radius:9px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line); }
.manual-price label { color:var(--muted);font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em; }
.manual-price-row { display:flex;flex-wrap:wrap;align-items:center;gap:8px; }
.manual-price-row .secondary-button { flex:none;padding-inline:14px; }
.manual-price-row input { flex-basis:90px; }
.manual-price-row input { flex:1;min-width:0;height:36px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font-size:13px;font-weight:700;outline:none; }
.manual-price-row input:focus { border-color:color-mix(in srgb,var(--brand) 55%,var(--line)); }
.manual-price-row>span { color:var(--muted);font-weight:700; }
.manual-price small { color:var(--muted);font-size:10px; }
.offline-save-status { display:flex;align-items:center;gap:12px;margin:4px 0 12px; }
.offline-save-status>i { flex:none;width:10px;height:10px;border-radius:50%;background:var(--muted);opacity:.5; }
.offline-save-status>i.is-saved { background:var(--brand);opacity:1; }
.offline-save-status b,.offline-save-status small { display:block; }
.offline-save-status small { margin-top:2px;color:var(--muted);font-size:11px; }
.offline-save-option { margin-bottom:12px; }
.offline-save-progress { display:grid;gap:8px;margin:6px 0 12px;color:var(--muted);font-size:11px; }
.offline-save-bar { height:8px;border-radius:999px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line);overflow:hidden; }
.offline-save-bar>i { display:block;width:0;height:100%;border-radius:inherit;background:var(--brand);transition:width .2s ease; }
.dark .price-source-link span:first-child,.dark .relationship span { background:#202a35;color:#cbd8e8; }
.dark .relationship { border-color:var(--line); }

/* Deck builder */
.dark :is(.deck-list-panel,.deck-editor,.deck-catalog,.deck-empty) { border:0;background:var(--surface);box-shadow:inset 0 0 0 1px #0a0d11; }
.dark .deck-list-item { border-color:var(--line);color:var(--ink); }
.dark .deck-list-item:hover,.dark .deck-list-item.active { background:#20262e; }
.dark .deck-editor-head,.dark .zone-tabs,.dark .deck-catalog-title,.dark .deck-filter-grid,.dark .deck-card-row { border-color:var(--line); }
.dark .deck-editor-head a { color:var(--brand-2); }
.dark .catalog-card:hover { background:#20262e; }.dark .catalog-card button { background:#202a35;color:#cfdaea; }
.dark .deck-qty { border-color:var(--line); }.dark .deck-qty button { background:#20262e;color:var(--ink); }
.deck-card-row img[data-deck-preview],.catalog-card img[data-deck-preview] { cursor:zoom-in; }
.deck-image-preview {
  position:fixed;
  z-index:1400;
  width:min(290px,calc((100vh - 28px) * .716),calc(100vw - 28px));
  aspect-ratio:63/88;
  padding:7px;
  border-radius:15px;
  background:#11161c;
  box-shadow:0 24px 64px rgba(0,0,0,.68),inset 0 0 0 1px rgba(255,255,255,.07);
  opacity:0;
  pointer-events:none;
  transform:scale(.965);
  transition:opacity .12s ease,transform .12s ease;
}
.deck-image-preview.visible { opacity:1;transform:scale(1); }
.deck-image-preview img { display:block;width:100%;height:100%;border-radius:10px;object-fit:contain;background:#080b0f; }
.deck-catalog-sentinel { padding:12px 8px;color:var(--muted);font-size:9.5px;text-align:center; }
.deck-catalog-sentinel.loading:before { content:"";display:inline-block;width:8px;height:8px;margin-right:6px;border:1px solid currentColor;border-top-color:transparent;border-radius:50%;animation:spin .7s linear infinite;vertical-align:-1px; }

/* Card browser navigation */
.card-view-navigation { display:flex;align-items:flex-end;gap:12px;margin-bottom:13px; }
.card-view-navigation .secondary-button { min-height:36px; }
.card-view-navigation label { display:flex;flex-direction:column;gap:4px;margin-left:auto; }
.card-view-navigation label>span { color:var(--muted);font-size:9.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase; }
.card-view-navigation .select-control { width:min(420px,42vw);background:var(--surface-2);border-color:var(--line);color:var(--ink); }

/* Deck overview and visual builder */
.deck-overview-head { align-items:flex-end; }
.deck-overview-head p { margin:4px 0 0;color:var(--muted);font-size:11px; }
.deck-overview-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:24px; }
.deck-overview-card,.deck-create-card { position:relative;display:flex;align-items:center;gap:24px;min-height:225px;padding:27px 30px 27px 24px;border:0;border-radius:20px;background:var(--surface);color:var(--ink);text-align:left;cursor:pointer;box-shadow:inset 0 0 0 1px var(--line);transition:box-shadow .18s ease; }
.deck-overview-card:hover { box-shadow:inset 0 0 0 1px var(--line),0 24px 51px rgba(0,0,0,.2); }
.deck-create-card:hover { background:var(--surface-2); }
/* Card stack: two face-down backs fanned behind the leader/oshi/cover card. */
.deck-stack { position:relative;flex:0 0 138px;width:138px;height:192px; }
.deck-stack-card { position:absolute;left:12px;top:14px;width:114px;height:159px;border-radius:12px; }
.deck-stack-back { background-color:#171b21;background-size:cover;background-position:center;box-shadow:0 9px 21px rgba(0,0,0,.32),inset 0 0 0 1px rgba(255,255,255,.09); }
.deck-stack-back-2 { transform:rotate(11deg); }
.deck-stack-back-1 { transform:rotate(-8deg); }
.deck-stack-top { z-index:2;overflow:hidden;background-color:#0b0e12;background-size:cover;background-position:center;box-shadow:0 15px 30px rgba(0,0,0,.4);transform:rotate(-3deg);transform-origin:50% 100%;transition:transform .22s cubic-bezier(.22,.8,.32,1),box-shadow .22s ease; }
.deck-stack-top img { display:block;width:100%;height:100%;object-fit:cover; }
.deck-overview-card:hover .deck-stack-top { transform:rotate(-11deg) translate(-6px,-11px) scale(1.05);box-shadow:0 27px 45px rgba(0,0,0,.5); }
.deck-overview-badge { display:flex;flex-direction:column;gap:8px;min-width:0; }
.deck-overview-badge .deck-overview-format { color:var(--brand-2);font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase; }
.deck-overview-badge h3 { margin:0;overflow:hidden;font-size:23px;text-overflow:ellipsis;white-space:nowrap; }
.deck-overview-stats { display:flex;align-items:center;gap:12px;margin-top:8px; }
.deck-overview-stats b { font:800 23px "Manrope"; }
.deck-overview-missing { padding:5px 11px;border-radius:9px;font-size:12px;font-weight:800;white-space:nowrap; }
.deck-overview-missing.missing { background:rgba(240,168,173,.14);color:#f0a8ad; }
.deck-overview-missing.complete { background:rgba(139,215,180,.14);color:#8bd7b4; }
.deck-create-card { align-items:center;justify-content:center;gap:11px;min-height:225px;border:1px dashed var(--line);box-shadow:none;color:var(--muted);text-align:center; }
.deck-create-card>span { display:grid;place-items:center;width:57px;height:57px;border-radius:17px;background:var(--surface-3,var(--surface-2));color:var(--brand-2);font-size:30px; }
.deck-create-card b { color:var(--ink);font-size:17px; }.deck-create-card small { font-size:12px; }
.deck-shell.deck-shell-editor { grid-template-columns:minmax(360px,2fr) minmax(520px,3fr); }
.deck-builder-head { gap:19px; }
.deck-builder-head #deck-overview-back { flex:0 0 auto;margin-right:5px; }
.deck-builder-title { min-width:0; }
.deck-builder-title h1 { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.deck-builder-head .primary-button { margin-left:0; }
.deck-value-badge { display:flex;align-items:baseline;gap:7px;padding:8px 11px;border-radius:9px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);white-space:nowrap; }
.deck-value-badge small { color:var(--muted);font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em; }
.deck-value-badge b { color:var(--ink);font-size:12px; }.deck-value-badge i { color:var(--muted);font-size:9px;font-style:normal; }
.deck-view-toggle { margin-left:auto;white-space:nowrap; }
.deck-view-toggle button { min-width:76px; }
.deck-purchase-summary { display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:1px;margin:12px;border-radius:10px;background:var(--line);overflow:hidden;box-shadow:inset 0 0 0 1px var(--line); }
.deck-purchase-summary>div { min-width:0;padding:11px 13px;background:var(--surface-2); }
.deck-purchase-summary span,.deck-purchase-summary b,.deck-purchase-summary small { display:block; }
.deck-purchase-summary span { color:var(--muted);font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em; }
.deck-purchase-summary b { margin-top:4px;color:var(--ink);font-size:15px; }.deck-purchase-summary small { margin-top:3px;color:var(--muted);font-size:9px; }
.deck-purchase-summary .complete b { color:#8bd7b4; }.deck-purchase-summary .missing b { color:#f0a8ad; }.deck-purchase-summary .purchase-cost b { color:var(--brand-2); }
.deck-card-list:not(.deck-card-grid) { width:min(620px,calc(100% - 24px)); }
.deck-card-list.deck-card-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--deck-card-size,135px),1fr));gap:12px;padding:4px 14px 16px; }
.deck-card-grid .deck-zone-empty { grid-column:1/-1; }
.deck-card-tile { min-width:0;padding:8px;border-radius:10px;background:var(--surface-2);cursor:pointer;box-shadow:inset 0 0 0 1px var(--line); }
.deck-card-tile-image { aspect-ratio:5/7;margin-bottom:8px;border-radius:7px;background:#090c10; }
.deck-card-tile-image { position:relative; }
.deck-card-tile-image img { display:block;width:100%;height:100%;object-fit:cover; }
.deck-card-tile .deck-qty { margin-top:8px;justify-content:space-between; }
.deck-card-ownership { display:block;margin-top:3px!important;color:#8bd7b4!important;font-size:9px!important; }
.deck-missing .deck-card-ownership { color:#f0a8ad!important; }
.deck-ownership-dot { position:absolute;right:6px;top:6px;z-index:4;display:grid;min-width:30px;height:22px;padding:0 7px;place-items:center;border-radius:999px;background:rgba(20,68,49,.94);color:#a7e7c6;font-size:9px;font-weight:900;box-shadow:0 4px 12px rgba(0,0,0,.38); }
.deck-missing .deck-ownership-dot { background:rgba(91,35,41,.95);color:#ffb5ba; }
.deck-number-badge { position:absolute;right:6px;bottom:6px;z-index:4;max-width:calc(100% - 12px);padding:4px 7px;border-radius:6px;background:rgba(9,12,16,.88);color:#eef4fb;font-size:9.5px;font-weight:850;line-height:1;box-shadow:0 3px 10px rgba(0,0,0,.42);overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.deck-cover-button { display:grid;width:25px;height:25px;padding:0;place-items:center;border:0;border-radius:50%;background:rgba(9,12,16,.86);color:#d8e3ef;font-size:14px;line-height:1;cursor:pointer;box-shadow:0 3px 10px rgba(0,0,0,.4); }.deck-cover-button:hover { color:#fff;transform:scale(1.06); }.deck-cover-button.active { background:#dbe7f3;color:#10161d; }.deck-card-tile-image>.deck-cover-button { position:absolute;left:6px;top:6px;z-index:5; }.deck-card-row>.deck-cover-button { position:static;flex:0 0 25px; }
.deck-auto-label { display:block;margin-top:8px;padding:7px;border-radius:6px;background:var(--surface-3);color:var(--muted);font-size:9.5px;font-weight:800;text-align:center; }
.deck-auto-card { opacity:.86; }
.catalog-card div>span { display:block;margin-top:3px;color:var(--brand-2);font-size:9px; }
.catalog-card-grid-list { display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--catalog-card-size,135px),1fr));align-content:start;gap:9px;padding:9px; }
.catalog-card-grid-list .deck-catalog-sentinel { grid-column:1/-1; }
.catalog-card-grid { min-width:0; }
.catalog-grid-image { position:relative;aspect-ratio:5/7;border-radius:7px;background:#090c10;overflow:hidden; }
.catalog-grid-image img { display:block;width:100%;height:100%;object-fit:cover; }
.catalog-grid-image>button[data-add] { position:absolute;right:6px;bottom:6px;z-index:3;width:29px;height:29px;border:0;border-radius:8px;background:#d7e2f1;color:#11161c;font-weight:800;cursor:pointer;box-shadow:0 5px 13px rgba(0,0,0,.4); }
.catalog-card-grid>b,.catalog-card-grid>small,.catalog-card-grid>span { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.catalog-card-grid>b { margin-top:6px;font-size:9.5px; }.catalog-card-grid>small { margin-top:2px;color:var(--muted);font-size:9px; }.catalog-card-grid>span { margin-top:3px;color:var(--brand-2);font-size:9px; }
.deck-add-overlay { z-index:1300;padding:24px; }
.deck-add-dialog { position:relative;display:grid;grid-template-columns:270px minmax(300px,1fr);gap:28px;width:min(680px,94vw);padding:24px;border-radius:17px;background:var(--surface);box-shadow:0 30px 90px rgba(0,0,0,.7),inset 0 0 0 1px var(--line); }
.deck-add-dialog>.close-button { position:absolute;right:14px;top:14px;z-index:2; }
.deck-add-image { aspect-ratio:5/7;border-radius:12px;background:#090c10;box-shadow:0 15px 38px rgba(0,0,0,.42); }
.deck-add-image img { display:block;width:100%;height:100%;object-fit:contain; }
.deck-add-copy { align-self:center; }.deck-add-copy h2 { margin:0 38px 5px 0;font-size:23px; }.deck-add-copy>p { color:var(--muted); }
.automatic-zone { margin:22px 0;padding:14px;border-radius:10px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line); }
.automatic-zone span,.automatic-zone b,.automatic-zone small { display:block; }.automatic-zone span { color:var(--muted);font-size:9.5px;text-transform:uppercase;letter-spacing:.08em; }.automatic-zone b { margin-top:4px;font-size:15px; }.automatic-zone small { margin-top:4px;color:var(--muted);font-size:9px; }
.deck-add-copy>label { display:flex;align-items:center;gap:12px;color:var(--muted);font-size:10px;font-weight:700; }.deck-add-copy>label .select-control { width:82px; }
.deck-add-copy .dialog-actions { margin-top:25px; }

/* One Piece deck workspace */
.deck-zoom-row { display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:-6px 0 10px;color:var(--muted);font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em; }
.deck-zoom-row.hidden { display:none; }.deck-zoom-row input { width:150px;accent-color:var(--brand-2); }.deck-zoom-row output { min-width:34px;color:var(--ink);font-variant-numeric:tabular-nums; }
.op-deck-overview { display:grid;grid-template-columns:minmax(130px,175px) 1fr;gap:12px;padding:12px 12px 5px;align-items:start; }
.op-leader-panel { min-width:0;padding:10px;border-radius:10px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line); }
.op-section-label,.op-section-head { display:flex;align-items:center;justify-content:space-between;gap:10px; }
.op-section-label { margin-bottom:8px;color:var(--muted);font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.07em; }.op-section-label b { color:var(--ink); }
.op-leader-card .deck-card-tile { padding:0;background:transparent;box-shadow:none; }.op-leader-card .deck-card-tile-image { margin:0; }.op-leader-card .deck-qty { margin:8px 0 0; }
.op-leader-empty { display:grid;place-items:center;min-height:180px;border-radius:8px;background:var(--surface-3);color:var(--muted);text-align:center; }.op-leader-empty span { color:var(--brand-2);font-size:24px; }.op-leader-empty small { padding:8px;font-size:9.5px; }
.op-deck-stats { min-width:0; }.op-deck-stats .deck-purchase-summary { margin:0;grid-template-columns:1fr; }
.op-deck-section { padding-top:8px;border-top:1px solid var(--line); }.op-section-head { padding:9px 14px 11px; }.op-section-head .eyebrow { margin:0; }.op-section-head h2 { margin:3px 0 0;font-size:15px; }.op-section-head small { display:block;margin-top:3px;color:var(--muted);font-size:9.5px; }.op-section-head>b { padding:5px 8px;border-radius:6px;background:var(--surface-3);color:var(--ink);font-size:9px;white-space:nowrap; }
.op-don-section { margin-top:5px; }.op-don-section .deck-card-list { min-height:0; }
.deck-filter-top { display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:7px;padding:9px 9px 5px; }.deck-filter-top .filter-search input,.deck-filter-top .select-control { width:100%; }
.op-filter-panel { padding:4px 9px 9px;border-bottom:1px solid var(--line); }
.op-filter-group { padding:7px 0;border-top:1px solid rgba(255,255,255,.035); }.op-filter-group:first-child { border-top:0; }.op-filter-group>span { display:block;margin-bottom:6px;color:var(--muted);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.08em; }.op-filter-group>div { display:flex;align-items:center;flex-wrap:wrap;gap:5px; }
.op-colors>div { flex-wrap:nowrap;justify-content:space-between;gap:3px; }.op-color-filter { display:grid;place-items:center;width:39px;height:39px;padding:3px;border:0;border-radius:8px;background:transparent;opacity:.52;cursor:pointer;transition:opacity .15s,background .15s,transform .15s; }.op-color-glyph { position:relative;display:block;width:100%;height:100%;isolation:isolate;transform:rotate(var(--op-rotation));filter:drop-shadow(0 4px 5px rgba(0,0,0,.25)); }.op-color-glyph img { display:block;width:100%;height:100%; }.op-color-glyph:after { position:absolute;inset:0;background:var(--op-color);content:"";mix-blend-mode:color;mask:url("../op-filter-icon/color.svg?v=2") center/contain no-repeat;-webkit-mask:url("../op-filter-icon/color.svg?v=2") center/contain no-repeat;pointer-events:none; }.op-color-filter:hover { opacity:.85; }.op-color-filter.active { background:var(--surface-3);opacity:1;transform:translateY(-1px);box-shadow:inset 0 0 0 1px rgba(226,236,248,.13); }
.op-filter-chip,.op-number-filter { border:0;border-radius:6px;background:var(--surface-3);color:var(--muted);font-size:9.5px;font-weight:750;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(0,0,0,.22); }.op-filter-chip { padding:6px 8px; }.op-number-filter { width:27px;height:27px;padding:0; }.op-filter-chip:hover,.op-number-filter:hover { color:var(--ink); }.op-filter-chip.active,.op-number-filter.active { background:#d4deeb;color:#12171d;box-shadow:0 3px 9px rgba(0,0,0,.25); }
.op-cost-filters { display:grid!important;grid-template-columns:repeat(10,minmax(22px,1fr));gap:4px!important; }.op-cost-filters .op-number-filter { width:100%; }
.op-filter-panel + .catalog-card-list { max-height:calc(100vh - 465px); }

/* Compact builder controls */
.deck-editor-head { gap:7px;padding:9px; }
.deck-editor-head .compact-back-button,.sheet-head .compact-back-button { display:grid;flex:0 0 29px;width:29px;height:29px;padding:0;place-items:center;border:0;border-radius:7px;background:var(--surface-3);color:var(--ink);cursor:pointer; }
.deck-editor-head .deck-title-field { flex:1;min-width:75px; }
.deck-editor-head .deck-title-field input { font-size:14px; }
.deck-editor-head .select-control { width:auto;min-width:95px;max-width:140px;height:30px;padding:0 25px 0 8px;font-size:9.5px; }
.deck-editor-head a { flex:0 0 auto;white-space:nowrap; }
.op-deck-overview { grid-template-columns:minmax(100px,125px) 1fr;gap:9px;padding:9px 9px 4px; }
.generic-deck-overview { padding:9px 9px 4px; }.generic-deck-overview .deck-stat-chips { grid-template-columns:repeat(4,70px);grid-template-rows:70px; }
.op-leader-panel { padding:7px; }.op-section-label { margin-bottom:6px; }
.op-leader-card .deck-qty { margin-top:6px; }.op-leader-card .deck-qty button { height:24px; }.op-leader-card .deck-card-tile-image { border-radius:6px; }
.op-leader-empty { min-height:138px; }
.deck-stat-chips { display:grid;grid-template-columns:repeat(2,70px);grid-auto-rows:70px;align-content:start;justify-content:start;gap:7px; }
.deck-stat-chips>div { display:flex;width:70px;height:70px;min-width:0;flex-direction:column;justify-content:space-between;padding:8px;border-radius:9px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line); }
.deck-stat-chips span,.deck-stat-chips b { display:block; }.deck-stat-chips span { color:var(--muted);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.06em; }.deck-stat-chips b { overflow:hidden;color:var(--ink);font-size:13px;text-overflow:ellipsis;white-space:nowrap; }.deck-stat-chips .complete b { color:#8bd7b4; }.deck-stat-chips .missing b { color:#f0a8ad; }
.op-section-head { padding:8px 11px 9px; }.op-section-head h2 { font-size:13px; }.op-deck-section { padding-top:5px; }

/* One-line catalogue filter rail */
.op-catalog-controls { display:flex;align-items:center;gap:7px;padding:8px 9px;border-bottom:1px solid var(--line); }
.op-catalog-controls>.filter-search { flex:1;min-width:170px;max-width:360px; }.op-catalog-controls>.filter-search input { width:100%; }
.op-catalog-controls>.select-control { width:105px;min-width:105px; }
.op-catalog-controls .toolbar-spacer { flex:1; }
.op-catalog-controls .catalog-view-tools { display:flex;align-items:center;gap:7px;padding:0;border:0; }
.op-catalog-controls .catalog-view-tools>span { margin:0;white-space:nowrap; }
.op-catalog-controls .catalog-view-tools>div { flex-wrap:nowrap; }
.op-catalog-filterbar { display:flex;align-items:flex-end;gap:12px;padding:8px 9px 9px;border-bottom:1px solid var(--line);overflow-x:auto;overflow-y:hidden;scrollbar-width:thin; }
.op-catalog-filterbar .op-filter-group { flex:0 0 auto;padding:0;border:0; }
.op-filter-group>span { margin-bottom:5px; }
.op-catalog-filterbar .op-filter-group>div { flex-wrap:nowrap; }
.catalog-search-group>div { gap:5px; }.catalog-search-group .filter-search { width:180px; }.catalog-search-group .filter-search input { width:100%; }.catalog-search-group .select-control { width:90px;min-width:90px; }
.op-colors>div { justify-content:flex-start; }
.op-color-filter { width:38px;height:38px;padding:3px;border-radius:0;clip-path:polygon(50% 1%,94% 25%,94% 75%,50% 99%,6% 75%,6% 25%); }
.op-color-filter.active { padding:4px;background:#dce5ef;box-shadow:none; }
.op-color-filter.active .op-color-glyph { filter:drop-shadow(0 3px 5px rgba(0,0,0,.42)); }
.op-types>div { gap:4px!important; }.op-filter-chip { height:34px;padding:0 8px; }
.op-costs>div,.op-attributes>div { gap:3px!important; }
.op-image-filter { display:grid;width:35px;height:35px;padding:2px;place-items:center;border:0;border-radius:7px;background:transparent;opacity:.52;cursor:pointer; }
.op-image-filter img { display:block;width:100%;height:100%;object-fit:contain; }.op-attribute-glyph { position:relative;display:block;width:100%;height:100%;isolation:isolate; }.op-attribute-glyph:after { position:absolute;inset:0;background:var(--op-attribute-color);content:"";mix-blend-mode:color;mask:var(--op-attribute-icon) center/contain no-repeat;-webkit-mask:var(--op-attribute-icon) center/contain no-repeat;pointer-events:none; }.op-image-filter:hover { opacity:.82; }.op-image-filter.active { background:var(--surface-3);opacity:1;box-shadow:inset 0 0 0 1px rgba(220,231,242,.18); }
.game-costs>div { gap:3px!important; }.lorcana-color-filter,.lorcana-icon-filter { display:grid;width:35px;height:35px;padding:1px;place-items:center;border:0;background:transparent;opacity:.52;cursor:pointer;transition:opacity .15s,transform .15s; }.lorcana-color-filter img,.lorcana-icon-filter img { display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 5px rgba(0,0,0,.3)); }.lorcana-color-filter:hover,.lorcana-icon-filter:hover { opacity:.85; }.lorcana-color-filter.active,.lorcana-icon-filter.active { opacity:1;transform:translateY(-1px); }.lorcana-color-filter.active img,.lorcana-icon-filter.active img { filter:drop-shadow(0 0 3px rgba(229,237,247,.95)) drop-shadow(0 3px 5px rgba(0,0,0,.4)); }
.lorcana-cost-filter { position:relative;width:35px;height:35px;padding:0;background:transparent;box-shadow:none;opacity:.52;transition:opacity .15s,transform .15s; }.lorcana-cost-filter img { position:absolute;inset:0;width:35px;height:35px;object-fit:contain;filter:drop-shadow(0 2px 4px rgba(0,0,0,.32)); }.lorcana-cost-filter span { position:relative;z-index:1;display:grid;width:100%;height:100%;place-items:center;color:#f5f7fb;font-size:11px;font-weight:800;line-height:1;text-shadow:0 1px 3px rgba(0,0,0,.8); }.lorcana-cost-filter:hover { opacity:.85; }.lorcana-cost-filter.active { background:transparent;box-shadow:none;opacity:1;transform:translateY(-1px);filter:drop-shadow(0 0 3px rgba(220,229,239,.95)); }.lorcana-cost-filter.active span { color:#fff; }
.catalog-view-tools>div { gap:7px!important; }.catalog-view-tools .deck-view-toggle { margin:0; }.catalog-view-tools .deck-view-toggle button { min-width:34px;height:34px;padding:0; }
.catalog-zoom { display:flex;align-items:center;gap:5px; }.catalog-zoom.hidden { display:none; }.catalog-zoom input { width:92px;accent-color:var(--brand-2); }.catalog-zoom output { min-width:30px;color:var(--muted);font-size:9px;font-weight:800;font-variant-numeric:tabular-nums; }
.op-catalog-filterbar + .catalog-card-list { max-height:calc(100vh - 285px); }

/* Direct deck counter in catalogue */
.catalog-deck-counter { z-index:5;display:flex!important;align-items:center!important;overflow:hidden;border-radius:7px;background:rgba(10,14,18,.92)!important;color:#f3f6fa;box-shadow:0 5px 15px rgba(0,0,0,.48); }
.catalog-grid-image .catalog-deck-counter { position:absolute;left:50%;bottom:7px;transform:translateX(-50%); }
.catalog-card .catalog-deck-counter { flex:0 0 auto!important; }
.catalog-deck-counter button { position:static!important;width:27px!important;height:28px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#fff!important;font-size:15px!important;cursor:pointer;box-shadow:none!important; }
.catalog-deck-counter button:disabled { color:#5d6670!important;cursor:default; }.catalog-deck-counter b { display:grid!important;min-width:27px;height:28px;place-items:center;border-inline:1px solid rgba(255,255,255,.14);font-size:9px!important; }
.catalog-card-grid { cursor:pointer; }.catalog-card { cursor:pointer; }.catalog-card>img { width:30px;height:42px;object-fit:cover;border-radius:3px; }

/* Login */
.dark.login-body { background:#080a0e; }
.dark .login-art { background:radial-gradient(circle at 64% 32%,#303944 0,#191e25 32%,#090c11 70%); }
.dark .login-panel { background:#101419;box-shadow:-18px 0 50px rgba(0,0,0,.35); }
.login-brand,.login-mobile-brand { color:#f2f5fa; }.login-brand .brand-symbol,.login-mobile-brand .brand-symbol { width:40px;height:40px; }
.dark .login-quote p { color:#b1bbc8; }
.dark .login-footer { color:#8994a1; }
.dark .floating-card { border-color:rgba(255,255,255,.06);background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.018));box-shadow:0 28px 55px rgba(0,0,0,.35); }
.dark .floating-card:after { background:radial-gradient(circle,#cad7e7,#65758b 40%,transparent 42%); }
.dark .orbit { border-color:rgba(255,255,255,.045); }
.dark .form-error { background:#281717;color:#ffaaa6; }
.dark .toast { background:#20262e;color:#fff;box-shadow:0 18px 45px rgba(0,0,0,.5); }
.dark .toast button { color:#d2deec; }

@media(max-width:760px) {
  .sidebar,body.sidebar-collapsed .sidebar { box-shadow:18px 0 50px rgba(0,0,0,.55); }
  body.sidebar-collapsed .brand { padding:0 10px 25px 7px; }
  body.sidebar-collapsed .brand>.brand-word { display:flex; }
  .game-logo { width:min(230px,72%); }
  .set-brand-logo { width:100%; }
  .set-overview-toolbar #set-type-filter { width:100%;max-width:none; }
  .card-toolbar-sticky{position:static}.set-card-divider{align-items:flex-start;flex-wrap:wrap}.set-card-divider small{width:100%;margin-left:79px}.all-card-groups{gap:34px}
  .card-view-navigation { align-items:stretch;flex-direction:column; }.card-view-navigation label { margin-left:0; }.card-view-navigation .select-control { width:100%; }
  .deck-overview-grid { grid-template-columns:1fr; }.deck-shell.deck-shell-editor { grid-template-columns:1fr; }.deck-page-head { align-items:stretch; }.deck-builder-head { flex-wrap:wrap;gap:10px; }.deck-builder-title { flex:1;min-width:160px; }.deck-value-badge { order:3; }.deck-builder-head .deck-view-toggle { order:4;width:100%; }.deck-builder-head .primary-button { order:5; }.deck-view-toggle { margin-left:0; }.deck-view-toggle button { flex:1; }.deck-purchase-summary { grid-template-columns:1fr; }.deck-card-list:not(.deck-card-grid) { width:100%; }.deck-card-list.deck-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .deck-add-dialog { grid-template-columns:105px 1fr;gap:16px;padding:17px; }.deck-add-copy h2 { font-size:17px; }.automatic-zone { margin:14px 0; }.deck-add-copy .dialog-actions { margin-top:16px;flex-wrap:wrap; }.deck-add-copy .dialog-actions button { flex:1;min-width:120px; }
}

@media(max-width:1050px) {
  .dark .hero-top { flex-direction:column;align-items:flex-start;gap:14px; }
}

@media(max-width:760px) {
  .modal-card-frame { width:auto;height:88%;max-width:72vw; }
  .modal-card-frame .modal-card-image { width:100%;height:100%; }
}

@media(prefers-reduced-motion:reduce) {
  .card-finish-frame.finish-foil:after,.card-finish-frame.finish-foil:before,.card-finish-frame.finish-prismatic:after,.card-finish-frame.finish-prismatic:before,.card-finish-frame.finish-aurora:after,.card-finish-frame.finish-aurora:before { animation:none; }
  .deck-image-preview { transition:none; }
}

/* ---- Trade / sale sheets ---- */
.sheet-overview-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:22px; }
.sheet-overview-card { display:flex;flex-direction:column;padding:0;overflow:hidden;border:0;border-radius:18px;background:var(--surface);color:var(--ink);text-align:left;cursor:pointer;box-shadow:0 8px 22px rgba(0,0,0,.14);transition:transform .16s; }
.sheet-overview-card:hover { transform:translateY(-3px); }
.sheet-overview-art { display:grid;place-items:center;aspect-ratio:16/10;overflow:hidden;background:var(--surface-2);color:var(--muted);font-size:12px; }
.sheet-overview-art img { width:100%;height:100%;object-fit:cover;object-position:top; }
.sheet-overview-copy { padding:14px 18px 17px; }
.sheet-overview-copy h3 { margin:7px 0 4px;font-size:17px; }
.sheet-overview-copy small { color:var(--muted); }
.sheet-kind { display:inline-block;padding:2px 9px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.08em; }
.sheet-kind-wts { background:rgba(240,160,74,.18);color:#f0a04a; }
.sheet-kind-wtt { background:rgba(143,208,245,.18);color:#8fd0f5; }
.sheet-kind-wts-wtt { background:linear-gradient(90deg,rgba(240,160,74,.2),rgba(143,208,245,.2));color:#e8dcc0; }
.sheet-shell { display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:26px;align-items:start; }
.sheet-head { display:flex;align-items:center;gap:10px;margin-bottom:14px; }
.sheet-name-input { flex:1;min-width:0;height:40px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:17px;font-weight:700; }
/* What a sheet is for: independent switches with a box each, not one segmented control. */
.sheet-head { flex-wrap:wrap; }
.sheet-head .sheet-name-input { min-width:220px; }
/* ---- Inbox and the posts of a sheet ---- */
.sheet-inbox { margin:0 0 26px;padding:16px 18px;border-radius:16px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line); }
.sheet-inbox .sheet-section-head span { color:var(--muted);font-size:11px; }
.sheet-inbox .sheet-section-head button { margin-left:auto; }
.inbox-list { display:grid;gap:10px;margin-top:10px; }
.inbox-item { padding:12px 14px;border-radius:12px;background:var(--surface-2); }
.inbox-item header { display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:12px; }
.inbox-item header span { color:var(--muted);font-size:11px; }
.inbox-sheet { margin-left:auto;padding:2px 10px;border:0;border-radius:999px;background:color-mix(in srgb,var(--brand) 14%,transparent);color:var(--ink);font-size:10px;font-weight:700;cursor:pointer; }
.inbox-item p { margin:8px 0 0;color:var(--ink);font-size:13px;line-height:1.45;white-space:pre-line;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden; }
.inbox-matches { display:flex;flex-wrap:wrap;gap:6px;margin-top:9px; }
.inbox-match { padding:2px 9px;border-radius:999px;background:color-mix(in srgb,var(--brand) 18%,transparent);color:var(--ink);font-size:10px;font-weight:700; }
.inbox-match.maybe { background:transparent;box-shadow:inset 0 0 0 1px var(--line);color:var(--muted); }
.inbox-item footer { display:flex;justify-content:flex-end;gap:8px;margin-top:10px; }
.inbox-item footer .secondary-button { min-height:30px;padding:0 12px;font-size:11px;text-decoration:none;display:inline-flex;align-items:center; }
.inbox-kind { padding:1px 8px;border-radius:999px;background:var(--mt-gold-soft,rgba(188,151,75,.14));color:var(--mt-gold,#bc974b);font-size:9px;font-style:normal;font-weight:800;letter-spacing:.06em;text-transform:uppercase; }
.inbox-item h4 { margin:8px 0 0;font-size:13px;line-height:1.35;overflow-wrap:anywhere; }
.inbox-item.is-find p { margin-top:4px;color:var(--muted);font-size:12px;-webkit-line-clamp:3; }
.inbox-match i { margin-left:6px;color:var(--muted);font-size:9px;font-style:normal;font-weight:600; }
.community-chips { display:flex;flex-wrap:wrap;gap:6px; }
.community-chips.is-off { opacity:.5; }
.community-chip { padding:5px 12px;border:0;border-radius:999px;background:transparent;box-shadow:inset 0 0 0 1px var(--line);color:var(--muted);font-size:11px;font-weight:700;cursor:pointer; }
.community-chip.active { background:color-mix(in srgb,var(--brand) 16%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand) 34%,transparent);color:var(--ink); }
.community-chip:disabled { cursor:default; }
.sheet-scout .sheet-section-head .switch { margin-left:auto; }
.text-link { padding:0;border:0;background:none;color:var(--ink);font:inherit;font-weight:700;text-decoration:underline;cursor:pointer; }
.reddit-communities { margin-top:18px;padding-top:16px;border-top:1px solid var(--line); }
.community-list { display:grid;gap:8px;margin:8px 0; }
.community-row { display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;background:var(--surface-2); }
.community-row .secondary-button { flex:none;min-height:30px;padding:0 11px;font-size:11px; }
/* The button of a page head keeps its one line; squeezed, it wrapped into a blob on a phone. */
.deck-overview-head .primary-button { flex:none;align-self:center;white-space:nowrap; }
/* A row of its own, not a box: the theme stretches every direct child of the page to full width. */
.sheet-tabs { display:flex;gap:6px;margin:0 0 20px; }
.sheet-tabs button { height:36px;padding:0 20px;border:0;border-radius:999px;background:transparent;box-shadow:inset 0 0 0 1px var(--line);color:var(--muted);font-size:12px;font-weight:700;cursor:pointer; }
.sheet-tabs button.active { background:var(--surface-2);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand) 40%,var(--line));color:var(--ink); }
.sheet-reserved { margin-left:8px;padding:1px 8px;border-radius:999px;background:var(--mt-gold-soft,rgba(188,151,75,.14));color:var(--mt-gold,#bc974b);font-size:9px;font-style:normal;font-weight:800;letter-spacing:.04em;text-transform:uppercase; }
.deal-filters { display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:14px; }
.deal-filter-chips { display:flex;flex-wrap:wrap;gap:6px;flex:1; }
.deal-filters .filter-search { flex:0 1 280px; }
.deal-filters .filter-search input { width:100%; }
.deal-totals { display:flex;flex-wrap:wrap;gap:6px 22px;margin-bottom:14px;padding:12px 16px;border-radius:14px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);color:var(--muted);font-size:12px; }
.deal-totals b { margin-left:4px;color:var(--ink); }
.deal-totals b.is-in,.deal-money.is-in { color:var(--success,#18a675); }
.deal-totals b.is-out,.deal-money.is-out { color:var(--danger,#e5484d); }
.deal-list { display:grid;gap:8px; }
.deal-row { display:grid;grid-template-columns:minmax(150px,1fr) minmax(0,2.2fr) auto;align-items:center;gap:16px;padding:12px 16px;border:0;border-radius:14px;background:var(--surface);color:var(--ink);text-align:left;cursor:pointer;box-shadow:inset 0 0 0 1px var(--line); }
.deal-row:hover { background:var(--surface-2); }
.deal-row-head { display:grid;gap:3px;min-width:0; }
.deal-row-head b { overflow:hidden;font-size:13px;text-overflow:ellipsis;white-space:nowrap; }
.deal-row-head small,.deal-row-cards { color:var(--muted);font-size:11px; }
.deal-row-cards { display:grid;gap:3px;min-width:0; }
.deal-row-cards span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.deal-row-cards i { margin-right:4px;font-style:normal;font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase; }
.deal-row-end { display:flex;align-items:center;gap:12px;justify-self:end; }
.deal-money { font-size:13px;white-space:nowrap; }
.deal-status { padding:3px 10px;border-radius:999px;background:var(--surface-2);color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap; }
.deal-status-reserved,.deal-status-transit { background:var(--mt-gold-soft,rgba(188,151,75,.14));color:var(--mt-gold,#bc974b); }
.deal-status-done { background:color-mix(in srgb,var(--success,#18a675) 16%,transparent);color:var(--success,#18a675); }
.deal-status-cancelled { text-decoration:line-through; }
.deal-editor { max-width:1100px; }
.deal-title { flex:1;min-width:0;margin:0;overflow:hidden;font-size:24px;text-overflow:ellipsis;white-space:nowrap; }
.deal-note { margin:0 0 14px;padding:10px 14px;border-radius:12px;background:var(--mt-gold-soft,rgba(188,151,75,.14));color:var(--ink);font-size:12px; }
.deal-fields a { margin-left:6px;color:var(--ink);text-transform:none;letter-spacing:0; }
.deal-fields input:disabled,.deal-price input:disabled { opacity:.7; }
.deal-sides { display:grid;grid-template-columns:1fr 1fr;gap:22px;margin:8px 0 18px; }
.deal-side { min-width:0;padding:14px;border-radius:16px;background:var(--surface-2); }
.deal-price { display:flex;align-items:center;gap:4px;flex:none; }
.deal-price input { width:72px;height:32px;padding:0 8px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:12px;text-align:right; }
.deal-price span { color:var(--muted);font-size:11px; }
.deal-money-fields .deal-price input { width:100%;height:36px;text-align:left; }
.deal-money-fields .text-link { margin-top:2px;color:var(--muted);font-size:10px;font-weight:600;text-align:left;text-transform:none;letter-spacing:0; }
.deal-card-fixed { flex:none;color:var(--muted);font-size:12px;font-weight:700; }
.deal-thumb-gone { background:var(--surface-3,var(--line)); }
.deal-add { margin-top:10px; }
.deal-add .filter-search input { width:100%; }
.deal-found { display:grid;gap:6px;max-height:300px;margin-top:6px;overflow:hidden auto; }
.deal-found .sheet-pick { width:100%;cursor:pointer; }
.deal-found .sheet-pick i { margin-left:auto;color:var(--brand);font-style:normal;font-size:16px; }
.deal-note-field { display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase; }
.deal-note-field textarea { padding:9px 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font:inherit;font-size:12px;font-weight:400;letter-spacing:0;text-transform:none;resize:vertical; }
.deal-actions { display:flex;flex-wrap:wrap;gap:8px;margin:18px 0; }
.deal-actions .deal-delete { margin-left:auto; }
.deal-events { margin-top:8px; }
.deal-event { display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;padding:7px 0;border-top:1px solid var(--line);font-size:12px; }
.deal-event span { color:var(--muted);font-size:11px;min-width:120px; }
.deal-event small { flex-basis:100%;color:var(--muted);font-size:11px; }
.card-deals { margin-top:16px; }
.card-deal { display:grid;grid-template-columns:auto 1fr;gap:2px 12px;width:100%;padding:8px 0;border:0;border-top:1px solid var(--line);background:none;color:var(--ink);font-size:12px;text-align:left;cursor:pointer; }
.card-deal span { color:var(--muted);font-size:11px; }
.card-deal small { grid-column:2;color:var(--muted);font-size:10px; }
@media(max-width:640px){ .deal-card { flex-wrap:wrap; } .deal-card .sheet-entry-copy { flex-basis:calc(100% - 60px); } .deal-card .deal-price { margin-left:auto; } }
@media(max-width:860px){ .deal-sides { grid-template-columns:1fr; } .deal-row { grid-template-columns:1fr; gap:8px; } .deal-row-end { justify-self:start; } .deal-title { font-size:19px; } }
.sheet-posts { margin:18px 0; }
.sheet-posts .sheet-section-head span { color:var(--muted);font-size:11px; }
.sheet-post-form { display:flex;gap:8px;margin:10px 0; }
.sheet-post-form input { flex:1;min-width:0;height:38px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:12px; }
.sheet-post-hint { margin:0 0 8px;font-size:11px; }
.sheet-post-list { display:grid;gap:8px; }
.sheet-post { display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;background:var(--surface-2); }
.sheet-post.is-done { opacity:.62; }
.sheet-post-copy { flex:1;min-width:0;display:grid;gap:2px; }
.sheet-post-copy b { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px; }
.sheet-post-copy a { color:inherit; }
.sheet-post-copy small { color:var(--muted);font-size:10px; }
.sheet-post-new { color:var(--ink);font-weight:800; }
.sheet-post .secondary-button { flex:none;min-height:30px;padding:0 11px;font-size:11px; }
@media(max-width:760px){.sheet-post{flex-wrap:wrap}.sheet-post-copy{flex-basis:100%}}
.tile-edition-row { display:flex;align-items:center;justify-content:center;gap:10px;margin:0 0 16px; }
.tile-edition-row>span { color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase; }
.tile-edition-switch { flex:none; }
.tile-edition-switch button { white-space:nowrap; }
.sheet-kinds { display:flex;align-items:center;gap:6px;flex:none; }
.sheet-kinds-label { color:var(--muted);font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase; }
.sheet-kind-chip+.sheet-kinds-label { margin-left:8px; }
.sheet-kind-chip { --kind:#f0a04a;display:inline-flex;align-items:center;gap:7px;height:40px;padding:0 12px 0 10px;border:1.5px solid var(--line);border-radius:10px;background:transparent;color:var(--muted);font-size:12px;font-weight:800;letter-spacing:.04em;cursor:pointer;transition:border-color .15s,color .15s,background .15s; }
.sheet-kind-chip-wtt { --kind:#8fd0f5; }
.sheet-kind-chip-wtb { --kind:#9ad6a4; }
.sheet-kind-chip-wttf { --kind:#c9a8f0; }
.sheet-kind-chip i { display:grid;place-items:center;width:15px;height:15px;border:1.5px solid currentColor;border-radius:4px;font-style:normal;font-size:10px;line-height:1; }
.sheet-kind-chip:hover { border-color:color-mix(in srgb,var(--kind) 60%,var(--line));color:var(--ink); }
.sheet-kind-chip.active { border-color:var(--kind);background:color-mix(in srgb,var(--kind) 16%,transparent);color:color-mix(in srgb,var(--kind) 62%,var(--ink)); }
.sheet-kind-chip.active i { border-color:var(--kind);background:var(--kind);color:#14171c; }
.sheet-kind-chip.active i::before { content:"✓"; }
.sheet-kind-wtb { background:rgba(154,214,164,.18);color:#9ad6a4; }
.sheet-kind-wttf { background:rgba(201,168,240,.18);color:#c9a8f0; }
.sheet-kind-wtb-wttf { background:linear-gradient(90deg,rgba(154,214,164,.2),rgba(201,168,240,.2));color:#dfe6d8; }
.sheet-options { display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:12px;margin-bottom:12px; }
.sheet-options label { display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase; }
.sheet-options input,.sheet-options select { width:100%;height:36px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font-size:12px;text-transform:none;letter-spacing:0; }
.sheet-backgrounds { display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px;margin-bottom:16px; }
.sheet-backgrounds button { position:relative;padding:0;overflow:hidden;border:2px solid transparent;border-radius:10px;background:var(--surface-2);cursor:pointer; }
.sheet-backgrounds button.active { border-color:var(--brand); }
.sheet-background-upload { display:grid;place-content:center;justify-items:center;gap:2px;aspect-ratio:16/10;border:2px dashed var(--line);border-radius:10px;color:var(--muted);cursor:pointer; }
.sheet-background-upload:hover { border-color:var(--brand);color:var(--ink); }
.sheet-background-upload b { font-size:18px;line-height:1; }
.sheet-backgrounds .sheet-background-upload span { position:static;padding:0;background:none;color:inherit;font-size:9px;font-weight:700; }
.sheet-background-delete { position:absolute;top:4px;right:4px;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;font-style:normal;font-size:13px;line-height:1; }
.sheet-background-delete:hover { background:#b3261e; }
.sheet-backgrounds img { display:block;width:100%;aspect-ratio:16/10;object-fit:cover; }
.sheet-backgrounds span { position:absolute;left:0;right:0;bottom:0;padding:3px 6px;background:rgba(0,0,0,.55);color:#fff;font-size:9px;font-weight:700;text-align:left; }
.sheet-preview { display:grid;gap:14px;margin-bottom:18px; }
.sheet-page { margin:0;overflow:hidden;border-radius:14px;background:var(--surface-2); }
.sheet-page img { display:block;width:100%;min-height:120px; }
.sheet-page figcaption { display:flex;align-items:center;gap:8px;padding:9px 12px;color:var(--muted);font-size:11px; }
.sheet-page figcaption span { margin-right:auto; }
.sheet-page figcaption a { display:inline-flex;align-items:center;min-height:30px;padding:0 12px;text-decoration:none; }
.sheet-preview-empty { display:grid;place-items:center;min-height:150px;border:1px dashed var(--line);border-radius:14px;color:var(--muted);font-size:12px;text-align:center;padding:16px; }
.sheet-section-head { display:flex;align-items:center;gap:10px;margin:0 0 9px; }
.sheet-section-head b { font-size:13px; }
.sheet-section-head span { color:var(--muted);font-size:11px; }
.sheet-section-head .secondary-button { margin-left:auto;min-height:30px;padding:0 12px; }
.sheet-text { margin-bottom:18px; }
.sheet-text textarea { width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font:11px/1.5 ui-monospace,monospace;resize:vertical; }
.sheet-entries,.sheet-picker-list { display:grid;gap:6px; }
.sheet-entry,.sheet-pick { display:flex;align-items:center;gap:10px;padding:7px 9px;border:0;border-radius:11px;background:var(--surface);color:var(--ink);text-align:left; }
.sheet-pick { width:100%;cursor:pointer; }
.sheet-pick:hover { background:var(--surface-2); }
.sheet-pick.on-sheet { box-shadow:inset 3px 0 0 var(--brand); }
.sheet-pick i { margin-left:auto;font-style:normal;font-size:18px;color:var(--brand); }
.sheet-thumb { flex:0 0 auto;width:38px;aspect-ratio:5/7;overflow:hidden;border-radius:4px; }
.sheet-thumb img { width:100%;height:100%;object-fit:cover; }
.sheet-entry-copy { display:flex;flex-direction:column;gap:2px;min-width:0;flex:1; }
.sheet-entry-copy b { overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap; }
.sheet-entry-copy small { overflow:hidden;color:var(--muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap; }
.sheet-entry-copy .sheet-warning { color:#e8a13a; }
.sheet-entry-copy .sheet-picked { color:var(--brand); }
.sheet-label { width:118px;height:32px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);color:var(--ink);font-size:11px; }
.sheet-stepper { display:flex;align-items:center;border-radius:8px;background:var(--surface-2); }
.sheet-stepper button,.sheet-remove { width:30px;height:32px;border:0;background:transparent;color:var(--ink);font-size:16px;cursor:pointer; }
.sheet-stepper b { min-width:24px;font-size:12px;text-align:center; }
.sheet-remove { color:var(--muted); }
.sheet-picker { position:sticky;top:88px;display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 110px);padding:16px;border-radius:16px;background:var(--surface-2); }
.sheet-picker .filter-search input { width:100%; }
.sheet-source button { flex:1; }
.sheet-picker-list { overflow:hidden auto;padding-right:2px; }
.sheet-pick { min-width:0; }
.sheet-picker-more { padding:8px;color:var(--muted);font-size:11px;text-align:center; }
.sheet-take-all { width:100%;min-height:34px; }
@media(max-width:1100px){ .sheet-shell { grid-template-columns:1fr; } .sheet-picker { position:static;max-height:none; } .sheet-picker-list { max-height:60vh; } }
@media(max-width:640px){ .sheet-options { grid-template-columns:1fr; } .sheet-entry { flex-wrap:wrap; } .sheet-label { flex:1;width:auto; } .sheet-head { flex-wrap:wrap; } .sheet-name-input { flex-basis:100%;order:3; } }

/* The heart's list menu (js/watch-menu.js), dressed like the site's other popups (filter and set
   popups, the card dialog's quick menu): surface, hairline, gold label, accent for what is on. */
.watchlist-action { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; touch-action:manipulation; }
.watchlist-action.watch-menu-open { outline:2px solid var(--mt-gold,var(--brand)); outline-offset:2px; }
.watch-menu { position:fixed; z-index:1000; width:min(270px,calc(100vw - 16px)); max-height:min(400px,calc(100vh - 16px)); display:flex; flex-direction:column; gap:4px; padding:12px; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--ink); box-shadow:var(--mt-shadow,0 18px 44px rgba(0,0,0,.35)); font-family:var(--font-ui,inherit); animation:watch-menu-in .14s ease-out; }
@keyframes watch-menu-in { from { opacity:0; transform:translateY(-4px); } }
.watch-menu-title { padding:2px 6px 6px; color:var(--mt-gold,var(--brand)); font-size:10px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.watch-menu-loading { padding:8px 6px; color:var(--muted); font-size:12px; }
.watch-menu-lists { display:flex; flex-direction:column; gap:2px; overflow:auto; }
.watch-menu-item { display:grid; grid-template-columns:20px 1fr auto; align-items:center; gap:10px; width:100%; min-height:40px; padding:0 10px; border:0; border-radius:11px; background:transparent; color:var(--ink); text-align:left; font:600 13px var(--font-ui,inherit); cursor:pointer; }
.watch-menu-item:hover, .watch-menu-item:focus-visible { background:var(--surface-2); outline:none; }
.watch-menu-item.is-on { background:var(--mt-accent-soft,var(--surface-2)); color:var(--brand); }
.watch-menu-item i { display:grid; place-items:center; width:18px; height:18px; border:1.5px solid var(--line); border-radius:6px; background:var(--surface); color:var(--surface); font-style:normal; font-size:11px; font-weight:800; }
.watch-menu-item.is-on i { border-color:var(--brand); background:var(--brand); color:var(--bg); }
.watch-menu-item span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.watch-menu-item small { color:var(--muted); font-size:11px; font-weight:600; }
.watch-menu-item:disabled { opacity:.5; cursor:progress; }
.watch-menu-new { display:flex; gap:6px; margin-top:6px; padding-top:10px; border-top:1px solid var(--line); }
.watch-menu-new input { flex:1; min-width:0; height:38px; padding:0 12px; border:1px solid var(--line); border-radius:11px; background:var(--surface-2); color:var(--ink); font:600 13px var(--font-ui,inherit); outline:none; }
.watch-menu-new input:focus { border-color:color-mix(in srgb,var(--mt-gold,var(--brand)) 55%,var(--line)); box-shadow:0 0 0 3px color-mix(in srgb,var(--mt-gold,var(--brand)) 14%,transparent); }
.watch-menu-new button { flex:none; width:38px; min-width:38px; height:38px; min-height:38px; padding:0; }

/* The collection's multi-select bar (js/collection.js) */
.collection-bulkbar .watch-bulkbar-count { margin-right:auto; }
.collection-bulk-group { display:flex; align-items:center; gap:6px; }
.collection-bulk-group .select-control { height:36px; }
.collection-bulk-group input.select-control { width:92px; padding:0 10px; }
.collection-bulkbar button { min-height:36px; }
@media (max-width:760px) {
  .collection-bulkbar { display:grid; grid-template-columns:1fr; }
  .collection-bulk-group { display:grid; grid-template-columns:1fr auto auto; }
  .collection-bulk-group input.select-control { width:100%; }
}

/* eBay (js/ebay.js) */
.link-button { padding:0;border:0;background:none;color:var(--brand);font:inherit;font-weight:700;cursor:pointer; }
.link-button:disabled { opacity:.5;cursor:progress; }
.ebay-chip { display:inline-block;margin-right:4px;padding:1px 7px;border-radius:999px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line);color:var(--muted);font-size:10px;font-style:normal;font-weight:800; }
.ebay-chip.is-live { color:#197551;box-shadow:inset 0 0 0 1px rgba(37,168,117,.4); }
.ebay-chip.is-sold { color:var(--brand);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand) 40%,transparent); }
.ebay-chip.is-error { color:var(--danger); }
.ebay-tracked { display:grid;gap:8px;margin-top:12px;padding:12px;border-radius:9px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line); }
.ebay-tracked:empty { display:none; }
.ebay-tracked-head { display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--muted);font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em; }
.ebay-tracked-head .link-button { font-size:11px;text-transform:none;letter-spacing:0; }
.ebay-tracked-list { display:grid;gap:6px; }
.ebay-tracked-item { display:grid;grid-template-columns:38px minmax(0,1fr) auto 24px;align-items:center;gap:9px; }
.ebay-tracked-item.is-inactive { opacity:.6; }
.ebay-tracked-item img, .ebay-tracked-noimg { width:38px;height:38px;border-radius:7px;object-fit:cover;background:var(--surface); }
.ebay-tracked-noimg { display:grid;place-items:center;color:var(--muted);font-size:9px;font-weight:800; }
.ebay-tracked-item a { display:grid;min-width:0;color:inherit;text-decoration:none; }
.ebay-tracked-item a b { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px; }
.ebay-tracked-item a small { color:var(--muted);font-size:10px; }
.ebay-tracked-item strong { font-size:13px; }
.ebay-tracked-remove { width:24px;height:24px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:16px;cursor:pointer; }
.ebay-tracked-remove:hover { background:var(--surface);color:var(--danger); }
.ebay-tracked > small { color:var(--muted);font-size:10px; }
.ebay-account-line { display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px;margin-bottom:12px; }
.ebay-account-line span { color:var(--muted);font-size:12px; }
.ebay-preset-grid .ebay-field-wide { grid-column:1/-1; }
.ebay-preset-grid textarea { min-height:96px;padding:10px;resize:vertical;font:inherit;font-size:13px;line-height:1.45; }
.settings-card-ebay-preset code { font-size:11px;word-break:break-word; }
.ebay-status-bar { display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0 0 18px;padding:10px 14px;border-radius:12px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line); }
.ebay-status-bar .user-settings-status { margin-left:0;font-size:10px; }
.ebay-status-bar .secondary-button { margin-left:auto;min-height:34px; }
.ebay-section { margin-bottom:26px; }
.ebay-section .sheet-section-head { display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:10px; }
.ebay-section .sheet-section-head > span { color:var(--muted);font-size:11px; }
.ebay-section .sheet-section-head > button:first-of-type, .ebay-section .sheet-section-head .deal-filter-chips { margin-left:auto; }
.ebay-drafts, .ebay-sales { display:grid;gap:8px; }
/* A draft: the thumb beside title and details; error, description and controls run across the
   whole card. The description is not a .select-control -- the theme rounds those to pills. */
.ebay-draft { display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:10px 14px;padding:12px 14px;border-radius:14px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line); }
.ebay-draft > :not(.sheet-thumb,.ebay-draft-main) { grid-column:1/-1; }
.ebay-draft.is-failed { box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--danger) 45%,var(--line)); }
.ebay-draft.is-published { opacity:.85; }
.ebay-draft-main { display:grid;grid-template-columns:minmax(0,1fr);gap:5px;min-width:0; }
.ebay-draft-main > small { color:var(--muted);font-size:11px; }
.ebay-draft-titlebar { display:flex;align-items:center;gap:10px;min-width:0; }
.ebay-draft-title { flex:1;min-width:0;width:100%;height:36px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);color:var(--ink);font-weight:700; }
.ebay-draft-title:disabled { height:auto;padding:0;border-color:transparent;background:transparent; }
.ebay-draft-titlebar .ebay-draft-count { flex:none;color:var(--muted);font-size:10px;font-variant-numeric:tabular-nums; }
.ebay-draft-error { margin:0;color:var(--danger);font-size:11px;line-height:1.45; }
.ebay-draft-more summary { width:max-content;color:var(--brand);font-size:11px;font-weight:700;cursor:pointer; }
.ebay-draft-more[open] summary { margin-bottom:6px; }
.ebay-draft-more .ebay-draft-description { display:block;width:100%;min-height:96px;margin:0 0 6px;padding:9px 11px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);color:var(--ink);font:inherit;font-size:12px;line-height:1.5;resize:vertical; }
.ebay-draft-aspects { display:block;color:var(--muted);font-size:10px; }
.ebay-draft-controls { display:flex;flex-wrap:wrap;align-items:end;gap:10px 14px; }
/* Own photos of the card (js/ebay-photos.js) */
.ebay-photos { display:flex;flex-wrap:wrap;align-items:center;gap:6px; }
.ebay-photo, .ebay-photo-add { position:relative;display:grid;place-items:center;width:52px;height:52px;padding:0;overflow:hidden;border:0;border-radius:9px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line);cursor:pointer; }
.ebay-photo img { width:100%;height:100%;object-fit:cover; }
.ebay-photo i { position:absolute;inset:auto 0 0;padding:1px 0;background:color-mix(in srgb,var(--ink) 62%,transparent);color:var(--surface);font-size:9.5px;font-style:normal;font-weight:800;text-align:center;text-transform:uppercase;letter-spacing:.04em; }
.ebay-photo:hover, .ebay-photo-add:hover { box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--brand) 55%,var(--line)); }
.ebay-photo-add { align-content:center;gap:0;border:1px dashed color-mix(in srgb,var(--muted) 55%,transparent);box-shadow:none;color:var(--muted); }
.ebay-photo-add span { font-size:18px;line-height:1; }
.ebay-photo-add b { font-size:9px; }
.ebay-photos-hint { flex:1 1 180px;color:var(--muted);font-size:10px;line-height:1.4; }
.ebay-listing-photos { display:grid;gap:10px;margin-top:6px;padding:12px;border-radius:12px;background:var(--surface-2); }
.ebay-listing-photos .ebay-photo, .ebay-listing-photos .ebay-photo-add { background:var(--surface); }
.ebay-listing-photo-actions { display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px; }
.ebay-listing-photo-actions > button { min-height:34px;padding-inline:14px; }
@media (max-width:640px) { .ebay-listing-photo-actions > button { flex:1; } }
.ebay-crop-overlay .dl-modal { width:min(760px,100%); }
.ebay-crop-stage { position:relative;display:grid;place-items:center;min-height:240px;overflow:hidden;border-radius:14px;background:#14120f;user-select:none; }
.ebay-crop-stage canvas { display:block;max-width:100%; }
.ebay-crop-box { position:absolute;box-shadow:0 0 0 9999px rgba(10,9,7,.58);outline:2px solid #fff;outline-offset:-1px;cursor:move;touch-action:none; }
.ebay-crop-box::before, .ebay-crop-box::after { content:"";position:absolute;inset:33.33% 0;border-block:1px solid rgba(255,255,255,.35);pointer-events:none; }
.ebay-crop-box::after { inset:0 33.33%;border-block:0;border-inline:1px solid rgba(255,255,255,.35); }
.ebay-crop-handle { position:absolute;width:22px;height:22px;border:3px solid #fff;touch-action:none; }
.ebay-crop-handle.is-nw { left:-3px;top:-3px;border-right:0;border-bottom:0;cursor:nwse-resize; }
.ebay-crop-handle.is-ne { right:-3px;top:-3px;border-left:0;border-bottom:0;cursor:nesw-resize; }
.ebay-crop-handle.is-sw { left:-3px;bottom:-3px;border-right:0;border-top:0;cursor:nesw-resize; }
.ebay-crop-handle.is-se { right:-3px;bottom:-3px;border-left:0;border-top:0;cursor:nwse-resize; }
.ebay-crop-tools { display:flex;flex-wrap:wrap;align-items:center;gap:8px; }
.ebay-crop-tools .deal-filter-chips { flex:0 1 auto; }
.ebay-crop-tools .spacer { flex:1; }
.ebay-crop-tools .icon-button { width:38px;height:38px;font-size:17px; }
.ebay-crop-message { margin:0;color:var(--danger); }
.ebay-crop-overlay .dl-modal-body > * { min-width:0; }
.ebay-crop-overlay .dl-modal-actions { flex-wrap:wrap; }
@media (max-width:640px) {
  .ebay-crop-overlay .dl-modal { padding:18px 16px 16px; }
  .ebay-crop-tools .spacer, .ebay-crop-overlay .dl-modal-actions .spacer { flex-basis:100%;height:0; }
  .ebay-crop-tools .secondary-button { flex:1; }
  .ebay-crop-overlay .dl-modal-actions > button { flex:1; }
}
.ebay-draft-controls .ebay-draft-actions { margin-left:auto; }
.ebay-draft-fields { display:grid;grid-template-columns:96px 72px 210px;gap:8px; }
.ebay-draft-fields label { display:grid;gap:4px;color:var(--muted);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em; }
.ebay-draft-fields input, .ebay-draft-fields .select-control { width:100%;height:36px;padding:0 9px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);color:var(--ink);font-size:13px;font-weight:700;text-transform:none;letter-spacing:0; }
.ebay-draft-actions { display:flex;flex-wrap:wrap;align-items:center;gap:6px; }
.ebay-draft-actions .secondary-button, .ebay-draft-actions .primary-button { min-height:36px;padding-inline:14px; }
.ebay-done summary { margin:10px 0;color:var(--muted);font-size:12px;font-weight:700;cursor:pointer; }
/* "Meine Angebote" as a grid of tiles (js/ebay.js ebayListingRow). */
.ebay-listings { display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px; }
.ebay-listing { display:flex;flex-direction:column;min-width:0;overflow:hidden;border-radius:16px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);transition:box-shadow .18s ease,transform .18s ease; }
.ebay-listing:hover { box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand) 28%,var(--line)),0 10px 24px rgba(0,0,0,.08); }
.ebay-listing-media { position:relative;display:grid;place-items:center;aspect-ratio:4/5;padding:16px;background:var(--surface-2); }
.ebay-listing-media img { max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;box-shadow:0 8px 18px rgba(0,0,0,.18); }
.ebay-listing-media .ebay-tracked-noimg { width:64px;height:64px;border-radius:12px; }
.ebay-listing-badges { position:absolute;inset:10px 10px auto;display:flex;align-items:center;justify-content:space-between;gap:6px;pointer-events:none; }
.ebay-listing-badges .ebay-chip { margin:0 0 0 auto;background:var(--surface); }
.ebay-listing-rank { padding:3px 9px;border-radius:999px;background:var(--brand);color:var(--bg);font-size:11px;font-weight:800; }
.ebay-listing-main { display:flex;flex:1;flex-direction:column;gap:7px;min-width:0;padding:12px 14px 14px; }
.ebay-listing-main a { color:inherit;text-decoration:none; }
.ebay-listing-title b { display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:13px;line-height:1.35; }
.ebay-listing-title:hover b { text-decoration:underline;text-underline-offset:2px; }
.ebay-listing-main small { color:var(--muted);font-size:11px; }
.ebay-listing-foot { display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-top:auto;padding-top:4px; }
.ebay-listing-foot .ebay-listing-price { display:flex;align-items:baseline;gap:8px;justify-items:start;font-size:17px; }
.ebay-listing-card { display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;padding-top:8px;border-top:1px solid var(--line);font-size:11px; }
.ebay-listing-card-name { overflow:hidden;color:var(--muted);text-overflow:ellipsis;white-space:nowrap; }
.ebay-listing-card-actions { display:flex;flex:none;gap:12px; }
.ebay-listing:not(.ebay-listing-active) .ebay-listing-media img { filter:grayscale(.35);opacity:.8; }
/* A tile with an open panel (photos, linking a card) spans the row, side by side. */

.ebay-link-search { display:grid;gap:6px;margin-top:4px; }
.ebay-link-heading { font-size:11px;color:var(--muted); }
.sheet-ebay { color:var(--muted); }
.sheet-ebay a { color:var(--brand);font-weight:700;text-decoration:none; }
.sheet-options:has(.sheet-ebay-sync) { grid-template-columns:1.4fr 1fr 1fr auto; }
.sheet-ebay-sync-row { display:flex;align-items:center;gap:8px;height:36px;color:var(--ink);font-size:12px;font-weight:600;text-transform:none;letter-spacing:0;white-space:nowrap;cursor:pointer; }
.sheet-options .oauth-toggle-control input { width:1px;height:1px;padding:0;border:0; }
@media(max-width:640px){ .sheet-options:has(.sheet-ebay-sync) { grid-template-columns:1fr; } }
.ebay-link-suggestions { display:grid;gap:2px; }
.ebay-link-suggestions button { padding:6px 8px;border:0;border-radius:7px;background:var(--surface-2);color:var(--ink);text-align:left;font-weight:700;cursor:pointer; }
.ebay-link-suggestions button small { color:var(--muted);font-weight:500; }
/* The same chips as the finishes under a card in the collection grid (.variant-chip). */
.ebay-listing-stats { display:flex;flex-wrap:wrap;gap:4px; }
.ebay-listing-stats .ebay-stat { padding:3px 8px;border-radius:999px;font-size:9px;letter-spacing:.03em;white-space:nowrap; }
.ebay-listing-stats .ebay-stat b { color:inherit;font-weight:800; }
.ebay-rank { color:var(--brand);font-weight:800; }
.ebay-revise-parts { display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px; }
.ebay-revise-list { display:grid;gap:4px;max-height:46vh;overflow-y:auto;margin-top:8px; }
.ebay-revise-row { display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);font-size:12px;cursor:pointer; }
.ebay-revise-row span { display:grid;min-width:0; }
.ebay-revise-row b, .ebay-revise-row small { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.ebay-revise-row small { color:var(--muted); }
.ebay-revise-row.is-skipped { opacity:.55;cursor:default; }
.ebay-revise-state { max-width:220px;font-size:11px;font-style:normal;font-weight:700; }
.ebay-revise-state.is-done { color:var(--success); }
.ebay-revise-state.is-failed { color:var(--danger);white-space:normal; }
.ebay-listing-price { display:grid;justify-items:end;gap:1px; }
.ebay-vs-market { color:var(--muted);font-size:10px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums; }
.ebay-vs-market.is-below { color:var(--success,#12805b); }
.ebay-vs-market.is-above { color:var(--danger,#b4232a); }
/* The palette's green and red are tuned for the dark appearance; on cream they need more depth. */
body.mobile-light .ebay-vs-market.is-below { color:#2e7a58; }
body.mobile-light .ebay-vs-market.is-above { color:#b2433b; }
.ebay-aspects { display:grid;gap:6px;margin-bottom:8px; }
.ebay-aspect-row { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr) auto;gap:8px;align-items:center; }
.ebay-stats-tiles { display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;margin-bottom:14px; }
.ebay-stats-tiles div { display:grid;gap:2px;padding:10px 12px;border-radius:12px;background:var(--surface-2); }
.ebay-stats-tiles b { font-size:18px; }
.ebay-stats-tiles span { color:var(--muted);font-size:11px; }
.ebay-stats-controls { display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:10px;margin-bottom:10px; }
.ebay-stats-controls .deal-filter-chips { flex:0 0 auto;flex-wrap:nowrap;align-items:center;min-height:42px; }
.ebay-stats-controls .dl-field { flex:0 1 260px;min-width:200px; }
.ebay-stats-table { display:grid;gap:4px;overflow-x:auto; }
/* Every row is a grid of its own, so the columns have fixed widths: "auto" tracks differ per row. */
.ebay-stats-row { display:grid;grid-template-columns:30px minmax(170px,1fr) 78px 80px 60px 88px 66px 62px 76px;gap:8px;align-items:center;min-width:790px;padding:8px 10px;border-radius:10px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);font-size:12px;font-variant-numeric:tabular-nums; }
.ebay-stats-row > :nth-child(n+3) { justify-self:end;text-align:right; }
.ebay-stats-row.is-head { background:transparent;box-shadow:none;color:var(--muted);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.03em; }
.ebay-stats-row a { display:grid;min-width:0;color:inherit;text-decoration:none; }
.ebay-stats-row a b, .ebay-stats-row a small { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.ebay-stats-row a small { color:var(--muted); }
.ebay-link-search input { height:34px;padding:0 10px; }
.ebay-link-results { display:grid;gap:2px; }
.ebay-link-results button { padding:6px 8px;border:0;border-radius:7px;background:var(--surface-2);color:var(--ink);text-align:left;font-weight:700;cursor:pointer; }
.ebay-link-results button small { color:var(--muted);font-weight:500; }
.ebay-sale { display:grid;grid-template-columns:130px minmax(0,1fr) minmax(0,140px) auto;align-items:center;gap:12px;padding:8px 14px;border-radius:10px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);font-size:12px; }
.ebay-sale span { color:var(--muted); }
.ebay-sale b { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
@media (max-width:860px) {
  .ebay-preset-grid { grid-template-columns:1fr; }
}
@media (max-width:640px) {
  .ebay-draft-controls { display:grid; }
  .ebay-draft-fields { grid-template-columns:1fr 1fr; }
  .ebay-draft-fields label:last-child { grid-column:1/-1; }
  .ebay-draft-controls .ebay-draft-actions { margin-left:0; }
  .ebay-draft-actions > :is(.primary-button,.secondary-button) { flex:1; }
  .ebay-section .sheet-section-head .deal-filter-chips { flex-basis:100%;margin-left:0; }
  /* A listing: the price goes under the details instead of squeezing the title. */
  .ebay-listing-foot .ebay-listing-price { font-size:15px; }
  .ebay-sale { grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;padding:9px 12px; }
  .ebay-sale > b { grid-column:1/-1;grid-row:1;white-space:normal; }
  .ebay-sale-date { grid-column:1;grid-row:2;font-size:11px; }
  .ebay-sale-buyer { grid-column:1;grid-row:3;font-size:11px; }
  .ebay-sale > strong { grid-column:2;grid-row:2/4;align-self:center; }
  /* Statistics: each listing as a card, its numbers as labelled chips. */
  .ebay-stats-table { overflow-x:visible; }
  .ebay-stats-row.is-head { display:none; }
  .ebay-stats-row { display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;min-width:0;padding:10px 12px; }
  .ebay-stats-row > a { flex:1 1 55%;min-width:0; }
  .ebay-stats-row > [data-label] { padding:3px 8px;border-radius:999px;background:var(--surface-2);font-size:11px; }
  .ebay-stats-row > [data-label]::after { content:" " attr(data-label);color:var(--muted);font-size:9px;font-weight:700; }
}

/* Settings dialogs (openSettingsModal in js/settings.js): eBay on its tab, sales & trade on the
   sheets page. Their controls are not .select-control on purpose -- the theme rounds those to
   pills; every field here keeps the same fixed radius. */
.dl-modal-overlay { z-index:120; }
.dl-modal { width:min(880px,100%);max-height:none;padding:26px 28px 24px;border:1px solid var(--line);border-radius:24px;background:var(--surface);color:var(--ink);box-shadow:0 30px 90px rgba(0,0,0,.35); }
.dl-modal-head { display:flex;align-items:flex-start;gap:16px;margin-bottom:18px; }
.dl-modal-head h2 { margin:0 0 6px;font-size:26px; }
.dl-modal-head p { max-width:62ch;margin:0;color:var(--muted);font-size:13px;line-height:1.5; }
.dl-modal-head .eyebrow { color:var(--mt-gold,var(--brand)); }
.dl-modal-head .close-button { flex:none;margin-left:auto; }
.dl-modal-body { display:grid;gap:14px; }
.dl-modal-section { padding:18px 20px;border-radius:18px;background:var(--surface-2);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--line) 70%,transparent); }
.dl-modal-section h3 { display:flex;align-items:baseline;gap:10px;margin:0 0 14px;font-size:19px; }
.dl-modal-section h3 small { color:var(--muted);font:600 11px var(--font-ui,inherit);letter-spacing:0; }
.dl-modal-section h4 { margin:18px 0 10px;color:var(--mt-gold,var(--brand));font:800 10px var(--font-ui,inherit);letter-spacing:.12em;text-transform:uppercase; }
.dl-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px; }
.dl-grid-wide { grid-template-columns:1fr; }
.dl-field { display:flex;flex-direction:column;gap:6px;min-width:0;color:var(--muted);font-size:11px;font-weight:700; }
.dl-field i { font-style:normal;color:var(--ink); }
body .dl-modal .dl-control { width:100%;min-width:0;min-height:42px;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--ink);font:600 13px var(--font-ui,inherit);outline:none;box-shadow:none; }
body .dl-modal select.dl-control { padding-right:30px; }
body .dl-modal textarea.dl-control { min-height:120px;padding:11px 12px;resize:vertical;font:500 12.5px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
body .dl-modal .dl-control:focus { border-color:color-mix(in srgb,var(--mt-gold,var(--brand)) 55%,var(--line));box-shadow:0 0 0 3px color-mix(in srgb,var(--mt-gold,var(--brand)) 14%,transparent); }
.dl-check { display:flex;align-items:center;gap:10px;min-height:42px;padding:8px 12px;border-radius:11px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);cursor:pointer; }
.dl-check input { width:18px;height:18px;accent-color:var(--brand); }
.dl-check span { display:grid;gap:2px; }
.dl-check b { font-size:12px; }
.dl-check small { color:var(--muted);font-size:10px; }
.dl-hint { margin:14px 0 0;color:var(--muted);font-size:11.5px;line-height:1.7; }
.dl-hint code { padding:1px 5px;border-radius:5px;background:var(--surface);font-size:10.5px; }
.dl-segmented { display:inline-flex;flex-wrap:wrap;gap:4px;padding:4px;border-radius:13px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line); }
.dl-segmented button { min-height:34px;padding:0 16px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-weight:700;cursor:pointer; }
.dl-segmented button.active { background:var(--surface-2);color:var(--ink);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--mt-gold,var(--brand)) 45%,var(--line)); }
.dl-modal-actions { display:flex;align-items:center;gap:10px;margin-top:4px; }
.dl-modal-actions .spacer { flex:1; }
.dl-modal-section .dl-modal-actions { margin-top:14px; }
.dl-account-row { display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:14px; }
.dl-account-row > div { display:grid;gap:3px;min-width:0; }
.dl-account-row small { color:var(--muted);font-size:11.5px;line-height:1.45; }
.dl-account-row .user-settings-status { margin-left:0; }
.dl-modal .reddit-communities .settings-field { margin-bottom:4px; }
@media (max-width:760px) {
  .dl-modal-overlay { padding:12px; }
  .dl-modal { padding:20px 16px;border-radius:20px; }
  .dl-modal-section { padding:14px; }
  .dl-account-row { grid-template-columns:1fr; }
}

/* The gear at the end of the sheets tabs, and the side switch of the sheet editor */
.sheet-tabs { align-items:center; }
.sheet-tabs-settings { display:inline-grid;place-items:center;width:38px;min-width:38px;height:38px;min-height:38px;margin-left:auto;padding:0; }
.sheet-tabs-settings svg { width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
.sheet-side-switch { flex:none;display:inline-flex;padding:3px;margin-right:4px; }
.sheet-side-switch button { min-height:34px;padding:0 14px; }

/* Settings: sign-in methods inside the account card */
.account-sign-in { display:grid;gap:8px;margin-top:16px; }
.account-sign-in-row { display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:12px 14px;border-radius:14px;background:color-mix(in srgb,var(--surface) 48%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--line) 60%,transparent); }
.account-sign-in-row > div { display:grid;gap:3px;min-width:0; }
.account-sign-in-row b { font-size:13px; }
.account-sign-in-row small { color:var(--muted);font-size:11px; }
.account-sign-in-row .user-settings-status { margin-left:0; }
.account-settings-actions .spacer { flex:1; }
@media (max-width:760px) { .account-sign-in-row { grid-template-columns:1fr auto; } .account-sign-in-row > :last-child { grid-column:1/-1; } }

/* The drafts section of the eBay tab folds: its head is the switch, the bulk actions stay in it. */
.ebay-section-toggle { display:inline-flex;align-items:center;gap:10px;margin:0;padding:4px 8px 4px 0;border:0;background:none;color:var(--ink);font:inherit;cursor:pointer; }
.ebay-section-toggle>b { font-size:inherit; }
.ebay-section-toggle>span { color:var(--muted);font-size:11px; }
.ebay-section-toggle>i { display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--surface-2); }
.ebay-section-toggle>i::before { content:"";width:7px;height:7px;border-right:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform:translateX(-1px) rotate(-45deg);transition:transform .2s ease; }
.ebay-section-toggle[aria-expanded="true"]>i::before { transform:translateY(-2px) rotate(45deg); }
.ebay-section-toggle:focus-visible { outline:2px solid color-mix(in srgb,var(--brand) 60%,transparent);outline-offset:3px;border-radius:999px; }
.ebay-drafts-body[hidden] { display:none; }
.ebay-drafts-body { margin-top:4px; }
/* (button.: one step more specific than the tab's "first button goes right" rule.) */
.ebay-section .sheet-section-head>button.ebay-section-toggle { margin-left:0; }
.ebay-section .sheet-section-head>.ebay-section-toggle+button { margin-left:auto; }
@media (max-width:760px) {
  .ebay-section .sheet-section-head.ebay-drafts-head>button.ebay-section-toggle { flex:1 1 100%; }
  .ebay-section .sheet-section-head.ebay-drafts-head>.ebay-section-toggle~button { flex:1 1 0;margin-left:0; }
}
/* The eBay tab's numbers (ebaySummaryPill): the dashboard's pill, with a quiet unit after a count. */
ophir-stat-pill.ebay-summary .ebay-summary-below>b { color:var(--success,#2b7553); }
ophir-stat-pill.ebay-summary .ebay-summary-above>b { color:var(--danger,#b23f37); }
/* Folding section heads of the "Verkäufe" tab: the switch on the left, its buttons together on
   the right (the tab's older rule pushed every first button of a head to the right). */
.ebay-section .sheet-section-head.ebay-drafts-head>.ebay-section-toggle~button { margin-left:0; }
.ebay-section .sheet-section-head.ebay-drafts-head>.ebay-section-toggle+button { margin-left:auto; }
.ebay-section .ebay-listing-filters { margin:4px 0 14px; }
/* Deals of the "Verkäufe" tab: status and search on one line, the platforms below. */
.sales-deals .deal-filters { display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,320px);grid-template-areas:"status search" "platform platform";align-items:center;gap:10px 16px;margin-bottom:12px; }
.sales-deals .deal-filters>.deal-filter-chips { grid-area:status;flex-wrap:wrap;margin:0; }
.sales-deals .deal-filters>.deal-platform-chips { grid-area:platform; }
.sales-deals .deal-filters>.filter-search { grid-area:search;width:100%;max-width:none; }
@media (max-width:760px) {
  .sales-deals .deal-filters { grid-template-columns:minmax(0,1fr);grid-template-areas:"status" "platform" "search"; }
}

/* ---- "Verkauf & Tausch": head like the dashboard, listing tiles --------------------------------- */
.sales-nav-tools { display:flex;flex:none;align-items:center;gap:8px; }
.ebay-listing-tools { display:flex;flex:none;align-items:center;gap:8px;margin-left:auto; }
.sales-nav-tools .sales-sync { min-height:34px; }
.sales-nav-tools .icon-button { width:34px;height:34px; }
.sales-nav-tools .sales-sync { display:inline-flex;align-items:center;gap:8px; }
.sales-nav-tools .sales-sync svg { width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.sales-nav-tools .sales-sync.has-error { position:relative; }
.sales-nav-tools .sales-sync.has-error::after { content:"";position:absolute;top:6px;right:8px;width:8px;height:8px;border-radius:50%;background:var(--danger); }
.sales-nav-tools .icon-button svg { width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6; }
.sheets-list-head { display:flex;align-items:center;gap:10px;margin-bottom:12px; }
.sheets-list-head>span { color:var(--muted);font-size:11px; }
.sheets-list-head>button { margin-left:auto; }
.sales-deals .sheet-section-head { display:flex;align-items:center;gap:10px; }
.sales-deals .sheet-section-head>button { margin-left:auto; }
.ebay-listing-filters { display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 0 14px; }
.ebay-listing-sort select { height:30px;padding:0 26px 0 12px;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--muted);font:600 12px var(--font-ui,inherit);cursor:pointer; }
.ebay-listing-sort select:hover,.ebay-listing-sort select:focus { color:var(--ink);border-color:color-mix(in srgb,var(--brand) 30%,var(--line)); }
.sr-only { position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap; }
.ebay-drafts-toolbar { display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:12px; }
.ebay-drafts-toolbar>span { margin-right:auto;color:var(--muted);font-size:12px; }
.ebay-drafts-overlay .dl-modal { width:min(1040px,100%); }

/* Listing tiles: three to a row -- the card and its text side by side, the numbers one row
   across the tile below them, an opened panel below that. Opening one leaves the others as they are. */
.ebay-listings { grid-template-columns:repeat(3,minmax(0,1fr));align-items:start; }
.ebay-listing { display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px 14px;padding:12px; }
.ebay-listing>.ebay-listing-stats,.ebay-listing>.ebay-listing-photos,.ebay-listing>.ebay-link-search { grid-column:1/-1;margin:0; }
.ebay-listing-media { aspect-ratio:5/7;padding:0;border-radius:9px;background:var(--surface-2);overflow:hidden; }
.ebay-listing-media img { width:100%;height:100%;max-width:none;max-height:none;object-fit:cover;border-radius:9px;box-shadow:none; }
.ebay-listing-rank { position:absolute;top:6px;left:6px; }
.ebay-listing>.ebay-listing-stats { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px; }
.ebay-listing>.ebay-listing-stats .ebay-stat { display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;padding:5px 8px;border-radius:999px;background:var(--surface-2);color:var(--muted);font-size:12px;letter-spacing:0;text-transform:none; }
.ebay-listing>.ebay-listing-stats .ebay-stat svg { flex:none;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.ebay-listing>.ebay-listing-stats .ebay-stat b { color:var(--ink);font-weight:750;font-variant-numeric:tabular-nums; }
.ebay-listing-main { gap:7px;padding:2px 0 0; }
.ebay-listing-title b { -webkit-line-clamp:2;font-size:15px;line-height:1.25; }
.ebay-listing-sub { display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-top:3px;color:var(--muted);font-size:11px;line-height:1.35; }
.ebay-listing-meta { display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px; }
.ebay-listing-meta .ebay-chip { margin:0; }
@media (max-width:1180px) { .ebay-listings { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) {
  .ebay-listings { grid-template-columns:minmax(0,1fr);gap:10px; }
  .ebay-listing { grid-template-columns:96px minmax(0,1fr);gap:12px;padding:10px; }
  .ebay-listing-filters { flex-wrap:wrap; }
}
.ebay-listing>.ebay-listing-photos .ebay-listing-photo-actions>button { flex:1 1 0;min-width:0;min-height:34px;padding-inline:10px;font-size:12px; }
@media (max-width:760px) {
  .ebay-listing-tools { flex:1 1 100%;min-width:0;margin-left:0; }
  .ebay-listing-sort { flex:1;min-width:0; }
  .ebay-listing-sort select { width:100%; }
  .sales-nav-tools .sales-sync { width:34px;padding:0;justify-content:center; }
  .sales-nav-tools .sales-sync span { display:none; }
}
