:root {
  --ink: #10263a;
  --navy: #0b2033;
  --teal: #008c95;
  --teal-soft: #dff3f1;
  --gold: #d6a33b;
  --paper: #f7f4ec;
  --white: #ffffff;
  --line: #d8dfdf;
  --muted: #71808a;
  --danger: #b9372c;
  --shadow: 0 24px 70px rgba(15, 37, 52, .14);
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif; }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; }
button, .button-link { border: 0; border-radius: 9px; background: var(--teal); color: white; padding: 11px 16px; font-weight: 700; cursor: pointer; text-decoration: none; }
button.secondary, .button-link.secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.eyebrow { display: block; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .16em; }

.viewer { background: radial-gradient(circle at 10% 0%, rgba(0, 140, 149, .18), transparent 28rem), linear-gradient(180deg, #e8efec 0, var(--paper) 28rem); }
.viewer-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 16px 12px; color: white; background: rgba(11, 32, 51, .96); backdrop-filter: blur(18px); box-shadow: 0 8px 26px rgba(11, 32, 51, .22); }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px 2px 11px 2px; background: linear-gradient(135deg, var(--teal), #15c3bd); font-family: Georgia, serif; font-size: 22px; font-weight: 900; }
.viewer-heading { min-width: 0; flex: 1; }
.viewer-heading p, .viewer-heading h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.viewer-heading p { color: #aac5ca; font-size: 10px; letter-spacing: .08em; }
.viewer-heading h1 { font-family: Georgia, "Microsoft YaHei", serif; font-size: 16px; }
.live-pill { display: flex; align-items: center; gap: 6px; color: #cbe9e8; font-size: 11px; white-space: nowrap; }
.live-pill span { width: 7px; height: 7px; border-radius: 50%; background: #50d3a7; box-shadow: 0 0 0 5px rgba(80, 211, 167, .12); }
.document-stage { width: min(1180px, 100%); margin: auto; padding: 22px 14px 54px; }
.document-meta { display: flex; justify-content: space-between; align-items: end; margin: 0 2px 12px; }
.document-meta strong { display: block; margin-top: 4px; font-family: Georgia, serif; font-size: 22px; }
.document-meta p { margin: 0; color: var(--muted); font-size: 12px; }
.document-shell { position: relative; min-height: 60vh; overflow: hidden; background: white; border: 1px solid rgba(16, 38, 58, .12); box-shadow: var(--shadow); }
.document-shell img { display: block; width: 100%; height: auto; opacity: 0; transition: opacity .45s ease; user-select: none; -webkit-user-select: none; }
.document-shell img.ready { opacity: 1; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--teal); font-weight: 800; letter-spacing: .12em; }
.watermark-grid { position: absolute; inset: 0; z-index: 3; display: grid; grid-template-columns: repeat(2, 1fr); align-content: space-around; pointer-events: none; overflow: hidden; }
.watermark-grid span { color: rgba(11, 32, 51, .085); font-size: clamp(9px, 1.5vw, 18px); font-weight: 800; white-space: nowrap; transform: rotate(-24deg); }
.viewer-footer { padding: 20px 22px calc(26px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); background: var(--navy); }
.viewer-footer p { margin: 0 0 7px; color: white; font-weight: 700; }
.viewer-footer small { display: block; max-width: 760px; margin: auto; line-height: 1.7; }

.expired { display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 30% 20%, rgba(0, 140, 149, .2), transparent 40%), var(--navy); color: white; }
.expired main { max-width: 620px; }
.expired span { color: #63d3cf; letter-spacing: .2em; }
.expired h1 { margin: 10px 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(34px, 7vw, 68px); }
.expired p { color: #b7ccd2; }

.admin { background: linear-gradient(135deg, rgba(0, 140, 149, .08), transparent 35rem), #f1f3ef; }
.admin-header { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 30px max(22px, calc((100vw - 1280px) / 2)); color: white; background: var(--navy); border-bottom: 5px solid var(--gold); }
.admin-header h1 { margin: 5px 0 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(28px, 4vw, 48px); }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.live-console { min-width: 156px; display: flex; align-items: center; gap: 10px; padding: 7px 13px; border: 1px solid rgba(91, 240, 188, .28); border-radius: 9px; background: rgba(67, 217, 167, .08); }
.live-console > span { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #58e1ad; box-shadow: 0 0 0 0 rgba(88, 225, 173, .6); animation: livePulse 1.8s infinite; }
.live-console b, .live-console small { display: block; }.live-console b { color: #d8fff0; font-size: 12px; }.live-console small { margin-top: 2px; color: #7fb6aa; font-size: 9px; }
.proposal-state { display: flex; align-items: center; gap: 7px; }
.online-now { display: flex; align-items: center; gap: 5px; color: #0a8761; font-family: "Microsoft YaHei", sans-serif; font-size: 10px; font-style: normal; font-weight: 800; }
.online-now u { width: 7px; height: 7px; border-radius: 50%; background: #27ba82; box-shadow: 0 0 0 4px rgba(39, 186, 130, .13); text-decoration: none; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(88,225,173,.55); } 70% { box-shadow: 0 0 0 9px rgba(88,225,173,0); } 100% { box-shadow: 0 0 0 0 rgba(88,225,173,0); } }
.admin-main { max-width: 1280px; margin: auto; padding: 28px 22px 70px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric { min-height: 150px; padding: 22px; color: white; background: linear-gradient(145deg, #123a4d, var(--navy)); border-radius: 4px 18px 4px 18px; box-shadow: 0 16px 32px rgba(11, 32, 51, .12); }
.metric:nth-child(2) { background: linear-gradient(145deg, #00a1a5, #007a84); }
.metric:nth-child(3) { background: linear-gradient(145deg, #dcb34e, #a77719); }
.metric span, .metric small { display: block; color: rgba(255,255,255,.72); }
.metric strong { display: block; margin: 13px 0 7px; font-family: Georgia, "Microsoft YaHei", serif; font-size: 38px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 42px 0 15px; }
.section-heading h2 { margin: 4px 0 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: 30px; }
.section-heading p { color: var(--muted); font-size: 12px; }
.proposal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.proposal-card { padding: 24px; background: white; border: 1px solid var(--line); border-top: 7px solid var(--teal); box-shadow: 0 14px 35px rgba(16, 38, 58, .07); }
.proposal-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-family: Georgia, serif; }
.proposal-card h3 { margin: 20px 0 5px; font-size: 24px; }
.proposal-card > p { margin: 0 0 20px; color: var(--muted); }
.proposal-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.proposal-stats div { padding: 16px 8px; border-right: 1px solid var(--line); }
.proposal-stats div:last-child { border: 0; }
.proposal-stats .extra-device strong { color: var(--danger); }
.proposal-stats strong, .proposal-stats span { display: block; }
.proposal-stats strong { font-family: Georgia, serif; font-size: 26px; }
.proposal-stats span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.risk { padding: 6px 10px; border-radius: 30px; font-family: "Microsoft YaHei", sans-serif; font-size: 11px; }
.risk.safe { color: #147153; background: #e3f3eb; }
.risk.watch { color: #8b6513; background: #fff2cf; }
.risk.warn { color: #a54c18; background: #ffe7d7; }
.risk.danger { color: #a72525; background: #ffe1df; }
.risk-reason { min-height: 42px; margin: 17px 0 8px; color: var(--ink); font-size: 13px; line-height: 1.55; }
.proposal-card > small { color: var(--muted); }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.detail-panel { scroll-margin-top: 20px; margin-top: 28px; padding: 24px; background: white; border-top: 7px solid var(--gold); box-shadow: var(--shadow); }
.detail-head { display: flex; justify-content: space-between; align-items: center; }
.detail-head h2 { margin: 5px 0; }
.detail-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.detail-chips span { padding: 8px 12px; color: #05676f; background: var(--teal-soft); border-radius: 30px; font-size: 12px; font-weight: 700; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; padding: 12px; color: white; background: var(--navy); white-space: nowrap; }
td { max-width: 340px; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
td b, td small { display: block; }
td small { margin-top: 4px; color: var(--muted); word-break: break-all; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.subheading { margin: 24px 0 10px; font-size: 17px; }
.device-judgement { display: block; width: fit-content; margin-top: 7px; padding: 4px 8px; border-radius: 20px; font-size: 10px; font-weight: 800; }
.device-judgement.primary { color: #12684e; background: #dff3ea; }.device-judgement.unknown { color: #8b6513; background: #fff2cf; }
.primary-device-row { background: rgba(32, 164, 116, .025); }.unknown-device-row { background: rgba(214, 163, 59, .055); }
.raw-events { margin-top: 22px; border-top: 1px solid var(--line); }
.raw-events summary { padding: 16px 0; color: var(--teal); font-weight: 800; cursor: pointer; }
.login-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(11, 32, 51, .96); }
.login-layer[hidden] { display: none; }
.login-card { width: min(430px, 100%); padding: 38px; background: var(--paper); border-top: 7px solid var(--gold); box-shadow: 0 30px 100px rgba(0,0,0,.3); }
.login-card h1 { margin: 8px 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: 32px; }
.login-card p { color: var(--muted); line-height: 1.6; }
.login-card label { display: block; margin: 24px 0 14px; font-size: 13px; font-weight: 700; }
.login-card input { display: block; width: 100%; margin-top: 7px; padding: 13px; border: 1px solid var(--line); background: white; outline: none; }
.login-card input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 140, 149, .12); }
.login-card button { width: 100%; }
.login-card small { display: block; min-height: 18px; margin-top: 12px; color: var(--danger); }

@media (max-width: 800px) {
  .metric-grid, .proposal-grid { grid-template-columns: 1fr 1fr; }
  .admin-header { align-items: start; flex-direction: column; }
  .metric { min-height: 125px; }
  .metric strong { font-size: 30px; }
}

@media (max-width: 540px) {
  .document-stage { padding-inline: 8px; }
  .document-meta { padding-inline: 5px; }
  .document-meta p { display: none; }
  .watermark-grid { grid-template-columns: 1fr; }
  .viewer-heading p { display: none; }
  .admin-main { padding: 18px 12px 50px; }
  .admin-header { padding: 23px 16px; }
  .metric-grid { gap: 8px; }
  .metric { padding: 16px; border-radius: 3px 13px 3px 13px; }
  .metric strong { font-size: 25px; }
  .metric small { font-size: 10px; }
  .proposal-grid { grid-template-columns: 1fr; }
  .proposal-card { padding: 18px; }
  .section-heading { align-items: start; flex-direction: column; }
  .proposal-stats strong { font-size: 22px; }
  .card-actions button { flex: 1; padding-inline: 8px; font-size: 12px; }
  .detail-panel { padding: 14px; }
}

/* Purpose-built test pages. No proposal or customer data is present here. */
.test-stage { position: relative; overflow: hidden; min-height: 70vh; }
.test-loading { min-height: 70vh; display: grid; place-items: center; color: var(--teal); font-weight: 800; letter-spacing: .12em; }
.test-watermarks { position: fixed; inset: 65px 0 0; z-index: 8; opacity: .6; }
.test-stage button.selected { outline: 4px solid rgba(214, 163, 59, .42); outline-offset: 3px; transform: translateY(-2px); }

.editorial-hero { position: relative; min-height: 93vh; display: grid; grid-template-columns: 120px 1fr 36%; align-items: center; overflow: hidden; padding: 8vw; color: #173d36; background: #d9e6c9; }
.editorial-index { align-self: start; display: grid; gap: 13px; padding-top: 2vh; }
.editorial-index span, .editorial-copy > p:first-child { font-size: 11px; font-weight: 900; letter-spacing: .2em; }
.editorial-index b { font-family: Georgia, serif; font-size: 72px; font-weight: 400; }
.editorial-copy { position: relative; z-index: 2; max-width: 680px; }
.editorial-copy h2 { margin: 20px 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(48px, 7vw, 105px); line-height: .98; font-weight: 500; letter-spacing: -.04em; }
.editorial-copy .lead { max-width: 560px; font-size: clamp(15px, 1.6vw, 21px); line-height: 1.8; }
.sun-disc { position: absolute; right: -7vw; top: 10vh; width: 43vw; height: 43vw; border-radius: 50%; background: #e9a53d; box-shadow: 0 0 0 4vw rgba(255,255,255,.18), 0 0 0 8vw rgba(255,255,255,.1); }
.sun-disc i { position: absolute; left: 17%; top: 16%; width: 20%; height: 20%; border-radius: 50%; background: rgba(255,255,255,.22); }
.scroll-cue { position: absolute; left: 8vw; bottom: 5vh; display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.scroll-cue span { display: block; width: 80px; height: 1px; background: currentColor; }
.editorial-section { min-height: 88vh; padding: 9vw; position: relative; }
.editorial-section .chapter-no { display: block; margin-bottom: 9vh; font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.editorial-section h3 { margin: 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(42px, 7vw, 96px); line-height: 1.08; font-weight: 500; }
.editorial-section p { max-width: 610px; font-size: clamp(16px, 2vw, 24px); line-height: 1.8; }
.morning { display: grid; grid-template-columns: 1fr 2fr; color: #f7f0db; background: #17443d; }
.morning .chapter-no { grid-row: 1 / 3; }
.morning .choice-row { grid-column: 2; }
.choice-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6vh; }
.choice-row button { padding: 16px 24px; color: inherit; border: 1px solid currentColor; background: transparent; border-radius: 0; }
.afternoon { color: #25313a; background: #f3d47b; }
.afternoon blockquote { margin: 0 0 7vh; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(34px, 5.2vw, 76px); line-height: 1.2; }
.editorial-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.editorial-cards article { min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; padding: 25px; color: white; background: #d57445; }
.editorial-cards article:nth-child(2) { background: #a34e38; }
.editorial-cards article:nth-child(3) { background: #25313a; }
.editorial-cards b { font-family: Georgia, serif; font-size: 72px; }
.night { color: #f3eee1; background: #17212d; }
.night-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 7vh; }
.night-options button { min-height: 170px; display: grid; place-items: center; gap: 5px; border: 1px solid #65717d; border-radius: 0; color: white; background: transparent; }
.night-options i { font-family: Georgia, serif; font-size: 45px; font-style: normal; }
.editorial-end { min-height: 68vh; display: grid; align-content: center; justify-items: center; padding: 8vw; text-align: center; color: #173d36; background: #d9e6c9; }
.editorial-end span { letter-spacing: .2em; font-weight: 900; }
.editorial-end h3 { max-width: 850px; margin: 28px 0 10px; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(38px, 6vw, 82px); line-height: 1.1; font-weight: 500; }

.template-laboratory .viewer-bar { background: rgba(36, 17, 21, .96); }
.lab-hero { position: relative; min-height: 94vh; display: grid; align-content: center; overflow: hidden; padding: 8vw; color: #fff2e3; background: #34171d; }
.lab-grid { position: absolute; inset: 0; opacity: .2; background-image: linear-gradient(#d78b6d 1px, transparent 1px), linear-gradient(90deg, #d78b6d 1px, transparent 1px); background-size: 48px 48px; }
.lab-code { position: relative; z-index: 1; color: #f0a780; font-weight: 900; letter-spacing: .2em; }
.lab-hero h2 { position: relative; z-index: 1; margin: 3vh 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(55px, 9vw, 125px); line-height: .9; font-weight: 400; }
.lab-hero h2 em { color: #f1a57e; font-style: normal; }
.lab-hero > p { position: relative; z-index: 1; max-width: 500px; color: #d7b8ae; font-size: 18px; line-height: 1.7; }
.lab-orbit { position: absolute; right: 7vw; bottom: 8vh; width: min(26vw, 330px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #f1a57e; border-radius: 50%; }
.lab-orbit::before, .lab-orbit::after { content: ""; position: absolute; inset: 12%; border: 1px dashed rgba(241,165,126,.5); border-radius: 50%; }
.lab-orbit::after { inset: 27%; }
.lab-orbit b { font-family: Georgia, serif; font-size: clamp(50px, 8vw, 110px); font-weight: 400; }
.lab-orbit span { position: absolute; bottom: 18%; font-size: 9px; letter-spacing: .18em; }
.lab-step { min-height: 86vh; padding: 8vw; color: #34171d; background: #efe8d8; }
.lab-step header { display: flex; justify-content: space-between; padding-bottom: 15px; border-bottom: 2px solid currentColor; font-size: 12px; letter-spacing: .13em; }
.lab-step h3 { max-width: 950px; margin: 12vh 0 8vh; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(42px, 6.6vw, 94px); line-height: 1.05; font-weight: 400; }
.lab-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lab-options button { min-height: 105px; border: 1px solid currentColor; border-radius: 0; color: inherit; background: transparent; font-size: 18px; }
.lab-step.inverted { color: #fff2e3; background: #c75d42; }
.sound-meter { display: flex; align-items: end; gap: 9px; margin-bottom: 6vh; }
.sound-meter span { font-size: 11px; }
.sound-meter i { width: 30px; height: 18px; background: currentColor; }
.sound-meter i:nth-of-type(2) { height: 28px; }.sound-meter i:nth-of-type(3) { height: 39px; }.sound-meter i:nth-of-type(4) { height: 52px; }.sound-meter i:nth-of-type(5) { height: 67px; }
.lab-step.warm { background: #e6ba79; }
.mood-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mood-panels button { min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; align-items: start; border-radius: 0; padding: 25px; text-align: left; color: white; background: #568c85; }
.mood-panels button:last-child { background: #7c3540; }
.mood-panels b { font-family: Georgia, serif; font-size: 76px; font-weight: 400; }
.mood-panels span { font-size: 21px; }
.lab-result { min-height: 94vh; padding: 8vw; color: #fff2e3; background: #34171d; }
.lab-result > span { color: #f1a57e; letter-spacing: .2em; font-weight: 900; }
.lab-result h3 { margin: 4vh 0 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(50px, 8vw, 110px); font-weight: 400; }
.lab-result > p { color: #d7b8ae; font-size: 20px; }
.result-options { display: grid; grid-template-columns: 1fr 1fr; margin-top: 9vh; border-top: 1px solid #81585a; }
.result-options button { padding: 26px 5px; border-radius: 0; border-bottom: 1px solid #81585a; color: white; background: transparent; text-align: left; font-size: 20px; }
.result-options button:nth-child(odd) { border-right: 1px solid #81585a; }
.lab-complete { margin-top: 12vh; color: #f1a57e; text-align: center; letter-spacing: .15em; }

@media (max-width: 700px) {
  .editorial-hero { min-height: 88vh; grid-template-columns: 1fr; align-content: center; padding: 20vw 8vw 14vw; }
  .editorial-index { position: absolute; left: 8vw; top: 6vh; }
  .editorial-index b { font-size: 38px; }
  .editorial-copy h2 { font-size: 15vw; }
  .sun-disc { right: -25vw; top: 5vh; width: 80vw; height: 80vw; opacity: .72; }
  .scroll-cue { bottom: 3vh; }
  .editorial-section { min-height: 82vh; padding: 18vw 8vw; }
  .editorial-section .chapter-no { margin-bottom: 6vh; }
  .morning { display: block; }
  .editorial-cards { grid-template-columns: 1fr; }
  .editorial-cards article { min-height: 130px; }
  .night-options { grid-template-columns: 1fr; }
  .night-options button { min-height: 120px; }
  .lab-hero, .lab-step, .lab-result { padding: 18vw 8vw; }
  .lab-orbit { right: -22vw; bottom: 5vh; width: 70vw; opacity: .62; }
  .lab-step h3 { margin: 8vh 0 6vh; }
  .lab-options { grid-template-columns: 1fr; }
  .lab-options button { min-height: 78px; }
  .mood-panels { grid-template-columns: 1fr; }
  .mood-panels button { min-height: 170px; }
  .result-options { grid-template-columns: 1fr; }
  .result-options button:nth-child(odd) { border-right: 0; }
}

/* Short glitch-test layouts */
.template-editorial, .template-laboratory { background: #030504; }
.template-editorial .viewer-bar { color: #9dff79; background: rgba(1, 8, 4, .96); border-bottom: 1px solid #4cff66; }
.template-editorial .brand-mark { color: #001504; background: #63ff72; box-shadow: 0 0 22px rgba(99,255,114,.48); }
.template-laboratory .viewer-bar { color: #ebfbff; background: rgba(13, 5, 20, .96); border-bottom: 1px solid #ff365f; }
.template-laboratory .brand-mark { color: #fff; background: linear-gradient(135deg, #ff294f, #00d9ff); box-shadow: -5px 0 #00d9ff, 5px 0 #ff294f; }
.template-editorial .viewer-footer, .template-laboratory .viewer-footer { color: #66756e; background: #010302; border-top: 1px solid #18231d; }
.template-laboratory .viewer-footer { color: #796a84; background: #09030d; border-color: #2b1635; }
.cyber-a, .cyber-b { position: relative; min-height: 112vh; overflow: hidden; font-family: Consolas, "Courier New", monospace; }
.cyber-a { color: #94ff77; background: radial-gradient(circle at 74% 30%, rgba(62,255,103,.11), transparent 25rem), #020604; }
.crt-lines { position: absolute; inset: 0; pointer-events: none; opacity: .2; background: repeating-linear-gradient(0deg, transparent 0 3px, #64ff7a 4px); }
.cyber-a > header, .cyber-a > footer, .cyber-b > header, .cyber-b > footer { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 20px; padding: 18px 4vw; border-bottom: 1px solid currentColor; font-size: 11px; letter-spacing: .12em; }
.cyber-a-main { position: relative; z-index: 2; min-height: 88vh; display: grid; align-content: center; padding: 8vw; }
.terminal-path { margin: 0 0 18px; color: #478e54; }
.cyber-a h2 { margin: 0; font-size: clamp(48px, 10vw, 140px); line-height: .8; letter-spacing: -.08em; text-shadow: 4px 0 #0b6b35, -3px 0 #98ffb1; }
.cyber-a h2 i { color: transparent; -webkit-text-stroke: 1px #94ff77; font-style: normal; }
.code-rain { position: absolute; right: 5vw; top: 13vh; color: rgba(148,255,119,.23); font-size: clamp(10px, 1.2vw, 15px); line-height: 2.1; transform: rotate(3deg); }
.terminal-box { width: min(580px, 100%); margin: 8vh 0 4vh; padding: 16px; border: 1px solid #296d38; background: rgba(3,20,9,.7); box-shadow: inset 0 0 35px rgba(50,255,85,.06); }
.terminal-box p { display: flex; gap: 12px; margin: 7px 0; color: #467a50; }
.terminal-box p span { color: #94ff77; }.terminal-box p b { color: #d0ffc5; }
.cyber-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.cyber-actions button { border: 1px solid #63ff72; border-radius: 0; color: #63ff72; background: transparent; box-shadow: none; }
.cyber-actions button:hover, .cyber-actions button.selected { color: #001504; background: #63ff72; }
.cyber-a > footer { border-top: 1px solid currentColor; border-bottom: 0; color: #44704c; }

.cyber-b { color: #eafaff; background: linear-gradient(115deg, rgba(255,31,81,.1), transparent 33%), #0a0310; }
.cyber-b::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(90deg, #00eaff 1px, transparent 1px), linear-gradient(#ff174f 1px, transparent 1px); background-size: 44px 44px; transform: skewY(-4deg) scale(1.1); }
.cyber-b > header { color: #ff5274; border-color: #3a153f; }
.cyber-b main { position: relative; z-index: 2; min-height: 88vh; display: grid; align-content: center; padding: 8vw; }
.broken-code { color: #00dffc; letter-spacing: .13em; }
.cyber-b h2 { position: relative; width: fit-content; margin: 3vh 0; font-size: clamp(45px, 10vw, 135px); line-height: .85; letter-spacing: -.09em; text-shadow: 7px 0 #ff174f, -7px 0 #00dffc; }
.cyber-b h2::before, .cyber-b h2::after { content: attr(data-text); position: absolute; inset: 0; overflow: hidden; }
.cyber-b h2::before { height: 37%; color: #ff174f; transform: translate(6px, -4px); clip-path: inset(15% 0 55%); }
.cyber-b h2::after { color: #00dffc; transform: translate(-5px, 5px); clip-path: inset(65% 0 8%); }
.warning-strip { width: calc(100% + 16vw); margin: 5vh -8vw; overflow: hidden; padding: 10px 0; white-space: nowrap; color: #09030d; background: #ff315a; font-weight: 900; letter-spacing: .14em; transform: rotate(-2deg); }
.cipher { color: #776080; font-size: 12px; line-height: 2; }
.cyber-b-actions { display: flex; flex-wrap: wrap; gap: 0; margin-top: 5vh; }
.cyber-b-actions button { min-width: 150px; border: 1px solid #00dffc; border-radius: 0; color: #eafaff; background: transparent; text-align: left; }
.cyber-b-actions button:nth-child(2) { border-color: #ff315a; }.cyber-b-actions button:nth-child(3) { border-color: #9f53ff; }
.cyber-b-actions button.selected { color: #09030d; background: #00dffc; }
.cyber-b > footer { border-top: 1px solid #3a153f; border-bottom: 0; color: #78607f; }
.noise-block { position: absolute; z-index: 1; width: 23vw; height: 12px; background: #ff315a; box-shadow: 12px 20px #00dffc, -20px 46px #7b36ff; }
.noise-block.n1 { right: 4vw; top: 21vh; }.noise-block.n2 { left: 8vw; bottom: 19vh; transform: scale(.5); }

@media (max-width: 600px) {
  .cyber-a, .cyber-b { min-height: 105vh; }
  .cyber-a-main, .cyber-b main { min-height: 82vh; padding: 13vw 7vw; }
  .cyber-a h2, .cyber-b h2 { font-size: 16vw; }
  .code-rain { top: 5vh; right: -8vw; opacity: .5; }
  .terminal-box { margin-top: 6vh; font-size: 11px; }
  .cyber-actions button, .cyber-b-actions button { flex: 1; min-width: 0; padding-inline: 7px; font-size: 11px; }
  .cyber-a > header b, .cyber-b > header b { display: none; }
}

.template-calibration .viewer-bar { background: rgba(8, 38, 48, .97); border-bottom: 1px solid #34c9b6; }
.template-calibration .brand-mark { color: #082630; background: #58e0c8; box-shadow: 0 0 24px rgba(88,224,200,.34); }
.template-calibration .viewer-footer { color: #7e9ca0; background: #082630; }
.calibration-page { position: relative; min-height: calc(100vh - 64px); display: grid; place-items: center; overflow: hidden; padding: 34px 16px; color: #143a42; background: radial-gradient(circle at 10% 10%, rgba(73,207,186,.28), transparent 25rem), linear-gradient(145deg, #eaf7f3, #dbe9e6); }
.calibration-grid { position: absolute; inset: 0; opacity: .2; background-image: linear-gradient(rgba(20,58,66,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(20,58,66,.18) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom, black, transparent 85%); }
.calibration-card { position: relative; z-index: 2; width: min(620px, 100%); padding: clamp(28px, 6vw, 58px); text-align: center; background: rgba(255,255,255,.9); border: 1px solid rgba(20,58,66,.13); border-top: 7px solid #159b8d; box-shadow: 0 30px 85px rgba(8,38,48,.16); }
.calibration-label { color: #168b80; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.shield-mark { position: relative; width: 74px; height: 84px; display: grid; place-items: center; margin: 22px auto; color: white; }
.shield-mark i { position: absolute; inset: 0; background: linear-gradient(145deg, #20b9a6, #0d796f); clip-path: polygon(50% 0, 93% 16%, 87% 68%, 50% 100%, 13% 68%, 7% 16%); }
.shield-mark b { position: relative; z-index: 1; font-size: 31px; }
.calibration-card h2 { margin: 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(33px, 6vw, 55px); line-height: 1.16; }
.calibration-card > p { max-width: 480px; margin: 18px auto; color: #5c7378; line-height: 1.7; }
.countdown-box { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 27px; color: #0e756d; }
.countdown-box span { font-size: 14px; font-weight: 800; }.countdown-box strong { font-family: Georgia, serif; font-size: 74px; line-height: 1; }.countdown-box em { font-style: normal; font-weight: 800; }
.countdown-box.complete strong { color: #21a675; }.countdown-box.complete::after { content: "完成"; margin-left: 5px; color: #21a675; font-weight: 900; }
.calibration-progress { height: 7px; overflow: hidden; margin: 17px 0; background: #deebe8; }
.calibration-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #14a697, #63d2ac); transition: width .4s ease; }
.calibration-status b { color: #159b6b; font-size: 18px; }
.calibration-notes { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin-top: 25px; }
.calibration-notes span { padding: 6px 9px; color: #557176; background: #edf4f2; border-radius: 30px; font-size: 10px; }

@media (max-width: 520px) {
  .calibration-page { align-items: start; padding-top: 22px; }
  .calibration-card { padding: 28px 18px; }
  .shield-mark { width: 58px; height: 66px; margin-block: 16px; }
  .countdown-box strong { font-size: 60px; }
}

/* Formal customer proposal viewer */
.proposal-viewer { color: #102b3d; background: #e7e4dc; }
.proposal-bar { border-bottom-color: rgba(214, 163, 59, .55); background: rgba(10, 35, 52, .98); }
.proposal-mark { color: #0b2b3e; background: #e1ad3d; }
.formal-proposal { min-height: 100vh; padding-bottom: 54px; background: radial-gradient(circle at 85% 4%, rgba(225,173,61,.2), transparent 30rem), linear-gradient(180deg, #102f43 0 520px, #e7e4dc 520px); }
.proposal-cover { min-height: 455px; display: grid; align-content: center; padding: 80px max(6vw, 24px) 95px; color: #f7f2e7; }
.proposal-kicker { color: #e1ad3d; font-size: 11px; font-weight: 900; letter-spacing: .22em; }
.proposal-cover h2 { margin: 24px 0 18px; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(46px, 7vw, 94px); line-height: 1.02; font-weight: 500; letter-spacing: -.04em; }
.proposal-cover h2 em { color: #e1ad3d; font-style: normal; }
.proposal-cover p { margin: 0; color: #b9c8d0; font-size: clamp(15px, 2vw, 22px); letter-spacing: .08em; }
.proposal-cover-line { width: min(560px, 72vw); height: 1px; margin-top: 42px; background: linear-gradient(90deg, #e1ad3d, transparent); }
.proposal-tabs { position: sticky; top: 64px; z-index: 20; width: min(1500px, calc(100% - 32px)); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; margin: -35px auto 24px; padding: 7px; background: rgba(247,244,235,.96); border: 1px solid rgba(16,43,61,.12); box-shadow: 0 14px 35px rgba(16,43,61,.16); backdrop-filter: blur(14px); }
.proposal-tabs button { min-height: 58px; border: 0; border-radius: 0; color: #51616a; background: transparent; font-size: 15px; font-weight: 800; }
.proposal-tabs button.active { color: #fff; background: #0f8190; box-shadow: inset 0 -4px #e1ad3d; }
.proposal-document { width: min(1500px, calc(100% - 32px)); min-height: 50vh; margin: 0 auto; scroll-margin-top: 145px; }
.proposal-document figure { margin: 0; padding: 24px; background: #d4d0c7; box-shadow: 0 28px 70px rgba(16,43,61,.18); }
.proposal-document figcaption { padding: 0 0 16px; color: #3a4d57; font-size: 12px; font-weight: 900; letter-spacing: .14em; }
.proposal-document img { display: block; width: 100%; height: auto; margin: 0 auto 8px; background: #fff; box-shadow: 0 4px 20px rgba(16,43,61,.12); touch-action: pan-x pan-y pinch-zoom; user-select: none; -webkit-user-drag: none; }
.proposal-document img:last-child { margin-bottom: 0; }
.proposal-part-error { min-height: 180px; display: grid; place-items: center; margin-bottom: 8px; color: #7b4d46; background: #f3e7e1; font-weight: 800; }
.proposal-loading { min-height: 45vh; display: grid; place-items: center; color: #56707c; background: #f4f0e8; font-weight: 800; letter-spacing: .1em; }
.proposal-tip { margin: 24px 16px 0; color: #63747c; text-align: center; font-size: 12px; }
.proposal-watermarks { position: fixed; inset: 64px 0 0; z-index: 15; display: grid; grid-template-columns: repeat(3, 1fr); pointer-events: none; overflow: hidden; opacity: .065; }
.proposal-watermarks span { align-self: center; color: #0b3248; font-size: 11px; font-weight: 900; white-space: nowrap; transform: rotate(-24deg); }
.proposal-footer { background: #0b2638; border-color: #1c465d; }
.preset-page { margin-bottom: 8px; background: #fff; }
.preset-region-toggle { display: block; width: min(560px, calc(100% - 28px)); min-height: 64px; margin: 18px auto; border: 3px solid #e33c35; border-radius: 0; color: #c92d28; background: #fffaf7; font-size: clamp(16px, 2vw, 22px); font-weight: 900; letter-spacing: .08em; box-shadow: 0 12px 30px rgba(157, 42, 36, .12); }
.preset-region-toggle:hover { color: #fff; background: #d93630; }
.preset-crop { position: relative; width: 100%; overflow: hidden; background: #fff; }
.preset-crop[hidden] { display: none; }
.preset-crop img { position: absolute; inset: 0 auto auto 0; width: 100%; max-width: none; margin: 0; box-shadow: none; }
.preset-plan.ducted { aspect-ratio: 2100 / 620; }
.preset-plan.central { aspect-ratio: 2100 / 760; }
.preset-plan img { transform: translateY(-8.962%); }
.preset-plan { cursor: pointer; outline: none; }
.preset-plan:focus-visible { box-shadow: inset 0 0 0 4px #e33c35; }
.preset-table.ducted { aspect-ratio: 2100 / 731; }
.preset-table.central { aspect-ratio: 2100 / 591; }
.preset-table.ducted img { transform: translateY(-50.741%); }
.preset-table.central img { transform: translateY(-60.175%); }
.proposal-tabs[hidden] { display: none; }
.proposal-url { color: #687983; font-size: 12px; overflow-wrap: anywhere; }
.danger-outline { padding: 8px 11px; border: 1px solid #b7463d; color: #a53730; background: transparent; white-space: nowrap; }
.danger-outline:hover { color: #fff; background: #a53730; }

@media (max-width: 600px) {
  .proposal-bar { min-height: 58px; padding-inline: 12px; }
  .proposal-mark { width: 34px; height: 34px; }
  .proposal-cover { min-height: 360px; padding: 65px 22px 70px; }
  .proposal-cover h2 { font-size: 14vw; }
  .proposal-tabs { top: 58px; width: calc(100% - 16px); margin-top: -28px; }
  .proposal-tabs button { min-height: 52px; padding: 9px 6px; font-size: 13px; }
  .proposal-document { width: 100%; }
  .proposal-document figure { padding: 8px 0 0; }
  .proposal-document figcaption { padding: 7px 14px 14px; }
  .proposal-watermarks { grid-template-columns: 1fr 1fr; }
}
