:root {
  color-scheme: light;
  --page: #f3f5f8;
  --white: #fff;
  --ink: #202734;
  --muted: #556273;
  --line: #dce2ea;
  --subtle: #edf1f6;
  --brand: #2559a5;
  --brand-dark: #164584;
  --tint: #e9f1fc;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.5 var(--sans); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 25px; line-height: 1.25; }
h2 { font-size: 17px; line-height: 1.4; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; color: inherit; background: none; }
button:disabled { opacity: .5; cursor: default; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { flex: none; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
#app { min-height: 100dvh; display: flex; flex-direction: column; }
.container, .topbar-inner, .bottom-nav-inner { width: min(1400px, calc(100% - 64px)); margin-inline: auto; }

.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 59px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; }
.brand-mark { position: relative; flex: none; width: 34px; height: 34px; overflow: hidden; }
.brand-mark img { position: absolute; inset: -49% auto auto -54%; width: 220%; max-width: none; }
.brand-text { font-size: 18px; font-weight: 750; }
.nav-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 11px; border-radius: 5px; white-space: nowrap; color: var(--muted); font-weight: 600; transition: background .15s, color .15s; }
.nav-link:hover { background: var(--subtle); color: var(--ink); }
.nav-link.active { background: var(--tint); color: var(--brand-dark); }
#app:has(.bottom-nav) { padding-bottom: calc(49px + env(safe-area-inset-bottom)); }
.bottom-nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 3; border-top: 1px solid var(--line); background: var(--white); padding: 4px 0 max(4px, env(safe-area-inset-bottom)); }
.bottom-nav-inner { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; }
.bottom-nav .nav-link:first-child { justify-self: start; }
.bottom-nav .nav-link:nth-child(2) { justify-self: center; }
.bottom-nav .nav-link:last-child { justify-self: end; }

.text-button { display: inline-flex; align-items: center; gap: 5px; justify-content: center; padding: 4px 0; color: var(--brand-dark); font-weight: 600; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.primary, .secondary, .detail-favorite { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 38px; border: 1px solid var(--line); border-radius: 5px; padding: 7px 13px; font-weight: 650; white-space: nowrap; transition: background .15s, border-color .15s; }
.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.secondary, .detail-favorite { background: var(--white); }
.secondary:hover, .detail-favorite:hover { background: var(--subtle); border-color: #c6d1df; }

.library { padding: 23px 0 48px; }
.library-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 30px; margin-bottom: 16px; border-bottom: 1px solid #cbd5e1; }
.library-head h1 { font-size: 22px; padding: 0 0 12px; }
.category-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.library-layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); align-items: start; gap: 18px; }
.filter-panel { position: sticky; top: 12px; max-height: calc(100dvh - 74px - env(safe-area-inset-bottom)); overflow: auto; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 7px; padding: 13px; }
.filter-heading { display: flex; align-items: center; justify-content: space-between; min-height: 26px; margin-bottom: 11px; }
.filter-heading h2 { font-size: 14px; }
.clear-filter { font-size: 12px; }
.dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dimensions label { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 12px; }
.dimension-input { display: flex; align-items: center; gap: 3px; border: 1px solid #cbd5e1; border-radius: 4px; padding-right: 7px; background: #fff; }
.dimension-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.dimension-input input { min-width: 0; width: 100%; min-height: 34px; padding: 4px 5px 4px 8px; border: 0; background: transparent; color: var(--ink); font-size: 14px; appearance: textfield; outline: none; }
.dimension-input input::-webkit-inner-spin-button, .dimension-input input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.dimensions .primary { grid-column: 1 / -1; min-height: 35px; }
.filter-row { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 10px; }
.filter-label { display: block; color: var(--muted); font-size: 12px; font-weight: 650; margin-bottom: 4px; }
.choices { display: flex; gap: 4px; flex-wrap: wrap; }
.choice { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 4px 8px; border-radius: 4px; white-space: nowrap; color: var(--muted); font-weight: 550; transition: background .15s, color .15s; }
.choice:hover { background: var(--subtle); color: var(--ink); }
.choice.selected { background: var(--tint); color: var(--brand-dark); font-weight: 700; }
.category-tabs .choice { min-height: 40px; padding: 3px 15px 8px; border-bottom: 3px solid transparent; border-radius: 0; font-size: 15px; }
.category-tabs .choice.selected { background: transparent; border-bottom-color: var(--brand); }
.filter-panel .choice { min-height: 30px; font-size: 13px; }

.results { min-width: 0; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 38px; margin-bottom: 12px; scroll-margin-top: 10px; }
.results-head h2 { color: var(--muted); font-size: 13px; font-weight: 500; }
.results-head strong { color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; }
.modes { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); }
.modes .choice { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.sidebar-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 11px; }
.sidebar-modes .choice { padding-inline: 0; font-size: 11px; }
.mobile-modes { display: none; }
.case-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px 12px; }
.gallery-tail { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 16px; color: var(--muted); text-align: center; }
.gallery-tail:empty { margin-top: 0; }
.case-card { position: relative; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: border-color .18s; }
.case-card:hover, .case-card:focus-within { border-color: #8eadd3; }
.case-link { display: block; }
.case-link:focus-visible { outline-offset: -2px; }
.case-image { position: relative; display: grid; place-items: center; aspect-ratio: 1.55; background: #e8edf2; overflow: hidden; }
.case-image img { width: 100%; height: 100%; object-fit: contain; animation: cover-in .2s ease-out; }
@keyframes cover-in { from { opacity: .6; } to { opacity: 1; } }
.case-image.plan-image { background: #f0ede5; }
.card-favorite { position: absolute; right: 5px; bottom: 4px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 5px; color: var(--muted); background: var(--white); transition: color .15s, background .15s; }
.card-favorite:hover, .card-favorite.selected { color: var(--brand-dark); background: var(--tint); }
.card-favorite.selected svg, .detail-favorite.selected svg { fill: #d62648; stroke: #d62648; }
.case-info { padding: 9px 10px 4px; }
.case-heading, .case-meta { display: flex; align-items: baseline; min-width: 0; gap: 7px; }
.case-heading { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; }
.case-size { flex: none; color: var(--ink); font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.case-title, .case-type, .case-code, .case-floor { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-floor { flex: 0 0 auto; max-width: 5em; color: var(--ink); }
.case-link:hover .case-title { color: var(--brand-dark); }
.case-meta { align-items: center; min-height: 34px; color: var(--muted); font-size: 12px; }
.case-meta { padding-right: 33px; }
.case-code { font-variant-numeric: tabular-nums; }
.sample-label { position: absolute; inset: 6px auto auto 6px; color: var(--ink); background: var(--white); font-size: 10px; border: 1px solid var(--line); border-radius: 3px; padding-inline: 3px; }
.missing-image { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 52px 16px; border: 1px dashed #c5d1de; border-radius: 7px; color: var(--muted); background: var(--white); }
.empty h3 { color: var(--ink); }

.subpage, .detail { padding-top: 24px; padding-bottom: 48px; flex: 1; }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--brand-dark); font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.back:hover { text-decoration: underline; }
.detail-header, .simple-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 17px; }
.simple-heading p, .account header p { color: var(--muted); }
.detail-code { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.detail-code span { padding-inline: 4px; }
.detail-favorite.selected { background: var(--tint); color: var(--brand-dark); border-color: #c3d7f5; }
.detail-overview { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); align-items: start; gap: 16px; }
.detail-overview:has(.detail-facts:only-child) { grid-template-columns: 1fr; }
.detail-hero, .detail-image { width: 100%; padding: 0; background: #e8edf2; border-radius: 7px; overflow: hidden; cursor: zoom-in; touch-action: manipulation; }
.detail-hero img, .detail-image img { width: 100%; max-height: 620px; object-fit: contain; margin: auto; }
.detail-facts, .admin-section { border: 1px solid var(--line); border-radius: 7px; background: var(--white); padding: 18px; }
.detail-facts dl { margin: 12px 0; display: grid; grid-template-columns: 1fr 1fr; }
.detail-facts dl div { padding: 10px 0; border-top: 1px solid var(--line); }
.detail-facts dt { font-size: 12px; color: var(--muted); }
.detail-facts dd { margin: 2px 0 0; font-weight: 650; }
.detail-facts p, .body-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-facts small { display: block; margin-top: 10px; color: var(--muted); }
.drawing-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.drawing-panel h3 { font-size: 14px; }
.drawing-note { margin-top: 8px; color: var(--muted); font-size: 12px; }
.drawing-status { color: var(--muted); font-size: 13px; }
.drawing-file { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; background: var(--tint); border-radius: 4px; }
.drawing-file span { overflow-wrap: anywhere; }
.drawing-file button { flex-shrink: 0; }
.detail-content { width: min(850px, 100%); margin: 26px auto 0; }
.detail-content figure { margin: 12px 0 20px; }
.detail-content figcaption { color: var(--muted); margin: 6px 0 0; text-align: center; }
.body-copy { margin: 13px 0; }
.account header { margin-bottom: 16px; }
.account header p { margin-top: 5px; }
.account-list { width: min(600px, 100%); background: var(--white); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.account-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 65px; text-align: left; padding: 10px 14px; }
.account-row + .account-row { border-top: 1px solid var(--line); }
.account-row:hover { background: #f5f8fc; }
.account-row small, .admin-row small { display: block; color: var(--muted); margin-top: 3px; }
.account-icon { display: grid; place-items: center; color: var(--brand-dark); background: var(--tint); width: 35px; height: 35px; border-radius: 5px; }
.logout { margin-top: 18px; display: flex; width: max-content; }

.auth { display: grid; justify-items: center; align-content: start; padding: clamp(42px, 12vh, 100px) 16px 32px; flex: 1; }
.auth-panel { width: min(390px, 100%); background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 7px; padding: 24px; }
.auth-panel h1 { font-size: 21px; margin-bottom: 19px; }
.auth-note { color: var(--muted); margin-bottom: 16px; font-size: 13px; }
.auth .auth-submit { width: 100%; justify-self: stretch; }
.auth-contact { display: flex; align-items: center; gap: 9px; margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.stack { display: grid; gap: 12px; }
.stack label, .edit-grid label { display: grid; gap: 4px; font-size: 13px; font-weight: 650; min-width: 0; }
.stack input:not([type="checkbox"]):not([type="file"]), .stack select, .stack textarea { min-width: 0; width: 100%; border: 1px solid #cbd5e1; border-radius: 4px; padding: 8px 9px; color: var(--ink); background: var(--white); line-height: 1.4; }
.login-password { display: grid; gap: 4px; }
.password-field { position: relative; }
.stack .password-field input[name="password"] { min-height: 44px; padding-inline-end: 47px; }
.password-toggle { position: absolute; inset: 0 1px 0 auto; width: 44px; display: grid; place-items: center; border-radius: 4px; color: var(--muted); }
.password-toggle:hover { color: var(--brand-dark); }
.stack textarea { resize: vertical; }
.stack > .primary, .stack fieldset > .primary { justify-self: start; }
.form-error { color: #a22229; font-size: 13px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.admin { max-width: 1040px; }
.admin-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.admin-tabs { display: flex; gap: 6px; margin: 13px 0; flex-wrap: wrap; }
.admin-section-head, .editor-heading, .block-toolbar, .admin-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-section-head { margin-bottom: 14px; }
.admin-section-head small { color: var(--muted); font: 400 12px var(--sans); }
.admin-list { margin-top: 12px; }
.visit-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: start; }
.visit-table th, .visit-table td { padding: 9px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; overflow-wrap: anywhere; }
.visit-table th { color: var(--muted); font-size: 12px; font-weight: 650; }
.visit-table th:first-child { width: 33%; }
.visit-table th:last-child { width: 23%; }
.visit-table time { font-variant-numeric: tabular-nums; }
.visit-table small { display: block; margin-top: 2px; color: var(--muted); }
.visit-pagination { display: flex; justify-content: end; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; }
.admin-row { padding: 10px 0; border-top: 1px solid var(--line); }
.admin-row > div:last-child { display: flex; gap: 10px; align-items: center; }
.admin-row > div:first-child { display: block; min-width: 0; overflow-wrap: anywhere; }
.danger { color: #a22229; }
.confirm-actions { display: flex; justify-content: end; gap: 8px; }
.edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.category-settings { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.category-settings-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.category-settings-head label { flex: 1; max-width: 320px; }
.category-settings-head button { min-height: 36px; flex-shrink: 0; }
#case-edit > fieldset { display: grid; gap: 13px; }
.style-picker { grid-column: 2; grid-row: 3 / span 2; align-self: start; }
.style-picker legend { margin-bottom: 5px; font-size: 13px; font-weight: 650; }
.style-options { display: flex; flex-wrap: wrap; gap: 6px; }
.style-options label { display: inline-flex; align-items: center; gap: 6px; min-height: 35px; max-width: 100%; padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.style-options label:has(:checked) { background: var(--tint); border-color: #b4cbea; color: var(--brand-dark); }
.style-options span { overflow-wrap: anywhere; }
.style-options input { flex: none; accent-color: var(--brand); }
.checkboxes, .editor-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.checkboxes label { display: flex; align-items: center; }
.editor-heading { align-items: end; flex-wrap: wrap; padding-top: 9px; border-top: 1px solid var(--line); }
.editor-heading p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.file-button { position: relative; cursor: pointer; display: inline-flex !important; }
.file-button input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.file-button:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.edit-blocks { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.edit-block { background: #f6f8fb; border: 1px solid var(--line); border-radius: 5px; padding: 10px; }
.block-toolbar { margin-bottom: 7px; }
.block-toolbar div { display: flex; gap: 8px; }
.block-image { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 12px; align-items: start; }
.block-image img { border-radius: 4px; aspect-ratio: 1.5; object-fit: contain; width: 100%; }

dialog { width: min(460px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: var(--white); color: var(--ink); box-shadow: 0 16px 48px #111b3333; }
dialog::backdrop { background: #17253e99; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.icon-button { border-radius: 5px; padding: 4px; }
.icon-button:hover { background: var(--subtle); }
.contact-content { display: flex; gap: 10px; align-items: start; }
.contact-content p { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.contact-phone { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.contact-settings { border: 1px solid var(--line); padding: 12px; border-radius: 6px; min-width: 0; }
.contact-settings h3 { font-size: 15px; }
.account-opening-image { display: block; width: min(230px, 100%); max-height: 56dvh; object-fit: contain; margin: 14px auto 0; }
.contact-image-editor { display: grid; gap: 8px; justify-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; }
.contact-image-editor legend { padding-inline: 4px; font-size: 13px; font-weight: 650; }
.contact-image-editor .account-opening-image { width: min(128px, 100%); max-height: 128px; margin: 0; }
.contact-image-editor p { font-size: 12px; color: var(--muted); }
.zoom-dialog { width: min(1080px, calc(100% - 28px)); max-height: calc(100dvh - 20px); }
.zoom-stage { position: relative; height: min(62dvh, 720px); overflow: hidden; border-radius: 5px; background: #edf1f5; touch-action: none; user-select: none; cursor: zoom-in; }
.zoom-stage.is-zoomed { cursor: grab; }
.zoom-stage.is-panning { cursor: grabbing; }
.zoom-image { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.zoom-tools, .zoom-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.zoom-tools { font-size: 12px; color: var(--muted); }
.zoom-buttons { display: flex; gap: 6px; }
.zoom-buttons button { min-width: 42px; }
#toast { position: fixed; z-index: 4; bottom: calc(57px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 6px); color: #fff; background: #253249; border-radius: 5px; padding: 8px 13px; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; max-width: calc(100% - 20px); width: max-content; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading { margin: auto; padding: 20px; text-align: center; }
.loading > * { margin-bottom: 10px; }

@media (max-width: 1200px) {
  .case-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .container, .topbar-inner, .bottom-nav-inner { width: calc(100% - 32px); }
  .library-layout { grid-template-columns: 188px minmax(0, 1fr); gap: 12px; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 650px) {
  #app:has(.auth-panel input:focus) .bottom-nav { visibility: hidden; }
  .auth { padding-top: 28px; }
  .auth-panel { padding: 18px; }
  .auth-panel input:not([type="checkbox"]) { font-size: 16px; }
  .contact-settings-grid { grid-template-columns: minmax(0, 1fr); }
  .container, .topbar-inner, .bottom-nav-inner { width: calc(100% - 24px); }
  .topbar-inner { min-height: 50px; }
  .brand-mark { width: 29px; height: 29px; }
  .brand-text { font-size: 16px; }
  .bottom-nav { padding: 3px 0 max(3px, env(safe-area-inset-bottom)); }
  .bottom-nav .nav-link { display: flex; flex-direction: column; min-height: 43px; gap: 1px; padding: 3px 2px; font-size: 11px; }
  .bottom-nav .nav-link:nth-child(n) { justify-self: stretch; }
  .bottom-nav .nav-link.active { background: transparent; }
  .library { padding: 10px 0 24px; }
  .library-head { display: block; margin-bottom: 10px; }
  .library-head h1 { font-size: 17px; padding: 1px 0 3px; }
  .category-tabs { gap: 3px; }
  .category-tabs .choice { min-height: 35px; padding: 3px 10px 5px; font-size: 13px; }
  .library-layout { display: block; }
  .filter-panel { position: static; max-height: none; overflow: visible; padding: 8px 9px 5px; }
  .filter-heading { margin-bottom: 4px; min-height: 23px; }
  .filter-heading h2 { font-size: 12px; }
  .dimensions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 5px; }
  .dimensions label { gap: 2px; }
  .dimensions .primary { grid-column: auto; min-height: 36px; padding-inline: 8px; }
  .filter-row { display: grid; grid-template-columns: 33px minmax(0, 1fr); align-items: start; gap: 2px; margin-top: 7px; padding-top: 4px; }
  .filter-label { margin: 5px 0 0; font-size: 11px; }
  .choices { gap: 2px; }
  .filter-panel .choice { min-height: 28px; padding: 3px 6px; font-size: 11px; }
  .results-head { margin: 8px 0 7px; }
  .results-head h2 { font-size: 12px; }
  .results-head strong { font-size: 14px; }
  .modes .choice { font-size: 11px; padding: 3px 6px; }
  .sidebar-modes { display: none; }
  .mobile-modes { display: inline-flex; }
  .case-grid { gap: 8px; }
  .case-image { aspect-ratio: 1.5; }
  .case-info { padding: 7px 7px 4px; }
  .case-heading { gap: 5px; font-size: 12px; }
  .case-meta { gap: 5px; font-size: 11px; padding-right: 25px; }
  .card-favorite { width: 27px; height: 34px; right: 2px; bottom: 4px; }
  .card-favorite svg { width: 16px; height: 16px; }
  .subpage, .detail { padding-top: 15px; padding-bottom: 26px; }
  .detail-header { align-items: flex-start; }
  .detail-header h1 { font-size: 21px; }
  .detail-favorite { min-height: 33px; padding: 4px 6px; font-size: 12px; }
  .detail-overview { grid-template-columns: 1fr; gap: 10px; }
  .detail-facts, .admin-section { padding: 12px; }
  .detail-content { margin-top: 19px; }
  .admin-row { gap: 5px; }
  .visit-table th, .visit-table td { padding: 7px 4px; font-size: 12px; }
  .admin-row > div:last-child { gap: 6px; }
  .block-image { grid-template-columns: 1fr; }
  .block-image img { max-width: 145px; }
  .edit-grid { gap: 8px; }
  .style-picker { grid-column: 1 / -1; grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
