:root {
  --bg: #ffffff; --card: #ffffff; --ink: #2b2112; --muted: #7a6a52; --line: #efe3cf;
  --mango: #ff9f1c; --mango-ink: #4a2c00; --leaf: #2e7d32; --warn: #c62828; --soft: #fff1da;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", Roboto, sans-serif; }
main { max-width: 560px; margin: 0 auto; padding: 16px 16px 96px; }
h1 { font-size: 22px; margin: 4px 0 16px; display: flex; align-items: center; gap: 8px; }
h1 .back { font-size: 22px; padding: 0 8px 0 0; }
h2 { font-size: 15px; color: var(--muted); margin: 22px 0 8px; font-weight: 600; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.btn { background: var(--mango); color: var(--mango-ink); font-weight: 700; padding: 13px 18px;
  border-radius: 12px; width: 100%; margin-top: 10px; }
.btn.ghost { background: var(--soft); color: var(--ink); font-weight: 600; }
.btn.danger { background: transparent; color: var(--warn); }
.btn.small { width: auto; padding: 8px 12px; margin: 0; font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; }
.mango { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.mango .wake { font-size: 40px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.mango.off .wake, .mango.off .meta { opacity: .45; }
.meta { color: var(--muted); font-size: 14px; }
.tag { display: inline-block; background: var(--soft); border-radius: 999px; padding: 2px 10px; font-size: 13px; margin-right: 4px; }
.note { font-size: 13px; color: var(--leaf); }
.banner { background: var(--soft); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.switch { width: 52px; height: 30px; border-radius: 999px; background: var(--line); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--leaf); }
.switch.on::after { left: 25px; }
label.f { display: block; margin: 12px 0 4px; font-size: 14px; color: var(--muted); }
input, select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; width: 100%; }
input[type=time] { font-size: 22px; font-weight: 700; }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }
.days { display: flex; gap: 6px; }
.days button { flex: 1; padding: 9px 0; border-radius: 10px; background: var(--soft); font-weight: 600; }
.days button.on { background: var(--mango); color: var(--mango-ink); }
.todo { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.todo .name { flex: 1; }
.todo .min { width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.todo button { width: 34px; height: 34px; border-radius: 8px; background: var(--soft); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips button { background: var(--soft); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { display: flex; gap: 12px; padding: 6px 0; font-variant-numeric: tabular-nums; }
.timeline .t { width: 52px; font-weight: 700; }
.timeline .k { color: var(--muted); }
.timeline li.key .t, .timeline li.key span { color: var(--mango); font-weight: 800; }
.fab { position: fixed; right: 20px; bottom: 24px; width: 60px; height: 60px; border-radius: 50%;
  background: var(--mango); color: var(--mango-ink); font-size: 30px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 8px;
  padding: 10px 96px 18px 16px; background: linear-gradient(transparent, var(--bg) 35%); }
.nav button { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 14px; }
.ring { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.ring .clock { font-size: 76px; font-weight: 800; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.ring .sub { color: var(--muted); margin-bottom: 36px; }
.big { font-size: 20px; padding: 20px; border-radius: 18px; }
.run .now { font-size: 30px; font-weight: 800; margin: 6px 0; }
.run .count { font-size: 56px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.run .count.over { color: var(--warn); }
.bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 12px 0; }
.bar i { display: block; height: 100%; background: var(--mango); }
.stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.sug { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.sug p { margin: 0; }
.sug small { color: var(--muted); display: block; }
.ai-text { white-space: pre-wrap; }
.empty { color: var(--muted); text-align: center; padding: 32px 0; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts button { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px; text-align: left; }
.opts button.on { border-color: var(--mango); background: var(--soft); }
.opts small { display: block; color: var(--muted); font-size: 12px; }
#toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; }
#toast.show { opacity: .95; }
.stage { color: var(--warn); font-weight: 700; min-height: 24px; margin-bottom: 12px; }
body.alert, body.alert main { background: #d50000; }
body.alert .ring .clock, body.alert .ring .meta, body.alert .stage { color: #fff; }
.mission-kind { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.mission-q { font-size: 44px; font-weight: 800; margin: 10px 0 14px; font-variant-numeric: tabular-nums; }
.mission-q.small { font-size: 24px; line-height: 1.35; }
.mission-q.mono { letter-spacing: 6px; }
.shake-x { animation: sx .3s; }
@keyframes sx { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.card.ask { border-color: var(--mango); background: var(--soft); margin-top: 12px; }
.ring .opts button { text-align: center; font-size: 18px; }
body.alert .ring .sub { color: #fff; }
body.alert .ring .mission-q, body.alert .ring .mission-kind { color: #fff; }

/* ── 처음: 하얀 화면 · 물방울 ─────────────────────────── */
body.blank, body.blank main { background: #ffffff; color: #222; }
body.blank #app { max-width: none; }
.start { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: #fff; color: #222; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px 16px; overflow-y: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.start .hint { color: #b9b9b9; font-size: 15px; letter-spacing: 2px; animation: breathe 2.6s ease-in-out infinite; transition: opacity .5s; }
.start .hint.gone { opacity: 0; animation: none; }
@keyframes breathe { 50% { opacity: .35; } }
.drop-ring { position: fixed; width: 360px; height: 360px; margin: -180px 0 0 -180px; border-radius: 50%;
  border: 2px solid rgba(70, 140, 220, .8); background: radial-gradient(circle, rgba(120,175,235,.10) 0%, rgba(120,175,235,0) 70%); transform: scale(0); opacity: 1; pointer-events: none; z-index: 50;
  animation: ring 2.2s cubic-bezier(.15, .6, .3, 1) forwards; }
@keyframes ring { to { transform: scale(1.6); opacity: 0; } }
.drop-dot { position: fixed; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: rgba(90, 150, 220, .7);
  pointer-events: none; z-index: 51; animation: dot .8s ease-out forwards; }
@keyframes dot { 0% { transform: translateY(-40px) scale(.6); opacity: 0; } 40% { transform: none; opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.fade-in { animation: fadein .9s ease forwards; opacity: 0; }
@keyframes fadein { to { opacity: 1; } }
.q { width: 100%; max-width: 480px; cursor: default; }
.q-title { font-size: 24px; font-weight: 600; text-align: center; margin-bottom: 22px; color: #222; }
.q textarea { width: 100%; border: 0; border-bottom: 1.5px solid #ddd; border-radius: 0; background: transparent; color: #222;
  font: inherit; font-size: 18px; padding: 10px 2px; resize: none; outline: none; text-align: center; }
.q textarea:focus { border-color: rgba(90, 150, 220, .9); }
.q-row { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.q .mic, .q .go { border-radius: 999px; padding: 12px 22px; font-size: 16px; }
.q .mic { background: #f2f5f9; }
.q .go { background: #222; color: #fff; font-weight: 600; }
.thinking span { animation: blink 1.2s infinite; }
.thinking span:nth-child(2) { animation-delay: .2s; } .thinking span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .1; } }
.said { color: #888; text-align: center; font-size: 15px; }
.plan { width: 100%; max-width: 420px; cursor: default; }
.plan .meta { color: #999; text-align: center; }
.plan-wake { font-size: 72px; font-weight: 800; text-align: center; letter-spacing: -2px; font-variant-numeric: tabular-nums; color: #222; }
.plan-say { text-align: center; color: #555; margin: 4px 0 18px; }
.plan .timeline .k { color: #999; }
.plan .timeline li.key .t, .plan .timeline li.key span { color: #2f6fb5; }
.pop { animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.stagger li { opacity: 0; animation: fadein .4s ease forwards; }
.stagger li:nth-child(1) { animation-delay: .15s; } .stagger li:nth-child(2) { animation-delay: .25s; }
.stagger li:nth-child(3) { animation-delay: .35s; } .stagger li:nth-child(4) { animation-delay: .45s; }
.stagger li:nth-child(5) { animation-delay: .55s; } .stagger li:nth-child(6) { animation-delay: .65s; }
.stagger li:nth-child(7) { animation-delay: .75s; } .stagger li:nth-child(n+8) { animation-delay: .85s; }
.plan .btn { background: #222; color: #fff; }
.plan .btn.ghost { background: #f2f5f9; color: #222; }
@media (prefers-reduced-motion: reduce) { .drop-ring, .drop-dot, .stagger li, .pop, .fade-in { animation-duration: .01s; } }
.talk { display: flex; gap: 8px; align-items: center; background: #f4f6f9; border-radius: 999px; padding: 6px 6px 6px 8px; margin: 0 0 16px; }
.talk input { border: 0; background: transparent; padding: 10px 6px; font-size: 16px; }
.talk input:focus { outline: none; }
.talk-mic { width: 46px; height: 46px; border-radius: 50%; background: #222; color: #fff; font-size: 20px; flex: none; }
.why { background: #f4f6f9; border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.why .chips { margin-top: 6px; }
.why .chips button { background: #fff; border: 1px solid #e3e7ee; }
.note.auto { color: #2f6fb5; }
.note .undo { font-size: 12px; color: #888; text-decoration: underline; padding: 0 4px; }
.code { font-size: 44px; font-weight: 800; letter-spacing: 8px; font-variant-numeric: tabular-nums; }
.consent { background: #f4f6f9; border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 14px; line-height: 1.6; }
.kid .status { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.kid .status span { border-radius: 999px; padding: 4px 10px; font-size: 13px; background: #f4f6f9; }
.kid .status .ok { background: #e8f5e9; color: #1b5e20; }
.kid .status .bad { background: #ffebee; color: #b71c1c; font-weight: 700; }
.kid .status .wait { background: #fff8e1; color: #8d6e00; }
.cl-item { display: flex; align-items: center; gap: 10px; font-size: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cl-item input { width: 24px; height: 24px; }
label.btn { display: block; text-align: center; }
.cl-box { background: #f8fafc; border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.cl-photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; margin-top: 8px; }
.ok-line { color: #1b5e20; font-weight: 700; margin-top: 4px; }
h1 .tagline { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; align-self: flex-end; padding-bottom: 3px; }
.start .brand { position: absolute; top: 18%; left: 0; right: 0; text-align: center; font-size: 22px; font-weight: 700; color: #ff9f1c; letter-spacing: 1px; transition: opacity .5s; }
.start .brand small { display: block; font-size: 13px; font-weight: 500; color: #b9b9b9; letter-spacing: 2px; margin-top: 6px; }
.start .brand.gone { opacity: 0; }
.member { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.member .who { grid-column: 1; } .member .state { grid-column: 1; font-weight: 600; }
.member .meta { grid-column: 1; } .member .reacts { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-direction: column; gap: 4px; }
.member .reacts button { background: #f4f6f9; border-radius: 10px; width: 38px; height: 30px; }
.member .bad { color: #b71c1c; font-weight: 700; }
.chat { max-height: 46vh; overflow-y: auto; padding: 4px 0; margin-bottom: 8px; }
.msg { display: flex; flex-direction: column; margin: 6px 0; }
.msg .from { font-size: 12px; color: var(--muted); margin: 0 0 2px 4px; }
.msg .bubble { max-width: 80%; padding: 9px 12px; border-radius: 16px; background: #f4f6f9; line-height: 1.4; }
.msg.me { align-items: flex-end; } .msg.me .bubble { background: #ffe8c2; }
.msg.sys { align-items: center; } .msg.sys .bubble { background: #eef6ff; color: #1d4f8a; font-size: 14px; max-width: 92%; }
.msg.react { align-items: center; } .msg.react .bubble { background: transparent; color: var(--muted); font-size: 13px; padding: 2px; }
.msg .orig { font-size: 11px; color: var(--muted); margin-top: 4px; }
.msg .time { font-size: 10px; color: #aaa; margin: 2px 6px; }
.soft { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin: -6px 0 8px 6px; }
.badge { background: #e53935; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 12px; }
.soft input { width: auto; flex: none; }

.card.decide { border-color: #f0b429; background: #fffaf0; }
.card.decide .chips button.pick { background: #ff9f1c; color: #4a2c00; font-weight: 700; }
.cal-row { padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.cal-row.busy { color: var(--muted); }
.cal-row .bad { color: #b71c1c; font-weight: 700; }
.msg.ask .bubble { background: #fff3d6; color: #6b4a00; font-weight: 600; }

/* 0.3 단순하게: 큰 마이크 한 줄 · 조용한 링크 */
.talk.big { padding: 10px 10px 10px 12px; margin: 4px 0 22px; }
.talk.big .talk-mic { width: 64px; height: 64px; font-size: 28px; }
.talk.big input { font-size: 17px; }
.linkish { background: none; border: 0; color: #888; font-size: 14px; text-decoration: underline; display: block; margin: 14px auto 0; }
.invite { text-align: center; line-height: 1.7; }
details.more { margin: 22px 0 80px; }
details.more > summary { color: #888; font-size: 14px; cursor: pointer; list-style: none; text-align: center; padding: 10px; }
details.more > summary::-webkit-details-marker { display: none; }
.cal-row[data-ride] { cursor: pointer; }

/* 음성 먼저 — 큰 마이크, 듣는 동안 숨 쉬듯 */
.q.voice { text-align: center; }
.q .mic.big { display: block; margin: 18px auto 12px; width: 96px; height: 96px; padding: 0; border-radius: 50%;
  font-size: 40px; background: #222; color: #fff; }
.mic.on, .talk-mic.on { background: #e5484d !important; color: #fff; animation: breathe 1.1s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(229, 72, 77, .45); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(229, 72, 77, 0); } }
@media (prefers-reduced-motion: reduce) { .mic.on, .talk-mic.on { animation: none; } }

/* ── 새 알람: 마이크 하나 + 나/가족 ───────────────────────── */
.talk-app { display: flex; flex-direction: column; min-height: 100vh; padding: 12px 16px 150px; box-sizing: border-box; }
.talk-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.brand-s { font-weight: 700; font-size: 18px; }
.al-sec { background: #fff; border-radius: 16px; padding: 12px 14px; margin: 8px 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.al-sec h2 { margin: 0 0 6px; font-size: 15px; }
.al-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid #f0ece4; }
.al-row:first-of-type { border-top: 0; }
.al-row .who { color: #8a7a60; font-size: 13px; font-weight: 400; }
.al-x { background: none; border: 0; color: #b9ad98; font-size: 18px; padding: 6px 8px; }
.talk-chat { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; }
.bubble.me { align-self: flex-end; background: #222; color: #fff; border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: #fff4dc; border-bottom-left-radius: 4px; }
.bubble .ask { margin-top: 8px; font-weight: 600; }
.bubble .chips { margin-top: 8px; }
.talk-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,250,240,.96); box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.talk-bar .mic.big { flex: none; width: 72px; height: 72px; border-radius: 50%; border: 0; background: #222; color: #fff; font-size: 30px; }
.talk-bar input { flex: 1; min-width: 0; font-size: 16px; padding: 12px 14px; border-radius: 999px; border: 1px solid #e6dccb; background: #fff; }
