:root{color-scheme:light;--ink:#242424;--muted:#777b80;--blue:#477ced;--coral:#e58574;--hair:#ededed;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR",Arial,sans-serif;font-synthesis:none}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#fff;color:var(--ink)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,main:focus-visible{outline:2px solid var(--blue);outline-offset:6px}button[hidden],[hidden]{display:none!important}.header{height:100px;padding:0 5.2%;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:5}.wordmark{font-size:32px;letter-spacing:-2.1px;font-weight:650;text-decoration:none;color:var(--ink);display:inline-flex;align-items:baseline}.wordmark span{width:5px;height:5px;background:var(--blue);border-radius:50%;margin-left:3px}.presence{position:absolute;left:50%;transform:translateX(-50%);display:flex;gap:9px;align-items:center;white-space:nowrap;font-size:11px;letter-spacing:.01em;color:var(--muted)}.presence i{width:5px;height:5px;border-radius:50%;background:#bbbfc5;box-shadow:0 0 0 4px #f6f7f8}.language{font-size:10px!important;letter-spacing:.12em!important}.quiet{border:0;background:none;color:#777b80;padding:10px 0;font-size:11px;letter-spacing:-.01em;transition:color .2s}.quiet:hover{color:#222}.quiet span[aria-hidden]{margin-left:7px}.header .quiet{min-width:36px;min-height:44px}#stage{position:absolute;inset:100px 0 137px;touch-action:none;outline-offset:-8px}canvas{display:block;position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.intro{position:absolute;top:14%;left:0;width:100%;text-align:center;pointer-events:none;transition:opacity 1.1s ease,transform 1.1s ease}.eyebrow{font-size:9px;letter-spacing:.2em;font-weight:500;color:#92969c;margin:0 0 23px}h1{font-size:clamp(40px,4.4vw,68px);font-weight:550;letter-spacing:-.07em;line-height:1.22;margin:0}h1 span{color:#a0a3a8}.intro-note{font-size:12px;color:#92969c;margin-top:22px;letter-spacing:-.025em}.footer{position:absolute;bottom:0;width:100%;height:137px;display:grid;grid-template-columns:1fr 1.5fr 1fr;align-items:center;padding:0 5.2% 12px;z-index:5;background:linear-gradient(transparent,#fff 40%)}.footer-side{display:flex;align-items:center;gap:20px}.footer-side.right{justify-content:flex-end}.footer-center{text-align:center;align-self:center}.footer-center>p{margin:5px 0;font-size:12px;line-height:1.5;letter-spacing:-.02em}.footer-center .subhint{font-size:10px;color:#999da3}.sound{display:flex;align-items:center;gap:8px;min-height:44px}.sound svg{width:18px;height:18px}.sound-waves{display:none}[aria-pressed=true] .sound-waves{display:initial}[aria-pressed=true] .sound-slash{display:none}.session-note{position:absolute;bottom:8px;text-align:center;left:0;right:0;opacity:0;transition:opacity .6s;pointer-events:none;font-size:10px;color:#969aa0;line-height:1.9}time{display:block;font-size:11px;letter-spacing:.1em;font-variant-numeric:tabular-nums;color:#555b64;margin-top:5px}#self-label{position:absolute;color:#a2a6ac;font-size:9px;pointer-events:none;transform:translate(-50%,24px);transition:opacity .5s}body[data-state=paired] .intro,body[data-state=ended] .intro{opacity:0;transform:translateY(-10px)}body[data-state=paired] .presence i{background:#82a28c;box-shadow:0 0 0 4px #f2f6f3}body[data-state=paired] .session-note{opacity:1}body[data-state=paired] #self-label,body[data-state=ended] #self-label{opacity:0}.ending{position:absolute;top:19%;left:0;right:0;text-align:center;pointer-events:none;animation:arrive 1.5s ease both}.ending h1{font-size:clamp(28px,3vw,42px);letter-spacing:-.06em}.ending>p:last-child{font-size:11px;color:#93979d;margin-top:16px}.end-actions{display:flex;justify-content:center;align-items:center;gap:24px;margin-top:12px}.pill{border:1px solid #e5e6e8;border-radius:30px;background:white;color:#454a51;padding:13px 23px;font-size:11px;transition:background .2s,transform .2s}.pill:hover{background:#f6f7f8;transform:translateY(-1px)}.pill span{margin-left:14px}body[data-state=ended] #hint,body[data-state=ended] #subhint{display:none}body[data-state=error] .presence i{background:#d2a180}body[data-state=error] #self-label{opacity:.4}#retry{margin-top:10px}.notice{position:fixed;left:50%;bottom:145px;transform:translateX(-50%);font-size:11px;color:#656a73;z-index:20;pointer-events:none;text-align:center}dialog{border:1px solid #ededed;border-radius:20px;padding:54px 46px 42px;max-width:460px;width:calc(100% - 40px);color:var(--ink);box-shadow:0 24px 100px #0000000a}dialog::backdrop{background:#ffffffbb;backdrop-filter:blur(12px)}.close{position:absolute;right:22px;top:12px;font-size:27px;width:36px;height:44px}dialog h2{font-size:31px;line-height:1.3;letter-spacing:-.065em;font-weight:550;margin:24px 0}dialog p:not(.eyebrow){font-size:12px;line-height:1.9;color:#777d85;word-break:keep-all}dialog p.privacy{font-size:10px;color:#979ca4;padding-top:16px;border-top:1px solid #eee;margin-top:24px}.dialog-mark{display:block;font-size:9px;letter-spacing:.04em;color:#a2a6ad;margin-top:32px}@keyframes arrive{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}@media(min-width:1600px){.header{height:120px}#stage{top:120px;bottom:160px}.footer{height:160px}}@media(max-width:600px){.header{height:83px;padding:0 25px}.wordmark{font-size:28px}.presence{font-size:9px;gap:7px}.presence i{width:4px;height:4px}.header .language{font-size:9px!important}#stage{inset:83px 0 155px}.intro{top:13%}h1{font-size:43px}.eyebrow{font-size:8px;letter-spacing:.16em;margin-bottom:20px}.intro-note{font-size:11px;margin-top:18px}.footer{height:155px;padding:0 25px 15px;grid-template-columns:1fr 1fr;grid-template-rows:82px 45px}.footer-center{grid-row:1;grid-column:1/3}.footer-side{grid-row:2;grid-column:1}.footer-side.right{grid-column:2;gap:12px}.footer-center>p{font-size:11px}.footer-center .subhint{font-size:9px}.quiet{font-size:10px}.sound svg{width:16px;height:16px}.session-note{bottom:0}.ending{top:19%}.ending h1{font-size:30px}.end-actions{margin-top:0;gap:22px}.pill{padding:12px 20px}.notice{bottom:165px;width:85%}dialog{padding:48px 30px 30px}dialog h2{font-size:28px}body[data-state=paired] #about{display:none}}@media(max-height:600px){.header{height:65px}#stage{top:65px;bottom:110px}.footer{height:110px}.intro{top:3%}.intro h1{font-size:34px}.eyebrow{margin-bottom:10px}.intro-note{margin-top:12px}.footer{grid-template-rows:55px 40px}.ending{top:16%}.session-note{bottom:-8px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}


.languages{display:flex;align-items:center;gap:12px}.languages .language{letter-spacing:.02em!important;min-width:30px;color:#92969c}.languages [aria-pressed=true]{color:var(--ink);font-weight:650;text-decoration:underline;text-underline-offset:6px}.save-dialog{max-height:90dvh;overflow:auto;padding:38px 28px 24px}.save-dialog h2{font-size:24px;margin:8px 0 16px}#saved-image{display:block;width:auto;max-width:100%;height:auto;max-height:48dvh;margin:auto;border:1px solid var(--hair);-webkit-touch-callout:default;user-select:auto}.save-buttons{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px}.notice{z-index:30}html,body{overscroll-behavior:none}.footer{padding-bottom:max(12px,env(safe-area-inset-bottom))}@media(max-width:600px){.header{height:100px;align-items:flex-start;padding-top:17px}.presence{top:70px}.languages{gap:8px}#stage{top:100px}.header .language{min-height:40px}.footer{height:calc(155px + env(safe-area-inset-bottom));padding-bottom:calc(15px + env(safe-area-inset-bottom))}#stage{bottom:calc(155px + env(safe-area-inset-bottom))}.end-actions{gap:14px}.save-dialog{padding:38px 20px 20px}}@media(max-height:600px){.header{height:70px}.presence{top:53px}#stage{top:70px}}

.languages{gap:10px}.languages .language{white-space:nowrap}@media(max-width:600px){.header{padding-left:20px;padding-right:20px}.languages{gap:5px}.languages .language{min-width:28px;font-size:10px!important}.wordmark{font-size:26px}}@media(max-width:360px){.header{padding-left:14px;padding-right:14px}.languages{gap:2px}.wordmark{font-size:24px}}

/* A compact two-row dock: every greeting stays visible, including on 320px screens. */
.brand-eyes{width:31px;height:25px;margin-right:10px;overflow:visible;align-self:center}
.brand-eyes ellipse:nth-child(-n+2){fill:none;stroke:currentColor;stroke-width:1.8}
.brand-eyes ellipse:nth-child(n+3){fill:currentColor}
.wordmark{letter-spacing:-1.7px}
.palette{display:none;position:absolute;left:50%;bottom:42px;transform:translateX(-50%);z-index:4;width:max-content;max-width:calc(100% - 24px);background:#fffffff2;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border:1px solid #e9e9ec;border-radius:23px;padding:6px 8px;box-shadow:0 8px 28px #00000007;touch-action:manipulation}
body[data-state=paired] .palette{display:block}
.tool-row,.greeting-row{display:flex;justify-content:center;align-items:center;gap:4px}
.greeting-row{border-top:1px solid #f0f0f2;margin-top:4px;padding-top:3px}
.palette .tool{border:0;background:transparent;white-space:nowrap;flex:0 0 auto;height:44px;min-width:44px;border-radius:15px;font:inherit;font-size:22px;color:#65656b;display:inline-flex;gap:5px;align-items:center;justify-content:center;padding:0 11px;touch-action:manipulation;transition:background .18s,transform .18s}
.palette .tool:hover{background:#f5f5f7}.palette .tool:active{transform:scale(.94)}
.palette .tool span,.palette .tool.text-tool{font-size:11px;font-weight:550;letter-spacing:-.015em}
.palette .tool[aria-pressed=true]{background:#ededf0;color:#1d1d1f}
.palette .tool:focus-visible{outline:2px solid #477ced;outline-offset:-2px}
body[data-state=paired] #stage{cursor:crosshair}
body[data-state=paired] #stage[data-tool]:not([data-tool=pen]){cursor:copy}
body[data-connection=live] .presence i{background:#24a665;box-shadow:0 0 0 4px #e9f6ee}body[data-connection=stale] .presence i{background:#c99a48;box-shadow:0 0 0 4px #fbf5e9}
.session-note{bottom:0}.session-note #session-copy{display:none}.session-note time{font-size:12px;letter-spacing:.06em}
@media(max-width:900px){.presence{top:82px}.header{height:110px}#stage{top:110px}}
@media(max-width:600px){.brand-eyes{width:24px;margin-right:7px}.palette{padding:5px 6px;border-radius:21px;bottom:33px}.palette .tool{padding:0 8px}.greeting-row{gap:0}.palette .tool.text-tool{font-size:10px;padding:0 8px}.presence{top:76px}.header{height:100px}#stage{top:100px}}
@media(max-height:600px) and (min-width:601px){.header{height:60px}.presence{top:30px}#stage{top:60px;bottom:90px}.footer{height:90px}.intro{top:4%}.intro h1{font-size:32px}.intro-note{margin-top:10px}.eyebrow{margin-bottom:8px}}
@media(max-width:360px){.brand-eyes{width:20px;margin-right:5px}.palette .tool.text-tool{padding:0 6px}.languages{gap:0}}

/* Drawing is a direct-input surface, including the otherwise invisible intro text. */
#stage,#stage *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-user-drag:none}
#stage{touch-action:none}
#saved-image{-webkit-user-select:auto;user-select:auto;-webkit-touch-callout:default}
.wordmark{align-items:center;line-height:0}
.brand-logo{display:block;width:80px;height:60px;object-fit:contain;-webkit-user-drag:none}
.ending-logo{display:block;margin:0 auto 18px;object-fit:contain}
.save-brand{display:block;margin:0 auto 12px;object-fit:contain}
.save-dialog h2{text-align:center;font-size:22px}
@media(max-width:600px){.brand-logo{width:66px;height:50px}.header{padding-top:12px}.ending-logo{width:66px;height:50px;margin-bottom:14px}.save-brand{width:66px;height:50px}}


/* Keep the finished canvas unobstructed; its caption belongs to the footer. */
.footer-center,.footer-side{min-width:0}
.ending{position:static;animation:none;text-align:center}
.ending h1{font-size:16px;letter-spacing:-.025em;line-height:1.3}
.ending>p:last-child{font-size:10px;line-height:1.4;margin:5px 0 0;overflow-wrap:anywhere}
body[data-state=ended] .intro{display:none}
body[data-state=ended] .end-actions{margin-top:10px;gap:16px;flex-wrap:wrap}
.presence i{flex-shrink:0;width:7px;height:7px}
#self-label{left:0;top:0}
.languages{min-width:0;flex-shrink:0}
#saved-image{object-fit:contain;max-height:48dvh}
@media(max-width:600px){
 .footer{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .footer-side .quiet{max-width:100%;overflow-wrap:anywhere}
 .header .languages .language{min-width:28px;padding-inline:0}
 .greeting-row .tool{min-width:0;flex:1 1 0;white-space:normal;line-height:1.2}
 .palette{width:292px;max-width:calc(100% - 24px)}
 body[data-state=ended] .footer{grid-template-rows:100px 40px;height:calc(170px + env(safe-area-inset-bottom))}
 body[data-state=ended] #stage{bottom:calc(170px + env(safe-area-inset-bottom))}
 .ending h1{font-size:14px}
 body[data-state=ended] .end-actions{gap:12px;margin-top:8px}
 .end-actions .pill{padding:10px 14px}
}

/* Clip transient pointer positions during orientation changes to the drawing surface. */
#stage{overflow:hidden}
body[data-state=paired] .intro{display:none}

/* The daily invitation and country reveal stay quiet and fit long translations. */
.footer-center .subhint{overflow-wrap:anywhere}
body[data-state=ended] .ending>p:last-child{font-size:10px;line-height:1.45}

/* A larger preview makes the country header legible before sharing. */
.save-dialog{max-width:620px;width:calc(100% - 28px);padding:38px 24px 22px}
#saved-image{width:100%;max-height:none;max-width:100%;border-radius:10px}
.save-dialog #save-hint{font-size:11px;line-height:1.65}
.save-dialog .save-buttons{position:sticky;bottom:-22px;background:#fff;padding:12px 0 18px;border-top:1px solid var(--hair);z-index:1}
@media(max-width:600px){.save-dialog{padding:34px 16px 16px}.save-dialog .save-buttons{bottom:-16px;padding-bottom:12px}}

/* Flow layout follows Safari's visible viewport; short screens can scroll. */
html{height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:auto}
body{height:auto;min-height:100vh;min-height:100dvh;display:grid;grid-template-rows:auto minmax(360px,1fr) auto;overflow:visible;overscroll-behavior-y:auto}
body #stage,body[data-state=ended] #stage{position:relative;inset:auto;min-height:360px;touch-action:pan-y pinch-zoom}
body[data-state=paired] #stage{touch-action:none}
body .footer,body[data-state=ended] .footer{position:relative;bottom:auto;height:auto;min-height:137px;padding-top:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom));gap:12px}
.footer-side{flex-wrap:wrap}.footer-side .quiet{min-height:44px}
.presence{max-width:48%;white-space:normal;text-align:center;line-height:1.4}
dialog{position:fixed;max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom}
@media(max-width:900px){.presence{max-width:90%;width:max-content}}
@media(max-width:600px){body .footer,body[data-state=ended] .footer{grid-template-rows:auto auto;min-height:155px;padding-inline:20px}.footer-center{padding-bottom:6px}.footer-side.right{gap:8px}.header{padding-top:max(12px,env(safe-area-inset-top))}}

.palette .tool .pen-icon{font-size:22px;line-height:1}


/* The border follows the actual normalized drawing bounds on every screen. */
#drawing-boundary{position:absolute;border:1px solid #b8c9ed;pointer-events:none;display:none}
body[data-state=paired] #drawing-boundary,body[data-state=ended] #drawing-boundary{display:block}
body[data-state=paired] #stage[data-tool=eraser]{cursor:crosshair}
.palette .tool-row{gap:2px}
@media(max-width:600px){.palette .tool-row .tool{padding-inline:0;min-width:42px;flex:1}}

/* The drawing boundary is the canvas indicator; avoid a second stage-wide focus box. */
#stage:focus,#stage:focus-visible{outline:none}

/* Let waiting visitors trace water without Safari taking over the gesture. */
body[data-state=waiting] #stage{touch-action:none}

/* One stable viewport: drawing gestures must never scroll the document. */
html{height:100%;overflow:hidden;overscroll-behavior:none}
body{position:fixed;inset:0;width:100%;height:100vh;height:100dvh;min-height:0;
 overflow:hidden;overscroll-behavior:none;padding-top:env(safe-area-inset-top);
 grid-template-rows:auto minmax(0,1fr) auto}
body #stage,body[data-state=ended] #stage{min-height:0;overflow:hidden;touch-action:none}
body .footer,body[data-state=ended] .footer{min-height:0}
dialog{touch-action:pan-y pinch-zoom;overflow-y:auto}
@media(max-height:600px){
 body .header{height:60px;padding-top:4px}
 body .footer,body[data-state=ended] .footer{padding-block:4px;gap:4px}
 .footer-center{padding-bottom:0}
 .footer-center>p{margin:2px 0}
 .intro{top:4%}.intro h1{font-size:clamp(24px,5vw,34px)}
 .intro .eyebrow{margin-bottom:8px}.intro-note{margin-top:8px}
}


/* Keep water/drawing gestures from selecting the surrounding interface on iOS. */
.header,.header *,.footer,.footer *,.notice{
 -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
 -webkit-tap-highlight-color:transparent;
}

/* Safari can paint a transient native selection before selectionchange fires. */
.header ::selection,.footer ::selection,.notice::selection,#stage::selection,#stage ::selection{
 background:transparent;color:inherit;
}
