:root {
  --ink: #17231f;
  --muted: #6e7a75;
  --line: #dfe7e2;
  --soft: #f3f7f4;
  --paper: #fbfcfa;
  --white: #fff;
  --mint: #26c281;
  --mint-dark: #087a52;
  --mint-pale: #dff7eb;
  --navy: #0e2922;
  --amber: #e4a731;
  --danger: #b84d4d;
  --shadow: 0 18px 55px rgba(19, 50, 40, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(38,194,129,.22); outline-offset: 2px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }

.app-shell { display: grid; grid-template-columns: 244px minmax(0,1fr); min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; z-index: 20; display: flex; flex-direction: column; padding: 26px 18px 20px; color: #dbe8e2; background: var(--navy); }
.sidebar::before { content: ""; position: absolute; width: 220px; height: 220px; left: -120px; top: -110px; border-radius: 50%; background: rgba(38,194,129,.09); filter: blur(2px); }
.brand { position: relative; display: flex; align-items: center; gap: 11px; padding: 0 8px 30px; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; color: #112a23; background: var(--mint); border-radius: 12px; box-shadow: 0 8px 28px rgba(38,194,129,.25); }
.brand-mark svg { width: 26px; stroke-width: 2; }
.brand strong { display: block; color: white; font-size: 18px; letter-spacing: -.3px; }
.brand small { display: block; margin-top: 2px; color: #88a299; font-size: 10px; letter-spacing: 1.2px; }
nav { display: grid; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 13px; border: 0; border-radius: 10px; color: #9fb3ac; background: transparent; text-align: left; transition: .2s ease; }
.nav-item svg { width: 19px; }
.nav-item:hover { color: white; background: rgba(255,255,255,.05); }
.nav-item.active { color: white; background: rgba(38,194,129,.14); }
.nav-item.active svg { color: var(--mint); }
.nav-count { margin-left: auto; min-width: 23px; padding: 2px 7px; color: #9fb3ac; background: rgba(255,255,255,.07); border-radius: 20px; font-size: 11px; text-align: center; }
.side-spacer { flex: 1; }
.usage-card { padding: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.035); }
.usage-top { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 12px; }
.usage-top strong { color: white; }
progress { width: 100%; height: 6px; border: 0; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.09); }
progress::-webkit-progress-bar { background: rgba(255,255,255,.09); }
progress::-webkit-progress-value { background: var(--mint); border-radius: 10px; }
progress::-moz-progress-bar { background: var(--mint); }
.usage-card p { margin: 9px 0 14px; color: #789188; font-size: 10px; }
.side-footer { display: flex; align-items: center; gap: 8px; padding: 18px 8px 0; color: #758d84; font-size: 10px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(38,194,129,.11); }

main { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: 70px; padding: 0 4.5%; border-bottom: 1px solid rgba(21,46,38,.08); background: rgba(251,252,250,.9); backdrop-filter: blur(14px); }
.crumb { display: flex; gap: 10px; align-items: center; font-size: 12px; }
.crumb span, .crumb b { color: #9aa5a1; font-weight: 400; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.plan-chip { padding: 6px 10px; color: #75817d; background: #edf2ee; border-radius: 7px; font-size: 10px; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; }
.icon-button svg { width: 18px; }
.menu-button { display: none; }
.button { min-height: 42px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; font-weight: 650; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: default; opacity: .6; }
.button-primary { color: #09271e; background: var(--mint); box-shadow: 0 8px 20px rgba(38,194,129,.17); }
.button-primary:hover { background: #31cc8c; box-shadow: 0 10px 24px rgba(38,194,129,.24); }
.button-secondary { color: inherit; border-color: var(--line); background: transparent; }
.sidebar .button-secondary { color: #cfddd7; border-color: rgba(255,255,255,.12); }
.button-compact { min-height: 34px; padding: 0 13px; font-size: 11px; }
.button-full { width: 100%; }

.view { display: none; padding: 50px 4.5% 80px; }
.view.active { display: block; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 50px; max-width: 1180px; margin: 0 auto 38px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; color: var(--mint-dark); font-size: 10px; font-weight: 800; letter-spacing: 1.7px; }
.eyebrow span { width: 21px; height: 2px; background: var(--mint); }
.hero h1, .section-heading h1 { margin: 0; max-width: 680px; color: #152720; font-family: Georgia, "Songti SC", serif; font-size: clamp(36px, 4vw, 56px); font-weight: 500; line-height: 1.13; letter-spacing: -1.8px; }
.hero h1 em { color: var(--mint-dark); font-style: normal; }
.hero > div > p { max-width: 640px; margin: 19px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.hero-stat { display: flex; flex: 0 0 auto; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-stat div { min-width: 92px; padding: 0 19px; border-right: 1px solid var(--line); text-align: center; }
.hero-stat div:last-child { border: 0; }
.hero-stat strong { display: block; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.hero-stat strong span { margin-left: 2px; color: var(--mint-dark); font-family: inherit; font-size: 10px; }
.hero-stat small { display: block; margin-top: 5px; color: #8a9691; font-size: 9px; letter-spacing: .6px; }

.workspace-grid { display: grid; grid-template-columns: minmax(420px, .92fr) minmax(430px, 1.08fr); gap: 22px; max-width: 1180px; margin: 0 auto; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.input-panel { padding: 28px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 25px; }
.panel-head > div { display: flex; align-items: center; gap: 12px; }
.step-number { display: grid; place-items: center; width: 33px; height: 33px; color: var(--mint-dark); background: var(--mint-pale); border-radius: 9px; font-family: Georgia, serif; font-size: 12px; }
.panel-head h2 { margin: 0; font-size: 16px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.text-button { display: flex; align-items: center; gap: 5px; padding: 6px 0; border: 0; color: var(--mint-dark); background: transparent; font-size: 11px; font-weight: 650; }
.text-button svg { width: 14px; }
form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { position: relative; display: block; color: #394640; font-size: 11px; font-weight: 650; }
label > span { float: right; color: #9aa59f; font-size: 9px; font-weight: 400; }
input, textarea { display: block; width: 100%; margin-top: 8px; padding: 11px 13px; border: 1px solid #dce4df; border-radius: 9px; color: var(--ink); background: #fcfdfc; font-size: 12px; line-height: 1.55; transition: border .18s, box-shadow .18s, background .18s; }
textarea { resize: vertical; min-height: 76px; }
input::placeholder, textarea::placeholder { color: #a8b2ad; }
input:focus, textarea:focus { border-color: var(--mint); background: white; box-shadow: 0 0 0 3px rgba(38,194,129,.09); outline: 0; }
.char-count { position: absolute; right: 10px; bottom: 8px; padding: 2px 4px; color: #a2ada8; background: rgba(252,253,252,.92); font-size: 8px; font-weight: 400; }
.budget-row { grid-template-columns: 1fr 145px; align-items: end; }
.field-hint { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px; color: #73817b; background: var(--soft); border-radius: 9px; font-size: 8px; line-height: 1.5; }
.field-hint svg { width: 17px; flex: 0 0 auto; color: var(--mint-dark); }
.form-error { min-height: 0; color: var(--danger); font-size: 11px; }
.form-error:not(:empty) { padding: 9px 11px; border: 1px solid #f1d1d1; border-radius: 8px; background: #fff5f5; }
.generate-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; overflow: hidden; color: white; background: var(--navy); box-shadow: 0 12px 28px rgba(14,41,34,.16); }
.generate-button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, rgba(255,255,255,.1), transparent 70%); transform: translateX(-100%); transition: transform .65s; }
.generate-button:hover::after { transform: translateX(100%); }
.generate-button .button-spark svg { width: 19px; color: var(--mint); }
.button-arrow { position: absolute; right: 18px; font-size: 19px; font-weight: 400; }
.generate-button.loading { pointer-events: none; opacity: .8; }
.generate-button.loading .button-spark { animation: rotate 1.4s linear infinite; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 5px; margin: -8px 0 0; color: #8c9792; font-size: 8px; }
.privacy-note svg { width: 11px; }

.result-panel { position: sticky; top: 92px; min-height: 674px; overflow: hidden; }
.empty-state, .loading-state { min-height: 674px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 55px; text-align: center; background: radial-gradient(circle at 50% 30%, rgba(38,194,129,.08), transparent 32%), linear-gradient(145deg,#fff,#f9fcfa); }
.radar { position: relative; width: 130px; height: 130px; margin-bottom: 25px; border: 1px solid #dce9e3; border-radius: 50%; box-shadow: inset 0 0 0 23px rgba(230,243,236,.45), inset 0 0 0 45px rgba(240,248,244,.6); }
.radar svg { position: absolute; inset: 24px; width: 82px; color: var(--mint-dark); opacity: .75; }
.radar span, .radar i, .radar b { position: absolute; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(38,194,129,.11); }
.radar span { left: 20px; top: 46px; }.radar i { right: 18px; top: 73px; }.radar b { bottom: 20px; left: 54px; }
.empty-kicker { color: var(--mint-dark); font-size: 9px; font-weight: 800; letter-spacing: 1.6px; }
.empty-state h2, .loading-state h2 { margin: 13px 0; font-family: Georgia,"Songti SC",serif; font-size: 29px; font-weight: 500; line-height: 1.3; }
.empty-state p, .loading-state p { max-width: 360px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.empty-features { display: flex; gap: 8px; margin-top: 25px; }
.empty-features span { padding: 6px 10px; color: #718078; background: #eef5f1; border-radius: 20px; font-size: 9px; }
.loading-state { background: white; }
.mint-loader { position: relative; width: 82px; height: 82px; margin-bottom: 26px; }
.mint-loader span { position: absolute; inset: 0; border: 1px solid rgba(38,194,129,.5); border-radius: 50%; animation: pulse 1.8s ease-out infinite; }
.mint-loader span:nth-child(2) { animation-delay: .45s; }.mint-loader span:nth-child(3) { animation-delay: .9s; }
.loading-track { width: 260px; height: 4px; margin-top: 25px; overflow: hidden; border-radius: 10px; background: var(--soft); }
.loading-track i { display: block; width: 45%; height: 100%; background: var(--mint); border-radius: inherit; animation: track 1.4s ease-in-out infinite; }

.result-content { padding: 25px; overflow-wrap: anywhere; background: #f8fbf9; }
.result-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.result-toolbar > div:first-child { min-width: 0; }
.result-toolbar h2 { overflow: hidden; margin: 0; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.result-toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.toolbar-actions { display: flex; gap: 6px; }
.toolbar-actions button { display: flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: #53615b; background: white; font-size: 9px; }
.toolbar-actions svg { width: 13px; }
.fallback-notice { margin-bottom: 12px; padding: 9px 11px; border: 1px solid #efdba8; border-radius: 8px; color: #765a18; background: #fff9e9; font-size: 9px; line-height: 1.5; }
.score-card { display: grid; grid-template-columns: 95px 1fr; gap: 19px; align-items: center; padding: 19px; color: white; background: linear-gradient(125deg,#0e2922,#154c3c); border-radius: 14px; box-shadow: 0 14px 28px rgba(14,41,34,.16); }
.score-ring { position: relative; display: grid; place-items: center; width: 82px; height: 82px; border: 7px solid rgba(255,255,255,.12); border-top-color: var(--mint); border-right-color: var(--mint); border-radius: 50%; }
.score-ring strong { font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.score-ring span { position: absolute; bottom: 13px; color: #9bcab8; font-size: 8px; }
.score-copy > span { color: var(--mint); font-size: 9px; font-weight: 800; letter-spacing: 1.1px; }
.score-copy h3 { margin: 6px 0; font-size: 15px; }
.score-copy p { margin: 0; color: #a8beb6; font-size: 9px; line-height: 1.55; }
.result-tabs { display: flex; gap: 4px; margin: 14px 0; padding: 4px; overflow-x: auto; background: #eaf1ed; border-radius: 10px; scrollbar-width: none; }
.result-tabs button { flex: 1 0 auto; min-height: 36px; padding: 8px 9px; border: 0; border-radius: 7px; color: #68766f; background: transparent; font-size: 9px; }
.result-tabs button.active { color: var(--ink); background: white; box-shadow: 0 3px 10px rgba(18,48,38,.07); font-weight: 700; }
.tab-pane { display: none; }
.tab-pane.active { display: grid; gap: 10px; }
.insight-card { padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.insight-title { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; font-size: 11px; font-weight: 750; }
.mini-icon { display: grid; place-items: center; width: 25px; height: 25px; color: var(--mint-dark); background: var(--mint-pale); border-radius: 7px; }
.mini-icon svg { width: 14px; }
.insight-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.insight-list li { position: relative; padding-left: 16px; color: #53615b; font-size: 10px; line-height: 1.55; }
.insight-list li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }
.email-box { padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.email-subject { margin-bottom: 11px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 10px; }
.email-subject b { color: var(--muted); }
.email-body { margin: 0; color: #4b5852; font-family: inherit; font-size: 10px; line-height: 1.75; white-space: pre-wrap; }
.copy-inline { float: right; min-height: 34px; border: 0; color: var(--mint-dark); background: none; font-size: 9px; }
.follow-card { display: grid; grid-template-columns: 55px 1fr; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.follow-day { color: var(--mint-dark); font-size: 9px; font-weight: 800; }
.follow-day span { display: block; margin-top: 5px; color: #929d98; font-size: 8px; font-weight: 400; }
.follow-card h4 { margin: 0 0 5px; font-size: 10px; }.follow-card p { margin: 0; color: #59655f; font-size: 9px; line-height: 1.6; }
.price-anchor { padding: 20px; color: white; background: var(--navy); border-radius: 12px; }
.price-anchor small { color: #89a49a; font-size: 9px; }.price-anchor strong { display: block; margin: 6px 0; color: var(--mint); font-family: Georgia,serif; font-size: 28px; font-weight: 500; }.price-anchor p { margin: 0; color: #b0c1ba; font-size: 9px; line-height: 1.6; }
.next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.next-grid div { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: white; }.next-grid small { display:block; color: #8d9893; font-size: 8px; }.next-grid strong { display:block; margin-top: 5px; font-size: 10px; line-height:1.5; }

.history-view { max-width: 1260px; margin: auto; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 35px; }
.section-heading h1 { font-size: 42px; }.section-heading p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.history-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.history-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 10px 30px rgba(19,50,40,.05); cursor: pointer; transition: .2s; }
.history-card:hover { border-color: #bcd7ca; transform: translateY(-2px); }
.history-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.history-score { display: grid; place-items: center; width: 40px; height: 40px; color: var(--mint-dark); background: var(--mint-pale); border-radius: 11px; font-family: Georgia,serif; font-size: 17px; }
.history-card time { color: #9aa5a0; font-size: 9px; }.history-card h3 { margin: 15px 0 5px; font-size: 15px; }.history-card p { overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.history-card footer { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top: 18px; padding-top: 12px; border-top:1px solid var(--line); color:#6f7c76; font-size:9px; }
.history-actions { display:flex; gap:5px; }
.history-actions button { min-height:32px; padding:0 8px; border:1px solid var(--line); border-radius:7px; color:#68766f; background:white; font-size:9px; }
.history-actions button:last-child { color:var(--mint-dark); border-color:#cfe6db; background:var(--mint-pale); font-weight:700; }
.history-empty { grid-column: 1/-1; padding: 90px 30px; border: 1px dashed #cfdad4; border-radius: 16px; color: var(--muted); text-align: center; }.history-empty h3 { color:var(--ink); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; padding: 11px 17px; color: white; background: #102a23; border-radius: 9px; box-shadow: 0 14px 40px rgba(0,0,0,.18); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%,15px); transition: .25s; }.toast.show { opacity: 1; transform: translate(-50%,0); }
.pricing-dialog { width: min(900px, calc(100vw - 30px)); padding: 35px; border: 0; border-radius: 20px; color:var(--ink); background:#fbfcfa; box-shadow: 0 30px 100px rgba(4,25,18,.3); }.pricing-dialog::backdrop { background:rgba(7,29,22,.58); backdrop-filter: blur(4px); }.dialog-close { position:absolute; right:18px; top:18px; }.dialog-kicker { color:var(--mint-dark); font-size:10px; font-weight:800; letter-spacing:1.3px; }.pricing-dialog > h2 { margin:10px 0; font-family:Georgia,"Songti SC",serif; font-size:30px; font-weight:500; }.pricing-dialog > p { color:var(--muted); font-size:11px; }.plans { display:grid; grid-template-columns:repeat(3,1fr); gap:13px; margin-top:25px; }.plans article { display:flex; flex-direction:column; padding:22px; border:1px solid var(--line); border-radius:14px; background:white; }.plans article.featured { color:white; background:var(--navy); border-color:var(--navy); transform:translateY(-5px); }.plans article > span { color:var(--mint-dark); font-size:9px; font-weight:800; letter-spacing:1px; }.plans .featured > span { color:var(--mint); }.plans h3 { margin:10px 0 5px; font-size:14px; }.price { font-family:Georgia,serif; font-size:28px; }.price small { color:var(--muted); font-family:inherit; font-size:9px; }.featured .price small { color:#8ea79e; }.plans ul { flex:1; display:grid; gap:9px; margin:18px 0 22px; padding:0; list-style:none; color:#65716c; font-size:10px; }.featured ul { color:#acc0b8; }.plans li::before { content:"✓"; margin-right:7px; color:var(--mint); font-weight:800; }

@keyframes pulse { 0% { transform:scale(.35); opacity:1 } 100% { transform:scale(1); opacity:0 } }
@keyframes track { 0% { transform:translateX(-100%) } 50%,100% { transform:translateX(220%) } }
@keyframes rotate { to { transform:rotate(360deg) } }

@media (max-width: 1080px) { .workspace-grid { grid-template-columns:1fr; }.result-panel { position:relative; top:auto; }.hero-stat { display:none; }.history-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width: 760px) {
  .app-shell { display:block; }.sidebar { transform:translateX(-100%); transition:.25s; box-shadow:20px 0 60px rgba(0,0,0,.2); }.sidebar.open { transform:none; }.topbar { height:62px; padding:0 18px; }.menu-button { display:grid; }.crumb { display:none; }.view { padding:34px 16px 60px; }.hero { margin-bottom:26px; }.hero h1 { font-size:37px; }.hero > div > p { font-size:12px; }.workspace-grid { display:block; }.input-panel { padding:20px; margin-bottom:18px; }.panel-head { gap:10px; }.panel-head p { display:none; }.form-row,.budget-row { grid-template-columns:1fr; }.field-hint { display:none; }.result-panel,.empty-state,.loading-state { min-height:570px; }.empty-state { padding:30px; }.result-content { padding:16px; }.score-card { grid-template-columns:78px 1fr; }.score-ring { width:72px;height:72px; }.result-toolbar { align-items:flex-start; gap:10px; }.toolbar-actions button { min-width:44px; min-height:44px; justify-content:center; }.toolbar-actions button span { display:none; }.result-tabs button { min-height:44px; }.copy-inline { min-height:44px; }.history-grid { grid-template-columns:1fr; }.history-actions button { min-height:44px; }.section-heading { align-items:flex-start; gap:20px; }.section-heading h1 { font-size:35px; }.plans { grid-template-columns:1fr; }.plans article.featured { transform:none; }.pricing-dialog { padding:28px 18px; max-height:90vh; overflow:auto; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; } }
