:root {
  --ink: #163044;
  --ink-soft: #3d5568;
  --muted: #6d8294;
  --line: #d5e1eb;
  --line-strong: #c3d3e0;
  --canvas: #e6eef4;
  --card: #ffffff;
  --blue: #1b6cb8;
  --blue-deep: #0e4f86;
  --navy: #0e3a5c;
  --ready: #157a52;
  --ready-bg: #e7f6ee;
  --ready-line: #b7e0c8;
  --wait: #9a6410;
  --wait-bg: #fbf4e6;
  --wait-line: #ead7ae;
  --lock: #8a3d3d;
  --lock-bg: #f8ecec;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(16, 42, 67, 0.04), 0 8px 24px rgba(16, 42, 67, 0.04);
  --num: "Segoe UI", "DIN Alternate", Bahnschrift, sans-serif;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  font-size: 14px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body, #root { margin: 0; height: 100%; }
body { background: var(--canvas); color: var(--ink); }
body.mode-app, body.mode-mp { height: 100%; overflow: hidden; }
#root { height: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #8ec0ea;
  outline-offset: 2px;
}
h1, h2, h3, p { margin: 0; }
button:disabled { cursor: not-allowed; opacity: 0.55; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(520px, calc(100% - 32px));
  background: #14324c;
  color: #f4f8fb;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 12px 32px rgba(8, 24, 40, 0.28);
}
.screen > .toast {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 96px;
  bottom: auto;
  transform: none;
  width: auto;
  max-width: none;
  z-index: 60;
}

/* ---------- login ---------- */
.gate {
  height: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 42%) 1fr;
}
.gate-side {
  background:
    radial-gradient(circle at 20% 18%, rgba(143, 208, 240, 0.16), transparent 32%),
    linear-gradient(165deg, #12486f 0%, #0e3a5c 48%, #0b2c46 100%);
  color: #e7f2f8;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.gate-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}
.gate-mark, .gate-copy, .gate-foot { position: relative; }
.mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
}
.gate-mark strong {
  display: block;
  margin-top: 18px;
  font-size: 32px;
  letter-spacing: 0.18em;
  font-weight: 650;
}
.gate-mark em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  letter-spacing: 0.28em;
  font-size: 12px;
  color: #9fd0ea;
}
.gate-copy h1 {
  font-size: 28px;
  font-weight: 620;
  letter-spacing: 0.04em;
  line-height: 1.35;
}
.gate-copy p {
  margin-top: 14px;
  max-width: 360px;
  color: #c5d8e6;
  line-height: 1.75;
  font-size: 14px;
}
.gate-points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.gate-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  color: #d5e6f0;
  font-size: 13px;
  line-height: 1.55;
}
.gate-points i {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1px solid rgba(159, 208, 234, 0.7);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  color: #9fd0ea;
}
.gate-foot { font-size: 12px; color: #8eb0c6; letter-spacing: 0.04em; }
.gate-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent 120px),
    var(--canvas);
}
.login-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px 28px 22px;
}
.login-card h2 { font-size: 22px; letter-spacing: 0.02em; }
.login-card .lead { margin: 8px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span, .lab {
  font-size: 12px;
  font-weight: 650;
  color: #4e6678;
}
.req { color: #c4473a; margin-left: 2px; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d3e0ea;
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 36px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  flex: none;
  accent-color: #0e3a5c;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 108, 184, 0.12);
  outline: none;
}
input.bad, select.bad, textarea.bad { border-color: #d36a62; background: #fff8f7; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 14px;
  background: var(--blue);
  color: #fff;
  font-weight: 650;
}
.btn:hover:not(:disabled) { background: #165fa3; }
.btn.block { width: 100%; }
.btn.line, .btn.ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
  font-weight: 600;
}
.btn.line:hover:not(:disabled), .btn.ghost:hover:not(:disabled) { background: #f4f8fb; }
.btn.danger { background: #9d342c; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 12px; font-weight: 650; }
.demo-row { display: grid; gap: 8px; margin-top: 16px; }
.demo-acc {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #f7fafc;
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
}
.demo-acc:hover { border-color: #b9d3e8; background: #f2f7fb; }
.demo-acc b { font-size: 13px; }
.demo-acc small { color: var(--muted); font-size: 12px; }
.demo-acc em {
  font-style: normal;
  font-size: 12px;
  color: var(--blue-deep);
  align-self: center;
}

/* ---------- desk ---------- */
.desk {
  height: 100%;
  min-width: 1180px;
  display: grid;
  grid-template-rows: 54px minmax(0, 1fr) 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 90px),
    var(--canvas);
}
.topbar, .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}
.foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  gap: 16px;
}
.foot span { display: inline-flex; align-items: center; gap: 6px; }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1c9a62;
  box-shadow: 0 0 0 3px rgba(28, 154, 98, 0.12);
}
.dot.wait { background: #c47b12; box-shadow: 0 0 0 3px rgba(196, 123, 18, 0.12); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--navy);
  display: grid;
  place-items: center;
  flex: none;
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: 0.04em; }
.brand-sub { color: var(--muted); font-size: 12px; margin-top: 1px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.pill, .icon-btn, .user-chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  min-height: 32px;
  padding: 0 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}
.icon-btn {
  width: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  position: relative;
}
.icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #c4473a;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  padding: 0 4px;
}
.user-chip { display: inline-flex; align-items: center; gap: 8px; }
.avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.pop-wrap { position: relative; }
.pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(16, 42, 67, 0.14);
  z-index: 20;
  overflow: hidden;
  text-align: left;
}
.pop header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.pop button.row, .pop .row {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #eef3f7;
  background: #fff;
  padding: 10px 12px;
  border-radius: 0;
}
.pop button.row:hover { background: #f5f9fc; }
.pop .row b { display: block; font-size: 13px; }
.pop .row small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.work {
  min-height: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 304px;
}
.nav {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav button {
  border: 0;
  background: transparent;
  color: #3e5568;
  border-radius: 10px;
  padding: 9px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}
.nav button svg { opacity: 0.9; }
.nav button:hover { background: #e7f1f8; }
.nav button.on { background: var(--blue); color: #fff; }
.main, .dock { min-height: 0; overflow: auto; }
.main { padding: 14px 16px 20px; }
.dock {
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
}
.dock-scroll { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.dock-pin { min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.dock-pin .issuer-box { flex: 1; min-height: 0; overflow: auto; }
.dock-actions, .dock-pin .lock-card { flex: none; }
.card {
  background: var(--card);
  border: 1px solid #e1ebf2;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
  margin-bottom: 12px;
}
.card h2, .sec-title {
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0.01em;
}
.hint { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.grid-2, .grid-4 { display: grid; gap: 10px 12px; margin-top: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.span-2 { grid-column: span 2; }
.archive-bar {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}
.chip-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef5fa;
  color: #24597f;
  font-size: 12px;
  font-weight: 650;
}
.chip.warn { background: var(--wait-bg); color: var(--wait); }
.chip.ok { background: var(--ready-bg); color: var(--ready); }
.chip.mute { background: #eef2f5; color: #5d7182; }
.path-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.path-row input { font-family: var(--num); color: #4d6476; background: #f6f9fb; }
.path-row .btn { flex: none; }

.ready {
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--wait-line);
  background: var(--wait-bg);
}
.ready.ok { background: var(--ready-bg); border-color: var(--ready-line); }
.ready.lock { background: var(--lock-bg); border-color: #efd0d0; }
.ready .k {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 720;
}
.ready.ok .k { color: var(--ready); }
.ready.wait .k, .ready:not(.ok):not(.lock) .k { color: var(--wait); }
.ready.lock .k { color: var(--lock); }
.ready p { margin-top: 6px; font-size: 12px; line-height: 1.55; color: var(--ink-soft); }
.ready .timer { margin-top: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.task-card, .stat-card, .issuer-box, .lock-card {
  background: #fff;
  border: 1px solid #e1ebf2;
  border-radius: 12px;
  padding: 12px;
}
.task-card .eyebrow, .issuer-box .eyebrow, .lock-card .eyebrow {
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}
.task-card strong { display: block; margin-top: 4px; font-size: 15px; }
.task-card small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.45; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat {
  background: #fff;
  border: 1px solid #e1ebf2;
  border-radius: 10px;
  padding: 8px 10px;
}
.stat b {
  display: block;
  font-size: 18px;
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.stat span { color: var(--muted); font-size: 12px; }
.issuer-box { border-color: #c5daf0; box-shadow: inset 3px 0 0 var(--blue); }
.issuer {
  width: 100%;
  text-align: left;
  border: 1px solid #e4edf4;
  background: #f8fbfd;
  border-radius: 8px;
  padding: 8px 8px 8px 10px;
  margin-top: 6px;
  display: block;
}
.issuer.on {
  background: #eef6fd;
  border-color: #9ec4e4;
}
.issuer.off { opacity: 0.62; }
.issuer .code {
  font-family: var(--num);
  font-size: 12px;
  font-weight: 720;
  color: var(--blue-deep);
}
.issuer.on .code { color: var(--blue); }
.issuer .nm { font-size: 12px; color: var(--ink-soft); margin-left: 6px; }
.issuer .meta { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.dock-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dock-actions .wide { grid-column: 1 / -1; }
.lock-card p { margin-top: 6px; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.lock-card .btn { margin-top: 8px; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}
.page-head h2 { font-size: 18px; }
.page-head p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filters button, .seg button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 650;
}
.filters button.on, .seg button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.table-wrap { overflow: auto; border: 1px solid #e1ebf2; border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef3f7; vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 700; background: #f7fafc; }
tr:last-child td { border-bottom: 0; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: #eef3f6;
  color: #466074;
}
.tag.wait { background: var(--wait-bg); color: var(--wait); }
.tag.ok { background: var(--ready-bg); color: var(--ready); }
.tag.no { background: var(--lock-bg); color: var(--lock); }
.linkish {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-weight: 700;
  font-size: 13px;
}

.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tpl {
  text-align: left;
  border: 1px solid #e1ebf2;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
}
.tpl.on { border-color: #8eb8dc; box-shadow: 0 0 0 3px rgba(27, 108, 184, 0.12); }
.tpl.off { opacity: 0.7; }
.tpl-head {
  height: 74px;
  color: #fff;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.tpl-head b { font-size: 16px; letter-spacing: 0.08em; }
.tpl-head span { font-size: 12px; opacity: 0.85; }
.tpl-body { padding: 12px 14px 14px; }
.tpl-body strong { display: block; font-size: 14px; }
.tpl-body p { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.mini-rule { height: 3px; margin-top: 10px; background: linear-gradient(#163044, #163044) 0 0 / 100% 1px no-repeat, linear-gradient(#163044, #163044) 0 3px / 100% 1px no-repeat; }

.review {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.checks { margin: 10px 0 0; padding: 0; list-style: none; }
.checks label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #eef3f7;
  font-size: 13px;
  line-height: 1.45;
}
.md {
  background: #f7fafc;
  border: 1px solid #e1ebf2;
  border-radius: 10px;
  padding: 12px;
  white-space: pre-wrap;
  font-family: "Cascadia Mono", Consolas, "Sarasa Mono SC", monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #234056;
  max-height: 460px;
  overflow: auto;
}
.mine-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 12px; }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 6px 8px; margin-top: 10px; font-size: 13px; }
.kv i { font-style: normal; color: var(--muted); }
.meter { height: 8px; border-radius: 99px; background: #e6eef4; overflow: hidden; margin-top: 8px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, #1b6cb8, #15938a); }
.note-list { margin: 8px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(14, 32, 48, 0.38);
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal {
  width: min(760px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(8, 24, 40, 0.28);
  padding: 18px 18px 16px;
}
.modal.wide { width: min(980px, 100%); }
.modal h3 { font-size: 18px; }
.modal .lead { margin: 6px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.pick {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #f8fbfd;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
}
.pick.on { border-color: #8eb8dc; background: #eef6fd; }
.pick b { display: block; }
.pick small { color: var(--muted); }
.confirm-issuer {
  margin-top: 12px;
  border: 1px solid #d5e4f0;
  border-radius: 12px;
  overflow: hidden;
}
.confirm-issuer .bar { color: #fff; padding: 14px 16px; }
.confirm-issuer .bar b { display: block; font-size: 18px; letter-spacing: 0.04em; }
.confirm-issuer .bar span { font-size: 12px; opacity: 0.88; }
.confirm-issuer .body { padding: 12px 16px; font-size: 13px; line-height: 1.65; }
.agree {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.gen-list { margin: 12px 0 0; padding: 0; list-style: none; }
.gen-list li {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #eef3f7;
  font-size: 13px;
  color: var(--muted);
}
.gen-list li.on { color: var(--ink); font-weight: 700; }
.gen-list li i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #c5d5e2;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 10px;
}
.gen-list li.on i { background: var(--ready); border-color: var(--ready); color: #fff; }
.sheet-frame { width: 100%; height: 68vh; border: 1px solid var(--line); border-radius: 8px; background: #dfe6ec; }
.seg { display: inline-flex; gap: 6px; margin-bottom: 10px; }

/* ---------- phone stage ---------- */
.stage {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 28px 32px;
  background:
    linear-gradient(180deg, rgba(14, 58, 92, 0.05), transparent 180px),
    #d9e4ec;
}
.plate { width: 280px; color: #23445d; }
.plate .brand-name { font-size: 28px; letter-spacing: 0.14em; color: var(--navy); }
.plate .en { margin-top: 6px; letter-spacing: 0.22em; font-size: 11px; color: #5e7e96; }
.plate .rule { width: 42px; height: 2px; background: var(--blue); margin: 18px 0; }
.plate h1 { font-size: 26px; letter-spacing: 0.06em; }
.plate .lead { margin-top: 12px; line-height: 1.7; color: #4d6880; font-size: 14px; }
.plate ul { margin: 16px 0 0; padding: 0; list-style: none; }
.plate li {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid #b7cddd;
  color: #3d5b73;
  font-size: 13px;
  line-height: 1.5;
}
.plate .foot { margin-top: 22px; font-size: 12px; color: #6d879b; line-height: 1.6; }
.plate .btn { white-space: nowrap; }
.phone {
  width: 390px;
  height: 844px;
  max-height: calc(100vh - 48px);
  background: #1c242c;
  border-radius: 36px;
  padding: 10px;
  box-shadow: 0 24px 60px rgba(16, 36, 52, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  flex: none;
}
.screen {
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: #f4f7f9;
  position: relative;
}
.mp { height: 100%; display: flex; flex-direction: column; background: #f3f6f8; color: var(--ink); position: relative; }
.mp.ink { background: #f3f6f8; }
.wx { flex: none; position: relative; z-index: 5; }
.mp.paper .wx { background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid rgba(20, 40, 60, 0.06); }
.mp.ink .wx { background: linear-gradient(180deg, #0e3a5c, #14507a); color: #fff; }
.wx-status, .wx-nav { display: flex; align-items: center; }
.wx-status { height: 44px; padding: 8px 16px 0; justify-content: space-between; }
.wx-time { font-size: 14px; font-weight: 720; font-family: var(--num); letter-spacing: 0.2px; }
.wx-sys { display: flex; align-items: center; gap: 5px; }
.wx-nav { position: relative; height: 44px; }
.wx-back, .wx-side {
  width: 44px;
  height: 40px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}
.wx-title {
  position: absolute;
  left: 96px;
  right: 96px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wx-capsule {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 87px;
  height: 32px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  z-index: 6;
  overflow: visible;
}
.mp.paper .wx-capsule {
  border: 1px solid rgba(20, 32, 40, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: #142028;
}
.mp.ink .wx-capsule {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.16);
  color: #fff;
}
.wx-capsule button {
  flex: 1;
  height: 100%;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}
.wx-capsule button:first-of-type { border-radius: 16px 0 0 16px; }
.wx-capsule button:last-of-type { border-radius: 0 16px 16px 0; }
.wx-capsule button:active { background: rgba(127, 127, 127, 0.12); }
.wx-split { width: 1px; height: 18px; background: currentColor; opacity: 0.28; flex: none; }
.wx-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 214px;
  background: #fff;
  color: #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(8, 20, 28, 0.2);
  padding: 6px;
  text-align: left;
  z-index: 8;
}
.wx-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #1a1a1a;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  height: auto;
}
.wx-menu button:active { background: #f3f5f6; }
.wx-about {
  margin: 0 6px 6px;
  padding: 10px 12px;
  background: #f4f7f8;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: #4d6270;
}
.wx-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  z-index: 4;
}
.mp-scroll { flex: 1; min-height: 0; overflow: auto; }
.hero {
  margin: -88px 0 0;
  padding: 96px 16px 28px;
  background: #14507a;
  color: #fff;
}
.hero .hello { font-size: 22px; font-weight: 720; letter-spacing: 0.02em; }
.hero .role { margin-top: 4px; color: rgba(255, 255, 255, 0.78); font-size: 12px; }
.hero-pills { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.hero-pills span {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}
.slips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px; margin-top: -16px; position: relative; z-index: 1; }
.slip {
  text-align: left;
  background: #fff;
  border: 1px solid #e4edf3;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 16px rgba(16, 42, 67, 0.04);
  border-left: 3px solid var(--blue);
}
.slip b { display: block; font-size: 14px; }
.slip small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.block-pad { padding: 14px 12px 8px; }
.block-pad h3 { font-size: 15px; }
.block-pad .more {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  padding: 0;
}
.row-between { display: flex; justify-content: space-between; align-items: center; }
.doc {
  width: calc(100% - 24px);
  margin: 8px 12px;
  text-align: left;
  background: #fff;
  border: 1px solid #e5eef4;
  border-radius: 12px;
  padding: 12px;
  display: block;
}
.doc .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.doc b { font-size: 14px; }
.doc .no { font-family: var(--num); font-size: 12px; color: #5d7386; margin-top: 3px; }
.doc p { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.search {
  margin: 8px 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e1ebf2;
  border-radius: 10px;
  padding: 0 10px;
}
.search input { border: 0; background: transparent; min-height: 38px; padding-left: 0; }
.search input:focus { box-shadow: none; }
.detail { padding: 12px; }
.detail h2 { font-size: 18px; line-height: 1.35; }
.spec { margin-top: 10px; background: #fff; border: 1px solid #e5eef4; border-radius: 12px; overflow: hidden; }
.spec div { display: grid; grid-template-columns: 84px 1fr; gap: 8px; padding: 9px 12px; border-bottom: 1px solid #eef3f7; font-size: 13px; }
.spec div:last-child { border-bottom: 0; }
.spec i { font-style: normal; color: var(--muted); }
.banner {
  margin: 12px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.55;
}
.banner.warn { background: #fbf4e6; color: #7a5410; }
.banner.ok { background: #e7f6ee; color: #146647; }
.banner.stop { background: #f8ecec; color: #8a3d3d; }
.tabbar {
  flex: none;
  height: 54px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(20, 40, 60, 0.06);
  padding-bottom: 4px;
}
.tabbar button {
  border: 0;
  background: transparent;
  color: #7b8c9a;
  font-size: 10px;
  font-weight: 650;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.tabbar button.on { color: var(--blue-deep); }
.compile {
  display: block;
  width: calc(100% - 24px);
  margin: -8px 12px 0;
  position: relative;
  z-index: 1;
  text-align: left;
  background: #0e3a5c;
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(14, 58, 92, 0.18);
}
.compile b { display: block; font-size: 16px; letter-spacing: 0.04em; }
.compile span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, 0.78); }
.doc-main {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  color: inherit;
}
.doc-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e6eef3;
}
.doc-actions button {
  border: 0;
  background: transparent;
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  min-height: 28px;
}
.mp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mp-actions .btn:last-child { grid-column: 1 / -1; }
.mp-dock {
  flex: none;
  background: #fff;
  border-top: 1px solid #e5eef4;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
.issuer-now {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d5e3ee;
  background: #f7fafc;
  border-radius: 10px;
  min-height: 40px;
  padding: 6px 10px;
  text-align: left;
  margin-bottom: 8px;
}
.issuer-now.bad { border-color: #d36a62; background: #fff8f7; }
.issuer-now i { width: 4px; height: 18px; border-radius: 2px; flex: none; }
.issuer-now span { flex: 1; min-width: 0; font-size: 12px; line-height: 1.35; }
.issuer-now b { display: block; font-size: 11px; color: #5d7386; font-weight: 650; }
.issuer-now em { font-style: normal; color: var(--blue); font-size: 12px; font-weight: 700; }
.issuer-pop { max-height: 168px; overflow: auto; margin-bottom: 8px; }
.mp .pad-form { padding: 0 12px; }
.mp .grid-2, .mp .grid-4 { grid-template-columns: 1fr; }
.mp .path-row { flex-wrap: wrap; }
.mp .path-row input { min-width: 0; flex: 1 1 140px; }
.mp .filters { flex-wrap: nowrap; overflow: auto; padding: 8px 12px; margin: 0; }
.mp .filters button { flex: none; }
.mp .tpl-grid { grid-template-columns: 1fr; padding: 0 12px 16px; }
.mp .issuer { width: 100%; }
.mp .card { margin-left: 0; margin-right: 0; }
.mp-sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(14, 32, 48, 0.45);
  display: flex;
  align-items: flex-end;
}
.mp-sheet .modal,
.mp-sheet .modal.wide {
  width: 100%;
  max-width: none;
  max-height: 88%;
  margin: 0;
  border-radius: 16px 16px 0 0;
}
.mp-sheet .sheet-frame { height: 42vh; }
.mp-sheet .modal-actions { flex-wrap: wrap; }
.mp-sheet .modal-actions .btn { flex: 1; }
.closed {
  height: 100%;
  background: #ededed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #333;
  text-align: center;
  padding: 24px;
}
.closed p { color: #666; font-size: 13px; line-height: 1.55; }
.empty {
  margin: 18px 12px;
  padding: 22px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.mp .login-card { box-shadow: none; border: 0; background: transparent; padding: 8px 4px 0; }
.mp-login { padding: 18px 16px 24px; }
.mp-login h2 { font-size: 22px; }
.sheet-mini {
  margin: 12px;
  background: #fff;
  border: 1px solid #e5eef4;
  border-radius: 12px;
  overflow: hidden;
}
.sheet-mini .hd { padding: 12px; color: #fff; }
.sheet-mini .bd { padding: 12px; font-size: 13px; line-height: 1.6; }
.sheet-mini .bd div { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed #e6eef3; }
.sheet-mini .bd i { font-style: normal; color: var(--muted); }

@media (max-width: 860px) {
  .gate { grid-template-columns: 1fr; min-height: 100vh; }
  .gate-side { display: none; }
  .stage, .phone, .screen, .mp { width: 100%; max-width: 100%; }
  .stage { display: block; padding: 0; background: #f3f6f8; min-height: 100%; }
  .plate { display: none; }
  .phone {
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  .screen { border-radius: 0; }
  .tabbar { width: 100%; }
  .desk { min-width: 1180px; }
}
