* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; background: #14110e; color: #eee; font-family: "Segoe UI", system-ui, sans-serif; overscroll-behavior: none; touch-action: none; }
.hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid #ffb347; outline-offset: -3px; }
[hidden] { display: none !important; }
#world { position: fixed; left: 0; top: 0; transform-origin: 0 0; max-width: none; user-select: none; opacity: 0; transition: opacity .9s; }
.ready #world, .ready #screen { opacity: 1; }
/* On the round camera button. Sized in picture pixels, and moved with the picture. */
#insta { position: fixed; left: 0; top: 0; width: 84px; height: 84px; transform-origin: 0 0; display: grid; place-items: center; border-radius: 50%; color: #e9edf2; visibility: hidden; }
.shot:not(.inside) #insta { visibility: visible; }
/* On the wide camera button next to it. */
#name { position: fixed; left: 0; top: 0; width: 74px; height: 28px; transform-origin: 0 0; display: grid; place-content: center; text-align: center; font: 700 11.5px/12px "Segoe UI", system-ui, sans-serif; letter-spacing: .08em; text-indent: .08em; color: #e9edf2; visibility: hidden; pointer-events: none; user-select: none; }
.shot:not(.inside) #name { visibility: visible; }
#insta svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 2; }
#insta .dot { fill: currentColor; stroke: none; }
#insta:hover, #insta:focus-visible { color: #ffb347; }
#insta:focus-visible { outline: 4px solid #ffb347; outline-offset: -14px; }
#screen { position: fixed; left: 0; top: 0; overflow: hidden; background: #050505; opacity: 0; transition: opacity .9s; container-type: size; }
#menu, #play { position: absolute; inset: 0; }
#menu { display: flex; flex-direction: column; background: radial-gradient(120% 120% at 50% 40%, #1b1d20, #0a0b0c); animation: boot .5s both; }
@keyframes boot { from { opacity: 0; } }
#menu header, #menu footer { display: flex; justify-content: space-between; align-items: center; flex: none; padding: 0 4cqw; height: 15cqh; font-size: max(9px, 3.6cqw); letter-spacing: .08em; color: #b9bcc0; }
#menu header { justify-content: flex-start; gap: 5cqw; }
#menu header .battery { margin-left: auto; }
#menu header button { height: 100%; padding: 0; letter-spacing: inherit; white-space: nowrap; border-bottom: 2px solid transparent; border-top: 2px solid transparent; color: #b9bcc0; }
#menu header button:hover { color: #fff; }
#menu header button[aria-pressed="true"] { color: #fff; font-weight: 700; border-bottom-color: #f0a030; }
#contact { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
#contact a { flex: 0 1 26cqh; display: flex; align-items: center; gap: 4cqw; padding: 0 5cqw; font-size: max(13px, 5.2cqw); color: inherit; text-decoration: none; border-top: 1px solid #26292d; user-select: text; }
#contact a:last-child { border-bottom: 1px solid #26292d; }
#contact a:hover, #contact a:focus-visible { background: #f0a030; color: #17120a; outline: none; }
#contact svg { width: 1.3em; height: 1.3em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#menu footer { justify-content: center; height: 12cqh; letter-spacing: 0; font-size: max(9px, 3.2cqw); color: #8f949a; }
.battery { width: 6.5cqw; height: 3.2cqw; border: 1px solid #b9bcc0; padding: 1px; border-radius: 2px; }
.battery i { display: block; height: 100%; width: 78%; background: #8fd18a; }
#rows { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#rows button { flex: 1; min-height: 0; display: flex; align-items: center; gap: 4cqw; padding: 0 5cqw; text-align: left; font-size: max(14px, 5.6cqw); border-top: 1px solid #26292d; }
#rows button:last-child { border-bottom: 1px solid #26292d; }
#rows button span { margin-left: auto; font-size: .68em; color: #9aa0a6; }
#rows button.on { background: #f0a030; color: #17120a; font-weight: 600; }
#rows button.on span { color: #3a2a0c; }
#rows svg { width: 1.3em; height: 1.3em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#play { background: #050505; }
/* Sized by the camera screen, so the grid grows with it as the view moves in. */
#grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4cqw; padding: max(10cqh, 6cqw) 3cqw 5cqw; grid-auto-rows: max-content; align-content: safe center; overflow-y: auto; overflow-anchor: none; touch-action: pan-y; scrollbar-width: thin; }
#grid button { position: relative; aspect-ratio: 3 / 2; overflow: hidden; padding: 0; animation: thumb .45s both; }
@keyframes thumb { from { opacity: 0; transform: scale(.9); } }
#grid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s, filter .3s; }
#grid button:hover img, #grid button:focus-visible img { transform: scale(1.04); filter: brightness(1.12); }
#grid button:focus-visible { outline: 3px solid #ffb347; outline-offset: -3px; }
#view { position: absolute; inset: 0; background: #050505; opacity: 0; pointer-events: none; transition: opacity .4s; }
.viewing #view { opacity: 1; pointer-events: auto; }
#photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#flyer { position: absolute; object-fit: cover; }
#none { position: absolute; inset: 0; display: grid; place-items: center; font-size: max(13px, min(4.5cqw, 24px)); color: #a9adb2; }
#play header { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: max(8px, env(safe-area-inset-top)) 16px 26px 8px; font-size: 15px; background: linear-gradient(rgba(0,0,0,.65), transparent); opacity: 0; transition: opacity .3s; }
.inside #play header { opacity: 1; }
#back { min-height: 44px; padding: 0 14px; }
.arrow { position: absolute; top: 50%; width: 56px; height: 88px; margin-top: -44px; font-size: 44px; line-height: 1; opacity: 0; text-shadow: 0 0 8px #000; transition: opacity .3s; }
.arrow { pointer-events: none; }
.viewing .arrow { opacity: .85; pointer-events: auto; }
#prev { left: 4px; } #next { right: 4px; }
#glass { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,235,205,.09) 0 22%, transparent 42%); box-shadow: inset 0 0 14px #000; transition: opacity .6s; }
.inside #glass { opacity: 0; }
#shutter { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
#corner { position: fixed; right: 14px; max-width: calc(100vw - 28px); flex-wrap: wrap; justify-content: flex-end; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: center; font-size: 12px; }
#corner p, #corner button { padding: 5px 10px; background: rgba(10,9,8,.62); color: #f1e6d2; }
#corner button { min-height: 44px; }
.calm * { transition-duration: .01s !important; animation-duration: .01s !important; animation-delay: 0s !important; }
#music[hidden] { display: none; }
@media (max-aspect-ratio: 3/4) { #grid { grid-template-columns: repeat(2, 1fr); } }
#finder { position: absolute; inset: 0; overflow: hidden; background: #050505; transition: opacity .6s; }
#finder.gone { opacity: 0; pointer-events: none; }
#view0 { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; user-select: none; }
#hud { position: absolute; inset: 0; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); box-shadow: inset 0 0 12vmin rgba(0,0,0,.75); transition: opacity .12s; }
.shot #hud { opacity: 0; pointer-events: none; }
#marks { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255,255,255,.28); stroke-width: 1; }
#marks path { vector-effect: non-scaling-stroke; }
#focus { position: absolute; left: 50%; top: 50%; width: 92px; height: 68px; margin: -34px 0 0 -46px; border: 2px solid #7dff8a; }
#hud p { position: absolute; left: 0; right: 0; display: flex; gap: 22px; align-items: center; padding: max(22px, env(safe-area-inset-top)) 28px; font-size: 15px; letter-spacing: .06em; }
#hud .top { top: 0; justify-content: flex-end; }
#hud .top .battery { width: 30px; height: 15px; border-color: #fff; }
#hud .bottom { bottom: max(64px, env(safe-area-inset-bottom)); flex-direction: column; gap: 10px; font-size: 17px; }
#ask { font-weight: 500; animation: ask 2.4s infinite; }
@keyframes ask { 50% { opacity: .5; } }
#shoot { position: absolute; inset: 0; width: 100%; cursor: crosshair; }
#shoot:focus-visible { outline: none; }
#shoot:focus-visible::after { content: ""; position: absolute; inset: 10px; border: 2px solid #ffb347; }
.finding #glass { opacity: 0; }
#skip { position: fixed; left: 14px; bottom: max(12px, env(safe-area-inset-bottom)); min-height: 44px; padding: 5px 14px; font-size: 13px; color: #f1e6d2; background: rgba(10,9,8,.62); }
.arrived #skip { display: none; }
@media (max-width: 560px) { #skip { bottom: auto; top: max(10px, env(safe-area-inset-top)); } }
