/* 文芽作文 - AI 写作页 */

:root {
  --cell: 36px;          /* 单格尺寸（初版：流动文字铺在方格底纹上） */
  --grid-line: #e7e2d6;  /* 浅灰方格线 */
  --grid-line-strong: #d8d1c0;
  /* 霞鹜文楷：SIL OFL 1.1 免费可商用，楷书手写风，用于稿纸正文 */
  --hand: "LXGW WenKai", "Kaiti SC", "KaiTi", "STKaiti", "楷体", var(--serif);
}

/* ---------- 头部 ---------- */

.tool-head {
  padding: 40px 0 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.tool-head h1 { font-size: 32px; margin-bottom: 8px; }

.tool-head p { color: var(--ink-soft); max-width: 70ch; font-size: 15px; }

.tool-head .btn { flex: none; }

.badge-new {
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft, #f3e9df);
  color: var(--accent, #b5651d);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
}

/* ---------- 接口配置（可收起） ---------- */

.config-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.config-panel[hidden] { display: none; }

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
}

.config-grid .field:last-child { margin-bottom: 0; }

/* ---------- 通用表单 ---------- */

.field { margin-bottom: 16px; }

.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.field label .opt { color: var(--ink-mute); font-weight: 400; }

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 10px 12px;
  font-size: 14.5px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 111, 78, .1);
}

.textarea { resize: vertical; min-height: 88px; line-height: 1.7; }

.input[readonly] { color: var(--ink-mute); background: var(--paper-2); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.ex-chip {
  border: 1px dashed #cfc9ba;
  background: transparent;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .16s;
}

.ex-chip:hover { border-style: solid; border-color: var(--brand); color: var(--brand-deep); }

.examples-hint { font-size: 12.5px; color: var(--ink-mute); padding: 3px 0; }

/* ---------- API 配置 ---------- */

.config-note {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--paper-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.config-note strong { color: var(--ink); }

.key-row { display: flex; gap: 8px; }

.key-row .input { flex: 1; min-width: 0; }

.btn-mini {
  flex: none;
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-soft);
}

.btn-mini:hover { color: var(--ink); background: #eae4d8; }

/* ---------- 按钮 ---------- */

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.actions .spacer { flex: 1; }

.btn-outline {
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}

.btn-outline[hidden] { display: none; }

.btn-outline:hover { border-color: var(--brand); color: var(--brand-deep); }

.btn:disabled, .btn-outline:disabled { opacity: .5; cursor: not-allowed; }

.btn-lg { height: 48px; padding: 0 30px; font-size: 16px; }

.status-line {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-mute);
}

.status-line.error { color: var(--accent); }
.status-line.ok { color: var(--brand); }

/* ============ 创建作文工作台（向导） ============ */

.wizard-steps {
  list-style: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 0 22px;
}

.wizard-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-mute);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}

.wizard-steps li .dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink-mute);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.wizard-steps li.done { color: var(--brand); border-color: rgba(47,111,78,.4); }
.wizard-steps li.done .dot { background: var(--brand); color: #fff; }
.wizard-steps li.active { color: var(--ink); border-color: var(--brand); font-weight: 600; }
.wizard-steps li.active .dot { background: var(--brand); color: #fff; }

.wizard-body {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px 30px;
}

.wstep { padding: 18px 0; border-bottom: 1px dashed var(--line); }
.wstep:last-of-type { border-bottom: 0; }

.wstep-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }

.wstep-no {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wstep-head h2 { font-size: 18px; }
.wstep-opt { font-size: 12.5px; color: var(--ink-mute); background: var(--paper-2); border-radius: 999px; padding: 2px 10px; }
.wstep-tip { font-size: 13px; color: var(--ink-mute); margin-top: 12px; }
.wstep-tip strong { color: var(--ink-soft); }

/* 类别卡片 */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.cat-card {
  text-align: left;
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px 16px;
  cursor: pointer;
  transition: all .16s;
}

.cat-card:hover { border-color: var(--brand); }

.cat-card.selected {
  border-color: var(--brand);
  background: rgba(47,111,78,.06);
  box-shadow: 0 0 0 3px rgba(47,111,78,.1);
}

.cat-name { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.cat-desc { font-size: 13px; color: var(--ink-mute); line-height: 1.6; }

/* 聊天框风格输入框 */
.chat-box {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: 14px 16px 12px;
  transition: border-color .18s, box-shadow .18s;
}

.chat-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47,111,78,.1);
}

.chat-input-area {
  width: 100%;
  border: 0;
  background: transparent;
  resize: vertical;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  outline: none;
  font-family: var(--sans);
}

.chat-input-area::placeholder { color: var(--ink-mute); }

.chat-hint { font-size: 12.5px; color: var(--ink-mute); margin-top: 6px; }

/* 字数滚动条 */
.word-roller {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 6px 0 18px;
}

.roller-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-size: 26px;
  line-height: 1;
  color: var(--brand);
  cursor: pointer;
  transition: all .16s;
}

.roller-btn:hover { border-color: var(--brand); background: rgba(47,111,78,.06); }

.roller-num {
  min-width: 130px;
  text-align: center;
  font-family: var(--sans);
  font-size: 46px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .02em;
}

.roller-num::after { content: " 字"; font-size: 18px; font-weight: 500; color: var(--ink-mute); }

.word-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--paper-2);
  outline: none;
  margin: 4px 0 8px;
}

.word-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  cursor: pointer;
}

.word-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  cursor: pointer;
}

.word-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-mute);
}

/* 评分标准卡片 */
.scoring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.scoring-card {
  text-align: left;
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: all .16s;
}

.scoring-card:hover { border-color: var(--brand); }

.scoring-card.selected {
  border-color: var(--brand);
  background: rgba(47,111,78,.06);
  box-shadow: 0 0 0 3px rgba(47,111,78,.1);
}

.scoring-name { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.scoring-desc { font-size: 12px; color: var(--ink-mute); line-height: 1.5; }

/* 向导底部 */
.wizard-actions {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.wizard-actions .status-line { margin-top: 0; }

/* ============ 生成界面（截图布局：左 35% / 右 65%） ============ */

#studio[hidden] { display: none; }

#studio {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 0 18px;
  box-sizing: border-box;
}

.studio-top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex: none;
  padding: 14px 0 12px;
}

.studio-meta {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-tools { display: flex; gap: 8px; align-items: center; }

.studio-grid {
  display: grid;
  grid-template-columns: 35% 65%;
  gap: 20px;
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 0;
}

.studio-left { min-width: 0; min-height: 0; }

.chat-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.chat-list {
  flex: 1 1 auto;
  overflow: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-foot {
  flex: none;
  border-top: 1px solid var(--line);
  padding: 12px 14px 14px;
  background: var(--paper);
}

.chat-send-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }

.chat-send-row .spacer { flex: 1; }

.studio-right { min-width: 0; min-height: 0; }

.studio-right .paper {
  height: 100%;
  overflow: auto;
}

/* ---------- 对话气泡（复用） ---------- */

.context-empty {
  color: var(--ink-mute);
  font-size: 13.5px;
  line-height: 1.8;
  padding: 6px 2px;
}

.bubble { display: flex; flex-direction: column; gap: 5px; max-width: 100%; }

.bubble-label { font-size: 11.5px; color: var(--ink-mute); padding: 0 2px; }

.bubble-text {
  max-width: 94%;
  padding: 10px 13px;
  border-radius: 13px;
  font-size: 13.5px;
  line-height: 1.72;
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble.user { align-items: flex-end; }
.bubble.user .bubble-text {
  background: rgba(47, 111, 78, .12);
  color: var(--ink);
  border-bottom-right-radius: 4px;
}

.bubble.ai { align-items: flex-start; }
.bubble.ai .bubble-text {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  color: var(--ink);
}

/* ============ 右栏：作文纸（初版：流动文字铺在方格底纹上，随内容增高） ============ */

.paper {
  position: relative;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.paper::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(var(--brand), #a8c9b3);
  z-index: 2;
}

.paper-inner {
  padding: calc(var(--cell) / 2) calc(var(--cell) / 2) calc(var(--cell) * 1.5);
  min-height: 460px;
}

.paper-title {
  font-family: var(--hand);
  font-size: 23px;
  font-weight: 700;
  text-align: center;
  letter-spacing: .1em;
  margin-bottom: 24px;
  min-height: 30px;
  color: var(--ink);
}

.paper-body {
  font-family: var(--hand);
  font-size: calc(var(--cell) / 2);
  font-weight: 700;
  line-height: var(--cell);
  letter-spacing: calc(var(--cell) / 2);
  padding-left: calc(var(--cell) / 4);
  color: #232824;
  white-space: pre-wrap;
  word-break: break-word;
  background-image:
    repeating-linear-gradient(to right, var(--grid-line) 0 1px, transparent 1px var(--cell)),
    repeating-linear-gradient(to bottom, var(--grid-line) 0 1px, transparent 1px var(--cell));
  background-position: 0 0;
  min-height: 340px;
}

.paper-body p {
  margin: 0 0 var(--cell);
  text-indent: calc(var(--cell) * 2);
}

.paper-body p:last-child { margin-bottom: 0; }

.paper-empty {
  font-family: var(--sans);
  font-size: 14px;
  line-height: var(--cell);
  letter-spacing: 0;
  color: var(--ink-mute);
  text-align: center;
  padding-top: 100px;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  vertical-align: -.15em;
  background: var(--brand);
  animation: blink .9s step-end infinite;
  letter-spacing: 0;
}

@keyframes blink { 50% { opacity: 0; } }

/* 进入生成界面时，隐藏页头/页脚，让 studio 真正占满整屏、不出现整页滚动 */
body.studio-mode { overflow: hidden; }
body.studio-mode .site-header,
body.studio-mode .site-footer { display: none; }

/* ============ 响应式 ============ */

@media (max-width: 960px) {
  .config-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .studio-grid { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .studio-left { height: 60vh; min-height: 360px; }
  .studio-right .paper { height: 70vh; min-height: 420px; }
  .row-2 { grid-template-columns: 1fr; }
  body.studio-mode #studio { height: auto; min-height: 100vh; }
}

@media (max-width: 680px) {
  :root { --cell: 32px; }
  .tool-head {
    padding: 32px 0 20px;
    flex-direction: column;
    align-items: flex-start;
  }
  .tool-head h1 { font-size: 26px; }
  .wizard-body { padding: 18px 16px 22px; }
  .paper-inner { padding: calc(var(--cell) / 2) 12px calc(var(--cell) * 1.5); }
  body.studio-mode #studio { padding: 0 12px; }
}

@media (max-width: 680px) {
  :root { --cell: 32px; }
  .tool-head {
    padding: 32px 0 20px;
    flex-direction: column;
    align-items: flex-start;
  }
  .tool-head h1 { font-size: 26px; }
  .wizard-body { padding: 18px 16px 22px; }
  .paper-inner { padding: calc(var(--cell) / 2) 12px calc(var(--cell) * 1.5); }
}

/* ============ 老师手批：朱红修改符号 ============ */

.paper-body .ink-mark {
  position: relative;
  color: #a8322a;
  cursor: pointer;
  border-radius: 2px;
  padding: 0 1px;
}
.paper-body .ink-mark .ink-no {
  font-family: var(--sans, sans-serif);
  font-size: 13px;
  line-height: 1;
  vertical-align: super;
  color: #fff;
  background: #a8322a;
  border-radius: 50%;
  padding: 2px 5px;
  margin-left: 3px;
  letter-spacing: 0;
}
.paper-body .ink-delete { text-decoration: line-through; text-decoration-color: #a8322a; text-decoration-thickness: 2px; }
.paper-body .ink-replace { text-decoration: line-through; text-decoration-color: #a8322a; text-decoration-thickness: 2px; background: rgba(168, 50, 42, .07); }
.paper-body .ink-insert { border-bottom: 2px solid #a8322a; }
.paper-body .ink-swap { border: 1px dashed #a8322a; }
.paper-body .ink-comment { text-decoration: underline wavy #a8322a; text-underline-offset: 4px; }
.paper-body .ink-suggest {
  font-size: .86em;
  font-weight: 700;
  color: #a8322a;
  letter-spacing: 0;
  background: rgba(168, 50, 42, .10);
  border-radius: 3px;
  padding: 2px 5px;
  margin: 0 3px;
  white-space: normal;
}

/* 上一轮已采纳改动：黄底标记 */
.paper-body .ink-prev {
  background: #ffe9a8;
  border-bottom: 2px solid #e0a92b;
  border-radius: 2px;
  padding: 0 1px;
  color: #5a4310;
}

/* 采纳/忽略按钮直接贴在被改文字旁边（稿纸内，不在对话区） */
.paper-body .ink-tools {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  vertical-align: middle;
  margin: 0 4px;
  padding: 2px 5px;
  background: #fffaf3;
  border: 1px solid #d9b6ac;
  border-radius: 6px;
  font-family: var(--sans, sans-serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(120, 80, 40, .12);
}
.paper-body .ink-tools .ink-reason {
  color: #8c332b;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.paper-body .ink-tools button {
  border: 1px solid #d9b6ac;
  background: #fff;
  color: #7a4a3a;
  border-radius: 4px;
  font-family: var(--sans, sans-serif);
  font-size: 13px;
  line-height: 1.4;
  padding: 3px 9px;
  cursor: pointer;
}
.paper-body .ink-tools button:hover { border-color: #a8322a; }
.paper-body .ink-tools button.ink-accept {
  background: #2f6f4e;
  border-color: #2f6f4e;
  color: #fff;
}
.paper-body .ink-tools button.ink-accept:hover { opacity: .88; }

/* ============ 批注面板（左侧对话区内，可随对话一起滚） ============ */

.annot-panel {
  border: 1px solid #e3cec4;
  background: #fffaf7;
  border-radius: var(--radius, 10px);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.annot-panel[hidden] { display: none; }
.annot-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 15px;
  font-weight: 600;
  color: #8c332b;
}
.annot-count { font-size: 13px; font-weight: 400; color: var(--ink-mute); }
.annot-actions { display: flex; gap: 7px; }
.annot-actions .btn-outline { flex: 1; font-size: 13.5px; padding: 6px 8px; }
.annot-legend {
  font-size: 12.5px;
  line-height: 1.6;
  color: #7a5a20;
  background: #fff5d9;
  border: 1px solid #f0d68a;
  border-radius: 6px;
  padding: 6px 9px;
}

.annot-card {
  border: 1px solid #ecded7;
  background: #fff;
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.annot-card.state-accepted { opacity: .62; border-color: #cfe0d3; background: #f7fbf8; }
.annot-card.state-ignored { opacity: .5; }
.annot-card.state-invalid { border-color: #e0c088; background: #fffbf2; }
.annot-card-top { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.annot-no { color: #a8322a; font-weight: 600; font-size: 15px; }
.annot-sym {
  border: 1px solid #d9b6ac;
  color: #8c332b;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 13px;
}
.annot-state { margin-left: auto; color: var(--ink-mute); font-size: 13px; }
.annot-orig {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: #faf5f2;
  border-left: 2px solid #d9b6ac;
  padding: 5px 9px;
  word-break: break-word;
}
.annot-sug { font-size: 14px; line-height: 1.65; color: #8c332b; word-break: break-word; }
.annot-reason { font-size: 13.5px; line-height: 1.6; color: var(--ink-mute); }
.annot-card-actions { display: flex; gap: 7px; margin-top: 2px; }
.btn-mini {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 6px;
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
}
.btn-mini:hover { border-color: var(--brand); color: var(--brand-deep); }
.btn-mini.primary { background: var(--brand, #2f6f4e); border-color: var(--brand, #2f6f4e); color: #fff; }
.btn-mini.primary:hover { opacity: .9; color: #fff; }

/* ============ 账号区 / 登录弹窗 ============ */

.account-area { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.account-name { font-size: 13px; color: var(--ink-soft); }

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(28, 32, 28, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-mask[hidden] { display: none; }
.modal-card {
  width: 100%;
  max-width: 400px;
  background: var(--card, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
  padding: 20px 22px 18px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h2 { font-size: 18px; }
.modal-close {
  border: 0; background: transparent; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--ink-mute); padding: 0 4px;
}
.auth-tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.auth-tab {
  border: 0; background: transparent; cursor: pointer;
  font-size: 13.5px; color: var(--ink-mute);
  padding: 7px 14px; border-bottom: 2px solid transparent;
}
.auth-tab.active { color: var(--brand-deep, #245c40); border-bottom-color: var(--brand, #2f6f4e); font-weight: 600; }
.modal-card .field { margin-bottom: 12px; }
.modal-card .field[hidden] { display: none; }
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row .input { flex: 1; min-width: 0; }
.code-row .btn-outline { flex: none; white-space: nowrap; font-size: 12.5px; padding: 0 12px; }
.code-row .btn-outline:disabled { opacity: .55; cursor: default; }
.auth-hint { margin-top: 6px; line-height: 1.6; font-size: 12px; color: var(--ink-mute); }
.auth-msg { font-size: 12.5px; line-height: 1.6; min-height: 18px; margin-bottom: 8px; }
.auth-msg.error { color: #b23b30; }
.auth-msg.ok { color: var(--brand-deep, #245c40); }
.modal-actions { display: flex; justify-content: flex-end; }
.auth-foot { margin-top: 12px; font-size: 11.5px; color: var(--ink-mute); line-height: 1.6; text-align: center; }
