/* claudeland - chat UI. Plain CSS, no build step. Kept to widely supported
   features (flexbox, custom properties) so older browsers render it too. */

:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #eeece6;
  --text: #1c1c1a;
  --muted: #6a6963;
  --border: #e0ddd5;
  --accent: #0e7c66;
  --accent-hover: #0b6654;
  --accent-text: #ffffff;
  --accent-soft: #e3f1ec;
  --user-bubble: #e6efeb;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok: #15803d;
  --warn: #b45309;
  --code-bg: #f0eee8;
  --shadow: 0 1px 2px rgba(20, 20, 18, .06), 0 8px 24px rgba(20, 20, 18, .06);
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", Menlo, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141513;
  --surface: #1c1e1b;
  --surface-2: #262824;
  --text: #ebeae5;
  --muted: #9b9991;
  --border: #33352f;
  --accent: #3db691;
  --accent-hover: #52c7a2;
  --accent-text: #07130f;
  --accent-soft: #1b2e28;
  --user-bubble: #1f2f2a;
  --danger: #f97066;
  --danger-soft: #2f1a18;
  --ok: #4ade80;
  --warn: #fbbf24;
  --code-bg: #232521;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

/* No manual choice: follow the system. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141513;
    --surface: #1c1e1b;
    --surface-2: #262824;
    --text: #ebeae5;
    --muted: #9b9991;
    --border: #33352f;
    --accent: #3db691;
    --accent-hover: #52c7a2;
    --accent-text: #07130f;
    --accent-soft: #1b2e28;
    --user-bubble: #1f2f2a;
    --danger: #f97066;
    --danger-soft: #2f1a18;
    --ok: #4ade80;
    --warn: #fbbf24;
    --code-bg: #232521;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.noscript { padding: 24px; text-align: center; }

/* Focus: always visible for keyboards; the :not() rule is ignored by old
   browsers, which then simply keep the outline on click too. */
button:focus, input:focus, textarea:focus, a:focus, summary:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus:not(:focus-visible), summary:focus:not(:focus-visible) { outline: none; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; font-weight: 650; letter-spacing: -.01em; font-size: 18px; }
.brand.small { font-size: 16px; }
.mark { width: 28px; height: 28px; margin-right: 10px; flex: none; }
.brand.small .mark { width: 24px; height: 24px; }
.mark-bg { fill: var(--accent); }
.mark-fg { fill: none; stroke: var(--accent-text); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); cursor: pointer;
  font-weight: 550; text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn {
  width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------- lock screen ---------- */
.lock { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.lock-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; padding: 28px; box-shadow: var(--shadow);
}
.lock-card h1 { font-size: 22px; line-height: 1.25; margin: 22px 0 6px; letter-spacing: -.015em; }
.lock-card p { margin: 0 0 18px; }
.lock-card label { display: block; font-weight: 550; margin-bottom: 6px; }
.lock-card input[type=password] {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg);
}
.lock-card .check { display: flex; align-items: center; font-weight: 400; margin: 14px 0 0; cursor: pointer; }
.lock-card .check input { width: 18px; height: 18px; margin: 0 8px 0 0; accent-color: var(--accent); }
.form-error { color: var(--danger); min-height: 22px; margin: 10px 0 8px !important; font-size: 14px; }

/* ---------- layout ---------- */
.app { display: flex; height: 100%; }
.sidebar {
  width: 280px; flex: none; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border);
}
.sidebar-head { padding: 16px 16px 12px; }
.new-chat { margin: 0 12px 8px; justify-content: flex-start; }
.new-chat span[aria-hidden] { font-size: 18px; margin-right: 8px; line-height: 1; }
.chat-list { flex: 1; overflow-y: auto; padding: 4px 8px 8px; }
.sidebar-foot { border-top: 1px solid var(--border); padding: 12px 16px 16px; }
.sidebar-foot p { margin: 0 0 10px; }

.chat-item { display: flex; align-items: center; border-radius: 8px; margin-bottom: 2px; }
.chat-item:hover { background: var(--surface-2); }
.chat-item.active { background: var(--accent-soft); }
.chat-open {
  flex: 1; min-width: 0; text-align: left; background: transparent; border: 0;
  padding: 9px 4px 9px 10px; cursor: pointer; border-radius: 8px;
}
.chat-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.chat-when { display: block; font-size: 12px; color: var(--muted); }
.chat-item .running-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.chat-del {
  width: 32px; height: 32px; border: 0; background: transparent; border-radius: 6px; cursor: pointer;
  color: var(--muted); opacity: 0; margin-right: 4px; flex: none; font-size: 18px; line-height: 1;
}
.chat-item:hover .chat-del, .chat-del:focus { opacity: 1; }
.chat-del:hover { background: var(--danger-soft); color: var(--danger); }
.list-empty { padding: 12px 10px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.topbar {
  display: flex; align-items: center; min-height: 56px; padding: 8px 16px;
  border-bottom: 1px solid var(--border); background: var(--bg);
}
.menu-btn { display: none; margin-right: 6px; }
.chat-title {
  flex: 1; min-width: 0; margin: 0 12px 0 0; font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conn {
  display: inline-flex; align-items: center; max-width: 60%;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  padding: 5px 12px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.conn span:last-child { overflow: hidden; text-overflow: ellipsis; }
.conn:hover { background: var(--surface-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 8px; flex: none; }
.conn.ok .dot { background: var(--ok); }
.conn.down .dot { background: var(--danger); }
.conn.down { color: var(--danger); border-color: var(--danger); }
.conn.busy .dot { background: var(--warn); }

/* ---------- messages ---------- */
.messages { flex: 1; overflow-y: auto; padding: 24px 16px 8px; }
.thread { max-width: 780px; margin: 0 auto; }
.msg { margin-bottom: 22px; }
.msg.user { display: flex; justify-content: flex-end; }
.bubble {
  max-width: 85%; background: var(--user-bubble); border-radius: 14px 14px 4px 14px;
  padding: 10px 14px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere;
}

.empty { max-width: 520px; margin: 12vh auto 0; text-align: center; }
.empty h3 { font-size: 22px; margin: 0 0 8px; letter-spacing: -.015em; }
.empty p { margin: 0; }
.loading { text-align: center; padding: 40px 0; }

/* activity (what Claude is doing) */
.activity { margin-bottom: 8px; }
.activity summary {
  display: inline-flex; align-items: center; max-width: 100%;
  list-style: none; cursor: pointer; user-select: none;
  font-size: 13px; color: var(--muted); padding: 4px 10px 4px 8px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
}
.activity summary::-webkit-details-marker { display: none; }
.activity summary:hover { color: var(--text); }
.act-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-time { margin-left: 8px; font-variant-numeric: tabular-nums; opacity: .8; flex: none; }
.chev { width: 14px; height: 14px; margin-left: 6px; flex: none; transition: transform .15s; fill: none; stroke: currentColor; stroke-width: 2; }
.activity[open] .chev { transform: rotate(180deg); }
.act-icon { width: 14px; height: 14px; margin-right: 6px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.activity.ok .act-icon { stroke: var(--ok); }
.activity.failed .act-icon { stroke: var(--danger); }
.spinner {
  width: 12px; height: 12px; margin-right: 8px; flex: none; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.steps { list-style: none; margin: 8px 0 4px; padding: 0 0 0 12px; border-left: 2px solid var(--border); font-size: 13px; color: var(--muted); }
.steps li { padding: 3px 0 3px 10px; overflow-wrap: anywhere; }
.steps .k { display: inline-block; min-width: 76px; font-weight: 600; color: var(--text); opacity: .75; }

.msg-error {
  margin-top: 8px; padding: 10px 12px; border-radius: 8px;
  background: var(--danger-soft); color: var(--danger); font-size: 14px; overflow-wrap: anywhere;
}
.msg-error.stopped { background: var(--surface-2); color: var(--muted); }
.msg-meta { margin-top: 6px; font-size: 12px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; }
.msg-meta > * { margin-right: 10px; }
.link-btn { border: 0; background: transparent; padding: 4px 6px; margin-left: -6px; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 12px; }
.link-btn:hover { color: var(--text); background: var(--surface-2); }

/* caret while streaming */
.typing::after {
  content: ""; display: inline-block; width: 8px; height: 1.1em; margin-left: 2px;
  vertical-align: -3px; background: var(--accent); animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- markdown ---------- */
.md { overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md blockquote, .md .code, .md .table-wrap { margin: 0 0 12px; }
.md h3, .md h4, .md h5, .md h6 { margin: 18px 0 8px; line-height: 1.3; letter-spacing: -.01em; }
.md h3 { font-size: 19px; } .md h4 { font-size: 17px; } .md h5, .md h6 { font-size: 15px; }
.md ul, .md ol { padding-left: 24px; }
.md li { margin: 3px 0; }
.md li > p { margin: 0; }
.md blockquote { border-left: 3px solid var(--border); padding: 2px 0 2px 12px; color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.md code { font: 13.5px/1.5 var(--mono); background: var(--code-bg); padding: 1px 5px; border-radius: 5px; }
.md .code { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--code-bg); }
.md .code-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 4px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); }
.md .code pre { margin: 0; padding: 12px; overflow-x: auto; }
.md .code pre code { background: transparent; padding: 0; white-space: pre; }
.md .table-wrap { overflow-x: auto; }
.md table { border-collapse: collapse; font-size: 14px; }
.md th, .md td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--surface-2); }
.md .ta-left { text-align: left; } .md .ta-center { text-align: center; } .md .ta-right { text-align: right; }

/* ---------- composer ---------- */
.composer { padding: 8px 16px 12px; background: var(--bg); }
.composer-box {
  max-width: 780px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 6px 8px 6px 4px; box-shadow: var(--shadow);
}
.composer-box:focus-within { border-color: var(--accent); }
.composer-row { display: flex; align-items: flex-end; }
.composer-row textarea {
  flex: 1; min-width: 0; border: 0; background: transparent; resize: none;
  max-height: 220px; padding: 9px 8px 9px 2px; line-height: 1.45; outline: none;
}
.attach-btn { color: var(--muted); margin: 0 2px 1px 0; }
.attach-btn:hover { color: var(--text); }
.attach-btn[disabled] { opacity: .4; cursor: not-allowed; }
.send { flex: none; min-width: 78px; }
.hint { max-width: 780px; margin: 6px auto 0; text-align: center; }

/* attachment chips (composer + sent messages) */
.attach-row { display: flex; flex-wrap: wrap; padding: 4px 4px 2px 8px; }
.chip {
  display: inline-flex; align-items: center; max-width: 100%;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
  padding: 4px 4px 4px 10px; margin: 0 6px 6px 0; font-size: 13px;
}
.chip .chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.chip .chip-meta { color: var(--muted); margin-left: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip.failed { border-color: var(--danger); color: var(--danger); }
.chip.failed .chip-meta { color: var(--danger); }
.chip-x {
  width: 24px; height: 24px; margin-left: 4px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1;
}
.chip-x:hover { background: var(--surface-2); color: var(--text); }
.bubble .chips { display: flex; flex-wrap: wrap; margin-top: 8px; }
.bubble .chips:first-child { margin-top: 0; }
.bubble .chip { background: var(--surface); padding-right: 10px; margin-bottom: 0; margin-top: 4px; }

/* drag & drop */
.main { position: relative; }
.drop-overlay {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14, 124, 102, .10); border: 2px dashed var(--accent); border-radius: 12px; margin: 8px;
  pointer-events: none; font-weight: 600; color: var(--accent);
}
.drop-overlay div { background: var(--surface); padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); }

/* ---------- files ---------- */
.files-btn {
  display: inline-flex; align-items: center; margin-right: 8px; flex: none;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  padding: 5px 12px 5px 10px; font-size: 13px; cursor: pointer;
}
.files-btn:hover { background: var(--surface-2); }
.files-btn[aria-expanded=true] { border-color: var(--accent); }
.files-btn svg { width: 16px; height: 16px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; margin-left: 6px;
  border-radius: 9px; background: var(--accent); color: var(--accent-text); font-size: 11px; font-weight: 700; text-align: center;
}
.files-panel {
  width: 320px; flex: none; display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border-left: 1px solid var(--border);
}
.fp-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 6px 16px; }
.fp-head h3 { margin: 0; font-size: 15px; }
.fp-actions { padding: 4px 16px 10px; }
.fp-body { flex: 1; overflow-y: auto; padding: 0 8px; }
.fp-foot { margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--border); }
.fp-empty { padding: 14px 8px; }
.file-row { display: flex; align-items: center; padding: 6px 4px 6px 8px; border-radius: 8px; }
.file-row:hover { background: var(--surface-2); }
.file-info { flex: 1; min-width: 0; }
.file-name { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name .dir { color: var(--muted); }
.file-meta { display: block; font-size: 12px; color: var(--muted); }
.file-act {
  width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; cursor: pointer;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.file-act:hover { background: var(--surface); color: var(--text); }
.file-act.del:hover { color: var(--danger); background: var(--danger-soft); }
.file-act svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1180px) {
  .files-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 20; width: 88%; max-width: 340px;
    box-shadow: var(--shadow);
  }
}

/* ---------- narrow screens: sidebar becomes a drawer ---------- */
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 20; width: 86%; max-width: 300px;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow);
  }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10; background: rgba(0, 0, 0, .35); }
  .chat-del { opacity: 1; }
  .topbar { padding: 8px 10px; }
  .messages { padding: 16px 12px 8px; }
  .composer { padding: 6px 10px 10px; }
  .hint { display: none; }
  .bubble { max-width: 92%; }
  .conn { max-width: 34%; }
  .files-btn span:not(.badge) { display: none; }
  .files-btn svg { margin-right: 0; }
  .chip .chip-name { max-width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---------- sidebar footer: usage + settings ---------- */
.sidebar-foot { display: flex; flex-direction: column; }
.usage-mini {
  display: flex; align-items: center; width: 100%; margin-bottom: 8px; padding: 6px 8px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left;
}
.usage-mini:hover { background: var(--surface-2); }
.um-bars { display: flex; flex-direction: column; width: 46px; margin-right: 10px; flex: none; }
.um-bar { display: block; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 2px 0; }
.usage-mini:hover .um-bar { background: var(--border); }
.um-bar i, .ubar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; }
.um-bar i.warn, .ubar i.warn { background: var(--warn); }
.um-bar i.crit, .ubar i.crit { background: var(--danger); }
.um-text { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.settings-btn { justify-content: flex-start; }
.settings-btn svg { width: 18px; height: 18px; margin-right: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- settings dialog ---------- */
.modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, .4); }
.modal-card {
  position: relative; width: 100%; max-width: 460px; max-height: 100%; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 8px 20px; }
.modal-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.modal-body { overflow-y: auto; padding: 0 20px 20px; }
.set-section { padding: 16px 0; border-top: 1px solid var(--border); }
.set-section:first-child { border-top: 0; padding-top: 4px; }
.set-section h3 { margin: 0 0 10px; font-size: 14px; }
.set-row-head { display: flex; align-items: baseline; justify-content: space-between; }
.set-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.set-label.spaced { margin-top: 16px; }
.set-hint { margin: 8px 0 0; }
.select {
  width: 100%; height: 40px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.segmented { display: flex; border: 1px solid var(--border); border-radius: 9px; padding: 3px; background: var(--bg); }
.segmented label { flex: 1; position: relative; margin: 0; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span {
  display: block; text-align: center; padding: 7px 6px; border-radius: 6px; cursor: pointer;
  font-size: 14px; color: var(--muted); user-select: none;
}
.segmented label:hover span { color: var(--text); }
.segmented input:checked + span { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.segmented input:focus + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.segmented input:focus:not(:focus-visible) + span { outline: none; }

.usage-item { margin: 0 0 14px; }
.usage-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.usage-top .pct { font-variant-numeric: tabular-nums; font-weight: 600; }
.ubar { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: 6px 0 4px; }
.usage-reset { font-size: 12px; color: var(--muted); }
.usage-foot { display: flex; align-items: center; justify-content: space-between; }
.usage-none { margin: 0 0 10px; }
.logout-btn { margin-top: 4px; color: var(--danger); }
.logout-btn:hover { background: var(--danger-soft); border-color: var(--danger); }

@media (max-width: 520px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal-card { max-width: none; border-radius: 14px 14px 0 0; max-height: 92%; }
}
