:root {
  color-scheme: dark;
  --bg: #111211; --panel: #1b1c1a; --inset: #141513; --raised: #252623;
  --text: #edece6; --quiet: #b0b1a8; --line: #393a34; --edge: #55564d;
  --gold: #e2b875; --gold-light: #f4d9a5; --green: #b5d4a4;
  --radius: 14px; --inner: 8px; --key: 5px; --hit: 44px;
  --out: cubic-bezier(0,0,.58,1); --settle: cubic-bezier(.22,1,.36,1); --travel: cubic-bezier(.42,0,.58,1);
  --serif: "Baskerville","Noto Serif SC","Songti SC","SimSun",Georgia,serif;
  --latin: "Baskerville","Palatino Linotype",Georgia,serif;
  --mono: "IBM Plex Mono",Consolas,"Courier New",monospace;
  font: 16px/1.55 "Instrument Sans","PingFang SC","Microsoft YaHei",sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 72% 0%,#39342735,transparent 45%),var(--bg); color: var(--text); }
.mast, main, footer { width: min(1248px,91%); margin-inline: auto; }
button, input { font: inherit; }
button { color: inherit; background: transparent; border: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
[hidden] { display: none !important; }
h1,h2,p { margin: 0; } h1,h2 { text-wrap: balance; } p { text-wrap: pretty; }
:lang(zh) { line-break: strict; }
.number, .readouts b, #shot-count, .view-photo, .viewer-head strong { font-variant-numeric: tabular-nums; }
.mast { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: 78px; border-bottom: 1px solid var(--line); }
.mast-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.brand, .tour, .nav, .monitor-head, .last-capture, #grid, .activity, .switch { display: flex; align-items: center; }
.brand { gap: 10px; }
.brand strong { font: 600 34px/.95 var(--latin); letter-spacing: -.055em; }
.brand > span:last-child { margin-left: 5px; padding-left: 15px; border-left: 1px solid var(--edge); color: var(--quiet); font-size: 14px; }
.plane { position: relative; width: 27px; height: 27px; color: var(--gold); }
.plane::before { content: ""; position: absolute; inset: 4px; border: 1.5px solid; border-radius: 50%; }
.plane::after { content: ""; position: absolute; top: 48%; width: 100%; height: 1.5px; background: currentColor; transform: rotate(-30deg); }
.nav, .switch { padding: 3px; gap: 2px; background: #10110f; border: 1px solid var(--line); border-radius: 25px; }
.nav button, .switch button { min-height: var(--hit); border-radius: 22px; padding: 0 22px; color: var(--quiet); font-size: 14px; white-space: nowrap; }
.nav button[aria-current], .switch button[aria-pressed="true"] { background: var(--raised); color: var(--text); box-shadow: inset 0 1px 0 #ffffff18,0 1px 3px #0006; }
.nav button:hover, .switch button:hover { color: var(--gold-light); }
.tour, .primary, .offline button { min-height: var(--hit); border-radius: 24px; padding: 0 18px; font-weight: 650; font-size: 14px; }
.tour { justify-self: end; gap: 9px; background: #e8d7b4; color: #2a251e; border: 1px solid #f5e6c9; box-shadow: inset 0 1px 0 #fff5,0 2px 4px #0003; white-space: nowrap; }
.tour span:first-child { font-size: 11px; }
.tour[aria-pressed="true"] { background: #3b352b; color: var(--gold-light); border-color: #766445; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding-block: clamp(22px,3.2vw,46px) clamp(18px,2.3vw,32px); }
.edition { display: inline-flex; align-items: center; gap: 9px; color: var(--gold); font-size: 12px; letter-spacing: .12em; }
.edition::before { content: ""; width: 21px; border-top: 1px solid; }
h1 { margin-top: 8px; font: 500 clamp(38px,4vw,62px)/1.1 var(--serif); letter-spacing: .02em; }
.intro p { font-size: 14px; color: var(--quiet); padding-bottom: 3px; }
.deck { display: grid; grid-template-columns: minmax(0,1.93fr) minmax(286px,1fr); gap: clamp(16px,2.2vw,32px); align-items: start; }
@media (min-width: 821px) {
  html { scrollbar-gutter: stable; }
  .controls { align-self: stretch; display: grid; grid-template-rows: 1fr auto auto; }
}
.monitor, .controls, .surface, dialog { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.monitor { padding: 7px 7px 0; box-shadow: inset 0 1px 0 #ffffff09,0 15px 40px -24px #000; }
.frame { position: relative; overflow: hidden; aspect-ratio: 3/2; border-radius: var(--inner); background: #0b0c0a; isolation: isolate; }
.frame > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.monitor-head { position: absolute; top: 13px; left: 13px; gap: 7px; padding: 4px 9px; border-radius: 4px; font-size: 12px; color: #f5f3e9; background: #151815ba; pointer-events: none; }
.lamp,.activity i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; }
.lamp.off { background: var(--quiet); }
.mobile-camera { display: none; }
.scene-caption { position: absolute; bottom: 13px; left: 13px; pointer-events: none; padding: 3px 9px; border-left: 2px solid var(--gold);
  font: 500 16px/1.5 var(--serif); color: #fffaf0; background: #14141199; }
#focus-area,.gridlines,.offline { position: absolute; inset: 0; }
#focus-area { width: 100%; height: 100%; padding: 0; cursor: crosshair; touch-action: manipulation; }
#focus-area:focus-visible { outline-offset: -5px; }
.reticle { position: absolute; translate: -50% -50%; left: 59.5%; top: 60%; width: clamp(36px,10%,84px); aspect-ratio: 1.28; pointer-events: none; color: #ffe099; filter: drop-shadow(0 1px 2px #21261a); }
.reticle i { position: absolute; width: 23%; height: 27%; border: 2px solid; }
.reticle i:nth-child(1) { top: 0; left: 0; border-width: 2px 0 0 2px; }
.reticle i:nth-child(2) { top: 0; right: 0; border-width: 2px 2px 0 0; }
.reticle i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.reticle i:nth-child(4) { bottom: 0; right: 0; border-width: 0 2px 2px 0; }
.gridlines { pointer-events: none; background: linear-gradient(90deg,transparent calc(100% - 1px),#ffffff73 0) 0 0/33.3333% 100%,linear-gradient(0deg,transparent calc(100% - 1px),#ffffff73 0) 0 0/100% 33.3333%; }
.offline { display: grid; place-content: center; justify-items: center; gap: 12px; background: var(--inset); }
.offline button, .primary { background: var(--gold-light); color: #211e18; }
.monitor-foot { display: grid; align-items: center; grid-template-columns: 1fr auto 1fr; gap: 12px; padding: 13px clamp(8px,1.4vw,22px); }
.last-capture { gap: 11px; min-width: 0; }
.last-capture div { display: grid; }
.last-capture strong { font: 500 17px/1.4 var(--serif); }
.last-capture small { color: var(--quiet); font-size: 12px; }
.last-shot { flex: none; width: 46px; height: 46px; border-radius: var(--key); overflow: hidden; position: relative; padding: 0; border: 1px solid var(--edge); }
.last-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.last-shot span { position: absolute; bottom: 0; right: 0; background: #141411b0; font: 12px var(--mono); padding: 0 3px; }
.shutter { width: 64px; height: 64px; border-radius: 50%; padding: 4px; border: 1px solid #a09e93; background: #111210;
  box-shadow: inset 0 1px 2px #fff2,0 2px 5px #000a; }
.shutter i { display: block; height: 100%; border-radius: inherit; border: 1px solid #d5d3c8;
  background: linear-gradient(#faf9f1,#cecec4); box-shadow: inset 0 1px 0 #fff,inset 0 -2px 2px #0002,0 1px 2px #000; }
.shutter:active:not(:disabled) i { transform: translateY(1px) scale(.95); background: linear-gradient(#cecdc4,#efeee6); box-shadow: inset 0 1px 3px #0004; }
#grid { justify-self: end; gap: 9px; min-height: var(--hit); color: var(--quiet); font-size: 13px; }
#grid[aria-pressed="true"] { color: var(--gold-light); }
.grid-icon { width: 15px; height: 15px; border: 1px solid; background: linear-gradient(currentColor,currentColor) center/1px 100% no-repeat,linear-gradient(currentColor,currentColor) center/100% 1px no-repeat; }
.controls { overflow: hidden; }
.camera-plate { position: relative; isolation: isolate; display: flex; align-items: flex-end; padding: 19px 24px; min-height: clamp(124px,10.7vw,164px); background: #0b0b0b; overflow: hidden; }
.camera-plate img { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
.camera-plate > div { display: grid; color: #f0eee8; text-shadow: 0 1px 5px #000; }
.camera-plate span { color: #d4cdc0; font-size: 12px; }
.camera-plate strong, .camera-plate h2 { font: 400 clamp(26px,2.6vw,42px)/1.25 var(--latin); }
.parameters,.scenes { padding: clamp(16px,1.55vw,24px) clamp(16px,1.8vw,27px); border-top: 1px solid var(--line); }
.controls h2, legend { font: 550 17px/1.45 var(--serif); letter-spacing: .06em; }
.readouts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 15px 0; padding: 3px; background: var(--inset); border: 1px solid #30312c; border-radius: var(--inner); }
.readouts button { display: grid; text-align: center; gap: 2px; padding: 7px 0; min-height: var(--hit); border-radius: var(--key); }
.readouts small, .swatches span { color: var(--quiet); font-size: 12px; }
.readouts b { font: 500 clamp(17px,1.4vw,22px)/1.25 var(--mono); }
.readouts button[aria-pressed="true"] { background: #30312a; box-shadow: inset 0 1px 0 #ffffff20,0 1px 2px #0007; }
.readouts button[aria-pressed="true"] b { color: var(--gold-light); }
.dial { display: flex; align-items: center; gap: 6px; }
.dial button { min-width: var(--hit); min-height: var(--hit); font: 24px/1 var(--mono); border-radius: var(--key); color: var(--quiet); }
.ruler { flex: 1; min-width: 0; position: relative; padding-inline: 5px; }
.ruler::before { content: ""; pointer-events: none; position: absolute; inset: 50% 10px auto; height: 14px; translate: 0 -50%; border-right: 1px solid #a19c89;
  background: linear-gradient(90deg,#b6af9d 0 1px,transparent 1px 100%) left center/var(--stop-gap,20%) 14px repeat-x,
    linear-gradient(90deg,#77786c 0 1px,transparent 1px 100%) left center/var(--tick-gap,4%) 7px repeat-x; }
input[type="range"] { position: relative; display: block; width: 100%; height: 44px; margin: 0; appearance: none; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 10px; height: 25px; border: 2px solid var(--gold-light); border-radius: 3px; background: #b79863; box-shadow: 0 0 0 2px #24241e; }
input[type="range"]::-moz-range-thumb { width: 7px; height: 21px; border: 2px solid var(--gold-light); background: #b79863; border-radius: 3px; }
.range-ends { display: flex; justify-content: space-between; padding-inline: 50px; color: var(--quiet); font: 12px/1.25 var(--mono); }
.swatches { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 14px; }
.swatches button { display: grid; min-width: 0; gap: 6px; text-align: left; padding: 0 0 6px; border-bottom: 2px solid transparent; }
.swatches img { display: block; width: 100%; aspect-ratio: 1.5; object-fit: cover; border-radius: var(--key); }
.swatches button[aria-pressed="true"] { border-color: var(--gold); }
.swatches button[aria-pressed="true"] span { color: var(--gold-light); }
.swatches button[aria-pressed="true"] span::before { content: ""; display: inline-block; width: 4px; height: 7px; margin: 0 6px 1px 1px; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(40deg); }
.surface { padding: clamp(18px,3vw,38px); }
.gallery-head,.gallery-foot,.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.number { color: var(--quiet); font: 14px var(--mono); }
.gallery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(14px,2.1vw,28px); margin: 25px 0; }
.photo { min-width: 0; display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 6px; }
.tile { position: relative; grid-column: 1/-1; border: 1px solid var(--line); border-radius: var(--inner); overflow: hidden; padding: 0; }
.tile img { width: 100%; aspect-ratio: 3/2; display: block; object-fit: cover; }
.tile span { display: grid; place-items: center; position: absolute; top: 9px; right: 9px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #deddd1; background: #15161290; }
.tile[aria-pressed="true"] { outline: 2px solid var(--gold); outline-offset: 2px; }
.tile[aria-pressed="true"] span { background: var(--gold-light); border-color: var(--gold-light); color: #28241b; }
.tile:disabled { opacity: .82; } .photo > span { color: var(--quiet); font-size: 12px; }
.view-photo { text-align: left; padding: 0; font: 14px var(--mono); min-height: var(--hit); overflow-wrap: anywhere; }
.view-photo:hover { color: var(--gold-light); text-decoration: underline; }
.gallery-foot { border-top: 1px solid var(--line); padding-top: 18px; font-size: 14px; color: var(--quiet); }
.empty { min-height: 130px; display: grid; place-items: center; text-align: center; color: var(--quiet); }
.transfer-state { display: grid; gap: 6px; margin-top: 14px; font-size: 14px; }
progress { width: 100%; accent-color: var(--gold); height: 8px; }
.device { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); padding: 0; overflow: hidden; }
.device-portrait { min-height: 360px; padding: clamp(24px,3.5vw,48px); }
.device-portrait h2 { font-size: clamp(37px,5vw,76px); }
.connections { padding: clamp(20px,3vw,44px); align-self: center; }
fieldset { margin: 0; border: 0; min-width: 0; padding: 0; display: grid; gap: 8px; }
legend { margin-bottom: 16px; }
fieldset label { border: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 10px 15px; border-radius: var(--inner); }
fieldset label:has(:checked) { border-color: #877651; background: #26261f; }
fieldset input { accent-color: var(--gold); }
fieldset span { display: grid; } fieldset b { font-size: 15px; } fieldset small,.connections p { color: var(--quiet); font-size: 13px; }
.connections p { margin: 17px 0; }
.primary.disconnect { color: var(--text); background: var(--raised); border: 1px solid var(--edge); }
.activity { gap: 9px; min-height: 52px; padding-block: 10px; color: var(--quiet); font-size: 14px; }
.activity i { background: var(--gold); }
footer { color: var(--quiet); border-top: 1px solid var(--line); padding: 16px 0 24px; font-size: 12px; }
dialog { padding: clamp(12px,2vw,22px); width: min(850px,94%); max-height: 94dvh; color: var(--text); box-shadow: 0 20px 80px #0007; }
dialog::backdrop { background: #070806d4; }
.viewer-head strong { font: 16px var(--mono); }
.viewer-head button { min-height: var(--hit); color: var(--quiet); }
dialog img { display: block; max-height: 65vh; width: 100%; object-fit: contain; background: var(--inset); }
dialog p { margin-top: 12px; color: var(--quiet); font-size: 14px; }
@media (max-width: 820px) {
  .deck { grid-template-columns: 1fr; }
  .controls { display: grid; grid-template-columns: 1.2fr 1fr; }
  .controls .camera-plate { display: none; }
  .mobile-camera { display: inline; border-left: 1px solid #ffffff55; padding-left: 7px; }
  .parameters,.scenes { border-top: 0; } .scenes { border-left: 1px solid var(--line); }
  .gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .mast,main,footer { width: min(93%,520px); }
  .mast { grid-template-columns: 1fr auto; grid-template-areas: "brand play" "nav nav"; padding: 12px 0 0; gap: 9px; }
  .brand { grid-area: brand; } .mast-actions { grid-area: play; } .nav { grid-area: nav; justify-self: stretch; margin-bottom: 9px; }
  .nav button { flex: 1; } .brand strong { font-size: 30px; } .tour { padding-inline: 12px; }
  .intro { align-items: flex-start; flex-direction: column; padding: 16px 0; gap: 5px; }
  .edition { font-size: 11px; } h1 { font-size: 37px; margin-top: 3px; } .intro p { padding: 0; }
  .deck { gap: 12px; } .monitor { padding: 4px 4px 0; } .monitor-foot { padding: 10px 6px; gap: 6px; }
  .shutter { width: 52px; height: 52px; } .last-capture { gap: 6px; } .last-capture strong { font-size: 14px; }
  .last-capture small { font-size: 11px; } #grid { font-size: 12px; gap: 5px; }
  .controls { display: block; } .scenes { border-left: 0; border-top: 1px solid var(--line); }
  .swatches img { aspect-ratio: 2.5; }
  .device { grid-template-columns: 1fr; } .device-portrait { min-height: 168px; }
  .photo { grid-template-columns: 1fr; } .view-photo { font-size: 12px; }
}
@media (min-width: 601px) and (max-height: 500px) and (orientation: landscape) {
  .mast { min-height: 52px; } .nav button { padding-inline: 13px; }
  .intro { padding-block: 10px; align-items: center; } .intro .edition { display: none; } h1 { margin: 0; font-size: 29px; }
  .deck { grid-template-columns: minmax(0,1.5fr) minmax(222px,1fr); gap: 12px; }
  .controls { display: block; } .controls .camera-plate { display: none; }
  .parameters,.scenes { padding: 10px; } .scenes { border-left: 0; border-top: 1px solid var(--line); }
  .readouts { margin: 6px 0; } .swatches { margin-top: 6px; } .swatches img { aspect-ratio: 2.3; }
  .monitor-foot { padding: 5px; gap: 5px; } .shutter { height: 48px; width: 48px; }
  .last-capture div { display: none; } .mobile-camera { display: inline; }
}
@media (prefers-reduced-motion: no-preference) {
  .deck:not([hidden]), .surface:not([hidden]), dialog[open] { animation: appear .24s var(--out) both; }
  @keyframes appear { from { opacity: .6; transform: translateY(5px); } to { opacity: 1; transform: none; } }
  .shutter i, .tour,.primary { transition: transform .12s var(--settle),background-color .16s var(--out); }
  .tour:active,.primary:active:not(:disabled) { transform: translateY(1px); }
  .nav button,.switch button,.readouts button { transition: color .15s var(--out),background-color .18s var(--travel); }
  .frame img { transition: filter .17s var(--out); }
}
