:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; background: #090c11; color: #f5f2eb; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid #cfb98f; outline-offset: 3px; }
.frame-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #b89d6a; transform: rotate(-7deg); }
.frame-mark span { width: 24px; height: 24px; border: 1px solid #b89d6a; }
.frame-mark.small { width: 28px; height: 28px; flex: none; }
.frame-mark.small span { width: 16px; height: 16px; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at 50% 40%, #1b2430, #090c11 65%); }
.login-card { width: min(100%, 370px); }
.eyebrow { margin: 30px 0 5px; color: #cfb98f; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 7vw, 52px); font-weight: 400; letter-spacing: -.04em; }
.login-copy { margin: 10px 0 36px; color: #aeb4be; line-height: 1.5; }
label { display: block; margin: 0 0 9px; font-size: 13px; color: #c4c7cb; }
input { width: 100%; border: 1px solid #4c525b; border-radius: 4px; background: #111820; color: #fff; padding: 13px 14px; }
.login button { width: 100%; margin-top: 16px; padding: 13px; border: 0; border-radius: 4px; background: #cfb98f; color: #151719; font-weight: 600; }
.error { color: #f3a6a2; font-size: 14px; }
.viewer { height: 100dvh; display: flex; flex-direction: column; }
.stage { flex: 1; min-height: 0; display: grid; place-items: center; background: #000; }
.stage img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
.stage img[hidden], .stage p[hidden] { display: none; }
.stage p { color: #9da4ad; padding: 24px; text-align: center; }
.controls { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 14px max(20px, env(safe-area-inset-right)) 14px max(20px, env(safe-area-inset-left)); background: #10151b; border-top: 1px solid #2c3540; }
.album-info { display: flex; align-items: center; gap: 18px; min-width: 0; }
.album-info div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.album-info strong { font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-info #status { color: #9ba6b2; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navigation { display: flex; align-items: center; gap: 18px; font-variant-numeric: tabular-nums; }
.navigation button { width: 36px; height: 36px; border: 1px solid #56616c; border-radius: 50%; background: transparent; color: #f5f2eb; font-size: 25px; line-height: 1; }
.navigation span { min-width: 56px; text-align: center; font-size: 13px; color: #c4c9d0; }
.play-button { justify-self: end; padding: 8px 17px; border: 1px solid #56616c; border-radius: 4px; background: transparent; color: #f5f2eb; }
@media (max-width: 650px) { .controls { grid-template-columns: 1fr auto; gap: 10px; } .album-info { grid-column: 1 / -1; } .play-button { grid-column: 2; grid-row: 2; } .navigation { grid-column: 1; grid-row: 2; } }

/* The photo fills the frame; controls float over it and disappear during playback. */
.viewer { position: relative; }
.stage { position: absolute; inset: 0; overflow: hidden; }
.slide-layer { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; will-change: opacity, transform; }
.slide-layer img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; transform-origin: center; }
.stage #empty { position: relative; z-index: 1; }
.memory { position: absolute; top: max(24px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 4; width: max-content; max-width: min(85vw, 600px); padding: 14px 26px; border: 1px solid #b89d6a77; border-radius: 10px; background: #1d1a17c9; text-align: center; pointer-events: none; }
.memory[hidden] { display: none; }
.memory span { display: block; color: #d9bf91; font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.memory strong { display: block; margin-top: 4px; font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.memory[data-position="center"] { top: 50%; transform: translate(-50%, -50%); }
.memory[data-position="bottom"] { top: auto; bottom: max(105px, env(safe-area-inset-bottom)); }
.memory[data-align="left"] { left: max(24px, env(safe-area-inset-left)); right: auto; transform: none; text-align: left; }
.memory[data-align="right"] { left: auto; right: max(24px, env(safe-area-inset-right)); transform: none; text-align: right; }
.memory[data-position="center"][data-align="left"], .memory[data-position="center"][data-align="right"] { transform: translateY(-50%); }
.controls { position: absolute; z-index: 10; left: 0; right: 0; bottom: 0; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: linear-gradient(#10151bdf, #10151bf5); transition: opacity .35s ease, transform .35s ease; }
.controls.is-hidden { opacity: 0; transform: translateY(100%); pointer-events: none; }
.actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.actions button { min-height: 36px; padding: 7px 12px; border: 1px solid #56616c; border-radius: 5px; background: transparent; color: #f5f2eb; }
.actions #favorite { font-size: 25px; line-height: 1; padding: 2px 10px; }
.actions button:disabled, .navigation button:disabled { opacity: .4; cursor: default; }
.settings-panel { position: absolute; z-index: 20; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 20px; background: #05080cbb; }
.settings-panel[hidden] { display: none; }
.details-panel { position: absolute; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: #05080cbb; }
.details-panel[hidden] { display: none; }
.details-card { width: min(100%, 470px); padding: 25px; border: 1px solid #404b57; border-radius: 10px; background: #131a22; box-shadow: 0 18px 70px #000a; }
.details-card dl { margin: 0; display: grid; gap: 18px; }
.details-card dt { color: #9ba6b2; font-size: 12px; margin-bottom: 4px; }
.details-card dd { margin: 0; font-size: 17px; }
.settings-card { width: min(100%, 630px); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 25px; border: 1px solid #404b57; border-radius: 10px; background: #131a22; box-shadow: 0 18px 70px #000a; }
.settings-heading { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 22px; }
.settings-heading .eyebrow { margin: 0 0 4px; }
.settings-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 31px; font-weight: 400; }
.settings-heading button { border: 0; background: transparent; color: #f5f2eb; font-size: 30px; line-height: 1; }
.setting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 26px; }
.setting-grid label { margin: 0; font-size: 14px; }
.setting-grid label span { float: right; color: #cfb98f; }
.setting-grid input[type=range] { display: block; width: 100%; margin: 13px 0 0; padding: 0; accent-color: #cfb98f; }
.setting-grid select { display: block; width: 100%; margin-top: 9px; padding: 9px 10px; border: 1px solid #58616b; border-radius: 4px; background: #0c1218; color: #f5f2eb; font: inherit; }
.setting-grid .check { display: flex; align-items: center; gap: 10px; }
.setting-grid .check input { width: 18px; height: 18px; margin: 0; accent-color: #cfb98f; }
.setting-action { display: flex; align-items: center; }
.setting-action button { min-height: 40px; padding: 8px 12px; border: 1px solid #58616b; border-radius: 4px; background: #0c1218; color: #f5f2eb; }
.setting-action button:disabled { opacity: .55; cursor: default; }
.settings-note { margin: 24px 0 0; color: #9ba6b2; font-size: 12px; line-height: 1.5; }
@keyframes kenBurnsA { from { transform: scale(1.025) translate(-.5%, .4%); } to { transform: scale(1.12) translate(1%, -.8%); } }
@keyframes kenBurnsB { from { transform: scale(1.025) translate(.5%, -.4%); } to { transform: scale(1.12) translate(-1%, .8%); } }
@media (max-width: 760px) {
  .controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
  .album-info { flex: 1 1 100%; }
  .actions { gap: 6px; }
  .actions button { padding: 7px 9px; }
  .setting-grid { grid-template-columns: 1fr; gap: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .controls { transition: none; }
  .slide-layer img { animation: none !important; }
}
