:root {
  color-scheme: dark;
  --bg: #121315;
  --panel: #1b1d20;
  --panel2: #23262a;
  --line: #2f3338;
  --text: #ece8e1;
  --muted: #a39d93;
  --accent: #d9a35b;
  --accent-ink: #1a1307;
  --danger: #e0685f;
  --ok: #6fbf8a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); }
body.no-scroll { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .005em; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { color: var(--muted); text-align: center; padding: 60px 16px; }
.badge { display: inline-block; font: 600 11px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); border-radius: 4px; padding: 4px 6px; vertical-align: middle; }
.badge.gray { background: var(--panel2); color: var(--muted); }
.badge.red { background: var(--danger); color: #fff; }
.badge.green { background: var(--ok); color: #0c1a10; }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--sans); color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #4a4f56; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 7px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
button.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], textarea, select {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
.error { color: var(--danger); }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); }
.brand { font: 600 19px/1.2 var(--serif); color: var(--text); }
.brand:hover { text-decoration: none; }
.topnav { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.topnav form { margin: 0; }
.who { color: var(--muted); }
@media (max-width: 520px) { .who { display: none; } }

/* sign-in */
body.bare { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at top, #22201c, var(--bg) 60%); }
.gate { width: min(360px, 100%); text-align: center; }
.gate h1 { font-size: 32px; margin-bottom: 28px; }
.gate-form { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; gap: 14px; }
.gate-form label { color: var(--muted); }
.code-input { text-align: center; font: 600 30px/1.2 ui-monospace, "SF Mono", Consolas, monospace !important; letter-spacing: .3em; padding: 12px !important; }
.gate-form .btn { justify-content: center; padding: 13px; font-size: 16px; }

/* home: album cards */
.home { max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; }
.album-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.album-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--text); transition: transform .15s, border-color .15s; }
.album-card:hover { text-decoration: none; transform: translateY(-2px); border-color: #4a4f56; }
.album-cover { aspect-ratio: 3 / 2; background: var(--panel2); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-meta { padding: 14px 16px 16px; }
.album-meta h2 { font-size: 21px; margin-bottom: 4px; }
.album-meta p { margin: 0; }

/* album page */
.album-page main { padding-bottom: 60px; }
.hero { position: relative; height: min(62vh, 560px); min-height: 280px; overflow: hidden; display: flex; align-items: flex-end; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,11,.92) 5%, rgba(10,10,11,.25) 55%, rgba(10,10,11,0)); }
.hero-text { position: relative; z-index: 1; padding: 28px 16px; width: min(1200px, 100%); margin: 0 auto; }
.hero h1 { font-size: clamp(32px, 6vw, 58px); line-height: 1.05; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.hero-dates { margin: 8px 0 16px; color: #ddd6cb; font-size: 17px; }
.hero-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.intro { max-width: 1200px; margin: 28px auto 0; padding: 0 16px; }
.intro p { max-width: 760px; margin: 0; font: 19px/1.6 var(--serif); color: #ddd6cb; white-space: pre-line; }
.stop-nav { max-width: 1200px; margin: 24px auto 0; padding: 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.stop-nav a { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--text); font-size: 14px; }
.stop { max-width: 1200px; margin: 48px auto 0; padding: 0 16px; }
.title-card { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; margin-bottom: 18px; background: #000; }
.stop-head { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.stop-head h2 { font-size: 28px; }
.stop-head p { margin: 0; }
.favorites .stop-head h2 { color: var(--accent); }
.memory { max-width: 760px; font: 17px/1.6 var(--serif); color: #ddd6cb; margin: 0 0 18px; white-space: pre-line; border-left: 3px solid var(--accent); padding-left: 14px; }
.grid { display: flex; flex-wrap: wrap; gap: 6px; }
.tile { position: relative; display: block; border-radius: 4px; overflow: hidden; background: var(--panel2); width: 240px; height: 180px; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.tile:hover img { transform: scale(1.03); }
.badge-video { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 3px 7px; border-radius: 5px; }
.badges { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.badges span { background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 5px; }
.badges .b-fav { color: var(--accent); }

/* large viewer */
.viewer { position: fixed; inset: 0; z-index: 50; background: #0a0a0b; display: flex; }
.viewer[hidden] { display: none; }
.v-stage { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; }
.v-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.v-media img, .v-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.v-low { filter: blur(6px); }
.v-high { opacity: 0; transition: opacity .2s; }
.v-high.ready { opacity: 1; }
.v-nav, .v-close { position: absolute; z-index: 2; background: rgba(20,20,22,.55); color: #fff; border: 0; cursor: pointer; border-radius: 999px; width: 46px; height: 46px; font-size: 30px; line-height: 1; display: grid; place-items: center; }
.v-nav:hover, .v-close:hover { background: rgba(50,50,55,.8); }
.v-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.v-next { right: 12px; top: 50%; transform: translateY(-50%); }
.v-close { top: 12px; right: 12px; font-size: 20px; }
.viewer:not(.panel-open) .v-panel { display: none; }
.v-side-btn { position: absolute; z-index: 2; top: 12px; right: 68px; height: 46px; padding: 0 16px; display: flex; align-items: center; gap: 8px; background: rgba(20,20,22,.55); color: #fff; border: 0; border-radius: 999px; cursor: pointer; font: 600 14px var(--sans); }
.v-side-btn:hover { background: rgba(50,50,55,.8); }
.v-side-btn.on { background: rgba(50,50,55,.85); }
.v-side-count { opacity: .85; font-weight: 500; }
.v-side-count[hidden] { display: none; }
.v-panel { width: 360px; flex: none; background: var(--panel); border-left: 1px solid var(--line); padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.v-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.v-when { margin: 0; color: var(--muted); font-size: 14px; }
.v-place { margin: 0; }
.v-place:empty, .v-note:empty { display: none; }
.v-note { margin: 0; font: 17px/1.55 var(--serif); white-space: pre-line; }
.v-fav { flex: none; background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 5px 10px; font: 600 13px var(--sans); cursor: pointer; }
.v-fav.on { color: var(--accent); border-color: var(--accent); }
.v-fav:disabled { cursor: default; }
.v-com-title { font-size: 17px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.v-comments { display: flex; flex-direction: column; gap: 12px; }
.comment p { margin: 3px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.comment.owner strong { color: var(--accent); }
.c-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.c-head .link { margin-left: auto; }
.v-form { display: grid; gap: 8px; margin-top: 4px; }
.v-form textarea { resize: vertical; min-height: 64px; }
.v-form-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.v-error { color: var(--danger); font-size: 13px; }
@media (max-width: 860px) {
  .viewer { flex-direction: column; overflow-y: auto; }
  .v-stage { flex: none; height: 72vh; height: 72dvh; }
  .v-panel { width: auto; border-left: 0; border-top: 1px solid var(--line); overflow: visible; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .v-nav { width: 40px; height: 40px; font-size: 26px; }
  .v-side-btn { height: 40px; padding: 0 13px; right: 62px; }
  .viewer:not(.panel-open) .v-stage { height: 100vh; height: 100dvh; }
}

/* slideshow */
.slideshow { position: fixed; inset: 0; z-index: 60; background: #000; cursor: none; }
.slideshow.show-bar { cursor: default; }
.slideshow[hidden] { display: none; }
.s-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.s-layer.on { opacity: 1; }
.s-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.s-slide img, .s-slide video { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
.s-title { flex-direction: column; text-align: center; padding: 20px; background: radial-gradient(ellipse at center, #26221c, #000 70%); }
.s-title h2 { font-size: clamp(36px, 7vw, 84px); }
.s-title p { color: var(--muted); font-size: clamp(16px, 2.2vw, 26px); margin: 12px 0 0; }
.s-caption { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); max-width: min(900px, 90%); margin: 0; background: rgba(0,0,0,.55); padding: 8px 16px; border-radius: 8px; font: 20px/1.4 var(--serif); text-align: center; }
.s-bar { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; background: rgba(20,20,22,.8); border-radius: 999px; padding: 6px 10px; opacity: 0; transition: opacity .3s; }
.slideshow.show-bar .s-bar { opacity: 1; }
.s-bar button { background: none; border: 0; color: #fff; font-size: 20px; width: 42px; height: 38px; cursor: pointer; border-radius: 999px; }
.s-bar button:hover { background: rgba(255,255,255,.12); }
.s-count { color: var(--muted); font-size: 13px; padding: 0 8px; min-width: 70px; text-align: center; }

/* message pages */
.message-page { max-width: 560px; margin: 80px auto; padding: 0 16px; text-align: center; }

/* admin */
.admin { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.admin-nav a { color: var(--muted); padding: 7px 12px; border-radius: 8px; font-weight: 600; }
.admin-nav a.on { color: var(--text); background: var(--panel2); }
.admin-nav a:hover { text-decoration: none; color: var(--text); }
.admin h1 { font-size: 26px; margin-bottom: 14px; }
.admin h2 { font-size: 20px; margin: 26px 0 10px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-head h1 { margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--panel); }
tr:last-child td { border-bottom: 0; }
td form { display: inline; margin: 0; }
td .btn { margin: 2px 0; }
.thumb-sm { width: 72px; height: 48px; object-fit: cover; border-radius: 4px; display: block; background: var(--panel2); }
.code { font: 600 17px ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .12em; }
.notice { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }
.notice.ok { border-color: rgba(111,191,138,.5); }
.notice.warn { border-color: rgba(217,163,91,.6); }
.notice code, .admin code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.form-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; max-width: 640px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span:first-child { color: var(--muted); font-size: 13px; font-weight: 600; }
.checks { display: grid; gap: 6px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; max-height: 260px; overflow-y: auto; }
.checks label, .radio-row label { display: flex; gap: 8px; align-items: center; }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; }
.form-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.share-box { background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; white-space: pre-line; font-size: 14px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.filters select, .filters input { width: auto; }
.comment-body { max-width: 460px; white-space: pre-line; overflow-wrap: anywhere; }
tr.deleted td { opacity: .5; }
.ua { color: var(--muted); font-size: 12px; max-width: 260px; }

.map-link { font-size: 14px; font-weight: 600; }

.check-row { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.check-row input { margin-top: 3px; flex: none; width: auto; }
/* photo details in the large view */
.v-info-btn { align-self: flex-start; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 10px; font: 600 13px var(--sans); cursor: pointer; }
.v-info-btn:hover, .v-info-btn.on { color: var(--text); border-color: var(--accent); }
.v-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.v-info[hidden] { display: none; }
.v-info dt { color: var(--muted); }
.v-info dd { margin: 0; overflow-wrap: anywhere; }

/* zoom and pan in the large view */
.v-media.zoomable { overflow: hidden; touch-action: none; cursor: zoom-in; display: block; }
.v-media.zoomable.zoomed { cursor: grab; }
.v-media.zoomable .z-wrap { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.v-media.zoomable .z-wrap img.z-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: fill; user-select: none; -webkit-user-drag: none; }
.v-media.zoomable .z-wrap img.z-tile { position: absolute; max-width: none; max-height: none; opacity: 0; transition: opacity .25s; user-select: none; -webkit-user-drag: none; }
.v-media.zoomable .z-wrap img.z-tile.ready { opacity: 1; }
.v-mini { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; border: 1px solid rgba(255,255,255,.55); border-radius: 4px; overflow: hidden; background: #000; box-shadow: 0 4px 18px rgba(0,0,0,.6); cursor: pointer; touch-action: none; }
.v-mini[hidden] { display: none; }
.v-mini img { display: block; height: 48px; width: auto; max-width: min(70vw, 720px); opacity: .85; pointer-events: none; }
.v-mini-view { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); pointer-events: none; }
.pano-badge { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 3px 7px; border-radius: 5px; }

/* slideshow: panoramas glide across the screen */
.s-slide.s-pan { justify-content: flex-start; overflow: hidden; }
.s-slide.s-pan img { width: auto; height: 100%; max-width: none; max-height: none; object-fit: fill; flex: none; will-change: transform; }

/* =====================================================================
   Design refresh: icons, hover labels, buttons, spacing
   ===================================================================== */
:root {
  --bg: #111110; --panel: #1a1917; --panel2: #24221f; --panel3: #2d2b27; --line: #2f2d29; --line-strong: #45423c;
  --text: #f0ebe3; --muted: #a8a195; --faint: #7a746a; --accent: #e3a957; --accent-hover: #efbb70; --accent-soft: rgba(227,169,87,.15);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body { -webkit-font-smoothing: antialiased; }
::selection { background: rgba(227,169,87,.3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.ico { flex: none; width: 18px; height: 18px; display: block; }
svg.ico.filled, .filled > svg.ico { fill: currentColor; }

/* hover labels (ui.js) */
.tip { position: fixed; left: 0; top: 0; z-index: 1000; max-width: 280px; pointer-events: none; display: flex; align-items: center; gap: 8px;
  background: #0a0908; color: #f4efe7; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 6px 10px;
  font: 500 13px/1.35 var(--sans); box-shadow: 0 8px 24px rgba(0,0,0,.5); opacity: 0; transition: opacity .1s ease; }
.tip.on { opacity: 1; }
.tip kbd { flex: none; font: 600 11px/1 var(--sans); color: #ddd5c9; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-bottom-width: 2px; border-radius: 4px; padding: 3px 5px; }
@media (hover: none) { .tip { display: none; } }

/* buttons */
.btn { height: 40px; padding: 0 16px; gap: 8px; border-radius: 10px; font: 600 14px/1 var(--sans); justify-content: center;
  transition: background .15s, border-color .15s, color .15s, transform .1s; }
.btn:hover:not(:disabled) { background: var(--panel3); border-color: var(--line-strong); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 4px 14px rgba(227,169,87,.2); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger:hover:not(:disabled) { background: rgba(224,104,95,.12); border-color: rgba(224,104,95,.5); }
.btn.small { height: 32px; padding: 0 11px; font-size: 13px; gap: 6px; border-radius: 8px; }
.btn.small svg.ico { width: 15px; height: 15px; }
.btn.glass { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px); }
.btn.glass:hover:not(:disabled) { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.3); }
.btn.glass svg.ico { color: var(--accent); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; padding: 10px max(16px, env(safe-area-inset-left)); background: rgba(17,17,16,.86); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #1a1307;
  background: linear-gradient(140deg, #f0c07a, #d9934a); box-shadow: 0 2px 12px rgba(227,169,87,.3); }
.brand-mark svg.ico { width: 17px; height: 17px; }
.topnav { gap: 6px; }
.nav-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 9px; border: 0; background: none;
  color: var(--muted); font: 600 14px/1 var(--sans); cursor: pointer; transition: background .15s, color .15s; }
.nav-btn:hover { background: var(--panel2); color: var(--text); text-decoration: none; }
.nav-btn.icon-only { width: 36px; padding: 0; justify-content: center; }
.who { display: inline-flex; align-items: center; gap: 8px; padding: 0 6px; color: var(--text); font-size: 14px; font-weight: 500; }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--panel3); color: var(--accent);
  font: 700 13px/1 var(--sans); border: 1px solid var(--line-strong); }

/* sign-in */
.gate-mark { width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 18px; display: grid; place-items: center; color: #1a1307;
  background: linear-gradient(140deg, #f0c07a, #d9934a); box-shadow: 0 10px 34px rgba(227,169,87,.28); }
.gate-mark svg.ico { width: 28px; height: 28px; }
.gate h1 { margin-bottom: 22px; }
.gate-form { border-radius: 18px; padding: 26px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.gate-form .btn { height: 48px; }

/* home */
.home { padding-top: 32px; }
.album-cards { gap: 26px; }
.album-card { border-radius: 16px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.album-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.album-cover { overflow: hidden; }
.album-cover img { transition: transform .5s ease; }
.album-card:hover .album-cover img { transform: scale(1.04); }
.album-meta { padding: 16px 18px 18px; }

/* album page */
.hero-buttons .btn { height: 44px; padding: 0 18px; }
.stop-nav a { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; transition: background .15s, border-color .15s; }
.stop-nav a:hover { background: var(--panel2); border-color: var(--line-strong); text-decoration: none; }
.stop { margin-top: 56px; }
.stop-head { align-items: center; }
.fav-title { display: inline-flex; align-items: center; gap: 10px; }
.fav-title svg.ico { width: 24px; height: 24px; fill: currentColor; }
.map-link { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); font-size: 13px; transition: background .15s, border-color .15s; }
.map-link:hover { background: var(--panel2); border-color: var(--line-strong); text-decoration: none; }
.map-link svg.ico { width: 15px; height: 15px; }
.tile { border-radius: 6px; }
.badge-video, .pano-badge, .badges span { display: inline-flex; align-items: center; gap: 4px; font: 600 12px/1 var(--sans); padding: 5px 7px;
  border-radius: 7px; background: rgba(10,10,9,.7); backdrop-filter: blur(6px); }
.badge-video svg.ico, .pano-badge svg.ico, .badges svg.ico { width: 13px; height: 13px; }
.badge-video svg.ico, .badges .b-fav svg.ico { fill: currentColor; }
.badges .b-fav { padding: 5px; }

/* large view */
.viewer { background: #070707; }
.v-nav, .v-close { width: 46px; height: 46px; background: rgba(18,18,17,.6); backdrop-filter: blur(8px); transition: background .15s; }
.v-nav svg.ico { width: 26px; height: 26px; }
.v-close svg.ico { width: 20px; height: 20px; }
.v-nav:hover, .v-close:hover { background: rgba(60,58,54,.85); }
.v-side-btn { height: 46px; padding: 0 16px 0 14px; background: rgba(18,18,17,.6); backdrop-filter: blur(8px); transition: background .15s; }
.v-side-btn:hover { background: rgba(60,58,54,.85); }
.v-side-btn.on { background: rgba(227,169,87,.2); color: var(--accent-hover); }
.v-side-count { display: inline-flex; align-items: center; gap: 4px; }
.v-side-count svg.ico { width: 15px; height: 15px; }
.v-panel { padding: 20px; gap: 12px; }
.v-when { font-size: 13.5px; }
.v-place { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.v-place-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.v-place-name svg.ico { width: 16px; height: 16px; color: var(--accent); }
.v-map, .v-info a.ext { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; }
.v-map svg.ico, .v-info a.ext svg.ico { width: 15px; height: 15px; }
.v-fav { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; transition: background .15s, border-color .15s, color .15s; }
.v-fav svg.ico { width: 15px; height: 15px; }
.v-fav:hover:not(:disabled) { border-color: var(--line-strong); background: var(--panel3); }
.v-fav.on { background: var(--accent-soft); }
.v-info-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; transition: border-color .15s, color .15s; }
.v-info-btn svg.ico { width: 15px; height: 15px; }
.v-com-title { font-size: 18px; }
.comment { padding-bottom: 2px; }
.c-del { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; border: 0; background: none;
  color: var(--faint); cursor: pointer; transition: background .15s, color .15s; }
.c-del svg.ico { width: 15px; height: 15px; }
.c-del:hover { background: rgba(224,104,95,.14); color: var(--danger); }
.v-form textarea { border-radius: 10px; }

/* slideshow */
.s-bar { gap: 4px; padding: 6px 8px; background: rgba(18,18,17,.82); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.08); }
.s-bar button { display: grid; place-items: center; width: 42px; height: 40px; }
.s-bar button svg.ico { width: 20px; height: 20px; }
.s-pause svg.ico { fill: currentColor; }
.s-count { font-variant-numeric: tabular-nums; }

/* admin */
.admin-nav { gap: 4px; }
.admin-nav a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; transition: background .15s, color .15s; }
.admin-nav a svg.ico { width: 17px; height: 17px; }
.admin-nav a.on svg.ico { color: var(--accent); }
.admin h2[data-icon] { display: flex; align-items: center; gap: 10px; }
.admin h2[data-icon] svg.ico { width: 20px; height: 20px; color: var(--accent); }
.table-wrap { border-radius: 14px; background: var(--panel); }
th { background: var(--panel2); }
tr:hover td { background: rgba(255,255,255,.015); }
.thumb-sm { border-radius: 6px; }
.form-card { border-radius: 16px; padding: 22px; }
.notice { border-radius: 12px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], textarea, select { border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.badge { border-radius: 6px; }
.brand { white-space: nowrap; }
@media (max-width: 520px) {
  .who { display: none; }
  .nav-btn { padding: 0 9px; }
  .brand { font-size: 17px; }
}
.link-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.link-box { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 13px/1.4 ui-monospace, "SF Mono", Consolas, monospace; white-space: normal; }
.nowrap { white-space: nowrap; }
.small-code { font-size: 14px; margin-left: 8px; color: var(--muted); vertical-align: middle; }

/* stop banners: a strip across the whole width, a third the height of a 16:9 card */
.album-page main { overflow-x: clip; }
.title-card { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); height: clamp(120px, 18.75vw, 360px); max-height: none;
  object-fit: cover; object-position: center; border-radius: 0; margin-bottom: 22px; background: var(--panel); }

/* large view: the ‹ › arrows stay out of sight until the mouse moves over the photo */
.v-nav { opacity: 0; pointer-events: none; transition: opacity .35s ease, background .15s; background: rgba(18,18,17,.35); }
.viewer.nav-on .v-nav { opacity: .7; pointer-events: auto; transition: opacity .15s ease, background .15s; }
.viewer.nav-on .v-nav:hover { opacity: 1; background: rgba(60,58,54,.8); }
@media (hover: none) { .viewer .v-nav { display: none; } }   /* phones and tablets: swipe instead */
/* …and the details and close buttons the same way */
.v-close, .v-side-btn { opacity: 0; pointer-events: none; transition: opacity .35s ease, background .15s; }
.viewer.nav-on .v-close, .viewer.nav-on .v-side-btn { opacity: .85; pointer-events: auto; transition: opacity .15s ease, background .15s; }
.viewer.nav-on .v-close:hover, .viewer.nav-on .v-side-btn:hover { opacity: 1; }
.v-side-btn { min-width: 46px; padding: 0 14px; justify-content: center; gap: 7px; }
.v-side-count:empty { display: none; }
@media (hover: none) { .viewer .v-close, .viewer .v-side-btn { opacity: 1; pointer-events: auto; } }   /* touch: always there */
/* sign-in card: keep the big code box and the button inside the card */
.gate-form { grid-template-columns: minmax(0, 1fr); }
.gate-form > * { min-width: 0; }
.code-input { width: 100%; }

/* slideshow on touch screens: swipes go to the app, controls appear on a tap */
.slideshow { touch-action: none; }
.slideshow:not(.show-bar) .s-bar { pointer-events: none; }

/* ---------- TV mode (TV remote: arrow keys + OK) ---------- */
.tv-btn.on { color: var(--accent); background: var(--accent-soft); }
html.tv body { font-size: 17px; }
html.tv :focus { outline: 4px solid var(--accent) !important; outline-offset: 4px; }
html.tv .btn:focus, html.tv .nav-btn:focus, html.tv .stop-nav a:focus, html.tv .map-link:focus { box-shadow: 0 0 0 8px rgba(227,169,87,.25); }
html.tv .tile { transition: transform .15s ease, box-shadow .15s ease; }
html.tv .tile:focus { outline: 5px solid var(--accent) !important; outline-offset: 3px; transform: scale(1.04); z-index: 2;
  box-shadow: 0 12px 40px rgba(0,0,0,.6); }
html.tv .album-card:focus { transform: translateY(-3px) scale(1.02); }
html.tv .hero-buttons .btn { height: 52px; padding: 0 24px; font-size: 17px; }
html.tv .stop-head h2 { font-size: 32px; }
/* in the large view and slideshow the remote does everything: no pointer controls */
html.tv .viewer .v-nav, html.tv .viewer .v-close, html.tv .viewer .v-side-btn { display: none; }
html.tv .slideshow { cursor: none; }
.tv-hint { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); z-index: 5; pointer-events: none; opacity: 0;
  background: rgba(10,10,9,.82); color: #f4efe7; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 10px 18px;
  font: 600 16px/1.2 var(--sans); white-space: nowrap; transition: opacity .4s ease; }
.tv-hint.on { opacity: 1; }

/* a stop's country map */
button.map-link { color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.stop-head .map-link + .map-link { margin-left: -8px; }
.map-dialog { width: min(820px, 94vw); max-height: 94vh; padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); color: var(--text); box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.map-dialog::backdrop { background: rgba(0,0,0,.72); }
.map-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.map-dialog-head h2 { margin: 0; font-size: 20px; }
.map-dialog img { display: block; width: auto; max-width: 100%; max-height: calc(94vh - 170px); margin: 0 auto; border-radius: 10px; background: #0f1216; }
.map-dialog p { margin: 12px 0 0; }
.map-dialog .map-link { margin-top: 12px; }
html.tv .map-dialog .nav-btn:focus { box-shadow: 0 0 0 4px var(--accent); }

/* slideshow music */
.s-song { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); max-width: 80vw; padding: 6px 14px; border-radius: 999px;
  background: rgba(18,18,17,.7); color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity .6s; pointer-events: none; }
.s-song.show, .slideshow.show-bar .s-song:not(:empty) { opacity: 1; }
html.tv .s-song { font-size: 18px; bottom: 110px; }
