/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/* Tokens copied from mockup/mockup_v1.html :root (light + dark). */
:root {
  --tabbar-h: 62px;
  --bg: #f4f3ef; --paper: #ffffff; --bg-2: #ebe9e3;
  --ink: #1f2421; --ink-2: #5b625e; --ink-3: #8e948f; --line: #d9d6cf;
  --accent: #2f6b57; --accent-soft: #dcebe4;
  --warn: #b8862b; --warn-soft: #f4e8cf;
  --bad: #b5443a; --bad-soft: #f3dad7;
  --info: #3b6ea8; --info-soft: #dbe6f3;
  --shadow: 0 1px 0 rgba(31,36,33,.06), 0 6px 18px rgba(31,36,33,.06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161a18; --paper: #1f2624; --bg-2: #262e2b;
    --ink: #e7ebe8; --ink-2: #a9b2ad; --ink-3: #737b77; --line: #38423e;
    --accent: #6fbf9f; --accent-soft: #24403a;
    --warn: #e0ab4a; --warn-soft: #43361a;
    --bad: #e2786c; --bad-soft: #472823;
    --info: #7aa6dc; --info-soft: #223447;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  --bg: #161a18; --paper: #1f2624; --bg-2: #262e2b;
  --ink: #e7ebe8; --ink-2: #a9b2ad; --ink-3: #737b77; --line: #38423e;
  --accent: #6fbf9f; --accent-soft: #24403a;
  --warn: #e0ab4a; --warn-soft: #43361a;
  --bad: #e2786c; --bad-soft: #472823;
  --info: #7aa6dc; --info-soft: #223447;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.3);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "IBM Plex Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-size: 15px; line-height: 1.55;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: inherit; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
button { font: inherit; color: inherit; cursor: pointer; min-height: 40px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .6; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, textarea { font: inherit; color: inherit; }

.frame { max-width: 1280px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); position: relative; }
.screen { padding: 20px 20px calc(var(--tabbar-h) + 36px + env(safe-area-inset-bottom)); }
@media (max-width: 600px) { .screen { padding: 14px 12px calc(var(--tabbar-h) + 44px + env(safe-area-inset-bottom)); } }
h1 { font-size: 22px; margin: 0; font-weight: 700; }
h2 { font-size: 15px; margin: 0; color: var(--ink-2); font-weight: 600; letter-spacing: .02em; }
.sub { color: var(--ink-2); font-size: 13.5px; }
.code-inline { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 400; color: var(--ink-3); font-size: 15px; }

/* back link (no top bar) */
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 10px 0 4px; margin: -6px 0 6px -4px; color: var(--ink-2); font-size: 14px; text-decoration: none; border-radius: 8px; }
.back:hover { color: var(--accent); }
.ico { flex: none; vertical-align: -2px; }
.ico-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* 40×40 bordered icon button (edit, close…) */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-3); }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
/* 6px date dot: today = accent, tomorrow = warn, later/past = ink-3 */
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.d-today { background: var(--accent); }
.dot.d-tomorrow { background: var(--warn); }

/* states */
.loading, .empty { color: var(--ink-3); font-size: 13.5px; padding: 24px 0; text-align: center; }
.error { color: var(--bad); font-size: 13.5px; padding: 12px 14px; background: var(--bad-soft); border-radius: 10px; margin: 12px 0; }
.error button { border: 1px solid var(--bad); background: transparent; color: var(--bad); border-radius: 8px; padding: 4px 10px; margin-left: 8px; font-size: 13px; min-height: 32px; }

/* home */
.today { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--accent); color: #fff; border-radius: 12px; margin-bottom: 18px; box-shadow: var(--shadow); flex-wrap: wrap; }
.today .when { display: flex; flex-direction: column; }
.today .when .eyebrow { font-size: 11.5px; letter-spacing: .08em; opacity: .8; }
.today .when .t { font-size: 17px; font-weight: 700; line-height: 1.3; }
.today .sub { color: rgba(255,255,255,.85); }
.today .btns { margin-left: auto; display: flex; gap: 8px; }
.today .btns a, .today .btns button { border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; border-radius: 8px; padding: 0 12px; font-size: 14px; min-height: 40px; display: inline-flex; align-items: center; text-decoration: none; }
.today .btns .primary { background: #fff; color: var(--accent); border-color: #fff; font-weight: 600; padding: 0 14px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-gap: 12px; gap: 12px; align-items: stretch; }
@media (max-width: 1199px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card .head { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px 0; }
.card .head .name { font-weight: 700; font-size: 16px; text-decoration: none; color: inherit; }
.card .head .name:hover { color: var(--accent); }
.card .head .code { color: var(--ink-3); font-size: 12.5px; }
.card .head .setting { margin-left: auto; font-size: 11.5px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.todo { display: flex; align-items: center; gap: 10px; margin: 8px 10px 0; padding: 12px 12px; min-height: 48px; border-radius: 8px; background: var(--accent-soft); border: none; width: calc(100% - 20px); text-align: left; text-decoration: none; color: inherit; flex-wrap: wrap; }
.todo .lbl { font-size: 11.5px; color: var(--accent); font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.todo .txt { font-weight: 600; }
.todo .tail { font-size: 12.5px; color: var(--ink-2); font-weight: 400; }
.todo .arr { margin-left: auto; color: var(--accent); display: inline-flex; }
/* small "reason to tap" badge inside the todo line */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; border-radius: 999px; padding: 1px 8px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge.bad { color: var(--bad); background: var(--bad-soft); }
.badge.accent { color: var(--accent); background: var(--accent-soft); }
.status { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px 12px; font-size: 12.5px; color: var(--ink-2); }
.status .chip { display: inline-flex; align-items: center; gap: 5px; }
.chip.warn { color: var(--warn); font-weight: 600; }
.chip.bad { color: var(--bad); font-weight: 600; }
/* no-todo card keeps the same anatomy: muted todo slot + chip row, so every card in a row shares height */
.todo.none { background: var(--bg-2); }
.todo.none .lbl { color: var(--ink-3); }
.todo.none .txt { color: var(--ink-2); font-weight: 500; }
.chip.muted { color: var(--ink-3); }
.card.group .head .code { font-size: 12.5px; }
.card.group .sub-cards { display: grid; grid-gap: 6px; gap: 6px; padding: 8px 10px 12px; }
.card.group .sub-cards .row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 8px 10px; min-height: 40px; border-radius: 6px; background: var(--bg-2); text-decoration: none; color: inherit; border: none; width: 100%; text-align: left; }
.card.group .sub-cards .row .n { font-weight: 600; min-width: 48px; }
.card.group .sub-cards .row .arr { margin-left: auto; color: var(--accent); display: inline-flex; }
.card.group .sub-cards .idle { font-size: 12.5px; color: var(--ink-3); padding: 0 2px; }
.card.counselor { border-color: var(--accent); }
.card .status { margin-top: auto; }
.card .status + .theory { margin-top: 0; }
.card .theory { padding: 0 14px 12px; font-size: 12.5px; color: var(--ink-2); margin-top: auto; }
.card .theory b { color: var(--ink); font-weight: 600; }
.section-title { margin: 22px 0 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* client screen */
.chead { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 6px; }
.chead h1 { display: inline-flex; align-items: center; gap: 8px; }
.chead .meta { color: var(--ink-2); font-size: 13.5px; }
.chead .meta b { color: var(--ink); font-weight: 600; }
.chead .theory-line { font-size: 13px; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; min-height: 0; }
.chead .theory-line b { color: var(--accent); }
/* horizontal stepper: 36px circles on a 2px track, accent fill up to the current step */
.stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-gap: 0; gap: 0; position: relative; margin: 16px 0 14px; }
.stepper .track, .stepper .fill { position: absolute; top: 17px; height: 2px; background: var(--line); pointer-events: none; }
.stepper .track { left: 10%; right: 10%; }
.stepper .fill { left: 10%; background: var(--accent); }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; border: none; background: transparent; padding: 0 4px; min-height: 0; text-align: center; color: inherit; }
.step .c { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; background: var(--paper); border: 2px solid var(--line); color: var(--ink-3); flex: none; }
.step .t { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.step .s { font-size: 12px; color: var(--ink-2); line-height: 1.35; }
.step.done .c { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.done .s { color: var(--accent); }
.step.now .c { border: 3px solid var(--warn); color: var(--warn); }
.step.now .t { font-weight: 700; }
.step.now .s { color: var(--warn); font-weight: 600; }
.step.next .t, .step.wait .t { color: var(--ink-2); }
.step.wait .s, .step.next .s { color: var(--ink-3); }
@media (max-width: 600px) { .step .t { font-size: 12.5px; } .step .s { font-size: 11px; } .step .c { width: 32px; height: 32px; font-size: 13px; } .stepper .track, .stepper .fill { top: 15px; } }
.anytime { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.anytime button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 0 14px; font-size: 13.5px; min-height: 40px; }
.anytime button .cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 700; }

.chat { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: grid; }
.chat .thread { padding: 14px; display: grid; grid-gap: 12px; gap: 12px; min-height: 120px; }
.msg { max-width: 86%; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.msg.user { margin-left: auto; background: var(--accent-soft); border-bottom-right-radius: 4px; }
.msg.ai { background: var(--bg-2); border-bottom-left-radius: 4px; }
.msg.streaming::after { content: "▍"; color: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.msg .file { display: flex; width: -moz-fit-content; width: fit-content; max-width: 100%; align-items: center; gap: 6px; font-size: 12.5px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg .tools { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px; }
.msg .tool { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.msg .tool .ico { color: var(--accent); }
.msg .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg .acts button, .msg .acts a { border: 1px solid var(--accent); background: transparent; color: var(--accent); border-radius: 8px; padding: 4px 10px; font-size: 13px; min-height: 36px; display: inline-flex; align-items: center; text-decoration: none; }
.msg .acts .primary { background: var(--accent); color: #fff; }
.msg .kept { margin-top: 8px; border-left: 3px solid var(--accent); padding: 6px 10px; background: var(--paper); border-radius: 0 8px 8px 0; font-size: 13.5px; }
.msg .kept .k { font-size: 11.5px; color: var(--accent); font-weight: 600; letter-spacing: .04em; display: block; }
.cite { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--accent); text-decoration: underline; cursor: pointer; }
.chat .input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.chat .input .mode { display: flex; gap: 4px; }
.chat .input .mode button { border: 1px solid var(--line); background: var(--bg-2); border-radius: 999px; padding: 0 12px; font-size: 12.5px; min-height: 40px; }
.chat .input .mode button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chat .input .box { flex: 1 1; min-width: 180px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; color: var(--ink); font-size: 14px; background: var(--bg); resize: none; min-height: 44px; max-height: 160px; line-height: 1.45; }
.chat .input .box::placeholder { color: var(--ink-3); }
.chat .input .clip, .chat .input .send { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; color: var(--ink-2); flex: none; }
.chat .input .send { background: var(--accent); color: #fff; border-color: var(--accent); }
.chat .pending { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px; }
.chat .pending span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; background: var(--bg-2); }
.chat .pending button { min-height: 28px; border: none; background: transparent; padding: 0 2px; color: var(--ink-3); display: inline-flex; align-items: center; }
.chat .hint { padding: 6px 14px 10px; font-size: 12.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chat .hint b { color: var(--accent); }
.chat .hint button { border: 1px solid var(--accent); background: transparent; color: var(--accent); border-radius: 8px; padding: 2px 10px; font-size: 12.5px; min-height: 32px; display: inline-flex; align-items: center; }

/* transcript screen */
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-gap: 14px; gap: 14px; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.tbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.tbar .toggle { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper); }
.tbar .toggle button { border: none; background: var(--paper); padding: 0 14px; font-size: 13px; min-height: 40px; color: var(--ink-2); }
.tbar .toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tbar .summary { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.tbar .summary .pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.tbar .summary .pill.accent { background: var(--accent-soft); color: var(--accent); }
.tbar .summary .pill.warn { background: var(--warn-soft); color: var(--warn); }
.tbar .summary .pill.bad { background: var(--bad-soft); color: var(--bad); }
.tlist { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.utt { display: grid; grid-template-columns: 56px 1fr; grid-gap: 10px; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; align-items: start; scroll-margin-top: 16px; }
.utt:last-child { border-bottom: 0; }
.utt:target, .utt.hl { box-shadow: inset 3px 0 0 var(--accent); }
.utt .ts { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--ink-3); padding-top: 3px; }
.utt .body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.utt .lrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.utt .spk { font-size: 12px; font-weight: 600; color: var(--ink-2); border: none; background: transparent; padding: 0; min-height: 0; line-height: 1.5; text-align: left; border-radius: 4px; }
.utt .spk.c { color: var(--accent); }
.utt .spk.u { color: var(--ink-3); }
.utt .spk:hover { text-decoration: underline; text-underline-offset: 3px; }
.utt .badge { font-weight: 500; }
.utt.scene { background: color-mix(in srgb, var(--warn-soft) 40%, transparent); }
.utt.dup { opacity: .5; }
.utt .note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.utt .note.bad { color: var(--bad); font-size: 12.5px; }
.utt .broken { -webkit-text-decoration: underline wavy var(--bad); text-decoration: underline wavy var(--bad); text-underline-offset: 4px; }
.utt .fixab { display: grid; grid-gap: 6px; gap: 6px; margin-top: 4px; }
.utt .fixab .ab { display: grid; grid-gap: 6px; gap: 6px; }
.utt .fixab .ab .opt { display: grid; grid-template-columns: 22px 1fr; grid-gap: 8px; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; background: var(--paper); text-align: left; min-height: 44px; color: inherit; line-height: 1.5; }
.utt .fixab .ab .opt.on { border-color: var(--accent); background: var(--accent-soft); }
.utt .fixab .ab .opt .l { font-weight: 700; color: var(--ink-2); }
.utt .fixab .ab .opt.on .l { color: var(--accent); }
.utt .fixab .ab .opt .r { color: var(--ink-2); font-size: 12.5px; display: block; }
.utt .fixab .rule { border-top: 1px dashed var(--line); padding-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.utt .fixab .rule b { color: var(--ink); }
@media (min-width: 821px) { .utt .fixab .ab { grid-template-columns: 1fr 1fr; } }
.utt .fixbtn { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.utt .fixbtn button { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 0 16px; font-size: 14px; font-weight: 600; min-height: 40px; color: var(--accent); }
.utt .fixbtn button.ghost { color: var(--ink-2); font-weight: 400; font-size: 13px; padding: 0 12px; }
.utt .fixbtn button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
/* low-confidence row = question card */
.utt.ask { background: color-mix(in srgb, var(--warn-soft) 55%, var(--paper)); border-left: 3px solid var(--warn); padding: 12px 14px 12px 11px; }
.utt.ask .body { gap: 8px; }
.utt.ask .q { font-size: 12px; font-weight: 600; color: var(--warn); }
.utt.ask .why { font-size: 11.5px; color: var(--ink-3); }
@media (max-width: 480px) { .utt { grid-template-columns: 48px 1fr; padding: 10px 10px; } }

/* sticky bottom bar (confirm) */
.tfoot { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 8; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-top: 1px solid var(--line); padding: 12px 20px; }
.tfoot .in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding-right: 72px; flex-wrap: wrap; }
.tfoot .left { font-size: 13.5px; color: var(--ink-2); }
.tfoot .left b { color: var(--ink); }
.tfoot .go { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: none; background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; }
.tscreen { padding-bottom: calc(var(--tabbar-h) + 120px + env(safe-area-inset-bottom)); }
@media (max-width: 600px) { .tfoot { padding-left: 12px; padding-right: 12px; } .tfoot .in { padding-right: 0; gap: 8px; } .tfoot .go { margin-left: 0; width: 100%; justify-content: center; } }

.panel { display: grid; grid-gap: 12px; gap: 12px; align-content: start; }
@media (min-width: 821px) { .panel { position: -webkit-sticky; position: sticky; top: 12px; max-height: calc(100vh - 110px); overflow-y: auto; } }
.acard { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; display: grid; grid-gap: 10px; gap: 10px; font-size: 14px; }
.acard .h { display: flex; align-items: baseline; gap: 8px; }
.acard .h .k { font-size: 12px; letter-spacing: .04em; font-weight: 600; color: var(--warn); }
.acard .h .ts { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--ink-3); margin-left: auto; border: none; background: none; min-height: 0; padding: 0; }
.acard .h button.ts:hover { color: var(--accent); }
.acard .q { font-weight: 700; font-size: 16px; line-height: 1.4; }
.acard .side { display: grid; grid-template-columns: 64px 1fr; grid-gap: 6px 10px; gap: 6px 10px; font-size: 13.5px; line-height: 1.55; }
.acard .side .who { font-weight: 600; color: var(--ink-2); }
.acard .side .who.c { color: var(--accent); }
.acard .rule { border-top: 1px dashed var(--line); padding-top: 8px; font-size: 13px; color: var(--ink-2); }
.acard .rule b { color: var(--ink); }
.acard .pick { display: flex; gap: 8px; flex-wrap: wrap; }
.acard .pick button, .acard .pick a { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 0 14px; font-size: 13.5px; min-height: 40px; text-decoration: none; color: inherit; }
.acard .pick button.on { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.acard .pick a { color: var(--accent); }
.acard.broken .h .k { color: var(--bad); }
.acard .ab { display: grid; grid-gap: 6px; gap: 6px; }
.acard .ab .opt { display: grid; grid-template-columns: 22px 1fr; grid-gap: 8px; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; background: transparent; text-align: left; min-height: 40px; color: inherit; line-height: 1.5; }
.acard .ab .opt.on { border-color: var(--accent); background: var(--accent-soft); }
.acard .ab .opt .l { font-weight: 700; color: var(--ink-2); }
.acard .ab .opt.on .l { color: var(--accent); }
.acard .ab .opt .r { color: var(--ink-2); font-size: 12.5px; display: block; }
.scenes { font-size: 13px; color: var(--ink-2); display: grid; grid-gap: 4px; gap: 4px; }
.scenes .sc { display: flex; gap: 8px; align-items: flex-start; min-height: 32px; border: none; background: transparent; text-align: left; padding: 4px 0; border-radius: 6px; color: inherit; }
.scenes .sc:hover { color: var(--accent); }
.scenes .sc .ts { font-family: "JetBrains Mono", monospace; color: var(--ink-3); min-width: 52px; }


/* ---- 하단 탭 (홈 · 위키 · AS센터) ---- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
          backdrop-filter: saturate(1.4) blur(10px); border-top: 1px solid var(--line); }
.tabbar a { flex: 1 1; max-width: 160px; display: grid; justify-items: center; grid-gap: 3px; gap: 3px; padding: 6px 4px; border-radius: 10px;
  font-size: 11.5px; color: var(--ink-3); text-decoration: none; min-height: 48px; }
.tabbar a.on { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.tabbar a:active { background: var(--bg-2); }

/* ---- AS센터 화면 ---- */
.as-screen { padding-bottom: 24px; display: grid; grid-gap: 12px; gap: 12px; align-content: start; }
.as-head h1 { font-size: 20px; margin: 6px 0 2px; }
.as-head p { margin: 0; font-size: 13px; color: var(--ink-3); }
.as-head p b { color: var(--ink-2); font-weight: 600; }
.as-chat { grid-template-rows: minmax(0, 1fr) auto; min-height: min(560px, calc(100dvh - 250px)); }
.as-chat .thread { align-content: start; overflow-y: auto; }
.as-empty { display: grid; grid-gap: 12px; gap: 12px; }
.as-grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-gap: 8px; gap: 8px; }
.as-grades .gcard { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; color: var(--ink-3); display: grid; grid-gap: 2px; gap: 2px; }
.as-grades .gcard b { color: var(--ink); font-size: 13px; }
.as-ex { display: grid; grid-gap: 6px; gap: 6px; }
.as-ex button { text-align: left; background: var(--bg-2); border: none; border-radius: 8px; padding: 9px 12px; font-size: 13.5px; color: var(--ink-2); min-height: 40px; }
.as-ex button:hover { color: var(--accent); }
.msg.ai .g { font-size: 11px; color: var(--accent); font-weight: 600; display: block; margin-bottom: 3px; }
.msg.ai .md { border: none; box-shadow: none; padding: 0; background: transparent; font-size: 14.5px; }
.msg.ai .md > :first-child { margin-top: 0; }
.msg.ai .md > :last-child { margin-bottom: 0; }
.msg.ai .md p { margin: 0 0 7px; }
.msg.ai .md ul, .msg.ai .md ol { margin: 0 0 7px; padding-left: 18px; }
.msg.ai .md pre, .msg.ai .md table { max-width: 100%; overflow-x: auto; font-size: 12.5px; }
.msg.ai.err { color: var(--bad); }
.msg.ai.job { display: grid; grid-gap: 4px; gap: 4px; }
.msg.ai.job .ctx { font-size: 12px; color: var(--ink-3); }
.msg.ai.job .jst { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.msg.ai.job .jst .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.msg.ai.job .jst.running .dot { background: var(--warn); animation: blink 1s steps(2) infinite; }
.msg.ai.job .jst.done .dot { background: var(--accent); }
.msg.ai.job .jst.failed .dot { background: var(--bad); }
@media (max-width: 600px) { .as-grades { grid-template-columns: 1fr; } .as-chat { min-height: calc(100dvh - 280px); } }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 999px; font-size: 13px; z-index: 9; box-shadow: var(--shadow); max-width: calc(100vw - 40px); }
.foot { margin-top: 26px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 12px; }

/* login */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login form { width: min(360px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 24px; display: grid; grid-gap: 12px; gap: 12px; }
.login input { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); min-height: 44px; font-size: 16px; }
.login button { border: none; background: var(--accent); color: #fff; border-radius: 10px; padding: 10px; font-weight: 600; min-height: 44px; }
.login .err { color: var(--bad); font-size: 13px; }

/* ---- Phase 1.5: today rows · next chip · home footer · push ---- */
.today { flex-direction: column; align-items: stretch; gap: 8px; }
.today .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.today .row + .row { border-top: 1px solid rgba(255,255,255,.25); padding-top: 8px; }
.chip.next { color: var(--ink-2); }
.card.counselor .theory { display: grid; grid-gap: 4px; gap: 4px; }
.card.counselor .theory a { color: var(--accent); text-decoration: none; }
.card.counselor .head .setting { text-decoration: none; }
.home-foot .links { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 8px; }
.home-foot .links a { color: var(--ink-2); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.home-foot .links a:hover { color: var(--accent); }
.push-btn { border: 1px solid var(--accent); background: transparent; color: var(--accent); border-radius: 999px; padding: 5px 14px; font-size: 13px; }
.push-note { color: var(--ink-3); }
.push-on { color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.push-on button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; min-height: 36px; }

/* client header extras */
.chead .sched { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 2px 6px 2px 12px; min-height: 40px; }
.chead .sched input { border: none; background: transparent; color: var(--ink); font-size: 13px; min-height: 30px; padding: 0 4px; }
.chead .chead-links { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.chead .chead-links a, .chead .chead-links button { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 0 12px; font-size: 13.5px; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; }
.chead .chead-links a:hover { border-color: var(--accent); color: var(--accent); }
.chead .chead-links button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.anytime button.on { border-color: var(--accent); background: var(--accent-soft); }

/* 이월 inline panel */
.carry { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 12px; margin: -8px 0 16px; display: grid; grid-gap: 2px; gap: 2px; }
.carry .h { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; }
.carry .h .k { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.carry .h .cnt { font-size: 12.5px; color: var(--ink-2); }
.carry .h .x { margin-left: auto; border: none; background: transparent; color: var(--ink-3); min-height: 36px; padding: 0 8px; }
.carry .item { display: grid; grid-template-columns: 24px 1fr auto; grid-gap: 10px; gap: 10px; align-items: center; min-height: 44px; padding: 4px 6px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.carry .item:hover { background: var(--bg-2); }
.carry .item input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.carry .item.done .txt { color: var(--ink-3); text-decoration: line-through; }
.carry .item .meta { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.carry .item .meta .rep { color: var(--warn); font-weight: 600; margin-left: 6px; }

/* ---- wiki viewer ---- */
.wgrid { display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-gap: 16px; gap: 16px; align-items: start; }
.wtree { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
@media (min-width: 821px) { .wtree { position: -webkit-sticky; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; } .wtree .wown .tog { display: none; } }
.wtree .wown { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.wtree .wown .k { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); }
.wtree .wown .tog { margin-left: auto; border: 1px solid var(--line); background: var(--bg-2); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; min-height: 36px; }
.wtree .wlist { padding: 6px; display: grid; grid-gap: 2px; gap: 2px; }
.wtree .wgroup { display: grid; grid-gap: 2px; gap: 2px; }
.wtree .wg { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; padding: 10px 8px 2px; }
.wtree .wp { display: flex; align-items: center; gap: 8px; padding: 8px 10px; min-height: 40px; border-radius: 8px; text-decoration: none; color: inherit; font-size: 13.5px; }
.wtree .wp:hover { background: var(--bg-2); }
.wtree .wp.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.wtree .wp .t { flex: 1 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wtree .wp .m { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: var(--ink-3); display: inline-flex; gap: 4px; }
.wtree .wp .he { color: var(--warn); }
.wtree .wother { border-top: 1px solid var(--line); margin-top: 6px; padding: 8px 10px; display: flex; gap: 12px; font-size: 12.5px; }
.wtree .wother a { color: var(--ink-2); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
@media (max-width: 820px) {
  .wgrid { grid-template-columns: 1fr; }
  .wtree .wlist { display: none; }
  .wtree.open .wlist { display: grid; }
}
.wmain { min-width: 0; }
.whead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.whead .path { font-size: 12px; color: var(--ink-3); }
.whead .badge { font-size: 11.5px; color: var(--warn); border: 1px solid var(--warn); border-radius: 999px; padding: 1px 8px; }
.whead .upd { font-size: 12px; color: var(--ink-3); }
.whead .acts { margin-left: auto; display: flex; gap: 6px; }
.whead .acts button { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 5px 12px; font-size: 13px; min-height: 40px; }
.whead .acts button.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.fm { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 12px; }
.fm .kv { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--bg-2); border-radius: 6px; padding: 2px 8px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.fm .kv .k { color: var(--ink-3); }
.fm .kv .v { color: var(--ink-2); }
.wedit textarea { width: 100%; min-height: 70vh; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--paper); color: var(--ink); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13.5px; line-height: 1.6; resize: vertical; }
.wedit .hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* rendered markdown */
.md { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 20px; font-size: 15px; line-height: 1.7; word-break: break-word; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1 { font-size: 20px; margin: 18px 0 8px; }
.md h2 { font-size: 15.5px; color: var(--ink); margin: 20px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.md h3 { font-size: 14.5px; margin: 14px 0 4px; }
.md p { margin: 6px 0; }
.md ul, .md ol { padding-left: 22px; margin: 6px 0; }
.md li { margin: 2px 0; }
.md li:has(> input[type="checkbox"]) { list-style: none; margin-left: -18px; }
.md input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0 6px 0 0; vertical-align: -2px; }
.md blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--bg-2); border-radius: 0 8px 8px 0; color: var(--ink-2); }
.md code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; background: var(--bg-2); padding: 1px 5px; border-radius: 4px; }
.md pre { background: var(--bg-2); padding: 10px 12px; border-radius: 8px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md a { color: var(--accent); }
.md a.cite { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; }
.md .tbl { overflow-x: auto; margin: 8px 0; }
.md table { border-collapse: collapse; font-size: 13.5px; min-width: 240px; }
.md th, .md td { border: 1px solid var(--line); padding: 4px 10px; text-align: left; }
.md th { background: var(--bg-2); }
.md hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }

/* ---- card page ---- */
.cardv .cbar { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.cardv .cbar a, .cardv .cbar button { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 5px 12px; font-size: 13px; min-height: 40px; display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.cardv .cbar button.ghost { color: var(--ink-3); }
.cardv .cbar a:hover { border-color: var(--accent); color: var(--accent); }
.card-empty { background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; padding: 28px 20px; text-align: center; display: grid; grid-gap: 6px; gap: 6px; justify-items: center; margin-top: 12px; }
.card-empty p { margin: 0; }
.card-empty .primary { border: none; background: var(--accent); color: #fff; border-radius: 10px; padding: 10px 22px; font-weight: 600; min-height: 44px; margin-top: 8px; }
.cardv .sheet { margin-top: 12px; }

/* ---- lint ---- */
.lgroup { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); margin-top: 12px; overflow: hidden; }
.lgroup .lh { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.lgroup .lh .n { font-weight: 700; text-decoration: none; color: inherit; min-height: 32px; display: inline-flex; align-items: center; }
.lgroup .lh .cnt { color: var(--warn); font-weight: 600; font-size: 13px; }
.litem { display: grid; grid-template-columns: 44px 1fr; grid-gap: 2px 10px; gap: 2px 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.litem:last-child { border-bottom: 0; }
.litem .rule { font-size: 12px; color: var(--bad); font-weight: 600; grid-row: 1 / 3; padding-top: 2px; }
.litem .path { font-size: 12px; color: var(--ink-3); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.litem .path:hover { color: var(--accent); }

/* ---- AI 연결 상태 · 공급자 전환 (ProviderPanel) ---- */
.pwrap { position: relative; display: inline-flex; }
.pstat { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 0 12px; font-size: 13px; min-height: 40px; color: var(--ink-2); white-space: nowrap; }
.pstat:hover { border-color: var(--accent); color: var(--accent); }
.pstat .dot { width: 8px; height: 8px; }
.pstat.ok .dot { background: var(--accent); }
.pstat.alt .dot { background: var(--warn); }
.pstat.off .dot { background: var(--bad); }
.pstat.off { color: var(--bad); }
.pstat.unk .dot { background: var(--ink-3); }
.chead .chead-links .pstat { border-radius: 999px; }
.ppop { position: absolute; z-index: 8; width: 320px; max-width: calc(100vw - 24px); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: grid; grid-gap: 10px; gap: 10px; font-size: 13.5px; color: var(--ink); text-align: left; white-space: normal; }
.pwrap.down .ppop { top: calc(100% + 6px); }
.pwrap.up .ppop { bottom: calc(100% + 6px); }
.pwrap.left .ppop { left: 0; }
.pwrap.right .ppop { right: 0; }
.ppop .h { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.pwrap .ppop .h .x { margin-left: auto; border: none; background: transparent; color: var(--ink-3); min-height: 40px; min-width: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.pwrap .ppop .h .x:hover { color: var(--ink); background: var(--bg-2); }
.ppop .st { font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.ppop .st .dot { width: 8px; height: 8px; }
.ppop .st.ok .dot { background: var(--accent); }
.ppop .st.alt .dot { background: var(--warn); }
.ppop .st.off .dot { background: var(--bad); }
.ppop .st.off { color: var(--bad); }
.ppop .pgroup { display: grid; grid-gap: 4px; gap: 4px; }
.ppop .pgroup .k { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); }
.ppop .seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.pwrap .ppop .seg button { border: none; border-radius: 0; background: transparent; padding: 0 10px; min-height: 40px; font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.pwrap .ppop .seg button + button { border-left: 1px solid var(--line); }
.pwrap .ppop .seg button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pwrap .ppop .seg button:disabled { color: var(--ink-3); opacity: .6; text-decoration: line-through; }
.ppop .why { font-size: 11.5px; color: var(--ink-3); }
.ppop .models { display: grid; grid-gap: 2px; gap: 2px; font-size: 12.5px; color: var(--ink-2); }
.ppop .models div { display: flex; gap: 8px; align-items: baseline; }
.ppop .models span { min-width: 56px; color: var(--ink-3); }
.ppop .models b { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500; color: var(--ink); font-size: 12px; word-break: break-all; }
.ppop .note { font-size: 12.5px; color: var(--ink-2); }
.ppop .row { display: flex; gap: 6px; justify-content: flex-end; }
.pwrap .ppop .row button { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 0 14px; font-size: 13px; min-height: 40px; display: inline-flex; align-items: center; }
.pwrap .ppop .row button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (max-width: 600px) {
  .pwrap .ppop, .pwrap.up .ppop, .pwrap.down .ppop, .pwrap.left .ppop, .pwrap.right .ppop { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); width: auto; max-width: none; }
}

/* ---- print (card page "PDF") ---- */
@media print {
  body { background: #fff; color: #000; padding: 0; }
  .frame { max-width: none; min-height: 0; background: #fff; }
  .screen { padding: 0; }
  .print-hide, .tabbar, .toast, .back, .cbar, .fm, .tfoot, .ppop { display: none !important; }
  .md { border: none; box-shadow: none; padding: 0; font-size: 12.5pt; }
  .md a { color: inherit; text-decoration: none; }
  h1 { font-size: 18pt; }
}

