.app-shell {
  max-width: 440px;
  padding-bottom: 28px;
}
.topbar h1 {
  font-size: 17px;
}
.topbar img {
  width: 23px;
  height: 23px;
}
.hero {
  margin: 22px 5px 20px;
}
.hero h2 {
  margin: 6px 0 8px;
  font-size: 29px;
  line-height: 1.3;
  letter-spacing: -0.7px;
}
.hero > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.input-card {
  padding-top: 0;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 0 13px;
}
.card-title > span {
  font: italic 800 16px Barlow;
  color: var(--muted);
}
.card-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  background: var(--chip);
  border-radius: 11px;
  margin-bottom: 14px;
}
.mode-tabs button {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}
.mode-tabs button.active {
  background: var(--ink);
  color: var(--lime);
}
.preset-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 17px;
}
.preset-row button {
  min-height: 40px;
  border: 1px solid #e8edf4;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  padding: 7px 4px;
}
.preset-row button.active {
  background: #f1f8e2;
  border-color: #b5d876;
  color: #3b561a;
}
.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 13px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
}
.field > span {
  color: #536072;
}
.field select,
.unit-input {
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--chip);
  width: 100%;
  font-size: 16px;
}
.field select {
  padding: 0 9px;
}
.unit-input {
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
}
.unit-input input {
  border: 0;
  background: transparent;
  width: 100%;
  min-width: 0;
  height: 44px;
  outline-offset: 0;
  font: italic 800 24px Barlow;
}
.unit-input em {
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  color: #8590a1;
}
.full {
  margin: 14px 0;
}
.segmented {
  display: flex;
  gap: 5px;
}
.segmented button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 3px;
  border-radius: 8px;
  background: var(--chip);
  font-size: 12px;
  white-space: nowrap;
}
.segmented button.active {
  background: var(--ink);
  color: var(--lime);
  font-weight: 700;
}
.switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  margin: 14px 0;
}
.switch-row label {
  display: flex;
  align-items: center;
  min-height: 32px;
  gap: 5px;
}
.switch-row input {
  accent-color: #617b31;
  width: 16px;
  height: 16px;
}
.quick-mode .pro-field,
.quick-mode .pro-field-row,
.quick-mode .pro-field-inline {
  display: none !important;
}
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  width: 100%;
  padding: 10px 12px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 11px;
}
.primary img {
  width: 23px;
  height: 23px;
  filter: brightness(0) saturate(100%) invert(90%) sepia(74%) saturate(719%) hue-rotate(27deg);
}
.quick-hint {
  font-size: 11px;
  color: var(--muted);
  margin: 11px 0 0;
  line-height: 1.6;
}
.quick-summary {
  font-size: 11px;
  color: #5a6b43;
  background: #f3f7ec;
  border-radius: 7px;
  padding: 8px 9px;
  margin-top: 10px;
}
.result-card {
  scroll-margin-top: 12px;
}
.answer-strip {
  margin-bottom: 12px;
}
.answer-strip strong {
  font-size: 16px;
  line-height: 1.5;
  display: block;
}
.answer-strip p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 0;
}
.result-hero {
  background: var(--ink);
  border-radius: 12px;
  padding: 19px;
  color: white;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.result-hero small {
  color: #9da5ad;
  font-size: 11px;
}
.result-hero strong {
  display: block;
  font-size: 18px;
  margin-top: 4px;
}
.tune-badge {
  font-size: 24px;
  color: var(--lime);
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.4px;
}
.calibration-status {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin: 10px 0 14px;
}
.calibration-status.measured {
  color: #57742f;
}
.diagram-note {
  font-size: 10px;
  color: #7d899a;
  line-height: 1.6;
  margin: 0 0 11px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 13px 0;
}
.chips span {
  padding: 5px 7px;
  background: #f4f6f9;
  border-radius: 6px;
  font-size: 10px;
  color: #667182;
  line-height: 1.5;
}
.sub-card {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  margin-top: 13px;
}
.sub-card h3 {
  font-size: 14px;
  margin: 0 0 9px;
}
.sub-card p {
  font-size: 12px;
  line-height: 1.8;
  color: #667182;
  margin: 0;
}
#steps {
  list-style: none;
  counter-reset: steps;
  padding: 0;
  margin: 0;
}
#steps li {
  counter-increment: steps;
  position: relative;
  padding: 0 0 14px 28px;
  font-size: 12px;
  color: #657180;
  line-height: 1.9;
}
#steps li::before {
  content: counter(steps, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font: italic 800 17px Barlow;
  color: #5c6777;
}
.alt {
  padding: 13px;
  background: #f7f9f2;
  border: 0;
  border-radius: 9px;
}
.diagnose-card .card-title,
.explain-card .card-title,
.share-card .card-title {
  padding-top: 0;
}
.diagnose-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.diagnose-grid button {
  background: var(--chip);
  min-height: 44px;
  border-radius: 8px;
  padding: 8px 3px;
  font-size: 12px;
}
.diagnose-grid button.active {
  background: var(--ink);
  color: var(--lime);
}
.fix-box {
  margin-top: 11px;
  padding: 13px;
  border-radius: 10px;
  background: #f5f8ee;
  font-size: 12px;
  color: #65724e;
  line-height: 1.8;
}
.fix-box strong {
  display: block;
  color: #263019;
  font-size: 14px;
}
.fix-box p {
  margin: 5px 0 0;
}
.principle-card summary {
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 32px;
}
.principle-card summary span {
  float: right;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.principle-body h3 {
  font-size: 13px;
  margin: 17px 0 6px;
}
.principle-body p,
.principle-body li {
  font-size: 12px;
  line-height: 1.85;
  color: #738091;
}
.principle-body ul {
  padding-left: 18px;
}
.share-preview {
  font-size: 11px;
  line-height: 1.8;
  color: #7c8797;
  white-space: pre-wrap;
  max-height: 130px;
  overflow: auto;
  background: #f7f8fb;
  padding: 10px;
  border-radius: 8px;
}
.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.action-row button {
  background: var(--ink);
  color: #fff;
  min-height: 44px;
  border-radius: 9px;
  font-size: 13px;
}
.action-row button:last-child {
  background: var(--chip);
  color: #536072;
}
footer {
  color: #8d97a4;
  font-size: 10px;
  line-height: 1.8;
  margin: 20px 5px;
}
.footer-brand {
  margin-bottom: 6px;
}
.trial-row {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.trial-row > div {
  flex: 1;
  min-width: 0;
}
.trial-row small {
  display: block;
  font-size: 10px;
  color: #8b94a3;
}
.trial-row strong {
  display: block;
  font-size: 18px;
}
.trial-row button {
  border-radius: 8px;
  min-width: 40px;
  min-height: 40px;
  background: var(--chip);
  font-size: 12px;
  padding: 6px;
}
.trial-row img {
  width: 17px;
  height: 17px;
  margin: auto;
}
.trial-hint {
  font-size: 10px;
  line-height: 1.6;
  color: #8b94a3;
  margin: 0;
}
.measure-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  font-size: 13px;
  color: #496323;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 6px;
}
.measure-link img {
  width: 20px;
  height: 20px;
}
.error-box {
  font-size: 12px;
  line-height: 1.8;
  color: #a6453f;
  background: #fff0ed;
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
}
.conflict-actions {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.conflict-actions button {
  min-height: 44px;
  background: #f3f6e9;
  color: #52662f;
  border-radius: 7px;
  padding: 8px;
  font-size: 12px;
}
dialog {
  border: 0;
  border-radius: 18px;
  max-width: 390px;
  width: calc(100% - 28px);
  padding: 20px;
  color: var(--ink);
  max-height: calc(100dvh - 40px);
  overflow: auto;
}
dialog::backdrop {
  background: #07080c90;
}
dialog > p,
#helpContent {
  font-size: 13px;
  line-height: 1.8;
  color: #8590a1;
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.dialog-top h2 {
  font-size: 19px;
  margin: 0;
}
.dialog-top button {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  font-size: 23px;
}
.dialog-top img {
  width: 22px;
  height: 22px;
  margin: auto;
}
.measure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
#measureForm label {
  font-size: 12px;
  font-weight: 600;
  display: block;
}
#measureForm input {
  width: 100%;
  border: 1px solid #e2e6ee;
  border-radius: 8px;
  height: 48px;
  font-size: 16px;
  background: #f3f5f9;
  padding: 10px;
  margin-top: 6px;
}
.measure-extra {
  margin-top: 12px;
}
.fine {
  font-size: 11px;
  line-height: 1.7;
  color: #929baa;
}
#copyText {
  width: 100%;
  height: 300px;
  max-height: 55vh;
  font-size: 13px;
  line-height: 1.8;
  padding: 10px;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 11px 17px;
  background: #151b24e8;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  max-width: 90%;
  z-index: 20;
  white-space: nowrap;
}
@media (max-width: 350px) {
  .card {
    padding: 13px;
  }
  .hero h2 {
    font-size: 27px;
  }
  .tune-badge {
    font-size: 21px;
  }
  .result-hero {
    padding: 15px;
  }
  .preset-row button,
  .diagnose-grid button {
    font-size: 11px;
  }
  .segmented {
    gap: 4px;
  }
  .segmented button {
    font-size: 11px;
  }
  .trial-row button {
    min-width: 36px;
  }
}

/* 沿用旧工具的线组示意组件，只调整配色与层级。 */
/* 精细压目对照：实际插图 + 实测读数，沿用 App 白灰与荧光绿。 */
.pressure-card { margin: 18px 0 16px; }
.pressure-heading { display:flex; align-items:center; gap:7px; margin-bottom:8px; }
.pressure-heading > span { padding:3px 7px; border-radius:5px; background:#f0f3f7; color:#7b8798; font-size:10px; font-weight:700; }
.pressure-heading > span.is-measured { background:#effad6; color:#507015; }
.pressure-heading p { margin:0; color:#8994a5; font-size:11px; letter-spacing:.1px; }
.pressure-pair { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.pressure-view { position:relative; min-width:0; margin:0; }
.pressure-view + .pressure-view { border-left:1px solid #edf1f7; }
.pressure-view figcaption { position:absolute; z-index:4; top:15px; left:10px; font-size:13px; font-weight:700; line-height:1.4; }
.pressure-view strong { display:flex; align-items:baseline; gap:2px; margin-top:4px; color:#080a0d; font-style:italic; }
.pressure-view strong b { font-family:Barlow,sans-serif; font-size:42px; font-weight:800; line-height:1; letter-spacing:-1.5px; -webkit-text-stroke:3px #b9f52e; paint-order:stroke fill; }
.pressure-view strong small { font-size:18px; -webkit-text-stroke:2px #b9f52e; paint-order:stroke fill; }
.pressure-stage { height:260px; position:relative; overflow:hidden; }
.precision-float { position:absolute; top:48px; left:62%; width:20px; height:194px; object-fit:cover; z-index:2; transition:top .25s ease; }
.precision-water { position:absolute; z-index:1; left:0; top:66px; width:100%; height:156px; object-fit:fill; opacity:.6; mask-image:linear-gradient(to bottom,#000 58%,transparent 100%); pointer-events:none; }
.eye-ruler { position:absolute; top:48px; left:calc(62% + 29px); width:22px; height:96px; border-left:1px solid #b4becb; z-index:3; transition:top .25s ease; }
.eye-tick { position:absolute; left:0; width:18px; padding-left:8px; color:#8a95a5; font-family:Arial,sans-serif; font-size:8px; line-height:1; transform:translateY(-50%); }
.eye-tick::before { content:''; position:absolute; top:3px; left:0; width:4px; border-top:1px solid #b4becb; }
.eye-reading { position:absolute; z-index:1; left:-1px; min-width:22px; padding-left:8px; font-family:Arial,sans-serif; font-size:10px; line-height:1; font-weight:700; color:#080a0d; background:rgba(255,255,255,.93); transform:translateY(-50%); }
.eye-reading::before { content:''; position:absolute; top:4px; left:0; width:5px; border-top:2px solid #080a0d; }
.pressure-equation { padding:10px 6px 9px; border-radius:11px; background:#f3fbdc; text-align:center; }
.pressure-equation p { display:flex; justify-content:center; align-items:baseline; gap:6px; margin:0; color:#0b0d11; font-size:17px; font-weight:700; line-height:28px; height:28px; }
.pressure-equation p > span { font-family:Arial,sans-serif; font-weight:400; }
.pressure-equation b { font-family:Barlow,sans-serif; font-size:23px; font-style:italic; }
.pressure-equation strong { margin-left:2px; font-family:Barlow,sans-serif; font-style:italic; font-size:28px; line-height:1; -webkit-text-stroke:2px #b9f52e; paint-order:stroke fill; }
.pressure-equation strong small { font-size:17px; }
.pressure-equation > small { display:block; color:#819071; font-size:10px; line-height:1.4; margin-top:3px; }
.rig-visual { margin:0 0 5px; padding:11px 12px; border-radius:10px; background:#f5f7fa; }
.rig-visual > strong { display:block; color:#374353; font-size:12px; line-height:1.6; }
.rig-visual > p { margin:4px 0 0; font-size:10px; color:#8590a2; line-height:1.6; }
@media(max-width:350px) {
  .pressure-view figcaption { left:4px; font-size:12px; }
  .pressure-view strong b { font-size:43px; }
  .precision-float { left:60%; width:18px; }
  .eye-ruler { left:calc(60% + 24px); }
  .pressure-equation p { font-size:14px; gap:4px; }
  .pressure-equation b { font-size:21px; }
  .pressure-heading p { font-size:9px; }
}
@media(prefers-reduced-motion:reduce) {
  .precision-float, .eye-ruler { transition:none; }
}

.mode-tabs button,
.preset-row button {
  min-height: 44px;
}
.trial-row button {
  min-width: 44px;
  min-height: 44px;
}
.dialog-top button,
.icon-button {
  width: 44px;
  height: 44px;
}

/* 同一试钓状态下的浮漂、铅和双钩；连接线为数据关系，钓具使用独立插图。 */
.visual-tabs { display:flex; padding:3px; gap:3px; border-radius:10px; background:#f1f4f8; margin:14px 0 12px; }
.visual-tabs button { flex:1; border:0; min-height:44px; padding:7px 5px; border-radius:8px; background:transparent; color:#8b95a4; font-size:12px; font-weight:700; }
.visual-tabs button[aria-pressed="true"] { color:#11151a; background:#fff; box-shadow:0 1px 5px #1825360b; }
.live-rig-card { margin:0 0 14px; }
.live-rig-heading { display:flex; align-items:center; gap:7px; }
.live-rig-heading > span { border-radius:5px; padding:3px 7px; font-size:10px; font-weight:700; color:#6b7a4a; background:#f0f7df; }
.live-rig-heading p { font-size:11px; color:#8b95a4; margin:0; }
.live-rig-stage { position:relative; height:334px; overflow:hidden; }
.live-water { position:absolute; left:0; top:32px; width:100%; height:235px; opacity:.55; object-fit:fill; mask-image:linear-gradient(to bottom,#000 65%,transparent); }
.live-reading { position:absolute; z-index:3; left:8px; top:17px; }
.live-reading > small { display:block; font-size:10px; color:#8794a4; }
.live-reading > strong { display:flex; align-items:baseline; gap:3px; margin-top:4px; font-size:18px; font-style:italic; color:#080a0d; -webkit-text-stroke:2px #b9f52e; paint-order:stroke fill; }
.live-reading b { font:italic 800 40px/1 Barlow,sans-serif; -webkit-text-stroke:3px #b9f52e; paint-order:stroke fill; }
.live-depth { position:absolute; top:17px; right:8px; max-width:100px; font-size:10px; line-height:1.5; color:#8b95a4; margin:0; text-align:right; z-index:3; }
.live-float { position:absolute; left:96px; top:60px; width:18px; height:122px; object-fit:cover; z-index:2; transition:top .25s ease; }
.live-ruler { position:absolute; left:122px; height:72px; border-left:1px solid #bac4d0; z-index:3; transition:top .25s ease; }
.live-ruler > span, .live-ruler > b { position:absolute; padding-left:6px; width:20px; font:9px/1 Arial,sans-serif; color:#9aa4b2; transform:translateY(-50%); }
.live-ruler > span::before, .live-ruler > b::before { content:''; position:absolute; left:0; top:4px; width:3px; border-top:1px solid currentColor; }
.live-ruler > b { color:#0b0e14; font-weight:700; background:#ffffffdd; }
.rig-connector { position:absolute; width:1px; background:#9ba7b3; transform-origin:top center; z-index:1; transition:height .25s ease,top .25s ease,transform .25s ease; }
.rig-lead-piece { position:absolute; z-index:2; width:14px; height:27px; overflow:hidden; transition:top .25s ease,transform .25s ease; }
.rig-lead-piece img { position:absolute; max-width:none; width:30.42px; height:66.96px; left:-8.17px; top:-19.98px; }
.rig-lead-piece.is-grounded { transform:rotate(75deg); }
.rig-hook-piece { position:absolute; z-index:2; width:20px; height:24px; overflow:hidden; transition:top .25s ease,transform .25s ease; }
.rig-hook-piece img { position:absolute; max-width:none; width:31.35px; height:39.17px; left:-6.46px; top:-8.58px; }
.rig-hook-piece.is-grounded { transform:rotate(65deg); }
.rig-state-labels { position:absolute; left:56%; right:4px; top:170px; }
.rig-state-labels p { display:flex; flex-direction:column; gap:3px; margin:0 0 12px; padding-left:9px; border-left:2px solid #d5e5a8; }
.rig-state-labels span { color:#939dab; font-size:10px; }
.rig-state-labels strong { color:#3c4958; font-size:12px; line-height:1.35; }
.rig-floor { position:absolute; top:310px; left:0; right:0; border-top:1px dashed #c9d3db; height:19px; background:#f4f6f8; }
.rig-floor span { position:absolute; right:8px; top:5px; color:#98a0ac; font-size:9px; }
.live-rig-trend { margin:5px 0 0; padding:10px 11px; border-radius:9px; background:#f3f8e8; font-size:11px; line-height:1.6; color:#68794b; }
.live-rig-caption { margin:6px 0 0; color:#9aa3af; font-size:9px; line-height:1.6; }
@media(max-width:350px) {
 .visual-tabs button { font-size:11px; }
 .live-reading { left:0; }
 .live-reading > small { font-size:9px; }
 .live-reading b { font-size:35px; }
 .rig-state-labels { left:63%; right:0; }
 .rig-state-labels strong { font-size:11px; }
 .live-rig-heading p { font-size:10px; }
}
@media(prefers-reduced-motion:reduce) {
 .live-float, .live-ruler, .rig-connector, .rig-lead-piece, .rig-hook-piece { transition:none; }
}

/* App 已有原生导航；独立浏览器继续保留网页导航。 */
.hero { position:relative; }
.hero > p { margin:0; color:var(--muted); font-size:14px; }
.hero > .eyebrow { font-size:14px; }
.embedded-help { display:none; }
.is-embedded .embedded-help { display:inline-flex; position:absolute; right:0; top:17px; }
.is-embedded .hero h2 { padding-right:40px; }
@media(max-width:350px) {
  .is-embedded .hero h2 { font-size:26px; letter-spacing:-.7px; }
}
