:root {
  color-scheme: dark;
  --ink: #101015;
  --surface: #19191f;
  --raised: #222229;
  --line: #303038;
  --text: #f5efe7;
  --muted: #b1aab0;
  --accent: #edc487;
  --accent-text: #20180f;
  --warning: #ffc196;
  --radius: 16px;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--text);
  background: var(--ink);
  font-size: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 275px; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .brand { font-family: "Bricolage Grotesque", system-ui, sans-serif; }
h1 { font-size: clamp(2.7rem, 7vw, 5.6rem); letter-spacing: -.075em; line-height: .98; font-weight: 750; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.035em; }
h3 { font-size: 1.08rem; }
.container { width: min(100% - 64px, 1240px); margin-inline: auto; }
.skip { position: fixed; left: 1rem; top: -5rem; z-index: 30; background: var(--accent); color: var(--accent-text); padding: .8rem; }
.skip:focus { top: 1rem; }
.topbar { border-bottom: 1px solid #2c292c; background: #141418; position: relative; z-index: 5; }
.topbar-inner { width: min(100% - 64px, 1240px); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; min-height: 75px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.27rem; font-weight: 750; letter-spacing: -.035em; line-height: 1.05; }
.brand small { font: 700 .65rem/1.5 "DM Sans", sans-serif; color: var(--accent); letter-spacing: .12em; display: block; margin-top: 3px; }
nav { display: flex; gap: 8px; }
nav a { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; font-size: .9rem; min-height: 42px; border-radius: 9px; padding: 0 12px; color: var(--muted); white-space: nowrap; }
nav a:hover, nav a[aria-current="page"] { background: #27232a; color: var(--accent); }
.nav-short { display: none; }
.icon { width: 19px; height: 19px; flex: 0 0 auto; vertical-align: middle; stroke: currentColor; fill: none; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.hero { position: relative; isolation: isolate; display: flex; align-items: end; overflow: hidden; min-height: clamp(280px, 34vw, 430px); border: 1px solid #5c4630; border-radius: 22px; margin-top: 30px; background: radial-gradient(ellipse at 85% 25%, #53392b, transparent 65%), #211c23; }
.hero-art { position: absolute; z-index: -2; inset: 0 0 0 auto; width: 78%; height: 100%; object-fit: cover; object-position: center 36%; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #17151c 4%, #19151dea 22%, #21192271 59%, #20162620 100%), linear-gradient(0deg, #131116a6, transparent 55%); }
.hero-copy { padding: clamp(25px, 5vw, 62px); max-width: 700px; }
.hero-copy h1 { text-wrap: balance; }
.hero-copy h1 span { color: var(--accent); }
.hero-copy p { margin-top: 16px; color: #ddd0c9; font-size: clamp(.97rem, 2vw, 1.12rem); max-width: 420px; line-height: 1.5; }
.art-credit { position: absolute; right: 18px; bottom: 12px; font-size: .78rem; color: #f5ece0; text-shadow: 1px 1px 4px #000; max-width: 45%; text-align: right; }
.section { margin-top: 40px; margin-bottom: 48px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.muted { color: var(--muted); }
.count { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 17px; }
.search { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { border: 0; outline: 0; padding: 0; height: 50px; min-width: 0; width: 100%; background: transparent; color: var(--text); }
.search input::placeholder { color: #ada4aa; }
.search .shortcut { font-size: .8rem; border: 1px solid #48434b; border-radius: 5px; padding: 2px 7px; }
.button, .icon-button, .pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); color: var(--text); background: var(--raised); border-radius: 10px; padding: 0 14px; min-height: 44px; font-size: .91rem; font-weight: 650; }
.button:hover, .icon-button:hover, .pill:hover { border-color: #ad8455; color: var(--accent); }
.button.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.button.primary:hover { background: #ffda9d; }
.button.ghost { background: transparent; }
.icon-button { width: 44px; padding: 0; flex: 0 0 auto; }
.button[aria-pressed="true"], .icon-button[aria-pressed="true"], .pill[aria-pressed="true"] { border-color: var(--accent); background: #362a23; color: var(--accent); }
.segment { display: flex; gap: 4px; }
.color-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.color-controls .mana-symbol, .colors .mana-symbol { width: 22px; height: 22px; flex: 0 0 auto; }
.color-controls .icon-button { background: #19191f; }
.colors { display: flex; gap: 4px; align-items: center; }
.deck-grid { display: grid; grid-template-columns: repeat(3,minmax(0, 1fr)); gap: 16px; }
.deck-tile { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: border-color .15s, transform .15s; }
.deck-tile:hover { border-color: #9c784f; transform: translateY(-2px); }
.deck-tile:has(.select-deck[aria-pressed="true"]) { border-color: var(--accent); }
.deck-content { min-height: 100%; }
.deck-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.deck-tile:has(.deck-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.deck-art-wrap { height: clamp(120px,14vw,180px); overflow: hidden; position: relative; background: radial-gradient(ellipse at 68% 12%, #5b463b, #2a2331 60%, #24232c); }
.deck-art-wrap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #1a171db0, transparent 70%); }
.deck-art { width: 100%; height: 100%; object-fit: cover; object-position: center 36%; }
.deck-number { position: absolute; z-index: 1; left: 12px; top: 12px; color: #fbebd1; font-size: .85rem; font-weight: 750; padding: 4px 8px; background: #1a151bec; border-radius: 6px; }
.deck-info { padding: 15px; }
.deck-info h3 { font-size: 1.18rem; padding-right: 16px; }
.tile-commanders { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 9px; margin-top: 4px; font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.commander-link { position: relative; z-index: 2; border: 0; padding: 3px 0; min-height: 31px; background: transparent; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-align: left; overflow-wrap: anywhere; }
.commander-link:hover { color: var(--text); }
.deck-metadata { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; margin-top: 6px; }
.deck-metadata:empty { display: none; }
.deck-flag { display: inline-block; flex: 0 0 auto; width: 25px; height: 15px; border-radius: 2px; outline: 1px solid #f8eee833; }
.deck-power { color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; }
.deck-sort { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: .9rem; }
.deck-sort select, .settings-language select { min-height: 44px; max-width: 100%; padding-inline: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); }
.deck-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.select-deck { position: absolute; right: 10px; top: 10px; background: #1b161fed; border-color: #b1855c9d; z-index: 2; }
.deck-grid.list { grid-template-columns: 1fr; gap: 8px; }
.deck-grid.list .deck-content { display: flex; align-items: stretch; padding-right: 54px; }
.deck-grid.list .deck-info { flex: 1; }
.deck-grid.list .deck-art-wrap { width: 130px; height: auto; flex: 0 0 auto; }
.deck-grid.list .deck-art { position: absolute; inset: 0; }
.more { display: flex; justify-content: center; margin-block: 22px; }
.badge { border: 1px solid #66553d; background: #29221e; border-radius: 100px; color: #efc790; padding: 4px 8px; font-size: .77rem; white-space: nowrap; }
.deck-warning { display: inline-block; white-space: normal; margin-bottom: 10px; padding: 7px 11px; font-size: .88rem; }
.empty { border: 1px dashed #55505b; padding: 28px 22px; border-radius: var(--radius); color: var(--muted); }
.empty h2, .empty strong { color: var(--text); margin-bottom: 7px; display: block; }
.page { padding-block: 28px 52px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin-bottom: 15px; }
.deck-heading { position: relative; isolation: isolate; display: flex; align-items: flex-end; overflow: hidden; border: 1px solid #584732; min-height: 190px; background: #231e28; border-radius: var(--radius); margin-bottom: 28px; }
.deck-heading::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #1c1925 10%, #211b26e1 35%, #2119224d 90%); }
.deck-title { padding: clamp(18px, 4vw, 38px); }
.deck-title h1, .page-title { font-size: clamp(2.15rem, 6vw, 4rem); line-height: 1.06; letter-spacing: -.06em; }
.deck-title .colors { display: inline-flex; margin-right: 8px; }
.deck-language { display: inline-flex; gap: 7px; align-items: center; margin-inline: 8px; font-size: .9rem; }
.deck-stats { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 20px; padding: 10px 14px; }
.deck-stats dl { display: flex; gap: 14px 24px; flex-wrap: wrap; margin: 12px 0 4px; }
.deck-stats dt { color: var(--muted); font-size: .88rem; }
.deck-stats dd { margin: 2px 0 0; font-weight: 650; }
.deck-title > p { margin-top: 8px; color: #ded1ca; }
.deck-title small { display: block; color: #d3bfae; margin-bottom: 8px; font-weight: 650; font-size: .9rem; }
.commanders { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.commanders .button { background: #30272ee6; color: var(--accent); }
.card-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 16px; }
.facet { min-width: 0; flex: 1 1 155px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.facet summary { padding: 10px; overflow-wrap: anywhere; }
.facet-values { display: flex; gap: 4px; flex-wrap: wrap; max-height: 190px; overflow: auto; overscroll-behavior: contain; padding: 0 8px 8px; }
.facet-values .pill { min-height: 36px; padding-inline: 8px; text-align: left; overflow-wrap: anywhere; }
.facet-clear { min-height: 36px; padding-inline: 8px; margin: 0 8px 6px; }
.facet-search { display: block; width: calc(100% - 16px); min-height: 38px; margin: 0 8px 8px; padding-inline: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); color: var(--text); }
#filter-wrap button[hidden] { display: none; }
.deck-scope { margin-block: 4px 24px; }
.deck-scope .pill { text-align: left; }
.deck-scope [hidden] { display: none; }
.round-add { margin-top: 12px; }
.page-title + .empty { margin-top: 18px; }
.round-decks { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin: 0 0 22px; }
.round-deck-list { list-style: none; display: grid; gap: 4px; margin: 10px 0; padding: 0; }
.round-deck-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 0 0 4px; border-bottom: 1px solid var(--line); }
.settings-page { max-width: 680px; }
.settings-panel { display: grid; gap: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 20px; }
.settings-check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.settings-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.settings-language { display: flex; gap: 10px 18px; flex-wrap: wrap; align-items: center; }
.settings-panel p { font-size: .9rem; }
.card-types:not([hidden]) { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.card-types .pill { background: var(--surface); }
.card-types .pill[aria-pressed="true"] { background: #362a23; }
.card-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 14px; }
.gallery-card { position: relative; min-width: 0; }
.gallery-card .card-open { display: block; width: 100%; padding: 0; border-radius: 9px; }
.gallery-card .card-open:enabled::after { content: ""; position: absolute; inset: 0; border-radius: 9px; }
.gallery-card .card-open:focus-visible { outline: none; }
.gallery-card .card-open:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 3px; }
.gallery-card .card-open:hover strong { color: var(--accent); }
.gallery-image { display: grid; place-items: center; width: 100%; aspect-ratio: 488 / 680; overflow: hidden; border-radius: 9px; background: radial-gradient(ellipse at top, #3d3045, #241e28 70%); }
.gallery-photo { width: 100%; height: 100%; object-fit: contain; }
.gallery-title { display: block; padding: 8px 3px 0; color: var(--text); font-size: 1.06rem; line-height: 1.2; overflow-wrap: anywhere; }
.gallery-info { display: grid; gap: 4px; padding: 4px 3px 0; overflow-wrap: anywhere; }
.gallery-type-row, .gallery-costs { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.gallery-type, .gallery-no-cost { color: var(--muted); font-size: .875rem; line-height: 1.3; }
.gallery-text { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; white-space: pre-line; font-size: .89rem; line-height: 1.45; }
.list-rules { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; white-space: pre-line; font-size: .86rem; margin-top: 3px; }
.gallery-stats { flex-shrink: 0; white-space: nowrap; color: var(--accent); font-size: .875rem; font-weight: 700; }
.gallery-keywords { color: var(--accent); font-size: .85rem; }
.gallery-actions { display: flex; flex: 0 0 auto; }
.gallery-bookmark { position: relative; z-index: 1; flex: 0 0 34px; display: inline-grid; place-items: center; padding: 0; min-block-size: 32px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; }
.gallery-actions .gallery-bookmark { flex: 0 0 auto; width: 30px; }
.gallery-bookmark .icon { width: 17px; height: 17px; }
.gallery-bookmark:hover, .gallery-bookmark[aria-pressed="true"] { color: var(--accent); }
.gallery-bookmark[aria-pressed="true"] .icon { fill: currentColor; }
.card-list { display: grid; gap: 6px; }
.card-row { display: flex; align-items: center; gap: 7px; padding: 5px 7px; background: var(--surface); border: 1px solid #2a2930; border-radius: 10px; min-width: 0; }
.card-row:hover { border-color: #63513f; }
.card-open { min-width: 0; flex: 1; border: 0; background: transparent; text-align: left; color: var(--text); padding: 6px; display: flex; align-items: center; gap: 10px; }
.card-open:disabled { opacity: 1; cursor: default; }
.card-open .thumb { width: 44px; height: 52px; object-fit: cover; object-position: top; border-radius: 5px; flex-shrink: 0; background: #312838; }
.card-main { min-width: 0; flex: 1; }
.card-main strong { display: block; font-size: .99rem; }
.card-main small { display: block; font-size: .84rem; color: var(--muted); margin-top: 3px; }
.card-list .badge { white-space: normal; }
.source-decks { color: #ccb998; font-size: .85rem; line-height: 1.4; margin-top: 4px; }
.mana { display: inline-flex; flex-wrap: wrap; gap: 2px; vertical-align: baseline; }
.mana-symbol { display: inline-block; width: 1em; height: 1em; object-fit: contain; vertical-align: -0.12em; }
.mana .mana-symbol { width: 18px; height: 18px; }
.search-summary { margin: 14px 0; }
.footer { padding-block: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .83rem; }
.footer .container { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.footer button { border: 0; background: transparent; color: var(--accent); padding: 0; }
#notice:not(:empty) { position: fixed; background: #26202a; color: var(--text); z-index: 18; top: 12px; left: 50%; translate: -50% 0; border: 1px solid #8a7251; border-radius: 8px; padding: 10px 16px; max-width: 90%; box-shadow: 0 6px 22px #0007; }
.round-prompt:not([hidden]) { position: fixed; z-index: 8; bottom: max(12px, env(safe-area-inset-bottom)); left: 50%; translate: -50% 0; width: max-content; max-width: calc(100% - 24px); display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid #8a7251; border-radius: 12px; background: #26202a; box-shadow: 0 6px 22px #0007; }
.round-prompt-message { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .89rem; }
.round-prompt .button, .round-prompt-close { flex: 0 0 auto; }
.round-prompt-close { background: transparent; border-color: transparent; }
dialog { background: var(--surface); color: var(--text); border: 1px solid #655446; border-radius: 18px; width: min(760px, calc(100% - 26px)); max-height: calc(100dvh - 26px); max-height: min(90dvh, 850px); padding: 0; box-shadow: 0 10px 70px #000c; }
dialog::backdrop { background: #0b0913cf; backdrop-filter: blur(5px); }
.dialog-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; z-index: 1; top: 0; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-body { padding: 18px; }
.detail-grid { display: grid; grid-template-columns: minmax(135px, 1fr) minmax(0, 1.5fr); gap: 18px; }
.detail-image { margin-inline: auto; border-radius: 12px; }
.detail-text { white-space: pre-wrap; line-height: 1.52; margin-block: 12px; overflow-wrap: anywhere; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.rulings { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 12px; }
.rulings p { margin-top: 8px; color: var(--muted); line-height: 1.48; }
.rulings summary { color: var(--accent); }
.rule-term { display: inline; border: 0; padding: 0; border-radius: 3px; background: transparent; color: inherit; font: inherit; text-decoration: underline dotted var(--accent); text-underline-offset: .19em; }
.rule-term:hover, .rule-term:focus-visible { color: var(--accent); }
.rule-results { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.rule-results .pill { min-height: 36px; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.rule-explanation:not([hidden]) { margin: 10px 0 14px; padding: 12px; border: 1px solid #66553d; border-radius: 10px; background: #29221e; }
.rule-copy { display: grid; gap: 7px; }
.rule-explanation h3 small { color: var(--muted); font-size: .78em; font-weight: 500; }
.rule-description { line-height: 1.5; }
.rule-source { width: fit-content; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
#card-rule-search .search { margin-top: 10px; }
.login { max-width: 460px; margin: 58px auto; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.login p { margin-block: 11px 18px; color: var(--muted); }
.login form, .login label { display: grid; gap: 8px; }
.login form { gap: 14px; }
.login input { min-height: 45px; padding: 8px 10px; color: var(--text); background: var(--ink); border: 1px solid var(--line); border-radius: 8px; width: 100%; }
.form-error:not(:empty) { color: var(--warning); }
.admin-sources { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.admin-panel { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface); }
.admin-panel p { color: var(--muted); margin-block: 8px; overflow-wrap: anywhere; }
.admin-panel .button { margin-top: 8px; width: 100%; }
.admin-list { list-style: none; padding: 0; margin: 12px 0 28px; display: grid; gap: 6px; }
.admin-list li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; column-gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.admin-list li small { display: block; color: var(--muted); margin-top: 3px; font-size: .85rem; }
.admin-list .failed { color: var(--warning); }
@media (max-width: 900px) {
  .topbar-inner { align-items: stretch; flex-direction: column; gap: 6px; padding-block: 8px; }
  nav { justify-content: space-between; }
}
@media (max-width: 850px) {
  .container, .topbar-inner { width: calc(100% - 36px); }
  .deck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: 300px; }
  .hero-art { width: 100%; }
  .hero::after { background: linear-gradient(90deg,#17151ce9 3%,#19151dc2 40%,#21192230 85%),linear-gradient(0deg,#131116bc,transparent 55%); }
}
@media (max-width: 550px) {
  .container, .topbar-inner { width: calc(100% - 24px); }
  .topbar-inner { min-height: 63px; gap: 8px; }
  .brand { font-size: 1.13rem; gap: 6px; }
  .brand img { width: 32px; height: 32px; }
  .brand small { display: none; }
  nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
  nav a { flex-direction: column; justify-content: center; gap: 2px; padding: 3px 0; min-width: 0; font-size: .73rem; }
  .nav-label { display: none; }
  .nav-short { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .hero { margin-top: 15px; min-height: 255px; border-radius: 15px; }
  .hero-copy { padding: 21px 16px 35px; }
  .hero-copy p { font-size: .96rem; }
  .hero-art { object-position: 63% center; }
  .hero::after { background: linear-gradient(0deg,#16141e 4%,#19151dba 34%,#2119220a 100%),linear-gradient(90deg,#19151d80,transparent 80%); }
  .section { margin-top: 27px; }
  .toolbar { gap: 8px; }
  .toolbar .search { flex-basis: 100%; }
  .search .shortcut { display: none; }
  .color-controls { margin-right: auto; }
  .color-controls .icon-button { width: 35px; min-height: 37px; }
  .segment .icon-button { width: 36px; min-height: 37px; }
  .deck-grid { gap: 9px; }
  .deck-tile { border-radius: 12px; }
  .deck-art-wrap { height: 113px; }
  .deck-info { padding: 9px; }
  .deck-info h3 { font-size: 1rem; padding-right: 0; }
  .tile-commanders { font-size: .81rem; }
  .deck-footer { flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .deck-footer .mana-symbol { width: 18px; height: 18px; }
  .deck-number { left: 8px; top: 8px; }
  .select-deck { right: 6px; top: 6px; width: 41px; }
  .deck-grid.list .deck-art-wrap { width: 76px; }
  .page { padding-block: 16px 34px; }
  .deck-heading { min-height: 190px; }
  .card-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-actions .gallery-bookmark { width: 27px; }
  .card-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gallery-title, .gallery-info { padding-inline: 4px; }
  .card-row { gap: 2px; padding-inline: 4px; }
  .card-open { gap: 7px; }
  .card-open .thumb { width: 33px; height: 44px; }
  .card-row .icon-button { width: 40px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-image { max-height: 43vh; }
  .admin-sources { grid-template-columns: 1fr; }
  .commands { gap: 4px; }
}
@media (max-width: 325px) { .deck-grid, .card-gallery { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
