:root {
  color-scheme: light;
  --page: #f8f8f6;
  --paper: #fff;
  --ink: #282828;
  --muted: #595766;
  --brand: #5b47cb;
  --brand-dark: #45329b;
  --selected: #eee9ff;
  --accent: #f3f0fc;
  --border: #e0e0e0;
  --control-border: #848092;
  --focus: #5b47cb;
  --danger: #9f2e25;
  --side: #fcfcfb;
  --shadow: 0 10px 30px #24243616;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Songti SC", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  font: 15px/1.6 var(--sans);
  background: var(--page);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select { font: inherit; }
button, [type=file], select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg { width: 1.2em; height: 1.2em; flex: none; vertical-align: middle; }
h1, h2, h3, p { margin-block: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: fixed; z-index: 20; top: 8px; left: 8px; padding: 8px 14px; background: white; transform: translateY(-160%); }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.loading { display: grid; min-height: 100dvh; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.mark { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; background: linear-gradient(145deg, var(--accent), var(--selected)); color: var(--brand-dark); flex: none; }
.mark svg { width: 22px; height: 22px; }
#app { position: relative; z-index: 1; }
.album-backdrop {
  position: fixed;
  inset-inline-end: clamp(12px, 3vw, 48px);
  inset-block-end: clamp(12px, 4svh, 42px);
  width: clamp(220px, 32vw, 420px);
  height: min(54svh, 460px);
  mix-blend-mode: multiply;
  opacity: .46;
  pointer-events: none;
}
.album-backdrop:empty { display: none; }
.album-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
  filter: blur(2px) saturate(.92);
  opacity: 0;
  animation: album-artwork 32s linear infinite;
}
.album-backdrop img:first-child { opacity: 1; animation-delay: -1s; }
.album-backdrop img:nth-child(2) { animation-delay: 7s; }
.album-backdrop img:nth-child(3) { animation-delay: 15s; }
.album-backdrop img:nth-child(4) { animation-delay: 23s; }
@keyframes album-artwork {
  0%, 28.125%, 100% { opacity: 0; }
  3.125%, 25% { opacity: 1; }
}
.shell { min-height: 100dvh; display: grid; grid-template-columns: 214px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 25px; padding: 24px 15px 18px; border-inline-end: 1px solid var(--border); background: var(--side); color: var(--ink); overflow: auto; }
.brand { display: flex; gap: 10px; padding: 0 10px; align-items: center; }
.brand strong { display: block; font-size: 18px; letter-spacing: .09em; line-height: 1.2; }
.brand small { font-size: 11px; color: var(--muted); }
.side-group { display: grid; gap: 4px; }
.side-recent { min-width: 0; display: grid; gap: 3px; margin-block: 13px 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.nav-label { padding: 0 10px; margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.nav { display: flex; align-items: center; text-align: left; gap: 11px; width: 100%; padding: 10px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 14px; }
.nav:hover { background: var(--accent); }
.nav.active, .nav[aria-current="page"] { background: var(--selected); color: var(--brand-dark); font-weight: 650; }
.nav .count { margin-left: auto; font: 11px var(--sans); color: var(--muted); }
.side-album-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-radius: 8px; }
.side-album-row:has(.nav.active) { background: var(--selected); }
.side-album-row .nav > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-album-row .side-album-delete { margin-inline-end: 3px; color: var(--muted); }
.side-album-row .side-album-delete:hover { color: var(--danger); }
.side-footer { display: grid; gap: 8px; margin-top: auto; }
.side-account { border-top: 1px solid var(--border); padding: 12px 3px 0; display: flex; gap: 6px; align-items: center; }
.side-account > div { min-width: 0; display: grid; flex: 1; }
.side-account strong { overflow: hidden; text-overflow: ellipsis; font-size: 13px; white-space: nowrap; }
.side-account small { color: var(--muted); font-size: 11px; }
.avatar { border-radius: 50%; width: 32px; height: 32px; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--brand-dark); font-size: 12px; font-weight: 700; }
.icon-button { display: inline-grid; place-items: center; border: 0; border-radius: 8px; padding: 8px; background: transparent; color: inherit; }
.icon-button:hover { background: var(--accent); }
.side-account .icon-button { padding: 5px; }
.work { min-width: 0; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; justify-content: space-between; min-height: 70px; border-bottom: 1px solid var(--border); background: var(--paper); padding: 12px max(25px, calc((100% - 1330px) / 2)); }
.topbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-inline-start: auto; }
.topbar-photo-tools { display: flex; flex: none; gap: 2px; padding: 2px; background: var(--page); border: 1px solid var(--border); border-radius: 10px; }
.topbar-photo-tools .btn { min-height: 35px; border-color: transparent; background: transparent; }
.topbar-photo-tools .btn:hover, .topbar-photo-tools .btn[aria-pressed="true"] { background: var(--selected); color: var(--brand-dark); }
.topbar-actions > .btn:not(.btn-primary, .btn-layout) { border-color: transparent; }
.topbar-actions > .btn-danger { color: var(--muted); }
.topbar-actions > .btn-danger:hover { color: var(--danger); }
.bulk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--paper); font-size: 13px; }
.bulk-toolbar [role="status"] { margin-inline-end: auto; }
.search { flex: 1 1 245px; display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 610px; padding: 8px 12px; border: 1px solid var(--border); background: var(--page); border-radius: 10px; color: var(--muted); }
.search input { flex: 1; width: 100%; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--ink); }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search-mode { flex: none; max-width: 8em; border: 0; border-radius: 4px; background: var(--page); color: var(--ink); font-size: .8rem; }
.similar-caption { margin-block: 4px 0; }
.form-flow .checkbox-field { display: flex; align-items: center; gap: 8px; }
.form-flow .checkbox-field input { width: auto; min-height: auto; accent-color: var(--brand); }
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.search button { display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--muted); padding: 1px; }
.search-submit-icon { display: none; }
kbd { border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; color: var(--muted); background: var(--paper); font-size: 11px; white-space: nowrap; font-family: inherit; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 39px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--border); color: var(--ink); background: var(--paper); text-decoration: none; font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--accent); }
.btn-primary { border-color: var(--brand); background: var(--brand); color: var(--paper); }
.btn-primary:hover { border-color: var(--brand-dark); background: var(--brand-dark); }
.btn-theme { border-color: var(--control-border); }
.btn-layout { color: var(--brand-dark); background: var(--accent); border-color: transparent; }
.btn-layout:hover { background: var(--selected); }
.btn-danger { color: var(--danger); border-color: #e7c7c3; }
.btn-danger:hover { background: #fff1ee; }
.btn-small { min-height: 32px; padding: 3px 9px; font-size: 12px; }
.content { width: min(100%, 1396px); margin: 0 auto; padding: 28px 25px 54px; }
.map-setup-notice { display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--paper); font-size: 13px; }
.map-setup-notice > svg { margin-top: 3px; color: var(--brand); }
.map-setup-notice strong { color: var(--ink); }
.map-setup-notice p { margin-top: 2px; color: var(--muted); }
.map-setup-actions { display: flex; flex: none; align-items: center; gap: 3px; margin-inline-start: auto; }
.map-page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; }
.map-page-heading .btn { margin-block: 0 14px; }
.preview-banner { display: flex; align-items: center; gap: 9px; background: var(--accent); color: var(--brand-dark); padding: 7px 12px; border-radius: 8px; margin-bottom: 15px; font-size: 12px; }
.hero { isolation: isolate; position: relative; display: flex; align-items: center; min-height: 210px; padding: clamp(20px, 4vw, 48px); border-radius: 20px; overflow: hidden; background: var(--paper); color: var(--ink); }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(110deg, var(--accent), transparent 72%); }
.hero.hero-with-photo { min-height: clamp(220px, 38svh, 440px); align-items: end; color: white; background: #262626; }
.hero-with-photo::after { z-index: 1; pointer-events: none; background: linear-gradient(22deg, #141220df, #14122050 43%, transparent 75%); }
.hero-with-photo .hero-caption { position: relative; z-index: 2; pointer-events: none; }
.hero-with-photo .hero-metrics, .hero-with-photo .hero-metrics b { color: inherit; }
.hero-media { position: absolute; inset: 0; }
.hero-image-button { position: absolute; inset: 0; padding: 0; border: 0; background: transparent; }
.hero-image-button:focus-visible { z-index: 2; outline-offset: -4px; }
.hero-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; image-orientation: from-image; }
.hero-toggle { position: absolute; z-index: 3; right: 12px; top: 12px; border-color: #fff9; background: #242032dd; color: white; }
.hero-toggle:hover { background: #242032; }
.hero-title { font: 700 clamp(32px, 4.7vw, 60px)/1.15 var(--serif); letter-spacing: .02em; }
.hero-metrics { display: flex; gap: 16px; margin-top: 13px; color: var(--muted); font-size: 12px; }
.hero-metrics span { display: flex; gap: 5px; align-items: center; white-space: nowrap; }
.hero-metrics b { color: var(--ink); font-size: 15px; }
.photo-reel { margin-top: 26px; }
.reel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.reel-heading h2 { font-size: 18px; letter-spacing: -.02em; }
.reel-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.reel-toggle { border-color: var(--border); }
.reel-viewport { --reel-height: clamp(125px, 16vw, 224px); --reel-gap: 10px; container-type: inline-size; overflow-x: auto; scrollbar-width: none; }
.reel-track { display: flex; align-items: center; width: max-content; min-height: var(--reel-height); gap: var(--reel-gap); }
.reel-photo {
  position: relative;
  flex: none;
  border-radius: 10px;
  color: var(--brand);
}
.reel-open { display: block; padding: 0; border: 0; border-radius: inherit; background: transparent; color: inherit; }
.reel-photo img { width: auto; height: auto; max-width: 100cqw; max-height: var(--reel-height); border-radius: inherit; }
.reel-open > svg { margin: 16px; }
.reel-open:focus-visible { outline-offset: -4px; }
.page-heading { min-height: 124px; align-content: center; margin: 0 0 14px; padding: 12px 2px; }
.page-heading h1 { font-size: clamp(29px, 4vw, 42px); line-height: 1.25; font-weight: 740; }
.page-heading p { color: var(--muted); margin-top: 6px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 19px; }
.tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--paper); color: var(--muted); white-space: nowrap; font-size: 12px; }
button.chip:hover { background: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--brand); color: var(--brand-dark); font-weight: 700; }
.date-filter { display: flex; gap: 7px; flex-wrap: wrap; align-items: end; }
.date-filter label { display: grid; color: var(--muted); font-size: 11px; }
.date-filter input { border: 1px solid var(--control-border); background: white; color: var(--ink); border-radius: 7px; padding: 3px 6px; font-size: 12px; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 19px 0 12px; }
.heading h2 { font-size: 21px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
.heading .subtle { font-size: 12px; }
.subtle { color: var(--muted); }
.timeline { display: grid; gap: 23px; }
.timeline h3 { margin-bottom: 10px; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.timeline h3 .day-count { margin-left: 8px; font-size: 11px; color: var(--muted); font-weight: 450; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 13px; }
.tile { position: relative; display: flex; flex-direction: column; text-align: left; min-width: 0; border: 1px solid var(--border); border-radius: 14px; padding: 0; background: var(--paper); color: inherit; overflow: hidden; box-shadow: 0 2px 4px #2926320a; transition: box-shadow .18s, transform .18s; }
.tile:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tile-open { position: absolute; z-index: 1; inset: 0; padding: 0; border: 0; border-radius: inherit; background: transparent; }
.tile-open:focus-visible { outline-offset: -4px; }
.tile-media { position: relative; display: block; width: 100%; aspect-ratio: 1.55; overflow: hidden; background: var(--page); }
.tile-media img { width: 100%; height: 100%; object-fit: contain; }
.tile-media .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--brand); font-size: 26px; }
.photo-search-labels { position: absolute; z-index: 3; top: 6px; left: 6px; right: 6px; display: flex; gap: 4px; pointer-events: none; }
.photo-search-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 6px; border: 1px solid #fff9; border-radius: 5px; color: white; background: #242032e8; font-size: 11px; pointer-events: auto; }
.photo-search-label:hover { background: var(--brand-dark); }
.detail-picture .photo-search-labels { flex-wrap: wrap; }
.photo-actions { position: absolute; z-index: 3; right: 2px; bottom: 2px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: white; }
.photo-actions::before { content: ""; position: absolute; inset: 7px; border: 1px solid #fff9; border-radius: 50%; background: #242032dd; box-shadow: 0 2px 6px #0002; }
.photo-actions:hover::before { background: #242032; }
.photo-actions svg { width: 16px; height: 16px; }
.photo-actions span { position: relative; display: grid; }
.photo-actions:not([aria-pressed]) .select-icon, .photo-actions[aria-pressed] .more-icon { display: none; }
.photo-actions[aria-pressed="false"] .select-icon { opacity: .55; }
.photo-actions[aria-pressed="true"]::before { background: var(--brand-dark); border-color: white; }
.photo-menu { position: fixed; inset: auto; margin: 0; padding: 4px; min-width: 142px; max-width: calc(100vw - 16px); border: 1px solid var(--border); border-radius: 9px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.photo-menu:popover-open { display: grid; }
.photo-menu .btn { min-height: 36px; border: 0; justify-content: flex-start; }
.photo-menu [data-action="favorite-photo"][aria-pressed="true"] svg { color: #946029; fill: currentColor; }
.share-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); gap: 8px; }
.share-qr { width: min(196px, 100%); justify-self: center; image-rendering: pixelated; border: 1px solid var(--border); border-radius: 9px; }
.share-link { min-width: 0; display: grid; gap: 5px; }
.share-link input { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 7px; padding: 6px; background: var(--page); color: var(--ink); }
.share-page { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.share-view { width: min(100%, 920px); padding: clamp(18px, 4vw, 28px); display: grid; justify-items: center; gap: 12px; text-align: center; border: 1px solid var(--border); border-radius: 14px; background: var(--paper); }
.share-view img { max-width: 100%; max-height: 70dvh; object-fit: contain; }
.share-view [hidden] { display: none; }

.shell { grid-template-columns: var(--navigation-width, 214px) minmax(0, 1fr); }
.sidebar-resize { position: absolute; top: 0; right: 0; width: 9px; height: 100%; cursor: ew-resize; touch-action: none; }
.sidebar-resize:hover, .sidebar-resize:focus-visible { background: var(--control-border); }
.assistant-entry { color: var(--brand-dark); }
.assistant-entry[aria-expanded="true"] { background: var(--selected); }
body.assistant-open { --assistant-dock-width: min(var(--assistant-width, 360px), 100vw); }
.assistant-panel { position: fixed; z-index: 12; inset: 0 0 0 auto; width: var(--assistant-dock-width); display: flex; flex-direction: column; overflow: hidden; border-inline-start: 1px solid var(--border); box-shadow: -6px 0 24px #30234618; background: var(--paper); color: var(--ink); }
.assistant-panel[hidden] { display: none; }
.assistant-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.assistant-header-actions { display: flex; align-items: center; gap: 3px; }
@media (min-width: 1100px) {
  body.assistant-open { --assistant-dock-width: min(var(--assistant-width, 360px), 42vw); }
  body.assistant-open #app { padding-right: var(--assistant-dock-width); }
}
.assistant-header h2 { margin: 0; font-size: 18px; }
.assistant-header span { font-size: 12px; }
.assistant-views { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.assistant-views [aria-pressed="true"] { border-color: var(--brand); background: var(--selected); color: var(--brand-dark); }
.assistant-chat { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.retouch-dialog { width: min(96vw, 1420px); height: min(92dvh, 920px); max-width: none; overflow: hidden; }
.retouch-workspace { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.retouch-header, .retouch-footer { display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.retouch-header { border-bottom: 1px solid var(--border); }
.retouch-header h2 { margin: 0; font-size: 19px; white-space: nowrap; }
.retouch-header select { flex: 1; min-width: 0; max-width: 410px; margin-left: auto; }
.retouch-footer { justify-content: space-between; border-top: 1px solid var(--border); }
.retouch-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 325px); min-height: 0; }
.retouch-image { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: #0f0f0f; color: #f2edf5; }
.retouch-stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; }
.retouch-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.retouch-brush-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.retouch-brush-overlay.is-active { pointer-events: auto; cursor: crosshair; touch-action: none; }
.retouch-stage p { margin: 12px; color: #cbc5d0; }
.retouch-view-badge { position: absolute; inset: 12px auto auto 12px; padding: 4px 8px; border-radius: 5px; background: #27232dca; font-size: 12px; pointer-events: none; }
.retouch-image-bar { display: flex; align-items: center; gap: 10px; min-height: 47px; padding: 6px 12px; border-top: 1px solid #ffffff29; }
.retouch-image-bar [role="status"] { flex: 1; min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.retouch-image-bar .btn { white-space: nowrap; }
.retouch-sidebar { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; background: var(--page); border-left: 1px solid var(--border); }
.retouch-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.retouch-tabs .btn { padding-inline: 4px; }
.retouch-tools { overflow: auto; padding: 16px 14px; }
.retouch-tools h3 { margin: 0 0 10px; font-size: 13px; }
.retouch-tool-grid + h3 { margin-top: 20px; }
.retouch-tool-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.retouch-dialog .btn[aria-pressed="true"] { border-color: var(--brand); background: var(--selected); color: var(--brand-dark); }
.retouch-strength { margin-top: 18px; }
.retouch-strength > div { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.retouch-strength output { color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.retouch-strength input { width: 100%; margin: 8px 0 0; accent-color: var(--brand); }
.retouch-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.retouch-filter { min-width: 0; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 12px; }
.retouch-filter[aria-pressed="true"] { border-color: var(--brand); background: var(--selected); color: var(--brand-dark); }
.retouch-filter img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; }
.retouch-filter span { display: block; padding: 4px 0 1px; white-space: nowrap; }
.retouch-filter[data-filter="fresh"] img { filter: saturate(1.25) brightness(1.12); }
.retouch-filter[data-filter="soft_light"] img { filter: saturate(.84) contrast(.84) brightness(1.14); }
.retouch-filter[data-filter="warm"] img { filter: sepia(.24) saturate(1.16); }
.retouch-filter[data-filter="cool"] img { filter: sepia(.18) hue-rotate(155deg) saturate(1.12); }
.retouch-filter[data-filter="vintage"] img { filter: sepia(.62) contrast(.85); }
.retouch-filter[data-filter="cinematic"] img { filter: sepia(.3) saturate(.78) contrast(1.12) hue-rotate(345deg); }
.retouch-filter[data-filter="monochrome"] img { filter: grayscale(1); }
.retouch-tools .retouch-adjustment-heading { margin-top: 20px; }
.retouch-brush-hint { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.retouch-tools [data-editor="clear-cutout"] { margin-top: 8px; }
@media (max-width: 720px) {
  .retouch-dialog { width: 100%; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .retouch-header, .retouch-footer { padding: 8px 10px; gap: 8px; }
  .retouch-header h2 { font-size: 15px; }
  .retouch-header select { min-height: 44px; font-size: 16px; }
  .retouch-dialog .btn { min-height: 44px; }
  .retouch-footer .btn { padding-inline: 9px; }
  .retouch-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, min(40%, 260px)); }
  .retouch-sidebar { border-left: 0; border-top: 1px solid var(--border); }
  .retouch-tabs, .retouch-tools { padding: 8px 10px; }
  .retouch-tools { overscroll-behavior: contain; }
  .retouch-tools h3 { margin-bottom: 7px; }
  .retouch-strength { margin-top: 10px; }
  .retouch-strength input { min-height: 32px; margin-top: 2px; }
  .retouch-filters { grid-template-columns: repeat(8, minmax(62px, 1fr)); overflow-x: auto; padding: 3px; }
}
@media (max-width: 960px) and (max-height: 500px) and (orientation: landscape) {
  .retouch-dialog { width: 100%; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .retouch-header, .retouch-footer { padding-block: 5px; }
  .retouch-body { grid-template-columns: minmax(0, 1fr) clamp(210px, 36vw, 290px); grid-template-rows: minmax(0, 1fr); }
  .retouch-sidebar { border-top: 0; border-left: 1px solid var(--border); }
}
.assistant-prompts { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 12px; }
.assistant-prompts button { border: 1px solid var(--border); border-radius: 7px; padding: 5px 7px; background: var(--paper); color: var(--muted); }
.assistant-prompts button:hover { background: var(--accent); }
.assistant-messages { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 8px 13px 12px; overflow: auto; }
.assistant-message { max-width: 100%; width: fit-content; min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; background: var(--page); overflow-wrap: anywhere; }
.assistant-message > p { margin: 0; white-space: pre-wrap; }
.assistant-user { align-self: flex-end; background: var(--selected); }
.assistant-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); gap: 8px; margin-block: 8px; }
.assistant-card { min-width: 0; display: flex; flex-direction: column; align-items: start; gap: 4px; color: var(--muted); }
.assistant-card-picture { position: relative; width: 100%; }
.assistant-card-picture > button { width: 100%; overflow: hidden; padding: 0; border: 0; border-radius: 6px; background: var(--paper); color: var(--ink); text-align: start; }
.assistant-card img, .assistant-edit { display: block; width: 100%; max-height: 160px; object-fit: contain; }
.assistant-edit { margin-block: 8px; }
.assistant-card span, .assistant-card small { padding-inline: 4px; }
.assistant-message label { display: flex; gap: 6px; align-items: center; margin-block: 6px; }
.assistant-panel input { min-width: 0; border: 1px solid var(--control-border); border-radius: 8px; padding: 7px 8px; background: var(--paper); color: inherit; }
.assistant-selection { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 6px; max-height: 78px; overflow: auto; }
.assistant-selection[hidden] { display: none; }
.assistant-selection button { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.assistant-form { display: flex; gap: 6px; padding: 10px 13px; border-top: 1px solid var(--border); }
.assistant-form input { flex: 1; }
.assistant-resize { position: absolute; width: 8px; top: 56px; left: 0; bottom: 58px; cursor: ew-resize; touch-action: none; }
.assistant-resize:hover, .assistant-resize:focus-visible { background: var(--control-border); }
.photo-map { position: relative; height: clamp(300px, 65dvh, 660px); border: 1px solid var(--border); border-radius: 12px; background: #e3edf2; isolation: isolate; }
.photo-map-picker { height: clamp(185px, 34dvh, 340px); }
.baidu-map-canvas { position: absolute; inset: 0; }
.baidu-map-status { position: absolute; inset: 8px auto auto 8px; z-index: 410; pointer-events: none; }
.map-popup { display: grid; gap: 5px; max-height: 200px; overflow: auto; }
.map-status { max-width: 230px; padding: 5px 8px; border-radius: 6px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.map-external-links { display: flex; flex-wrap: wrap; gap: 8px; }
.map-photo-result { display: flex; gap: 8px; align-items: center; text-align: start; padding: 4px 7px; border: 1px solid var(--border); border-radius: 7px; background: var(--paper); color: var(--ink); }
.map-photo-result:hover { background: var(--accent); }
.map-photo-result img { width: 66px; height: 54px; flex: none; object-fit: contain; }
.map-photo-list { margin-block: 10px; }
.map-photo-list > div { display: flex; flex-wrap: wrap; gap: 6px; padding-block: 8px; }
.photo-map .leaflet-control-layers .leaflet-control-layers-toggle { display: grid; place-items: center; background-image: none; }
.photo-map .leaflet-control-layers-toggle::after { content: "图层"; color: #232532; font-size: 12px; }
.hero-navigation { position: absolute; z-index: 3; bottom: 11px; left: 12px; display: flex; gap: 7px; align-items: center; }
.hero-navigation button, .hero-navigation span { display: grid; place-items: center; height: 33px; padding: 0 8px; border: 1px solid #fff8; border-radius: 7px; background: #242032dd; color: white; font-size: 12px; }
.hero-navigation button:hover { background: #242032; }
.hero-navigation button svg { width: 16px; height: 16px; }
.tile-meta { display: grid; gap: 3px; width: 100%; padding: 10px 11px 11px; }
.tile-meta strong { font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.trash-actions { margin-top: 5px; }
.tile-meta small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match { font-size: 11px; color: var(--brand); overflow-wrap: anywhere; }
.album-toolbar { margin-bottom: 12px; }
.album { min-height: 110px; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); gap: 10px; }
.category-card { min-height: 75px; text-align: left; border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: white; color: var(--ink); }
.category-card:hover { background: var(--accent); }
.category-card svg { margin-right: 7px; color: var(--brand); }
.empty { display: grid; justify-items: center; text-align: center; padding: 40px 18px; gap: 7px; border: 1px dashed var(--control-border); border-radius: 12px; background: var(--paper); }
.empty > svg { color: var(--brand); width: 30px; height: 30px; }
.empty p { color: var(--muted); }
.empty .btn { margin-top: 5px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 24px; }
.login {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 700px);
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 5vw, 76px);
  min-height: 100dvh;
  padding: clamp(24px, 5vw, 72px);
  background: linear-gradient(145deg, var(--page), var(--side));
}
.login-main { min-width: 0; }
.login-inner { display: grid; gap: 19px; padding: clamp(22px, 4vw, 35px); border: 1px solid var(--border); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.login-inner .brand { padding: 0; }
.login-inner h1 { font: 700 34px/1.2 var(--serif); }
.login-inner p { color: var(--muted); font-size: 14px; }
.login-art {
  min-width: 0;
  padding: clamp(12px, 2vw, 26px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.login-art-frame { height: clamp(320px, 65svh, 660px); padding: 8px; }
.login-mascot { width: 100%; height: 100%; object-fit: contain; }
.login-mascot-ready { animation: mascot-greeting 1.8s ease-in-out; }
@keyframes mascot-greeting {
  50% { transform: translateY(-6px); }
}
.login-art-selector { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; padding-top: 12px; border-top: 1px solid var(--border); }
.login-art-selector button { min-height: 40px; padding: 4px 12px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; }
.login-art-selector button:hover, .login-art-selector button[aria-pressed="true"] { border-color: var(--border); background: var(--accent); color: var(--brand-dark); }
.login-landing {
  --landing-page: #f8f8f6;
  --landing-ink: #282828;
  --landing-action: #5b47cb;
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 0;
  min-height: 100dvh;
  padding: clamp(12px, 5dvh, 64px) clamp(18px, 5vw, 88px);
  border-block-end: 5px solid var(--landing-ink);
  background: var(--landing-page);
  color: var(--landing-ink);
}
.login-landing .login-main { position: relative; z-index: 1; }
.landing-copy .brand { width: fit-content; padding: 0; margin-bottom: clamp(10px, 4dvh, 56px); }
.landing-copy h1 {
  font-size: clamp(30px, min(7.1vw, 13dvh), 118px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -.07em;
}
.landing-copy h1 em {
  display: block;
  margin-top: .06em;
  font: italic 400 .99em/.94 Georgia, "Times New Roman", serif;
  letter-spacing: -.075em;
}
.landing-features {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: clamp(10px, 4dvh, 56px);
  color: var(--landing-action);
  font-size: clamp(12px, 1.2vw, 18px);
  font-weight: 750;
  letter-spacing: .08em;
}
.landing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px clamp(14px, 3vw, 46px); margin-top: clamp(12px, 4.2dvh, 60px); }
.landing-primary {
  min-width: clamp(120px, 15vw, 216px);
  min-height: clamp(44px, 4.3vw, 64px);
  border: 0;
  border-radius: 0;
  background: var(--landing-ink);
  color: #fff;
  font-size: clamp(14px, 1.35vw, 18px);
  position: relative;
  isolation: isolate;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}
.landing-primary::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 2px;
  background: var(--landing-action);
  clip-path: inherit;
}
.landing-primary:hover, .landing-primary:focus-visible { background: var(--landing-ink); }
.landing-primary:hover::before, .landing-primary:focus-visible::before { background: color-mix(in srgb, var(--landing-action) 78%, var(--landing-ink)); }
.landing-primary:focus-visible { text-decoration: underline; text-underline-offset: .2em; }
.landing-register {
  padding: 8px 0 3px;
  border: 0;
  border-bottom: 3px solid var(--landing-action);
  background: transparent;
  color: var(--landing-ink);
  font-size: clamp(14px, 1.3vw, 17px);
  font-weight: 700;
}
.landing-register:hover { color: var(--landing-action); }
.landing-copy > .form-error { margin-top: 12px; }
.login-landing .login-art {
  position: absolute;
  inset: 18px 0 0 43%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0 0 0 5%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.login-landing .login-art-frame { position: relative; height: auto; min-height: 0; padding: 0; overflow: hidden; }
.login-landing .login-art-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--landing-page), transparent 24%);
  pointer-events: none;
}
.login-landing .login-mascot { object-position: right bottom; mix-blend-mode: multiply; }
.login-landing .login-mascot.custom-artwork { mix-blend-mode: normal; }
.album-backdrop img:only-child { animation: none; }
.login-landing .login-art-selector {
  justify-content: flex-end;
  padding: 8px clamp(16px, 3vw, 46px) 12px 0;
  border: 0;
}
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.auth-links button { padding: 0; border: 0; background: transparent; text-decoration: underline; text-underline-offset: .2em; }
.auth-retry { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.recovery-code { display: grid; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--side); }
.recovery-code textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--control-border); border-radius: 7px; background: var(--paper); color: var(--brand-dark); font: 600 14px/1.5 ui-monospace, monospace; resize: none; overflow-wrap: anywhere; }
.recovery-code [data-copy-status] { color: var(--brand); font-size: 13px; }
.form-flow { display: grid; gap: 12px; }
.form-flow label, .inline-field { display: grid; gap: 4px; color: var(--ink); font-size: 13px; font-weight: 650; }
.form-flow input, .form-flow select, .form-flow textarea, .inline-field select { width: 100%; min-width: 0; min-height: 39px; padding: 7px 9px; border: 1px solid var(--control-border); border-radius: 8px; background: white; color: var(--ink); }
.form-flow textarea { font: inherit; resize: vertical; }
.photo-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.form-flow .row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.form-error { color: var(--danger) !important; font-size: 12px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.theme-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 7px; }
.theme-preset { display: grid; justify-items: center; gap: 5px; min-height: 65px; padding: 8px 5px; border: 1px solid var(--control-border); border-radius: 9px; background: var(--paper); color: var(--ink); font-size: 12px; }
.theme-preset:hover, .theme-preset[aria-pressed="true"] { background: var(--accent); }
.theme-preset[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); font-weight: 700; }
.theme-swatch { width: 23px; height: 23px; border-radius: 50%; background: var(--swatch); }
.form-flow .theme-custom { display: flex; align-items: center; justify-content: space-between; }
.theme-custom input[type="color"] { width: 62px; padding: 4px; }
.theme-reset { margin-inline-start: auto; }
.notice-link { font-size: 13px; color: var(--brand); }
dialog { width: min(94vw, 1020px); max-height: calc(100dvh - 34px); border: 1px solid var(--border); border-radius: 14px; padding: 0; color: var(--ink); background: var(--paper); box-shadow: 0 20px 70px #30254050; }
dialog::backdrop { background: #30254080; }
#modal { width: min(94vw, 520px); }
.modal-inner { padding: 18px 20px 21px; display: grid; gap: 12px; }
.layout-dialog { padding: 16px 18px 18px; }
.layout-form { display: grid; gap: 11px; min-width: 0; }
.layout-form > .subtle { font-size: 13px; }
.layout-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.layout-tabs .btn { flex: 1; padding-inline: 7px; font-size: 13px; }
.layout-tabs [aria-pressed="true"] { color: var(--brand-dark); background: var(--selected); border-color: var(--brand); }
.layout-list { display: grid; align-content: start; gap: 3px; height: min(43dvh, 290px); overflow: auto; overscroll-behavior: contain; margin: 0; padding: 5px; list-style: none; border: 1px solid var(--border); border-radius: 10px; background: var(--page); }
.layout-row { display: flex; align-items: center; gap: 6px; padding-inline: 8px 3px; border: 1px solid var(--border); border-radius: 7px; background: var(--paper); min-height: 42px; }
.layout-row label { display: flex; flex: 1; align-items: center; gap: 8px; min-height: 42px; cursor: pointer; }
.layout-row input { width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.layout-row small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.layout-order { display: flex; gap: 2px; }
.layout-order .icon-button { width: 34px; min-height: 37px; }
.layout-feedback { color: var(--muted); font-size: 13px; }
.layout-feedback:empty { display: none; }
.layout-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.layout-footer [data-layout-reset] { margin-inline-end: auto; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 9px; }
.dialog-head h2 { font-size: 19px; overflow-wrap: anywhere; }
[data-action="compare-start"][aria-pressed="true"] { border-color: var(--brand); color: var(--brand-dark); background: var(--accent); }
.selecting-photo-comparison .content { padding-bottom: 150px; }
.selecting-photo-comparison [data-action="detail"] { cursor: copy; }
.selecting-photo-comparison [data-compare-selected="true"] { cursor: default; }
.selecting-photo-comparison [data-compare-selected="true"]::after { content: ""; position: absolute; inset: 2px; border: 3px solid var(--focus); border-radius: inherit; box-shadow: inset 0 0 0 1px white; pointer-events: none; }
.compare-tray {
  position: fixed; z-index: 9; inset: auto auto max(16px, env(safe-area-inset-bottom)) 50%; translate: -50%;
  display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100vw - 24px);
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--paper);
  box-shadow: 0 10px 35px #30254029;
}
.compare-tray-copy { display: grid; line-height: 1.35; }
.compare-tray-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.compare-tray-photos, .compare-tray-actions { display: flex; align-items: center; gap: 6px; }
.compare-tray-photo, .compare-tray-placeholder {
  position: relative; display: grid; place-items: center; width: 44px; height: 42px; padding: 0;
  border: 1px dashed var(--border); border-radius: 8px; background: var(--page); color: var(--muted); font-size: 10px;
}
.compare-tray-photo { border-style: solid; }
.compare-tray-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.compare-tray-photo span {
  position: absolute; inset: -4px -4px auto auto; display: grid; place-items: center; width: 17px; height: 17px;
  border: 1px solid var(--paper); border-radius: 50%; background: var(--brand-dark); color: white; line-height: 1;
}
#photo-compare {
  width: min(calc(100vw - 36px), 1550px); max-width: none; max-height: calc(100dvh - 36px);
  overflow: auto; overscroll-behavior: contain; border-radius: 19px;
}
#photo-compare::backdrop { background: #20182c82; backdrop-filter: blur(4px); }
.compare-head {
  position: sticky; z-index: 2; top: 0; display: grid; grid-template-columns: minmax(100px, 1fr) auto minmax(36px, 1fr);
  align-items: center; gap: 9px 14px; padding: 13px 18px; border-bottom: 1px solid var(--border); background: var(--paper);
}
.compare-head h2 { font-size: clamp(17px, 2vw, 22px); line-height: 1.15; }
.compare-controls, .compare-zoom { display: flex; align-items: center; gap: 7px; }
.compare-controls { justify-content: center; }
.compare-controls .btn { min-height: 34px; }
.compare-controls [aria-pressed="true"] { background: var(--accent); border-color: var(--brand); color: var(--brand-dark); }
.compare-zoom { gap: 2px; padding-inline: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--page); }
.compare-zoom .btn, .compare-zoom-value { min-width: 26px; min-height: 32px; border: 0; background: transparent; color: var(--ink); padding: 0 4px; }
.compare-zoom .btn { font-size: 15px; }
.compare-zoom .btn:hover, .compare-zoom-value:hover { background: var(--accent); }
.compare-zoom-value { min-width: 42px; border-radius: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.compare-close { justify-self: end; width: 36px; min-height: 36px; padding: 0; font-size: 22px; line-height: 1; }
.compare-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(248px, 24vw, 300px); gap: 14px; padding: 14px; background: var(--page); }
.compare-viewer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 9px; min-width: 0; }
.compare-photo { margin: 0; min-width: 0; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; background: var(--paper); }
.compare-photo-recommended { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.compare-photo figcaption { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 10px; font-size: 12px; }
.compare-side { flex: none; padding: 2px 6px; border-radius: 5px; color: var(--brand-dark); background: var(--accent); white-space: nowrap; }
.compare-photo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-pick { margin-inline-start: auto; color: var(--brand-dark); font-size: 10px; font-weight: 700; white-space: nowrap; }
.compare-stage {
  height: clamp(240px, calc(100dvh - 176px), 780px); overflow: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #777181 transparent; background: #2c2933; color: #faf6ff;
}
.compare-stage:focus-visible { outline-offset: -3px; }
.compare-stage-content { display: grid; place-items: center; width: max-content; height: max-content; min-width: 100%; min-height: 100%; padding: 10px; }
.compare-image { position: relative; width: 0; height: 0; }
.compare-image img { width: 100%; height: 100%; }
.compare-unavailable { padding: 14px; font-size: 12px; }
.compare-regions { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.compare-region { position: absolute; border: 2px solid #ffbe8e; background: #ffba862b; box-shadow: inset 0 0 0 1px #2c183d84; }
.compare-region::before {
  content: attr(data-region-number); display: grid; place-items: center; position: absolute; inset: 0 auto auto 0;
  min-width: 17px; height: 17px; padding-inline: 3px; background: #ffbe8e; color: #33261e; font: 700 11px/1 var(--sans);
}
.compare-sidebar { max-height: calc(clamp(240px, calc(100dvh - 176px), 780px) + 44px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.compare-analysis { display: grid; gap: 9px; }
.compare-status:not(:empty) { padding: 7px 10px; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.compare-score, .compare-panel { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); }
.compare-score { background: linear-gradient(150deg, var(--accent), var(--paper) 94%); }
.compare-score h3, .compare-panel h3 { font-size: 13px; line-height: 1.3; }
.compare-score-total { color: var(--brand-dark); font-size: clamp(27px, 4vw, 38px); font-weight: 750; line-height: 1; letter-spacing: -.045em; }
.compare-score-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; color: var(--muted); font-size: 11px; }
.compare-score-row strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.compare-score-row meter { grid-column: 1 / -1; width: 100%; height: 6px; background: var(--selected); border-radius: 6px; overflow: hidden; }
.compare-score-row meter::-webkit-meter-bar { border: 0; background: var(--selected); }
.compare-score-row meter::-webkit-meter-optimum-value { background: var(--brand); }
.compare-score-row meter::-moz-meter-bar { background: var(--brand); }
.compare-region-count, .compare-metric-note { color: var(--muted); font-size: 11px; }
.compare-metrics { width: 100%; border-collapse: collapse; text-align: start; font-size: 11px; font-variant-numeric: tabular-nums; }
.compare-metrics th, .compare-metrics td { padding-block: 3px; border-bottom: 1px solid var(--border); }
.compare-metrics thead th { color: var(--muted); font-weight: 500; }
.compare-metrics th:first-child { text-align: start; }
.compare-metrics td, .compare-metrics th:not(:first-child) { text-align: end; white-space: nowrap; }
.compare-ai .btn { min-height: 34px; }
.compare-recommendation:empty { display: none; }
.compare-recommendation { display: grid; gap: 3px; font-size: 12px; overflow-wrap: anywhere; }
.compare-recommendation strong { color: var(--brand-dark); }
.compare-recommendation small { color: var(--muted); font-size: 11px; }
@media (max-width: 860px) {
  .compare-layout { grid-template-columns: minmax(0, 1fr); }
  .compare-stage { height: clamp(188px, 53dvh, 550px); }
  .compare-sidebar { max-height: none; overflow: initial; }
  .compare-analysis { grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 560px) {
  #photo-compare { width: calc(100vw - 14px); max-height: calc(100dvh - 14px); border-radius: 13px; }
  .compare-head { padding: 8px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 6px; }
  .compare-close { grid-area: 1 / 2; }
  .compare-controls { grid-area: 2 / 1 / 3 / -1; justify-content: start; gap: 5px; }
  .compare-layout { gap: 8px; padding: 7px; }
  .compare-viewer { gap: 5px; }
  .compare-photo { border-radius: 8px; }
  .compare-photo figcaption { gap: 4px; min-height: 32px; padding: 4px; font-size: 11px; }
  .compare-side { padding-inline: 4px; }
  .compare-stage { height: clamp(148px, 44dvh, 340px); }
  .compare-analysis { grid-template-columns: minmax(0, 1fr); }
  .compare-tray { display: grid; grid-template-columns: 1fr auto auto; gap: 7px; padding: 8px; }
  .compare-tray-copy { font-size: 12px; }
  .compare-tray-copy small { font-size: 10px; }
  .compare-tray-photo, .compare-tray-placeholder { width: 32px; height: 32px; }
}
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr); }
.detail-image { min-height: 350px; background: var(--side); display: grid; align-items: start; }
.detail-picture { position: relative; min-height: 80px; display: grid; place-items: center; }
.detail-image img { width: 100%; max-height: 74vh; object-fit: contain; }
.detail-body { padding: 14px 18px 19px; display: grid; align-content: start; gap: 13px; }
.detail-body .section { border-top: 1px solid var(--border); padding-top: 9px; }
.detail-body .section h3 { font-size: 14px; margin-bottom: 5px; }
.detail-body dl { margin: 0; display: grid; grid-template-columns: minmax(75px, auto) minmax(0, 1fr); column-gap: 8px; font-size: 12px; }
.detail-body dt { color: var(--muted); }
.detail-body dd { margin: 0; overflow-wrap: anywhere; }
.detail-body pre { margin: 2px 0 5px; border-radius: 7px; background: var(--page); padding: 7px 8px; font: 12px/1.55 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 190px; overflow: auto; }
.statuses, .tags { display: flex; flex-wrap: wrap; gap: 5px; }
.status-failed { background: #fff0ee; color: var(--danger); }
.upload-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.upload-item strong { display: block; overflow-wrap: anywhere; font-size: 12px; }
.upload-item small { display: block; color: var(--muted); font-size: 11px; }
.upload-item progress { width: 100%; accent-color: var(--brand); }
.drop-target { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 22px 12px; border: 1px dashed var(--brand); border-radius: 10px; background: var(--page); }
.drop-target.dragover { background: var(--accent); outline: 2px solid var(--focus); }
.drop-target p { color: var(--muted); font-size: 12px; }
.admin-table { display: grid; gap: 7px; }
.admin-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px; align-items: center; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px; background: white; }
.notifications { position: fixed; inset: auto 16px 16px auto; z-index: 10; max-width: min(360px, calc(100vw - 32px)); display: grid; gap: 6px; }
.toast { background: var(--accent); color: var(--ink); border: 1px solid var(--brand); border-radius: 8px; box-shadow: var(--shadow); padding: 8px 12px; font-size: 13px; overflow-wrap: anywhere; }
.error-toast { background: #8d2a22; border-color: #8d2a22; color: white; }
@media (min-width: 1500px) {
  .shell { grid-template-columns: var(--navigation-width, 236px) minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; }
  .topbar .search { flex-basis: 100%; max-width: none; }
}
@media (max-width: 880px) {
  .shell { grid-template-columns: var(--navigation-width, 174px) minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .content { padding-inline: 17px; }
  .topbar { padding-inline: 17px; }
  .hero { min-height: 204px; padding-inline: 23px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 176px), 1fr)); }
  .login-landing .login-art { inset-inline-start: 42%; }
}
@media (max-width: 625px) {
  .reel-viewport { --reel-gap: 7px; }
  .album-backdrop { width: min(52vw, 230px); height: min(40svh, 270px); }
  .shell { display: block; }
  .sidebar-resize { display: none; }
  .assistant-panel { width: min(100vw, 400px); }
  .assistant-resize { display: none; }
  .sidebar { position: static; height: auto; display: flex; gap: 12px; padding: 13px 14px 7px; border-inline-end: 0; border-bottom: 1px solid var(--border); overflow: visible; }
  .sidebar .brand { padding-left: 0; }
  .sidebar .mark { width: 31px; height: 31px; }
  .sidebar .brand strong { font-size: 16px; }
  .sidebar .brand small { display: none; }
  .sidebar .side-group { display: flex; gap: 2px; flex-wrap: wrap; }
  .sidebar .nav { width: auto; padding: 6px 7px; font-size: 11px; gap: 5px; }
  .sidebar .side-album-row { max-width: 100%; }
  .sidebar .side-album-row .nav { width: 100%; }
  .sidebar .nav[aria-current="page"] { box-shadow: inset 0 -2px var(--brand); }
  .sidebar .nav-label, .sidebar .count { display: none; }
  .sidebar .side-recent { flex-basis: 100%; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); margin-block: 4px 0; padding-top: 4px; }
  .side-footer { justify-items: start; gap: 4px; }
  .side-account { width: 100%; padding: 6px 3px 0; }
  .avatar { width: 28px; height: 28px; }
  .topbar { flex-wrap: wrap; min-height: auto; padding: 8px 12px; gap: 6px; }
  .topbar-actions { width: 100%; justify-content: flex-start; gap: 6px; }
  .topbar .btn { min-height: 44px; padding-inline: 8px; font-size: 12px; }
  .topbar-photo-tools { padding: 0 2px; }
  .topbar-photo-tools .btn { min-height: 42px; }
  .topbar .search { padding: 0 6px 0 9px; }
  .topbar .search > svg { display: none; }
  .topbar input { min-height: 44px; font-size: 16px; }
  .topbar .search button { min-width: 44px; min-height: 44px; }
  .search-submit-icon { display: inline-flex; }
  .topbar kbd { display: none; }
  .layout-dialog { padding: 11px; }
  .layout-tabs .btn, .layout-footer .btn, .layout-order .icon-button, .assistant-header-actions .icon-button { min-height: 44px; }
  .layout-row { font-size: 13px; }
  .layout-order .icon-button { width: 41px; }
  .content { padding: 13px 12px 32px; }
  .map-setup-notice { flex-wrap: wrap; align-items: center; }
  .map-setup-notice > div:first-of-type { flex: 1; min-width: min(175px, 100%); }
  .map-setup-actions :is(.btn, .icon-button) { min-height: 44px; }
  .hero { min-height: 166px; padding: 15px; }
  .hero-title { font-size: 32px; }
  .hero-metrics { gap: 9px; }
  .photo-reel { margin-top: 19px; }
  .preview-banner { margin-bottom: 8px; }
  .toolbar { margin: 13px 0; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile-meta { padding: 7px; }
  .tile-meta strong { font-size: 12px; }
  .login { grid-template-columns: minmax(0, 420px); align-content: center; gap: 18px; padding: 22px 16px; }
  .login:not(.login-landing) .login-art { display: none; }
  .login-inner { padding: clamp(16px, 5vw, 24px); gap: 15px; }
  .login-inner .form-flow input, .login-inner .form-flow .btn { min-height: 44px; font-size: 16px; }
  .login-inner .auth-links { gap: 0 8px; }
  .login-inner .auth-links button { min-height: 44px; }
  .login-landing {
    height: 100dvh;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(65px, 1fr);
    align-items: stretch;
    align-content: stretch;
    justify-items: stretch;
    gap: 4px;
    padding: clamp(10px, 3dvh, 25px) clamp(16px, 5vw, 32px) 0;
  }
  .landing-copy h1 { font-size: clamp(30px, min(10.5vw, 8.8dvh), 64px); }
  .landing-copy .brand { margin-bottom: clamp(8px, 2.6dvh, 20px); }
  .landing-features, .landing-actions { margin-top: clamp(8px, 2.6dvh, 18px); }
  .login-landing .login-art { position: static; min-height: 0; padding: 0; }
  .login-landing .login-art-frame { height: auto; }
  .login-landing .login-mascot { object-position: center bottom; }
  .login-landing .login-art-frame::after { background: linear-gradient(180deg, var(--landing-page), transparent 13%); }
  .login-landing .login-art-selector { justify-content: center; padding: 2px 0 5px; }
  .login-landing .login-art-selector button { min-height: 34px; padding-inline: 8px; font-size: 12px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-image { min-height: 150px; }
  .detail-image img { max-height: 38vh; }
}
@media (max-width: 625px) and (max-height: 340px) and (orientation: landscape) {
  .login-landing { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 8px; }
  .landing-copy h1 { font-size: clamp(24px, min(6.2vw, 11dvh), 38px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reel-toggle, .hero-toggle { display: none; }
  .album-backdrop img { animation: none; }
  .album-backdrop img:not(:first-child) { display: none; }
  .login-mascot-ready { animation: none; }
}
.inline-form { margin-top: 7px; display: flex; gap: 6px; }
.inline-form select { min-height: 32px; min-width: 0; flex: 1; padding: 2px 7px; border: 1px solid var(--control-border); border-radius: 7px; background: white; color: var(--ink); }
.inline-icon { display: grid; place-items: center; background: transparent; color: inherit; border: 0; padding: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
