:root{
  --bg:#061d18; --bg2:#0b3129; --card:#fff8e8; --ink:#17352d; --muted:#6e7e71;
  --gold:#e1b35f; --orange:#d96d2f; --green:#286a4f; --line:rgba(23,53,45,.14);
  --shadow:0 18px 60px rgba(0,0,0,.32);
}
*{box-sizing:border-box} html{background:var(--bg)}
body{margin:0;color:var(--ink);font-family:"Noto Serif SC",serif;min-height:100vh;background:
  radial-gradient(circle at 12% -8%,rgba(225,179,95,.32),transparent 34%),
  radial-gradient(circle at 92% 8%,rgba(73,154,120,.28),transparent 28%),
  linear-gradient(160deg,#061d18 0%,#0b3129 48%,#04110f 100%)}
body:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.16;background-image:linear-gradient(30deg,rgba(255,255,255,.08) 12%,transparent 12.5%,transparent 87%,rgba(255,255,255,.08) 87.5%,rgba(255,255,255,.08)),linear-gradient(150deg,rgba(255,255,255,.08) 12%,transparent 12.5%,transparent 87%,rgba(255,255,255,.08) 87.5%,rgba(255,255,255,.08));background-size:44px 76px}
button,input,select{font-family:inherit}.app-shell{width:min(430px,100%);margin:0 auto;padding:18px 14px 34px}.hero{position:relative;overflow:hidden;color:#fff;padding:24px 12px 16px}.watermark{position:absolute;right:-8px;top:-16px;font-family:"Ma Shan Zheng",cursive;font-size:124px;color:rgba(255,255,255,.09);transform:rotate(-10deg)}.brand-row{display:flex;align-items:center;gap:8px;color:rgba(255,255,255,.78);font-size:12px}.pill{background:rgba(225,179,95,.18);border:1px solid rgba(225,179,95,.45);padding:4px 9px;border-radius:999px;color:#ffd98a}.weather-dot{width:7px;height:7px;background:#69e0a7;border-radius:50%;box-shadow:0 0 18px #69e0a7}.hero h1{font-size:38px;line-height:1;margin:17px 0 10px;letter-spacing:.02em}.hero p{margin:0;line-height:1.8;color:rgba(255,255,255,.78);font-size:14px}.card{background:linear-gradient(180deg,#fffdf5,#f7ecd0);border:1px solid rgba(255,255,255,.5);border-radius:28px;padding:18px;margin:14px 0;box-shadow:var(--shadow);position:relative}.card-title{display:flex;align-items:center;gap:10px;margin-bottom:14px}.card-title span{display:grid;place-items:center;width:34px;height:34px;border-radius:13px;background:#17352d;color:#ffe0a0;font-weight:900}.card-title h2{margin:0;font-size:20px}.mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;background:rgba(23,53,45,.08);padding:5px;border-radius:17px;margin-bottom:12px}.mode-tabs button,.preset-row button,.action-row button{border:0;border-radius:13px;height:40px;font-weight:900;color:var(--ink);background:transparent}.mode-tabs button.active{background:#17352d;color:#ffe0a0;box-shadow:0 8px 18px rgba(23,53,45,.18)}.preset-row{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:13px}.preset-row button{border:1px solid rgba(217,109,47,.18);background:rgba(217,109,47,.08);font-size:12px}.preset-row button.active{background:#d96d2f;color:#fff}.grid.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field{display:block;margin-bottom:13px}.field>span{display:block;font-size:12px;color:var(--muted);margin:0 0 7px 2px;font-weight:700}input,select{width:100%;height:48px;border:1px solid var(--line);background:rgba(255,255,255,.62);border-radius:15px;padding:0 12px;color:var(--ink);font-size:16px;font-weight:700;outline:none}select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,#286a4f 50%),linear-gradient(135deg,#286a4f 50%,transparent 50%);background-position:calc(100% - 18px) 20px,calc(100% - 12px) 20px;background-size:6px 6px;background-repeat:no-repeat}.unit-input{position:relative}.unit-input input{padding-right:42px}.unit-input em{position:absolute;right:13px;top:13px;color:var(--muted);font-style:normal;font-size:13px}.segmented{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.segmented button,.diagnose-grid button{border:1px solid var(--line);background:rgba(255,255,255,.52);border-radius:15px;min-height:43px;font-weight:800;color:var(--ink)}.segmented button.active{background:var(--green);color:#fff;border-color:var(--green);box-shadow:0 8px 20px rgba(40,106,79,.25)}.switch-row{display:grid;gap:10px;margin:4px 0 16px}.switch-row label{display:flex;align-items:center;gap:9px;background:rgba(40,106,79,.08);padding:11px 12px;border-radius:15px;font-size:14px;font-weight:800}.switch-row input{width:18px;height:18px;accent-color:var(--green)}.primary{width:100%;height:56px;border:0;border-radius:18px;color:#fff;background:linear-gradient(135deg,#d96d2f,#e1b35f);font-size:18px;font-weight:900;box-shadow:0 14px 30px rgba(217,109,47,.32)}.primary:active,.diagnose-grid button:active,.action-row button:active{transform:translateY(1px)}.quick-hint{margin:10px 2px 0;font-size:12px;color:var(--muted);line-height:1.7}.quick-mode .pro-field,.quick-mode .pro-field-row,.quick-mode .pro-field-inline{display:none}.quick-mode .grid.two:has(.pro-field){grid-template-columns:1fr}.result-card{border:1px solid rgba(225,179,95,.7)}.result-hero{display:flex;justify-content:space-between;gap:12px;align-items:stretch;background:#102f28;color:#fff;border-radius:23px;padding:16px}.result-hero small{display:block;color:#bdd6c5;font-size:12px;margin-bottom:5px}.result-hero strong{font-size:21px}.tune-badge{min-width:118px;display:grid;place-items:center;border-radius:18px;background:radial-gradient(circle at 30% 0,#ffe0a0,#d96d2f);color:#3b1708;font-weight:900;font-size:20px;text-align:center;box-shadow:inset 0 1px 0 rgba(255,255,255,.45)}.match-summary{display:flex;align-items:center;gap:9px;margin:14px 2px 8px;flex-wrap:wrap}.match-summary strong{background:#17352d;color:#ffe0a0;border-radius:999px;padding:6px 10px;font-size:13px}.match-summary span{font-size:13px;color:#53685c;font-weight:900}.confidence{height:9px;background:rgba(23,53,45,.12);border-radius:999px;overflow:hidden;margin:8px 2px}.confidence i{display:block;height:100%;width:80%;background:linear-gradient(90deg,#286a4f,#e1b35f,#d96d2f);border-radius:inherit;transition:.35s}.confidence-text{font-size:13px;color:#53685c;margin:0 0 12px 2px;line-height:1.55}.rig-visual{height:112px;border-radius:22px;background:linear-gradient(180deg,rgba(40,106,79,.15),rgba(40,106,79,.04));border:1px solid rgba(40,106,79,.16);position:relative;overflow:hidden;margin-bottom:13px}.water-line{position:absolute;left:0;right:0;top:27px;height:2px;background:linear-gradient(90deg,transparent,#88b99d,transparent)}.float-stick{position:absolute;left:56px;top:11px;width:13px;height:55px;border-radius:99px;background:linear-gradient(180deg,#ffec9b 0 28%,#ef5b2d 28% 56%,#17352d 56%);box-shadow:0 0 0 4px rgba(255,255,255,.45)}.line-stick{position:absolute;left:62px;top:64px;width:1px;height:45px;background:rgba(23,53,45,.45)}.lead-dot{position:absolute;left:54px;top:66px;width:18px;height:18px;border-radius:50%;background:#6a5a46;transition:.25s}.lead-dot.bottom{top:85px}.lead-dot.float{top:48px;background:#d96d2f;box-shadow:0 0 16px rgba(217,109,47,.45)}.hook-dot{position:absolute;width:9px;height:9px;border-radius:50%;background:#d96d2f}.hook-a{left:94px;top:82px}.hook-b{left:132px;top:96px}.rig-visual span{position:absolute;right:14px;bottom:13px;left:158px;font-size:13px;line-height:1.55;font-weight:900;color:#214338}.chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.chips span{font-size:12px;background:rgba(217,109,47,.1);border:1px solid rgba(217,109,47,.2);color:#8a3b17;padding:6px 9px;border-radius:999px;font-weight:800}.principle-card{background:linear-gradient(180deg,rgba(23,53,45,.08),rgba(255,255,255,.42));border:1px solid rgba(23,53,45,.12);border-radius:20px;margin:12px 0;padding:0;overflow:hidden}.principle-card summary{list-style:none;display:flex;justify-content:space-between;align-items:center;padding:13px 14px;font-size:15px;font-weight:900;color:#17352d;cursor:pointer}.principle-card summary::-webkit-details-marker{display:none}.principle-card summary span{font-size:12px;color:#8a3b17;background:rgba(217,109,47,.1);padding:4px 8px;border-radius:999px}.principle-body{padding:0 14px 14px;display:grid;gap:10px}.principle-body h3{font-size:14px;margin:0 0 5px;color:#214338}.principle-body p{margin:0;line-height:1.75;font-size:13px;color:#40594e}.principle-body ul{margin:0;padding-left:18px;line-height:1.7;font-size:13px;color:#40594e}.sub-card{background:rgba(255,255,255,.52);border:1px solid var(--line);border-radius:20px;padding:14px;margin-top:12px}.sub-card h3{margin:0 0 10px;font-size:16px}.sub-card ol{margin:0;padding-left:20px;line-height:1.75;font-size:14px}.sub-card p{margin:0;line-height:1.75;font-size:14px}.alt{background:rgba(40,106,79,.08)}.share-preview{white-space:pre-wrap;background:#17352d;color:#fff;border-radius:22px;padding:15px;line-height:1.65;font-size:13px;border:1px solid rgba(255,255,255,.12)}.action-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.action-row button{background:#286a4f;color:#fff;height:46px}.action-row button:nth-child(2){background:rgba(23,53,45,.12);color:#17352d}.diagnose-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.diagnose-grid button{height:46px;background:#fff9eb}.fix-box{margin-top:12px;padding:14px;border-radius:18px;background:#17352d;color:#fff;line-height:1.7;font-size:14px}footer{color:rgba(255,255,255,.65);font-size:12px;line-height:1.8;padding:6px 8px 20px}
@supports not selector(:has(*)){.quick-mode .pro-field{display:none}}
@media(max-width:360px){.app-shell{padding:12px 10px 28px}.hero h1{font-size:34px}.card{padding:15px;border-radius:24px}.grid.two{gap:9px}.result-hero{flex-direction:column}.tune-badge{height:58px}.segmented{grid-template-columns:1fr}.preset-row{grid-template-columns:1fr}.rig-visual span{left:115px}}

/* v3 explainable workflow */
.answer-strip{background:linear-gradient(135deg,rgba(217,109,47,.12),rgba(225,179,95,.18));border:1px solid rgba(217,109,47,.18);border-radius:18px;padding:13px 14px;margin-bottom:12px}.answer-strip strong{display:block;font-size:18px;line-height:1.45;color:#17352d}.answer-strip p{margin:6px 0 0;color:#52675c;font-size:13px;line-height:1.6}.principle-card:not([open]){padding-bottom:0}.principle-card summary{cursor:pointer}.principle-card summary span{font-size:12px;color:#d96d2f}.principle-body li{line-height:1.75;margin-bottom:6px}.diagnose-card{scroll-margin-top:12px}.sub-card h3::before{content:"✓ ";color:#d96d2f}.explain-card .card-title span{background:#286a4f}

/* v4 field-use refinements */
.quick-summary{margin-top:10px;padding:10px 12px;border-radius:14px;background:rgba(40,106,79,.1);border:1px solid rgba(40,106,79,.16);font-size:12px;line-height:1.6;color:#286a4f;font-weight:900}.rig-visual{overflow:hidden}.rig-visual em{position:absolute;left:18px;right:18px;bottom:10px;font-style:normal;font-size:11px;color:#6e7e71;line-height:1.4}.rig-float .water-line{top:34%}.rig-float .float-stick{top:24%;height:42px}.rig-float .line-stick{height:80px;top:48px}.rig-float .lead-dot{top:92px}.rig-float .hook-a{top:118px}.rig-float .hook-b{top:135px}.rig-float span{top:72px}.rig-offbottom .hook-a{bottom:34px}.rig-offbottom .hook-b{bottom:24px}.rig-running .lead-dot{bottom:24px;top:auto;width:18px;height:18px;background:#17352d}.rig-running .hook-a{bottom:18px}.rig-running .hook-b{bottom:14px}.rig-running span{color:#8a4b1f}.diagnose-grid button.active{background:#17352d;color:#ffe0a0;border-color:#17352d;box-shadow:0 8px 18px rgba(23,53,45,.18)}

/* v5 compact input controls */
.preset-row.compact{display:flex;gap:7px;overflow-x:auto;margin:0 -2px 12px;padding:0 2px 3px;scrollbar-width:none}.preset-row.compact::-webkit-scrollbar{display:none}.preset-row.compact button{flex:0 0 auto;height:30px;padding:0 10px;border-radius:999px;font-size:11px;line-height:30px;white-space:nowrap}.input-card{padding-top:16px}.input-card .field{margin-bottom:10px}.input-card select,.input-card input{min-height:38px}.mode-tabs{margin-bottom:10px}.mode-tabs button{height:34px}.segmented button{min-height:34px;font-size:12px}.primary{height:44px}

/* v6 rig visual spacing fix */
.rig-visual{height:140px;padding-bottom:32px}.rig-visual span{left:112px;right:12px;top:24px;bottom:auto;display:block;padding:7px 9px;border-radius:13px;background:rgba(255,248,232,.78);border:1px solid rgba(40,106,79,.12);font-size:12px;line-height:1.45}.rig-visual em{left:14px;right:14px;bottom:12px;padding-top:9px;border-top:1px dashed rgba(40,106,79,.18);font-size:11px}.rig-bottom .hook-a{top:94px}.rig-bottom .hook-b{top:108px}.rig-bottom .lead-dot.bottom{top:96px}.rig-bottom .line-stick{height:68px}.rig-float span{top:20px}.rig-float .hook-a{top:96px}.rig-float .hook-b{top:112px}.rig-offbottom span{top:22px}.rig-offbottom .hook-a{bottom:42px}.rig-offbottom .hook-b{bottom:32px}.rig-running span{top:22px}.rig-running .lead-dot{bottom:36px}.rig-running .hook-a{bottom:29px}.rig-running .hook-b{bottom:25px}@media(max-width:360px){.rig-visual span{left:104px;right:10px;font-size:11px}.rig-visual em{font-size:10px}}

/* v7 app brand integration */
.app-brand{display:flex;align-items:center;gap:10px;margin:6px 2px 2px;padding:10px 12px;border-radius:20px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.16);color:#fff;box-shadow:0 12px 36px rgba(0,0,0,.16);backdrop-filter:blur(10px)}.app-brand.text-brand:before{content:"";width:4px;height:34px;border-radius:999px;background:linear-gradient(180deg,#ffd98a,#d96d2f);box-shadow:0 0 18px rgba(225,179,95,.28);flex:0 0 auto}.app-brand strong{display:block;font-size:17px;letter-spacing:.02em}.app-brand p{margin:2px 0 0;font-size:11px;color:rgba(255,255,255,.72);line-height:1.4}.app-brand em{margin-left:auto;font-style:normal;font-size:11px;font-weight:900;color:#17352d;background:#ffe0a0;border-radius:999px;padding:4px 8px;white-space:nowrap}.footer-brand{display:flex;align-items:center;justify-content:center;gap:6px;margin-bottom:8px;color:rgba(255,255,255,.92)}.footer-brand strong{font-size:13px;color:rgba(255,255,255,.92)}
