/* 家庭用秘書AI「あんちゃん」 — モバイル前提のシンプルUI */

:root {
  --bg: #ffffff;
  --surface: #f3f4f7;
  --surface-2: #e9ebf0;
  --text: #14161a;
  --muted: #6b7280;
  --line: #e2e5ea;
  --accent: #3b6cf6;
  --accent-text: #ffffff;
  --danger: #d9455f;
  --radius: 18px;
  --bar-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #191d25;
    --surface-2: #232833;
    --text: #e8eaee;
    --muted: #9099a8;
    --line: #262c37;
    --accent: #5b86ff;
    --accent-text: #ffffff;
    --danger: #ff6b81;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* display を指定した要素でも hidden 属性が確実に効くようにする */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overscroll-behavior-y: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

/* ------------------------------------------------------------ レイアウト */

.screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}

.bar {
  display: flex; align-items: center; gap: 8px;
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 6px 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  flex: none;
}

.bar-title {
  flex: 1;
  margin: 0;
  font-size: 17px; font-weight: 600; text-align: center;
  letter-spacing: .02em;
}

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 0; border-radius: 12px;
  background: transparent; color: var(--text);
  cursor: pointer;
}
.icon-btn:active { background: var(--surface-2); }

/* -------------------------------------------------------------- ログイン */

.gate { justify-content: center; align-items: center; padding: 24px; }
.gate-inner { width: min(340px, 100%); text-align: center; }

.gate-mark {
  width: 68px; height: 68px; margin: 0 auto 20px;
  display: grid; place-items: center;
  border-radius: 20px;
  background: var(--accent); color: var(--accent-text);
  font-size: 26px; font-weight: 700; letter-spacing: .04em;
}

.gate-title { margin: 0 0 8px; font-size: 19px; font-weight: 600; }
.gate-note { margin: 0 0 22px; font-size: 13.5px; color: var(--muted); line-height: 1.7; }

#gate-form { display: flex; flex-direction: column; gap: 10px; }

#gate-form input {
  padding: 13px 16px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--text);
  font: inherit; text-align: center; outline: none;
}
#gate-form input:focus { border-color: var(--accent); }

.gate-submit { padding: 13px; border-radius: 14px; font-size: 16px; }

.gate-error {
  margin: 2px 0 0; font-size: 13.5px; color: var(--danger);
}

/* 名前を選ぶボタン */
.member-picker { display: flex; flex-direction: column; gap: 10px; }

.member-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.member-btn:active { background: var(--surface-2); }

.member-avatar {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  background: var(--member-color, var(--accent)); color: #fff;
  font-size: 17px; font-weight: 700;
}
.member-name { font-size: 16px; }

/* ------------------------------------------------------------ ルーム切替 */

.room-tabs {
  flex: none;
  display: flex; gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.room-tab {
  flex: 1;
  padding: 8px 12px;
  border: 0; border-radius: 11px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 14px; cursor: pointer;
}
.room-tab.active { background: var(--surface-2); color: var(--text); font-weight: 600; }

/* -------------------------------------------------------------- 設定画面 */

.who {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 18px;
  border-radius: 14px;
  background: var(--surface);
  font-size: 14px;
}
.who-avatar {
  display: grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  border-radius: 50%; color: #fff;
  font-size: 14px; font-weight: 700;
}

/* 設定のまとまり */
.group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.group > summary {
  display: flex; align-items: baseline; gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  cursor: pointer; list-style: none;
  position: relative; padding-right: 40px;
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary::after {
  content: "＋"; position: absolute; right: 16px; top: 13px;
  color: var(--accent); font-size: 15px;
}
.group[open] > summary::after { content: "−"; }
.group[open] > summary { border-bottom: 1px solid var(--line); }
.group > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.group-name { font-size: 15px; font-weight: 600; }
.group-sub { font-size: 12px; color: var(--muted); }

.group > *:not(summary) { margin-left: 16px; margin-right: 16px; }
.group > *:last-child { margin-bottom: 16px; }

.section-title {
  margin: 28px 0 10px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  letter-spacing: .03em;
}
.section-title:first-of-type { margin-top: 0; }

.hint { margin: 2px 0 12px; font-size: 12.5px; color: var(--muted); }

.btn.wide { width: 100%; padding: 12px; }
.btn.small { padding: 7px 12px; font-size: 13px; flex: none; }

/* メッセージの下に出る操作ボタン */
.msg-action {
  align-self: flex-start;
  margin-top: 8px; padding: 9px 16px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-text);
  font: inherit; font-size: 14px; cursor: pointer;
}
.msg-action:active { opacity: .85; }

/* 連携の一覧 */
.link-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px; margin-bottom: 8px;
  border-radius: 14px; background: var(--surface);
}
.link-info { flex: 1; min-width: 0; }
.link-title { font-size: 14px; font-weight: 600; }
.link-meta { font-size: 12px; color: var(--muted); word-break: break-all; }
.link-bad { color: var(--danger); }

.msg-action.done { background: var(--surface-2); color: var(--muted); }

/* 道具の承認画面 */
.tool-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tool-name { font-size: 16px; font-weight: 600; font-family: ui-monospace, monospace; }

.tool-status {
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--muted);
}
.tool-status.pending { background: color-mix(in srgb, #e8a33d 22%, transparent); color: #e8a33d; }
.tool-status.approved { background: color-mix(in srgb, #12a594 22%, transparent); color: #12a594; }
.tool-status.rejected, .tool-status.disabled {
  background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger);
}

.tool-reason { margin: 0 0 4px; font-size: 13.5px; line-height: 1.7; }

.tool-code {
  margin: 0; padding: 12px;
  max-height: 300px; overflow: auto;
  border-radius: 12px;
  background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; line-height: 1.55;
  white-space: pre; tab-size: 4;
}

.warn {
  margin: 14px 0 4px; padding: 11px 13px;
  border-radius: 12px;
  background: color-mix(in srgb, #e8a33d 14%, transparent);
  color: var(--text);
  font-size: 12.5px; line-height: 1.7;
}

/* 変更されるファイル */
.file-change {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
.file-change > summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 11px 13px;
  background: var(--surface);
  cursor: pointer; list-style: none;
}
.file-change > summary::-webkit-details-marker { display: none; }
.file-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; word-break: break-all;
}
.file-delta { flex: none; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.file-delta.plus { color: #12a594; }
.file-delta.minus { color: var(--danger); }
.file-change .tool-code { border-radius: 0; max-height: 340px; }

.tool-status.applying { background: color-mix(in srgb, #e8a33d 22%, transparent); color: #e8a33d; }
.tool-status.applied { background: color-mix(in srgb, #12a594 22%, transparent); color: #12a594; }
.tool-status.failed, .tool-status.rolled_back {
  background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger);
}

.secret-note {
  margin: 4px 0 10px; font-size: 12.5px; line-height: 1.7; color: var(--muted);
}
.secret-note strong { color: var(--text); }

/* ------------------------------------------------------------- やること */

.icon-btn { position: relative; }

.badge {
  position: absolute; top: 4px; right: 3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 1;
}

.task-body {
  flex: 1; overflow-y: auto;
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
}

.task-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.task {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  border-radius: 14px; background: var(--surface);
}
.task.done { opacity: .5; }
.task.done .task-title { text-decoration: line-through; }

.task-check {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  display: grid; place-items: center;
  border: 1.8px solid var(--line); border-radius: 7px;
  background: transparent; color: var(--accent-text); cursor: pointer;
}
.task.done .task-check { background: var(--accent); border-color: transparent; }
.task-check svg { width: 14px; height: 14px; stroke-width: 2.6; }

.task-body-text { flex: 1; min-width: 0; }
.task-title { font-size: 15px; }
.task-meta { font-size: 12.5px; color: var(--muted); }

.task-del {
  flex: none; width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.task-del svg { width: 15px; height: 15px; }

.show-done {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); margin-bottom: 6px;
}
.show-done input { width: 16px; height: 16px; }

/* 使える量の残り */

.usage-group {
  padding: 13px 14px; margin-bottom: 10px;
  border-radius: 14px; background: var(--surface);
}
.usage-title { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }

.usage-row { margin-bottom: 12px; }
.usage-row:last-child { margin-bottom: 0; }

.usage-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; color: var(--muted); margin-bottom: 5px;
}
.usage-pct { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.usage-pct.ok { color: #12a594; }
.usage-pct.warn { color: #e8a33d; }
.usage-pct.low { color: var(--danger); }

.usage-bar {
  height: 6px; border-radius: 999px;
  background: var(--surface-2); overflow: hidden;
}
.usage-bar i { display: block; height: 100%; border-radius: 999px; background: #12a594; }
.usage-bar i.warn { background: #e8a33d; }
.usage-bar i.low { background: var(--danger); }

.usage-reset { margin-top: 4px; font-size: 11.5px; color: var(--muted); }

.hook-box {
  padding: 10px 12px; margin-bottom: 8px;
  border-radius: 12px; background: var(--surface-2);
  overflow-x: auto;
}
.hook-box code { font-size: 11.5px; white-space: nowrap; font-family: ui-monospace, monospace; }

.lead { margin: 0 0 18px; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.lead strong { color: var(--text); }

.help { margin: 4px 0 14px; font-size: 13px; color: var(--muted); }
.help summary { cursor: pointer; color: var(--accent); }
.help ol { margin: 10px 0; padding-left: 20px; line-height: 1.9; }
.help code {
  padding: 1px 5px; border-radius: 5px;
  background: var(--surface-2); font-size: 12px;
}

.field select {
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text);
  font: inherit; outline: none;
}
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }

/* -------------------------------------------------------------- チャット */

.messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px 8px;
  display: flex; flex-direction: column; gap: 10px;
}

.msg-wrap {
  display: flex; flex-direction: column;
  max-width: 84%;
  align-self: flex-start;
  animation: rise .18s ease-out;
}
.msg-wrap.mine { align-self: flex-end; align-items: flex-end; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.msg-sender {
  margin: 0 0 3px 4px;
  font-size: 12.5px; font-weight: 600;
  color: var(--muted);
}

.msg {
  padding: 10px 14px;
  border-radius: var(--radius);
  white-space: pre-wrap; word-break: break-word;
}

/* Markdownを整形したあんちゃんの返答 */
.msg.assistant { white-space: normal; }
.msg p { margin: 0 0 .7em; }
.msg p:last-child, .msg ul:last-child { margin-bottom: 0; }
.msg ul { margin: 0 0 .7em; padding-left: 1.25em; }
.msg li { margin: .2em 0; }
.msg strong { font-weight: 600; }
.msg code {
  padding: 1px 5px; border-radius: 5px;
  background: var(--surface-2); font-size: .9em;
}
.msg a { color: var(--accent); }

/* 自分の発言だけアクセント色。他の家族の発言はあんちゃんと同じ地色にして、名前で見分ける */
.msg.user { background: var(--surface-2); border-bottom-left-radius: 6px; }
.msg.user.mine {
  background: var(--accent); color: var(--accent-text);
  border-bottom-left-radius: var(--radius); border-bottom-right-radius: 6px;
}

.msg.assistant {
  background: var(--surface);
  border-bottom-left-radius: 6px;
}

.msg.error {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
  font-size: 14px;
}
.msg-wrap:has(.msg.error) { align-self: center; max-width: 92%; }

.tool-pill {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
  font-size: 13px;
}

.dots { display: inline-flex; gap: 3px; }
.dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  animation: blink 1.2s infinite;
}
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* 空状態 */
.empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
}
.empty-mark {
  width: 56px; height: 56px; margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: var(--surface);
  color: var(--accent);
}
.empty-mark svg { width: 28px; height: 28px; }
.empty-title { margin: 0 0 18px; font-size: 16px; }

.suggestions { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.chip {
  padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--text);
  font-size: 14px; cursor: pointer;
}
.chip:active { background: var(--surface); }

/* 作業の様子 */

.progress {
  align-self: stretch;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13.5px;
}
.progress.done { padding: 0; background: transparent; border: 0; }
.progress.done > summary {
  padding: 7px 12px;
  display: inline-block;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  list-style: none;
}
.progress.done > summary::-webkit-details-marker { display: none; }
.progress.done > .progress-steps { margin-top: 8px; padding: 10px 12px;
  border-radius: 12px; background: var(--surface); }

.progress-head {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted);
}
.progress-label { font-size: 13px; }

.progress-steps {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 7px;
}
.progress-steps:not(:empty) { margin-top: 10px; }

.pstep { display: flex; align-items: flex-start; gap: 9px; }

.pstep-mark {
  flex: none; width: 13px; height: 13px; margin-top: 4px;
  border-radius: 50%;
  border: 2px solid var(--line);
}
.pstep.active .pstep-mark {
  border-color: var(--accent);
  border-right-color: transparent;
  animation: spin .8s linear infinite;
}
.pstep.done .pstep-mark { border-color: var(--good, #12a594); background: var(--good, #12a594); }
.pstep.error .pstep-mark { border-color: var(--danger); background: var(--danger); }

@keyframes spin { to { transform: rotate(360deg); } }

.pstep-body { flex: 1; min-width: 0; }
.pstep-name { display: block; font-size: 13px; }
.pstep-detail {
  display: block; font-size: 11.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pstep-time {
  flex: none; font-size: 11px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* 入力欄 */
.composer {
  flex: none;
  display: flex; flex-direction: column; gap: 7px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.composer-row { display: flex; align-items: flex-end; gap: 8px; }

.composer-top { display: flex; align-items: center; gap: 9px; min-width: 0; }

.model-pill {
  flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}
.model-pill svg { width: 13px; height: 13px; stroke-width: 1.6; }
.model-pill select {
  border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 12.5px;
  padding: 0; margin: 0;
  cursor: pointer; outline: none;
  -webkit-appearance: none; appearance: none;
  max-width: 46vw; text-overflow: ellipsis;
}

.model-hint {
  font-size: 11.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.composer textarea {
  flex: 1;
  max-height: 132px;
  padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); color: var(--text);
  font: inherit; line-height: 1.45;
  resize: none; outline: none;
}
.composer textarea:focus { border-color: var(--accent); }

.send-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  border: 0; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  cursor: pointer;
}
.send-btn:disabled { opacity: .35; }

/* ------------------------------------------------------------ カレンダー */

.sheet { animation: slide-up .24s cubic-bezier(.32, .72, 0, 1); }
@keyframes slide-up { from { transform: translateY(100%); } }

.cal-nav {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 10px 0 4px;
}
.nav-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 0; border-radius: 10px;
  background: var(--surface); color: var(--text);
  cursor: pointer;
}
.today-btn {
  padding: 6px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--text);
  font-size: 13px; cursor: pointer;
}

.weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 6px 8px 2px;
  font-size: 12px; color: var(--muted); text-align: center;
}
.weekdays span:first-child { color: var(--danger); }
.weekdays span:last-child { color: var(--accent); }

.grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; padding: 0 8px;
  flex: none;
}

.cell {
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; border-radius: 12px;
  background: transparent; color: var(--text);
  font-size: 15px; cursor: pointer;
}
.cell.other { color: var(--muted); opacity: .45; }
.cell.today { font-weight: 700; color: var(--accent); }
.cell.selected { background: var(--accent); color: var(--accent-text); }
.cell.selected .dot { background: var(--accent-text); }

.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.dot-row { display: flex; gap: 3px; height: 5px; }

.day-panel {
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
}

.day-heading { margin: 0 0 10px; font-size: 15px; color: var(--muted); font-weight: 600; }

.event-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.event {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}
.event:active { background: var(--surface-2); }
.event-time { flex: none; width: 52px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.event-body { flex: 1; min-width: 0; }
.event-title { font-size: 15px; }
.event-meta { font-size: 12.5px; color: var(--muted); }
.event-bar { width: 3px; align-self: stretch; border-radius: 2px; background: var(--accent); }

.no-events { color: var(--muted); font-size: 14px; padding: 8px 2px; }

/* ------------------------------------------------------------ モーダル */

.modal {
  width: min(440px, calc(100vw - 32px));
  max-height: 85vh; overflow-y: auto;
  padding: 20px;
  border: 0; border-radius: 20px;
  background: var(--bg); color: var(--text);
}
.modal::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px); }

.modal-title { margin: 0 0 16px; font-size: 17px; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; flex: 1; }
.field > span { font-size: 12.5px; color: var(--muted); }
.field input, .field textarea {
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text);
  font: inherit; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field-row { display: flex; gap: 10px; }
.field.checkbox { flex-direction: row; align-items: center; gap: 8px; }
.field.checkbox input { width: 18px; height: 18px; }
.field.checkbox span { font-size: 14px; color: var(--text); }

.modal-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.spacer { flex: 1; }
.btn {
  padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text);
  font: inherit; cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.danger { color: var(--danger); border-color: transparent; }
