:root {
  color-scheme: dark;
  --paper: #161412;
  --panel: #1f1c19;
  --stage: #211e1b;
  --ink: #eee7dc;
  --muted: #b7aa9c;
  --line: #38312a;
  --accent: #cba77f;
  --accent-soft: #352c23;
  --contrast: #1a1714;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  min-height: 100vh;
  min-height: 100dvh;
}
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.action {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}
.action:disabled { opacity: .43; cursor: default; }
.action-primary { background: var(--accent); border-color: var(--accent); color: var(--contrast); font-weight: 650; }
.login-page { display: grid; place-items: center; padding: 28px 20px; }
.login-card { width: min(100%, 370px); padding: clamp(22px, 6vw, 36px); background: var(--panel); border: 1px solid var(--line); border-radius: 13px; }
.brand-icon { display: block; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 11px; }
.login-card h1 { margin: 0 0 26px; font-size: 27px; font-weight: 650; }
.login-card form, .login-card label { display: grid; gap: 8px; }
.login-card form { gap: 15px; }
.login-card label { color: var(--muted); font-size: 14px; }
.login-card input {
  width: 100%; min-width: 0; min-height: 45px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 7px;
  color: var(--ink); padding: 9px 11px; font-size: 16px;
}
.status { color: var(--muted); margin: 0; }
.status:empty { display: none; }
.guest-header {
  min-height: 65px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  display: flex; gap: 10px; align-items: center;
  border-bottom: 1px solid var(--line);
}
.guest-header h1 { font-weight: 650; font-size: 18px; margin: 0; }
.guest-header img { border: 1px solid var(--line); border-radius: 8px; }
.guest-main { width: min(100%, 840px); margin-inline: auto; padding: 16px max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
.guest-status { padding: 16px 0; margin: 0; color: var(--muted); }
.photo-frame {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  background: #11100f; display: grid; place-items: center; padding: 0; overflow: hidden; cursor: zoom-in;
}
.photo-frame img { display: block; max-width: 100%; width: auto; height: auto; max-height: calc(100dvh - 152px); object-fit: contain; }
.photo-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 11px; gap: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.photo-nav button:first-child { justify-self: start; }
.photo-nav button:last-child { justify-self: end; }
.zoom-dialog {
  padding: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  border: 0; margin: 0; color: var(--ink); background: #11100f;
}
.zoom-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.zoom-dialog::backdrop { background: #11100f; }
.zoom-bar { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; }
.zoom-bar h2 { font-size: 16px; margin: 0; font-weight: 550; }
#zoomViewport { overflow: auto; }
#zoomImage { display: block; max-width: 100%; max-height: 100%; object-fit: contain; margin-inline: auto; }
#zoomViewport.zoomed #zoomImage { width: 180%; min-width: 180%; max-width: none; max-height: none; }
