*{box-sizing:border-box}
[hidden]{display:none!important}
:root{color-scheme:dark;--gold:#e4aa80;--ink:#321119}
body{margin:0;background:radial-gradient(ellipse at 47% 36%,#513057 0%,#322039 48%,#1a121f 100%);color:#fff1da}
body::before,.card::after{content:"";position:fixed;inset:0;pointer-events:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.35' d='M0 0h160v160H0z'/%3E%3C/svg%3E");opacity:.13}
main{min-height:100vh;min-height:100svh;display:grid;place-items:center;padding:24px 16px}
#round{width:min(386px,calc(100vw - 40px),max(285px,54svh));text-align:center}
.card{position:relative;isolation:isolate;display:flex;align-items:center;flex-direction:column;width:100%;aspect-ratio: .71;padding:9% 9% 7%;border:1px solid #d07669;border-radius:17px;background:radial-gradient(ellipse at 30% 12%,#cf4d43 0,#b43936 42%,#942831 75%,#7d202c 100%);box-shadow:inset 0 0 0 2px #f5a38a45,inset 0 0 10px #521a285e,0 18px 38px -14px #100710dd,0 3px 5px #150b1b88}
.card::after{position:absolute;border-radius:inherit;opacity:.24}
.frame,.frame::before{position:absolute;pointer-events:none;border:1px solid #ebb095bd;box-shadow:inset 0 1px 1px #681c2a,0 1px 1px #681c2a}
.frame{inset:10px;border-radius:9px}
.frame::before{content:"";inset:4px;border-radius:6px;border-color:#efa17380}
.frame i{position:absolute;top:8px;left:8px;width:24px;height:24px;border-top:2px solid var(--gold);border-left:2px solid var(--gold);border-radius:4px 0 0}
.frame i::after{content:"";position:absolute;top:4px;left:4px;width:6px;height:6px;background:#f3bd92;transform:rotate(45deg);box-shadow:1px 1px 0 #762333}
.frame i:nth-child(2){left:auto;right:8px;transform:rotate(90deg)}
.frame i:nth-child(3){inset:auto 8px 8px auto;transform:rotate(180deg)}
.frame i:nth-child(4){inset:auto auto 8px 8px;transform:rotate(270deg)}
.logo{width:39%;aspect-ratio:1;flex:none;background:var(--ink);mask:url(crawlers.jpeg) center/100% 100% no-repeat luminance}
.prompt{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;padding:10px 0}
.divider{display:flex;align-items:center;gap:7px;color:var(--gold);font:10px Georgia,serif;margin-bottom:15px}
.divider::before,.divider::after{content:"";width:28px;height:1px;background:var(--gold)}
h1{font:normal clamp(24px,6.7vw,33px)/1.14 Baskerville,"Iowan Old Style",Georgia,serif;letter-spacing:-.035em;text-wrap:balance;margin:0;text-shadow:0 1px 1px #67202b}
.long h1{font-size:clamp(21px,5.9vw,29px)}
.ornament{color:var(--gold);font:32px/1 Georgia,serif}
.timer{display:flex;gap:9px;align-items:center;justify-content:center;margin-top:22px;font:500 18px/1.2 system-ui,sans-serif;letter-spacing:2px;font-variant-numeric:tabular-nums;color:#eee1e7}
.clock{width:15px;height:15px;border:1.4px solid currentColor;border-radius:50%;position:relative;color:#bea9bc}
.clock::before{content:"";position:absolute;left:6px;top:2px;width:3px;height:5px;border:solid currentColor;border-width:0 0 1.4px 1.4px}
button{cursor:pointer;background:linear-gradient(#ba413e,#8d2931);border:1px solid #df9a80;border-radius:8px;color:#fff0d8;font:24px Georgia,serif;padding:16px 38px;box-shadow:inset 0 0 0 3px #9c3838, inset 0 0 0 4px #d68f73,0 5px 14px #150b1b80}
button:focus-visible{outline:3px solid #fff0d8;outline-offset:5px}

.camera-action,.close-preview,#share-photo,#download-photo{font:600 16px/1.2 system-ui,sans-serif;letter-spacing:.01em}
.photo-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:0 8px}
.photo-actions .camera-action{padding-inline:12px;white-space:nowrap}
.camera-action{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:11px 17px;min-height:44px;margin-top:13px;border:1px solid #ad89a4;border-radius:24px;background:#332338;color:#f4e6ee;box-shadow:0 2px 6px #150b1b55}
.camera-icon{position:relative;width:17px;height:12px;border:1.5px solid currentColor;border-radius:3px}
.camera-icon::before{content:"";position:absolute;width:6px;height:3px;border:1.5px solid currentColor;border-bottom:0;border-radius:2px 2px 0 0;top:-4px;left:3px}
.camera-icon::after{content:"";position:absolute;width:5px;height:5px;border:1px solid currentColor;border-radius:50%;top:2px;left:4px}
#photo-preview{background:#2d1d32;color:#fff0e6;border:1px solid #866579;border-radius:18px;width:fit-content;max-width:calc(100vw - 24px);max-height:94vh;max-height:94dvh;padding:10px 12px 16px;text-align:center;box-shadow:0 12px 56px #130a1bcc}
#photo-preview[open]{display:flex;flex-direction:column;align-items:center;gap:10px}
#photo-preview::backdrop{background:#160f1cdd}
.close-preview{-webkit-tap-highlight-color:transparent;align-self:flex-end;min-width:44px;min-height:44px;padding:0;background:none;border:0;box-shadow:none;color:#f6e4ef;font-size:29px}
.close-preview:focus{outline:none}
.close-preview:focus-visible{color:#fff;font-weight:800}
#finished-photo{display:block;max-width:100%;max-height:calc(89vh - 136px);max-height:calc(89dvh - 136px);width:auto;height:auto;object-fit:contain;border-radius:6px}
#photo-status{font:16px/1.4 system-ui,sans-serif;margin:0 16px;max-width:28ch}
#photo-status:empty{display:none}
#share-photo,#download-photo{min-height:44px;margin-top:2px;padding:12px 22px}
#download-photo{display:inline-block;color:#ffead7}
