* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  color-scheme: light;
  --page: #f5f5f0;
  --surface: #fafaf6;
  --ink: #202923;
  --muted: #58655c;
  --line: #d8ddd3;
  --accent: #294b3a;
  --accent-hover: #193e2c;
  --on-accent: #f6f9f3;
  --active: #e7eee3;
  --frame: #171c18;
  --frame-ink: #f5f7f2;
  font-family: "Geist", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #19201c;
    --surface: #202923;
    --ink: #f1f5ef;
    --muted: #b2c0b4;
    --line: #3e5042;
    --accent: #c0d7b9;
    --accent-hover: #d9e8d4;
    --on-accent: #1b3023;
    --active: #2b3c2f;
  }
}
body { margin: 0; background: var(--page); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .56; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(100% - 96px, 1264px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 22px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 29px; border: 2px solid var(--accent); border-radius: 6px; }
.brand-mark i { width: 17px; height: 13px; border: 1px solid var(--accent); border-radius: 2px; }
.brand-detail { color: var(--muted); font-size: 12px; font-weight: 500; padding-left: 11px; border-left: 1px solid var(--line); }
.toolbar-actions { display: flex; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 15px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; font-weight: 650; white-space: nowrap; transition: background .16s, border-color .16s; }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-hover); }
.button.quiet { background: transparent; border-color: var(--line); color: var(--ink); }
.button.quiet:hover { background: var(--active); }
.play-icon { border-left: 8px solid currentColor; border-block: 5px solid transparent; }
.search-panel { margin-top: 32px; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.search-content { min-width: 0; padding: clamp(24px, 3.3vw, 48px); align-self: center; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(38px, 4.2vw, 63px); letter-spacing: -.085em; line-height: 1.16; font-weight: 760; }
.intro { margin-top: 13px; color: var(--muted); font-size: 15px; }
.search-form { margin-top: 24px; background: var(--page); display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; gap: 12px; padding: 5px 5px 5px 15px; min-height: 56px; }
.search-form:focus-within { border-color: var(--accent); }
.search-form input { min-width: 0; width: 100%; border: 0; background: transparent; color: var(--ink); outline: none; font-size: 16px; }
.search-form input::placeholder { color: var(--muted); opacity: 1; }
.search-icon { display: block; position: relative; flex: 0 0 15px; height: 15px; border: 1.6px solid var(--muted); border-radius: 50%; margin-right: 2px; }
.search-icon::after { content: ""; position: absolute; background: var(--muted); width: 6px; height: 1.6px; transform: rotate(45deg); bottom: -2px; right: -5px; }
.search-form .button { padding-inline: 20px; }
.suggestions { margin-top: 21px; }
.suggestions p { color: var(--muted); font-size: 12px; font-weight: 650; margin-bottom: 9px; }
.presets { display: flex; flex-wrap: wrap; gap: 7px; }
.preset { border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; background: transparent; color: var(--ink); font-size: 12px; line-height: 1.35; text-align: left; transition: background .16s, border-color .16s; }
.preset:hover, .preset[aria-pressed="true"] { background: var(--active); border-color: var(--accent); }
.image-action { margin-top: 15px; }
.text-button { border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 650; padding: 4px 0; }
.text-button:hover { text-decoration: underline; }
.hero-photo { background: #303d37; border: 0; padding: 0; position: relative; min-height: 370px; overflow: hidden; }
.hero-photo img { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; transition: transform .35s ease; }
.hero-photo:hover img { transform: scale(1.025); }
.hero-photo:focus-visible { outline-offset: -6px; outline-color: var(--frame-ink); }
.gallery { margin-top: 44px; }
.gallery-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 18px; }
.gallery-heading-main { flex: 1 1 245px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.gallery-heading-main > div { min-width: 0; }
.gallery-heading h2 { font-size: 27px; font-weight: 730; letter-spacing: -.055em; overflow-wrap: anywhere; }
.gallery-heading-main p { color: var(--muted); font-size: 13px; margin-top: 5px; }
.search-settings { flex: 0 1 400px; min-width: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.setting-heading { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; font-weight: 650; }
.setting-heading output { font-variant-numeric: tabular-nums; }
.search-settings input { display: block; width: 100%; margin: 8px 0; accent-color: var(--accent); }
.search-settings p { color: var(--muted); font-size: 12px; }
.setting-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.setting-footer button { flex-shrink: 0; }
.setting-footer button:disabled { cursor: default; text-decoration: none; }
.albums { display: flex; gap: 8px; overflow: auto; padding-block: 4px 12px; margin: -4px -3px 9px; padding-inline: 3px; scrollbar-width: thin; }
.album { flex: 0 0 auto; min-height: 36px; padding: 6px 13px; border-radius: 6px; background: transparent; border: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.album:hover { background: var(--active); }
.album[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 25px 16px; }
.photo-card { border: 0; padding: 0; text-align: left; background: transparent; color: inherit; min-width: 0; border-radius: 9px; }
.photo-card .photo-cover { display: block; position: relative; overflow: hidden; border-radius: 8px; aspect-ratio: 1.46; background: var(--active); }
.photo-card img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .24s; }
.photo-card:hover img { transform: scale(1.035); }
.photo-score { position: absolute; right: 6px; bottom: 6px; padding: 3px 6px; border-radius: 5px; background: #171c18e8; color: #fff; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.photo-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 8px 1px 0; }
.photo-label strong { font-size: 14px; font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-label span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.gallery-footer { min-height: 104px; display: grid; place-items: center; }
.empty { grid-column: 1 / -1; padding: 38px 20px; border-block: 1px solid var(--line); color: var(--muted); }
.notice { position: fixed; z-index: 2; right: max(18px, calc((100% - 1264px)/2)); bottom: 20px; max-width: min(490px, calc(100% - 36px)); border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 13px 17px; box-shadow: 0 6px 32px #162a1917; font-size: 14px; }
#viewer { border: 0; background: var(--frame); color: var(--frame-ink); max-width: none; max-height: none; width: 100%; height: 100dvh; margin: 0; padding: clamp(13px, 3vw, 38px); }
#viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; }
#viewer::backdrop { background: var(--frame); }
.viewer-top, .viewer-details { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.viewer-top span { color: #c9d2c8; font-size: 13px; }
.viewer-stage { min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.viewer-stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.viewer-button { min-height: 42px; border: 1px solid #59695c; border-radius: 8px; padding: 8px 13px; background: transparent; color: var(--frame-ink); font-size: 14px; white-space: nowrap; }
.viewer-button:hover { background: #2d3b30; }
.viewer-button:focus-visible { outline-color: #dcead8; }
.arrow { font-size: 30px; line-height: 1; }
.viewer-details h2 { font-size: 20px; overflow-wrap: anywhere; }
.viewer-details p, .viewer-details a { font-size: 13px; color: #c9d2c8; margin-top: 4px; }
.sr-only { clip: rect(0,0,0,0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
@media (max-width: 1020px) {
  .shell { width: calc(100% - 48px); }
  .search-content { padding: 27px; }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .shell { width: calc(100% - 32px); }
  .toolbar { min-height: 64px; }
  .brand-detail { display: none; }
  .brand { font-size: 19px; gap: 8px; }
  .toolbar-actions { gap: 6px; }
  .toolbar-actions .button { padding-inline: 9px; font-size: 12px; }
  .search-panel { grid-template-columns: 1fr; margin-top: 18px; }
  .search-content { padding: 22px; }
  .hero-photo { min-height: 0; aspect-ratio: 2.2; }
  .gallery { margin-top: 26px; }
  .gallery-heading h2 { font-size: 24px; }
  .search-settings { flex-basis: 100%; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
  .photo-label strong { font-size: 13px; }
  .viewer-stage { gap: 5px; }
  .arrow { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

