*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{font-family:-apple-system,BlinkMacSystemFont,'Apple SD Gothic Neo','Malgun Gothic',sans-serif;color:#392c29;background:#b2b7bf}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;border:0}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #e67f63;outline-offset:5px}button{transition:background .25s,transform .2s}button:active{transform:scale(.95)}button svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}#app{position:relative;height:100%;height:100dvh;isolation:isolate}#scene{display:block;width:100%;height:100%;position:absolute;inset:0;touch-action:none}header{position:absolute;top:max(26px,env(safe-area-inset-top));left:38px;right:38px;display:flex;align-items:center;justify-content:space-between;z-index:3}.brand{text-decoration:none;font-family:Georgia,serif;font-size:13px;letter-spacing:4px;color:inherit}.brand span{color:#d77c65;display:inline-block;margin-left:14px;font-size:17px}.top-actions{display:flex;gap:10px}.round{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:#fff8e9b8;border:1px solid #ffffffae;backdrop-filter:blur(16px);font-size:21px}.intro{position:absolute;top:13%;width:100%;text-align:center;pointer-events:none}.eyebrow{font-size:10px;letter-spacing:3px;margin:0 0 20px;opacity:.65}h1{font-family:'Batang','AppleMyungjo',Georgia,serif;font-weight:400;letter-spacing:5px;font-size:clamp(42px,5.8vw,76px);margin:0 0 18px}.sub{font-family:'Batang','AppleMyungjo',serif;font-size:17px;letter-spacing:1px;margin:0}.times{display:inline-flex;margin-top:30px;padding:5px;background:#fff4e4a8;backdrop-filter:blur(16px);border:1px solid #ffffff90;border-radius:30px;pointer-events:auto;gap:4px}.times button{background:transparent;border-radius:24px;padding:10px 22px;font-size:17px}.times button span{font-size:14px;margin-left:6px}.times button[aria-pressed=true]{background:#e98468;color:white}.place{position:absolute;left:38px;top:50%;writing-mode:vertical-rl;font-size:10px;letter-spacing:2px;display:flex;gap:16px;align-items:center;opacity:.8;pointer-events:none}.place-line{height:40px;width:1px;background:currentColor}.bottom{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(530px,calc(100% - 32px));text-align:center}.hint{display:table;margin:0 auto 18px;padding:10px 19px;border-radius:30px;background:#fff5e6bd;backdrop-filter:blur(12px);font-size:12px;letter-spacing:.2px;box-shadow:0 4px 30px #48351b08}.control-row{display:flex;gap:14px;align-items:center}.actions{display:flex;flex:1;background:#fff6e5d4;border:1px solid #ffffffc9;backdrop-filter:blur(22px);border-radius:28px;padding:13px 5px;box-shadow:0 8px 40px #46322813}.actions button{background:transparent;flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;min-width:0;font-size:12px;padding:7px 2px;position:relative}.actions button+button:before{content:'';position:absolute;left:0;top:12px;bottom:12px;width:1px;background:#77645426}.actions button[aria-pressed=true]{color:#c66750}.actions button:hover{color:#c66750}.camera{width:65px;height:65px;flex-shrink:0}footer{font-size:10px;color:#fff9f0;text-shadow:0 1px 5px #342018aa;margin-top:20px;letter-spacing:1px}footer span{padding:0 6px}footer button{font-size:10px;background:none;padding:0;color:inherit;text-decoration:underline;text-underline-offset:3px;letter-spacing:0}.rest{position:absolute;top:35%;width:100%;text-align:center;pointer-events:none;color:#fffdf3;text-shadow:0 1px 12px #352b2480}.rest p{font-size:15px;letter-spacing:1px}.rest small{font-variant-numeric:tabular-nums;letter-spacing:3px}.breath{display:block;width:35px;height:35px;margin:auto;border:1px solid #fff9;border-radius:50%;box-shadow:0 0 30px #fff4;animation:breathe 8s ease-in-out infinite}@keyframes breathe{50%{transform:scale(1.6);opacity:.5}}dialog{border:1px solid #fff9;border-radius:28px;background:#fffaf1ed;backdrop-filter:blur(25px);color:#463831;max-width:410px;width:calc(100% - 40px);padding:37px 29px;box-shadow:0 20px 100px #28201f35}dialog::backdrop{background:#28201c40;backdrop-filter:blur(5px)}dialog h2{font-family:'Batang',serif;font-size:24px;font-weight:400;line-height:1.4;margin:12px 0 20px}dialog p{font-size:13px;line-height:1.9}dialog .eyebrow{font-size:8px;letter-spacing:2px}dialog .close{position:absolute;top:10px;right:14px;font-size:26px;background:transparent}.muted{opacity:.6;font-size:11px!important}ul{list-style:none;padding:0;margin:24px 0}li{display:flex;justify-content:space-between;gap:10px;font-size:12px;margin:16px 0}li b{font-weight:500}li span{opacity:.6}.primary{width:100%;margin-top:16px;border-radius:16px;padding:16px 20px;background:#dc8269;color:#fff;text-align:left}.primary span{float:right}dialog a{color:inherit}#loading{position:absolute;inset:0;display:grid;place-items:center;background:#e8d1b9;z-index:5;font-family:serif;letter-spacing:3px}#loading[hidden]{display:none}#flash{position:absolute;inset:0;pointer-events:none;background:white;opacity:0;z-index:5}#flash.flash{animation:flash .5s ease-out}@keyframes flash{from{opacity:.8}to{opacity:0}}[data-time=night] header,[data-time=night] .intro,[data-time=night] .place{color:#fff4e6}[data-time=night] .times{color:#483c38}.intro,.place,header{transition:color 1.2s}@media(max-width:600px){header{left:22px;right:18px;top:max(20px,env(safe-area-inset-top))}.brand{font-size:10px;letter-spacing:2.5px}.brand span{margin-left:7px}.round{width:39px;height:39px}.top-actions{gap:7px}.intro{top:16%}.eyebrow{font-size:8px;letter-spacing:2px;margin-bottom:15px}h1{font-size:43px;letter-spacing:3px;margin-bottom:15px}.sub{font-size:12px;letter-spacing:.5px}.times{margin-top:22px}.times button{padding:8px 19px;font-size:15px}.times button span{font-size:12px}.place{display:none}.bottom{bottom:max(18px,env(safe-area-inset-bottom));width:calc(100% - 28px)}.camera{width:52px;height:52px}.control-row{gap:9px}.actions{padding:9px 4px;border-radius:23px}.actions button{font-size:11px;gap:7px}.actions svg{width:26px;height:26px}.hint{font-size:11px;margin-bottom:14px;padding:9px 15px}footer{font-size:8px;margin-top:16px}.rest{top:36%}.rest p{font-size:12px}}@media(max-height:650px){.intro{top:12%}.eyebrow{display:none}h1{font-size:34px;margin-bottom:8px}.times{margin-top:14px}.bottom{bottom:12px}footer{margin-top:10px}.hint{margin-bottom:9px}.actions{padding:5px}.rest{top:40%}.rest p{margin:10px}.breath{width:20px;height:20px}}@media(prefers-reduced-motion:reduce){.breath{animation:none}*{transition:none!important}}
@media(min-width:900px){body{background:linear-gradient(#292b3140,#292b3180),url('beach.png') center/cover}body:before{content:'';position:absolute;inset:0;backdrop-filter:blur(25px)}#app{max-width:690px;margin:auto;box-shadow:0 0 120px #1b20284d}.intro h1{font-size:56px}.intro{top:14%}header{left:26px;right:26px}.place{left:22px}}
@font-face{font-family:SandHand;src:url('handwriting.ttf') format('truetype');font-display:swap}.intro{top:14%}.intro h1{font-size:29px;letter-spacing:2px;margin-bottom:12px}.intro .eyebrow{font-size:7px;margin-bottom:14px;letter-spacing:2px}.sub{font-size:11px}.times{margin-top:17px;padding:3px;gap:2px}.times button{font-size:12px;padding:6px 12px}.times button span{font-size:10px;margin-left:4px}header{left:20px;right:20px;top:max(19px,env(safe-area-inset-top))}.brand{font-size:9px;letter-spacing:2px}.brand span{font-size:12px;margin-left:4px}.top-actions{gap:7px;align-items:center}.top-actions .round{height:31px;width:31px;font-size:17px}.top-actions svg{width:21px;height:21px}.presence{font-size:9px;background:#fff8eb28;color:inherit;padding:7px 10px;border:1px solid #fff4;border-radius:20px;white-space:nowrap;backdrop-filter:blur(12px)}.actions{padding:6px 4px;border-radius:22px}.actions button{font-size:10px;gap:5px}.actions button svg{width:23px;height:23px}.camera{height:48px;width:48px}.hint{font-size:10px;padding:8px 14px}.bottom{width:min(470px,calc(100% - 30px));bottom:max(15px,env(safe-area-inset-bottom))}footer{font-size:8px;margin-top:13px}.place{display:none}.rest{top:32%}.rest p{font-size:11px}.rest small{font-size:10px}.breath{width:24px;height:24px}.writing{position:absolute;inset:0;z-index:4;background:#13203955;backdrop-filter:blur(6px);overflow:auto}.writing[hidden],.memory[hidden]{display:none}.back{position:absolute;left:22px;top:max(25px,env(safe-area-inset-top));background:#fff4;border:1px solid #fff5;color:#fff8ed;font-size:12px;border-radius:20px;padding:10px 15px;backdrop-filter:blur(12px)}.writing-card{position:relative;margin:clamp(110px,20vh,190px) auto 40px;width:calc(100% - 44px);max-width:430px;padding:30px 25px;border:1px solid #fff9;background:#fff4e8e6;border-radius:25px;color:#49382e;text-align:center;box-shadow:0 20px 80px #0002}.writing h2{font-family:Batang,serif;font-size:23px;font-weight:400}.writing p{font-size:12px;line-height:1.8}.writing .eyebrow{font-size:7px}.writing input{width:100%;border:1px solid #a2816740;border-radius:13px;padding:16px 12px;font-size:18px;background:#fff9;color:#49382e;outline-color:#d58065;margin-top:14px}.input-info{display:flex;justify-content:space-between;gap:8px;font-size:9px;opacity:.65;text-align:left;margin:10px 0 20px}.suggestions{display:flex;gap:6px;justify-content:space-between}.suggestions button{border-radius:20px;padding:9px 11px;background:#fff8;border:1px solid #fff9;font-size:10px}.writing .primary{font-size:13px}#writeError{color:#a83d30;margin:6px 0;min-height:17px;font-size:11px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.memory{position:absolute;inset:0;pointer-events:none}.memory button{pointer-events:auto}.memory-title{position:absolute;top:13%;text-align:center;width:100%;font-family:Batang,serif;font-size:17px;color:#fff9ec;text-shadow:0 1px 10px #0009}.memory-controls{position:absolute;bottom:max(35px,env(safe-area-inset-bottom));text-align:center;width:100%;color:#fff4de}.memory-controls>div{display:flex;justify-content:center;gap:12px;margin-bottom:15px}.memory-controls button{border:1px solid #fffb;background:#36261e66;color:#fff7e7;border-radius:24px;font-size:12px;padding:13px 22px;backdrop-filter:blur(10px)}.memory-controls small{font-size:10px;text-shadow:0 1px 8px #000}.memory-controls button:disabled{opacity:.5;cursor:wait}#app[data-view=write]>.intro,#app[data-view=write]>.bottom,#app[data-view=write]>header,#app[data-view=write]>.rest,#app[data-view=memory]>.intro,#app[data-view=memory]>.bottom,#app[data-view=memory]>header,#app[data-view=memory]>.rest{display:none}@media(max-width:450px){header{left:14px;right:14px;align-items:flex-start}.brand{font-size:8px;letter-spacing:1.4px;padding-top:9px}.top-actions{gap:5px;flex-wrap:wrap;justify-content:flex-end;max-width:210px}.presence{font-size:8px;padding:7px 8px}.top-actions .round{width:28px;height:28px}.intro{top:14%}.intro h1{font-size:25px}.sub{font-size:10px}.times{margin-top:14px}.times button{padding:6px 11px}.times button span{font-size:9px}.writing-card{padding:25px 18px}.suggestions button{padding:9px 8px}}@media(min-width:900px){.intro h1{font-size:32px}.intro{top:14%}}@media(max-height:650px){.intro{top:14%}.intro h1{font-size:22px}.intro .eyebrow{display:none}.sub{font-size:9px}.times{margin-top:10px}.rest{top:34%}.writing-card{margin-top:70px}}

/* Compact, centered controls on phone and desktop. */
.round{padding:0;line-height:1;flex-shrink:0;align-items:center;justify-items:center}
.round svg{display:block;margin:0;flex-shrink:0}
.top-actions .round svg{width:18px;height:18px}
.bottom{width:min(350px,calc(100% - 62px))}
.control-row{gap:9px}
.actions{padding:3px 2px;border-radius:18px}
.actions button{padding:8px 2px;gap:4px;font-size:9px;min-height:49px}
.actions button svg{width:19px;height:19px}
.actions button+button:before{top:10px;bottom:10px}
.camera{width:40px;height:40px}.camera svg{width:23px;height:23px}
.hint{margin-bottom:11px;padding:7px 12px;font-size:9px}
footer{margin-top:10px;font-size:8px}
body[data-time=night]{background-color:#0c1930}
@media(min-width:900px){body[data-time=night]{background-image:linear-gradient(#13203940,#13203980),url('night.png')}}

/* Smaller beach actions, with room for the scenery. */
.bottom{width:min(280px,calc(100% - 72px))}
.control-row{gap:7px}
.actions{padding:1px 2px;border-radius:15px}
.actions button{font-size:8px;min-height:40px;padding:5px 1px;gap:3px}
.actions button svg{width:15px;height:15px}
.actions button+button:before{top:8px;bottom:8px}
.camera{width:34px;height:34px}.camera svg{width:20px;height:20px}

/* Quiet typography leaves the sky open. */
#app .intro{top:12%}
#app .intro .eyebrow{font-size:6px;letter-spacing:1.3px;margin-bottom:7px}
#app .intro h1{font-size:15px;letter-spacing:1px;margin-bottom:7px;line-height:1.4}
#app .intro .sub{font-size:8px;letter-spacing:.2px}
#app .intro .times{margin-top:11px}
@media(max-width:450px){#app .intro h1{font-size:14px}#app .intro .eyebrow{font-size:5px}#app .intro .sub{font-size:7px}}

/* Small optional identity control, leaving the landscape open. */
.name-button{position:absolute;right:0;top:39px;border:1px solid #fff5;background:#fff4;color:inherit;backdrop-filter:blur(12px);border-radius:20px;padding:6px 10px;font-size:9px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#nameDialog{padding:28px 25px}#nameDialog h2{font-size:20px}#nameForm label{font-size:12px}#nickname{display:block;width:100%;margin-top:10px;padding:13px;border:1px solid #b6a28b80;border-radius:12px;font:inherit;background:#fff9;color:#49382e}#nameHelp{font-size:11px;color:#7a695e}#nameError{min-height:18px;color:#9b4035;font-size:11px}#saveName:disabled{opacity:.55;cursor:wait}#restQuote{opacity:1;transition:opacity .8s;min-height:2em;padding:0 22px}#restQuote.fading{opacity:0}

/* A paper letter held in softly tinted glass. */
.bottom{width:min(410px,calc(100% - 28px))}.actions button{min-height:49px;font-size:9px}.actions button svg{width:19px;height:19px}footer button{font-size:11px;padding:7px 3px}.letter-dialog{width:calc(100% - 24px);max-width:450px;max-height:94dvh;overflow-y:auto;padding:30px 22px 16px;background:linear-gradient(155deg,#fbf8f0f5,#dbe9e6f5);text-align:center}.letter-dialog h2{font-family:SandHand,cursive;font-size:28px;margin:10px 0 16px}.letter-dialog .eyebrow{font-size:7px;margin:0 0 10px}.letter-tabs{display:flex;justify-content:center;gap:7px;margin-bottom:16px}.letter-tabs button{padding:8px 19px;border-radius:20px;background:transparent;font-size:12px}.letter-tabs button[aria-pressed=true]{background:#496c6b;color:#fff}.bottle-neck{width:68px;height:33px;margin:0 auto;background:linear-gradient(90deg,#9ec3bf4d,#ffffff99,#87b0aa55);border:1px solid #86aaa4;border-radius:5px 5px 0 0;position:relative}.bottle-neck:before{content:'';position:absolute;top:-5px;left:7px;right:7px;height:12px;border-radius:4px;background:repeating-linear-gradient(0deg,#bc9774 0 2px,#cba98b 2px 4px);border:1px solid #a88c70}.glass-bottle{padding:27px 20px 23px;border:1px solid #8baea9;border-radius:62px 62px 35px 35px;background:linear-gradient(110deg,#fff9,#a6c9c333 18%,#fff5 72%,#91bbb34d);box-shadow:inset 5px 0 8px #fff9,inset -5px 0 8px #90b4aa33,0 12px 25px #385e5410;max-width:330px;margin:0 auto}.letter-paper{background:repeating-linear-gradient(transparent 0 31px,#b09c7b20 31px 32px),#fff8e8;box-shadow:0 3px 14px #54675b1c;padding:17px 15px;transform:rotate(-1.4deg);text-align:left;border-radius:2px;color:#534a3b;font-family:SandHand,cursive}.letter-paper label,.letter-to{font-size:20px!important;line-height:1.6!important;margin:0!important}.letter-paper textarea{resize:vertical;min-height:130px;height:17dvh;max-height:250px;width:100%;border:0;background:transparent;font:22px/32px SandHand,cursive;color:#534a3b;outline-color:#7b9d96;padding:5px 0}.letter-paper textarea::placeholder{color:#9e9585}.letter-sign{font:17px SandHand,cursive!important;text-align:right;margin:12px 0 0!important}.letter-meta{display:flex;justify-content:space-between;gap:8px;font-size:9px;margin:14px 0 0;line-height:1.6;color:#66756d}.letter-note{font-size:9px!important;margin:5px 0!important;color:#66756d}.letter-dialog .primary{background:#496c6b;font-size:12px;margin-top:12px}.letter-dialog button:disabled{opacity:.5;cursor:wait}#letterError{font-size:11px;color:#9b4035;min-height:16px;margin:5px 0}#receivedText{font:22px/32px SandHand,cursive;white-space:pre-wrap;overflow-wrap:anywhere;max-height:35dvh;overflow-y:auto;margin:10px 0}#readerStatus{font-size:11px;margin:5px 0 20px}#sendScene{position:absolute;inset:0;pointer-events:none;text-align:center;color:#fff9ed;text-shadow:0 2px 18px #152e49;z-index:4;padding-top:25vh}#sendScene p{font:29px SandHand,cursive}#sendScene small{font:18px SandHand,cursive}.sending>.intro,.sending>.bottom,.sending>header,.sending>.rest{visibility:hidden}@media(max-height:700px){.letter-dialog{padding-top:20px}.letter-dialog h2{font-size:24px;margin:7px 0}.letter-tabs{margin-bottom:10px}.glass-bottle{padding:18px 15px}.letter-paper textarea{min-height:95px;height:95px}.letter-paper{padding:12px}.letter-dialog .eyebrow{display:none}}

/* Approved watercolor letter design; the live beach remains behind the dialog. */
[hidden]{display:none!important}
.avatar-name{position:absolute;z-index:3;transform:translateX(-50%);text-align:center;max-width:190px;color:#fff8e7}
.avatar-name button{background:#47372b70;border-radius:15px;padding:5px 9px;font-size:11px;color:inherit;white-space:nowrap;backdrop-filter:blur(3px)}
#inlineNameForm{display:flex;background:#fff5e8e8;border-radius:18px;padding:3px;color:#49382e;box-shadow:0 2px 12px #0002}
#inlineNickname{min-width:0;width:112px;border:0;border-bottom:1px solid #a9957b;background:transparent;color:inherit;font:12px sans-serif;padding:5px;outline-offset:2px}
#inlineNameForm button{background:transparent;padding:4px 7px;font-size:14px}
#inlineNameStatus{display:block;font-size:10px;background:#47372bb8;border-radius:6px;line-height:1.5}#inlineNameStatus:empty{display:none}
.letter-dialog{position:fixed;inset:0;margin:auto;width:100%;max-width:540px;height:100dvh;max-height:100dvh;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;padding:38px 20px 20px;color:#343d3a;text-align:center;overflow-y:auto}
.letter-dialog::backdrop{background:#fff5e54d;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
body[data-time=night] .letter-dialog::backdrop{background:#f8f1df70}
.letter-dialog>.eyebrow{display:none}.letter-dialog h2{font:28px/1.4 SandHand,cursive;margin:8px 0 12px;text-align:center}
.letter-dialog .close{top:12px;right:20px;font-size:28px;color:#343d3a}
.letter-tabs{gap:16px;margin:0 auto 12px}.letter-tabs button{border-radius:0;border-bottom:1px solid transparent;padding:7px 15px;background:transparent;color:#665d52}
.letter-tabs button[aria-pressed=true]{background:transparent;color:#245b62;border-bottom:2px solid #245b62}
.bottle-neck{display:none}
.glass-bottle{width:min(100%,340px);max-width:340px;aspect-ratio:1152/1365;position:relative;padding:0;margin:0 auto;border:0;border-radius:0;background:url('watercolor-bottle.png') center/100% 100% no-repeat;box-shadow:none}
.letter-paper{position:absolute;left:19%;right:15%;top:40%;bottom:14%;padding:0;background:transparent;box-shadow:none;transform:none;border-radius:0;text-align:center;display:flex;flex-direction:column;justify-content:center;color:#534a3b}
.letter-paper label,.letter-to{font:19px/1.5 SandHand,cursive!important;text-align:center}
.letter-paper textarea{flex:1;min-height:0;height:auto;max-height:none;resize:none;font:21px/1.65 SandHand,cursive;text-align:center;margin:5px 0;padding:0;overflow-y:auto}
.letter-paper textarea::placeholder{color:#857e70;opacity:1}
.letter-sign{font:15px/1.4 SandHand,cursive!important;text-align:center;margin:4px 0 0!important}
.letter-meta{max-width:330px;margin:8px auto 0;color:#454e48;font-size:10px}.letter-note{color:#535e56;font-size:9px!important}
.letter-dialog .primary{display:block;max-width:310px;margin:12px auto 0;border:1px solid #c7dfd4aa;border-radius:30px;background:#c5ded9df;color:#24545a;text-align:center;font:22px SandHand,cursive;padding:11px 20px}.letter-dialog .primary span{float:none;margin-left:10px}
#receivedText{flex:1;min-height:0;max-height:none;overflow-y:auto;font:21px/1.65 SandHand,cursive;margin:6px 0;text-align:center}
#readerStatus{margin:5px 0;font-size:11px;color:#434e48}
#letterError{margin:8px auto;font-size:11px;background:#fff6;max-width:330px;border-radius:8px}#letterError:empty{display:none}
@media(max-height:720px){.letter-dialog{padding-top:24px}.letter-dialog h2{font-size:25px;margin:6px 0}.glass-bottle{width:280px}.letter-tabs{margin-bottom:8px}.letter-paper label,.letter-to{font-size:17px!important}.letter-paper textarea,#receivedText{font-size:19px;line-height:1.5}.letter-sign{font-size:13px!important}.letter-dialog .primary{margin-top:8px}.letter-meta{margin-top:6px}}
@media(max-width:350px){.letter-dialog{padding-left:10px;padding-right:10px}.glass-bottle{width:270px}.letter-dialog h2{font-size:24px}}
/* Compact opaque beach controls, keeping the sea in focus. */
.bottom{width:min(310px,calc(100% - 48px))}
.actions{background:#f5e8d4;border-color:#fff3df;backdrop-filter:none;padding:1px 2px;border-radius:15px;box-shadow:0 3px 16px #46322810}
.actions button{min-height:40px;padding:5px 1px;gap:3px;font-size:8px;white-space:nowrap}
.actions button svg{width:15px;height:15px}
.control-row{gap:7px}
.camera{width:32px;height:32px;background:#f5e8d4;backdrop-filter:none}.camera svg{width:18px;height:18px}
.hint{background:#f5e8d4;backdrop-filter:none;font-size:8px;padding:6px 10px;margin-bottom:9px}
footer{font-size:7px;letter-spacing:.3px;margin-top:7px}footer button{font-size:9px;padding:5px 2px}
#app .intro h1{font-size:14px;letter-spacing:1px;margin-bottom:6px}
#app .intro .sub{font-size:7px;letter-spacing:.1px}
#app .intro .eyebrow{font-size:5px;letter-spacing:1px;margin-bottom:6px}
#app .intro .times{background:#f5e8d4;border-color:#fff3df;backdrop-filter:none;padding:3px;gap:1px;margin-top:10px}
#app .times button{padding:5px 10px;font-size:11px}#app .times button span{font-size:8px;margin-left:3px}
.top-actions .round{width:26px;height:26px;background:#f5e8d4;backdrop-filter:none;color:#49382e}.top-actions .round svg{width:16px;height:16px}
.presence{background:#f5e8d4;color:#49382e;border-color:#fff3df;backdrop-filter:none;font-size:7px;padding:6px 8px}
.brand{font-size:8px;letter-spacing:1.4px}.brand span{font-size:10px}
.avatar-name button{font-size:9px;padding:4px 7px;background:#514335;backdrop-filter:none}
#inlineNameForm{background:#f5e8d4}#inlineNameForm button{background:transparent;font-size:13px}
@media(max-width:360px){.bottom{width:calc(100% - 36px)}.actions button{font-size:7px}.actions button svg{width:14px;height:14px}}
/* Main controls: white backgrounds at exactly 40% opacity. */
#app .intro .times,.actions,.camera,.hint,.top-actions .round,.presence,#editName{background:rgba(255,255,255,.4);border-color:rgba(255,255,255,.3);backdrop-filter:none;-webkit-backdrop-filter:none}
#app .times button[aria-pressed=true]{background:rgba(255,255,255,.4);color:inherit;box-shadow:inset 0 0 0 1px rgba(255,255,255,.45)}
#editName{color:#fff;text-shadow:0 1px 3px #342018}

/* Larger, readable watercolor letters. */
.letter-dialog{padding:30px 10px 24px}
.letter-dialog::backdrop{backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);background:#fff5e526}
.letter-dialog .glass-bottle{width:min(100%,440px);max-width:440px}
.letter-paper label,.letter-to{font-size:23px!important}
.letter-paper textarea,#receivedText{font-size:29px;line-height:1.45}
.letter-sign{font-size:18px!important}
.letter-meta{display:flex;flex-direction:column;align-items:center;gap:4px;max-width:100%;font-size:14px;color:white;text-shadow:0 1px 5px #302822;margin:12px auto 0}
.letter-note{font-size:12px!important;color:white;text-shadow:0 1px 5px #302822;text-align:center}
.letter-dialog .primary{font-size:25px;max-width:360px}
#readerStatus{color:white;text-shadow:0 1px 5px #302822;font-size:14px}
.floating-letter{position:fixed!important;margin:0!important;max-width:none!important;z-index:20;pointer-events:none;transform-origin:center;will-change:transform,opacity}
.floating-letter .letter-paper textarea{font-size:29px;line-height:1.45}
#sendScene{padding-top:20vh}#sendScene p{font-size:23px}#sendScene small{font-size:16px}
@media(max-width:350px){.letter-paper textarea,#receivedText{font-size:26px}.letter-paper label,.letter-to{font-size:21px!important}}

/* Approved compact layout; upper time controls stay unchanged. */
#app .bottom .actions,#app .bottom .camera{background:rgba(255,255,255,.5)}
#readLetters{font-size:13px;font-weight:600;color:#fff;text-shadow:0 1px 4px #302018,0 0 8px #30201880;padding:6px 3px}
.letter-dialog{padding:20px 10px max(14px,env(safe-area-inset-bottom))}
.letter-dialog h2{margin:4px 20px 8px;font-size:26px}
.letter-tabs{margin-bottom:6px}
.letter-dialog .glass-bottle{width:min(100%,440px,calc((100svh - 210px)*.844));max-width:440px}
.letter-meta{flex-direction:row;justify-content:center;flex-wrap:wrap;gap:4px 10px;font-size:12px;margin:6px auto 0;line-height:1.4}
.letter-dialog .primary{margin:8px auto 0;padding:10px 18px;font-size:24px}
.letter-dialog #letterError{margin:4px auto}
@media(max-height:650px){.letter-dialog{padding-top:12px}.letter-dialog h2{font-size:23px;margin-bottom:4px}.letter-tabs button{padding:5px 12px}.letter-dialog .glass-bottle{width:min(100%,440px,calc((100svh - 180px)*.844))}.letter-sign{font-size:15px!important}.letter-paper label,.letter-to{font-size:20px!important}.letter-paper textarea,#receivedText{font-size:26px}}

/* Letter navigation with stable contrast in daylight and at night. */
.letter-dialog .letter-tabs{display:flex;width:max-content;max-width:100%;gap:4px;padding:4px;border:1px solid #ffffffb3;border-radius:24px;background:#fff8edee;box-shadow:0 2px 12px #172d3b20}
.letter-dialog .letter-tabs button{font-size:14px;font-weight:600;color:#314b50;padding:7px 18px;border:0;border-radius:20px}
.letter-dialog .letter-tabs button[aria-pressed=true]{background:#315e65;color:#fff;border:0;box-shadow:0 1px 4px #17383d20}
.letter-dialog .close{display:grid;place-items:center;top:9px;right:10px;width:32px;height:32px;border-radius:50%;background:#fff8edef;color:#284b52;font-size:26px;line-height:1;box-shadow:0 2px 8px #102a3b20}
body[data-time=night] .letter-dialog h2{color:#fff9ee;text-shadow:0 2px 6px #102a3b}

/* Stronger beach controls, with dedicated night contrast. */
#app .bottom .actions,#app .bottom .camera{background:rgba(255,255,255,.8);border-color:#ffffffb3;color:#23343e;box-shadow:0 3px 14px #13273324}
#app .actions button{color:#23343e;font-weight:600}
#app .actions button svg{stroke-width:1.8}
#app .actions button[aria-pressed=true]{color:#a44d36}
#app[data-time=night] .intro .times,#app[data-time=night] .top-actions .round,#app[data-time=night] .presence,#app[data-time=night] .hint{background:rgba(255,255,255,.8);color:#23343e;border-color:#ffffffb3}
#app[data-time=night] .times button{color:#23343e}
#app[data-time=night] .times button[aria-pressed=true]{background:#315e65;color:#fff;box-shadow:none}
#app[data-time=night] #editName{background:#fffC;color:#23343e;text-shadow:none}
body[data-time=night] .letter-dialog::backdrop{background:#071a2e26}

/* A: warm cream label, small terracotta self marker. */
#app #avatarName #editName{background:#fff4e5;color:#40372f;text-shadow:none;border:1px solid #c8ad9280;border-radius:16px;padding:5px 10px;font-size:11px;font-weight:500;box-shadow:0 2px 6px #382a2020;backdrop-filter:none}
#app #avatarName #editName::before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:#cd8063;margin-right:7px;vertical-align:1px}
#app #inlineNameForm{background:#fff4e5;border:1px solid #c8ad9280;color:#40372f}
/* Lucky shells: preserve the beach, reveal a quiet collectible card. */
#shellField{position:absolute;inset:0;z-index:30;background:linear-gradient(transparent 55%,#32261918);pointer-events:auto}#shellField[hidden]{display:none}#shellField>p{position:absolute;top:57%;width:100%;text-align:center;color:#fff;text-shadow:0 1px 5px #382a20;font-size:15px}#shellField small{display:block;font-size:11px;margin-top:8px}.shell-exit{position:absolute;right:16px;top:16px;background:#fff9;border-radius:50%;width:36px;height:36px;font-size:24px}.shore-shell{position:absolute;width:68px;height:68px;background:none;border:0;filter:drop-shadow(0 3px 3px #37291a66)}.shore-0{left:15%;top:72%;transform:rotate(-12deg)}.shore-1{left:45%;top:78%;transform:rotate(12deg)}.shore-2{right:12%;top:70%}.shell-art{display:block;background-image:url('lucky-shells.png');background-size:400% 300%;width:100%;aspect-ratio:1;background-repeat:no-repeat}.shore-shell:focus-visible{outline:2px solid white;border-radius:20px}#shellDialog{width:min(88vw,380px);max-height:90svh;overflow:auto;padding:26px 24px 20px;background:#fff8ed;color:#493c32;border:1px solid #fff;border-radius:25px;text-align:center;box-shadow:0 15px 60px #18253544}#shellDialog::backdrop{background:#16243255;backdrop-filter:blur(3px)}.shell-close{position:absolute;right:12px;top:8px;border:0;background:none;font-size:26px;color:#594539}.shell-eyebrow{font-size:13px;margin:7px 0}.shell-large{width:min(46vw,190px);margin:0 auto}.shell-grade{font-size:10px;letter-spacing:1.5px;color:#987450;margin:0 0 12px}#shellDialog h2{font-size:22px;margin:10px 0 15px}.shell-fortune{font-size:15px;line-height:1.9;word-break:keep-all;margin:0 0 20px}.shell-primary{display:block;width:100%;border:0;border-radius:30px;padding:13px;background:#ca927d;color:white;font-size:14px}.shell-album{background:none;border:0;color:#756153;font-size:12px;margin-top:14px}.shell-note{display:block;font-size:10px;color:#9b8a7a;line-height:1.5;margin-top:14px}.shell-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.shell-grid button{border:0;background:#f1e6d7;border-radius:12px;padding:6px;font-size:10px;color:#594539}.shell-grid small{display:block;font-size:8px;margin-top:4px}.gold-shell{animation:shell-glow 1.5s ease-out}@keyframes shell-glow{50%{filter:drop-shadow(0 0 14px #e5bb56)}}@media(prefers-reduced-motion:reduce){.gold-shell{animation:none}}
#app.shell-hunt>.intro,#app.shell-hunt>.bottom,#app.shell-hunt>header,#app.shell-hunt>.place,#app.shell-hunt>#rest,#app.shell-hunt>#avatarName{visibility:hidden;pointer-events:none}
#scene{transition:transform .7s ease;transform-origin:65% 78%}#app.shell-near #scene{transform:scale(1.06)}
#shellField{background:none}#shellField .hunt-copy{top:14%;padding:0 22px;box-sizing:border-box;font-family:SandHand,serif;font-size:27px;line-height:1.5;color:#44352e;text-shadow:0 1px 7px #fff9}#shellField .hunt-copy small{font-family:inherit;font-size:15px}#app[data-time=night] #shellField .hunt-copy{color:#fff7e7;text-shadow:0 1px 6px #102038}
#shellField .shore-shell{width:48px;height:48px;top:76%;left:55%;right:auto;transform:rotate(-10deg);padding:6px;filter:drop-shadow(0 2px 1px #39261970);touch-action:none;transition:width .5s,height .5s,top .5s,left .5s}
#shellField .shore-shell .shell-art{clip-path:inset(0 0 38% 0);transform:scaleY(.65);transform-origin:center bottom}#shellField .shore-1{top:80%;left:78%;transform:rotate(16deg)}#shellField .shore-2{top:72%;left:64%;transform:rotate(-25deg)}#shellField .shore-shell[hidden]{display:none}#shellField .shore-0:after{content:'';position:absolute;inset:0;border:1px solid #fff9;border-radius:50%}
#shellField .digging{left:54%;top:72%;width:130px;height:96px;transform:none;filter:none;padding:0;background:radial-gradient(ellipse,#46301d35,transparent 65%)}#shellField .digging:after{display:none}#shellField .digging .shell-art{width:86px;height:86px;margin:auto;clip-path:none;transform:scaleY(.8)}#shellField .digging canvas{position:absolute;inset:0;width:100%;height:100%;border-radius:50%;mask-image:radial-gradient(ellipse,#000 45%,transparent 72%);touch-action:none;transition:opacity .5s}#shellField .uncovered .shell-art{filter:drop-shadow(0 2px 2px #36271970)}
.hunt-nav{position:absolute;bottom:4%;left:8%;width:84%;display:flex;background:#fff6e6e8;border-radius:35px;padding:14px 0;box-shadow:0 2px 15px #36271918}.hunt-nav button{width:50%;border:0;background:none;color:#594334;font-size:13px}.hunt-nav button+button{border-left:1px solid #d5bca4}.scratch-skip{position:absolute;top:85%;left:50%;transform:translateX(-50%);border:0;background:#fff7e5d9;color:#594334;border-radius:20px;padding:8px 16px;font-size:11px}.scratch-skip[hidden]{display:none}
#shellDialog{position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:480px;max-height:48svh;box-sizing:border-box;border:0;border-radius:28px 28px 0 0;background:#fff8edf5;padding:22px 24px 18px;box-shadow:0 -4px 25px #46301d15;animation:fortune-rise .45s ease-out}#shellDialog::backdrop{background:transparent;backdrop-filter:none}#shellDialog h2{font-family:SandHand,serif;font-size:28px;margin:6px 0 10px}#shellDialog .shell-fortune{font-size:14px;line-height:1.7;margin-bottom:14px}#shellDialog .shell-primary{background:#edd4b9;color:#594334}#shellDialog.album-view{max-height:70svh}.shell-hunt:has(#shellDialog[open]) .hunt-nav{visibility:hidden}@keyframes fortune-rise{from{transform:translateY(100%)}to{transform:translateY(0)}}@media(prefers-reduced-motion:reduce){#scene,#shellField .shore-shell,#shellField .digging canvas{transition:none}#shellDialog{animation:none}}
#shellField .uncovered{top:49%;left:calc(50% - 65px)}
/* Larger buried shells, revealed with a single tap. */
#shellField .shore-shell{width:76px;height:76px;padding:4px;left:16%;top:75%;filter:drop-shadow(0 1px 1px #39261950)}
#shellField .shore-1{left:64%;top:78%;transform:rotate(12deg)}
#shellField .shore-2{left:43%;top:70%;transform:rotate(-14deg)}
#shellField .shore-shell .shell-art{clip-path:inset(0 0 66% 0);transform:translateY(16px) scaleY(.8);mask-image:linear-gradient(to bottom,#000 23%,transparent 36%)}
#shellField .shore-0:after{display:none}
#shellField .digging.uncovered{left:calc(50% - 90px);top:39%;width:180px;height:150px;padding:0;transform:none;background:none;transition:left .38s ease-out,top .38s ease-out,width .38s ease-out,height .38s ease-out}
#shellField .digging.uncovered .shell-art{width:160px;height:160px;margin:auto;clip-path:none;mask-image:none;transform:none;filter:drop-shadow(0 5px 7px #39261940);animation:shell-pop .38s ease-out}
@keyframes shell-pop{0%{transform:translateY(24px) scale(.65)}65%{transform:translateY(-6px) scale(1.06)}100%{transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){#shellField .digging.uncovered{transition:none}#shellField .digging.uncovered .shell-art{animation:none}}
/* Six half-buried choices, clear of the bottom navigation. */
#shellField .shore-shell:not(.digging) .shell-art{clip-path:inset(0 0 43% 0);transform:translateY(4px) scaleY(.8);mask-image:linear-gradient(to bottom,#000 43%,transparent 58%)}
#shellField .shore-0:not(.digging){left:8%;top:71%;transform:rotate(-10deg)}
#shellField .shore-1:not(.digging){left:39%;top:69%;transform:rotate(12deg)}
#shellField .shore-2:not(.digging){left:69%;top:72%;transform:rotate(-16deg)}
#shellField .shore-3:not(.digging){left:15%;top:81%;transform:rotate(15deg)}
#shellField .shore-4:not(.digging){left:46%;top:78%;transform:rotate(-8deg)}
#shellField .shore-5:not(.digging){left:72%;top:82%;transform:rotate(9deg)}
@media(max-height:650px){#shellField .shore-shell:not(.digging){width:64px;height:64px}#shellField .shore-3:not(.digging){top:79%}#shellField .shore-5:not(.digging){top:79%}}
/* Eight roomy targets across the sand; three daily keepsakes. */
#shellField .shore-shell:not(.digging){width:clamp(58px,18vw,76px);height:clamp(58px,18vw,76px)}
#shellField .shore-0:not(.digging){left:3%;top:70%}#shellField .shore-1:not(.digging){left:27%;top:72%}#shellField .shore-2:not(.digging){left:51%;top:69%}#shellField .shore-3:not(.digging){left:76%;top:72%}
#shellField .shore-4:not(.digging){left:8%;top:80%}#shellField .shore-5:not(.digging){left:32%;top:81%}#shellField .shore-6:not(.digging){left:56%;top:79%;transform:rotate(11deg)}#shellField .shore-7:not(.digging){left:77%;top:82%;transform:rotate(-13deg)}
.shell-again{display:block;margin:12px auto 0;padding:5px 12px;background:none;border:0;color:#806047;font-size:12px}.shell-again:disabled{color:#9b8a7a}#shellDialog .shell-note{margin-top:8px}
@media(max-height:650px){#shellField .shore-4:not(.digging),#shellField .shore-5:not(.digging),#shellField .shore-6:not(.digging),#shellField .shore-7:not(.digging){top:79%}}
/* The full shell belongs to the dialog's top layer, never behind the card. */
#shellDialog:not(.album-view){max-height:88svh;padding-top:16px}
#shellDialog .shell-result-art{width:clamp(120px,36vw,170px);height:clamp(120px,36vw,170px);margin:0 auto 8px;flex-shrink:0;clip-path:none;mask-image:none;filter:drop-shadow(0 4px 5px #62472c25)}
#shellDialog .shell-close{z-index:2}
@media(max-height:650px){#shellDialog .shell-result-art{width:110px;height:110px}#shellDialog:not(.album-view){max-height:94svh}#shellDialog .shell-fortune{font-size:13px;line-height:1.6}}

/* Shell typography follows the main beach UI. */
#shellField .hunt-copy,#shellField .hunt-copy small,#shellDialog h2{font-family:inherit;font-style:normal}
#shellField .hunt-copy{font-size:23px;font-weight:500;letter-spacing:-.6px;line-height:1.5}
#shellField .hunt-copy small{font-size:13px;font-weight:400;letter-spacing:-.2px}
#shellDialog h2{font-size:23px;font-weight:600;letter-spacing:-.5px}
