/* ─────────────────────────────────────────────
   Haru OS — Ubuntu(Yaru) / GNOME(Adwaita) 스타일
   ───────────────────────────────────────────── */
:root {
  --orange: #e95420;
  --aubergine: #2c001e;
  --purple: #77216f;
  --bg: #fafafa;
  --head: #ebebeb;
  --line: #dcdcdc;
  --text: #2e2e2e;
  --dim: #767676;
  --side: #f2f2f2;
  --sel: #e95420;
  --radius: 12px;
  --font: 'Ubuntu', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --mono: 'Ubuntu Mono', 'D2Coding', ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--text); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; }
svg { display: block; }
#root { height: 100%; }
.dim { color: var(--dim); }

/* ── 인트로 ── */
.intro { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #1b1016 0%, #000 70%); color: #e8e0e4; padding: 24px; }
.intro-txt { max-width: 560px; font-size: clamp(16px, 2.2vw, 21px); line-height: 1.9; font-weight: 300; }
.intro-txt p { margin: 0 0 14px; animation: fadeUp 1.4s ease both; }
.intro-txt p.in { animation: none; }
.intro-btn { margin-top: 36px; padding: 12px 28px; border-radius: 999px; border: 1px solid #ffffff55; background: #ffffff10; color: #fff; font-size: 15px; animation: fadeUp 1s ease both; }
.intro-btn:hover { background: var(--orange); border-color: var(--orange); }
.intro-skip { position: fixed; right: 20px; bottom: 20px; background: none; border: 0; color: #777; font-size: 13px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── 부팅 ── */
.boot { height: 100%; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 60px; }
.boot-logo { display: flex; align-items: center; gap: 14px; color: #fff; font-size: 40px; font-weight: 300; letter-spacing: 1px; animation: fadeUp 1s; }
.boot-spin { width: 28px; height: 28px; border: 3px solid #ffffff33; border-top-color: #fff; border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 잠금 화면 ── */
.lock { position: relative; height: 100%; color: #fff; overflow: hidden; user-select: none; }
.lock-bg, .desk-bg { position: absolute; inset: 0; }
.lock-bg svg, .desk-bg svg { width: 100%; height: 100%; }
.lock-bg { filter: blur(0); transition: filter .4s, transform .4s; }
.lock.auth .lock-bg { filter: blur(22px) brightness(.55); transform: scale(1.08); }
.lock-top { position: absolute; top: 0; left: 0; right: 0; height: 32px; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; font-size: 13px; }
.lock-clock { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); text-align: center; text-shadow: 0 2px 12px #0006; transition: .4s; }
.lock.auth .lock-clock { top: 4%; transform: translateX(-50%) scale(.55); opacity: .9; }
.lock-time { font-size: clamp(64px, 12vw, 120px); font-weight: 300; line-height: 1; }
.lock-date { font-size: 22px; margin-top: 8px; }
.lock-hint { margin-top: 36vh; font-size: 14px; opacity: .8; animation: pulse 2.4s infinite; }
.lock.auth .lock-hint { display: none; }
@keyframes pulse { 50% { opacity: .35; } }
.lock-auth { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -45%); display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(320px, 90vw); animation: fadeUp .35s; }
.lock-av { width: 128px; height: 128px; border-radius: 50%; overflow: hidden; border: 0; padding: 0; background: #ddd; box-shadow: 0 4px 20px #0006; }
.lock-av svg { width: 100%; height: 100%; }
.lock-name { font-size: 22px; font-weight: 500; }
.lock-form { display: flex; width: 100%; background: #ffffff26; border-radius: 999px; padding: 4px; backdrop-filter: blur(4px); }
.lock-form input { flex: 1; background: transparent; border: 0; color: #fff; padding: 9px 14px; outline: none; font-size: 15px; }
.lock-form input::placeholder { color: #ffffffaa; }
.lock-form button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #ffffff33; color: #fff; }
.lock-form button:hover { background: var(--orange); }
.lock-msg { min-height: 40px; text-align: center; font-size: 14px; line-height: 1.5; }
.lock-msg .thought { color: #ffd9a8; font-style: italic; }
.lock-help { background: none; border: 0; color: #ffffffb0; font-size: 13px; text-decoration: underline; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translate(calc(-50% - 10px), -45%); } 40%, 80% { transform: translate(calc(-50% + 10px), -45%); } }
.lock.unlocking { animation: unlock .45s forwards; }
@keyframes unlock { to { opacity: 0; transform: scale(1.04); } }
.lock-photo { position: absolute; inset: 0; background: #000b; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; z-index: 5; animation: fadeUp .25s; }
.polaroid { background: #fff; padding: 14px 14px 8px; transform: rotate(-3deg); box-shadow: 0 10px 40px #000a; width: min(420px, 86vw); }
.polaroid svg { width: 100%; aspect-ratio: 4/3; }
.polaroid p { color: #444; font-family: 'Nanum Pen Script', cursive; font-size: 28px; margin: 6px 0 0; text-align: center; }

/* ── 데스크톱 ── */
.desk { position: relative; height: 100%; overflow: hidden; animation: fadeIn .5s; }
@keyframes fadeIn { from { opacity: 0; } }
.desk-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #0000 60%, #0003); }
.topbar { position: absolute; top: 0; left: 0; right: 0; height: 32px; background: #000; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 6px; z-index: 5000; font-size: 13.5px; font-weight: 500; }
.topbar button { background: none; border: 0; color: #fff; padding: 4px 12px; border-radius: 999px; height: 26px; }
.topbar button:hover { background: #ffffff26; }
.tb-clock { position: absolute; left: 50%; transform: translateX(-50%); }
.tb-ai { color: #888; font-size: 10px; vertical-align: 1px; }
.tb-ai.ok { color: #3ddc84; }
.dock { position: absolute; top: 32px; bottom: 0; left: 0; width: 64px; background: #1e1e1ee6; backdrop-filter: blur(10px); display: flex; flex-direction: column; align-items: center; padding: 8px 0; gap: 4px; z-index: 4000; }
.dock button { position: relative; width: 54px; height: 54px; border: 0; background: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.dock button:hover { background: #ffffff1f; }
.dock button i { position: absolute; left: 1px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--orange); display: none; }
.dock button.run i { display: block; }
.dock .dock-sp { flex: 1; }
.tip { position: absolute; left: 64px; white-space: nowrap; background: #2a2a2af2; color: #fff; padding: 5px 10px; border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .12s; }
.dock button:hover .tip { opacity: 1; }
#workspace { position: absolute; top: 32px; left: 64px; right: 0; bottom: 0; }
.desk-icons { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; flex-wrap: wrap-reverse; gap: 6px; max-height: calc(100% - 24px); }
.di { width: 92px; border: 1px solid transparent; background: none; border-radius: 8px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; text-shadow: 0 1px 3px #000, 0 0 6px #000a; }
.di span { font-size: 38px; line-height: 1; }
.di em { font-style: normal; font-size: 12.5px; word-break: break-all; text-align: center; }
.di:hover { background: #ffffff22; }
.di.on { background: #e9542066; border-color: #e95420aa; }

/* 활동 보기 */
.desk.in-ov #workspace { transform: scale(.9); opacity: .25; transition: .2s; }
.overview { position: absolute; top: 32px; left: 64px; right: 0; bottom: 0; background: #000a; backdrop-filter: blur(16px); z-index: 4500; padding: 28px; display: flex; flex-direction: column; align-items: center; animation: fadeIn .18s; }
.ov-search { width: min(360px, 90%); padding: 10px 16px; border-radius: 999px; border: 0; background: #ffffff26; color: #fff; outline: none; text-align: center; }
.ov-search::placeholder { color: #fffa; }
.ov-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fill, 128px); gap: 18px; width: min(820px, 100%); justify-content: center; }
.ov-grid button { background: none; border: 0; border-radius: 16px; padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; }
.ov-grid button:hover { background: #ffffff1f; }

/* 시스템 메뉴 */
.sysmenu { position: absolute; top: 38px; right: 8px; width: 330px; background: #2b2b2bf5; color: #fff; border-radius: 18px; padding: 12px; z-index: 6000; box-shadow: 0 10px 40px #0008; animation: fadeUp .15s; }
.sysmenu button { display: block; width: 100%; text-align: left; background: #ffffff14; border: 0; color: #fff; border-radius: 999px; padding: 10px 16px; margin-top: 6px; }
.sysmenu button:hover { background: #ffffff2a; }
.sysmenu .danger { color: #ff9a8a; }
.sysmenu hr { border: 0; border-top: 1px solid #ffffff22; margin: 10px 0 4px; }
.sm-row { font-size: 12.5px; line-height: 1.5; color: #ddd; padding: 4px 6px 6px; }
.sm-q { font-size: 13px; color: #eee; margin: 4px 6px 8px; }

/* 알림 */
.notifs { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); z-index: 7000; display: flex; flex-direction: column; gap: 8px; width: min(400px, 92vw); }
.notif { display: flex; gap: 12px; align-items: center; background: #2b2b2bf2; color: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 8px 28px #0007; animation: drop .25s ease; cursor: pointer; }
.notif b { font-size: 14px; }
.notif p { margin: 2px 0 0; font-size: 13px; color: #ddd; line-height: 1.4; }
.notif > div { flex: 1; min-width: 0; }
.notif .nx { background: #ffffff1a; border: 0; color: #fff; width: 24px; height: 24px; border-radius: 50%; font-size: 11px; flex: none; }
.notif.out { opacity: 0; transform: translateY(-10px); transition: .25s; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } }
.clue-toast { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--purple); color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 7000; box-shadow: 0 6px 24px #0006; animation: fadeUp .3s; cursor: pointer; font-size: 14px; white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }
.clue-toast.out { opacity: 0; transition: .4s; }

/* ── 창 (Adwaita) ── */
.win { position: absolute; display: flex; flex-direction: column; background: var(--bg); border-radius: var(--radius); box-shadow: 0 2px 6px #0003, 0 14px 44px #0005; overflow: hidden; animation: winIn .16s ease; outline: 1px solid #0000001a; }
.win.active { box-shadow: 0 2px 8px #0003, 0 20px 60px #0007; }
.win.minimized { display: none; }
.win.max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }
.win.closing { animation: winOut .14s forwards; }
@keyframes winIn { from { opacity: 0; transform: scale(.96); } }
@keyframes winOut { to { opacity: 0; transform: scale(.96); } }
.win-head { height: 46px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 10px; background: var(--head); border-bottom: 1px solid var(--line); user-select: none; touch-action: none; }
.win:not(.active) .win-head { background: #f4f4f4; color: #888; }
.win-title { flex: 1; text-align: center; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-head-l, .win-head-r { display: flex; gap: 6px; align-items: center; min-width: 0; }
.win-btns { display: flex; gap: 10px; margin-left: 6px; }
.win-btns button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: #d8d8d8; display: flex; align-items: center; justify-content: center; padding: 0; }
.win-btns button:hover { background: #c8c8c8; }
.win-btns button.close { background: #d8d8d8; }
.win-btns button.close:hover, .win.active .win-btns button.close { background: var(--orange); }
.win.active .win-btns button.close svg { stroke: #fff; }
.win-btns svg { width: 14px; height: 14px; stroke: #333; stroke-width: 1.6; fill: none; }
.win-body { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.win-rs { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none; }
.ro-badge { font-size: 11px; background: #ddd; color: #555; padding: 2px 8px; border-radius: 999px; }

.av { width: 40px; height: 40px; border-radius: 14px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; font-size: 15px; }
.av.sm { width: 34px; height: 34px; border-radius: 12px; font-size: 13px; }
.av.grp { background: #e8e8e8; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; }
.av.grp .grp-i { border-radius: 6px; font-size: 10px; display: flex; align-items: center; justify-content: center; color: #fff; overflow: hidden; min-height: 0; }

/* 공용 다이얼로그 */
.dlg-back { position: absolute; inset: 0; background: #0005; display: flex; align-items: center; justify-content: center; z-index: 10; animation: fadeIn .12s; }
.dlg { background: #fff; border-radius: 14px; width: min(380px, 90%); box-shadow: 0 10px 40px #0005; overflow: hidden; text-align: center; }
.dlg h3 { margin: 22px 20px 6px; font-size: 16px; }
.dlg p { margin: 6px 22px; color: #555; line-height: 1.5; font-size: 13.5px; }
.dlg p.err { color: #c01c28; }
.dlg input { margin: 12px 22px 4px; width: calc(100% - 44px); padding: 9px 12px; border: 1px solid #ccc; border-radius: 8px; outline: none; }
.dlg input:focus { border-color: var(--orange); box-shadow: 0 0 0 2px #e9542033; }
.dlg-btns { display: flex; border-top: 1px solid #e3e3e3; margin-top: 18px; }
.dlg-btns button { flex: 1; border: 0; background: none; padding: 13px; }
.dlg-btns button + button { border-left: 1px solid #e3e3e3; }
.dlg-btns button:hover { background: #f3f3f3; }
.dlg-btns .sugg { color: var(--orange); font-weight: 700; }

/* ── 톡톡 ── */
.msg { display: flex; height: 100%; }
.msg-side { width: 290px; flex: none; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
.msg-side-h { padding: 14px 16px 8px; font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; align-items: baseline; }
.msg-me { font-size: 11px; font-weight: 400; color: #3ba55c; }
.msg-list { list-style: none; margin: 0; padding: 0 6px; overflow-y: auto; flex: 1; }
.msg-list li { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.msg-list li:hover { background: #f2f2f2; }
.msg-list li.on { background: #efefef; }
.msg-li-t { flex: 1; min-width: 0; }
.msg-li-t b { display: block; font-size: 14px; font-weight: 500; }
.msg-li-t b small { color: #999; font-weight: 400; }
.msg-li-t span { display: block; font-size: 12.5px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.msg-li-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.msg-li-r time { font-size: 11px; color: #aaa; }
.msg-li-r em { font-style: normal; background: #ff4d3d; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.msg-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #b2c7d9; }
.msg-empty { margin: auto; color: #5a6b7a; }
.msg-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: #a9bdce; }
.msg-head b { font-size: 15px; }
.msg-head small { display: block; color: #4a5a68; font-size: 11.5px; }
.msg-call { border: 0; background: #ffffffaa; border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.msg-call:hover { background: #fff; }
.msg-scroll { flex: 1; overflow-y: auto; padding: 10px 14px 16px; }
.msg-date { text-align: center; margin: 14px auto 10px; background: #0000001f; color: #fff; font-size: 12px; padding: 4px 12px; border-radius: 999px; width: fit-content; }
.msg-unread { text-align: center; margin: 12px 0; color: #3e5c77; font-size: 12px; border-top: 1px dashed #6d8aa3; padding-top: 6px; }
.msg-sys { text-align: center; margin: 10px auto; font-size: 12px; color: #fff; background: #00000026; width: fit-content; padding: 4px 12px; border-radius: 999px; }
.msg-row { display: flex; gap: 8px; margin: 4px 0; align-items: flex-start; }
.msg-row.mine { justify-content: flex-end; }
.av-sp { width: 34px; flex: none; }
.msg-col { max-width: 72%; }
.msg-name { font-size: 12px; color: #3d4c59; margin: 2px 0 4px; }
.msg-line { display: flex; align-items: flex-end; gap: 5px; }
.msg-row.mine .msg-line { flex-direction: row-reverse; }
.msg-line time { font-size: 10.5px; color: #4f6273; white-space: nowrap; }
.bub { background: #fff; padding: 8px 11px; border-radius: 4px 14px 14px 14px; line-height: 1.45; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.mine .bub { background: #fee500; border-radius: 14px 4px 14px 14px; }
.bub.del { color: #8a8a8a; font-style: italic; background: #ffffffc8; }
.mine .bub.del { background: #fff7a8; }
.bub.photo { padding: 0; border: 0; overflow: hidden; width: 220px; background: #000; }
.bub.photo svg { width: 100%; aspect-ratio: 4/3; }
.bub.typing { display: flex; gap: 4px; padding: 12px 14px; }
.bub.typing i { width: 6px; height: 6px; border-radius: 50%; background: #aaa; animation: dot 1s infinite; }
.bub.typing i:nth-child(2) { animation-delay: .15s; } .bub.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 30% { transform: translateY(-4px); background: #666; } }
.msg-input { display: flex; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid #ddd; }
.msg-input textarea { flex: 1; resize: none; border: 0; outline: none; padding: 8px; font-size: 14px; }
.msg-input button { border: 0; background: #fee500; border-radius: 8px; padding: 0 16px; font-weight: 700; }
.msg-ro { padding: 14px; text-align: center; background: #f5f5f5; color: #999; font-size: 13px; }

/* ── 통화 ── */
.incoming { position: fixed; top: 44px; right: 16px; z-index: 9000; display: flex; align-items: center; gap: 12px; background: #2b2b2bf5; color: #fff; padding: 14px 16px; border-radius: 20px; box-shadow: 0 10px 40px #000a; animation: drop .3s, ring 1.6s infinite .3s; width: min(360px, 92vw); }
@keyframes ring { 0%, 100% { transform: none; } 5% { transform: rotate(-1.5deg); } 10% { transform: rotate(1.5deg); } 15% { transform: none; } }
.inc-av, .call-av { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; color: #fff; flex: none; }
.inc-txt { flex: 1; } .inc-txt b { display: block; } .inc-txt span { font-size: 12.5px; color: #ccc; }
.incoming button { width: 44px; height: 44px; border-radius: 50%; border: 0; font-size: 18px; flex: none; }
.inc-no { background: #e5484d; color: #fff; } .inc-yes { background: #30a46c; }
.call { position: fixed; right: 20px; top: 50px; width: min(360px, 94vw); height: min(600px, calc(100% - 70px)); z-index: 9000; background: linear-gradient(180deg, #2a2d3a, #15161d); color: #fff; border-radius: 26px; box-shadow: 0 20px 60px #000c; display: flex; flex-direction: column; align-items: center; padding: 18px; animation: fadeUp .3s; }
.call.ending { opacity: 0; transform: scale(.96); transition: .3s; }
.call-top { width: 100%; display: flex; justify-content: space-between; font-size: 12.5px; color: #aab; }
.call-av { position: relative; width: 96px; height: 96px; border-radius: 34px; font-size: 36px; margin: 18px 0 10px; }
.call-wave { position: absolute; inset: -8px; border-radius: 40px; border: 3px solid #3ddc84; opacity: 0; }
.call.talking .call-wave { animation: wave 1s infinite; }
.call.listening .call-mic { background: #e5484d !important; animation: pulse 1s infinite; }
@keyframes wave { 0% { opacity: .9; transform: scale(.95); } 100% { opacity: 0; transform: scale(1.2); } }
.call-name { font-size: 20px; font-weight: 500; }
.call-log { flex: 1; width: 100%; overflow-y: auto; margin: 14px 0 8px; font-size: 13.5px; line-height: 1.5; display: flex; flex-direction: column; gap: 6px; }
.call-log p { margin: 0; padding: 7px 11px; border-radius: 12px; background: #ffffff14; }
.call-log p.me { background: #3b82f633; align-self: flex-end; max-width: 85%; }
.call-log p.them { max-width: 90%; }
.call-log p b { font-size: 11px; color: #aab; display: block; }
.call-log p.interim { opacity: .7; }
.call-input { display: flex; width: 100%; gap: 6px; }
.call-input input { flex: 1; background: #ffffff14; border: 0; border-radius: 999px; padding: 8px 14px; color: #fff; outline: none; font-size: 13px; }
.call-input button { border: 0; border-radius: 999px; background: #ffffff26; color: #fff; padding: 0 12px; font-size: 13px; }
.call-btns { display: flex; gap: 40px; margin-top: 14px; }
.call-btns button { width: 64px; height: 64px; border-radius: 50%; border: 0; font-size: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.call-btns button span { position: absolute; bottom: -20px; font-size: 11.5px; color: #aab; white-space: nowrap; }
.call-mic { background: #ffffff26; }
.call-mic:disabled { opacity: .3; }
.call-end { background: #e5484d; }
.call-end { transform: rotate(135deg); } .call-end span { transform: rotate(-135deg); bottom: auto; top: -22px; left: 34px; }

/* ── 메일 ── */
.mail { display: flex; height: 100%; }
.mail-f { width: 190px; flex: none; background: var(--side); border-right: 1px solid var(--line); padding: 8px; }
.mail-acc { font-weight: 700; padding: 8px 10px 10px; }
.mail-f button { display: flex; width: 100%; gap: 6px; border: 0; background: none; padding: 8px 10px; border-radius: 8px; text-align: left; align-items: center; }
.mail-f button:hover { background: #e6e6e6; }
.mail-f button.on { background: #e0e0e0; font-weight: 700; }
.mail-f em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--orange); font-weight: 700; }
.mail-l { width: 300px; flex: none; border-right: 1px solid var(--line); overflow-y: auto; background: #fff; }
.mail-item { padding: 10px 14px; border-bottom: 1px solid #eee; cursor: pointer; }
.mail-item:hover { background: #f7f7f7; }
.mail-item.on { background: #fde6dc; }
.mail-item.unread .mi-sub { font-weight: 700; }
.mail-item.unread .mi-top b::before { content: '● '; color: var(--orange); font-size: 10px; }
.mi-top { display: flex; justify-content: space-between; font-size: 13px; }
.mi-top b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-top time { color: #999; font-size: 12px; }
.mi-sub { font-size: 13.5px; margin: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-pre { font-size: 12px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-r { flex: 1; overflow-y: auto; padding: 22px 28px; background: #fff; min-width: 0; }
.mail-empty { color: #999; text-align: center; margin-top: 30%; }
.mail-r h2 { margin: 0 0 14px; font-size: 19px; }
.mr-meta { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid #eee; font-size: 13.5px; }
.mr-meta span, .mr-meta small { color: #888; }
.mr-del { margin-top: 12px; background: #fff3cd; border: 1px solid #f0d78a; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.mr-body { white-space: pre-wrap; line-height: 1.75; margin-top: 16px; font-size: 14.5px; }
.mr-body a { color: #1a73e8; cursor: pointer; text-decoration: underline; }
.mr-att { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.mr-att span { background: #f1f1f1; border: 1px solid #e0e0e0; padding: 6px 10px; border-radius: 8px; font-size: 13px; }

/* ── 브라우저 ── */
.br { display: flex; flex-direction: column; height: 100%; }
.br-bar { display: flex; gap: 4px; align-items: center; padding: 6px 8px; background: #f0f0f0; border-bottom: 1px solid var(--line); }
.br-bar > button { width: 32px; height: 32px; border: 0; background: none; border-radius: 50%; font-size: 16px; }
.br-bar > button:hover { background: #e0e0e0; }
.br-url { flex: 1; display: flex; align-items: center; background: #fff; border-radius: 999px; padding: 0 14px; height: 34px; border: 1px solid #e0e0e0; }
.br-url:focus-within { border-color: var(--orange); }
.br-lock { font-size: 11px; margin-right: 6px; }
.br-url input { flex: 1; border: 0; outline: none; font-size: 13.5px; }
.br-bm { display: flex; gap: 2px; padding: 3px 8px; background: #f7f7f7; border-bottom: 1px solid var(--line); overflow-x: auto; }
.br-bm button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; font-size: 12.5px; white-space: nowrap; }
.br-bm button:hover { background: #e7e7e7; }
.br-page { flex: 1; overflow-y: auto; background: #fff; }
.wp { font-family: 'Pretendard', sans-serif; color: #222; }
.wp a, .wp [data-href] { cursor: pointer; }
.fd-home { display: flex; flex-direction: column; align-items: center; padding-top: 12%; }
.fd-logo { font-size: 52px; font-weight: 800; letter-spacing: -2px; background: linear-gradient(90deg, #03c75a, #1a73e8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fd-logo.sm { font-size: 24px; letter-spacing: -1px; margin-right: 8px; }
.fd-form { display: flex; margin-top: 20px; width: min(560px, 90%); border: 2px solid #03c75a; border-radius: 999px; overflow: hidden; }
.fd-form input { flex: 1; border: 0; outline: none; padding: 12px 20px; font-size: 16px; }
.fd-form button { border: 0; background: #03c75a; color: #fff; padding: 0 22px; font-weight: 700; }
.fd-hint { margin-top: 20px; font-size: 13px; color: #777; }
.fd-hint a { color: #1a0dab; }
.fd-res { padding: 16px 28px; max-width: 760px; }
.fd-top { margin: 0 0 8px; align-items: center; width: 100%; border-width: 0 0 2px; border-radius: 0; }
.fd-count { font-size: 12.5px; color: #888; }
.fd-item { margin: 18px 0; }
.fd-item cite { font-style: normal; font-size: 12.5px; color: #1e8e3e; display: block; }
.fd-item a { font-size: 18px; color: #1a0dab; }
.fd-item a:hover { text-decoration: underline; }
.fd-item p { margin: 4px 0; color: #555; font-size: 13.5px; line-height: 1.5; }
.fd-none { color: #666; line-height: 1.7; margin-top: 30px; }
.hist { padding: 20px 32px; max-width: 800px; }
.hist h3 { font-size: 13px; color: #666; margin: 22px 0 6px; border-bottom: 1px solid #eee; padding-bottom: 6px; }
.hi { display: flex; gap: 14px; align-items: baseline; padding: 6px 0; font-size: 14px; }
.hi time { color: #888; width: 44px; flex: none; font-variant-numeric: tabular-nums; }
.hi a { color: #1a0dab; }
.hi cite { font-style: normal; color: #aaa; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg { max-width: 620px; margin: 0 auto; padding-bottom: 40px; }
.pg-top { position: sticky; top: 0; background: #fff; border-bottom: 1px solid #eee; padding: 12px 16px; z-index: 1; }
.pg-logo { font-family: 'Nanum Pen Script', cursive; font-size: 30px; font-weight: 400; }
.pg-prof { display: flex; gap: 24px; padding: 24px 16px; border-bottom: 1px solid #eee; align-items: center; }
.pg-prof h2 { margin: 0 0 6px; font-size: 20px; font-weight: 400; }
.pg-prof p { margin: 4px 0; font-size: 14px; line-height: 1.5; }
.pg-av { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.pg-av.big { width: 88px; height: 88px; font-size: 30px; }
.pg-post { border-bottom: 1px solid #eee; margin-top: 16px; }
.pg-ph svg, .pg-ph > div { width: 100%; aspect-ratio: 4/3; }
.pg-ph > div svg { width: 100%; height: 100%; }
.pg-meta { padding: 10px 16px; font-size: 14px; }
.pg-meta p { margin: 6px 0; line-height: 1.5; }
.pg-meta time { color: #999; font-size: 11.5px; }
.pg-c b { cursor: pointer; }
.pg-home { padding: 16px; } .pg-home p { color: #888; }
.pg-acc { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.pg-acc small { color: #888; }
.pg-none { text-align: center; padding: 60px; }
.hb { font-family: 'Pretendard', serif; }
.hb-nav { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px; border-bottom: 1px solid #eee; }
.hb-nav b { font-size: 18px; letter-spacing: -.5px; }
.hb-nav nav a { margin-left: 20px; color: #444; font-size: 14px; }
.hb-hero { padding: 90px 28px; text-align: center; background: linear-gradient(135deg, #3b2a6b, #f08a5d); color: #fff; }
.hb-hero h1 { font-size: 34px; margin: 0; }
.hb-btn { display: inline-block; margin-top: 22px; background: #fff; color: #3b2a6b; padding: 10px 22px; border-radius: 999px; font-weight: 700; }
.hb-h { padding: 20px 28px 0; font-size: 22px; }
.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; padding: 16px 28px 30px; }
.hb-card { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.hb-card svg, .hb-ph { width: 100%; aspect-ratio: 4/3; border-radius: 6px; }
.hb-card.big { grid-column: 1 / -1; }
.hb-card small { color: #888; }
.hb-art svg { width: 100%; max-height: 420px; }
.hb-info { padding: 22px 28px 40px; max-width: 720px; line-height: 1.7; }
.hb-badge { background: #f9c46b; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.hb-info h1 { margin: 10px 0 0; }
.hb-by { color: #777; margin: 4px 0 14px; }
.hb-info h3 { font-size: 15px; margin: 20px 0 4px; }
.hb-prize { background: #f7f3ea; padding: 10px 14px; border-radius: 8px; }
.hb-tb { width: calc(100% - 56px); margin: 14px 28px; border-collapse: collapse; font-size: 14px; }
.hb-tb th { text-align: left; border-bottom: 2px solid #333; padding: 8px; }
.hb-tb td { border-bottom: 1px solid #eee; padding: 10px 8px; vertical-align: top; }
.hb-tb td p { color: #555; margin: 6px 0 0; line-height: 1.6; }
.hb-tb td:last-child { white-space: nowrap; color: #888; }
.nw-nav { display: flex; gap: 16px; align-items: baseline; padding: 14px 28px; border-bottom: 3px solid #d2232a; }
.nw-nav b { color: #d2232a; font-size: 24px; font-weight: 900; letter-spacing: -1px; }
.nw-nav span { color: #888; font-size: 13px; }
.nw article { max-width: 700px; padding: 22px 28px 50px; }
.nw article h1 { font-size: 25px; line-height: 1.4; margin: 0 0 10px; }
.nw-d { color: #888; font-size: 13px; border-bottom: 1px solid #eee; padding-bottom: 14px; }
.nw article p { line-height: 1.85; font-size: 15.5px; }
.nw-img svg { width: 100%; }
.nw-list { list-style: none; padding: 10px 28px; max-width: 760px; margin: 0; }
.nw-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #eee; font-size: 16px; }
.nw-list a:hover { text-decoration: underline; }
.nw-list time { color: #999; font-size: 13px; }
.wiki, .help { max-width: 720px; padding: 24px 32px; line-height: 1.8; }
.wk-s { color: #888; margin-top: -10px; }
.help li { margin: 8px 0; }
.err { text-align: center; padding-top: 12%; color: #555; }
.err-ico { font-size: 60px; }
.err a { color: #1a73e8; }
.oh header { display: flex; justify-content: space-between; padding: 22px 32px; }
.oh header b { letter-spacing: 4px; }
.oh-hero { padding: 80px 32px; background: #f6efe6; font-size: 26px; line-height: 1.6; font-weight: 300; }
.oh-team { display: flex; gap: 40px; padding: 36px 32px; flex-wrap: wrap; }
.oh-team div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.oh-team span { width: 70px; height: 70px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.oh-team small { color: #888; } .oh-team em { font-style: normal; color: #555; }
.oh-addr { padding: 0 32px 40px; color: #999; font-size: 13px; }

/* ── 파일 ── */
.fx { display: flex; height: 100%; }
.fx-side { width: 190px; flex: none; background: var(--side); border-right: 1px solid var(--line); padding: 8px; overflow-y: auto; }
.fx-side button { display: flex; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 8px; text-align: left; align-items: center; }
.fx-side button:hover { background: #e6e6e6; }
.fx-side button.on { background: #e0e0e0; font-weight: 700; }
.fx-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.fx-path { display: flex; align-items: center; gap: 2px; padding: 8px 12px; border-bottom: 1px solid #eee; overflow-x: auto; white-space: nowrap; }
.fx-path button { border: 0; background: none; padding: 4px 8px; border-radius: 6px; font-size: 13.5px; }
.fx-path button:hover { background: #eee; }
.fx-path span { color: #bbb; }
.fx-grid { flex: 1; overflow-y: auto; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, 106px); grid-auto-rows: min-content; gap: 6px; outline: none; }
.fx-it { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 10px; cursor: default; user-select: none; }
.fx-it:hover { background: #f2f2f2; }
.fx-it.on { background: #fde6dc; }
.fx-it span { font-size: 12.5px; text-align: center; word-break: break-all; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fx-ic { font-size: 44px; line-height: 1; position: relative; }
.fx-ic i { position: absolute; right: -6px; bottom: -2px; font-size: 16px; font-style: normal; }
.fx-empty { grid-column: 1 / -1; text-align: center; color: #aaa; margin-top: 60px; }
.fx-info { width: 240px; flex: none; border-left: 1px solid var(--line); background: #fafafa; padding: 18px; overflow-y: auto; font-size: 13px; }
.fx-info-e { color: #aaa; text-align: center; margin-top: 50%; line-height: 1.6; }
.fx-info-ic { font-size: 56px; text-align: center; }
.fx-info h4 { text-align: center; margin: 8px 0 2px; word-break: break-all; }
.fx-kind { text-align: center; color: #888; margin: 0 0 14px; }
.fx-info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; }
.fx-info dt { color: #888; white-space: nowrap; }
.fx-info dd { margin: 0; word-break: break-all; }
.fx-info dd.hl { color: #c01c28; font-weight: 700; }
.fx-acts { display: flex; gap: 6px; margin-top: 18px; }
.fx-acts button { flex: 1; border: 1px solid #ddd; background: #fff; border-radius: 8px; padding: 7px; }
.fx-acts button:hover { background: #f0f0f0; }

/* ── 텍스트 편집기 ── */
.app-viewer .win-body { display: flex; flex-direction: column; }
.tv { flex: 1; display: flex; overflow: auto; background: #fff; }
.tv-g { padding: 12px 8px; color: #bbb; text-align: right; font: 13px/1.6 var(--mono); background: #f7f7f7; user-select: none; flex: none; }
.tv-t { margin: 0; padding: 12px 16px; font: 14px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; flex: 1; }
.tv-f { display: flex; justify-content: space-between; padding: 5px 12px; font-size: 12px; color: #888; border-top: 1px solid #eee; background: #fafafa; }

/* ── 사진 ── */
.ph { display: flex; height: 100%; }
.ph-side { width: 170px; flex: none; background: var(--side); border-right: 1px solid var(--line); padding: 10px; }
.ph-side h5 { margin: 4px 8px 8px; color: #888; font-size: 12px; }
.ph-side button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; }
.ph-side button:hover { background: #e6e6e6; }
.ph-side button.on { background: #e0e0e0; font-weight: 700; }
.ph-main { flex: 1; min-width: 0; overflow-y: auto; background: #fff; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; padding: 14px; }
.ph-th { border: 0; padding: 0; background: none; text-align: left; border-radius: 8px; overflow: hidden; }
.ph-th svg, .ph-th > div { width: 100%; aspect-ratio: 4/3; border-radius: 8px; }
.ph-th:hover svg { filter: brightness(1.08); }
.ph-th span { display: block; font-size: 12px; color: #666; padding: 4px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-view { display: grid; grid-template-rows: auto 1fr; grid-template-columns: 1fr; height: 100%; background: #1a1a1a; color: #fff; }
.ph-view.with-info { grid-template-columns: 1fr 250px; }
.ph-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #242424; }
.ph-bar span { flex: 1; text-align: center; font-size: 13.5px; }
.ph-bar button { border: 0; background: #ffffff1a; color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 13px; }
.ph-bar button.on { background: var(--orange); }
.ph-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 14px; gap: 8px; }
.ph-img { flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; min-width: 0; }
.ph-img svg { max-width: 100%; max-height: 100%; width: 100%; aspect-ratio: 4/3; }
.ph-img .art-compare { max-width: 100%; }
.ph-nav { border: 0; background: #ffffff14; color: #fff; width: 36px; height: 60px; border-radius: 8px; font-size: 24px; flex: none; }
.ph-info { background: #242424; padding: 16px; font-size: 13px; overflow-y: auto; }
.ph-info h4 { margin: 0 0 12px; }
.ph-info dl { margin: 0; }
.ph-info dt { color: #999; font-size: 12px; margin-top: 12px; }
.ph-info dd { margin: 3px 0 0; }
.art-compare { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; background: #fff; padding: 30px 8px 8px; }
.art-compare svg { width: 100%; aspect-ratio: 4/3; }
.art-cmp-l { font-size: 12px; color: #333; text-align: center; margin-bottom: 4px; font-weight: 700; }
.art-compare .art-cmp-marks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; aspect-ratio: auto; }

/* ── 메모 ── */
.memo { display: flex; height: 100%; }
.memo ul { list-style: none; margin: 0; padding: 8px; width: 250px; flex: none; background: #fbf7e6; border-right: 1px solid #eadfb2; overflow-y: auto; }
.memo li { padding: 10px 12px; border-radius: 10px; cursor: pointer; margin-bottom: 4px; }
.memo li:hover { background: #f4ecc9; }
.memo li.on { background: #f7e59a; }
.memo li b { display: block; font-size: 14px; }
.memo li small { color: #9a8a4a; font-size: 11.5px; }
.memo li span { display: block; font-size: 12px; color: #8a7d55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.memo article { flex: 1; padding: 22px 28px; overflow-y: auto; background: #fffdf3; }
.memo article time { color: #aaa; font-size: 12px; }
.memo article h2 { margin: 6px 0 16px; }
.memo article pre { font: 15px/1.8 var(--font); white-space: pre-wrap; margin: 0; }

/* ── 캘린더 ── */
.cal { display: flex; flex-direction: column; height: 100%; background: #fff; }
.cal header { display: flex; align-items: center; gap: 4px; padding: 10px 14px; border-bottom: 1px solid #eee; }
.cal header h2 { font-size: 18px; margin: 0 0 0 10px; flex: 1; }
.cal header button { border: 1px solid #ddd; background: #fff; border-radius: 8px; padding: 4px 12px; }
.cal-w { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 12px; color: #888; text-align: center; padding: 6px 0; border-bottom: 1px solid #eee; }
.cal-w div:first-child { color: #d33; }
.cal-g { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(70px, 1fr); overflow-y: auto; }
.cal-c { border-right: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; padding: 4px; overflow: hidden; min-width: 0; }
.cal-c.off { background: #fafafa; }
.cal-d { font-size: 12px; color: #555; display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; }
.cal-c.today .cal-d { background: var(--orange); color: #fff; font-weight: 700; }
.cal-e { font-size: 11px; background: color-mix(in srgb, var(--c) 18%, white); border-left: 3px solid var(--c); padding: 2px 4px; border-radius: 3px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 홈키퍼 ── */
.hk { display: flex; flex-direction: column; height: 100%; background: #f4f7f5; }
.hk-h { display: flex; justify-content: space-between; padding: 14px 18px; background: #17996a; color: #fff; }
.hk-h span { font-size: 12px; opacity: .9; }
.hk-tabs { display: flex; background: #fff; border-bottom: 1px solid #e3e3e3; }
.hk-tabs button { flex: 1; border: 0; background: none; padding: 12px; border-bottom: 3px solid transparent; color: #666; }
.hk-tabs button.on { border-color: #17996a; color: #17996a; font-weight: 700; }
.hk-body { flex: 1; overflow-y: auto; padding: 6px 14px 20px; }
.hk-body h4 { font-size: 12.5px; color: #777; margin: 16px 4px 6px; }
.hk-row { display: flex; gap: 12px; align-items: center; background: #fff; padding: 10px 12px; border-radius: 10px; margin-bottom: 4px; font-size: 14px; }
.hk-row time { font-weight: 700; font-variant-numeric: tabular-nums; width: 44px; }
.hk-row.t-guest2 { background: #fff4e5; }
.hk-row.t-guest1 { background: #eef6ff; }
.hk-note { font-size: 12.5px; color: #777; line-height: 1.5; margin: 12px 4px; }
.hk-card { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 8px; }
.hk-card > div:nth-child(2) { flex: 1; }
.hk-card dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12.5px; margin: 6px 0 0; color: #555; }
.hk-card dt { color: #999; } .hk-card dd { margin: 0; }
.hk-card.add { justify-content: center; color: #17996a; border: 1px dashed #17996a; background: none; }
.hk-card.add small { color: #999; }
.hk-no { width: 44px; height: 44px; border-radius: 12px; background: #17996a; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 16px; flex: none; }
.hk-pw { color: #bbb; letter-spacing: 2px; }
.hk-dev { text-align: center; padding: 26px; }
.hk-lock { font-size: 56px; }
.hk-dev p { color: #777; font-size: 13px; }

/* ── 터미널 ── */
.term { height: 100%; background: #300a24; color: #eee; font: 14.5px/1.45 var(--mono); padding: 8px 10px; overflow-y: auto; }
.term-out div { white-space: pre-wrap; word-break: break-word; }
.term-in { display: flex; gap: 6px; }
.term-in input { flex: 1; background: none; border: 0; outline: none; color: #eee; font: inherit; padding: 0; caret-color: #eee; }
.c-g { color: #8ae234; font-weight: 700; } .c-b { color: #729fcf; font-weight: 700; } .c-r { color: #ef2929; font-weight: 700; } .c-o { color: #e95420; }
.app-term .win-head { background: #2b2b2b; color: #eee; border-color: #1a1a1a; }
.app-term:not(.active) .win-head { background: #333; color: #999; }

/* ── 음성 녹음 ── */
.rec, .rec-empty { height: 100%; display: flex; flex-direction: column; align-items: center; padding: 24px; background: #fff; }
.rec-empty { justify-content: center; font-size: 50px; color: #bbb; }
.rec-empty p { font-size: 16px; color: #666; margin: 8px 0 0; } .rec-empty small { font-size: 12.5px; }
.rec h3 { margin: 0; } .rec > p { margin: 4px 0 18px; font-size: 13px; }
.rec-wave { display: flex; gap: 2px; align-items: center; height: 70px; width: 100%; }
.rec-wave i { flex: 1; height: var(--h); background: #ddd; border-radius: 2px; }
.rec-wave i.done { background: #e2445c; }
.rec.playing .rec-wave i.done:last-of-type { animation: pulse .5s infinite; }
.rec-time { display: flex; justify-content: space-between; width: 100%; font-size: 12px; color: #888; margin: 6px 0 14px; }
.rec-play { border: 0; background: #e2445c; color: #fff; border-radius: 999px; padding: 10px 26px; font-weight: 700; }
.rec-subs { flex: 1; width: 100%; overflow-y: auto; margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.rec-subs p { margin: 0; padding: 8px 12px; border-radius: 10px; background: #f5f5f5; font-size: 14px; line-height: 1.5; animation: fadeUp .3s; }
.rec-subs p b { font-size: 12px; margin-right: 6px; }
.rec-subs p.sy b { color: #e0822a; } .rec-subs p.cr b { color: #8a5cc2; }
.rec-subs p.note { background: none; color: #999; text-align: center; font-size: 12.5px; }

/* ── 수사 노트 ── */
.cb { display: flex; flex-direction: column; height: 100%; background: #f6f1e7; }
.cb-tabs { display: flex; gap: 4px; padding: 8px 10px; background: #efe7d6; border-bottom: 1px solid #e0d4bb; }
.cb-tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; }
.cb-tabs button.on { background: var(--purple); color: #fff; }
.cb-body { flex: 1; overflow-y: auto; padding: 16px 20px 30px; }
.cb-prog { margin-bottom: 14px; } .cb-prog .bar { height: 8px; background: #e6dcc6; border-radius: 99px; margin-top: 6px; overflow: hidden; }
.cb-prog .bar i { display: block; height: 100%; background: var(--purple); border-radius: 99px; transition: width .4s; }
.cb-g h3 { font-size: 15px; margin: 18px 0 8px; display: flex; justify-content: space-between; }
.cb-g h3 small { color: #9a8c6e; font-weight: 400; }
.cb-c { background: #fffdf7; border: 1px solid #eadfc6; border-left: 4px solid var(--purple); border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; }
.cb-c b { font-size: 14px; } .cb-c p { margin: 4px 0 0; font-size: 13px; color: #5d5445; line-height: 1.55; }
.cb-none { color: #aa9f86; font-size: 13px; margin: 0 0 6px; }
.cb-notes { width: 100%; height: 100%; min-height: 360px; border: 1px solid #e0d4bb; border-radius: 10px; padding: 14px; background: #fffdf7 repeating-linear-gradient(#fffdf7 0 27px, #efe6d2 27px 28px); font: 15px/28px var(--font); resize: none; outline: none; }
.cb-rep fieldset { border: 1px solid #e0d4bb; background: #fffdf7; border-radius: 10px; margin: 0 0 12px; padding: 10px 14px 12px; }
.cb-rep legend { font-weight: 700; padding: 0 6px; }
.cb-rep label { display: block; padding: 5px 4px; font-size: 14px; cursor: pointer; border-radius: 6px; }
.cb-rep label:hover { background: #f3ecdc; }
.cb-intro { font-size: 13.5px; color: #6d6452; }
.cb-submit { width: 100%; border: 0; background: var(--purple); color: #fff; padding: 13px; border-radius: 10px; font-weight: 700; font-size: 15px; }
.cb-submit:hover { background: #8e2a85; }

/* ── 엔딩 ── */
.ending { position: fixed; inset: 0; z-index: 10000; background: #000; color: #eee; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadeIn 1.4s; overflow-y: auto; }
.end-in { max-width: 600px; }
.end-k { letter-spacing: 4px; font-size: 13px; color: var(--orange); }
.ending.true .end-k { color: #f9c46b; }
.end-score { color: #888; font-size: 13px; }
.ending pre { font: 300 16.5px/2 var(--font); white-space: pre-wrap; animation: fadeUp 2s .5s both; }
.end-btns { display: flex; gap: 10px; margin-top: 28px; }
.end-btns button { border: 1px solid #fff5; background: none; color: #fff; padding: 10px 20px; border-radius: 999px; }
.end-btns button:hover { background: #fff2; }

/* ── 좁은 화면 ── */
@media (max-width: 700px) {
  .dock { width: 52px; } .dock button { width: 46px; height: 46px; } .dock .app-ico { width: 36px; height: 36px; }
  #workspace, .overview { left: 52px; }
  .tb-clock { font-size: 12px; }
  .msg-side { width: 42%; } .mail-f { display: none; } .mail-l { width: 40%; } .fx-info { display: none; } .fx-side { width: 54px; } .fx-side span { display: none; }
  .ph-side { display: none; } .ph-view.with-info { grid-template-columns: 1fr; } .ph-info { max-height: 40%; }
  .memo ul { width: 38%; }
  .desk-icons { top: auto; bottom: 10px; flex-direction: row; }
}

input.pw { -webkit-text-security: disc; text-security: disc; }
input.pw::placeholder { -webkit-text-security: none; }

/* ── Grok 생성 사진 ── */
.art-img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; }
.lock-bg .art-img, .desk-bg .art-img { position: absolute; inset: 0; }
.bub.photo .art-img, .ph-th .art-img, .pg-ph .art-img, .polaroid .art-img, .hb-card .art-img, .art-compare .art-img, .nw-img .art-img { height: auto; aspect-ratio: 4/3; }
.hb-art .art-img { height: auto; max-height: 520px; object-fit: contain; background: #111; }
.ph-img .art-img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.ph-th .art-img { border-radius: 8px; }
.art-crop { width: 100%; height: 100%; overflow: hidden; aspect-ratio: 4/3; }
.art-crop .art-img { transform: scale(2.4); transform-origin: 92% 92%; }

/* 프로필 사진 */
.has-img { overflow: hidden; padding: 0; background: #ccc; }
.has-img > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.grp { grid-template-rows: 1fr; gap: 1px; padding: 0; overflow: hidden; }
.av.grp .grp-i { border-radius: 0; }
.call-av.has-img { overflow: visible; }
.call-av.has-img > img { border-radius: 34px; }

.pg-ph-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; }
.pg-av.sm { width: 32px; height: 32px; font-size: 13px; }
.pg-av.xs { width: 22px; height: 22px; font-size: 10px; flex: none; margin: 1px 8px 0 0; }
.pg-av { border-radius: 50%; }
.pg-c { display: flex; gap: 8px; align-items: flex-start; }

.di .app-ico { margin: 0 auto; filter: drop-shadow(0 1px 3px #0008); }
.di-rep { filter: drop-shadow(0 1px 3px #0008); }
.cb-cta { display: block; width: 100%; text-align: left; border: 0; background: var(--purple); color: #fff; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.cb-cta:hover { background: #8e2a85; }

.call.rt .call-mic { background: #ffffff26; }
.call.muted .call-mic { background: #e5484d; }
.call.rt.listening .call-mic { animation: none; background: #3ddc8466 !important; }

/* ═════════════════════════════════════════════
   모바일 레이아웃 (html.m) — 데스크톱에는 적용되지 않음
   ═════════════════════════════════════════════ */
.m-home, .m-nav, .m-sw, .win-back { display: none; }
html.m #root { height: 100dvh; }
html.m input, html.m textarea { font-size: 16px; }
.m .topbar { height: 28px; font-size: 12.5px; padding: 0 10px; }
.m .tb-act { display: none; }
.m .tb-clock { position: static; transform: none; padding-left: 0; }
.m .dock, .m .desk-icons, .m .overview { display: none !important; }
.m #workspace { top: 28px; left: 0; bottom: calc(52px + env(safe-area-inset-bottom)); }
.m .m-home { display: grid; position: absolute; inset: 0; overflow-y: auto; padding: 28px 14px; grid-template-columns: repeat(4, 1fr); gap: 22px 6px; align-content: start; }
.m .m-home button { background: none; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; text-shadow: 0 1px 3px #000, 0 0 8px #0009; padding: 0; }
.m .m-home span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m .m-home .em { font-style: normal; font-size: 32px; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: #ffffff33; backdrop-filter: blur(6px); border-radius: 14px; text-shadow: none; }
.m .m-nav { display: flex; position: absolute; left: 0; right: 0; bottom: 0; height: calc(52px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #000; justify-content: space-around; align-items: center; z-index: 8000; }
.m .m-nav button { background: none; border: 0; color: #eee; font-size: 20px; width: 72px; height: 44px; border-radius: 12px; }
.m .m-nav button:active { background: #ffffff22; }
.m .m-sw { display: block; position: absolute; left: 10px; right: 10px; bottom: calc(60px + env(safe-area-inset-bottom)); max-height: 60%; overflow-y: auto; background: #2b2b2bf5; color: #fff; border-radius: 18px; padding: 12px; z-index: 8100; box-shadow: 0 10px 40px #000a; }
.m .m-sw h4 { margin: 4px 6px 10px; }
.m .m-sw button { display: flex; align-items: center; gap: 12px; width: 100%; background: #ffffff14; border: 0; color: #fff; border-radius: 12px; padding: 8px 10px; margin-bottom: 6px; text-align: left; }
.m .m-sw button span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m .m-sw i { font-style: normal; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #ffffff1f; }
.m .m-sw p { color: #aaa; margin: 6px; }

/* 창 = 전체 화면 앱 */
.m .win { border-radius: 0; outline: 0; box-shadow: none; animation: mIn .18s ease; }
@keyframes mIn { from { opacity: 0; transform: translateX(16px); } }
.m .win-btns, .m .win-rs { display: none; }
.m .win-back { display: flex; flex: none; width: 40px; height: 40px; border: 0; background: none; font-size: 30px; line-height: 1; align-items: center; justify-content: center; margin-left: -6px; border-radius: 50%; color: inherit; }
.m .win-back:active { background: #0001; }
.m .win-head { height: 50px; padding: 0 8px; }
.m .win-title { text-align: left; font-size: 15px; }
.m .app-term .win-back { color: #eee; }

/* 톡톡: 목록 → 대화 */
.m .msg-side { width: 100% !important; border: 0; }
.m .msg.detail .msg-side { display: none; }
.m .msg:not(.detail) .msg-main { display: none; }
.m .msg-col { max-width: 80%; }
.m .bub.photo { width: 200px; }
.m .msg-head { padding: 8px 12px; }

/* 메일: 폴더 탭 + 목록 → 본문 */
.m .mail { flex-direction: column; }
.m .mail-f { display: flex !important; width: auto; flex: none; overflow-x: auto; padding: 6px; border-right: 0; border-bottom: 1px solid var(--line); gap: 4px; }
.m .mail-acc { display: none; }
.m .mail-f button { width: auto; white-space: nowrap; flex: none; }
.m .mail-l { width: 100% !important; flex: 1; border-right: 0; }
.m .mail.detail .mail-l, .m .mail.detail .mail-f { display: none !important; }
.m .mail:not(.detail) .mail-r { display: none; }
.m .mail-r { padding: 16px; }

/* 파일: 위치 칩 + 격자, 파일은 아래 시트로 속성 */
.m .fx { flex-direction: column; position: relative; }
.m .fx-side { width: auto !important; flex: none; display: flex; overflow-x: auto; padding: 6px; border-right: 0; border-bottom: 1px solid var(--line); gap: 4px; }
.m .fx-side button { width: auto; flex: none; white-space: nowrap; padding: 6px 10px; }
.m .fx-side span { display: inline !important; }
.m .fx-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.m .fx-info { display: none !important; }
.m .fx.sheet .fx-info { display: block !important; position: absolute; left: 0; right: 0; bottom: 0; width: auto; max-height: 72%; border: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px #0005; z-index: 5; animation: sheetUp .2s ease; }
@keyframes sheetUp { from { transform: translateY(40%); opacity: 0; } }
.m .fx-acts button { padding: 11px; }

/* 사진: 앨범 칩 + 2열 격자, 정보는 사진 아래 */
.m .ph { flex-direction: column; }
.m .ph-side { display: flex !important; width: auto; flex: none; overflow-x: auto; padding: 6px; border-right: 0; border-bottom: 1px solid var(--line); gap: 4px; }
.m .ph-side h5 { display: none; }
.m .ph-side button { width: auto; flex: none; white-space: nowrap; }
.m .ph-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 8px; }
.m .ph-view { display: flex; flex-direction: column; overflow-y: auto; }
.m .ph-stage { padding: 8px 0; min-height: 0; }
.m .ph-nav { display: none; }
.m .ph-img .art-img { max-height: none; width: 100%; }
.m .ph-info { max-height: none; }

/* 메모: 목록 → 본문 */
.m .memo ul { width: 100% !important; border: 0; }
.m .memo.detail ul { display: none; }
.m .memo:not(.detail) article { display: none; }
.m .memo article { padding: 18px; }

/* 기타 앱 */
.m .cal header h2 { font-size: 16px; }
.m .cal-g { grid-auto-rows: minmax(58px, 1fr); }
.m .cal-e { font-size: 9.5px; padding: 1px 2px; }
.m .br-bar { padding: 4px 6px; }
.m .br-bar > button[data-n="fwd"], .m .br-bar > button[data-n="home"] { display: none; }
.m .fd-res, .m .hist, .m .wiki, .m .help { padding: 14px 16px; }
.m .nw article, .m .hb-info { padding: 16px; }
.m .hb-tb { width: calc(100% - 24px); margin: 12px; }
.m .pg-prof { gap: 14px; }
.m .pg-av.big { width: 72px; height: 72px; }
.m .cb-body { padding: 12px 14px 24px; }
.m .term { font-size: 13px; }
.m .tv-g { display: none; }

/* 통화·알림 */
.m .call { left: 0; right: 0; top: 0; bottom: 0; width: 100%; height: 100%; border-radius: 0; padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
.m .incoming { left: 8px; right: 8px; top: 34px; width: auto; }
.m .notifs { top: 34px; }
.m .clue-toast { bottom: calc(64px + env(safe-area-inset-bottom)); }
.m .sysmenu { left: 8px; right: 8px; width: auto; top: 32px; }

/* ── 진엔딩 영상 ── */
/* 영상 첫 프레임 = 창·알림·상단바 글자를 뺀 데스크톱 (아이콘·독·상단바 막대는 그대로) */
.desk.film-prep .win, .desk.film-prep .notifs, .desk.film-prep .tb-act, .desk.film-prep .tb-clock, .desk.film-prep .tb-tray { opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.film { position: fixed; inset: 0; z-index: 9900; background: #000; opacity: 0; }
.film.in { opacity: 1; }
.film video { position: absolute; display: block; transition: opacity 1.2s ease; }
.film.out video { opacity: 0; }
.film-skip { position: fixed; z-index: 9999; right: 18px; bottom: 18px; background: #0006; color: #ddd; border: 1px solid #fff3; border-radius: 999px; padding: 7px 16px; font-size: 13px; opacity: .7; }
.film-skip:hover { opacity: 1; }

/* 다음 시리즈 알림 신청 */
.end-sub { margin-top: 30px; padding: 18px 20px; border: 1px solid #ffffff2a; border-radius: 14px; background: #ffffff0d; animation: fadeUp 1.5s 1.2s both; }
.end-sub-t { margin: 0 0 12px; font-size: 15px; color: #f2e9dc; }
.end-sub form { display: flex; gap: 8px; }
.end-sub input { flex: 1; min-width: 0; background: #000a; border: 1px solid #ffffff40; color: #fff; border-radius: 999px; padding: 10px 16px; outline: none; font-size: 15px; }
.end-sub input:focus { border-color: var(--orange); }
.end-sub button { border: 0; background: var(--orange); color: #fff; border-radius: 999px; padding: 0 20px; font-weight: 700; white-space: nowrap; }
.end-sub button:disabled { opacity: .6; }
.end-sub-n { margin: 10px 4px 0; font-size: 11.5px; color: #8a8a96; line-height: 1.5; }
.end-sub.done p { margin: 0; color: #f2e9dc; }
.demo-go { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); z-index: 9800; background: var(--purple); color: #fff; border: 0; border-radius: 999px; padding: 14px 26px; font-size: 16px; box-shadow: 0 8px 30px #0008; }

.end-primary { background: #f2e9dc !important; color: #111 !important; border-color: #f2e9dc !important; font-weight: 700; padding: 11px 26px !important; }
.end-primary:hover { background: #fff !important; }
.finale .end-in { text-align: center; max-width: 520px; width: 100%; }
.finale .end-title { font: 400 44px/1.2 'Nanum Myeongjo', 'AppleMyungjo', serif; color: #f5f0e8; margin: 18px 0 6px; letter-spacing: 2px; animation: fadeUp 2s .3s both; }
.end-fin { color: #8a8a96; letter-spacing: 6px; margin: 0 0 10px; animation: fadeUp 2s .8s both; }
.finale .end-sub { text-align: left; }
.finale .end-btns { justify-content: center; }
