/* Instyle Minerva — one dark, quiet screen. The orb is the interface. */
:root {
  --bg: #07080c; --ink: #f4f1ea; --dim: rgba(244,241,234,.56); --faint: rgba(244,241,234,.32);
  --line: rgba(255,255,255,.09); --glass: rgba(255,255,255,.045); --gold: #c8a24a; --warn: #e2866a;
  --sans: "Overpass", "Noto Sans KR", -apple-system, "Segoe UI", sans-serif; --serif: "EB Garamond", Georgia, serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
#app { height: 100%; }

.mv { position: relative; height: 100dvh; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column;
  padding: max(14px, env(safe-area-inset-top)) 20px max(14px, env(safe-area-inset-bottom)); overflow: hidden; }
.mv::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 42% at 50% 34%, rgba(200,162,74,.10), transparent 70%), radial-gradient(80% 60% at 50% 110%, rgba(110,96,190,.10), transparent 70%); transition: opacity 1.2s ease; }
.mv > * { position: relative; z-index: 1; }

.mv-top { display: flex; align-items: center; justify-content: space-between; height: 44px; flex: none; z-index: 6; }
.mv-word { font-family: var(--serif); font-size: 19px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink); opacity: .9; padding-left: .2em; }
.mv-tools { display: flex; align-items: center; gap: 4px; }
.mv-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--dim); transition: color .2s, background .2s; }
.mv-ic svg { width: 20px; height: 20px; }
.mv-ic:hover { color: var(--ink); background: var(--glass); }
.mv-ic[data-mute][data-on="0"] { color: var(--faint); }
.mv-lang { display: flex; padding: 3px; margin-right: 4px; border: 1px solid var(--line); border-radius: 999px; }
.mv-lang button { min-width: 34px; height: 26px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; letter-spacing: .04em; color: var(--dim); transition: all .25s; }
.mv-lang button[data-on="1"] { background: rgba(255,255,255,.12); color: var(--ink); }
.mv-menu { position: absolute; right: 0; top: 48px; z-index: 5; min-width: 190px; padding: 6px; border-radius: 16px; background: rgba(22,23,30,.92);
  border: 1px solid var(--line); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); box-shadow: 0 18px 50px rgba(0,0,0,.5); animation: rise .22s ease both; }
.mv-menu[hidden] { display: none; }
.mv-menu button, .mv-menu a { display: block; width: 100%; text-align: left; padding: 11px 14px; border-radius: 11px; font-size: 14px; color: var(--ink); text-decoration: none; }
.mv-menu button:hover, .mv-menu a:hover { background: var(--glass); }

.mv-main { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: clamp(4px, 3vh, 28px); }
.mv-orb { position: relative; flex: none; width: min(62vw, 34vh, 280px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; outline: none; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.mv-orb:active { transform: scale(.965); }
.mv-orb canvas { width: 100%; height: 100%; border-radius: 50%; filter: blur(7px) saturate(1.25); }
.mv-halo { position: absolute; inset: -12%; border-radius: 50%; pointer-events: none; opacity: 0; border: 1px solid rgba(255,255,255,.14); }
.mv[data-phase="listening"] .mv-halo { animation: ring 1.9s ease-out infinite; }
.mv[data-phase="listening"] .mv-orb { transform: scale(1.06); }
.mv[data-phase="thinking"] .mv-orb, .mv[data-phase="hearing"] .mv-orb { transform: scale(.9); }

.mv-status { flex: none; height: 20px; margin-top: clamp(6px, 2vh, 18px); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); transition: color .3s; }
.mv[data-lang="ko"] .mv-status { letter-spacing: .04em; font-size: 13px; }
.mv[data-phase="listening"] .mv-status { color: #8fd6e2; }
.mv-caption { flex: none; max-width: 100%; margin-top: 10px; font-size: 14px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-caption:empty { display: none; }
.mv-caption::before { content: "“"; } .mv-caption::after { content: "”"; }
.mv-caption[data-plain="1"] { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.mv-caption[data-plain="1"]::before, .mv-caption[data-plain="1"]::after { content: ""; }
.mv-line { flex: 0 1 auto; min-height: 0; width: 100%; margin-top: 12px; overflow-y: auto; font-weight: 300; font-size: clamp(19px, 2.6vh + 6px, 25px); line-height: 1.42; color: var(--ink);
  -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); padding-bottom: 18px; scrollbar-width: none; }
.mv-line::-webkit-scrollbar { display: none; }
.mv-line strong { font-weight: 500; }
.mv-line.in { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.mv-extra { flex: none; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mv-extra:empty { display: none; }

.mv-card { width: 100%; text-align: left; padding: 16px 18px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: rise .4s ease both; }
.mv-card-k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.mv-card-t { margin-top: 6px; font-size: 15.5px; line-height: 1.4; }
.mv-card-ok { margin-top: 10px; font-size: 13.5px; color: #9ed3a8; }
.mv-card-b { display: flex; gap: 8px; margin-top: 14px; }
.mv-card-b button, .mv-opts button, .mv-link { height: 40px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--ink); color: #0b0c11; text-decoration: none; display: inline-flex; align-items: center; transition: transform .15s, opacity .2s; }
.mv-card-b button.quiet, .mv-opts button, .mv-link { background: transparent; color: var(--ink); border: 1px solid rgba(255,255,255,.18); }
.mv-card-b button:active, .mv-opts button:active { transform: scale(.96); }
.mv-card-b button:disabled { opacity: .5; }
.mv-opts button.solid { background: var(--ink); color: #0b0c11; border-color: transparent; }
.mv-use { padding: 8px 0 6px; }
.mv-use .big { font-family: var(--serif); font-size: 46px; line-height: 1; }
.mv-use .sub { margin-top: 8px; font-size: 13.5px; color: var(--dim); }
.mv-use .bar { height: 6px; margin: 18px 0 20px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.mv-use .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8fd6e2, var(--gold)); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.mv-use[data-level="warn"] .bar i { background: var(--gold); } .mv-use[data-level="stop"] .bar i { background: var(--warn); }
.mv-use-row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.mv-use-row .c { color: var(--faint); font-size: 12.5px; align-self: center; }
.mv-use .note { margin: 16px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--faint); }
.mv-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; animation: rise .4s ease both; }

.mv-tiles { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 14px; }
.mv-tiles:empty { display: none; }
.mv-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 13px 14px 12px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); text-align: left; transition: background .2s, transform .15s; animation: rise .6s ease both; }
.mv-tile:nth-child(2) { animation-delay: .07s; } .mv-tile:nth-child(3) { animation-delay: .14s; }
.mv-tile:hover { background: rgba(255,255,255,.07); } .mv-tile:active { transform: scale(.97); }
.mv-tile .n { font-family: var(--serif); font-size: 30px; line-height: 1; }
.mv-tile .l { font-size: 11.5px; line-height: 1.25; color: var(--dim); }
.mv-tile[data-on="0"] .n { color: var(--faint); }
.mv-tile[data-alert="1"] .n { color: var(--warn); }

.mv-bar { flex: none; display: flex; align-items: center; gap: 10px; }
.mv-bar form { flex: 1; display: flex; align-items: center; height: 52px; padding: 0 6px 0 20px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); transition: border-color .2s; }
.mv-bar form:focus-within { border-color: rgba(255,255,255,.26); }
.mv-bar input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-size: 16px; }
.mv-bar input::placeholder { color: var(--faint); }
.mv-send { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--dim); opacity: 0; transform: scale(.8); transition: all .2s; pointer-events: none; }
.mv-bar form:focus-within .mv-send, .mv-bar input:not(:placeholder-shown) ~ .mv-send { opacity: 1; transform: none; pointer-events: auto; background: rgba(255,255,255,.12); color: var(--ink); }
.mv-send svg { width: 18px; height: 18px; }
.mv-mic { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #0b0c11; transition: transform .2s, background .3s, box-shadow .3s; }
.mv-mic svg { width: 22px; height: 22px; }
.mv-mic:active { transform: scale(.94); }
.mv-mic[data-on="1"] { background: #8fd6e2; box-shadow: 0 0 0 8px rgba(143,214,226,.14); }

.mv-sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s ease both; }
.mv-sheet[hidden] { display: none; }
.mv-sheet-in { width: 100%; max-width: 560px; max-height: 82dvh; display: flex; flex-direction: column; border-radius: 26px 26px 0 0; background: #111218; border: 1px solid var(--line); border-bottom: 0; animation: up .35s cubic-bezier(.2,.8,.2,1) both; }
.mv-sheet-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 12px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.mv-sheet-top button { font-size: 14px; color: var(--ink); letter-spacing: 0; text-transform: none; }
.mv-log { overflow-y: auto; padding: 4px 22px max(22px, env(safe-area-inset-bottom)); }
.mv-msg { padding: 12px 0; border-top: 1px solid var(--line); }
.mv-msg .who { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.mv-msg[data-role="assistant"] .who { color: var(--gold); }
.mv-msg .what { font-size: 15px; line-height: 1.5; }
.mv-none { padding: 30px 0; text-align: center; color: var(--faint); }

.mv-gate { height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.mv-gate .mv-word { font-size: 30px; }
.mv-gate p { margin: 0; color: var(--dim); font-size: 15px; }
.mv-gate form { display: flex; flex-direction: column; gap: 10px; width: min(320px, 100%); }
.mv-gate input { height: 50px; padding: 0 20px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); outline: none; text-align: center; font-size: 16px; }
.mv-gate input:focus { border-color: rgba(255,255,255,.3); }
.mv-gate button { height: 50px; border-radius: 999px; background: var(--ink); color: #0b0c11; font-weight: 500; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ring { 0% { opacity: .6; transform: scale(.86); } 100% { opacity: 0; transform: scale(1.22); } }
@media (max-height: 640px) { .mv-tile .n { font-size: 24px; } .mv-tile { padding: 10px 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* the Today / Email / Bills lists and the reply editor (inside the sheet) */
.mv-card-n { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--dim); }
.mv-card-b { flex-wrap: wrap; }
.mv-p-top { display: flex; justify-content: flex-end; padding: 0 0 10px; }
.mv-p-top button, .mv-item .b button, .mv-item .b a, .mv-reply .b button { height: 36px; padding: 0 15px; border-radius: 999px; font-size: 13.5px; font-weight: 500; border: 1px solid rgba(255,255,255,.18); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; transition: transform .15s, opacity .2s; }
.mv-item .b .solid, .mv-reply .b .solid { background: var(--ink); color: #0b0c11; border-color: transparent; }
.mv-item .b button:active, .mv-p-top button:active { transform: scale(.96); }
.mv-item button:disabled, .mv-reply button:disabled, .mv-p-top button:disabled { opacity: .5; }
.mv-item { padding: 15px 0; border-top: 1px solid var(--line); animation: rise .35s ease both; }
.mv-item .k { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; }
.mv-item .k.warn { color: var(--warn); }
.mv-item .t { font-size: 15.5px; line-height: 1.4; }
.mv-item .t .amt { float: right; font-family: var(--serif); font-size: 19px; }
.mv-item .w { margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--dim); }
.mv-item .b { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mv-off { margin: 0 0 12px; padding: 11px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.mv-reply { display: flex; flex-direction: column; gap: 12px; padding-bottom: 6px; }
.mv-reply .q { padding: 12px 14px; border-radius: 14px; background: var(--glass); font-size: 13px; line-height: 1.45; color: var(--dim); max-height: 96px; overflow: auto; }
.mv-reply label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.mv-reply input, .mv-reply textarea { font-family: var(--sans); width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); outline: none; font-size: 15px; line-height: 1.5; letter-spacing: 0; text-transform: none; color: var(--ink); resize: vertical; }
.mv-reply input:focus, .mv-reply textarea:focus { border-color: rgba(255,255,255,.28); }
.mv-reply .b { display: flex; gap: 8px; }
.mv-menu button[data-on="1"] { color: #9ed3a8; }
