/* ============================================================
   《记我》用户端样式 · 视觉对齐交互原型 2026-11-30
   取向：视觉做减法——收敛圆角与阴影、去渐变、用区块边界与
   三态描边表达层级。DOM、文案、交互属性与功能完全不变。
   ============================================================ */
:root {
  --bg: #F5F3EF;
  --surface: #FFFFFF;
  --paper: #FBF9F5;
  --ink: #2B2B29;
  --ink-2: #5C5B57;
  --ink-3: #6B6A64;        /* 三级文字加深，WCAG AA */
  --line: #E2DED6;
  --line-warm: #E6DCCD;
  --accent: #A9542F;
  --accent-soft: #F7EBE4;
  --danger: #B4443A;
  --ok: #0F6E56;
  --link: #185FA5;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible,
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* hidden 属性必须赢过任何 display 规则——
   .offline 的 display:flex 曾把 hidden 打败，导致"额度用完"提示层
   从页面打开第一秒起就常驻（z-index 15 的半透明遮罩把整页都罩淡了） */
[hidden] { display: none !important; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* 挡住移动端浏览器的「下拉到顶 → 整页刷新」。
   原理：下拉刷新是滚动链冒泡到页面根才触发的，两边都掐断——
   内部容器 contain：滚到顶后不再把滚动传给页面；
   根 none：即便从标题栏等非滚动区下拉也不触发。
   只影响滚到边界后的连锁行为，容器内正常滚动不受影响。
   注意：iOS Safari 的系统级下拉刷新不吃这条 CSS，那条得靠 URL 锚点兜底。 */
html, body { overscroll-behavior-y: none; }
.thread, .dv-list, .ev-body, .gate { overscroll-behavior-y: contain; }

.phone {
  width: 100%;
  max-width: 420px;
  height: min(760px, calc(100vh - 40px));
  background: var(--surface);
  border: 1px solid #D8D2C8;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(60, 50, 40, .06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--surface);
  min-height: 60px;
}
.who { display: flex; align-items: center; gap: 9px; }
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.name { font-size: 15px; font-weight: 600; letter-spacing: .5px; }
.sub { font-size: 11px; color: var(--ink-3); }
.quota { font-size: 11px; color: var(--ink-3); text-align: right; white-space: nowrap; }
.quota b { color: var(--accent); font-weight: 600; }

.thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.day {
  align-self: center;
  font-size: 11px;
  color: var(--ink-3);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 4px;
}

.msg { display: flex; flex-direction: column; gap: 4px; max-width: 84%; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.jiro { align-self: flex-start; align-items: flex-start; }

.bubble {
  padding: 9px 13px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.me .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.jiro .bubble { background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }

.msg.daily { align-self: stretch; max-width: 100%; }
.msg.daily .bubble {
  background: var(--paper);
  border: 1px solid var(--line-warm);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.daily-tag {
  font-size: 11px; color: var(--accent); letter-spacing: 1px;
  margin-bottom: 5px; font-weight: 600;
}

/* ---- 顶栏日记入口 ---- */
.bar-right { display: flex; align-items: center; gap: 9px; }
.diary-btn {
  position: relative;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  border-radius: 6px; padding: 5px 12px;
  font-family: var(--font); font-size: 12.5px; cursor: pointer;
  min-height: 32px;
}
.diary-btn:hover { border-color: var(--accent); }
.diary-btn:active { border-color: var(--accent); color: var(--accent); }
.reddot {
  position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #D6453D; border: 1.5px solid var(--surface);
}

/* ---- 22:00 送达引导卡片（不剧透内容，点开去日记线）---- */
.msg.daily .bubble.guide { cursor: pointer; }
.guide:hover { border-color: var(--accent); }
.guide-go {
  font-size: 12px; color: var(--accent); margin-top: 7px; font-weight: 600;
}

/* ---- 日记线视图 ---- */
.diaryview {
  position: absolute; inset: 0; z-index: 18;
  background: var(--surface);
  display: flex; flex-direction: column;
}
.dv-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  flex-shrink: 0; min-height: 56px; gap: 8px;
}
.dv-back {
  border: none; background: none; color: var(--ink-2);
  font-size: 24px; line-height: 1; cursor: pointer; padding: 2px 10px 6px;
  min-width: 44px; min-height: 36px;
}
.dv-title {
  font-size: 15px; font-weight: 600; letter-spacing: 1px;
  text-align: center; flex: 1; min-width: 0;
}
.dv-export {
  font-size: 12px; color: var(--ink-2); text-decoration: none;
  border: 1px solid var(--line); border-radius: 6px; padding: 5px 11px;
  cursor: pointer; min-height: 32px;
}
.dv-list {
  flex: 1; overflow-y: auto; padding: 16px 14px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.dv-empty {
  margin-top: 60px; text-align: center;
  font-size: 14px; color: var(--ink-2); line-height: 1.9; padding: 0 22px;
}
.tl-row { display: flex; gap: 10px; }
.tl-date {
  width: 58px; flex-shrink: 0; text-align: right;
  font-size: 11px; color: var(--ink-3); line-height: 1.5; padding-top: 3px;
}
.tl-date b { display: block; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.tl-col { flex: 1; min-width: 0; position: relative; padding-left: 13px; }
.tl-col::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: -16px;
  width: 1px; background: var(--line);
}
.tl-row:last-child .tl-col::before { bottom: 6px; }
.tl-card {
  background: var(--paper); border: 1px solid var(--line-warm);
  border-radius: var(--radius); padding: 12px 14px;
  font-size: 13.5px; line-height: 1.75; word-break: break-word;
  cursor: pointer;
}
.tl-card:hover { border-color: #D6C2B0; }
.tl-card.gap { background: var(--bg); border-style: dashed; }
/* 外层卡片三态：灰 → 浅 → 实，描边梯度一眼可辨 */
.tl-state {
  display: inline-block; font-size: 10.5px; letter-spacing: .5px;
  padding: 1px 6px; border-radius: 4px; margin-bottom: 7px;
  border: 1px solid var(--line); color: var(--ink-3); background: var(--bg);
}
.s-0 { border-color: var(--line); color: var(--ink-3); background: var(--bg); }
.s-1 { border-color: #D9BCAA; color: var(--accent); background: #FBF2EC; }
.s-2 { border-color: var(--accent); color: #fff; background: var(--accent); }
.tl-today { font-size: 10.5px; color: var(--accent); letter-spacing: 1px; margin-left: 7px; font-weight: 600; }
.tl-gap-range { font-size: 12px; color: var(--ink-2); letter-spacing: .5px; margin-bottom: 6px; }
.tl-brief { font-size: 13.5px; line-height: 1.75; word-break: break-word; }
.tl-brief-line { position: relative; padding-left: 11px; line-height: 1.75; }
.tl-brief-line::before { content: '·'; position: absolute; left: 1px; color: var(--accent); }
.tl-imgs { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tl-imgs img { width: 86px; height: 86px; object-fit: cover; border-radius: 6px; }
.tl-sig {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: var(--ink-3); margin-top: 9px;
  border-top: 1px dashed var(--line-warm); padding-top: 6px;
}
.tl-sig .sp { flex: 1; }
.btn-link {
  border: none; background: none; color: var(--link);
  font-family: var(--font); font-size: 11.5px; padding: 3px 5px; min-height: 28px;
  cursor: pointer;
}
.btn-link:hover, .btn-link:active { color: var(--accent); }
.blk-op { margin-top: 11px; padding-top: 9px; border-top: 1px dashed var(--line); }

/* ---- 内页（U3）：两区块 + 字段层 ---- */
.entryview {
  position: absolute; inset: 0; z-index: 19;
  background: var(--surface); display: flex; flex-direction: column;
}
.ev-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  flex-shrink: 0; min-height: 56px; gap: 8px;
}
.ev-back {
  border: none; background: none; color: var(--ink-2);
  font-size: 24px; line-height: 1; cursor: pointer; padding: 2px 10px 6px;
  min-width: 44px; min-height: 36px;
}
.ev-title { font-size: 15px; font-weight: 600; letter-spacing: 1px; text-align: center; flex: 1; min-width: 0; }
.ev-tag { font-size: 10.5px; color: var(--accent); border: 1px solid #D9BCAA; border-radius: 4px; padding: 2px 7px; min-height: 24px; }
.ev-tag:empty { display: none; }
.ev-body { flex: 1; overflow-y: auto; padding: 16px 16px 26px; }
.ev-date { font-size: 12px; color: var(--ink-3); letter-spacing: 1px; margin-bottom: 14px; }

.blk { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.blk-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg);
  font-size: 12.5px; font-weight: 600; letter-spacing: 1px;
}
.blk-note .blk-head { background: var(--accent-soft); border-bottom-color: #E6D2C6; color: var(--accent); }
.blk-tag { font-size: 10.5px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }
.blk-note .blk-tag { color: var(--ink-2); }
.blk-body { padding: 12px; }
.layer { margin-bottom: 11px; }
.layer:last-child { margin-bottom: 0; }
.layer-fact {
  font-size: 13.5px; line-height: 1.8; padding-left: 12px; position: relative;
  white-space: pre-wrap; word-break: break-word;
}
.layer-fact::before { content: '·'; position: absolute; left: 2px; color: var(--accent); }
.layer-insight {
  font-size: 14px; line-height: 1.8; padding: 8px 10px;
  background: var(--paper); border-left: 2px solid var(--accent);
  white-space: pre-wrap; word-break: break-word;
}
.layer-cue { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; }
.layer-empty { font-size: 12px; color: var(--ink-3); }
.field-label { display: block; font-size: 11px; color: var(--ink-2); font-weight: 600; letter-spacing: 0; margin: 12px 0 4px; }
.field-label:first-child { margin-top: 0; }
.field-help { font-size: 10.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.6; }
.field-input {
  width: 100%; border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 10px; font-size: 13px; line-height: 1.7; resize: vertical;
  background: #fff; color: var(--ink); outline: none; font-family: var(--font);
}
.field-input:focus { border-color: var(--accent); }
.note-body { font-size: 15px; line-height: 1.95; white-space: pre-wrap; word-break: break-word; }
.note-body .tl-fact { line-height: 1.95; }
.note-meta {
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--ink-3); display: flex; align-items: center;
  gap: 8px; flex-wrap: wrap;
}
.note-meta .btn-link { margin-left: auto; }
.hook { font-size: 14px; line-height: 1.8; color: var(--ink); margin-bottom: 10px; }
/* 未写「我的日记」：中文双引号 + 淡色斜体，像若隐若现的念头（12-01 减法） */
.hook-whisper { color: var(--ink-3); font-style: italic; letter-spacing: .3px; margin-bottom: 12px; }
.wrote-flag {
  font-size: 11px; color: var(--ok); border: 1px solid #BBD9CD;
  border-radius: 4px; padding: 1px 6px; background: #F0F8F5;
}
.ev-foot { margin-top: 12px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--ink-3); line-height: 1.8; }
.ev-ops { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); flex-shrink: 0; }
.ev-ops button { flex: 1; border-radius: 6px; padding: 9px; font-size: 13px; min-height: 40px; font-family: var(--font); cursor: pointer; }
.btn-solid { background: var(--accent); color: #fff; border: none; }
.btn-soft { background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #E6C4BF; }
/* 写日记入口在区块内保持自然宽度；底部统一操作条按钮各自等分 */
.blk-body > .btn-solid { margin-top: 12px; min-height: 36px; padding: 7px 14px; border-radius: 6px; }

.dv-foot {
  flex-shrink: 0; text-align: center;
  font-size: 10.5px; color: var(--ink-3);
  padding: 9px 18px 11px; border-top: 1px solid var(--line);
  background: var(--surface); line-height: 1.5;
}

.msg img { max-width: 220px; border-radius: var(--radius); display: block; }
.msg audio { max-width: 240px; }
.voice-note { font-size: 13px; opacity: .9; margin-top: 5px; }
.stamp { font-size: 10.5px; color: var(--ink-3); padding: 0 4px; }
/* v3.1「只收不回」：极轻的收条标记，不是回复、不逐条回执 */
.received {
  display: inline-block; font-size: 10px; color: var(--ink-3);
  letter-spacing: .5px; padding: 1px 4px 2px; text-align: right;
}
/* 固定回执 / 沉默期主动关心：语气与正常回复区分开，不假装接住了内容 */
.msg.receipt .bubble, .msg.care .bubble {
  background: transparent; border: 1px dashed var(--line-warm);
  color: var(--ink-2); font-size: 12.5px; padding: 7px 11px;
}

/* v3.1：W3 全屏遮罩废除，改成聊天流末尾的一条轻状态条 */
.inline-status {
  flex-shrink: 0;
  padding: 9px 16px; font-size: 12px; line-height: 1.6;
  color: var(--ink-2); background: var(--paper);
  border-top: 1px solid var(--line-warm); text-align: center;
}

.typing { display: flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: bl 1.3s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes bl { 0%,60%,100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.composer {
  border-top: 1px solid var(--line);
  padding: 10px 12px 12px;
  flex-shrink: 0;
  background: var(--surface);
}
.preview { margin-bottom: 8px; position: relative; }
.preview img { max-height: 120px; border-radius: var(--radius); display: block; }
.preview audio { width: 100%; }
.preview .x {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,.62); color: #fff;
  font-size: 11px; padding: 3px 8px; border-radius: 6px; cursor: pointer;
}
.row { display: flex; align-items: center; gap: 8px; }
.inputwrap {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 2px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 6px;
}
.inputwrap:focus-within { border-color: var(--accent); }
.inputwrap input,
.inputwrap textarea {
  flex: 1; min-width: 0;
  border: none; background: transparent; outline: none;
  padding: 6px 4px 6px 10px;
  font-family: var(--font); font-size: 14px; color: var(--ink);
}
.inputwrap textarea {
  resize: none;
  line-height: 1.45;
  max-height: 120px;      /* 约 5 行封顶，再多内部滚动 */
  overflow-y: auto;
  height: 2.1em;
  /* 隐藏原生滚动条（含 Windows 上下箭头按钮）：保留滚动能力，不出现伪控件 */
  scrollbar-width: none;  /* Firefox */
  -ms-overflow-style: none;
}
.inputwrap textarea::-webkit-scrollbar { width: 0; height: 0; display: none; }
.mini {
  width: 32px; height: 32px; flex-shrink: 0;
  border: none; border-radius: 6px;
  background: transparent; color: var(--ink-3);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.mini:hover, .mini:active { background: var(--accent-soft); color: var(--accent); }
.mini.rec { background: var(--accent); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(169,84,47,.4); } 50% { box-shadow: 0 0 0 7px rgba(169,84,47,0); } }
.send {
  border: none; background: var(--accent); color: #fff;
  border-radius: 8px; padding: 9px 15px; flex-shrink: 0;
  font-family: var(--font); font-size: 14px; cursor: pointer; min-height: 40px;
}
.send:disabled { background: var(--line); color: var(--ink-3); cursor: default; }

.gate {
  position: absolute; inset: 0; z-index: 20;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.gate-card { max-width: 320px; width: 100%; }
.gate-logo {
  font-size: 12px; letter-spacing: 4px; color: var(--accent);
  margin-bottom: 14px; font-weight: 600;
}
.gate h1 { font-size: 21px; font-weight: 600; margin-bottom: 9px; line-height: 1.4; }
.lead { font-size: 13.5px; color: var(--ink-2); margin-bottom: 16px; line-height: 1.8; }
.notes { list-style: none; margin-bottom: 20px; }
.notes li {
  font-size: 13px; color: var(--ink-2);
  padding-left: 15px; position: relative; margin-bottom: 6px;
}
.notes li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.field { display: block; margin-bottom: 13px; }
.field span { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.field input {
  width: 100%; border: 1px solid var(--line); background: var(--bg);
  border-radius: 6px; padding: 10px 12px;
  font-family: var(--font); font-size: 14px; color: var(--ink); outline: none;
}
.field input:focus { border-color: var(--accent); }
.cta {
  width: 100%; border: none; background: var(--accent); color: #fff;
  border-radius: 6px; padding: 12px; font-family: var(--font);
  font-size: 15px; cursor: pointer; min-height: 44px;
}
.fine { font-size: 11px; color: var(--ink-3); margin-top: 12px; line-height: 1.6; }
/* ICP 备案号：管局要求首页底部可见、可点开工信部核验 */
.beian {
  flex-shrink: 0; text-align: center;
  padding: 5px 12px 7px; font-size: 11px; color: var(--ink-3);
}
.beian a { color: var(--ink-2); text-decoration: none; }
.gate-beian { text-align: center; margin-top: 16px; font-size: 11px; color: var(--ink-3); }
.gate-beian a { color: var(--ink-2); text-decoration: none; }

.offline {
  position: absolute; inset: 0; z-index: 15;
  background: rgba(245,243,239,.97);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 30px;
}
.offline-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.offline-sub { font-size: 13px; color: var(--ink-2); }
.offline-meta { font-size: 11px; color: var(--ink-3); opacity: .75; margin-top: 16px; }

/* ============================================================
   账号：恢复码卡片 / 找回弹层 / 账号面板（2026-12-02）
   视觉沿用既有赭色令牌与 8px 圆角；系统卡片靠左侧竖线与淡底
   区别于对话气泡，避免被误读成「记我说的话」。
   ============================================================ */
/* 顶栏名字区改成可点按钮：去掉按钮默认外观，保持原排版 */
.who {
  border: 0; background: none; padding: 0;
  text-align: left; color: inherit; font-family: inherit;
}
.who:active { opacity: .7; }

.syscard {
  position: relative;
  margin: 2px 16px 10px;
  padding: 11px 13px 12px;
  background: var(--paper);
  border: 1px solid var(--line-warm);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.syscard-head {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-2);
}
.syscard-ico { font-size: 11px; }
.syscard-code {
  margin: 5px 0 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 19px; font-weight: 600; letter-spacing: 2px; color: var(--ink);
}
.syscard-tip { font-size: 11.5px; color: var(--ink-3); line-height: 1.65; }
.syscard-ops { display: flex; gap: 8px; margin-top: 9px; }
.syscard-x {
  position: absolute; top: 5px; right: 7px;
  border: 0; background: none; color: var(--ink-3);
  font-size: 15px; line-height: 1; padding: 4px;
}
.mini-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 6px; padding: 4px 10px; font-size: 11.5px;
  min-height: 28px; font-family: var(--font);
}
.mini-btn:active { background: var(--bg); }

/* 弹层：账号面板 / 找回 —— 遮罩 + 居中卡片 */
.sheet {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(43, 43, 41, .38);
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
}
.sheet-card {
  width: 100%; max-width: 328px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 24px rgba(60, 50, 40, .12);
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.sheet-title { font-size: 15px; font-weight: 600; }
.sheet-x {
  border: 0; background: none; color: var(--ink-3);
  font-size: 20px; line-height: 1; padding: 0 2px;
}
.sheet-tip { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; margin-bottom: 10px; }
.sheet-err { margin-top: 8px; font-size: 12.5px; color: var(--danger); }
.code-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px;
  background: var(--paper);
  border: 1px solid var(--line-warm);
  border-radius: var(--radius);
}
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 19px; font-weight: 600; letter-spacing: 2px; color: var(--ink);
}
.code-input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px; letter-spacing: 3px; text-align: center;
  text-transform: uppercase;
}
.code-input:focus { border-color: var(--accent); outline: none; }
.sheet-card .btn-soft {
  width: 100%; min-height: 38px; margin-top: 10px;
  border-radius: var(--radius); font-size: 13px;
}
.sheet-card .btn-solid {
  width: 100%; min-height: 40px; margin-top: 12px;
  border-radius: var(--radius); font-size: 14px;
}
.sheet-card .btn-solid:disabled { opacity: .6; }
.sheet-link {
  display: block; width: 100%; margin-top: 12px;
  border: 0; background: none; padding: 4px;
  color: var(--ink-3); font-size: 12px; font-family: var(--font);
  text-decoration: underline; text-underline-offset: 3px;
}
.gate-link {
  display: block; margin: 14px auto 0;
  border: 0; background: none; padding: 6px;
  color: var(--ink-3); font-size: 12.5px; font-family: var(--font);
  text-decoration: underline; text-underline-offset: 3px;
}

@media (max-width: 480px) {
  body { padding: 0; background: var(--surface); }
  .phone { height: 100vh; max-width: 100%; border-radius: 0; border: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
