
:root {
  --phone-width: 580px;
  --phone-gutter: clamp(15px, 4.5vw, 24px);
  --phone-left: max(var(--phone-gutter), calc(env(safe-area-inset-left, 0px) + 8px));
  --phone-right: max(var(--phone-gutter), calc(env(safe-area-inset-right, 0px) + 8px));
  --phone-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --phone-safe-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  --phone-safe-top: max(6px, env(safe-area-inset-top, 0px));
  --phone-panel-radius: 18px;
}
html, body {inline-size:100%; max-inline-size:100%; margin:0; overflow-x:clip; overscroll-behavior-x:none}
body {touch-action:pan-y pinch-zoom}
#root {max-inline-size:100%; min-inline-size:0; overflow-x:clip}
#root :where(main,section,article,fieldset,header,footer,nav,form,dl,dd) {min-inline-size:0}
#root :where(p, dd, li, blockquote, label, h1, h2, h3, h4, summary, button) {overflow-wrap:anywhere}
#root :where(button, summary) {touch-action:manipulation}
#root :where(img, svg, canvas, video) {max-inline-size:100%}
#root [hidden] {display:none!important}
#root :where(select, textarea, input:not([type=checkbox]):not([type=radio]):not([type=range])) {max-inline-size:100%; min-inline-size:0; font-size:max(16px,1em)}
#root .ai-mark {display:none!important}
#root :is(.mini-dock .pills,.pill-row,.archive-index,.steps) {flex-wrap:wrap; overflow-x:clip}

#root .mobile-bar {
  position:sticky; z-index:20; top:0; max-width:var(--phone-width); margin:0 auto;
  padding:var(--phone-safe-top) var(--phone-right) 0 var(--phone-left);
  display:grid; grid-template-columns:minmax(61px,1fr) minmax(0,2fr) minmax(61px,1fr); align-items:center; gap:3px;
  min-height:calc(55px + var(--phone-safe-top)); background:color-mix(in srgb,var(--surface-solid) 94%, transparent);
  color:var(--ink); border-bottom:1px solid var(--line); box-sizing:border-box;
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
}
#root .mobile-bar-title {text-align:center; font-weight:700; font-size:17px; letter-spacing:.02em}
#root .mobile-wordmark {font-style:italic; font-size:22px; font-family:Georgia,serif; color:var(--primary-deep)}
#root .mobile-bar-status {display:flex; align-items:center; justify-content:end; color:var(--muted); min-width:0}
#root .mobile-bar-status small {font-size:11px}
#root .mobile-menu {position:relative; justify-self:start; margin:0; color:var(--primary-deep)}
#root .mobile-menu summary {
  list-style:none; display:grid; place-items:center; min-width:48px; min-height:44px;
  padding:0 8px; border-radius:12px; cursor:pointer; font-family:var(--phone-font); font-size:14px;
}
#root .mobile-menu summary::-webkit-details-marker {display:none}
#root .mobile-menu[open] summary {background:var(--primary-soft)}
#root .mobile-menu nav {
  position:absolute; z-index:2; top:calc(100% + 7px); left:0;
  box-sizing:border-box;width:min(230px,calc(100vw - var(--phone-left) - var(--phone-right)));padding:6px;
  background:var(--surface-solid); border:1px solid var(--line); border-radius:15px; box-shadow:var(--shadow-md); display:grid;
}
#root .mobile-menu nav button {
  display:block; min-height:44px; width:100%; padding:8px 12px; text-align:start;
  color:var(--ink); border:0; box-shadow:none; background:none; font:500 14px/1.4 var(--phone-font);
}
#root .mobile-menu nav button:is(:focus-visible,[aria-current],:active) {background:var(--primary-soft);border-radius:9px}

#root .pdf-home {display:block; min-height:100dvh; height:auto; overflow:clip}
#root .pdf-home .home-main {
  position:relative; inset:auto; translate:none; transform:none; width:min(100%,var(--phone-width)); min-width:0;
  margin:0 auto; padding:clamp(46px,9dvh,108px) var(--phone-gutter) max(110px,var(--phone-safe-bottom)); box-sizing:border-box;
}
#root .pdf-home .greet {font-size:clamp(32px,9.2vw,55px);line-height:1.18;margin:0 0 23px;text-wrap:balance}
#root .pdf-home .home-composer {width:100%;max-width:none;min-height:0;box-sizing:border-box;margin:0}
#root .pdf-home .home-composer textarea {width:100%;font-family:var(--phone-font);line-height:1.6;min-height:85px}
#root .pdf-home .home-composer .hint {display:none}
#root .pdf-home .composer-foot {justify-content:end}
#root .pdf-home .home-composer .send {width:42px; min-height:42px}
#root .pdf-home .modes {display:grid; grid-template-columns:minmax(0,1fr); gap:8px; margin-top:13px}
#root .pdf-home .modes .mode {max-width:100%;text-align:start;white-space:normal;min-height:45px}
#root .pdf-home .modes .prism-mode-ink {width:100%;justify-content:start}
#root .pdf-home .examples {display:flex; flex-wrap:wrap; gap:2px 8px;margin-top:15px;line-height:1.55}
#root .pdf-home .examples span {flex-basis:100%}
#root .pdf-home .examples button {min-height:38px;padding:5px 1px;font-size:14px}

html body #root .pdf-chat {
  isolation:isolate; display:grid; grid-template-rows:auto minmax(0,1fr) auto;
  width:min(100%,var(--phone-width)); height:var(--mobile-height,100dvh);
  min-height:0; max-height:none; margin:0 auto; padding:0;
  overflow:hidden; box-sizing:border-box; font-family:var(--phone-font);
  background:color-mix(in srgb,var(--surface-solid) 91%,var(--primary-soft)); color:var(--ink);
}
#root .pdf-chat>.mobile-chat-bar {grid-row:1; width:100%;position:relative;z-index:9}
#root .pdf-chat>.chat-scroll {
  grid-row:2; min-height:0; position:relative; inset:auto; width:100%; max-width:none; height:auto;
  margin:0; padding:0 0 6px; overflow-x:clip; overflow-y:auto; scrollbar-width:thin;
  overscroll-behavior-y:contain; scroll-padding-block:12px;
}
#root .pdf-chat .thread {
  min-height:0; width:100%; max-width:none;box-sizing:border-box; margin:0;
  display:flex; flex-direction:column; gap:11px; padding:17px var(--phone-right) 11px var(--phone-left);
}
html body #root .pdf-chat .thread .msg {
  position:relative; inset:auto; margin:0; padding:0; gap:0; width:auto; min-width:0;
  display:flex; flex-direction:column; align-items:flex-start; scroll-margin-block:8px;
}
html body #root .pdf-chat .thread .msg.user {align-items:flex-end;align-self:stretch}
html body #root .pdf-chat .thread :is(.msg.ai .ai-text,.msg.user .bubble) {
  margin:0; min-width:0; display:block; width:fit-content; max-width:91%;
  font:400 16px/1.57 var(--phone-font)!important; letter-spacing:0; text-align:start;
  padding:10px 13px; border-radius:17px; box-sizing:border-box; color:var(--ink); overflow-wrap:anywhere;
  white-space:pre-wrap; box-shadow:none; text-wrap:wrap;
}
html body #root .pdf-chat .thread .msg.ai .ai-text {border:0; border-end-start-radius:5px; background:var(--surface-sunk)}
html body #root .pdf-chat .thread .msg.user .bubble {border:0; border-end-end-radius:5px;background:var(--primary-soft)}
html body #root .pdf-chat .thread .msg.ai .ai-text::after {display:none}
html body #root .pdf-chat .thread .msg.ai .ai-text.dots {display:flex;position:static;min-height:35px;gap:5px;align-items:center}
#root .pdf-chat .thread .prism-question-basis {
  position:static; inset:auto; min-height:34px; margin:1px 0 0 6px; padding:5px 2px;
  font:400 13px/1.4 var(--phone-font)!important; color:var(--primary-deep);
}
#root .pdf-chat .thread .profile-note {margin:5px 0 0; padding:7px 10px; max-width:95%; box-sizing:border-box}
#root .pdf-chat .thread .profile-note .chips {display:flex; flex-wrap:wrap; gap:4px}
html body #root .pdf-chat>.dock {
  grid-row:3; position:relative; inset:auto; translate:none; transform:none; width:100%; z-index:2;
  display:block; margin:0; padding:7px var(--phone-right) var(--phone-safe-bottom) var(--phone-left); box-sizing:border-box;
  background:var(--surface-solid); border-top:1px solid var(--line); box-shadow:0 -5px 20px #14231b0a;
  border-radius:var(--phone-panel-radius) var(--phone-panel-radius) 0 0;
}
html body #root .pdf-chat .answer-dock {width:100%; max-width:none; margin:0; padding:0; gap:0; display:block}
html body #root .pdf-chat .answer-paper {
  background:none; box-shadow:none; border:0; display:grid; gap:7px; margin:0; padding:0; position:relative; min-width:0;
}
#root .pdf-chat .answer-paper::before,#root .pdf-chat .answer-paper::after {display:none}
html body #root .pdf-chat .answer-paper .answer-sheet {
  background:var(--surface-sunk); border:1px solid var(--line); border-radius:13px; box-shadow:none;
  padding:5px 8px; margin:0; min-width:0;
}
html body #root .pdf-chat .answer-sheet header {display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px; align-items:center; margin:0}
html body #root .pdf-chat .answer-sheet .answer-prompt {margin:0; padding:3px; overflow-wrap:anywhere; font:600 13px/1.38 var(--phone-font)!important}
#root .pdf-chat .answer-sheet .answer-tools {display:flex;gap:1px;align-items:center}
html body #root .pdf-chat .answer-sheet .answer-tools button {width:36px;height:38px;min-height:38px;padding:5px}
#root .mobile-chat-bar .coverage-trigger {
  display:grid; gap:3px; align-items:center; width:auto; min-width:56px; padding:4px 2px;
  min-height:39px; background:none; box-shadow:none; border:0; color:var(--primary-deep);
}
#root .mobile-chat-bar .coverage-trigger::before {content:"进度";font:500 12px/1.2 var(--phone-font)}
#root .mobile-chat-bar .coverage-track {width:45px}
#root .mobile-chat-bar .coverage-chevron {display:none}
html body #root .mobile-chat-bar .prism-chat-coverage-panel {
  position:fixed; inset:calc(56px + var(--phone-safe-top)) var(--phone-right) auto var(--phone-left);
  box-sizing:border-box; width:auto; max-height:min(55dvh,480px); overflow:auto; background:var(--surface-solid);
}
html body #root .pdf-chat .answer-body {max-height:min(24dvh,190px);overflow:auto;overscroll-behavior:contain;padding:0 3px 3px}
html body #root .pdf-chat .answer-row {grid-template-columns:18px minmax(0,1fr); gap:9px;min-height:39px; padding:4px; font-size:14px}
#root .pdf-chat .answer-row kbd {display:none}
html body #root .pdf-chat .answer-entry {
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:6px; margin:0;
  min-height:50px; padding:4px 5px 4px 10px; border:1px solid var(--line-strong); border-radius:20px;
  box-sizing:border-box; background:var(--surface); box-shadow:none;
}
:root[data-v2-theme="lavender"] body #root .pdf-chat .answer-paper .answer-entry {background:#f5ead7}
:root[data-v2-theme] body #root .pdf-chat .answer-paper .answer-sheet {background:#fff}
html body #root .pdf-chat .answer-entry textarea {
  box-sizing:border-box; align-self:center; width:100%; min-width:0; min-height:40px; height:40px; max-height:min(18dvh,130px);
  padding:9px 0; color:var(--ink); font:400 16px/1.38 var(--phone-font)!important; field-sizing:content; overflow:auto;
}
html body #root .pdf-chat .answer-actions {display:flex;align-items:center;gap:2px}
html body #root .pdf-chat .answer-entry .answer-submit {
  min-inline-size:43px; height:40px; min-height:40px; padding:0 8px; font-size:14px;
  background:var(--primary); color:var(--primary-ink); border-radius:15px;
}
html body #root .pdf-chat .answer-entry .answer-submit:disabled {background:var(--primary-soft);color:var(--muted)}
html body #root .pdf-chat .answer-entry .answer-skip {min-height:40px;padding:0 3px;font-size:12px;white-space:nowrap}
html body #root .pdf-chat .board-hint {
  min-width:0; width:100%; display:flex; flex-wrap:wrap; gap:4px; margin:0 0 6px; padding:4px 7px;
  box-sizing:border-box;font-size:12px;
}
#root .pdf-chat .board-hint span {min-width:100px; flex:1}
#root .pdf-chat .board-hint em,#root .pdf-chat .board-hint svg {display:none}
#root .pdf-chat .prism-chat-mists {opacity:.28}

html body #root :is(.v2-board,.v2-profile-center,.v2-library,.module-landing,.reading-page,main[data-phase3-layer]) {
  width:min(100%,var(--phone-width)); max-width:var(--phone-width); margin:0 auto;
  min-width:0; box-sizing:border-box; padding:15px var(--phone-right) max(18px,var(--phone-safe-bottom)) var(--phone-left);
}
html body #root .phase3-board:not([hidden]) {display:block}
#root :is(.v2-board-header,.v2-profile-head,.v2-library-head) {max-width:100%; margin-bottom:12px; padding:0}
#root :is(.v2-board-header,.v2-profile-head,.v2-library-head) h1 {font-size:clamp(31px,8vw,46px);line-height:1.13;margin:0 0 8px}
#root .phase3-board > .phase3-progress,#root [data-phase3-layer] .phase3-progress {width:100%;margin:10px 0 11px;padding:4px 0}
#root .phase3-progress ol {grid-template-columns:repeat(5,minmax(0,1fr));gap:0}
#root .phase3-progress .review-step {min-height:45px; line-height:1.2; font-size:clamp(10px,3vw,14px);white-space:normal}
#root [data-phase3-layer] .review-step span:nth-child(2) {white-space:normal}
#root .mobile-strata {
  margin:0 0 8px; padding:0; background:color-mix(in srgb,var(--surface-solid) 60%,transparent);
  border:1px solid var(--line-faint); border-radius:14px; overflow:clip;
}
#root .mobile-strata-art {position:relative; container-type:inline-size}
#root .mobile-strata-image {display:block; width:100%; height:auto; transition:scale .55s; transform-origin:50% 60%}
#root .mobile-strata[data-digging="true"] .mobile-strata-image {scale:1.055}
#root .mobile-strata-lines {pointer-events:none;position:absolute;inset:0;width:100%;height:100%;stroke:#ae904e;stroke-width:2;fill:none}
#root .mobile-strata-lines circle {fill:#af8d50;stroke:#fff7d9;stroke-width:3}
#root .mobile-strata-tag {
  position:absolute; transform:translate(-50%,-50%); width:max-content; border:1px solid #baaa80;
  min-height:38px; padding:3px 6px; color:var(--ink); background:var(--surface-solid); border-radius:9px;
  box-shadow:0 2px 5px #543d1b26; font-size:clamp(11px,3vw,15px); line-height:1.3; white-space:nowrap;
}
#root .mobile-strata-tag:is([data-active=true],[aria-pressed=true]) {background:var(--primary-soft);color:var(--primary-deep)}
#root .mobile-strata .jade-shovel {
  left:calc(50% + var(--shovel-x) * (100cqw / 1204)); top:calc(37.96cqw + var(--shovel-y) * (100cqw / 1204));
  transform:scale(.53); transform-origin:left top; pointer-events:none;
}
html body #root main[data-phase3-layer] .phase3-footer {position:static; bottom:auto; display:flex; flex-wrap:wrap; gap:8px; padding:9px 0}
#root main[data-phase3-layer] :is(.review-next,.review-back) {flex:1 1 145px;min-width:0!important;min-height:44px;white-space:normal}
#root main[data-phase3-layer] :is(.review-evidence-columns,.review-claim-options,.review-grid,.review-assumption-grid) {grid-template-columns:minmax(0,1fr)}
#root .phase3-layer-body {max-width:100%;min-width:0;overflow-wrap:anywhere}

html body #root .phase5-toolbar {grid-template-columns:minmax(0,1fr); gap:7px; margin-bottom:13px}
html body #root .phase5-tabs button {min-height:44px;white-space:normal;font-size:clamp(12px,3.35vw,16px)}
#root .phase5-search input {font-size:16px}
#root :is(.history-content,.v2-history-surface,.phase5-reading-paper) {min-width:0;max-width:100%}
#root .phase5-reading-head button {float:none; min-height:41px}
#root .v2-library:has(.phase5-history) .v2-library-head {display:none}
#root .mobile-timeline {
  position:relative;isolation:isolate;width:100%;overflow:clip;border-radius:12px;background:#eeeade;
}
#root .mobile-river-paint {
  position:absolute;display:block;max-inline-size:none;max-width:none;object-fit:fill;pointer-events:none;
}
#root .mobile-river-paint:nth-child(2) {mask-image:linear-gradient(transparent,#000 16px)}
#root .mobile-river-boat {
  position:absolute;z-index:1;width:clamp(72px,24%,124px);aspect-ratio:192/123;translate:-50% -50%;
  background-size:1600% 600%;background-repeat:no-repeat;pointer-events:none;
}
#root .mobile-timeline .mobile-history-record {
  position:absolute;z-index:2;display:grid;min-height:44px;gap:2px;width:max-content;max-width:43%;
  padding:5px 8px;margin:0;text-align:start;translate:10px -50%;
  border:1px solid #ae986970;border-radius:6px;background:#f7f3e7ed;color:#224636;box-shadow:0 2px 6px #2d433a1c;
}
#root .mobile-timeline .mobile-history-record[data-bank="left"] {translate:calc(-100% - 10px) -50%}
#root .mobile-timeline .mobile-history-record::before {
  content:"";position:absolute;left:-14px;top:50%;width:7px;height:7px;translate:0 -50%;
  border:1px solid #fff7dc;border-radius:50%;background:#b59046;box-shadow:0 0 0 2px #f8e7ac9e;
}
#root .mobile-timeline .mobile-history-record[data-bank="left"]::before {left:auto;right:-14px}
#root .mobile-timeline .mobile-history-record[aria-current="true"] {border-color:#506e54;box-shadow:0 0 0 2px #e9e6cf}
#root .mobile-history-record strong {
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
  white-space:normal;overflow-wrap:anywhere;font:600 clamp(12px,3.25vw,16px)/1.4 var(--phone-font);
}
#root .mobile-record-meta {font:500 10px/1.3 var(--phone-font);color:#566754}
#root .mobile-river-empty {
  position:absolute;top:39%;left:50%;translate:-50% -50%;width:max-content;max-width:90%;padding:7px 12px;
  border-radius:6px;background:#f7f3e7ef;color:#385441;font:500 13px/1.4 var(--phone-font);
}
#root .phase5-history .compare-stance {display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
#root .phase5-history .phase5-index-toggle {display:none}
#root .phase5-history .phase5-browser .phase5-summary {display:none}
#root .phase5-history .phase5-lists {padding:0;min-width:0}

#root .reading-page .lab-reading-map,#root .reading-page .painted-road-map {min-width:0;max-width:100%;overflow:clip;touch-action:pan-y}
html body #root .reading-page:has(.mobile-lab-reading) {padding-top:8px}
#root .mobile-lab-reading {display:grid;gap:12px}
#root .mobile-lab-reading button {-webkit-tap-highlight-color:transparent}
#root .mobile-lab-heading-actions {display:flex;align-items:center;justify-content:space-between;gap:8px}
#root .mobile-lab-heading-actions .lab-back {margin:0;min-height:39px}
#root .mobile-lab-heading-actions .mobile-lab-edit {min-height:40px;width:42px;justify-content:center}
#root .mobile-lab-topic-block {min-width:0;width:100%;overflow:hidden}
#root .mobile-lab-topic-block[data-fits="false"] {height:0;visibility:hidden}
#root .mobile-lab-topic-block .mobile-lab-topic {
  margin:2px 0 0;white-space:nowrap;overflow-wrap:normal;color:var(--reading-ink,var(--ink));
  font:600 clamp(19px,5.4vw,26px)/1.4 var(--pdf-serif,serif);
}
#root .mobile-lab-constraint {
  display:flex;align-items:center;gap:6px;margin:7px 0 0;color:var(--reading-muted);font:500 13px/1.45 var(--phone-font);
}
#root .mobile-lab-constraint svg {flex:none}
#root .mobile-lab-reading .lab-route-index {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;border:0}
@media(min-width:370px) {
  #root .mobile-lab-reading .lab-route-index[data-count="3"] {grid-template-columns:repeat(3,minmax(0,1fr))}
}
#root .mobile-lab-reading .lab-route-index button {
  display:grid;grid-template-columns:22px minmax(0,1fr);align-content:center;align-items:center;gap:7px;
  box-sizing:border-box;min-width:0;min-height:58px;padding:9px;border:1px solid var(--reading-line);border-radius:8px;
  background:color-mix(in srgb,var(--surface-solid) 70%,transparent);
  white-space:normal;font-size:13px!important;line-height:1.38!important;
}
#root .mobile-lab-reading .lab-route-index button span:last-child {
  min-width:0;max-width:100%;white-space:normal!important;overflow-wrap:anywhere;word-break:normal;
}
#root .mobile-lab-reading .lab-route-index button[aria-pressed="true"] {
  background:color-mix(in srgb,var(--surface-solid) 82%,var(--primary) 18%);border-color:transparent;
}
#root .mobile-lab-reading .lab-route-letter {width:22px;height:24px;font-size:15px!important}
#root .mobile-lab-diagram {overflow:clip;border-radius:9px;background:var(--reading-wash)}
html body #root .mobile-lab-diagram .painted-road-map {border:0;border-radius:0;width:100%}
html body #root .mobile-lab-diagram .lab-reading-map :is(button,figcaption,.painted-road-origin,.fork-hub,.fork-junction,.painted-road-hit,.fork-track-target) {
  display:none;
}
#root .mobile-lab-reading .lab-reading-tools {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}
#root .mobile-lab-reading .lab-reading-tools button {min-height:44px;min-width:0;padding:5px;gap:5px;font-size:13px!important}
#root .mobile-lab-reading .lab-reading-tools .lab-text-action {border:1px solid var(--reading-line);border-radius:6px}
html body #root .mobile-lab-reading .lab-reading-result {display:grid;grid-template-columns:minmax(0,1fr);gap:2px;margin:0;padding:9px 10px;border:0;border-radius:8px}
#root .mobile-lab-result-heading {display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:3px 9px}
#root .mobile-lab-result-heading h2 {margin:0;color:var(--reading-ink);font:650 14px/1.5 var(--phone-font)}
#root .mobile-lab-reading .mobile-lab-result-heading strong {font:500 12px/1.4 var(--phone-font);color:var(--reading-muted)}
#root .mobile-lab-reading .lab-result-actions {grid-column:1;justify-content:space-between;gap:3px 9px}
#root .mobile-lab-reading .lab-result-actions .lab-text-action {min-height:36px}
#root .mobile-lab-reading .lab-reading-foot {display:grid;grid-template-columns:minmax(0,1fr);gap:7px;padding:0;border:0;text-align:center}
#root .mobile-lab-reading .mobile-lab-footer-actions {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
}
#root .mobile-lab-footer-actions button {min-width:0;min-height:46px;margin:0;padding:6px 8px;box-sizing:border-box}
#root .mobile-lab-reading .lab-judgment-action {width:100%;max-width:none;min-height:46px;background:var(--reading-ink);color:#fbf8ef;border-radius:8px}
#root .mobile-lab-reading .lab-judgment-action:hover {filter:brightness(1.12)}
#root .mobile-lab-reading .lab-reading-foot .mobile-lab-saved {color:var(--reading-ink);font-weight:600!important}
html body #root .phase4-compare-page {
  box-sizing:border-box;width:min(100%,var(--phone-width));max-width:none;margin-inline:auto;
  padding:14px var(--phone-right) calc(74px + var(--phone-safe-bottom)) var(--phone-left);animation-name:mobile-compare-enter;
}
@keyframes mobile-compare-enter {from {opacity:.45} to {opacity:1}}
#root .phase4-compare-page .phase4-compare-hero {display:block}
#root .phase4-compare-hero .mobile-lab-topic {font-size:15px}
#root .phase4-compare-page .mobile-compare-back {
  position:fixed;z-index:12;right:max(var(--phone-right),calc((100% - var(--phone-width))/2 + var(--phone-gutter)));
  bottom:calc(10px + var(--phone-safe-bottom));min-height:44px;max-width:calc(100% - var(--phone-left) - var(--phone-right));
  margin:0;padding:6px 13px;background:var(--surface-solid);box-shadow:0 3px 12px #223d3026;
}
#root :is(.v2-lab-detail-grid,.review-lab-config,.lab-setup-workspace) {grid-template-columns:minmax(0,1fr)}
#root :is(.v2-lab-actions,.v2-lab-archive-actions,.v2-lab-compare-tabs,.lab-pane-actions,.v2-lab-rule-routes) {
  flex-wrap:wrap; max-width:100%; gap:6px;
}
#root .v2-lab-compare :is(.row,.v2-lab-compare-filters,.v2-lab-plan-switches) {flex-wrap:wrap;min-width:0}
#root .v2-lab-compare label {max-width:100%;white-space:normal}
#root .v2-lab-variable :is(input[type=range],.v2-lab-range) {display:none}
#root .phase4-console .v2-lab-exact input {min-height:39px;width:75px;font-size:16px}
#root .phase4-console .v2-lab-exact {height:auto}
#root .v2-lab-week-exact input,#root .phase4-console .lab-time-limit .v2-lab-exact input {font-size:16px}
#root .mobile-compare {display:grid;gap:10px;min-width:0;max-width:100%}
#root .mobile-compare-section {border:1px solid var(--line);border-radius:11px;overflow:clip;background:var(--surface)}
#root .mobile-compare-section h3 {margin:0;padding:10px 12px;background:var(--surface-sunk);font-size:16px}
#root .mobile-compare-values {display:grid;grid-template-columns:minmax(0,1fr)}
#root .mobile-compare-value {padding:9px 12px;border-top:1px solid var(--line-faint);font-family:var(--phone-font);font-size:14px;line-height:1.55}
#root .mobile-compare-value h4 {margin:0 0 3px;color:var(--primary-deep);font-size:14px}
#root .mobile-compare-section :is(h3,h4,p,li) {white-space:normal;overflow-wrap:anywhere;word-break:normal}
#root .mobile-compare-value :is(p,ul) {margin:1px 0}
#root .mobile-compare-value ul {padding-inline-start:1.2em;list-style-position:outside}

#root .v2-profile-workspace {display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
#root .v2-profile-workspace .v2-profile-side {position:static}
#root .v2-profile-side>p {display:none}
#root .v2-profile-side nav {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
#root .v2-profile-side .v2-profile-tab {box-sizing:border-box;min-height:43px;min-width:0;white-space:normal;padding:4px 6px;font-size:14px;justify-content:start}
#root .v2-profile-side .v2-profile-tab svg {width:15px}
#root .v2-profile-panel {min-width:0;max-width:100%;box-sizing:border-box}
#root .resume-profile .resume-section {grid-template-columns:minmax(0,1fr)}
#root .v2-profile-panel-header {flex-wrap:wrap;gap:8px}
#root .v2-profile-overview {width:100%;display:flex;flex-wrap:wrap;gap:7px}
#root .v2-profile-head {display:block}

html body #root dialog[open] {
  box-sizing:border-box; max-width:min(calc(100% - 2 * max(var(--phone-left),var(--phone-right))),var(--phone-width)); overflow-x:clip;
  max-height:calc(var(--mobile-height,100dvh) - 2 * max(var(--phone-safe-top),var(--phone-safe-bottom)) - 16px);
  min-width:0; overscroll-behavior:contain;
}
html body #root dialog:is(.prism-chat-basis-drawer,.prism-judgment-drawer,.prism-lab-node-dialog,.prism-compare-drawer,[mode=prism-drawer],:has(.lab-live-results),:has(.lab-comparison-pane),:has(> .v2-lab-detail))[open] {
  position:fixed; inset:auto 0 0; translate:none; width:min(100%,var(--phone-width)); max-width:100%; height:auto;
  margin:0 auto; padding:0 var(--phone-right) var(--phone-safe-bottom) var(--phone-left);
  border-radius:var(--phone-panel-radius) var(--phone-panel-radius) 0 0;
  max-height:calc(var(--mobile-height,100dvh) - var(--phone-safe-top) - 8px); overflow:auto; overflow-x:clip;
}
#root dialog[open] :is(.v2-lab-detail-grid,.compare-stance,.preset-grid,.v2-profile-data-rows) {grid-template-columns:minmax(0,1fr)}
#root .dialog .dialog-head {gap:8px;min-width:0}
#root .dialog .dialog-head button {min-width:42px;min-height:42px}
@media(max-width:380px){
  #root .mobile-bar-title {font-size:15px}
  #root .mobile-wordmark {font-size:20px}
  html body #root .pdf-chat .answer-sheet .answer-tools button {width:30px}
}

html body #root .pdf-home .home-composer .composer-foot {
  position:relative; inset:auto; display:flex; justify-content:end; align-items:center;
  margin:0; padding:0 3px 5px; min-height:46px; height:auto;
}
html body #root .pdf-home .home-composer .send {position:relative; inset:auto; margin:0}
#root .pdf-home .greet {text-shadow:0 1px 10px #fcf3dfaa}
html body #root .pdf-home .home-composer {height:auto;display:flex;flex-direction:column}
html body #root .pdf-home .home-composer textarea {flex:auto}

/* Put the portrait landscape below the content. The paper remains open around the title. */
html body #root .pdf-home {position:relative;isolation:isolate;background:#f7f2e7;color:#244137}
#root .pdf-home .mobile-home-landscape {
  position:absolute;inset:auto 0 0;height:clamp(225px,47dvh,505px);z-index:-1;pointer-events:none;
  mask-image:linear-gradient(to bottom,transparent 0%,#0007 37%,#000 78%);
}
#root .pdf-home .mobile-home-landscape img {display:block;width:100%;height:100%;object-fit:cover;object-position:72% 79%}
html body #root .pdf-home .home-main {padding:clamp(41px,8dvh,76px) var(--phone-gutter) clamp(95px,19vh,200px)}
html body #root .pdf-home .greet {
  color:#193e35;font-size:clamp(30px,9.15vw,49px);letter-spacing:.025em;
  line-height:1.21;margin:0 0 22px;text-shadow:none;
}
html body #root .pdf-home .home-composer {
  position:relative;background:#fbf7ed;border:1px solid #b9c0a7;border-radius:16px;
  padding:7px 8px 3px;box-shadow:0 5px 15px #374c3111;
}
html body #root .pdf-home .prism-home-input-plane {display:none}
html body #root .pdf-home .home-composer:focus-within {border-color:#6c9279;box-shadow:0 0 0 2px #8da58b3d}
html body #root .pdf-home .home-composer textarea {padding:9px 8px 4px;min-height:66px;font:400 16px/1.65 var(--phone-font)!important}
html body #root .pdf-home .home-composer .composer-foot {min-height:40px;padding:0 1px 2px}
html body #root .pdf-home .home-composer .send {width:38px;height:38px;min-height:38px}
html body #root .pdf-home .modes {margin-top:15px;gap:8px}
html body #root .pdf-home .modes .mode {
  display:block;width:100%;min-width:0;min-height:57px;padding:8px 13px;
  border:1px solid #879b815a;border-radius:12px;background:#f6f4e8e8;box-shadow:none;color:#285343;
}
html body #root .pdf-home .modes .mode-explore {background:#244f40;color:#fbf8ed;border-color:#244f40}
html body #root .pdf-home .modes .mode:active {background:#e8e9d8;color:#193e35}
#root .mobile-home-action {display:flex;align-items:center;justify-content:space-between;gap:10px}
#root .mobile-home-action > span:first-child {display:grid;gap:2px}
#root .mobile-home-action strong {font-size:17px;line-height:1.22;letter-spacing:.05em}
#root .mobile-home-action small {font:400 12px/1.4 var(--phone-font);opacity:.83}
#root .mobile-home-action > span:last-child {font-size:19px}
html body #root .pdf-home .examples {margin:13px 0 0;color:#536355;gap:2px 10px}
html body #root .pdf-home .examples button {border-bottom-color:#a6ad97;color:#2f5546}
/* Override the desktop paper rules that depend on the active theme. */
html[data-v2-theme] body #root .pdf-home .home-composer {
  background:#fbf7ed; border:1px solid #bec5ac; box-shadow:0 5px 15px #374c3111;
}
html[data-v2-theme] body #root .pdf-home .home-composer:focus-within {
  border-color:#6c9279; box-shadow:0 0 0 2px #8da58b3d;
}
html[data-v2-theme] body #root .pdf-home .modes {width:100%;max-width:none;justify-items:stretch;align-items:stretch}
html[data-v2-theme] body #root .pdf-home .modes .mode {max-width:none;justify-self:stretch}
html[data-v2-theme="lavender"] body #root .pdf-chat>.chat-scroll {
  background:linear-gradient(#f9f6eef5,#faf8f2 52%);
}
html[data-v2-theme] body #root .pdf-chat .thread .msg {
  max-width:100%; align-self:stretch; border:0; background:none; box-shadow:none;
}
html[data-v2-theme] body #root .pdf-chat .thread .msg.ai::before,
html[data-v2-theme] body #root .pdf-chat .thread .msg.ai::after {display:none}
html[data-v2-theme="lavender"] body #root .pdf-chat .thread .msg.ai .ai-text {
  background:#efede5; border:0; box-shadow:none;
}
html[data-v2-theme="lavender"] body #root .pdf-chat .thread .msg.user .bubble {
  background:#dce9dc; border:0; color:#263d33;
}

:root[data-v2-theme] body #root .pdf-home .home-composer {
  background:#fbf7ed;border:1px solid #bec5ac;box-shadow:0 5px 15px #374c3111;
}
:root[data-v2-theme] body #root .pdf-home .home-composer:focus-within {
  border-color:#6c9279;box-shadow:0 0 0 2px #8da58b3d;
}
html body #root .phase3-board:not([hidden]) {
  display:flex;flex-direction:column;padding-bottom:calc(76px + var(--phone-safe-bottom));
}
html body #root .phase3-board > .v2-board-header {order:0;margin-bottom:5px}
html body #root .phase3-board>.phase3-map-region {order:2;width:100%;margin:0}
html body #root .phase3-board>.mobile-progress {order:1}
html body #root .phase3-board>.mobile-board-review-actions {order:3}
html body #root .phase3-board>.v2-board-foot {order:4}
#root .mobile-progress {width:100%;margin:2px 0 1px}
#root .mobile-board-review-actions {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:3px 0 10px;
}
#root .mobile-board-review-actions button {
  min-width:0;min-height:46px;margin:0;padding:6px 8px;border-radius:8px;box-shadow:none;
}
#root .mobile-progress .phase3-progress {width:100%;box-sizing:border-box;margin:0;padding:5px 6px 6px;border:0}
#root .mobile-progress .review-progress-header {display:none}
#root .mobile-progress .review-step {min-height:40px}
#root .mobile-progress .review-number {width:20px;height:20px}
#root .mobile-progress .phase3-progress ol::before,#root .mobile-progress .phase3-progress ol::after {top:12px}

html body #root .mobile-board-actions {
  position:fixed;z-index:12;inset:auto max(0px,calc((100% - var(--phone-width)) / 2)) 0;
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;
  padding:7px var(--phone-right) calc(7px + var(--phone-safe-bottom)) var(--phone-left);
  background:color-mix(in srgb,var(--surface-solid) 91%,transparent);border-top:1px solid var(--line);
  border-radius:var(--phone-panel-radius) var(--phone-panel-radius) 0 0;
  backdrop-filter:blur(9px);
}
#root .mobile-board-actions .mobile-board-lab {
  min-height:44px;margin:0;padding:4px 8px;border-radius:8px;box-shadow:none;
  background:color-mix(in srgb,var(--surface-solid) 92%,var(--primary) 8%);color:var(--primary-deep);border:1px solid var(--line);
}
#root .mobile-board-actions .phase3-assistant {position:relative;width:auto;min-width:0;min-height:44px;margin:0}
#root .mobile-board-actions .phase3-assistant .prism-float-assistant {
  width:auto;min-height:44px;gap:5px;padding:4px 8px;border-radius:8px;
  font-size:12px;line-height:1.2;white-space:nowrap;
}
#root .mobile-board-actions .phase3-assistant .prism-float-assistant svg {
  width:17px;height:17px;padding:0;background:none;color:inherit;
}
#root .mobile-board-actions .phase3-assistant .prism-float-assistant::after {display:none}
#root .mobile-board-actions .phase3-assistant .prism-assistant-panel.is-compact[open] {
  position:absolute;inset:auto 0 calc(100% + 12px) auto;width:min(325px,calc(100vw - var(--phone-left) - var(--phone-right)));
  margin:0;max-height:min(56dvh,410px);overflow:auto;
}

html body #root .phase3-board .mobile-jade {
  height:clamp(320px,106vw,510px);width:100%;margin:0;--jade-frame-width:1070;
}
html body #root .mobile-jade .jade-space {bottom:18px}
html body #root .mobile-jade .jade-canvas {touch-action:pan-y pinch-zoom;cursor:default}
html body #root .mobile-jade .jade-label {font-size:clamp(11px,3vw,15px);min-height:30px;padding:4px 7px}
#root .mobile-rotation {
  display:flex;gap:3px;position:absolute;z-index:6;inset:2px 3px auto auto;
  margin:0;padding:2px;
}
#root .mobile-rotation button {
  display:grid;place-items:center;width:35px;min-width:0;min-height:34px;padding:2px;
  border-radius:8px;background:color-mix(in srgb,var(--surface-solid) 63%,transparent);color:var(--primary-deep);box-shadow:none;
}
#root .mobile-strata {position:relative;perspective:900px}
#root .mobile-strata-art {transform:rotateY(var(--mobile-turn,0deg));transition:transform .35s cubic-bezier(.2,.72,.23,1)}
@media(prefers-reduced-motion:reduce){#root .mobile-strata-art {transition:none}}

/* Portrait home composition from the approved layout reference. */
html body #root .pdf-home {display:flex;flex-direction:column;background:#f3efe3;min-height:100dvh}
#root .pdf-home .mobile-home-bar {
  position:relative;z-index:1;order:0;align-self:center;box-sizing:border-box;width:min(100%,var(--phone-width));
  min-height:calc(53px + var(--phone-safe-top));padding:var(--phone-safe-top) var(--phone-right) 0 var(--phone-left);
  display:flex;align-items:center;justify-content:space-between;gap:10px;color:#214737;
}
#root .mobile-home-bar .mobile-wordmark {font:700 clamp(21px,6.05vw,27px)/1.15 var(--phone-font);letter-spacing:-.03em;color:#214737}
#root .mobile-home-bar button {
  display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:2px 0;
  border:0;background:none;color:#24503e;box-shadow:none;font:500 14px/1.3 var(--phone-font);
}
#root .mobile-home-bar svg {display:block}
#root .pdf-home .mobile-home-landscape {
  inset:0; height:auto; width:100%; opacity:.39;
  mask-image:linear-gradient(180deg,transparent 22%,#000 92%);
}
#root .pdf-home .mobile-home-landscape img {object-position:67% center}
html body #root .pdf-home .home-main {
  order:1;padding:clamp(40px,8.4dvh,82px) var(--phone-right) 20px var(--phone-left);
}
html body #root .pdf-home .greet {font-size:clamp(29px,8.55vw,47px);margin-bottom:clamp(16px,4dvh,31px)}
:root[data-v2-theme] body #root .pdf-home .home-composer {
  padding:9px 10px 7px;border-color:#bab9a6;background:#fbf7edee;box-shadow:none;border-radius:15px;
}
html body #root .pdf-home .home-composer textarea {min-height:clamp(58px,10dvh,120px);padding:5px 2px 4px}
html body #root .pdf-home .home-composer .composer-foot {justify-content:space-between;gap:6px;margin-top:5px;padding:0 0 1px}
html body #root .pdf-home .home-composer .hint {
  display:block;min-width:0;color:#727766;font:400 12px/1.35 var(--phone-font);overflow-wrap:anywhere;
}
html body #root .pdf-home .home-composer .send {flex:none}
html body #root .pdf-home .modes {margin-top:clamp(14px,2.5dvh,23px);gap:7px}
html body #root .pdf-home .modes .mode {
  min-height:46px;padding:8px 11px;border:1px solid #879b81;border-radius:999px;
  text-align:center;background:#f7f3e7cc;color:#285141;box-shadow:none;
}
html body #root .pdf-home .modes .mode-explore {background:#244f3f;border-color:#244f3f;color:#fff9eb}
#root .mobile-home-action {display:block;line-height:1.38;font-size:clamp(13px,4.05vw,18px);font-family:var(--phone-font)}
html body #root .pdf-home .examples {margin-top:clamp(12px,2.6dvh,22px);gap:6px}
html body #root .pdf-home .examples span {font:400 13px/1.35 var(--phone-font)}
html body #root .pdf-home .examples button {
  min-height:34px;padding:4px 8px;background:#f6f1e6b8;border:1px solid #b4b4a19c;border-radius:9px;
  font:400 12px/1.35 var(--phone-font);
}
html body #root .pdf-home .examples button[aria-pressed=true] {border-color:#5b886e;background:#e4ecdc}
#root .mobile-home-nav {
  order:2;z-index:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-self:center;
  width:min(100%,var(--phone-width));box-sizing:border-box;gap:2px;margin-top:auto;
  padding:6px var(--phone-right) var(--phone-safe-bottom) var(--phone-left);
  border-radius:var(--phone-panel-radius) var(--phone-panel-radius) 0 0;
  border-top:1px solid #b9b7a467;background:#f8f5e9ec;
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
}
#root .mobile-home-nav button {
  display:grid;justify-items:center;align-content:center;gap:3px;min-height:49px;
  padding:2px 0;border:0;background:none;box-shadow:none;color:#526457;white-space:normal;
  border-radius:8px;font:500 clamp(10px,3.1vw,13px)/1.3 var(--phone-font);
}
#root .mobile-home-nav button[aria-current=page] {color:#234f3d;font-weight:700}
#root .mobile-home-nav button:active {background:#e6ece0}
#root .mobile-home-nav svg {width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
