/* Copyright (c) 2026 Brightshine Co., Ltd. All rights reserved. */
@font-face {
  font-family: "Garigo Wordmark";
  src: url(/fonts/poppins-latin-800-normal.woff2) format("woff2");
  font-weight: 800; font-display: swap;
}

/* ---------- 브랜드 토큰 ---------- */
:root {
  --navy: #0B1330;
  --blue: #2F5BFF;
  --blue-2: #5B7CFF;
  --periwinkle: #8FA6FF;
  --lavender: #C9BAFF;
  --grad: linear-gradient(135deg, #1F46F0 0%, #3563FF 55%, #7A96FF 100%);

  --bg: #FFFFFF;
  --side: #F6F7FB;
  --surface: #FFFFFF;
  --surface-2: #F1F3FA;
  --hover: #EAEDF7;
  --text: #0B1330;
  --text-2: #3C4466;
  --muted: #6B7394;
  --line: #E4E7F0;
  --line-2: #D5DAE8;
  --bubble: #EEF1FF;
  --accent: #2F5BFF;
  --accent-soft: #E8EDFF;
  --accent-ink: #2447E0;
  --mark: rgba(47, 91, 255, .12);
  --code-bg: #F4F6FB;

  --ok: #1F7A45;  --ok-bg: #E4F4EA;
  --warn: #9A5B00; --warn-bg: #FFF2D9;
  --bad: #C4302B;  --bad-bg: #FDECEC;

  --shadow-sm: 0 1px 2px rgba(11, 19, 48, .06);
  --shadow: 0 2px 6px rgba(11, 19, 48, .06), 0 12px 32px rgba(11, 19, 48, .08);
  --radius: 14px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "D2Coding", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1328;
    --side: #0A0E1F;
    --surface: #151B34;
    --surface-2: #1A2140;
    --hover: #1F2749;
    --text: #E8EBF7;
    --text-2: #C3C9E0;
    --muted: #8F98BA;
    --line: #232A48;
    --line-2: #2E3657;
    --bubble: #1D2548;
    --accent: #6F8CFF;
    --accent-soft: #1E2A5A;
    --accent-ink: #9EB2FF;
    --mark: rgba(111, 140, 255, .18);
    --code-bg: #0A0F22;
    --ok: #5FD18B;  --ok-bg: #133524;
    --warn: #FFC56B; --warn-bg: #3A2D12;
    --bad: #FF8A84;  --bad-bg: #3D1B21;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 2px 8px rgba(0, 0, 0, .35), 0 16px 40px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

/* ---------- 기본 ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word;
}
a { color: var(--accent); text-underline-offset: 2px; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 로고 */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.brand img { width: 28px; height: 28px; display: block; }
.wordmark { font-family: "Garigo Wordmark", var(--font); font-weight: 800; letter-spacing: -.02em; font-size: 19px; line-height: 1; color: var(--text); }
.brand .tag { font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; }

/* ---------- 버튼·입력 ---------- */
.btn {
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 8px 14px; border-radius: 10px; white-space: nowrap;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--grad); color: #fff; border: 0; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.dark { background: var(--navy); color: #fff; border: 0; }
.btn.danger { color: var(--bad); }
.btn.ok { color: var(--ok); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { min-height: 30px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; min-height: 46px; font-size: 15px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  border: 0; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; }

.field { margin-top: 14px; }
.field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.field .opt { font-weight: 400; color: var(--muted); }
.input, .field input:not([type=radio]):not([type=checkbox]), .field textarea, .field select {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--surface); outline: none;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; font-size: 14px; }
.seg input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--blue); flex: none; }

.msg { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-top: 14px; }
.msg.error { background: var(--bad-bg); color: var(--bad); }
.msg.success { background: var(--ok-bg); color: var(--ok); }
.msg.info { background: var(--accent-soft); color: var(--accent-ink); }

.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.badge.active { background: var(--ok-bg); color: var(--ok); }
.badge.pending { background: var(--warn-bg); color: var(--warn); }
.badge.suspended, .badge.rejected { background: var(--bad-bg); color: var(--bad); }
.badge.neutral { background: var(--surface-2); color: var(--muted); }

.meter { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; min-width: 2px; }
.meter.hot > i { background: var(--bad); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px;
  box-shadow: var(--shadow); max-width: calc(100% - 32px);
}
@media (prefers-color-scheme: dark) { .toast { background: #E8EBF7; color: var(--navy); } }

/* ---------- 팝오버·모달 ---------- */
.pop {
  position: absolute; z-index: 40; min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.pop .item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px;
  background: none; text-align: left; font-size: 14px;
}
.pop .item:hover, .pop .item:focus-visible { background: var(--hover); outline: none; }
.pop .item .sub { display: block; font-size: 12.5px; color: var(--muted); }
.pop .item .check-mark { margin-left: auto; color: var(--accent); }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(8, 12, 30, .45); display: grid; place-items: center; padding: 16px; }
.modal {
  width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
}
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; background: var(--bg); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 4px 20px 22px; }
.section + .section, .tiles + .section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.section h3 { margin: 0 0 10px; font-size: 15px; }
@media (max-width: 640px) {
  .modal-bg { padding: 0; place-items: end stretch; }
  .modal { width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0; }
}

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .sub { font-size: 12.5px; color: var(--muted); }

/* 수치 카드 */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); }
.tile .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.tile .v { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.tile.feature { background: var(--grad); color: #fff; border: 0; }
.tile.feature .k, .tile.feature .s { color: rgba(255, 255, 255, .82); }
.tile.feature .meter { background: rgba(255, 255, 255, .25); }
.tile.feature .meter > i { background: #fff; }

/* 막대 차트 (일별) */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .bar { fill: var(--accent); pointer-events: none; }
.chart .bar.dim { fill: var(--accent); opacity: .35; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .bar.on { fill: var(--accent-ink); opacity: 1; }
.tip {
  position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, calc(-100% - 8px));
  background: var(--navy); color: #fff; font-size: 12.5px; line-height: 1.45; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .tip { background: #E8EBF7; color: var(--navy); } }

/* 비율 막대 (모델별) */
.share li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.share .name { font-weight: 600; font-size: 14px; }
.share .val { font-variant-numeric: tabular-nums; font-size: 14px; }
.share .meter { grid-column: 1 / -1; height: 5px; }

/* ---------- 로그인·가입 ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; background:
  radial-gradient(1200px 500px at 50% -10%, rgba(143, 166, 255, .22), transparent 60%), var(--bg); }
.auth-box { width: min(420px, 100%); }
.auth-logo { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 22px; }
.auth-logo img { width: 64px; height: 64px; }
.auth-logo .wordmark { font-size: 34px; margin-top: 10px; }
.auth-logo p { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow-sm); }
.auth-card h1 { font-size: 20px; margin: 0 0 4px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.auth-foot { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.auth-foot a { color: var(--muted); }
.copyright { font-size: 12px; color: var(--muted); line-height: 1.5; }
.copyright a { color: var(--muted); }
.auth-foot .copyright { margin-top: 6px; }
.doc-foot { text-align: center; padding: 8px 16px 32px; }

/* ---------- 채팅 앱 ---------- */
.app { display: grid; grid-template-columns: 268px 1fr; height: 100dvh; }
.side {
  display: flex; flex-direction: column; min-height: 0; background: var(--side); border-right: 1px solid var(--line);
}
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 8px 16px; }
.side-new { margin: 6px 10px 10px; justify-content: flex-start; gap: 10px; min-height: 40px; background: var(--surface); }
.side-list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.side-group { font-size: 12px; font-weight: 600; color: var(--muted); padding: 14px 10px 6px; }
.convo {
  position: relative; display: flex; align-items: center; width: 100%; border: 0; background: none; border-radius: 9px;
  padding: 8px 10px; text-align: left; font-size: 14px; color: var(--text-2);
}
.convo span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.convo:hover, .convo.on { background: var(--hover); color: var(--text); }
.convo .del { display: none; margin: -6px -6px -6px 4px; width: 28px; height: 28px; }
.convo:hover .del, .convo.on .del, .convo .del:focus-visible { display: inline-grid; }
.side-empty { padding: 16px 12px; font-size: 13px; color: var(--muted); }

.side-usage { margin: 0 10px 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; width: calc(100% - 20px); }
.side-usage:hover { border-color: var(--line-2); }
.side-usage .row { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 7px; color: var(--muted); }
.side-usage .row b { color: var(--text); font-weight: 600; }
.side-user { display: flex; align-items: center; gap: 10px; width: calc(100% - 16px); margin: 0 8px 10px; padding: 8px; border: 0; border-radius: 12px; background: none; text-align: left; }
.side-user:hover { background: var(--hover); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: 14px; flex: none; }
.side-user .nm { font-size: 14px; font-weight: 600; line-height: 1.3; }
.side-user .rl { font-size: 12px; color: var(--muted); line-height: 1.3; }

.main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-head { display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 12px; flex: none; }
.model-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 7px 10px; border-radius: 10px; font-size: 16px; font-weight: 600; min-width: 0; max-width: 100%; white-space: nowrap; }
.model-btn:hover { background: var(--hover); }
.model-btn small { font-size: 13px; color: var(--muted); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-head .model-btn { flex: 0 1 auto; }
.only-m { display: none !important; }

.thread { flex: 1; overflow-y: auto; min-height: 0; }
.col { width: min(768px, 100%); margin: 0 auto; padding: 0 20px; }
.msgs { padding: 12px 0 32px; }
.m-user { display: flex; flex-direction: column; align-items: flex-end; margin: 22px 0 6px; }
.m-user .bubble { max-width: 82%; background: var(--bubble); padding: 10px 16px; border-radius: 20px; white-space: pre-wrap; }
.mask-chip {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 12px; color: var(--muted);
}
.mask-chip:hover { color: var(--accent-ink); border-color: var(--accent); }
.mask-chip .icon { width: 14px; height: 14px; }
.sent-view { max-width: 82%; margin-top: 6px; padding: 10px 14px; border-radius: 14px; border: 1px dashed var(--line-2); font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; }
.sent-view .cap { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.ph { background: var(--mark); color: var(--accent-ink); border-radius: 5px; padding: 0 3px; font-weight: 600; }
.ph.tap { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.ph.tap:hover, .ph.tap:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tok-pop .item { display: block; width: 100%; text-align: left; }

.m-ai { display: flex; gap: 14px; margin: 22px 0 6px; }
.m-ai > img { width: 28px; height: 28px; flex: none; margin-top: 2px; }
.m-ai .body { flex: 1; min-width: 0; }
.m-ai .actions { display: flex; gap: 2px; margin: 6px 0 0 -6px; }
.m-ai .actions .icon-btn { width: 30px; height: 30px; }
.m-ai .err { color: var(--bad); background: var(--bad-bg); padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.m-ai .err .btn { margin-top: 8px; }
.restored { background: var(--mark); color: inherit; border-radius: 4px; padding: 0 2px; cursor: help; text-decoration: underline 1.5px color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; }
.typing::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 3px; border-radius: 50%; background: var(--text); vertical-align: middle; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* 마크다운 */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md pre, .md blockquote, .md table { margin: 0 0 14px; }
.md h1, .md h2, .md h3, .md h4 { margin: 22px 0 10px; line-height: 1.35; }
.md h1 { font-size: 21px; } .md h2 { font-size: 18.5px; } .md h3 { font-size: 16.5px; } .md h4 { font-size: 15px; }
.md ul, .md ol { padding-left: 24px; }
.md li { margin: 4px 0; }
.md li > ul, .md li > ol { margin: 4px 0; }
.md code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.md pre { position: relative; background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.md pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.md pre .lang { position: absolute; top: 6px; right: 10px; font-size: 11.5px; color: var(--muted); font-family: var(--font); }
.md blockquote { border-left: 3px solid var(--line-2); padding: 2px 0 2px 14px; color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.md table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 14px; }
.md th, .md td { border: 1px solid var(--line); padding: 7px 11px; text-align: left; }
.md th { background: var(--surface-2); font-weight: 600; }

/* 입력창 */
.dock { flex: none; padding: 0 0 10px; background: var(--bg); }
.composer {
  position: relative; border: 1px solid var(--line-2); background: var(--surface); border-radius: 26px;
  padding: 12px 12px 10px 18px; box-shadow: var(--shadow-sm);
}
.composer:focus-within { border-color: var(--periwinkle); box-shadow: 0 0 0 4px var(--accent-soft); }
.composer textarea {
  display: block; width: 100%; border: 0; outline: none; background: none; resize: none;
  font-size: 15.5px; line-height: 1.55; max-height: 220px; min-height: 26px; padding: 2px 0;
}
.composer textarea::placeholder { color: var(--muted); }
.composer .bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.shield {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); background: none; color: var(--muted);
}
.shield .icon { width: 15px; height: 15px; }
.shield.live { color: var(--accent-ink); border-color: transparent; background: var(--accent-soft); }
.send {
  margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--navy); color: #fff;
}
@media (prefers-color-scheme: dark) { .send { background: #E8EBF7; color: var(--navy); } }
.send:disabled { opacity: .3; cursor: default; }
.send .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.disclaimer { text-align: center; font-size: 12px; color: var(--muted); padding: 8px 12px 0; }

/* 첨부 */
.composer.drag { border-color: var(--accent); border-style: dashed; background: var(--accent-soft); }
.composer .clip { width: 32px; height: 32px; margin-left: -6px; }
.attach-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px -6px; }
.file-chip {
  display: flex; align-items: center; gap: 10px; max-width: 280px; padding: 7px 6px 7px 8px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
}
.file-chip .file-ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; }
.file-chip .file-ic .icon { width: 17px; height: 17px; }
.file-chip .file-tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.file-chip .file-tx b { font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-chip .file-tx span { font-size: 12px; color: var(--muted); }
.file-chip .icon-btn { width: 26px; height: 26px; flex: none; }
.file-chip.loading .file-ic { background: var(--line-2); animation: blink 1.2s infinite; }
.attach-warn { width: 100%; font-size: 12.5px; color: var(--bad); padding-left: 6px; }
.m-files { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 6px; max-width: 82%; }
.m-files .file-chip { padding-right: 12px; background: var(--surface); }
.sent-view { max-height: 320px; overflow-y: auto; }

/* ---------- 가림 엔진 화면 요소 ---------- */
/* 보기 전환: 내 화면 / AI가 본 글 */
.view-seg { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.view-seg .vs-pill { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--surface); box-shadow: 0 1px 2px rgba(11,19,48,.12), 0 1px 6px rgba(11,19,48,.06); transition: transform .2s ease; }
.view-seg.ai .vs-pill { transform: translateX(100%); }
.view-seg button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; cursor: pointer; transition: color .15s; }
.view-seg button .icon { width: 15px; height: 15px; }
.view-seg button[aria-checked=true] { color: var(--text); }
.view-seg button:hover { color: var(--text-2); }
@media (prefers-color-scheme: dark) {
  .view-seg { background: rgba(255,255,255,.05); }
  .view-seg .vs-pill { background: rgba(255,255,255,.16); box-shadow: none; }
}
@media (max-width: 640px) { .view-seg button { padding: 5px 10px; font-size: 12.5px; } }
@media (prefers-reduced-motion: reduce) { .view-seg .vs-pill { transition: none; } }
.override-note { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad); font-size: 13px; font-weight: 600; }

/* 사건 */
.case-words { display: flex; gap: 6px; flex-wrap: wrap; }
.case-words button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 2px 9px; font-size: 12px; color: var(--text-2); }
.case-words button:hover { border-color: var(--line-2); color: var(--text); }
.case-words b { color: var(--accent-ink); }
.convo .pin { display: inline-grid; margin-right: 6px; color: var(--muted); }
.convo .pin .icon { width: 13px; height: 13px; }
.icon-btn .icon path[d^="M5 12h.01"], .convo .del .icon { stroke-width: 2.6; }
.pop .item.danger { color: var(--bad); }

/* 탐지 AI 상태 줄 */
.ai-line { display: flex; align-items: center; gap: 8px; margin: 0 10px 6px; padding: 6px 10px; border: 0; background: none; border-radius: 8px; font-size: 12.5px; color: var(--muted); text-align: left; }
.ai-line:hover { background: var(--hover); }
.ai-line i, .status-line i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.ai-line.on, .status-line.on { color: var(--ok); }
.ai-line.on i, .status-line.on i { background: var(--ok); }
.ai-line.busy i, .status-line.busy i { background: var(--warn); animation: blink 1s infinite; }
.ai-line.err, .status-line.err { color: var(--bad); }
.ai-line.err i, .status-line.err i { background: var(--bad); }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text-2); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg-col { flex-direction: column; }
.seg-col label span { display: block; border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.seg-col label small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.flow li { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.flow b { display: block; color: var(--text); margin-bottom: 2px; }
.hero .ai-hint { margin: 14px 0 0; font-size: 13.5px; }

/* 입력창의 '보낼 때 가릴 것' */
.live { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; font-size: 12.5px; color: var(--muted); }
.live .icon { width: 15px; height: 15px; }
.live-idle, .live-lbl { display: inline-flex; align-items: center; gap: 5px; }
.live-lbl { color: var(--accent-ink); font-weight: 600; }
.live-bad { color: var(--bad); }
.live .chip { font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.live .chip.j { background: var(--warn-bg); color: var(--warn); }
.live .chip.ai { background: var(--ok-bg); color: var(--ok); }

/* 첨부 칩 */
.file-chip .file-ic { font-size: 10.5px; font-weight: 800; letter-spacing: .02em; }
.file-chip.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.file-chip.bad .file-ic { background: var(--bad); }
.file-chip.bad .file-tx span { color: var(--bad); white-space: normal; }
.file-chip.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.file-chip .btn.sm { min-height: 26px; padding: 2px 8px; font-size: 12px; }
.file-chip { max-width: 360px; }

/* 보낸 말풍선 */
mark.src { background: none; color: inherit; text-decoration: underline 2px color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 3px; }
.file-card { width: 100%; max-width: 480px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.file-card summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; }
.file-card summary::-webkit-details-marker { display: none; }
.file-card .file-ic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 10.5px; font-weight: 800; flex: none; }
.file-card .file-tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; text-align: left; }
.file-card .file-tx b { font-size: 13.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-card .file-tx span { font-size: 12px; color: var(--muted); }
.file-card .file-body { max-height: 320px; overflow: auto; padding: 10px 14px; border-top: 1px solid var(--line); white-space: pre-wrap; font-size: 13px; color: var(--text-2); text-align: left; }
.m-files { flex-direction: column; align-items: flex-end; }
.sent-as { max-width: 82%; margin-top: 6px; text-align: right; }
.sent-as summary { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; color: var(--muted); cursor: pointer; list-style: none; }
.sent-as summary::-webkit-details-marker { display: none; }
.sent-as summary .icon { width: 14px; height: 14px; }
.sent-as[open] summary { color: var(--accent-ink); border-color: var(--accent); }
.sent-as .sent-view { margin-top: 6px; text-align: left; max-width: 100%; }
.m-ai .actions .foot { align-self: center; margin-left: 6px; font-size: 12px; color: var(--muted); }

/* 보내기 전 확인 창 */
.c-sub p { margin: 0 0 4px; font-size: 13.5px; color: var(--text-2); }
.msg.warn { background: var(--warn-bg); color: var(--warn); display: grid; gap: 4px; }
.tier { margin-top: 16px; }
.tier h4 { margin: 0 0 6px; font-size: 14px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tier h4 span { font-size: 12px; font-weight: 500; color: var(--muted); }
.tier.judged h4 { color: var(--warn); }
.c-row { padding: 8px 0; border-top: 1px solid var(--line); }
.c-what { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-what .kind { display: inline-flex; align-items: center; gap: 2px; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid transparent; border-radius: 6px; padding: 1px 4px 1px 7px; cursor: pointer; }
.c-what .kind .icon { width: 12px; height: 12px; }
.c-what .kind:hover, .c-what .kind:focus-visible { border-color: var(--accent); color: var(--accent-ink); }
.c-what .kind.unsure { border: 1px dashed var(--line-2); }
.c-what .val { font-weight: 700; word-break: break-all; }
.c-what .cnt { font-size: 12px; color: var(--muted); }
.badge.keep { background: var(--accent-soft); color: var(--accent-ink); }
.badge.ai { background: var(--ok-bg); color: var(--ok); }
.c-row.c-once .val, .c-row.c-never .val { text-decoration: line-through 1.5px; color: var(--muted); }
.c-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.c-opts .opt { position: relative; display: inline-flex; align-items: center; padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12.5px; cursor: pointer; }
.c-opts .opt input { position: absolute; opacity: 0; pointer-events: none; }
.c-opts .opt.on.o-keep { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.c-opts .opt.on.o-once { border-color: var(--warn); background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.c-opts .opt.on.o-never { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); font-weight: 700; }
.c-opts .opt.dis { opacity: .4; cursor: not-allowed; }
.c-opts .opt:has(input:focus-visible) { outline: 2px solid var(--accent); }
.rnote { margin: 6px 0 0; font-size: 12.5px; color: var(--bad); }
.older { margin-top: 14px; }
.older summary, .pv summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.add-row { display: flex; gap: 8px; margin-top: 16px; }
.add-row .input { flex: 1; min-height: 40px; }
.pv { margin-top: 14px; }
.pv .sent-view { margin-top: 8px; max-width: 100%; }
.c-foot { position: sticky; bottom: -22px; display: flex; justify-content: flex-end; gap: 8px; margin: 18px -20px -22px; padding: 12px 20px 16px; background: var(--bg); border-top: 1px solid var(--line); }
.reading { padding: 8px 0 4px; font-size: 14px; }
.reading .meter > i { width: 0; transition: width .2s; }

/* 빈 화면 (새 채팅) */
.hero { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 100%; padding: 24px 0 8vh; }
.hero img { width: 52px; height: 52px; }
.hero h1 { font-size: 27px; font-weight: 700; letter-spacing: -.02em; margin: 14px 0 6px; }
.hero p { margin: 0 0 26px; color: var(--muted); }
.hero .composer-slot { width: 100%; text-align: left; }
.hero .suggest, .case-home .suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.hero .suggest button, .case-home .suggest button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; color: var(--text-2); }
.hero .suggest button:hover, .case-home .suggest button:hover { background: var(--hover); color: var(--text); }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .app.side-open .side { transform: none; }
  .side-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(8, 12, 30, .4); }
  .only-m { display: inline-grid !important; }
  .col { padding: 0 14px; }
  .m-user .bubble, .sent-view { max-width: 90%; }
  .m-ai { gap: 10px; }
  .m-ai > img { width: 24px; height: 24px; }
  .hero h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } .typing::after { animation: none; } }

/* ---------- 운영자 콘솔 ---------- */
.console { display: grid; grid-template-columns: 232px 1fr; min-height: 100dvh; }
.console .side { position: sticky; top: 0; height: 100dvh; }
.nav { padding: 8px 10px; display: grid; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; border-radius: 10px;
  padding: 9px 12px; font-size: 14.5px; color: var(--text-2); text-align: left;
}
.nav button:hover { background: var(--hover); color: var(--text); }
.nav button[aria-current=page] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--warn-bg); color: var(--warn); border-radius: 999px; padding: 1px 8px; }
.console-main { min-width: 0; padding: 28px 32px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; }
.monthnav { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 2px; background: var(--surface); }
.monthnav b { min-width: 104px; text-align: center; font-size: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.panel h2 { font-size: 15px; margin: 0 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.panel h2 small { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; margin-top: 14px; }
.stack > * + * { margin-top: 14px; }
.console .tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }   /* 대시보드 숫자 칸은 한 줄로(칸 수만큼 나눔) */
@media (max-width: 1280px) { .console .tiles { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile .tag-note { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; margin-left: 6px; vertical-align: 1px; }
.tile.feature .tag-note { color: #fff; border-color: rgba(255,255,255,.4); }
.tile.link { cursor: pointer; }
.tile.link:hover { border-color: var(--line-2); }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--surface-2); }
.who b { display: block; font-weight: 600; }
.who span { display: block; font-size: 12.5px; color: var(--muted); }
.over { color: var(--bad) !important; font-weight: 600; }
.empty { color: var(--muted); padding: 28px 0; text-align: center; font-size: 14px; }
.table-wrap { overflow-x: auto; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; color: var(--text-2); }
.chips button[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.chips .n { color: var(--muted); margin-left: 4px; font-weight: 500; }
.search { max-width: 280px; min-height: 38px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); }

.drawer-bg { position: fixed; inset: 0; z-index: 55; background: rgba(8, 12, 30, .4); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); z-index: 56; overflow-y: auto;
  background: var(--bg); border-left: 1px solid var(--line); padding: 20px 20px 40px; box-shadow: var(--shadow);
}
.drawer .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.drawer h1 { margin: 0; font-size: 21px; }
.drawer .panel + .panel { margin-top: 12px; }
dl.info { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
dl.info dt { color: var(--muted); }
dl.info dd { margin: 0; word-break: break-all; }
.secret { font-family: var(--mono); font-size: 16px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 8px; padding: 10px 12px; user-select: all; }
.two-field { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }

@media (max-width: 1080px) { .console .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .console { grid-template-columns: 1fr; }
  .console .side { position: sticky; top: 0; inset: auto; width: auto; transform: none; transition: none; box-shadow: none; height: auto; z-index: 10; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .console .side .side-top { padding: 10px 8px 10px 14px; }
  .console .side .nav { display: flex; padding: 6px; }
  .console .side .nav button { white-space: nowrap; padding: 7px 10px; }
  .console .side .nav-foot { display: none; }
  .console-main { padding: 18px 14px 48px; }
  .hide-m { display: none; }
  .tbl th, .tbl td { padding: 9px 6px; }
}
@media (max-width: 480px) { .console .tiles { grid-template-columns: 1fr; } .two-field { grid-template-columns: 1fr; } }

/* ---------- 문서 페이지 (약관 등) ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 20px 60px; }
.narrow { max-width: 720px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 14px; }
.card h1 { font-size: 22px; margin: 0 0 8px; }
.card h2 { font-size: 16px; margin: 22px 0 6px; }
.card p { margin: 0 0 8px; color: var(--text-2); }

/* ---------- v5: 사건 폴더 ---------- */
.side-group.with-btn { display: flex; align-items: center; justify-content: space-between; padding-right: 4px; }
.side-group.with-btn .icon-btn { width: 28px; height: 28px; color: var(--muted); }
.side-group.with-btn .icon-btn:hover { color: var(--accent-ink); }
.side-group.sec { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 16px; }
.folder-empty { display: block; width: 100%; margin: 2px 0 4px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; background: none; font-size: 13px; color: var(--muted); text-align: left; }
.folder-empty p { margin: 0 0 4px; line-height: 1.5; }
.folder-empty .fe-ex { font-size: 12px; margin-bottom: 8px; }
.folder-empty .btn .icon { width: 14px; height: 14px; }
.folder-row {
  display: flex; align-items: center; gap: 4px; width: 100%; border-radius: 9px; padding: 6px 6px 6px 2px;
  font-size: 14px; color: var(--text-2); cursor: pointer;
}
.folder-row:hover, .folder-row.on { background: var(--hover); color: var(--text); }
.folder-row.in .folder-nm { color: var(--text); font-weight: 600; }
.folder-row .chev { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 0; background: none; border-radius: 6px; color: var(--muted); padding: 0; }
.folder-row .chev:hover { background: var(--line); }
.folder-row .chev .icon { width: 14px; height: 14px; transition: transform .15s; }
.folder.open .chev .icon { transform: rotate(90deg); }
.folder-ic { display: inline-grid; color: var(--accent); }
.folder-ic .icon { width: 17px; height: 17px; }
.folder-nm { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.folder-n { font-size: 12px; color: var(--muted); min-width: 14px; text-align: right; }
.folder-row .del { display: none; width: 28px; height: 28px; margin: -6px -4px -6px 0; }
.folder-row:hover .del, .folder-row.on .del, .folder-row .del:focus-visible { display: inline-grid; }
.folder-row:hover .folder-n, .folder-row.on .folder-n { display: none; }
.folder-items { position: relative; margin: 0 0 4px 22px; padding-left: 6px; border-left: 1px solid var(--line); }
.folder-items .convo { padding: 6px 10px; font-size: 13.5px; }
.folder-new { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; border-radius: 9px; padding: 6px 10px; font-size: 13px; color: var(--muted); text-align: left; }
.folder-new:hover { background: var(--hover); color: var(--accent-ink); }
.folder-new .icon { width: 14px; height: 14px; }

.case-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 40vw; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px 4px 9px; font-size: 13px; color: var(--text-2); }
.case-chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.case-chip .icon { width: 15px; height: 15px; color: var(--accent); flex: none; }
.case-chip:hover { border-color: var(--accent); color: var(--text); }
.case-chip[hidden] { display: none; }
.word-chips { display: inline-flex; align-items: center; gap: 4px; margin-left: 2px; }
.word-chips[hidden] { display: none; }
.word-chips .wc { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.word-chips .wc .icon { width: 13px; height: 13px; }
.word-chips .wc b { color: var(--text); font-weight: 650; }
.word-chips .wc.keep .icon { color: var(--accent); }
.word-chips .wc:hover { border-color: var(--accent); color: var(--text); }
@media (max-width: 640px) { .word-chips .wc { padding: 0 9px; font-size: 12px; } }

.case-home { padding-top: 7vh; padding-bottom: 40px; }
.case-title { display: flex; align-items: center; gap: 10px; }
.case-title h1 { flex: 1; min-width: 0; margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.folder-ic.big { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); place-items: center; }
.folder-ic.big .icon { width: 22px; height: 22px; }
.case-home .case-words { margin: 12px 0 18px; }
.case-home .case-words button { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; font-size: 12.5px; }
.case-home .case-words .icon { width: 13px; height: 13px; }
.case-note { margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); }
.case-list { margin-top: 28px; }
.case-list h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.case-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 4px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font-size: 14.5px; }
.case-item:last-child { border-bottom: 1px solid var(--line); }
.case-item .t { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.case-item .d { font-size: 12.5px; color: var(--muted); flex: none; }
.case-item:hover { background: var(--hover); }
.main.is-empty .case-home .composer-slot { width: 100%; }

.pop-title { padding: 8px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pop-empty { padding: 6px 10px 8px; font-size: 13px; color: var(--muted); }
.pop .item .icon { flex: none; }

/* ---------- v5: 모델 ID 표시 ---------- */
.model-id { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.model-btn .model-id { margin-left: 2px; }
.model-item .model-top { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.pop { max-width: calc(100vw - 16px); }
.pop-note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 4px 2px; padding: 8px 8px 4px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pop-note .icon { width: 14px; height: 14px; }
.m-ai .actions .foot.model { margin-left: auto; font-size: 12px; opacity: .8; }

/* ---------- v5: 이미지 ---------- */
.gen { margin: 4px 0 2px; }
.gen-fig { margin: 0; display: inline-flex; flex-direction: column; gap: 8px; max-width: 100%; }
.gen-img, .gen-wait { display: block; border-radius: 16px; border: 1px solid var(--line); background: var(--code-bg); max-width: min(100%, 512px); }
.gen-img.sq, .gen-wait.sq { width: 512px; aspect-ratio: 1; }
.gen-img.wide, .gen-wait.wide { width: 560px; aspect-ratio: 3 / 2; }
.gen-img.tall, .gen-wait.tall { width: 400px; aspect-ratio: 2 / 3; }
.gen-img { object-fit: cover; }
.gen-fig figcaption { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.gen-wait { position: relative; overflow: hidden; }
.gen-shimmer { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 20%, var(--accent-soft) 45%, transparent 70%); background-size: 250% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.gen-wait-tx { position: absolute; left: 16px; bottom: 14px; display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.gen-wait-tx .icon { width: 16px; height: 16px; color: var(--accent); }
.gen-prompt { font-size: 13px; color: var(--muted); padding-top: 5px; }
.gen-prompt summary { cursor: pointer; }
.gen-desc { margin-top: 6px; padding: 8px 12px; border-radius: 10px; background: var(--code-bg); color: var(--text-2); white-space: pre-wrap; max-width: 512px; }
.gen-warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; max-width: 560px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; line-height: 1.5; }
.gen-warn .icon { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.gen-warn b { font-weight: 700; }
.gen-gone { padding: 14px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13.5px; max-width: 512px; }
.gen .err { margin-bottom: 6px; }

/* ---------- v5: 설정·탐지 개선 ---------- */
details.adv { margin-top: 10px; font-size: 13.5px; }
details.adv summary { cursor: pointer; color: var(--muted); }
details.adv[open] summary { margin-bottom: 4px; }
.add-row .add-kind { flex: 0 0 auto; width: auto; padding-right: 8px; }
.fb-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.fb-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.fb-item.off { opacity: .5; }
.fb-item input { margin-top: 4px; }
.fb-kind { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.fb-kind .sub { font-weight: 400; color: var(--muted); margin-left: 8px; }
.fb-text { font-size: 14px; line-height: 1.6; color: var(--text-2); }
.fb-text mark.fake { background: none; color: var(--accent-ink); border-bottom: 2px solid var(--accent); }
.fb-text mark.keep { background: var(--warn-bg); color: var(--warn); border-radius: 4px; padding: 0 2px; }
.fb-text mark.tgt { font-weight: 700; }
.c-foot .btn b { margin: 0 1px; }

@media (max-width: 760px) {
  .model-btn .model-id { display: none; }
  .case-chip { max-width: 34vw; }
  .case-home { padding-top: 3vh; }
  .gen-img.sq, .gen-wait.sq, .gen-img.wide, .gen-wait.wide, .gen-img.tall, .gen-wait.tall { width: 100%; }
}
.gen-fig figcaption { align-items: center; }
.gen-prompt { padding-top: 0; }
.gen-prompt[open] { flex-basis: 100%; }
.m-ai .err .err-detail { margin-top: 4px; font-family: var(--mono); font-size: 12px; opacity: .85; }
.pop { z-index: 70; } /* 확인 창(모달) 위에서도 메뉴가 보이도록 */
.pop { max-height: calc(100vh - 16px); overflow-y: auto; }
.pop.kinds { width: min(360px, calc(100vw - 16px)); overflow-x: hidden; }
.kind-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px; }
.kind-grid .item { padding: 7px 6px; font-size: 13px; line-height: 1.25; justify-content: center; text-align: center; white-space: normal; word-break: keep-all; min-width: 0; }
.kind-grid .item.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.folder-none { padding: 6px 10px; font-size: 12.5px; color: var(--muted); }
.brand-for { font-family: "Garigo Wordmark", var(--font); font-weight: 800; font-size: 12.5px; letter-spacing: -.01em; color: var(--accent); align-self: flex-end; margin: 0 0 1px -3px; white-space: nowrap; }
.tier.as h4 { color: var(--accent-ink); }
.tier-note { margin: -2px 0 10px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.c-what .kind.static { cursor: default; padding-right: 7px; }
.c-opts .opt.on.o-band { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); font-weight: 700; }
.c-opts .opt.on.o-send { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); font-weight: 700; }
.live .chip.as { background: var(--accent-soft); color: var(--accent-ink); }
.sub-set { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.sub-set h4 { margin: 0 0 6px; font-size: 14px; }
.shots { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.shots figure { margin: 0; }
.shot { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--code-bg); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; display: block; }
.shot-box { position: absolute; padding: 0; border: 0; border-radius: 3px; cursor: pointer; display: grid; place-items: center; overflow: hidden; }
.shot-box.on { background: rgba(11, 19, 48, .92); color: #fff; }
.shot-box.on span { font-size: 10px; font-weight: 700; white-space: nowrap; }
.shot-box.off { background: rgba(31, 122, 69, .08); outline: 2px dashed var(--ok); }
.shot-box.band { background: rgba(154, 91, 0, .15); outline: 2px dashed var(--warn); }
.shots figcaption { margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
/* 단어 목록 고치기 */
.list.words li { gap: 8px; }
.words .w-main { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.words .w-kind { display: inline-flex; align-items: center; gap: 2px; border: 1px solid transparent; cursor: pointer; font: inherit; font-size: 12px; }
.words .w-kind .icon { width: 12px; height: 12px; }
.words .w-kind:hover { border-color: var(--accent); color: var(--accent-ink); }
.words .w-text { border: 0; background: none; padding: 2px 4px; margin-left: -4px; border-radius: 6px; font: inherit; color: var(--text); text-align: left; cursor: text; overflow-wrap: anywhere; }
.words button.w-text:hover { background: var(--hover); }
.words .w-acts { display: flex; gap: 2px; flex: none; }
.words .w-edit { display: flex; gap: 6px; align-items: center; }
.words .w-edit .input { min-height: 36px; }
.words .w-edit input.input { flex: 1; min-width: 0; }
.kind-sel { flex: 0 0 auto; width: auto; min-width: 104px; }
.words .w-del { flex-wrap: wrap; background: var(--bad-bg); border-radius: 10px; padding: 10px 12px; }
.words .w-del .w-text { cursor: default; }
.words .w-ask { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--bad); }
.add-row .kind-sel, .add-row .add-kind { flex: 0 0 auto; width: auto; min-width: 110px; }
.words .w-del .btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.side-user .rl.acct { display: flex; align-items: center; gap: 6px; min-width: 0; }
.side-user .rl .org { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.biz-chip { flex: none; font-size: 10.5px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); border-radius: 5px; padding: 0 5px; line-height: 17px; }
.side-user > span:last-child { flex: 1; }
.pop .model-item.locked { opacity: .55; cursor: not-allowed; }
.pop .model-item.locked:hover { background: none; }
.lock-tag { font-size: 10.5px; font-weight: 700; color: var(--warn); background: var(--warn-bg); border-radius: 5px; padding: 0 5px; line-height: 17px; }
dl.kv { display: grid; grid-template-columns: 88px 1fr; gap: 10px 12px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); padding-top: 1px; }
dl.kv dd { margin: 0; }
dl.kv .hint { margin-top: 2px; }
/* 확인 창: 값 고치기·나누기 */
.c-what .fix-btn { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; padding: 2px 6px; border-radius: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.c-what .fix-btn .icon { width: 13px; height: 13px; }
.c-what .fix-btn:hover { background: var(--hover); color: var(--accent-ink); }
.c-row.c-edit { background: var(--surface-2); border-radius: 12px; padding: 12px; margin: 6px 0; }
.fix-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.fix-head .val { font-weight: 700; word-break: break-all; }
.fix-note { margin: 6px 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.fix-parts { display: flex; flex-direction: column; gap: 6px; }
.fix-part { display: flex; gap: 6px; align-items: center; }
.fix-part .input { min-height: 36px; }
.fix-part input.input { flex: 1; min-width: 0; }
.fix-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.badge.check { background: var(--warn-bg); color: var(--warn); }
.live .chip.weak { background: var(--surface-2); color: var(--muted); }
details.older.weak summary { color: var(--muted); }

/* 이미지 그대로 보내기 */
.file-chip.raw { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); background: var(--warn-bg); }
.file-chip.raw .file-tx span { color: var(--warn); font-weight: 600; }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.raw-warn { margin: 0 0 12px; }
.raw-warn b { display: flex; gap: 7px; align-items: flex-start; }
.raw-warn .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.raw-warn p { margin: 4px 0 0; color: var(--text-2); font-weight: 400; }
.raw-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.raw-thumbs figure { margin: 0; width: 132px; }
.raw-thumbs img { width: 132px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; background: var(--surface); }
.raw-thumbs figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-imgs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 6px; max-width: 82%; margin-left: auto; }
.m-imgs figure { margin: 0; }
.m-imgs img { max-width: 260px; max-height: 260px; width: auto; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }
.m-imgs-note { flex-basis: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 5px; font-size: 12px; color: var(--warn); }
.m-imgs-note .icon { width: 14px; height: 14px; }
@media (max-width: 640px) { .m-imgs img { max-width: 70vw; } }

/* 약관·처리방침 */
.card.legal h2 { font-size: 16px; margin: 22px 0 6px; }
.card.legal p { line-height: 1.75; margin: 0 0 8px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0 12px; min-width: 560px; }
.legal-table th, .legal-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; line-height: 1.6; }
.legal-table th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }

/* 웹 검색 */
.searching { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; margin: 2px 0 8px; }
.searching .icon { width: 16px; height: 16px; animation: spin-slow 2.4s linear infinite; }
.searching .q { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .searching .icon { animation: none; } }
.md a.cite-chip, a.cite-chip { display: inline-block; padding: 0 7px; margin: 0 1px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12px; line-height: 20px; text-decoration: none; vertical-align: 1px; }
a.cite-chip:hover { background: var(--hover); color: var(--text); }
.sources { margin: 10px 0 4px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--surface); }
.sources summary { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); list-style: none; }
.sources summary::-webkit-details-marker { display: none; }
.sources summary .icon { width: 15px; height: 15px; }
.sources summary .q { font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sources ol { list-style: none; margin: 8px 0 2px; padding: 0; display: grid; gap: 2px; }
.sources li a { display: flex; align-items: baseline; gap: 8px; padding: 5px 6px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13.5px; min-width: 0; }
.sources li a:hover { background: var(--hover); }
.sources .n { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.sources .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sources .d { flex: none; color: var(--muted); font-size: 12px; }

/* 체험 한도 안내 */
.notice-bar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; font-weight: 600; border-bottom: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.notice-bar[hidden] { display: none; }
.notice-bar .icon { width: 16px; height: 16px; flex: none; }
.notice-bar.bad { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.side-usage.low .row b { color: var(--warn); }

/* 운영자: 잔액·사용 시간 */
.credit-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.credit-row .muted { font-size: 12px; }
.credit-row b { font-size: 17px; }
.credit-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.credit-form input { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; flex: 1 1 140px; min-width: 0; }
.sub-h { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 16px 0 8px; }
.hour-bars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; align-items: end; height: 84px; }
.hour-bars .hb { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.hour-bars .hb i { display: block; width: 100%; min-height: 2px; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }
.hour-bars .hb span { font-size: 10px; color: var(--muted); height: 14px; line-height: 14px; }
.tbl.compact th, .tbl.compact td { padding: 6px 8px; font-size: 12.5px; }

@media (max-width: 640px) { .model-btn .mb-brand { display: none; } .model-btn small { font-size: 14px; color: var(--text); font-weight: 600; } }
/* 단어 목록 전체 삭제 */
.w-clear { margin-top: 12px; display: flex; justify-content: flex-end; }
.w-clear .btn { display: inline-flex; align-items: center; gap: 4px; }
.w-clear.ask { display: block; padding: 10px 12px; border: 1px solid var(--bad); border-radius: 10px; }
.w-clear.ask p { margin: 0 0 8px; font-size: 13px; color: var(--bad); }
.w-clear.ask .row-btns { justify-content: flex-end; flex-wrap: wrap; }
.w-clear.ask .btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.model-btn .mb-full { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; letter-spacing: -.1px; }
.sources { min-width: 0; overflow: hidden; }
.sources summary { white-space: nowrap; min-width: 0; }
.sources ol, .sources li { min-width: 0; }
@media (max-width: 640px) { .sources .d { display: none; } }
.auth-logo .brand-for { font-size: 15px; margin-left: 6px; letter-spacing: 0; }
.convo .pin { flex: none; }
.side-list > .convo .pin { display: none; }  /* '고정됨' 묶음 제목이 있으니 바깥 목록에서는 핀 표시 생략 */
.w-chat { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.w-chat .hint { margin: 0 0 8px; }
.w-chat .chips { margin-bottom: 8px; flex-wrap: wrap; }
.chip-static { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); font-size: 12.5px; color: var(--text-2); }
.oa-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.oa-links .btn { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.oa-links .icon { width: 13px; height: 13px; }

/* 본문(대화·입력창) 글씨 한 단계 크게, 대화 폭 넓혀 좌우 여백 줄이기. 사이드바·메뉴는 그대로 */
.thread, .dock { font-size: 16px; }
.col { width: min(880px, 100%); }
.composer textarea { font-size: 16.5px; }
.md h1 { font-size: 22px; } .md h2 { font-size: 19.5px; } .md h3 { font-size: 17.5px; } .md h4 { font-size: 16px; }
.md pre { font-size: 14.5px; }
.md table { font-size: 15px; }
.sent-view { font-size: 14.5px; }
.m-ai .err { font-size: 15px; }
/* 운영 설정 */
.set-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.set-row:first-child { border-top: 0; }
.set-main { min-width: 0; flex: 1 1 320px; }
.set-k { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.set-v { font-size: 13.5px; color: var(--text-2); margin: 2px 0 4px; }
.set-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.set-ctl input { min-height: 36px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); }
.set-apply { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; margin: 0 0 6px; border-radius: 10px; background: var(--surface-2); }
.set-apply .hint { margin: 0; }
/* 탐지 개선 참여 동의 (한 번만 묻는 작은 안내) */
.fb-ask { position: fixed; z-index: 900; right: 20px; bottom: 20px; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 40px rgba(11,19,48,.18); padding: 16px 16px 12px; }
.fb-ask-t { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.fb-ask-d { font-size: 13px; line-height: 1.6; color: var(--text-2); }
.fb-ask-b { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; }
.fb-ask-b a { color: var(--muted); }
@media (max-width: 640px) { .fb-ask { right: 16px; left: 16px; bottom: 16px; width: auto; } }

/* v5.56 — 이메일 인증번호 */
.email-row { display: flex; gap: 8px; }
.email-row input { flex: 1; min-width: 0; }
.email-row .btn { flex: none; white-space: nowrap; }
.forgot { text-align: right; margin-top: 8px; font-size: 13.5px; }

/* v5.57 — 입력창 아래 차단 강도, 미리 보기에서 드래그해 추가 */
.mask-btn { display: inline-flex; align-items: center; gap: 5px; flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 4px 10px 4px 8px; font-size: 12.5px; cursor: pointer; }
.mask-btn:hover { background: var(--hover); }
.mask-btn .icon { width: 15px; height: 15px; }
.mask-btn b { font-weight: 700; color: var(--accent-ink); }
.mask-btn.lv-strict b { color: var(--bad); }
.mask-btn.lv-light b { color: var(--warn); }
.mask-btn.lv-off { border-color: var(--bad); background: var(--bad-bg); }
.mask-btn.lv-off b { color: var(--bad); }
@media (max-width: 600px) { .mask-btn .mb-lbl { display: none; } }
.pv-hint { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent-ink); font-size: 13px; line-height: 1.5; }
.pv-hint > .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.pv-hint b { display: block; font-size: 14px; }
.pv-hint span { color: var(--text-2); }
.sent-view { user-select: text; -webkit-user-select: text; }
.pick-bar { position: fixed; z-index: 1000; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; max-width: min(520px, calc(100vw - 16px)); padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 8px 28px rgba(11, 19, 48, .18); font-size: 13px; }
.pick-bar .pick-more { display: inline-flex; align-items: center; gap: 3px; }
.pick-bar .pick-more .icon { width: 12px; height: 12px; }
.pick-bar.wide { max-width: min(560px, calc(100vw - 16px)); }
.pick-rest { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; padding-top: 6px; border-top: 1px dashed var(--line-2); }
.pick-lbl { color: var(--text-2); margin-right: 2px; }
.pick-bad { color: var(--warn); }

/* v5.63 — 확인이 필요한 것(2층 후보): 접힌 상태에서도 눈에 띄게 */

/* 미리 보기에서 방금 드래그해 가린 말: 잠깐 눈에 띄게 */
@keyframes ph-new { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); background: var(--accent); color: #fff; } 100% { box-shadow: 0 0 0 0 transparent; } }
.ph.new { animation: ph-new 2.4s ease-out 1; }
@keyframes row-new { 0%, 50% { background: color-mix(in srgb, var(--accent) 16%, transparent); } 100% { background: transparent; } }
.c-row.c-new { animation: row-new 2.4s ease-out 1; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { .ph.new, .c-row.c-new { animation: none; outline: 2px solid var(--accent); } }

/* 보내기 직전 최종 확인 */
.fin-list { display: grid; gap: 8px; max-height: 52vh; overflow: auto; }
.fin-why { margin: 2px 0 6px; font-size: 12.5px; color: var(--muted); }
.fin-ctx { margin: 6px 0 2px; display: grid; gap: 4px; }
.fin-line { font-size: 13.5px; line-height: 1.55; padding: 5px 9px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); word-break: break-all; }
.fin-line mark { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 -2px 0 var(--warn); font-weight: 700; border-radius: 4px; padding: 0 2px; }
.linkish { background: none; border: 0; padding: 2px 0; color: var(--accent); font-size: 12.5px; cursor: pointer; justify-self: start; }

/* 확인 창: 주소의 시·도·시·군·구 가리기 / 그대로 두기 */
.region-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.region-bar .rb-lbl { font-weight: 600; font-size: 14px; }
.region-bar .rb-note { flex-basis: 100%; font-size: 12.5px; color: var(--muted); }
.seg-sm { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.seg-sm button { border: 0; background: transparent; padding: 6px 14px; font-size: 13px; cursor: pointer; color: var(--text-2); }
.seg-sm button.on { background: var(--accent); color: #fff; font-weight: 600; }

/* v5.83 확인 창: 한 줄 + 가림 스위치 + 펼치기 */
.c-what .c-gap { flex: 1; min-width: 4px; }
.c-switch { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 3px 10px 3px 3px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; flex: none; }
.c-switch .knob { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); transition: transform .15s; }
.c-switch.on { background: var(--accent); border-color: var(--accent); color: #fff; padding: 3px 3px 3px 10px; flex-direction: row-reverse; }
.c-switch.on .knob { border-color: #fff; }
.c-row.c-never .c-switch { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.c-switch:focus-visible, .c-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.c-more { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.c-more:hover { background: var(--hover); }
.c-more .icon { width: 16px; height: 16px; transition: transform .15s; }
.c-more.open .icon { transform: rotate(180deg); }
.c-more-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.c-more-box .rnote { flex-basis: 100%; margin: 0; }
.c-more-box .fix-btn { margin-left: auto; }
/* 확실한 것: 한 줄 요약으로 접어 둠 */
.pv { margin-top: 10px; }
.c-foot .link-btn { border-color: transparent; background: transparent; color: var(--muted); font-size: 13px; padding-left: 4px; padding-right: 4px; }
.c-foot .link-btn:hover { color: var(--warn); background: var(--hover); }
.c-foot .link-btn .icon { width: 15px; height: 15px; }
@media (max-width: 600px) { .c-foot .link-btn { font-size: 12px; } }
.report-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.report-link:hover { color: var(--warn); }
.report-link .icon { width: 14px; height: 14px; }
.sent-as.none { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: 12.5px; color: var(--muted); }
.sent-as.none > .icon { width: 14px; height: 14px; }
.sent-as.none .report-link { margin-top: 0; }

/* 창이 열려 있으면 알림은 위쪽에 (아래 버튼을 가리지 않게) */
body:has(.modal-bg) .toast { bottom: auto; top: 18px; }
/* 첫 사용 안내 */
.intro { text-align: center; }
.intro .in-step { font-size: 12px; font-weight: 700; color: var(--accent-ink); letter-spacing: .04em; }
.intro h3 { margin: 6px 0 8px; font-size: 19px; }
.intro p { margin: 0 auto; max-width: 420px; color: var(--text-2); line-height: 1.6; }
.intro .in-demo { margin: 16px auto 4px; max-width: 440px; text-align: left; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; line-height: 1.7; }
.intro .in-demo .u { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.intro .in-dots { display: flex; justify-content: center; gap: 6px; margin: 16px 0 4px; }
.intro .in-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.intro .in-dots i.on { background: var(--accent); width: 18px; border-radius: 4px; }

/* 확인 창 한 줄의 세 갈래 선택 (가리기 / 이번만 보이기 / 항상 보이기) */
.c-seg { display: inline-flex; flex: none; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; background: var(--surface); }
.c-seg button { border: 0; border-left: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px; padding: 4px 11px; cursor: pointer; white-space: nowrap; }
.c-seg button:first-child { border-left: 0; }
.c-seg button:hover:not(:disabled):not(.on) { background: var(--hover); }
.c-seg button.on.o-keep { background: var(--accent); color: #fff; font-weight: 700; }
.c-seg button.on.o-once { background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.c-seg button.on.o-never { background: var(--bad-bg); color: var(--bad); font-weight: 700; }
.c-seg button:disabled { opacity: .35; cursor: not-allowed; }
.c-seg button:focus-visible, .c-fix:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.c-fix { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.c-fix .icon { width: 14px; height: 14px; }
/* 맥락 보기 */
.c-ctx { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; cursor: pointer; }
.c-ctx .icon { width: 13px; height: 13px; }
.c-ctx:hover { color: var(--text); border-color: var(--line-2); }
.c-ctx.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.c-ctx:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.c-ctxbox { margin: 8px 0 2px; }
.c-fix:hover { background: var(--hover); color: var(--accent-ink); }
.c-edit .icon { width: 12px; height: 12px; }
.c-row > .rnote { margin: 6px 0 0; }
@media (max-width: 560px) {
  .c-what .c-gap { flex-basis: 100%; height: 0; }
  .c-seg { flex: 1; }
  .c-seg button { flex: 1; padding: 6px 4px; }
}

/* AI 등급: 원두 세 알(진하기) + 'Garigo-'흐리게·등급 이름 진하게 + 성격 태그 */
.beans { display: inline-flex; gap: 3px; align-items: center; flex: none; }
.beans i { width: 7px; height: 9px; border-radius: 50%; background: var(--line-2); transform: rotate(-20deg); position: relative; }
.beans i.on { background: #7B4A2E; }
.beans i.on::after { content: ""; position: absolute; left: 3px; top: 1px; width: 1px; height: 7px; background: rgba(255,255,255,.55); border-radius: 1px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .beans i.on { background: #C88B5E; } }
:root[data-theme="dark"] .beans i.on { background: #C88B5E; }
.model-btn .mb-tier { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); }
.model-pop { min-width: 300px; }
.model-pop .pop-title { font-size: 12px; color: var(--muted); padding: 6px 12px 4px; font-weight: 600; }
.model-pop .model-item { display: flex; align-items: center; gap: 12px; }
.model-pop .model-item > .beans { width: 27px; justify-content: flex-start; }
.model-pop .mi-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.mname { font-weight: 700; letter-spacing: -.1px; }
.mname .mn-pre { color: var(--muted); font-weight: 500; }
.tier-tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.model-item.lv1 .tier-tag { background: var(--ok-bg); color: var(--ok); }
.model-item.lv2 .tier-tag { background: var(--accent-soft); color: var(--accent-ink); }
.model-item.lv3 .tier-tag { background: #F3E8DD; color: #7B4A2E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .model-item.lv3 .tier-tag { background: #3A2A20; color: #E0B08A; } }
:root[data-theme="dark"] .model-item.lv3 .tier-tag { background: #3A2A20; color: #E0B08A; }

/* 긴 대화 안내 (입력창 위) */
.long-note { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); line-height: 1.5; }
.long-note .icon { width: 16px; height: 16px; flex: none; color: var(--muted); }
.long-note span { flex: 1; }
.long-note .btn { flex: none; }
.long-note.hard { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.long-note.hard .icon { color: var(--warn); }

/* 답변이 길이 한도에서 끊겼을 때 */
.cut-note { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line-2); font-size: 13px; color: var(--text-2); }
.cut-note .icon { width: 15px; height: 15px; flex: none; color: var(--muted); }
.cut-note span { flex: 1; }

/* 사용량: 커피잔(한도 대비 마신 양)과 샷 */
.cup-row { display: flex; align-items: center; gap: 14px; margin: 6px 0 4px; }
.cup { width: 58px; height: 54px; flex: none; }
.cup .cup-line { fill: none; stroke: var(--text-2); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.cup .cup-coffee { fill: #7B4A2E; }
.cup .cup-crema { fill: #C99A6B; }
.cup.full .cup-coffee { fill: #A3412B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cup .cup-coffee { fill: #B07A52; } :root:not([data-theme="light"]) .cup .cup-crema { fill: #E0B48A; } }
:root[data-theme="dark"] .cup .cup-coffee { fill: #B07A52; }
:root[data-theme="dark"] .cup .cup-crema { fill: #E0B48A; }
.cup-cap { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.model-pop .shot-est { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tile.feature .cup .cup-line { stroke: #fff; }
.tile.feature .cup .cup-coffee { fill: #F3E3D3; }
.tile.feature .cup .cup-crema { fill: #fff; }
.tile.feature .cup-cap { color: rgba(255,255,255,.85); }

.case-greet { margin: 0 0 6px; font-size: 15px; color: var(--muted); font-weight: 500; }

/* 미리 보기: '가리지 않고 보냄(확인 권장)' 말 — 이번만 보이기와 같은 계통(옅은 바탕·짙은 갈색 글씨), 누르면 가리기 */
.pv-weak { background: var(--warn-bg); color: #6B3A1F; border-radius: 5px; padding: 0 3px; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.pv-weak:hover, .pv-weak:focus-visible { outline: 2px solid var(--warn); outline-offset: 1px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pv-weak { color: #F0C9A8; } }
:root[data-theme="dark"] .pv-weak { color: #F0C9A8; }
.pv-weak-note { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.pv-weak-note .pv-weak { cursor: default; text-decoration: none; }
.case-home .suggest { justify-content: flex-start; margin: 4px 0 14px; }
.hero .suggest button, .case-home .suggest button { font: inherit; font-size: 13.5px; cursor: pointer; }
.case-home .ai-hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.case-home .ai-hint .link { font-size: inherit; }
.case-home .hero-disc { text-align: left; padding: 6px 0 0; }

/* 확인 창 세 묶음: 같은 모양, 색으로 구별 — 확실(파랑) · 추정(청록) · 가리지 않고 보냄(호박색) */
details.gbox { --gb: #2449D8; --gb-bg: #F3F6FF; --gb-line: #C9D5FF; --gb-chip: #E3EAFF;
  margin-top: 12px; border: 1px solid var(--gb-line); background: var(--gb-bg); border-radius: 12px; overflow: hidden; }
details.gbox.g-judged { --gb: #0F766E; --gb-bg: #EFFAF7; --gb-line: #B5E3D8; --gb-chip: #D5F2EA; }
details.gbox.g-weak { --gb: #A15C07; --gb-bg: #FFF8EB; --gb-line: #F2CF8E; --gb-chip: #FDEBC8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) details.gbox { --gb: #8FA8FF; --gb-bg: rgba(80,110,255,.08); --gb-line: rgba(120,145,255,.35); --gb-chip: rgba(120,145,255,.2); }
  :root:not([data-theme="light"]) details.gbox.g-judged { --gb: #5ED3C0; --gb-bg: rgba(20,184,166,.08); --gb-line: rgba(45,212,191,.35); --gb-chip: rgba(45,212,191,.18); }
  :root:not([data-theme="light"]) details.gbox.g-weak { --gb: #F5B54A; --gb-bg: rgba(245,158,11,.08); --gb-line: rgba(245,181,74,.4); --gb-chip: rgba(245,181,74,.18); } }
:root[data-theme="dark"] details.gbox { --gb: #8FA8FF; --gb-bg: rgba(80,110,255,.08); --gb-line: rgba(120,145,255,.35); --gb-chip: rgba(120,145,255,.2); }
:root[data-theme="dark"] details.gbox.g-judged { --gb: #5ED3C0; --gb-bg: rgba(20,184,166,.08); --gb-line: rgba(45,212,191,.35); --gb-chip: rgba(45,212,191,.18); }
:root[data-theme="dark"] details.gbox.g-weak { --gb: #F5B54A; --gb-bg: rgba(245,158,11,.08); --gb-line: rgba(245,181,74,.4); --gb-chip: rgba(245,181,74,.18); }
details.gbox > summary { list-style: none; display: grid; gap: 7px; padding: 10px 14px; cursor: pointer; }
details.gbox > summary::-webkit-details-marker { display: none; }
details.gbox > summary:hover { filter: brightness(.985); }
details.gbox .gb-head { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--gb); }
details.gbox .gb-head .icon { width: 16px; height: 16px; }
details.gbox .gb-open { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; color: var(--gb); }
details.gbox .gb-open .icon { width: 14px; height: 14px; transition: transform .15s; }
details.gbox[open] .gb-open .icon { transform: rotate(180deg); }
details.gbox[open] .gb-vals { display: none; }
details.gbox .gb-vals { display: flex; flex-wrap: wrap; gap: 6px; }
details.gbox .gb-val { font-size: 12.5px; padding: 1px 9px; border-radius: 999px; background: var(--gb-chip); color: var(--gb); }
details.gbox.g-weak .gb-val.on, details.gbox:not(.g-weak) .gb-val.off { opacity: .55; text-decoration: line-through; }
details.gbox .gb-more { font-size: 12px; color: var(--muted); align-self: center; }
details.gbox > .c-row { background: var(--surface); margin: 0; padding-left: 14px; padding-right: 14px; }
.c-sub .c-folder { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.c-sub .c-folder .icon { width: 14px; height: 14px; }
/* 미리 보기의 확인 권장 말: 가리지 않고 보냄 상자와 같은 호박색 계통 */
.pv-weak { background: #FDEBC8; color: #6B3A1F; }
/* 드래그로 가리기 안내 — 기능이 있다는 것을 알아보도록 눈에 띄게 */
.pv-hint { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent-ink); font-size: 12.5px; line-height: 1.55; }
.pv-hint > .icon { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.pv-hint-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pv-hint b { display: block; font-size: 13.5px; color: var(--accent-ink); }
.pv-hint span { color: var(--text-2); }
.pv-demo { display: block; font-size: 12.5px; color: var(--text); }
.pv-demo i { font-style: normal; padding: 0 2px; border-radius: 3px; background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat; background-size: 0% 100%; animation: pvSweep 3.2s ease-in-out infinite; color: inherit; }
.pv-demo i.pv-demo-to { background: var(--accent); color: #fff; animation: pvShow 3.2s ease-in-out infinite; }
@keyframes pvSweep { 0%, 10% { background-size: 0% 100%; color: var(--text); } 40%, 100% { background-size: 100% 100%; color: #fff; } }
@keyframes pvShow { 0%, 45% { opacity: .25; } 60%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pv-demo i, .pv-demo i.pv-demo-to { animation: none; } .pv-demo i:not(.pv-demo-to) { background-size: 100% 100%; color: #fff; } }
/* 미리 보기 표시도 묶음 색을 따른다: 확실(파랑, 기본) · 추정(청록) */
.ph.j { background: #D5F2EA; color: #0F766E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ph.j { background: rgba(45,212,191,.18); color: #5ED3C0; } }
:root[data-theme="dark"] .ph.j { background: rgba(45,212,191,.18); color: #5ED3C0; }

/* 첫 화면(입력창 화면) 정리: 인사·폴더 이름·입력창만 */
.case-home.clean { padding-top: 12vh; }
.case-home.clean .case-title { margin-bottom: 18px; }
.case-home.clean .case-title h1 { font-size: 24px; margin: 0; }
.case-home.clean .case-sub { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.case-home.clean .hero-disc { text-align: center; }
.case-home.clean .suggest { justify-content: center; margin-top: 14px; }
/* 왼쪽 폴더 안의 단어 목록 */
.folder-words { display: flex; gap: 4px; flex-wrap: wrap; padding: 2px 0 4px 6px; }
.folder-words button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: var(--surface-2); color: var(--muted); font: inherit; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; cursor: pointer; }
.folder-words button:hover { background: var(--hover); color: var(--text); }
.folder-words .icon { width: 12px; height: 12px; }
.case-home.clean .greet { text-align: center; font-size: 26px; margin: 0 0 22px; letter-spacing: -.3px; }

/* 두 색으로 단순화: 가림 = 파랑(확실은 진하게, 추정은 연하게) · 가리지 않음 = 호박색 */
details.gbox.g-sure { --gb: #1D3FC4; --gb-bg: #EDF2FF; --gb-line: #B9C8FF; --gb-chip: #D6E0FF; }
details.gbox.g-judged { --gb: #5B7BE0; --gb-bg: #F8FAFF; --gb-line: #DCE4FB; --gb-chip: #EBF0FF; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) details.gbox.g-sure { --gb: #A9BBFF; --gb-bg: rgba(80,110,255,.14); --gb-line: rgba(130,155,255,.45); --gb-chip: rgba(130,155,255,.28); }
  :root:not([data-theme="light"]) details.gbox.g-judged { --gb: #8EA2E8; --gb-bg: rgba(80,110,255,.05); --gb-line: rgba(130,155,255,.22); --gb-chip: rgba(130,155,255,.12); } }
:root[data-theme="dark"] details.gbox.g-sure { --gb: #A9BBFF; --gb-bg: rgba(80,110,255,.14); --gb-line: rgba(130,155,255,.45); --gb-chip: rgba(130,155,255,.28); }
:root[data-theme="dark"] details.gbox.g-judged { --gb: #8EA2E8; --gb-bg: rgba(80,110,255,.05); --gb-line: rgba(130,155,255,.22); --gb-chip: rgba(130,155,255,.12); }
/* 미리 보기: 추정은 연한 파랑 + 점선 테두리 */
.ph.j { background: #EBF0FF; color: #5B7BE0; box-shadow: inset 0 0 0 1px #C9D5FA; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ph.j { background: rgba(130,155,255,.12); color: #8EA2E8; box-shadow: inset 0 0 0 1px rgba(130,155,255,.3); } }
:root[data-theme="dark"] .ph.j { background: rgba(130,155,255,.12); color: #8EA2E8; box-shadow: inset 0 0 0 1px rgba(130,155,255,.3); }

/* 확실 = 파랑 채움 · 추정 = 파랑 점선 테두리(속은 흰색) · 애매 = 호박색 채움 — 색은 두 가지, 모양으로 확실/추정 구별 */
details.gbox.g-judged { --gb: #2449D8; --gb-bg: var(--surface); --gb-line: #8EA6F5; --gb-chip: transparent; border-style: dashed; border-width: 1.5px; }
details.gbox.g-judged .gb-val { border: 1px dashed #8EA6F5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) details.gbox.g-judged { --gb: #A9BBFF; --gb-line: rgba(140,165,255,.6); } }
:root[data-theme="dark"] details.gbox.g-judged { --gb: #A9BBFF; --gb-line: rgba(140,165,255,.6); }
details.gbox .gb-tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--gb); color: var(--surface); }
.ph.j { background: var(--surface); color: var(--accent-ink); box-shadow: none; outline: 1px dashed #8EA6F5; outline-offset: -1px; }

/* 화면에서 숨기되 보조기기·파일 선택에는 남김 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 사용법 */
.guide-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.guide-steps .gs { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.guide-steps .gs b { font-size: 14px; color: var(--text); }
@media (max-width: 640px) { .guide-steps { grid-template-columns: 1fr 1fr; } }
.guide-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 24px 0 10px; }
.guide-h.first { margin-top: 0; }
.guide-h b { font-size: 15px; color: var(--text); }
.guide-h span { font-size: 12.5px; color: var(--muted); }
/* 무엇이 어디로 가나요 */
.guide-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 6px; align-items: stretch; }
.guide-flow.steps { grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; }
.guide-flow .gf { border-radius: 12px; padding: 10px 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.guide-flow .gf b { font-size: 14px; color: var(--text); }
.guide-flow .gf.me { background: var(--accent-soft); }
.guide-flow .gf.me b { color: var(--accent-ink); }
.gf-arrow { display: flex; align-items: center; color: var(--muted); }
.gf-arrow .icon { width: 16px; height: 16px; }
@media (max-width: 640px) {
  .guide-flow, .guide-flow.steps { grid-template-columns: 1fr; }
  .gf-arrow { justify-content: center; transform: rotate(90deg); height: 14px; }
}
/* 헷갈리기 쉬운 점 */
.faq-group + .faq-group { margin-top: 16px; }
.faq-gh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0 2px 8px; }
.faq-gh b { font-size: 13px; letter-spacing: .02em; color: var(--accent-ink); }
.faq-gh span { font-size: 12.5px; color: var(--muted); }
.faqs { display: flex; flex-direction: column; gap: 6px; }
.faq { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.faq:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.faq[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 2px 10px rgb(0 0 0 / .05); }
.faq summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.faq-ic .icon { width: 17px; height: 17px; }
.faq-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.faq-t b { font-size: 14.5px; color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.faq-t small { font-size: 13px; color: var(--muted); line-height: 1.45; }
.faq-key { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.faq summary > .icon { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .15s; }
.faq[open] summary > .icon { transform: rotate(180deg); }
.faq-a { padding: 0 14px 12px 60px; font-size: 14px; line-height: 1.65; color: var(--text-2); }
.faq-a p { margin: 0 0 6px; }
.faq-a .row-btns { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) { .faq-a { padding-left: 14px; } }

/* 설정 — 탭 세 개 (데스크톱: 왼쪽 탭 / 휴대폰: 위쪽 탭) */
.modal.settings { width: min(820px, 100%); }
@media (min-width: 641px) { .modal.settings { height: min(780px, calc(100dvh - 32px)); } }
.modal.settings .modal-body { padding-top: 4px; }
.set-wrap { display: grid; grid-template-columns: 168px 1fr; gap: 22px; align-items: start; }
.set-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 18px; }
.set-tabs { display: flex; flex-direction: column; gap: 2px; }
.set-tabs button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font-size: 14.5px; text-align: left; cursor: pointer; }
.set-tabs button .icon { width: 17px; height: 17px; }
.set-tabs button:hover { background: var(--surface-2); }
.set-tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.set-foot { font-size: 12px; color: var(--muted); line-height: 1.7; padding: 0 12px; }
.set-foot a, .set-foot .link { color: var(--muted); font-size: 12px; }
.set-side .set-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 0; }
.set-side .set-foot > * { font-size: 12px; }
.set-main { min-width: 0; }
.set-main > .set-foot { display: none; }
.set-pane[hidden] { display: none; }
.set-group + .set-group { margin-top: 18px; }
.set-gh { margin: 0 2px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.set-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
/* 구분선: 새 줄(.set-row)·접는 칸·하위 묶음 앞에만. 설명·버튼 칸(.set-pad)은 위 줄에 이어 붙인다 */
.set-card > * + .set-row, .set-card > * + .set-more, .set-card > * + div:not(.set-pad),
.set-card > div:not(.set-pad) > * + .set-row, .set-card > div:not(.set-pad) > * + .set-more { border-top: 1px solid var(--line); }
.set-card > .set-pad:first-child { padding-top: 12px; }
.set-row { border-top: 1px solid var(--line); }
.set-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.set-rl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.set-rl b { font-size: 14.5px; font-weight: 600; color: var(--text); }
.set-rl small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.set-val { font-size: 14px; color: var(--text); text-align: right; flex: none; max-width: 55%; overflow-wrap: anywhere; }
.set-pad { padding: 4px 14px 12px; }
.set-pad > .field { margin-top: 6px; }
.set-sub { font-size: 12.5px; color: var(--muted); margin: 6px 0 6px; }
.set-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.set-status .row-btns { margin: 0; }
.set-list li { padding: 8px 0; }
/* 2×2 / 3칸 선택 */
.seg.seg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg.seg-grid.three { grid-template-columns: repeat(3, 1fr); }
.seg.seg-grid span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.seg.seg-grid small { font-size: 12px; color: var(--muted); font-weight: 400; line-height: 1.45; }
.seg.seg-grid input:checked + span small { color: var(--accent-ink); opacity: .8; }
/* 접어 두는 자세히 */
.set-more summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; cursor: pointer; font-size: 14px; color: var(--text-2); }
.set-more summary::-webkit-details-marker { display: none; }
.set-more summary .icon { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.set-more[open] summary .icon { transform: rotate(180deg); }
.set-more-a { padding: 0 14px 14px; font-size: 13.5px; color: var(--text-2); line-height: 1.65; }
.set-more-a p { margin: 0 0 8px; }
.danger-text { color: var(--bad); font-weight: 600; }
/* 켜기·끄기 스위치 */
.switch { position: relative; flex: none; width: 42px; height: 24px; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) {
  .set-wrap { grid-template-columns: 1fr; gap: 12px; }
  .set-side { position: sticky; top: -1px; z-index: 2; background: var(--bg); padding: 4px 0 6px; gap: 0; }
  .set-tabs { flex-direction: row; gap: 4px; }
  .set-tabs button { flex: 1; justify-content: center; padding: 8px 6px; font-size: 14px; }
  .set-side .set-foot { display: none; }
  .set-main > .set-foot { display: block; text-align: center; margin-top: 18px; }
  .seg.seg-grid.three { grid-template-columns: 1fr; }
}

/* 운영자 대시보드: 제공사별 비용 (ChatGPT = 파랑, Claude = 주황) */
:root { --p-openai: var(--accent); --p-claude: #D9773F; }
.p-openai { --pc: var(--p-openai); } .p-claude { --pc: var(--p-claude); }
.chart .seg { fill: var(--pc); }
.chart .stack { pointer-events: none; }
.chart .stack.dim { opacity: .35; }
.chart .stack.on .seg { filter: brightness(.85); }
.chart .hit:hover + .stack .seg { filter: brightness(.85); }
.tip-part i, .legend i, .prov-name i, .prov-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--pc); margin-right: 6px; vertical-align: 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin: -4px 0 8px; }
.prov-split { margin: 2px 0 10px; }
.prov-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-2); gap: 2px; margin-bottom: 8px; }
.prov-bar i { background: var(--pc); min-width: 0; }
.prov-row { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: baseline; font-size: 13.5px; padding: 2px 0; }
.prov-row b { font-variant-numeric: tabular-nums; }
.prov-row > small { grid-column: 1 / -1; font-size: 12px; padding-left: 15px; }
.prov-name small { color: var(--muted); font-size: 12px; }
/* 파란 강조 타일 안에서는 밝은 색으로 */
.tile.feature .p-openai { --pc: #fff; }
.tile.feature .p-claude { --pc: #FFB37A; }
.tile.feature .prov-bar { background: rgb(255 255 255 / .2); }
.tile.feature .prov-name small, .tile.feature .prov-row > small { color: rgb(255 255 255 / .75); }

/* 의견 보내기: 가려서 보낼 글 미리 보기 */
.op-prev { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--text-2); line-height: 1.55; white-space: pre-wrap; max-height: 160px; overflow: auto; }
.op-prev b { display: block; font-size: 12.5px; color: var(--accent-ink); margin-bottom: 4px; white-space: normal; }
/* 운영자: 사용자 의견 */
.op-list { display: flex; flex-direction: column; gap: 10px; }
.op-card { margin: 0; }
.op-card.done { opacity: .7; }
.op-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.op-text { margin-top: 8px; white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; }

/* 운영자: 탐지 규칙 */
.rule-add { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(110px, .8fr) minmax(160px, 2fr) auto; gap: 8px; align-items: center; }
.rule-add .input { margin: 0; }
@media (max-width: 720px) { .rule-add { grid-template-columns: 1fr 1fr; } .rule-add .btn { grid-column: span 2; justify-content: center; } }
.rule-tbl td b { font-weight: 600; }

.sug-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* 휴대폰 머리줄: 메뉴 · AI 등급 · My/AI · 새 채팅을 한 줄에 */
@media (max-width: 640px) {
  .main-head > .model-btn { flex: 1 1 0; min-width: 0; justify-content: flex-start; overflow: hidden; }
  .main-head .model-btn .mb-tier { min-width: 0; overflow: hidden; }
  .main-head .model-btn .mb-tier > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main-head > div[style*="flex:1"] { display: none; }
  .main-head > .view-seg { margin-left: auto; }
  .view-seg button { padding: 5px 11px; }
  .view-seg .vs-long { display: none; }
}
/* 입력창 바로 위 한 줄: 사건 폴더 · 가리는 단어 · 보이는 단어 */
.ctx-bar { display: flex; align-items: center; gap: 6px; margin: 0 4px 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ctx-bar::-webkit-scrollbar { display: none; }
.ctx-bar[hidden] { display: none; }
.ctx-bar .case-chip { flex: 0 1 auto; max-width: 50%; height: 28px; padding: 0 9px 0 8px; font-size: 12.5px; gap: 5px; cursor: pointer; }
.ctx-bar .case-chip .cc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ctx-bar .case-chip .icon:last-child { width: 12px; height: 12px; color: var(--muted); }
.ctx-bar .word-chips { flex: none; margin-left: 0; }
.ctx-bar .word-chips .wc { height: 28px; }
.word-chips .wc.bump { animation: wcBump 1.6s ease; }
.word-chips .wc.bump b { color: var(--accent); }
@keyframes wcBump { 0% { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.06); } 60% { border-color: var(--accent); background: var(--accent-soft); transform: none; } 100% { } }
@media (prefers-reduced-motion: reduce) { .word-chips .wc.bump { animation: none; border-color: var(--accent); } }
@media (max-width: 380px) { .ctx-bar .word-chips .wc-long { display: none; } .ctx-bar .case-chip { max-width: 42%; } }

/* 입력창 위 오른쪽: 가릴 것이 없어도 확인 창 보기 (켜고 끄기) */
.ctx-bar .confirm-tg { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 6px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; white-space: nowrap; cursor: pointer; }
.ctx-bar .confirm-tg:hover { border-color: var(--accent); color: var(--text); }
.ctx-bar .confirm-tg.on { color: var(--accent-ink); border-color: var(--periwinkle); }
.confirm-tg .ct-sw { position: relative; width: 26px; height: 16px; border-radius: 999px; background: var(--line); transition: background .15s; }
.confirm-tg .ct-sw i { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.confirm-tg.on .ct-sw { background: var(--accent); }
.confirm-tg.on .ct-sw i { transform: translateX(10px); }
@media (max-width: 480px) { .confirm-tg .ct-long, .ctx-bar .word-chips .wc-long { display: none; } .ctx-bar .confirm-tg { padding-left: 8px; gap: 5px; } .ctx-bar { gap: 5px; } }
@media (prefers-reduced-motion: reduce) { .confirm-tg .ct-sw, .confirm-tg .ct-sw i { transition: none; } }



/* 입력칸 아래 '꼭 가림·일단 가림·확인 권장' — 누르면 확인 창의 그 묶음을 펼쳐 보여 준다 */
button.chip { border: 0; font: inherit; font-size: inherit; cursor: pointer; line-height: inherit; }
.live button.chip:hover { text-decoration: underline; text-underline-offset: 2px; filter: brightness(.97); }
.live button.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.gbox.flash { animation: gbFlash 1.6s ease; }
@keyframes gbFlash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); } 100% { } }
@media (prefers-reduced-motion: reduce) { .gbox.flash { animation: none; } }
/* 확인 창: 대소문자만 다른 표기(Alma·ALMA)는 바로 아래에 붙여 보여 준다 */
.c-row.c-fam { margin-top: -4px; padding-left: 14px; }
.c-row .fam-mark { color: var(--muted); font-size: 12px; margin-right: 2px; }

/* ---------- 화면 둘러보기 (사용법) ---------- */
.tour { position: fixed; inset: 0; z-index: 1200; }
.tour-catch { position: absolute; inset: 0; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(8, 12, 30, .55), 0 0 0 3px var(--accent); pointer-events: none; transition: left .25s, top .25s, width .25s, height .25s; }
.tour-card { position: fixed; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 48px rgba(11, 19, 48, .28); padding: 16px 18px 14px; font-size: 14px; line-height: 1.6; transition: left .25s, top .25s; }
.tour-card p { margin: 0 0 8px; color: var(--text-2); }
.tour-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.tour-top b { font-size: 16px; }
.tour-n { font-size: 12.5px; color: var(--muted); }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.tour-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-card { transition: none; } }
/* 자주 묻는 질문: 찾기 칸 + 둘러보기 단추 */
.faq-top { display: flex; gap: 8px; align-items: center; margin: 0 0 16px; position: sticky; top: 0; z-index: 1; background: var(--bg); padding: 2px 0 8px; }
.faq-find { flex: 1; min-width: 0; }
.faq-none { color: var(--muted); font-size: 14px; margin: 8px 2px; }
.faq-group[hidden], .faq[hidden] { display: none; }
/* 긴 대화 압축: 요약된 곳 표시 */
.sum-mark { margin: 6px 0 14px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--muted); }
.sum-mark summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; }
.sum-mark summary::-webkit-details-marker { display: none; }
.sum-mark summary .icon { width: 15px; height: 15px; flex: none; }
.sum-mark summary span { flex: 1; min-width: 0; }
.sum-mark summary b { font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.sum-mark .sum-body { padding: 4px 14px 12px; color: var(--text-2); font-size: 14px; line-height: 1.65; border-top: 1px solid var(--line); max-height: 50vh; overflow-y: auto; }
/* 둘러보기 카드를 말풍선으로: 꼬리가 비춘 곳을 가리킴 */
.tour-card { border-radius: 18px; padding: 14px 16px 12px; }
.tour-card::before { content: ""; position: absolute; width: 14px; height: 14px; background: var(--surface); border: 1px solid var(--line); transform: rotate(45deg); display: none; }
.tour-card[data-tail="up"]::before { display: block; top: -8px; left: calc(var(--tail, 50%) - 7px); border-right: 0; border-bottom: 0; }
.tour-card[data-tail="down"]::before { display: block; bottom: -8px; left: calc(var(--tail, 50%) - 7px); border-left: 0; border-top: 0; }
.tour-card[data-tail="left"]::before { display: block; left: -8px; top: calc(var(--tail, 24px) - 7px); border-top: 0; border-right: 0; }
.tour-lines { margin: 0; padding: 0 0 0 18px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.tour-lines li { margin: 0 0 5px; }
.tour-lines li::marker { color: var(--accent); }
.tour-lines b { color: var(--text); font-weight: 600; }

/* ---------- 확인 창: 왼쪽 '가릴 항목' · 오른쪽 'AI에게 갈 글' — 같은 틀·같은 높이 ---------- */
/* 색: 일단 가리고 = 파랑(브랜드) · 아직 안 가리고 = 호박색 · 직접 선택해서 가리고 = 보라 */
:root { --pick: #7C3AED; --pick-ink: #5B21B6; --pick-soft: #F4EEFF; --pick-line: #C4B0FA; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pick: #A78BFA; --pick-ink: #C4B5FD; --pick-soft: rgba(139,92,246,.14); --pick-line: rgba(167,139,250,.45); } }
:root[data-theme="dark"] { --pick: #A78BFA; --pick-ink: #C4B5FD; --pick-soft: rgba(139,92,246,.14); --pick-line: rgba(167,139,250,.45); }

.confirm-2col { display: flex; flex-direction: column; max-height: min(900px, calc(100dvh - 32px)); overflow: hidden; }
.confirm-2col .modal-head { flex: none; }
.confirm-2col .modal-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 2px; }
.cf-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.cf-panel { min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.cf-head { flex: none; display: flex; align-items: center; gap: 7px; height: 28px; }
.cf-head > .icon { width: 17px; height: 17px; color: var(--accent); }
.cf-head > b { font-size: 15px; }
.cf-meta { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.cf-meta .c-folder { display: inline-flex; align-items: center; gap: 4px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-meta .c-folder .icon { width: 14px; height: 14px; }
.cf-file { flex: none; font-size: 12.5px; line-height: 1.5; color: var(--muted); padding: 0 2px; }
.cf-scroll { flex: 1 1 auto; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 2px; margin: -2px; }
.cf-scroll > * { margin-top: 0 !important; margin-bottom: 0 !important; flex: none; }
.cf-none { margin: 4px 2px; color: var(--muted); font-size: 14px; line-height: 1.6; }
/* 오른쪽: 직접 선택해서 가리고! (보라) */
.pv-callout { flex: none; padding: 11px 13px; border-radius: 12px; background: var(--pick-soft); border: 1.5px solid var(--pick); }
.pv-callout.pulse { animation: pvcPulse 1.4s ease-out 2; }
@keyframes pvcPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pick) 45%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.pvc-top { display: flex; align-items: center; gap: 8px; }
.pvc-ic { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--pick); color: #fff; }
.pvc-ic .icon { width: 14px; height: 14px; }
.pvc-top b { font-size: 15px; color: var(--pick-ink); }
.pvc-line { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13.5px; color: var(--text); line-height: 1.5; }
.pvc-line b { color: var(--pick-ink); }
.pv-callout .pv-demo { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 2px 9px; border-radius: 8px; background: var(--surface); font-size: 12.5px; }
.pv-callout .pv-demo i { background-image: linear-gradient(var(--pick), var(--pick)); }
.pv-callout .pv-demo i.pv-demo-to { background: var(--pick); }
.cf-pv .sent-view { flex: 1; min-height: 220px; max-width: 100%; max-height: none; margin: 0; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 1.7; }
.cf-tip { flex: none; font-size: 12px; color: var(--muted); padding: 0 2px; }
/* 드래그해서 고를 때 뜨는 종류 막대도 같은 보라로 */
.pick-bar { border: 1.5px solid var(--pick); }
.pick-bar > b, .pick-bar > span:first-child { color: var(--pick-ink); }
.sent-view ::selection { background: color-mix(in srgb, var(--pick) 30%, transparent); }
.confirm-2col .c-foot { position: static; flex: none; margin: 14px -20px -22px; }
@media (max-width: 900px) {
  .confirm-2col { height: auto; max-height: calc(100dvh - 32px); overflow-y: auto; display: block; }
  .confirm-2col .modal-body { display: block; }
  .cf-grid { display: flex; flex-direction: column; gap: 12px; }
  .cf-scroll { overflow: visible; }
  .cf-pv .sent-view { max-height: 360px; }
  .confirm-2col .c-foot { position: sticky; }
}
@media (prefers-reduced-motion: reduce) { .pv-callout.pulse { animation: none; } }

/* ---------- 가릴 항목 한 줄: 위(종류·값·도구) / 아래(가리기·이번만 보이기·항상 보이기) — 모든 줄이 같은 자리에 ---------- */
details.gbox > .c-row { display: flex; flex-direction: column; gap: 8px; padding: 11px 14px 12px; border-top: 1px solid var(--line); }
.c-row .c-what { flex-wrap: nowrap; gap: 6px; min-height: 26px; }
.c-row .c-what .kind { flex: none; width: 78px; justify-content: space-between; overflow: hidden; white-space: nowrap; }
.c-row .c-what .val { font-size: 15px; font-weight: 700; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; }
.c-row .c-what .cnt { flex: none; padding: 0 6px; border-radius: 999px; background: var(--surface-2); font-size: 11.5px; line-height: 18px; }
.c-row .c-what .badge { flex: none; }
.c-row .c-what .c-gap { flex: 1; min-width: 6px; }
.c-tools { flex: none; display: inline-flex; gap: 2px; }
.c-tools .c-ctx { height: 26px; padding: 0 8px; border-color: transparent; background: transparent; color: var(--muted); border-radius: 8px; font-size: 12.5px; }
.c-tools .c-ctx:hover { background: var(--hover); color: var(--text); border-color: transparent; }
.c-tools .c-ctx.on { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.c-act { display: flex; }
.c-act .c-seg { display: grid; grid-template-columns: repeat(3, 1fr); width: min(100%, 330px); border-radius: 10px; }
.c-act .c-seg button { padding: 6px 4px; font-size: 13px; text-align: center; }
.c-act .c-seg button.on.o-keep { background: var(--gb, var(--accent)); }
.c-row.c-once .c-what .val, .c-row.c-never .c-what .val { color: var(--muted); text-decoration: line-through 1.5px; }
.c-row.c-fam { padding-left: 30px; }
.c-row .c-ctxbox { margin: 0; }
.c-row > .rnote { margin: 0; }
@media (max-width: 520px) { .c-tools .c-ctx { padding: 0 6px; } .c-tools .c-ctx .icon + * { display: none; } }
/* 입력창 아래 상태 줄: 휴대폰 폭에서는 '보낼 때 가릴 것' 머리말을 숨겨 두 칩만 */
@media (max-width: 520px) { .live .live-lbl { display: none; } .live .chip { font-size: 12px; } }
/* 상태 줄 칩: 가림 = 파랑 · 확인 필요 = 호박색 (확인 창 묶음과 같은 색) */
.live .chip.weak { background: #FFF2D9; color: #9A5B00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .live .chip.weak { background: rgba(245,158,11,.16); color: #F5B54A; } }
:root[data-theme="dark"] .live .chip.weak { background: rgba(245,158,11,.16); color: #F5B54A; }
details.gbox .gb-tag { font-weight: 600; background: transparent; color: var(--gb); border: 1px solid var(--gb-line); }

/* ---------- 소개 화면 (로그인 전 첫 화면) ---------- */
.iv-page { min-height: 100dvh; background: var(--bg); color: var(--text); text-align: left; }
.iv-top { display: flex; align-items: center; justify-content: space-between; max-width: 1120px; margin: 0 auto; padding: 18px 24px; }
.iv-brand { display: flex; align-items: center; gap: 8px; }
.iv-brand .wordmark { font-size: 22px; }
.iv-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; max-width: 1120px; margin: 0 auto; padding: 48px 24px 72px; }
.iv-copy h1 { font-size: clamp(34px, 5.2vw, 58px); line-height: 1.12; letter-spacing: -.035em; font-weight: 800; margin: 0; color: var(--navy); word-break: keep-all; }
.iv-lede { font-size: clamp(16px, 1.6vw, 18.5px); line-height: 1.65; color: var(--text-2); margin: 22px 0 0; max-width: 34em; word-break: keep-all; text-wrap: pretty; }
.iv-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.iv-cta .btn { height: 48px; padding: 0 22px; font-size: 16px; }
.iv-beta { margin: 14px 0 0; color: var(--muted); font-size: 14px; min-height: 1.5em; }

/* 시연 문서: 원문 → 가린 글 */
.iv-doc { margin: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 22px 26px 18px; box-shadow: 0 30px 60px -30px rgba(11, 19, 48, .35); position: relative; }
.iv-doc::before { content: ""; position: absolute; inset: 10px -10px -10px 10px; border: 1px solid var(--line); border-radius: 12px; z-index: -1; background: var(--surface-2); }
.iv-doc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.iv-doc-head { font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.iv-seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.iv-seg button { border: 0; background: transparent; font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; color: var(--muted); cursor: pointer; }
.iv-seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }
.iv-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.iv-text { font-size: 16.5px; line-height: 2.05; margin: 0; color: var(--text); word-break: keep-all; }
.iv-pii { position: relative; }
.iv-orig { text-decoration: underline; text-decoration-color: var(--periwinkle); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.iv-tok { display: none; color: var(--accent-ink); background: var(--accent-soft); border: 1px dashed var(--blue-2); border-radius: 6px; padding: 1px 6px; font-weight: 600; font-size: .92em; white-space: nowrap; }
.iv-doc.ai .iv-orig { display: none; }
.iv-doc.ai .iv-tok { display: inline; }
.iv-doc:not(.ai) .iv-pii .iv-orig { text-decoration-color: var(--periwinkle); }
/* 차례로 가려지는 순간: 원문 위로 푸른 띠가 지나간다 */
.iv-doc.playing .iv-pii.on .iv-orig { background: linear-gradient(90deg, var(--blue) 0 100%) no-repeat left / 100% 100%; color: transparent; border-radius: 3px; transition: color .1s; animation: iv-sweep .26s ease-out; }
@keyframes iv-sweep { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
.iv-keep { margin: 16px 0 0; font-size: 13.5px; color: var(--muted); }

.iv-band { max-width: 1120px; margin: 0 auto; padding: 56px 24px; border-top: 1px solid var(--line); }
.iv-band h2 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.02em; margin: 0 0 28px; color: var(--navy); }
.iv-band h3 { font-size: 17px; margin: 0 0 6px; }
.iv-promise { display: flex; gap: 20px; align-items: flex-start; background: var(--bubble); border: 1px solid var(--line-2); border-radius: 16px; padding: 30px 32px; }
.iv-promise-ico { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; }
.iv-promise-ico svg { width: 24px; height: 24px; }
.iv-band .iv-promise h2 { margin: 0 0 8px; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35; word-break: keep-all; }
.iv-band .iv-promise p { font-size: 16px; }
@media (max-width: 640px) { .iv-promise { flex-direction: column; gap: 14px; padding: 22px 20px; } }
.iv-band p { margin: 0; color: var(--text-2); line-height: 1.6; font-size: 15px; word-break: keep-all; }
.iv-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.iv-step { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.iv-step-n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; }
/* 글이 가는 길: 이 기기 → 서버 → AI */
.iv-foot { max-width: 1120px; margin: 0 auto; padding: 24px 24px 40px; display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); }
.iv-foot a { color: var(--muted); }
.iv-foot .copyright { margin-left: auto; }
@media (prefers-color-scheme: dark) {
  .iv-copy h1, .iv-band h2 { color: var(--text); }
  .iv-step-n { background: var(--accent); }
}
@media (max-width: 860px) {
  .iv-hero { grid-template-columns: 1fr; gap: 36px; padding: 24px 16px 48px; }
  .iv-top { padding: 14px 16px; }
  .iv-band { padding: 40px 16px; }
  .iv-foot { padding: 20px 16px 32px; }
  .iv-steps { grid-template-columns: 1fr; gap: 22px; }
  .iv-doc { padding: 18px 18px 14px; }
  .iv-doc::before { display: none; }
  .iv-text { font-size: 15.5px; }
  .iv-foot .copyright { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .iv-doc.playing .iv-pii.on .iv-orig { animation: none; } }
html[lang="en"] .iv-copy h1 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.03em; }
/* 영어 제목은 두 문장이 각각 한 줄에 들어가게: 왼쪽 칸 너비에 맞춰 글자 크기를 정한다(가장 긴 줄 ≈ 글자 크기의 12.1배) */
html[lang="en"] .iv-copy { container-type: inline-size; }
@supports (font-size: 1cqw) { html[lang="en"] .iv-copy h1 { font-size: min(44px, 7.9cqw); } }

/* 운영자 대시보드: 가입 없이 체험 */
.g-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 4px 0 14px; }
.g-stat { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.g-stat .k { font-size: 12.5px; color: var(--muted); }
.g-stat .v { font-size: 22px; font-weight: 700; margin-top: 2px; color: var(--text); }
.g-stat .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
@media (max-width: 900px) { .g-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 가입 화면: 가입 코드 링크로 왔을 때 '가입 없이 무료로 시작하기' */
.try-box { background: var(--bubble); border-radius: 12px; padding: 14px 16px; margin: 4px 0 14px; }
.try-box p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; color: var(--text-2); word-break: keep-all; }
.try-box .btn { background: var(--surface); }
.try-box.used p { margin: 0; }

/* 운영자 모드 띠 */
.notice-bar.op { background: #1D2548; color: #fff; }
.notice-bar.op a { color: #C9D2F5; }
/* 운영자 콘솔: 운영자로 Garigo 쓰기(한글판·영문판) */
.op-mode { padding: 6px 12px 8px; }
.op-mode-h { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--text-2); padding: 3px 0 7px; }
.op-mode-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-left: 28px; }
.op-mode-links .btn { justify-content: center; padding: 6px 8px; font-size: 13.5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.op-mode-links .btn:hover { background: var(--hover); }

/* v7.18 확인 창 한 줄: 값은 자르지 않고 줄바꿈, 문장 보기·고치기는 아래 줄 오른쪽으로 */
.c-row .c-what { flex-wrap: wrap; row-gap: 4px; }
.c-row .c-what .val { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; min-width: 0; flex: 0 1 auto; line-height: 1.35; }
.c-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.c-act .c-tools { margin-left: auto; }
/* 대소문자만 다른 표기 묶음: 왼쪽 띠로 한 상자처럼 */
.c-row.c-famlead, .c-row.c-fam { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 45%, transparent); padding-left: 12px; background: color-mix(in srgb, var(--accent) 4%, transparent); }
.c-row.c-famlead { border-radius: 10px 10px 0 0; }
.c-row.c-fam { border-top: 1px dashed var(--line); }
.c-row.c-fam .fam-mark { color: var(--muted); margin-right: -2px; }
.c-row .c-what .badge.fam { background: var(--accent-soft); color: var(--accent-ink); }
.c-row .c-what .kind { width: auto; min-width: 78px; max-width: 150px; gap: 4px; }
.c-act { flex-wrap: nowrap; }
.c-act .c-seg { flex: 1 1 300px; max-width: 330px; min-width: 0; width: auto; }
.c-act .c-seg button { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.c-act .c-tools { flex: none; }
@media (max-width: 560px) { .c-act { flex-wrap: wrap; } .c-act .c-seg { flex-basis: 100%; max-width: none; } }

/* v7.19 묶음 표시: 첫 줄 아래에서 내려오는 세로줄 + 이어진 표기마다 가로 가지(트리), 표기 사이는 점선, 이어진 표기는 들여씀 */
.c-row.c-famlead, .c-row.c-fam { position: relative; box-shadow: none; background: color-mix(in srgb, var(--accent) 5%, transparent); }
.c-row.c-famlead { padding-left: 12px; padding-bottom: 14px; border-radius: 12px 12px 0 0; }
.c-row.c-famlead::after { content: ""; position: absolute; left: 22px; bottom: 0; height: 10px; border-left: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.c-row.c-fam { padding-left: 12px; border-top: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--line)) !important; }
.c-row.c-fam > * { margin-left: 34px; }
.c-row.c-fam::before { content: ""; position: absolute; left: 22px; top: -1px; bottom: 0; border-left: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.c-row.c-fam::after { content: ""; position: absolute; left: 22px; top: 20px; width: 16px; border-top: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.c-row.c-fam.c-famlast { border-radius: 0 0 12px 12px; margin-bottom: 4px; }
.c-row.c-fam.c-famlast::before { bottom: auto; height: 22px; }
.c-row.c-fam .fam-mark { display: inline-flex; color: var(--accent-ink); }
.c-row.c-fam .fam-mark .icon { width: 13px; height: 13px; }

/* v7.23 직접 드래그해 가린 말: 보라색 */
:root { --mine: #7c3aed; --mine-soft: #f1eafe; --mine-line: #c4b5fd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mine: #c4b5fd; --mine-soft: #2e2346; --mine-line: #6d4fc2; } }
:root[data-theme="dark"] { --mine: #c4b5fd; --mine-soft: #2e2346; --mine-line: #6d4fc2; }
.sent-view .ph.mine { background: var(--mine-soft); color: var(--mine); box-shadow: inset 0 0 0 1px var(--mine-line); }
.c-row .c-what .badge.mine { background: var(--mine-soft); color: var(--mine); }
.c-tools .c-undo { color: var(--mine); }
.tok-pop .item .icon { width: 15px; height: 15px; margin-right: 6px; }
.gb-val.mine.on { background: var(--mine-soft); color: var(--mine); box-shadow: inset 0 0 0 1px var(--mine-line); }
.sent-view .ph.mine.new { outline-color: var(--mine); }
/* v7.25 드래그 범위에 들어온 가린 표시: 원래 말을 보여 주고 함께 고른다 */
.sent-view .ph .ph-o { display: none; }
.sent-view .ph.peek .ph-m { display: none; }
.sent-view .ph.peek .ph-o { display: inline; }
.sent-view .ph.peek { background: var(--mine-soft); color: var(--mine); box-shadow: inset 0 -2px 0 var(--mine); border-radius: 3px; }

/* ---------- 가린 문서 받기 ---------- */
.side-doc { margin-top: -4px; }
.doc-lead { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--text); }
.doc-sub { margin: 0 0 12px; color: var(--text-2); line-height: 1.6; }
.doc-h { margin: 22px 0 4px; font-size: 15px; }
.doc-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 26px 16px; border: 2px dashed var(--line-2); border-radius: var(--radius); background: var(--surface-2); color: var(--text-2); cursor: pointer; font: inherit; text-align: center; }
.doc-drop b { color: var(--text); font-size: 15px; }
.doc-drop:hover, .doc-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.doc-drop .icon { width: 26px; height: 26px; color: var(--accent); }
.doc-quota { margin: 8px 0 0; color: var(--muted); font-size: 13px; min-height: 1em; }
.doc-acts { margin: 0 0 8px; }
.doc-list { display: flex; flex-direction: column; gap: 6px; }
.doc-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.doc-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-nm small, .doc-empty { color: var(--muted); }
.doc-note { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.doc-kinds { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.doc-kinds .dk-lab { color: var(--muted); font-size: 13px; margin-right: 2px; }
.doc-kinds .dk { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.doc-kinds .dk small { color: var(--muted); }
.doc-kinds .dk-box { flex: none; display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1.5px solid var(--line-2); border-radius: 4px; }
.doc-kinds .dk-box .icon { width: 11px; height: 11px; stroke-width: 3; }
.doc-kinds .dk.on { border-color: var(--accent); color: var(--text); }
.doc-kinds .dk.on .dk-box { background: var(--accent); border-color: var(--accent); color: #fff; }
.doc-kinds .dk.part .dk-box { border-color: var(--accent); background: linear-gradient(var(--accent), var(--accent)) center / 8px 2px no-repeat; }
.mdoc-foot { flex-wrap: wrap; align-items: center; }
/* 두 선택지는 같은 크기: 같은 너비 두 칸, 같은 높이 */
.doc-styles { display: grid; grid-template-columns: repeat(2, minmax(0, 270px)); gap: 8px; align-items: stretch; }
.doc-style { display: flex; gap: 8px; align-items: flex-start; text-align: left; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; min-width: 0; }
.doc-style input { margin-top: 3px; }
.doc-style span { display: flex; flex-direction: column; align-items: flex-start; }
.doc-style small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.doc-style.on { border-color: var(--accent); background: var(--accent-soft); }
.doc-facts { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.doc-facts li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.doc-facts .icon { flex: none; margin-top: 3px; color: var(--ok); }
.doc-field { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.doc-field select { flex: 1; min-width: 0; }
.doc-ta { width: 100%; min-height: 140px; resize: vertical; font: inherit; }
.doc-out { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); white-space: pre-wrap; line-height: 1.7; max-height: 46vh; overflow: auto; }
@media (max-width: 640px) { .doc-styles { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); } .doc-style { padding: 6px 8px; } .doc-style small { font-size: 11px; } .doc-row .btn.sm { padding: 4px 8px; } }

/* 가입 없이 쓰는 중: 오른쪽 위 로그인·가입 */
.main-head .guest-auth { display: flex; gap: 6px; margin-left: 6px; flex: none; }
.main-head .guest-auth .btn { white-space: nowrap; }
@media (max-width: 640px) { .main-head .guest-auth { gap: 4px; margin-left: 2px; } .main-head .guest-auth .btn { padding: 5px 9px; font-size: 13px; } }
.doc-opts { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.doc-hint { display: flex; gap: 6px; align-items: flex-start; margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; max-width: 620px; }
.doc-hint .icon { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.doc-facts li.warn .icon { color: var(--warn, #b45309); }
.doc-list + .doc-facts { margin-top: 14px; }
.c-foot .cf-doc { white-space: nowrap; }
@media (max-width: 640px) { .c-foot .cf-doc { flex: 1 1 100%; order: -1; } }
.doc-reading { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.set-note { margin: 4px 0 0; padding: 0 14px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* 자바스크립트가 앱을 그리기 전(또는 검색 로봇·자바스크립트 꺼짐)에 보이는 첫 화면 소개 */
/* 첫 화면 HTML 안의 소개 글(자바스크립트 없이 읽는 검색 로봇용). 앱이 곧 이 자리를 바꾸므로 사람에게는 바로 보이지 않게:
   1.5초 뒤에야 서서히 보인다(그때까지 앱이 못 떴을 때 — 아주 느린 연결·자바스크립트 꺼짐). 글은 HTML에 그대로 있으므로 숨긴 글이 아니다 */
.seo-static { padding: 48px 20px; line-height: 1.7; color: var(--text); animation: seo-in .3s ease-out 1.5s both; }
@keyframes seo-in { from { opacity: 0; } to { opacity: 1; } }
/* 앱이 준비되는 동안(로그인 확인 등) 빈 화면 대신 가운데 작은 점 — 0.6초 넘게 걸릴 때만 보임 */
.boot-wait { min-height: 60vh; display: grid; place-items: center; }
.boot-wait i { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: boot-spin .8s linear infinite, seo-in .2s ease-out .6s both; }
@keyframes boot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .seo-static, .boot-wait i { animation: none; } }
.seo-static h1 { font-size: 28px; margin: 0 0 14px; }
.seo-static ul { padding-left: 20px; color: var(--text-2); }
.seo-static a { color: var(--accent); }
/* ---------- 검색용 정적 페이지 (/about, /faq) ---------- */
.sv-page a.btn, .sv-page .iv-brand { text-decoration: none; }
.sv-lab { margin: 10px 0 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.sv-lab:first-of-type { margin-top: 0; }
.sv-doc .iv-text { line-height: 1.95; }
.sv-pii { background: transparent; color: inherit; text-decoration: underline; text-decoration-color: var(--periwinkle); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.sv-tok { color: var(--accent-ink); background: var(--accent-soft); border: 1px dashed var(--blue-2); border-radius: 6px; padding: 1px 6px; font-weight: 600; font-size: .92em; white-space: nowrap; }
.sv-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.sv-faq-wrap { max-width: 820px; margin: 0 auto; padding: 32px 20px 56px; }
.sv-faq-wrap h1 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -.03em; color: var(--navy); margin: 0 0 24px; }
.sv-gh { font-size: 15px; color: var(--accent-ink); margin: 0 2px 10px; letter-spacing: .02em; }
.sv-faq-wrap .faq-group + .faq-group { margin-top: 28px; }
.sv-faq .faq-a { padding-left: 14px; }
.sv-faq summary::after { content: "+"; flex: none; color: var(--muted); font-size: 18px; }
.sv-faq[open] summary::after { content: "−"; }
@media (max-width: 860px) { .sv-page .iv-hero { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; } .iv-steps { grid-template-columns: 1fr; gap: 20px; } }
.sv-page .iv-promise p + p { margin-top: 16px; }
/* 기록 옮기기 (/move) */
.mv-wrap { max-width: 620px; margin: 0 auto; padding: 32px 20px 64px; }
.mv-wrap h1 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -.02em; color: var(--navy); margin: 0 0 14px; word-break: keep-all; }
.mv-lead { font-size: 16px; line-height: 1.7; color: var(--text-2); margin: 0; word-break: keep-all; }
.mv-wrap .iv-cta { margin-top: 22px; }
.mv-wrap .msg { margin-top: 18px; }
.mv-wrap .msg:empty { display: none; }
.mv-note { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.sv-nav { display: flex; align-items: center; gap: 14px; }
.sv-lang { font-size: 14px; color: var(--text-2); text-decoration: none; }
.sv-lang:hover { color: var(--accent); }
.hint.bad { color: var(--bad); font-weight: 500; }
.hint.bad .link { font-weight: 600; }
/* 이메일 다듬기 */
.side-mail { margin-top: -4px; }
.mail-seg { display: flex; flex-wrap: wrap; gap: 8px; background: none; padding: 0; }
.mail-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: left; min-width: 0; }
.mail-opt b { font-size: 14px; }
.mail-opt small { font-size: 12px; color: var(--muted); }
.mail-opt[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.mail-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mail-seg.acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .mail-seg.acts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mail-seg.tones .mail-opt { padding: 7px 14px; }
.mail-body, .mail-notes { width: 100%; resize: vertical; font: inherit; font-size: 14.5px; line-height: 1.6; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--text); }
.mail-body { min-height: 200px; }
/* 가이드 글 (/guide) */
.sv-article { max-width: 760px; margin: 0 auto; padding: 28px 20px 64px; }
.sv-article h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.25; letter-spacing: -.03em; color: var(--navy); margin: 8px 0 16px; word-break: keep-all; }
.sv-article h2 { font-size: 21px; letter-spacing: -.015em; color: var(--navy); margin: 36px 0 12px; word-break: keep-all; }
.sv-article p, .sv-article li { font-size: 16px; line-height: 1.8; color: var(--text-2); word-break: keep-all; }
.sv-article p { margin: 0 0 12px; }
.sv-article ul, .sv-article ol { margin: 0 0 14px; padding-left: 22px; }
.sv-article li { margin: 4px 0; }
.sv-lead { font-size: 17.5px !important; color: var(--text) !important; }
.sv-meta { font-size: 13.5px !important; color: var(--muted) !important; }
.sv-crumb { font-size: 13.5px; color: var(--muted); }
.sv-crumb a { color: var(--muted); }
.sv-ex { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 6px 0 16px; }
.sv-ex .sv-ex-t { margin: 0 0 8px; color: var(--text); }
.sv-ex .sv-ex-t:last-child { margin-bottom: 0; }
.sv-cta-box { margin: 36px 0 8px; padding: 22px; border-radius: 14px; background: var(--bubble); border: 1px solid var(--line-2); }
.sv-related { margin-top: 32px; border-top: 1px solid var(--line); }
.sv-related h2 { font-size: 16px; }
.sv-guides { grid-template-columns: 1fr; }
.sv-guides h2 { font-size: 19px; margin: 0 0 8px; }
.sv-guides h2 a { color: var(--navy); text-decoration: none; }
.sv-more { font-weight: 600; text-decoration: none; }
.sv-article .sv-cards { padding-left: 0; }
/* 가린 문서 PDF 창: 처음부터 같은 크기(남은 건수 자리를 미리 잡고, 목록 칸 높이를 정함) */
.doc-quota { min-height: 1.5em; opacity: 0; transition: opacity .15s; }
.doc-quota.on { opacity: 1; }
.doc-hrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 4px; }
.doc-hrow .doc-h { margin: 0; }
.doc-list { min-height: 132px; max-height: 260px; overflow-y: auto; margin-top: 8px; }
.doc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 132px; border: 1px dashed var(--line-2); border-radius: 12px; text-align: center; padding: 16px; }
.doc-empty .icon { width: 22px; height: 22px; color: var(--muted); margin-bottom: 4px; }
.doc-empty b { color: var(--text-2); font-size: 14.5px; }
.doc-empty span { font-size: 13px; color: var(--muted); }
/* 이메일 다듬기: 할 일을 바꿔도 창 크기 그대로 */
.mail-area { display: flex; flex-direction: column; height: 360px; margin-top: 14px; }
.mail-area > .field { margin-top: 0; }
.mail-area .mail-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.mail-area .mail-main .mail-body { flex: 1 1 auto; min-height: 0; height: auto; resize: none; }
/* 요점 칸이 있으면(답장·포워딩·리마인더) 위아래 두 칸을 같은 높이로 나눈다 */
.mail-area .mail-main { flex-basis: 0; }
.mail-area .mail-main + .field { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; margin-top: 12px; }
.mail-area .mail-main + .field[hidden] { display: none; }
.mail-area .mail-notes { flex: 1 1 auto; min-height: 0; height: auto; resize: none; }
@media (max-height: 760px) { .mail-area { height: 300px; } }
/* ---------- 윈도우용 PDF 전용판 (Garigo PDF) ---------- */
.gd { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.gd-top { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.gd-brand { display: flex; align-items: center; gap: 8px; }
.gd-brand .wordmark { font-size: 20px; color: var(--navy); }
.gd-ed { font-size: 12px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 6px; padding: 2px 7px; letter-spacing: .04em; }
.gd-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ok, #157f3b); background: var(--ok-bg); border-radius: 999px; padding: 4px 11px; }
.gd-badge .icon { width: 15px; height: 15px; }
.gd-main { width: 100%; max-width: 820px; margin: 0 auto; padding: 26px 22px 40px; }
.gd-h1 { font-size: 24px; letter-spacing: -.02em; color: var(--navy); margin: 0 0 14px; }
.gd-main .doc-drop { min-height: 170px; }
.gd-main .doc-list { max-height: none; }
.gd-facts { margin: 8px 0 12px; padding-left: 20px; line-height: 1.8; }
@media (max-width: 640px) { .gd-badge { display: none; } }
.toast.has-act { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.toast-act { background: none; border: 1px solid currentColor; color: inherit; border-radius: 8px; padding: 3px 10px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }

/* ---------- v7.54: 사이드바 — 에이전트 묶음, 사건 폴더 강조, 새 채팅은 폴더 안에 ---------- */
.side-agents { padding: 0 8px 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* '에이전트' 제목은 '사건 폴더' 제목과 같은 글씨 */
.side-agents .side-group { font-size: 13px; color: var(--text); font-weight: 700; padding: 14px 4px 8px 10px; }
.agent { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; border-radius: 10px; padding: 7px 10px; text-align: left; color: var(--text); cursor: pointer; }
.agent:hover { background: var(--hover); }
.agent-ic { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); }
.agent-ic .icon { width: 16px; height: 16px; }
.agent-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.agent-tx b { font-size: 14px; font-weight: 650; }
.agent-tx small { font-size: 12px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.side-group.cases-head { font-size: 13px; color: var(--text); font-weight: 700; padding: 14px 4px 8px 10px; }
.case-add { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px 0 8px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--accent-ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.case-add:hover { border-color: var(--accent); background: var(--accent-soft); }
.case-add .icon { width: 14px; height: 14px; }
.folder-row { font-size: 14.5px; padding-top: 8px; padding-bottom: 8px; }
.folder-row .folder-nm { font-weight: 550; color: var(--text); }
.folder-row.on, .folder-row.in { background: var(--accent-soft); }
.folder-row .fnew { display: none; width: 28px; height: 28px; margin: -6px -2px -6px 0; color: var(--muted); }
.folder-row .fnew:hover { color: var(--accent-ink); }
.folder-row:hover .fnew, .folder-row.on .fnew, .folder-row.in .fnew, .folder-row .fnew:focus-visible { display: inline-grid; }
.folder-row.in .folder-n { display: none; }
.folder-row.in .del { display: inline-grid; }
.folder-new { color: var(--accent-ink); font-weight: 600; }
.folder-new.on { background: var(--hover); }
@media (hover: none) { .folder-row .fnew { display: inline-grid; } }

/* ---------- v7.57: 메뉴·단추는 끌어서 선택되지 않게 (채팅 글·입력 칸·확인 창 본문은 그대로 선택 가능) ---------- */
.side, .main-head, .composer .bar, .gd-top,
button, .btn, .icon-btn, .seg, .mail-opt, .chip, label, .side-group, .modal-head, .modal h2, .c-foot, .toast, .tour {
  -webkit-user-select: none; user-select: none;
}
.side img, .side svg, .side a, .main-head img, .main-head a, .gd-top img { -webkit-user-drag: none; }
.side input, .side textarea, .modal input, .modal textarea { -webkit-user-select: text; user-select: text; }
