/* The signed-in FotoSafe app: a dark rail, a toolbar per screen, and dense panels on warm paper. */
:root {
  --paper: #efebe3;
  --panel: #f6f3ed;
  --sheet: #fbfaf7;
  --band: #ebe6dc;
  --line: #d9d3c7;
  --edge: #c9c2b5;
  --ink: #141312;
  --text: #34312d;
  --muted: #6f6b64;
  --faint: #a39e95;
  --brick: #9b3b2b;
  --brick-soft: #d8b9b1;
  --rail: #121110;
  --rail-on: #2a2724;
  --rail-text: #b9b4aa;
  --rail-bright: #f1ede4;
  --chip: #e7e2d7;
  --ok: #3f6b45;
  --slab: "Zilla Slab", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.app {
  background: var(--paper);
  color: var(--text);
  font: 500 14px/1.45 var(--slab);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); }
a:hover { color: var(--brick); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brick); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--sheet); padding: 6px 10px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- layout ---------- */
.app-frame { display: flex; min-height: 100vh; min-height: 100dvh; }
.rail {
  flex: 0 0 78px;
  background: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
}
.rail-home { display: flex; justify-content: center; padding: 4px 0 12px; }
.rail-home img { width: 34px; height: auto; }
.rail-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 0 8px;
  color: var(--rail-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  font: 500 10px/1.1 var(--mono);
}
.rail-link:hover { color: var(--rail-bright); background: #1d1b19; }
.rail-link[aria-current="page"] { color: var(--rail-bright); background: var(--rail-on); border-left-color: var(--brick); }
.rail-link svg { width: 22px; height: 22px; }
.rail-link.locked { opacity: 0.5; }
.rail-lock { position: absolute; top: 6px; right: 12px; width: 11px; height: 11px; }
.rail-foot { margin-top: auto; padding: 10px 10px 4px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.rail-meter { width: 100%; height: 4px; background: #2e2b28; border-radius: 2px; overflow: hidden; }
.rail-meter span { display: block; height: 100%; background: var(--brick); border-radius: 2px; }
.rail-plan { font: 500 9.5px/1.25 var(--mono); color: var(--rail-text); text-align: center; text-decoration: none; }
.rail-plan:hover { color: var(--rail-bright); }
.rail-me {
  width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--chip); color: var(--ink); display: grid; place-items: center; font: 700 12px/1 var(--slab);
}
.rail-menu {
  position: fixed; left: 84px; bottom: 12px; z-index: 40; min-width: 220px;
  background: var(--sheet); border: 1px solid var(--edge); border-radius: 4px; padding: 8px; box-shadow: 0 6px 24px rgba(20, 19, 18, 0.18);
  display: flex; flex-direction: column; gap: 4px;
}
.rail-menu p { margin: 2px 4px 6px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.rail-menu a, .rail-menu button { text-align: left; background: none; border: 0; padding: 6px 8px; border-radius: 3px; cursor: pointer; text-decoration: none; color: var(--ink); }
.rail-menu a:hover, .rail-menu button:hover { background: var(--band); color: var(--ink); }

.screen { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--panel);
  position: sticky; top: 0; z-index: 10;
}
.bar h1 { margin: 0; font: 700 19px/1 var(--slab); color: var(--ink); }
.bar .grow { flex: 1 1 auto; }
.band {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 18px; border-bottom: 1px solid var(--line); background: var(--band);
  position: sticky; top: 55px; z-index: 9;
}
.band b { color: var(--ink); margin-right: 6px; }
.note {
  margin: 12px 18px 0; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: var(--sheet); border: 1px solid var(--edge); border-left: 3px solid var(--brick); border-radius: 3px;
}
.note span { flex: 1 1 320px; }
.split { display: flex; flex-wrap: wrap; flex: 1; min-height: 0; align-items: flex-start; }
.main-col { flex: 999 1 460px; min-width: 0; padding: 12px 18px 24px; display: flex; flex-direction: column; gap: 16px; }
.side {
  flex: 1 1 300px; max-width: 380px; align-self: stretch;
  border-left: 1px solid var(--line); background: var(--panel);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 12px;
}
.side-sticky { position: sticky; top: 56px; display: flex; flex-direction: column; gap: 12px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; padding: 16px 18px 28px; align-items: start; }

/* ---------- pieces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 11px;
  border: 1px solid var(--edge); background: var(--sheet); color: var(--ink);
  font: 600 13px/1 var(--slab); border-radius: 3px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.btn.primary:hover:not(:disabled) { background: #2b2926; color: var(--sheet); }
.btn.danger { color: var(--brick); border-color: var(--brick-soft); }
.btn.danger:hover:not(:disabled) { border-color: var(--brick); color: var(--brick); }
.btn.small { height: 26px; padding: 0 8px; font-size: 12px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.btn svg { width: 15px; height: 15px; }
.seg { display: flex; border: 1px solid var(--edge); border-radius: 3px; overflow: hidden; }
.seg .btn { border: 0; border-radius: 0; }
.seg .btn + .btn { border-left: 1px solid var(--edge); }
.tier { font: 500 9px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 4px; border: 1px solid currentColor; border-radius: 2px; }
.k { font: 500 10.5px/1.3 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.count { font: 500 12px/1.3 var(--mono); color: var(--muted); }
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px;
  background: var(--sheet); border: 1px solid var(--edge); border-radius: 3px;
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--ink); font-size: 14px; }
.search svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.field {
  height: 32px; padding: 0 9px; border: 1px solid var(--edge); background: var(--sheet); border-radius: 3px; color: var(--ink); min-width: 0;
}
textarea.field { height: auto; padding: 8px 9px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.card h2 { margin: 0; font: 700 16px/1.2 var(--slab); color: var(--ink); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.row > span:first-child, .row > .grow { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.row label { display: flex; align-items: center; gap: 8px; }
dl.facts { margin: 0; display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 4px 10px; font-size: 13px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.status { min-height: 1.2em; margin: 0; font-size: 13px; color: var(--muted); }
.status.bad { color: var(--brick); }
.main-col > .status:empty { display: none; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.chip { font-size: 13px; padding: 3px 9px; background: var(--chip); border-radius: 12px; text-decoration: none; color: var(--ink); }

/* ---------- photos ---------- */
.day { display: flex; flex-direction: column; gap: 6px; }
.day-head { display: flex; align-items: baseline; gap: 10px; }
.day-head h2 { margin: 0; font: 700 14px/1 var(--slab); color: var(--ink); }
.day-head .btn { margin-left: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 4px; }
.tile {
  position: relative; aspect-ratio: 1; border: 0; padding: 0; cursor: pointer; overflow: hidden;
  background: linear-gradient(150deg, #d7d1c5, #8a8378); border-radius: 1px;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .tile-name {
  position: absolute; inset: auto 0 0 0; padding: 14px 6px 5px; font: 500 11px/1.2 var(--mono); color: #f1ede4; text-align: left;
  background: linear-gradient(transparent, rgba(18, 17, 16, 0.7)); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.tile.has-thumb .tile-name { opacity: 0; transition: opacity 0.15s; }
.tile.has-thumb:hover .tile-name, .tile.has-thumb:focus-visible .tile-name { opacity: 1; }
.tile[aria-current="true"] { outline: 3px solid var(--ink); outline-offset: -3px; }
.tile.selected { outline: 3px solid var(--brick); outline-offset: -3px; }
.tile-pick {
  position: absolute; top: 5px; left: 5px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fbfaf7;
  background: rgba(18, 17, 16, 0.25); display: grid; place-items: center; cursor: pointer; padding: 0; opacity: 0; transition: opacity 0.12s;
}
.tile:hover .tile-pick, .tile:focus-within .tile-pick, .picking .tile-pick, .tile.selected .tile-pick { opacity: 1; }
.tile.selected .tile-pick { background: var(--brick); border-color: var(--brick); }
.tile-pick svg { width: 14px; height: 14px; color: #fbfaf7; }
.tile-fav { position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; color: #fbfaf7; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6)); }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.month {
  display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
}
.month .tile { width: 100%; pointer-events: none; }
.month b { color: var(--ink); font-size: 14px; }
.month span { font: 500 11px/1.2 var(--mono); color: var(--muted); }
.more { align-self: center; }
.detail-preview { aspect-ratio: 4 / 3; background: var(--band); border-radius: 2px; display: grid; place-items: center; overflow: hidden; }
.detail-preview img { width: 100%; height: 100%; object-fit: contain; }
.detail-title { display: flex; align-items: center; gap: 8px; }
.detail-title h2 { margin: 0; font: 700 15px/1.2 var(--slab); color: var(--ink); flex: 1; min-width: 0; overflow-wrap: break-word; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.checks .fair, .checks .poor { color: var(--brick); }
.locked-blur { color: var(--faint); filter: blur(2px); user-select: none; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.actions .wide { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.drop-hint {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none;
  background: rgba(239, 235, 227, 0.86); border: 3px dashed var(--brick); font: 700 22px/1.2 var(--slab); color: var(--ink);
}
.uploads {
  position: fixed; right: 16px; bottom: 16px; z-index: 50; width: min(360px, calc(100vw - 32px)); max-height: 50vh; overflow: auto;
  background: var(--sheet); border: 1px solid var(--edge); border-radius: 4px; box-shadow: 0 8px 28px rgba(20, 19, 18, 0.2);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 8px;
}
.uploads-head { display: flex; align-items: center; gap: 8px; }
.uploads-head b { flex: 1; color: var(--ink); }
.upload-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; font-size: 13px; }
.upload-row span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upload-row .k { text-transform: none; letter-spacing: 0; }
.upload-row .bar-track { grid-column: 1 / -1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.upload-row .bar-track span { display: block; height: 100%; background: var(--brick); width: 0; }
.upload-row.done .bar-track span { background: var(--ok); }

/* ---------- plan ---------- */
.big { font: 700 30px/1 var(--slab); color: var(--ink); }
.stack { height: 10px; display: flex; background: var(--line); border-radius: 3px; overflow: hidden; }
.stack span { height: 100%; }
.kinds { margin: 0; display: grid; grid-template-columns: 12px 1fr auto; gap: 6px 8px; align-items: center; font-size: 13px; }
.kinds i { width: 10px; height: 10px; border-radius: 2px; display: block; }
.kinds dd { margin: 0; font: 500 12px/1 var(--mono); color: var(--muted); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.plan-card { background: var(--sheet); border: 1px solid var(--edge); border-radius: 4px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.plan-card.current { border: 2px solid var(--ink); }
.plan-card h2 { margin: 0; font: 700 17px/1 var(--slab); color: var(--ink); }
.plan-card .price { font: 700 24px/1 var(--slab); color: var(--ink); }
.plan-card ul { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.plan-card .btn { margin-top: auto; }
.list { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.list a, .list span { overflow-wrap: anywhere; }

/* ---------- dialogs ---------- */
dialog.ask {
  border: 1px solid var(--edge); border-radius: 6px; padding: 18px; width: min(440px, calc(100vw - 32px));
  background: var(--sheet); color: var(--text); box-shadow: 0 18px 50px rgba(20, 19, 18, 0.3);
}
dialog.ask::backdrop { background: rgba(18, 17, 16, 0.45); }
dialog.ask h2 { margin: 0 0 6px; font: 700 18px/1.2 var(--slab); color: var(--ink); }
dialog.ask p { margin: 0 0 10px; }
dialog.ask form { display: flex; flex-direction: column; gap: 10px; }
dialog.ask label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
dialog.ask .field { width: 100%; }
dialog.ask .buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* ---------- signed out ---------- */
.gate { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.gate-card { max-width: 440px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.gate-card img { width: 72px; }
.gate-card h1 { margin: 0; font: 700 28px/1.1 var(--slab); color: var(--ink); }
.gate-card .account-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
#account-line { display: none; }

/* The account dialog shared with the public site. */
.account-dialog { border: 1px solid var(--edge); border-radius: 6px; padding: 20px; width: min(420px, calc(100vw - 32px)); background: var(--sheet); color: var(--text); }
.account-dialog::backdrop { background: rgba(18, 17, 16, 0.45); }
.account-dialog h2 { margin: 0 0 6px; font: 700 20px/1.2 var(--slab); color: var(--ink); }
.account { display: flex; flex-direction: column; gap: 10px; }
.account label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.account input[type="email"], .account input[type="password"] { height: 34px; padding: 0 9px; border: 1px solid var(--edge); border-radius: 3px; background: #fff; }
.account-hint { margin: 0; font-size: 13px; color: var(--muted); }
.account-switch, .account-forgot { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; font-size: 13px; align-self: flex-start; }
#account-error { margin: 0; color: var(--brick); font-size: 13px; }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px; border: 1px solid var(--ink); background: var(--ink); color: var(--sheet); font: 600 14px/1 var(--slab); border-radius: 3px; cursor: pointer; text-decoration: none; }
.button-quiet { background: var(--sheet); color: var(--ink); border-color: var(--edge); }
.google-signin { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; border: 1px solid var(--edge); border-radius: 3px; background: #fff; color: var(--ink); text-decoration: none; }
.account-or { text-align: center; font-size: 12px; color: var(--muted); margin: 0; }
.account-agree { flex-direction: row !important; align-items: flex-start; gap: 8px !important; color: var(--text) !important; }

/* ---------- narrow screens: the rail becomes a bottom bar ---------- */
@media (max-width: 760px) {
  .app-frame { flex-direction: column; }
  .rail {
    position: fixed; inset: auto 0 0 0; height: auto; flex-direction: row; padding: 0 4px calc(env(safe-area-inset-bottom) + 2px);
    overflow-x: auto; overflow-y: hidden; z-index: 30; gap: 0;
  }
  .rail-home, .rail-foot .rail-meter, .rail-plan { display: none; }
  .rail-link { flex: 0 0 64px; border-left: 0; border-top: 3px solid transparent; padding: 7px 0 6px; }
  .rail-link[aria-current="page"] { border-top-color: var(--brick); }
  .rail-foot { margin: 0 0 0 auto; padding: 8px 8px; flex-direction: row; }
  .rail-menu { left: auto; right: 8px; bottom: 72px; }
  .screen { padding-bottom: 72px; }
  .bar { padding: 10px 16px; }
  .band { top: 0; position: static; padding: 8px 16px; }
  .main-col { padding: 12px 16px 24px; }
  .side { max-width: none; border-left: 0; border-top: 1px solid var(--line); }
  .side-sticky { position: static; }
  .cols { padding: 16px; grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .uploads { bottom: 80px; }
}

/* ---------- albums, sharing and slideshows ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.album-card { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; }
.album-card .tile { width: 100%; pointer-events: none; }
.album-card b { color: var(--ink); font-size: 14px; }
.album-card span { font: 500 11px/1.3 var(--mono); color: var(--muted); }
.album-card[aria-current="true"] .tile { outline: 3px solid var(--ink); outline-offset: -3px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: none; padding: 8px 12px; font: 600 13px/1 var(--slab); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brick); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.stacked { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.stacked .field { color: var(--ink); }
dialog.picker { width: min(920px, calc(100vw - 32px)); }
.picker-scroll { max-height: min(60vh, 560px); overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.picker-grid .tile .tile-pick { opacity: 1; }
.player { display: flex; flex-direction: column; background: #121110; border-radius: 4px; overflow: hidden; }
.player:fullscreen { border-radius: 0; height: 100vh; }
.player-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #121110; cursor: pointer; }
.player:fullscreen .player-stage { aspect-ratio: auto; flex: 1; }
.player-layer { position: absolute; inset: 0; opacity: 0; display: grid; place-items: center; }
.player-layer img { width: 100%; height: 100%; object-fit: contain; }
.player-layer.on { opacity: 1; z-index: 1; }
.player-layer.on.fade { animation: player-fade 0.9s ease both; }
.player-layer.on.pan { animation: player-pan linear both; }
.player-layer.on.pan img { object-fit: cover; }
.player-layer.leaving { opacity: 0; transition: opacity 0.9s ease; }
@keyframes player-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes player-pan { from { opacity: 0.3; transform: scale(1.02) translate(0.6%, 0.4%); } 12% { opacity: 1; } to { opacity: 1; transform: scale(1.1) translate(-1%, -0.8%); } }
@media (prefers-reduced-motion: reduce) { .player-layer.on.pan, .player-layer.on.fade { animation: none; } }
.player-title { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #f1ede4; }
.player-title b { font: 700 clamp(22px, 4vw, 44px)/1.1 var(--slab); text-align: center; padding: 0 16px; }
.player-title span { font: 500 12px/1 var(--mono); color: #b9b4aa; }
.player-caption { position: absolute; left: 14px; bottom: 12px; z-index: 3; font: 500 12px/1 var(--mono); color: #f1ede4; background: rgba(18, 17, 16, 0.6); padding: 5px 7px; border-radius: 2px; }
.player-controls { display: flex; align-items: center; gap: 6px; padding: 8px 10px; color: #f1ede4; }
.player-btn { width: 32px; height: 32px; border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; border-radius: 3px; }
.player-btn:hover { background: #2a2724; }
.player-btn svg { width: 20px; height: 20px; }
.player-track { flex: 1; height: 4px; background: #2e2b28; border-radius: 2px; overflow: hidden; }
.player-track span { display: block; height: 100%; background: var(--brick); }
.player-count { font: 500 11px/1 var(--mono); color: #b9b4aa; white-space: nowrap; }
.filmstrip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.filmstrip .slide { position: relative; flex: 0 0 96px; aspect-ratio: 1; border: 0; padding: 0; background: var(--band); cursor: pointer; }
.filmstrip .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.filmstrip .slide[aria-current="true"] { outline: 3px solid var(--brick); outline-offset: -3px; }
.viewer-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 18px; background: var(--panel); border-bottom: 1px solid var(--line); }
.viewer-top img { width: 34px; }
.viewer-top h1 { margin: 0; font: 700 20px/1.1 var(--slab); color: var(--ink); }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(18, 17, 16, 0.94); display: flex; flex-direction: column; }
.lightbox-img { flex: 1; min-height: 0; display: grid; place-items: center; padding: 12px; }
.lightbox-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; color: #f1ede4; }
.lightbox-bar .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ---------- review ---------- */
.review-group { padding: 8px 10px; border: 1px solid transparent; border-radius: 3px; gap: 2px; }
.review-group[aria-current="true"] { background: var(--sheet); border-color: var(--edge); }
.review-group:hover { background: var(--sheet); }

/* ---------- people ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.person-card { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px; border: 1px solid transparent; border-radius: 4px; background: none; cursor: pointer; text-align: center; color: inherit; }
.person-card:hover, .person-card[aria-current="true"] { background: var(--sheet); border-color: var(--edge); }
.person-card b { color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.person-card span { font: 500 11px/1.3 var(--mono); color: var(--muted); }
.face { display: block; flex: none; border-radius: 50%; background-color: #bfb8ab; background-image: linear-gradient(150deg, #d7d1c5, #8a8378); background-repeat: no-repeat; }
.section-title { margin: 6px 0 0; font: 700 16px/1.2 var(--slab); color: var(--ink); }

/* ---------- family ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font: 500 10.5px/1.3 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); padding: 7px 10px; border-bottom: 2px solid var(--ink); }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table .rail-meter { display: inline-block; height: 6px; }
.table .rail-meter span { display: block; height: 100%; }
