@charset "UTF-8";
:root{font-family:"SamsungOne","Noto Sans KR","Malgun Gothic",system-ui,sans-serif;color:#173f44;background:#eef1ec;font-synthesis:none;--ink:#173f44;--teal:#237e7b;--muted:#758581;--line:#e2e8e2;--paper:#fafbf7}
*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.5}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #cf9257;outline-offset:3px}[hidden]{display:none!important}button{border:0}a{color:inherit}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.entry{max-width:480px;min-height:100dvh;margin:auto;padding:64px 32px 28px;background:var(--paper);display:flex;flex-direction:column}.brand-mark{width:76px;height:76px;background:var(--ink);color:#fff;border-radius:25px;font-size:29px;display:flex;align-items:center;justify-content:center;position:relative;letter-spacing:-3px}.brand-mark span{position:absolute;font-size:18px;bottom:4px;right:10px;color:#b8dcd0}.eyebrow{font-size:12px;letter-spacing:2px;font-weight:700;color:var(--teal);margin:44px 0 16px}h1{font-size:35px;line-height:1.45;letter-spacing:-1.8px;margin:0;font-weight:650}.intro{font-size:16px;color:#7b8780;line-height:1.8;margin:20px 0 40px}.entry label{display:block;font-size:13px;font-weight:700;margin-bottom:10px}.entry input{width:100%;border:1px solid #d6dfd8;border-radius:14px;padding:17px 15px;background:white;font-size:15px}.primary{display:flex;justify-content:space-between;align-items:center;width:100%;background:var(--ink);color:#fff;padding:18px 20px;margin-top:14px;border-radius:14px;font-weight:600}.primary span{font-size:22px}.error{color:#a23f32;font-size:14px;min-height:20px}.entry-note{color:var(--muted);font-size:12px;text-align:center;margin-top:5px}.tiny-dot{display:inline-block;background:#83a698;width:6px;height:6px;border-radius:50%;margin-right:6px}.entry-route{display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:48px;font-size:9px;letter-spacing:2px;color:var(--muted)}.entry-route b{font-size:12px;letter-spacing:0;font-weight:500;display:block;margin-top:7px}.route-line{flex:1;text-align:center;margin:0 22px;background:linear-gradient(var(--line),var(--line)) center/100% 1px no-repeat;font-size:15px;color:var(--teal)}
.app{max-width:600px;margin:auto;height:100dvh;display:flex;flex-direction:column;background:var(--paper);box-shadow:0 0 70px #183c4410}.header{display:flex;justify-content:space-between;align-items:center;padding:20px 24px 15px}.wordmark{font-size:30px;font-weight:750;letter-spacing:-2px}.wordmark span{color:#b38c60;font-size:22px;margin-left:8px}.header p{font-size:10px;color:var(--muted);margin:2px 0 0;letter-spacing:1.6px}.icon-button{width:44px;height:44px;border-radius:50%;background:transparent;color:var(--ink);font-size:27px}.icon-button:hover{background:#e9eee7}.connection-bar{display:flex;justify-content:space-between;align-items:center;padding:12px 24px;background:#edf3eb;font-size:11px;font-weight:600;color:#52746a}.connection-bar #peer{font-weight:400;color:#7c8d83}.dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#c4a065;margin-right:6px}.online .dot{background:#4a9370}.offline .dot{background:#bc6860}.time-strip{display:flex;align-items:center;justify-content:center;gap:15px;font-size:10px;letter-spacing:.5px;color:#839084;padding:15px 24px 11px}.time-strip b{color:#698072;font-weight:500;margin-left:4px}.time-line{width:60px;height:1px;background:#dbe3da}.quality-banner{margin:0 22px 12px;padding:10px 13px;border:1px solid #e7e0cd;border-radius:10px;background:#f8f5ea;color:#897748;font-size:11px;line-height:1.6}.conversation{flex:1;overflow:auto;overscroll-behavior:contain;padding:8px 22px 24px;scroll-behavior:smooth}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100%;padding:24px 0 40px;text-align:center}.empty-art{width:185px;height:106px;position:relative;margin-bottom:17px}.empty-art span{position:absolute;background:#e5eee3;border-radius:22px 22px 5px 22px;left:2px;top:0;font-size:23px;padding:17px 27px;color:#487263;transform:rotate(-7deg)}.empty-art span+span{background:#d1e4df;color:#1f6d67;left:auto;right:0;top:49px;font-size:25px;border-radius:22px 22px 22px 5px;transform:rotate(6deg)}.empty h2{font-size:20px;letter-spacing:-.7px;font-weight:650;margin:12px 0}.empty p{font-size:13px;color:#8b958b;line-height:1.9;margin:0}.suggestions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:24px}.suggestions button{border:1px solid #dee6db;background:transparent;border-radius:24px;padding:11px 13px;font-size:11px;color:#6c826f}
#messages{list-style:none;padding:0;margin:0}.message{margin:0 0 22px;max-width:94%}.message.mine{margin-left:auto}.message-meta{display:flex;gap:8px;align-items:center;font-size:10px;color:#8b978a;margin:0 4px 7px}.mine .message-meta{justify-content:flex-end}.bubble{padding:17px 18px;border-radius:5px 19px 19px 19px;background:white;border:1px solid #e6ebe2;box-shadow:0 3px 10px #23443303}.mine .bubble{background:#e6f0e9;border:1px solid #dbe8df;border-radius:19px 5px 19px 19px}.source-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.7;color:#6c7d6e;margin:0 0 13px;padding-bottom:12px;border-bottom:1px solid #dce5da}.translation-text{font-size:19px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;color:#1e4842}.translation-text[lang=ar]{font-size:25px;line-height:1.8}.arabizi{font-size:12px;line-height:1.7;color:#7e9080;margin:10px 0 0;overflow-wrap:anywhere}.message-actions{display:flex;justify-content:flex-end;gap:10px;align-items:center;margin-top:9px}.message-actions button{color:#628173;background:transparent;font-size:11px;padding:7px;min-height:32px}.latency{color:#9ca697;font-size:10px;margin-right:auto}.status-text{font-size:13px;color:#7b8d7b;line-height:1.8}.status-text.error{color:#a2543d}.processing:after{content:' ···';animation:pulse 1.3s infinite}.notice{font-size:12px;background:#fff0db;color:#8b6131;padding:12px 22px;line-height:1.6}.composer{background:#fff;border-top:1px solid #e2e8df;padding:17px 20px 10px;border-radius:22px 22px 0 0;box-shadow:0 -8px 30px #24452a04}.direction-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px}.direction{display:flex;align-items:center;gap:13px;padding:9px 13px;background:#eef4ec;border-radius:30px;font-size:12px;font-weight:650;color:#37695a;min-height:38px}.swap{font-size:17px;color:#87a090}#input-hint{font-size:10px;color:#94a08e}.input-row{display:flex;align-items:flex-end;gap:10px}textarea{border:0;resize:none;background:#f6f8f3;border-radius:14px;min-height:54px;max-height:140px;line-height:1.6;padding:15px;color:#294c3d;flex:1;min-width:0;font-size:15px}textarea::placeholder{color:#9ba494;font-size:13px}.send{border-radius:15px;width:50px;height:54px;flex-shrink:0;background:#267b6f;color:#fff;font-size:28px}.voice-row{display:flex;align-items:center;justify-content:space-between;padding:8px 0 0}.mic{display:flex;align-items:center;gap:7px;background:transparent;color:#597d6b;padding:9px 2px;min-height:40px;font-size:11px}.mic svg{width:16px;height:20px;stroke:currentColor;stroke-width:1.6;fill:none}.mic.recording{color:#b3543f}.mic.recording svg{animation:pulse 1s infinite}#char-count{font-size:10px;color:#a8b0a1}.footer{display:flex;align-items:center;justify-content:center;gap:15px;background:white;padding:0 16px max(12px,env(safe-area-inset-bottom));font-size:9px;color:#a6afa2}.footer button{font-size:10px;background:transparent;color:var(--teal);padding:8px}
dialog{border:0;border-radius:24px;padding:24px;max-width:440px;width:calc(100% - 32px);max-height:85dvh;box-shadow:0 25px 100px #173f4440;color:var(--ink);background:var(--paper)}dialog::backdrop{background:#173f4466;backdrop-filter:blur(4px)}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head h2{font-size:21px;margin:0}.setting-label{font-size:11px;color:var(--muted);margin:20px 0 6px}.setting-value{font-size:18px;margin:0 0 15px}.setting-row{display:flex;justify-content:space-between;align-items:center;gap:15px;border-top:1px solid var(--line);padding:20px 0}.setting-row b,.setting-card b{font-size:14px}.setting-row p,.setting-card p{font-size:12px;line-height:1.8;color:#7e8b7c;margin:6px 0 0}.setting-row input{accent-color:var(--teal);width:22px;height:22px;flex-shrink:0}.setting-card{background:#eef2e9;padding:16px;border-radius:14px;margin:10px 0}.text-button{background:transparent;color:var(--teal);font-size:12px;padding:12px 0}.danger{color:#a86951}.retry{background:#fff5e7;border-radius:10px;color:#9d6042!important;padding:10px!important}@keyframes pulse{50%{opacity:.4}}@media(min-width:650px){body{padding:20px 0}.app{height:calc(100dvh - 40px);border-radius:26px;overflow:hidden;border:1px solid #dde5da}.entry{min-height:calc(100dvh - 40px);border-radius:26px;box-shadow:0 20px 100px #21483b0a}.conversation{padding-left:28px;padding-right:28px}}@media(max-height:720px){.entry{padding-top:35px}.eyebrow{margin-top:28px}.intro{margin-bottom:25px}.empty{padding:8px 0 16px}.empty-art{transform:scale(.8);height:90px;margin-bottom:0}.header{padding-top:13px;padding-bottom:10px}.quality-banner{margin-bottom:5px}.suggestions{margin-top:14px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important}}
/* 도란도란: 부모님을 위한 큰 글씨와 부드러운 색감 */
:root{--ink:#615444;--teal:#648766;--muted:#887d6c;--paper:#fffaf3;--line:#eadfcd;color:var(--ink);background:#edeadf}
.family-art{width:220px;height:auto;margin-left:-12px}.entry{padding-top:34px}.entry .eyebrow{margin-top:20px;color:#a37558;letter-spacing:.7px;font-size:13px}.cute-name{color:#6b8c68}.intro{color:#948370;font-size:16px}.entry input{font-size:17px;border-color:#e4d7c4}.primary{background:#769572;border-radius:18px;font-size:17px}.entry label{font-size:14px}.entry-note{font-size:13px}.entry-route b{font-size:14px}.header{background:#fff8ef}.wordmark{font-size:28px;color:#6a805e;letter-spacing:-1.6px}.wordmark span{color:#d19b84;margin-left:7px}.header p{letter-spacing:.3px;font-size:12px;color:#a2937d;margin-top:5px}.connection-bar{background:#eff2e3;color:#6c7d59;font-size:12px;padding:12px 20px}.connection-bar #peer{color:#849077}.time-strip{font-size:12px;color:#9b8c76}.time-strip b{color:#86785f}.quality-banner{background:#fbf0dc;border-color:#ebdfc6;color:#90754c;font-size:12px}.chat-art{width:195px;height:110px;object-fit:contain;margin-bottom:12px}.empty h2{font-size:22px;color:#73634e}.empty p{font-size:15px;color:#a08c71}.suggestions button{font-size:13px;border-color:#e7d9c3;background:#fffaf0;color:#9c8462;min-height:44px}.bubble{background:#fffdf8;border-color:#e8dfd0;border-radius:8px 22px 22px 22px}.mine .bubble{background:#eef2e4;border-color:#e1e6d4;border-radius:22px 8px 22px 22px}.source-text{font-size:17px;color:#94826a;border-color:#e1e5d4}.translation-text{font-size:21px;color:#596e4c}.translation-text[lang=ar]{font-size:28px}.arabizi{font-size:14px;color:#8a9478}.message-meta{font-size:12px}.message-actions button{font-size:13px;min-height:44px;padding:10px;color:#82916d}.latency{font-size:11px}.status-text{font-size:15px}.composer{border-color:#eee5d7;border-radius:26px 26px 0 0;padding-top:17px}.direction{background:#f1efdf;color:#8a8058;font-size:14px;min-height:44px}.swap{color:#aa9e72}#input-hint{font-size:12px;color:#a59a85}textarea{font-size:18px;background:#f8f5ed;min-height:60px;border-radius:18px;color:#675943}textarea::placeholder{font-size:15px;color:#b2a58e}.send{width:56px;height:60px;background:#7b9870;border-radius:19px}.mic{font-size:14px;color:#8f9874;min-height:44px}#char-count{font-size:12px}.footer{font-size:11px;color:#baa68b}.footer button{font-size:12px}.notice{font-size:14px}.setting-row b,.setting-card b{font-size:16px}.setting-row p,.setting-card p{font-size:14px}.text-button{font-size:14px;min-height:44px}.setting-card{background:#f2efdf}.setting-label{font-size:13px}.icon-button{color:#8a8f6e}@media(max-height:720px){.family-art{width:150px}.entry{padding-top:22px}.entry .eyebrow{margin-top:8px}.intro{margin:14px 0 24px}.chat-art{height:78px;width:160px}.empty{padding:4px 0 10px}.empty h2{margin:6px 0}.empty p{font-size:14px}.suggestions{margin-top:10px}.entry-route{padding-top:25px}}@media(max-width:360px){.wordmark{font-size:25px}.connection-bar{padding-left:15px;padding-right:15px;font-size:11px}.direction{font-size:13px}#input-hint{font-size:11px}.composer{padding-left:15px;padding-right:15px}.footer{font-size:10px}}
.phrasebook-open{background:#fbefdf;color:#856b4d;padding:10px 12px;min-height:44px;border-radius:14px;font-size:14px}.phrasebook-note{font-size:14px;line-height:1.8;color:#887d6c}#phrase-search{width:100%;font-size:17px;padding:14px;border:1px solid #ded1bb;border-radius:14px;background:#fff}#phrase-count{font-size:13px;line-height:1.5;color:#887d6c}.phrase-choice{display:block;width:100%;text-align:left;background:#f0f1e5;padding:16px;margin:10px 0;border-radius:16px}.phrase-choice b{display:block;font-size:17px;line-height:1.6;color:#615444}.phrase-choice span{display:block;font-size:15px;line-height:1.6;color:#788469;margin-top:5px;overflow-wrap:anywhere}.translation-text[lang=aeb-Latn]{font-size:21px;line-height:1.7}
/* Readable text contrast for the parents' phones; keep the cream/pastel surfaces. */
.intro,.empty p,.entry-note,.entry-route,.header p,.time-strip,.time-strip b,.message-meta,.footer{color:#796b57}.source-text{color:#70614f}.arabizi,.message-actions button,.mic,.connection-bar,.connection-bar #peer{color:#687551}.quality-banner,.suggestions button{color:#786344}.setting-label,.setting-row p,.setting-card p,.phrasebook-note,#phrase-count,.phrase-choice span{color:#6e6657}textarea::placeholder,.entry input::placeholder{color:#786b59}.latency,#char-count,#input-hint{color:#6e6657}.primary{background:#58764f;color:#fff}.send{background:#64825d}.text-button,.footer button{color:#527049}.footer{font-size:12px}.message-meta,.latency{font-size:13px}.connection-bar{font-size:13px}

.translation-warning{background:#fff0d9;color:#78512f;padding:10px;border-radius:10px;font-size:14px;line-height:1.6}.scripture-source{border-top:1px solid #ddd2be;margin-top:12px;padding-top:10px;font-size:12px;line-height:1.6;color:#716550}.scripture-source p{margin:5px 0}
.voice-row{gap:12px}.mic{flex:1;justify-content:center;min-height:56px;padding:12px 15px;border-radius:18px;background:#e7efdf;color:#405e37;font-size:16px;font-weight:700}.mic.recording{background:#fbe3d7;color:#8a442f}.mic:disabled{background:#f1eee5;color:#847967}#char-count{white-space:nowrap}
.message{margin-bottom:12px}.bubble{padding:11px 13px}.source-text{font-size:13px;line-height:1.45;margin-bottom:7px;padding-bottom:6px}.translation-text{font-size:16px;line-height:1.5}.translation-text[lang=ar]{font-size:20px;line-height:1.55}.message-meta,.latency{font-size:11px}.message-actions{margin-top:4px;gap:8px}.message-actions button{font-size:12px;min-height:36px;padding:5px 9px}.pronunciation{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:13px;line-height:1.5;margin-top:7px;color:#665b49;overflow-wrap:anywhere}.roman-reading{font-weight:600}.korean-reading{color:#526b48}.pronunciation-note{font-size:10px;color:#807666;margin:3px 0 0}.translation-warning{padding:6px;font-size:12px}.scripture-source{font-size:11px}
#voice-player{width:calc(100% - 32px);height:38px;margin:4px 16px;flex-shrink:0}.korean-reading,.roman-reading{direction:ltr;unicode-bidi:isolate}
.voice-row{gap:8px}.voice-row .mic{font-size:14px;line-height:1.4;min-width:0;padding:10px 8px}.voice-help{display:flex;justify-content:space-between;gap:8px;margin-top:6px;font-size:11px;color:#6e6657}.phrase-card{background:#f0f1e5;border-radius:16px;margin:10px 0;padding-bottom:6px}.phrase-card .phrase-choice{margin:0}.phrase-actions{display:flex;gap:5px;padding:0 10px;flex-wrap:wrap}.phrase-actions button{font-size:12px;padding:8px;min-height:40px;color:#405e37;border-radius:8px;background:#fffaf2}#phrase-audio-slot{position:sticky;top:0;background:#fffaf2;z-index:2}#phrase-notice{font-size:13px;color:#78512f}.translation-label{display:block;font-size:11px;color:#527049;margin-bottom:3px}.roman-reading::before,.korean-reading::before{content:attr(data-label);font-size:10px;font-weight:400;color:#807666}

.header-actions{display:flex;align-items:center;gap:4px}.chat-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 16px;border-bottom:1px solid #eee6d7;flex-shrink:0}.chat-bar b{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.chat-bar button{white-space:nowrap;font-size:12px}.chat-list-item{display:flex;align-items:center;gap:8px;background:#f0f1e5;border-radius:14px;margin:10px 0;padding:6px}.chat-choice{flex:1;min-width:0;background:transparent;text-align:left;padding:10px;color:#615444}.chat-choice b{display:block;font-size:15px;overflow-wrap:anywhere}.chat-choice span{display:block;font-size:11px;margin-top:6px;color:#6e6657}#chat-list{max-height:60dvh;overflow-y:auto}#delete-chat-title{overflow-wrap:anywhere}

/* Let the conversation own the mobile viewport, including the keyboard resize. */
.app{height:var(--app-height,100dvh);position:relative;overflow:hidden}.app>.header{padding:6px 14px;flex-shrink:0}.app .header p{display:none}.app .wordmark{font-size:25px}.app>.connection-bar{padding:5px 14px;font-size:11px;flex-shrink:0}.app>.chat-bar{padding:0 12px;gap:5px}.chat-bar b{flex:1}.chat-bar button{padding:4px 7px;min-height:40px}.conversation{min-height:0;flex:1 1 0;padding:8px 12px 12px;scroll-behavior:auto;overflow-anchor:none;-webkit-overflow-scrolling:touch}.app>.composer{flex-shrink:0;padding:6px 12px max(6px,env(safe-area-inset-bottom));border-radius:16px 16px 0 0}.composer .direction-row{margin-bottom:5px}.composer .direction,.composer .phrasebook-open{min-height:36px;padding:6px 10px;font-size:12px}.composer textarea{min-height:44px;padding:9px 11px;font-size:16px;max-height:90px}.composer .send{height:44px;width:44px;border-radius:14px}.composer .voice-row{padding-top:5px}.composer .mic{min-height:44px;padding:7px 6px}.composer .voice-help{margin-top:3px;font-size:10px}.app>.footer:has(button[hidden]){display:none}.app.reading-view>.composer,.app.reading-view>.footer{display:none}.latest-chat{position:absolute;right:16px;top:120px;z-index:2;border:1px solid #d2dac8;background:#fffaf2;color:#405e37;box-shadow:0 2px 9px #52492b22;border-radius:20px;padding:9px 13px;font-size:12px;min-height:40px}.app>.notice{padding:5px 14px;font-size:12px;flex-shrink:0;max-height:64px;overflow:auto}@media(max-height:520px){.app>.connection-bar{display:none}.app .voice-help{display:none}.composer .voice-row{padding-top:3px}.app>.header{padding:0 10px}.app .wordmark{font-size:21px}.latest-chat{top:85px}}

.source-text[lang=ar]{font-size:16px;line-height:1.5}.message-actions{flex-wrap:wrap}


/* Keep iOS's document from scrolling behind the keyboard. Only chat history
   scrolls; the app follows the visible viewport, including Safari's pan offset. */
body.in-chat{position:fixed;inset:0;overflow:hidden;padding:0}
body.in-chat .app{position:absolute;top:var(--app-top,0px);left:50%;transform:translateX(-50%);width:100%;height:var(--app-height,100dvh);margin:0}
body.keyboard-open .app>.composer{padding-bottom:6px}
body.keyboard-open .composer .voice-row,body.keyboard-open .composer .voice-help,body.keyboard-open .app>.footer,body.keyboard-open .app>.connection-bar{display:none}
body.keyboard-open .app>.header{padding-top:0;padding-bottom:0}
@media(min-width:650px){body.in-chat .app{top:calc(var(--app-top,0px) + 20px);height:calc(var(--app-height,100dvh) - 40px)}}


.delete-dialog-actions{display:flex;justify-content:flex-end;gap:24px;margin-top:24px}.delete-dialog-actions .text-button{min-width:88px;min-height:48px;padding:12px 16px}
.arabizi-source{margin-top:10px;color:#6e6657;font-size:12px}.arabizi-source summary{cursor:pointer;padding:5px 0}.arabizi-source p{font-size:18px;line-height:1.7;margin:6px 0;overflow-wrap:anywhere}
