:root {
  --primary: #1565c0;
  --primary-dark: #0d47a1;
  --accent: #ff8f00;
  --bg: #f2f4f7;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #7b8794;
  --danger: #d32f2f;
  --ok: #2e7d32;
  --radius: 12px;
  --nav-h: 58px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

#app { min-height: 100%; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }

.loading { text-align: center; padding: 40px; color: var(--muted); }

/* ---------- 顶部条 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: calc(14px + env(safe-area-inset-top));
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 600; }
.topbar .sub { font-size: 12px; opacity: .85; }
.topbar .right { display: flex; gap: 12px; align-items: center; }
.topbar a, .topbar button { color: #fff; background: rgba(255,255,255,.15); border: none; border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; }

/* ---------- 容器 ---------- */
.wrap { padding: 14px; max-width: 720px; margin: 0 auto; }
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card h2 { margin: 0 0 12px; font-size: 15px; color: var(--text); }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- 表单 ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #d9dee3; border-radius: 10px;
  font-size: 15px; background: #fff; color: var(--text); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; min-height: 80px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--primary); color: #fff; border: none; border-radius: 10px;
  padding: 13px 16px; font-size: 15px; font-weight: 600; cursor: pointer; width: 100%;
}
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #eef1f4; color: var(--text); }
.btn.accent { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn.danger { background: var(--danger); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* ---------- 底部导航 ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid #e5e8eb;
  display: flex; padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none; font-size: 11px; gap: 3px;
}
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a .ic { font-size: 20px; line-height: 1; }

/* ---------- 相机 ---------- */
.camera-view { position: fixed; inset: 0; background: #000; z-index: 40; display: flex; flex-direction: column; }
.camera-view canvas { width: 100%; flex: 1; object-fit: contain; background: #000; }
.camera-controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
}
.shutter {
  width: 68px; height: 68px; border-radius: 50%; background: #fff; border: 5px solid rgba(255,255,255,.4);
  box-shadow: 0 0 0 2px #fff;
}
.shutter:active { transform: scale(.94); }
.cam-btn { width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(255,255,255,.2); color: #fff; font-size: 20px; }
.camera-top { position: absolute; top: 0; left: 0; right: 0; padding: 14px; display: flex; justify-content: space-between; z-index: 2; }
.camera-top .pill { background: rgba(0,0,0,.45); color: #fff; padding: 6px 12px; border-radius: 20px; font-size: 12px; }

/* 缩略图条 */
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 8px; background: rgba(0,0,0,.3); }
.thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; }
.thumbs img.sel { border-color: var(--accent); }

/* ---------- 设置面板 ---------- */
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; display: flex; align-items: flex-end; }
.sheet .panel { background: #fff; width: 100%; border-radius: 16px 16px 0 0; padding: 18px; max-height: 85vh; overflow-y: auto; }

/* ---------- 列表 ---------- */
.form-item { display: flex; gap: 12px; align-items: center; }
.form-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.form-item .meta { flex: 1; min-width: 0; }
.form-item .meta .t { font-weight: 600; }
.form-item .meta .d { color: var(--muted); font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.badge.ok { background: #e6f4ea; color: var(--ok); }
.badge.warn { background: #fde7e7; color: var(--danger); }
.badge.todo { background: #fff4e0; color: #b26a00; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,.82); color: #fff; padding: 10px 18px; border-radius: 22px;
  font-size: 14px; opacity: 0; transition: all .25s; z-index: 100; pointer-events: none; max-width: 80%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.hidden { display: none !important; }

/* ---------- 打印 ---------- */
.print-root { background: #fff; }
@media print {
  body { background: #fff; }
  #app, .bottom-nav, .topbar, .toast { display: none !important; }
  .print-page { display: block !important; }
  .no-print { display: none !important; }
  @page { size: A4; margin: 14mm; }
}
.print-page { display: none; padding: 0; }
.print-page .ph { border-bottom: 2px solid var(--primary); padding-bottom: 8px; margin-bottom: 14px; }
.print-page .ph .title { font-size: 20px; font-weight: 700; }
.print-page .ph .info { font-size: 12px; color: #444; margin-top: 4px; }
.print-page table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.print-page table td { border: 1px solid #ccc; padding: 8px 10px; font-size: 13px; vertical-align: top; }
.print-page table td.k { background: #f5f7fa; width: 110px; font-weight: 600; }
.print-page .photos { display: flex; flex-wrap: wrap; gap: 8px; }
.print-page .photos img { width: 48%; border: 1px solid #ddd; }
.print-page .sign { margin-top: 30px; display: flex; justify-content: space-between; font-size: 13px; }

/* ---------- 登录标签页 ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab { flex: 1; padding: 9px; border: 1px solid #d9dee3; background: #fff; border-radius: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 相机变焦 / 小按钮 ---------- */
.zoom-pill { min-width: 52px; text-align: center; }
.zoom-controls { position: absolute; right: 16px; bottom: 110px; display: flex; flex-direction: column; gap: 10px; z-index: 2; }
.cam-btn.small { width: 40px; height: 40px; font-size: 22px; }

/* ---------- 相册 ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.photo-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.photo-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.photo-meta { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; }
.sync-flag { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.sync-flag.ok { background: #e6f4ea; color: var(--ok); }
.sync-flag.no { background: #fff4e0; color: #b26a00; }
.photo-actions { display: flex; gap: 8px; padding: 0 10px 10px; }
.photo-actions .btn { padding: 8px; font-size: 13px; }

/* ---------- 统计 ---------- */
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.stat-card { flex: 1; min-width: 80px; background: #fff; border-radius: 12px; padding: 14px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-val { font-size: 24px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 10px; overflow-x: auto; }
.bar-col { flex: 1; min-width: 16px; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.bar { width: 100%; border-radius: 4px 4px 0 0; position: relative; min-height: 2px; }
.bar-v { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); }
.bar-d { font-size: 9px; color: var(--muted); margin-top: 4px; }
.recent-item { padding: 10px 0; border-bottom: 1px solid #eef1f4; }
.recent-item:last-child { border-bottom: none; }

/* ---------- 官网落地页 ---------- */
.landing { padding-bottom: 20px; }

.landing-hero {
  background: linear-gradient(150deg, #062a5e 0%, #1565c0 55%, #1e88e5 100%);
  color: #fff;
  padding: 38px 20px 46px;
  padding-top: calc(38px + env(safe-area-inset-top));
}
.landing-hero-inner {
  max-width: 1120px; width: 100%; margin: 0 auto;
  display: flex; align-items: center; gap: 40px; flex-wrap: wrap;
}
.landing-hero-text { flex: 1 1 400px; min-width: 0; }
.landing-badge {
  display: inline-block; font-size: 12px; letter-spacing: .06em;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22);
}
.landing-hero h1 { font-size: 30px; line-height: 1.28; margin: 16px 0 12px; font-weight: 700; }
.landing-sub { font-size: 14px; line-height: 1.85; opacity: .92; margin: 0 0 22px; }
.landing-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.landing-cta.center { justify-content: center; }
.landing-cta .btn { width: auto; padding: 12px 24px; text-decoration: none; }
.landing-hero .btn { background: #fff; color: var(--primary-dark); }
.landing-hero .btn.ghost {
  background: rgba(255, 255, 255, .12); color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
}
.landing-note { font-size: 12px; opacity: .78; margin-top: 14px; }

/* 带水印的照片示意 */
.landing-hero-visual { flex: 0 1 380px; min-width: 0; max-width: 100%; }
.hero-shot {
  position: relative; height: 260px; width: 100%; max-width: 100%;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .34);
  border: 1px solid rgba(255, 255, 255, .25);
}
.hero-shot-sky { position: absolute; inset: 0 0 42% 0; background: linear-gradient(#8fc3f0, #cfe6fa); }
.hero-shot-ground { position: absolute; inset: 58% 0 0 0; background: linear-gradient(#b9a68d, #8a7a63); }
.hero-shot::after {
  content: ''; position: absolute; right: 18%; bottom: 30%;
  width: 46%; height: 26%; background: rgba(90, 100, 112, .55);
  border-radius: 3px; box-shadow: -60px 10px 0 -6px rgba(110, 120, 130, .45);
}
.hero-watermark {
  position: absolute; left: 12px; bottom: 12px; right: 12px;
  background: linear-gradient(90deg, rgba(8, 20, 36, .78), rgba(8, 20, 36, .34));
  border-left: 3px solid #ffca28;
  border-radius: 8px; padding: 9px 11px; color: #fff;
  font-size: 11.5px; line-height: 1.6;
  backdrop-filter: blur(2px);
}
.hw-brand {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: #ffca28; color: #3a2a00; border-radius: 4px;
  padding: 1px 7px; margin-bottom: 4px; letter-spacing: .06em;
}
.hw-row { opacity: .96; }
.hw-time { font-weight: 600; font-size: 12.5px; }

.landing-section { max-width: 1120px; margin: 0 auto; padding: 44px 20px 6px; }
.landing-h2 { font-size: 21px; margin: 0 0 18px; font-weight: 700; color: var(--text); }
.landing-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.landing-card {
  background: var(--card); border-radius: var(--radius); padding: 18px 16px;
  border: 1px solid #e7ebf0; box-shadow: 0 2px 10px rgba(16, 40, 70, .04);
}
.lc-icon { font-size: 22px; }
.lc-title { font-weight: 650; margin: 8px 0 6px; font-size: 15px; }
.lc-desc { font-size: 13px; line-height: 1.75; color: var(--muted); }

.landing-steps {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.landing-step {
  background: var(--card); border-radius: var(--radius); padding: 18px 16px;
  border: 1px solid #e7ebf0;
}
.ls-n {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.ls-t { font-weight: 650; margin: 10px 0 6px; }
.ls-d { font-size: 13px; line-height: 1.7; color: var(--muted); }

.landing-closing { text-align: center; padding-top: 40px; padding-bottom: 34px; }
.landing-closing h2 { font-size: 20px; margin: 0 0 10px; }
.landing-closing .landing-sub { color: var(--muted); opacity: 1; max-width: 560px; margin: 0 auto 20px; }

.landing-footer {
  border-top: 1px solid #e7ebf0; margin-top: 8px;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.9;
}

.login-back {
  font-size: 12.5px; color: var(--primary); cursor: pointer;
  margin-bottom: 10px; opacity: .9;
}

@media (max-width: 760px) {
  .landing-hero { padding: 26px 20px 34px; padding-top: calc(26px + env(safe-area-inset-top)); }
  .landing-hero h1 { font-size: 24px; }
  .landing-hero-inner { gap: 26px; }
  .landing-hero-text,
  .landing-hero-visual { flex: 1 1 100%; min-width: 0; width: 100%; }
  .hero-shot { height: 210px; }
  .landing-cta .btn { flex: 1 1 auto; }
}

/* ---------- 相机：多镜头 / 对焦 / 分辨率 ---------- */
.cam-pill, .res-pill { max-width: 44vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-btn.active { background: var(--accent); color: #fff; }
.lens-btn {
  position: absolute; right: 16px; top: calc(64px + env(safe-area-inset-top)); z-index: 3;
  background: rgba(0,0,0,.5); color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 16px; padding: 6px 12px; font-size: 12px;
}
.focus-ring {
  position: absolute; width: 62px; height: 62px; margin: -31px 0 0 -31px;
  border: 2px solid #ffca28; border-radius: 10px; z-index: 4; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,.3); animation: focusPop .22s ease-out;
}
@keyframes focusPop { from { transform: scale(1.45); opacity: .25; } to { transform: scale(1); opacity: 1; } }
.camera-view.shooting canvas { filter: brightness(1.5); transition: filter .08s; }
.lens-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; padding: 12px 14px; margin-bottom: 8px; text-align: left;
  border: 1px solid #d9dee3; border-radius: 10px; background: #fff; font-size: 14px; color: var(--text);
}
.lens-item.active { border-color: var(--primary); background: #eef5fd; }
.lens-meta { font-size: 12px; color: var(--muted); flex-shrink: 0; }

/* ---------- 启动开屏广告 ---------- */
.splash-ad {
  position: fixed; inset: 0; z-index: 200; background: #000;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.splash-ad img { width: 100%; height: 100%; object-fit: contain; }
.splash-skip {
  position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; z-index: 2;
  background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.45);
  border-radius: 18px; padding: 7px 14px; font-size: 13px; min-width: 74px; text-align: center;
}
.splash-ad-badge {
  position: absolute; left: 14px; bottom: calc(14px + env(safe-area-inset-bottom));
  font-size: 11px; color: rgba(255,255,255,.7); background: rgba(0,0,0,.45);
  padding: 3px 8px; border-radius: 4px; z-index: 2;
}
.splash-ad-title {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 40px 20px calc(26px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,.78));
  color: #fff; font-size: 16px; font-weight: 600;
}

/* ---------- 启动广告管理 ---------- */
.ad-item { display: flex; gap: 12px; align-items: flex-start; }
.ad-thumb {
  width: 78px; height: 116px; object-fit: cover; border-radius: 8px; flex-shrink: 0;
  background: #eef1f4; border: 1px solid #e2e6ea;
}
.ad-meta { flex: 1; min-width: 0; }
.ad-meta .t { font-weight: 600; }
.ad-meta .d { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.6; word-break: break-all; }
.ad-actions { display: flex; gap: 8px; margin-top: 10px; }
.ad-actions .btn { width: auto; padding: 7px 12px; font-size: 13px; }

/* ================= 达卯表单库 ================= */
.lib-wrap { padding-bottom: 90px; }
.lib-head { margin-bottom: 10px; }
.lib-title { font-size: 19px; font-weight: 700; color: #0a6e6e; }
.lib-sub { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.lib-search input { width: 100%; padding: 11px 13px; border: 1px solid #d9dee3; border-radius: 10px; font-size: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; -webkit-overflow-scrolling: touch; }
.chip {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 16px; font-size: 13px;
  border: 1px solid #d9dee3; background: #fff; color: #444;
}
.chip.on { background: #0a6e6e; border-color: #0a6e6e; color: #fff; }
.seg { display: flex; background: #e9eef0; border-radius: 10px; padding: 3px; margin: 10px 0 14px; }
.seg-btn { flex: 1; padding: 8px 0; border: none; background: transparent; font-size: 14px; color: #4a5559; border-radius: 8px; }
.seg-btn.on { background: #fff; color: #0a6e6e; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.group-title { font-size: 13px; font-weight: 600; color: #0a6e6e; margin: 14px 0 8px; padding-left: 8px; border-left: 3px solid #0a6e6e; }
.lib-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.lib-card {
  background: #fff; border: 1px solid #e2e6ea; border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.lib-card:active { background: #f5faf9; }
.lib-card-t { font-size: 15px; font-weight: 600; line-height: 1.45; color: var(--text); }
.lib-card-m { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.lib-card-s { font-size: 12px; color: var(--muted); margin-top: 6px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: #eef1f4; color: #555; }
.tag.ht { background: #e6f4f4; color: #0a6e6e; }
.tag.dq { background: #fff3e0; color: #b26a00; }
.tag.gl { background: #eef1fb; color: #3a4f9b; }
.dim { color: var(--muted); font-size: 12px; }
.empty { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 12px; line-height: 1.7; }
.doc-item { background: #fff; border: 1px solid #e2e6ea; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.doc-main { cursor: pointer; }
.doc-t { font-size: 14px; font-weight: 600; }
.doc-m { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #666; margin-top: 4px; }
.doc-ops { display: flex; gap: 8px; margin-top: 8px; }
.mini {
  padding: 5px 12px; font-size: 12.5px; border-radius: 6px; border: 1px solid #cdd5d8;
  background: #fff; color: #37424a;
}
.mini.danger { color: #b3402e; border-color: #eccfc9; }

/* ================= 表格编辑页 ================= */
.doc-bar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: rgba(255,255,255,.97); border-bottom: 1px solid #e3e8ea;
  backdrop-filter: blur(6px);
}
.db-btn { padding: 8px 12px; font-size: 13px; border-radius: 8px; border: 1px solid #0a6e6e; background: #0a6e6e; color: #fff; white-space: nowrap; }
.db-btn.ghost { background: #fff; color: #0a6e6e; }
.db-btn.accent { background: #b3402e; border-color: #b3402e; }
.db-title { flex: 1; min-width: 0; }
.db-title input {
  width: 100%; border: none; background: transparent; font-size: 14px; font-weight: 600;
  color: var(--text); padding: 4px 2px; outline: none; text-overflow: ellipsis;
}
.doc-status { font-size: 11px; color: var(--muted); white-space: nowrap; }
.doc-page { padding: 10px 10px 0; max-width: 980px; margin: 0 auto; }
.doc-hint {
  font-size: 12px; color: #0a6e6e; background: #eef6f6; border: 1px dashed #a9cfcf;
  border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.6;
}
.paper { background: #fff; border: 1px solid #dfe5e7; border-radius: 10px; padding: 14px 12px 18px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.paper-head { display: flex; align-items: flex-end; gap: 8px; border-bottom: 2px solid #0a6e6e; padding-bottom: 6px; }
.paper-head img { height: 26px; }
.paper-brand { font-size: 9px; color: #0a6e6e; letter-spacing: .5px; }
.paper-code { margin-left: auto; text-align: right; font-size: 11px; line-height: 1.5; color: #666; }
.paper-code b { display: block; color: #0a6e6e; font-size: 12px; }
.paper-title { text-align: center; font-size: 17px; margin: 12px 4px 8px; line-height: 1.4; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-bottom: 10px; }
.doc-meta .dm { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #555; }
.doc-meta .dm input {
  width: 118px; padding: 4px 6px; border: none; border-bottom: 1px solid #b9c3c6;
  background: transparent; font-size: 12.5px; outline: none; text-align: center;
}
.doc-meta .dm input:focus { border-bottom-color: #0a6e6e; }
.tbl-box { overflow-x: auto; margin: 8px 0 14px; -webkit-overflow-scrolling: touch; }
table.sheet-edit { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.sheet-edit td.cell {
  border: 1px solid #7a8686; padding: 0; vertical-align: middle; background: #fff;
  position: relative;
}
table.sheet-edit td.cell .ce {
  padding: 6px 5px; font-size: 12px; line-height: 1.45; min-height: 22px;
  outline: none; word-break: break-word; white-space: pre-wrap;
}
table.sheet-edit td.cell .ce:focus { background: #f2fafa; box-shadow: inset 0 0 0 2px #0a6e6e; }
table.sheet-edit td.title-cell .ce { font-size: 15px; font-weight: 700; text-align: center; padding: 8px 6px; }
table.sheet-edit td.bold .ce { font-weight: 700; }
table.sheet-edit td.sel { box-shadow: inset 0 0 0 2px #d9822b; }
table.sheet-edit td.inrange { background: #fff6e8; }
.tbl-more { display: flex; align-items: center; gap: 8px; padding: 8px 2px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.tbl-tag { font-size: 11px; color: #9aa5aa; padding-bottom: 2px; }
.para-h { font-size: 14px; font-weight: 700; color: #0a6e6e; margin: 14px 0 6px; outline: none; }
.para-t { font-size: 12.5px; line-height: 1.75; margin: 6px 0; outline: none; white-space: pre-wrap; }
.tbl-tools {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: rgba(255,255,255,.98); border-top: 1px solid #d7dfe1;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 14px rgba(0,0,0,.08);
}
.tool-row { display: flex; gap: 6px; margin-bottom: 6px; overflow-x: auto; }
.tool-row:last-of-type { margin-bottom: 2px; }
.tool-btn {
  flex: 0 0 auto; padding: 7px 11px; font-size: 12.5px; border-radius: 7px;
  border: 1px solid #cdd5d8; background: #fff; color: #33414a;
}
.tool-btn.warn { color: #b3402e; border-color: #eccfc9; }
.tool-btn.on { background: #0a6e6e; border-color: #0a6e6e; color: #fff; }
.tool-tip { font-size: 11px; color: var(--muted); padding: 2px 4px 0; }
.print-menu {
  background: #fff; border: 1px solid #dde3e6; border-radius: 10px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.14); display: flex; flex-direction: column; min-width: 132px;
}
.print-menu button { padding: 11px 16px; border: none; background: #fff; font-size: 13.5px; text-align: left; color: #26323a; }
.print-menu button + button { border-top: 1px solid #eef1f3; }
.print-menu button:active { background: #f2f8f8; }
@media (min-width: 760px) {
  .lib-grid { grid-template-columns: 1fr 1fr; }
}
