:root {
  --bg: #cbe4f2; --surface: #eaf3f8; --ink: #11232b; --muted: #47616d;
  --accent: #a12483; --sand: #f1e3b5; --yellow: #ffc013; --light: #fff;
  --line: #ccdbe1; --positive: #116449; --negative: #a72d36;
  font-family: "Helvetica Neue", "Hiragino Sans", "Yu Gothic UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink); background: #f5f8fa; font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; font-size: 16px; line-height: 1.6; }
h1,h2,h3,p { margin-top: 0; }
h1,h2,h3 { color: var(--ink); text-wrap: balance; }
a { color: inherit; text-underline-offset: .2em; }
button,input,select,summary,textarea { font: inherit; }
button,a,input,select,summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button,input,select { accent-color: var(--accent); }
::selection { color: #fff; background: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { padding-inline: max(24px, calc((100vw - 1280px) / 2)); }
.quiet-note { font-size: .8125rem; line-height: 1.6; color: var(--muted); margin: 12px 0 0; }
.site-header { min-height: 76px; display: flex; align-items: center; gap: 32px; background: var(--bg); }
.wordmark { font-size: 1.5rem; font-weight: 800; letter-spacing: -.035em; text-decoration: none; margin-right: auto; }
.primary-nav { display: flex; align-items: center; gap: 28px; font-size: .875rem; }
.primary-nav a { text-decoration: none; padding-block: 12px; }
.primary-nav a[aria-current] { color: var(--accent); font-weight: 700; text-decoration: underline; }
.language-switch { position: relative; z-index: 10; font-size: .875rem; }
.language-switch summary { list-style: none; min-height: 44px; padding: 8px 16px; border: 1px solid var(--ink); border-radius: 24px; cursor: pointer; }
.language-switch summary::-webkit-details-marker { display: none; }
.language-list { position: absolute; top: calc(100% + 8px); right: 0; display: grid; min-width: 164px; padding: 8px; background: var(--ink); color: #fff; }
.language-list a { text-decoration: none; padding: 10px 12px; }
.language-list a:hover,.language-list a[aria-current] { background: var(--sand); color: var(--ink); }
.home-workbench-hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; padding-block: 64px 72px; background: var(--bg); }
.home-intro h1 { font-size: 3.25rem; font-weight: 750; line-height: 1.2; letter-spacing: -.035em; margin-bottom: 24px; }
.home-intro h1 span { display: block; }
.home-intro > p { max-width: 38ch; font-size: 1.125rem; }
.home-intro > .quiet-note { font-size: .875rem; margin-top: 28px; }
.home-tool-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 24px; font-size: .875rem; font-weight: 600; }
.quick-workspace { background: #fff; padding: 32px; border-radius: 12px; }
.quick-workspace h2 { font-size: 1.375rem; line-height: 1.4; margin-bottom: 8px; }
.quick-workspace > p { font-size: .875rem; color: var(--muted); margin-bottom: 24px; }
.quick-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.quick-results { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; padding: 24px 0; margin-top: 16px; border-top: 1px solid var(--line); }
.quick-results .result-main { grid-column: auto; }
.quick-form .button { width: 100%; }
.quick-form .result-main strong { font-size: 2.25rem; }
.tool-index { background: #fff; padding-block: 56px 64px; }
.section-heading h2,.next-tools h2 { font-size: 1.75rem; margin-bottom: 24px; line-height: 1.3; }
.tool-row { display: grid; grid-template-columns: minmax(180px,.8fr) 1.5fr 52px; align-items: center; gap: 24px; text-decoration: none; padding: 26px max(24px, calc((100vw - 1280px) / 2)); transition: background 160ms; }
.tool-row:nth-of-type(1) { background: #fff5d7; }
.tool-row:nth-of-type(2) { background: var(--surface); }
.tool-row:nth-of-type(3) { background: #f1e8f2; }
.tool-row:hover { background: var(--bg); }
.tool-row strong { font-size: 1.25rem; line-height: 1.4; }
.tool-row span { font-size: .875rem; max-width: 65ch; color: var(--muted); }
.tool-row i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 1.25rem; font-style: normal; }
.workbench-page { padding-top: 36px; padding-bottom: 64px; }
.workbench-heading { max-width: 900px; margin-bottom: 28px; }
.workbench-heading h1 { font-size: 2.25rem; line-height: 1.25; letter-spacing: -.03em; margin-bottom: 12px; }
.workbench-heading p { color: var(--muted); margin: 0; font-size: 1rem; }
.workbench-form { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.text-entry { background: #f0f5f9; border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; padding: 18px 24px; }
.text-entry summary { min-height: 28px; font-size: .9375rem; font-weight: 700; cursor: pointer; }
.text-entry .quiet-note { max-width: 85ch; margin: 12px 0 16px; }
.description-label { display: grid; gap: 8px; font-size: .8125rem; font-weight: 600; }
.description-label textarea { width: 100%; min-height: 94px; resize: vertical; padding: 12px; border: 1px solid #a6bec9; border-radius: 6px; color: var(--ink); background: #fff; font-size: .9375rem; line-height: 1.6; caret-color: var(--accent); }
.description-label textarea::placeholder { color: #5d7079; font-weight: 400; }
.text-entry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.text-entry-feedback { margin: 0; font-size: .875rem; color: var(--positive); }
.text-entry-feedback:not(:empty) { margin-top: 16px; }
.text-entry-feedback[data-tone="warning"] { color: #8b4a0a; }
.text-entry-matches { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.text-entry-matches:not(:empty) { margin-top: 12px; }
.text-entry-matches li { padding: 5px 9px; background: #fff; border-radius: 4px; font-size: .8125rem; line-height: 1.4; }
.quick-form .text-entry { margin-bottom: 20px; border: 0; border-radius: 6px; padding: 12px; }
.quick-form .text-entry-actions .button { width: auto; }
.mobile-summary { display: none; }
.workspace-toolbar { padding: 12px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.currency-field { display: flex; align-items: center; gap: 12px; font-size: .8125rem; font-weight: 600; }
.currency-field select { min-height: 40px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 6px; padding: 4px 30px 4px 10px; font-size: .875rem; }
.quick-form .currency-field { margin-top: 16px; }
.platform-notice { padding: 14px 24px; margin: 0; background: #fff5d7; font-size: .875rem; }
.platform-notice a { font-weight: 600; }
.workspace-grid { display: grid; grid-template-columns: 1.12fr 1fr; }
.input-panel { padding: 24px; min-width: 0; border-right: 1px solid var(--line); }
.input-group { border: 0; margin: 0; padding: 0 0 24px; min-width: 0; }
.input-group + .input-group { padding-top: 24px; border-top: 1px solid var(--line); }
.input-group legend { font-weight: 700; font-size: 1rem; padding: 0 0 14px; float: left; width: 100%; }
.input-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 20px; clear: both; }
.field { display: grid; gap: 7px; min-width: 0; margin: 0; font-size: .8125rem; font-weight: 600; align-content: end; }
.field > span:first-child { line-height: 1.4; }
.input-shell { display: flex; align-items: center; background: #f6f9fa; border: 1px solid #b7cbd5; border-radius: 6px; }
.input-shell:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.input-shell input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; font-size: 1rem; font-weight: 600; color: var(--ink); border: 0; outline: 0; background: transparent; border-radius: 6px; font-variant-numeric: tabular-nums; caret-color: var(--accent); }
.input-shell input[aria-invalid="true"] { color: var(--negative); background: #fff0f0; }
.input-shell b { font-weight: 400; padding-right: 12px; color: var(--muted); }
.results-panel { padding: 24px; min-width: 0; background: #f4f9f7; scroll-margin-top: 88px; }
.result-status { color: var(--positive); font-size: .875rem; font-weight: 600; margin-bottom: 16px; min-height: 1.6em; }
.result-status[data-tone="negative"] { color: var(--negative); }
.main-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid #ceded8; }
.result { display: grid; gap: 6px; align-content: start; min-width: 0; }
.result span { font-size: .8125rem; color: var(--muted); line-height: 1.4; }
.result strong { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result-main { grid-column: 1 / -1; }
.result-main strong { font-size: 2.75rem; font-weight: 750; line-height: 1.1; color: var(--positive); letter-spacing: -.035em; }
.result-main strong[data-tone="negative"], .negative { color: var(--negative) !important; }
.positive { color: var(--positive); }
.secondary-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 24px; }
.secondary-metrics .result strong { font-size: 1.125rem; }
.form-error { margin: 16px 0 0; color: var(--negative); font-size: .875rem; padding: 12px; background: #fff0f0; border-radius: 6px; }
.workspace-actions { border-top: 1px solid var(--line); padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.plan-name { flex: 1 1 190px; display: grid; gap: 7px; font-size: .8125rem; }
.plan-name input,.share-link input { min-height: 44px; border: 1px solid #b7cbd5; padding: 8px 12px; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; caret-color: var(--accent); }
.plan-name input::placeholder { color: #586d76; }
.button { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 44px; padding: 10px 16px; font-size: .875rem; font-weight: 650; border-radius: 6px; text-decoration: none; border: 1px solid transparent; line-height: 1.4; transition: background 140ms, border-color 140ms; }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: #82176a; }
.button-secondary { background: #fff; border-color: #a6bec9; color: var(--ink); }
.button-secondary:hover { background: var(--surface); }
.button-text { background: transparent; color: var(--muted); padding-inline: 8px; }
.button-text:hover { color: var(--accent); background: #f1e8f2; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.action-feedback { margin: 0; padding: 0 24px; color: var(--positive); font-size: .875rem; }
.action-feedback:not(:empty) { padding-bottom: 20px; }
.share-link { display: grid; gap: 6px; padding: 0 24px 24px; font-size: .8125rem; }
.analysis-block { margin-top: 44px; }
.analysis-heading { margin-bottom: 24px; }
.analysis-heading h2,.guide-section h2 { font-size: 1.5rem; line-height: 1.4; margin-bottom: 8px; letter-spacing: -.02em; }
.analysis-heading p { color: var(--muted); font-size: .875rem; max-width: 80ch; margin-bottom: 0; }
.allocation-bar { display: flex; width: 100%; height: 28px; overflow: hidden; border-radius: 6px; background: #e1e9ed; }
.allocation-bar span { min-width: 0; }
.layer-cost { background: #8baabb; }.layer-shipping { background: #adcaac; }.layer-packaging { background: #d7ba85; }.layer-expenses { background: #a5b4c7; }.layer-fee { background: #e4ba62; }.layer-paymentFee { background: #deb88e; }.layer-adCost { background: #bf91b3; }.layer-reserve { background: #bbc2d8; }.layer-profit { background: #3e9272; }
.breakdown-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 0 32px; margin-top: 16px; }
.breakdown-item { display: flex; align-items: center; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.breakdown-item .swatch { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.breakdown-item strong { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .875rem; }
.scenario-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.scenario { padding: 24px; min-width: 0; }
.scenario + .scenario { border-left: 1px solid var(--line); }
.scenario.is-current { background: #edf5f9; }
.scenario h3 { font-size: .9375rem; font-weight: 650; margin-bottom: 20px; }
.scenario dl { margin: 0 0 24px; display: grid; gap: 12px; }
.scenario dl > div { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.scenario dt { font-size: .8125rem; color: var(--muted); }
.scenario dd { margin: 0; font-weight: 700; font-size: .9375rem; text-align: right; font-variant-numeric: tabular-nums; }
.scenario .button { width: 100%; }
.saved-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.saved-plan { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-width: 0; }
.saved-plan h3 { margin-bottom: 16px; font-size: 1rem; overflow-wrap: anywhere; }
.saved-plan dl { display: grid; gap: 12px; margin: 0 0 20px; }
.saved-plan dl > div { display: grid; gap: 2px; }
.saved-plan dt { font-size: .8125rem; color: var(--muted); }
.saved-plan dd { font-size: 1rem; font-weight: 650; margin: 0; }
.saved-plan .plan-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-state { background: var(--surface); padding: 24px; border-radius: 8px; color: var(--muted); font-size: .9375rem; }
.guide-section { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; background: #fff; padding-block: 56px; }
.guide-section p { font-size: .9375rem; color: var(--muted); }
.guide-section .quiet-note { font-size: .8125rem; }
.worked-example { margin: 24px 0; padding: 24px; background: #fff5d7; border-radius: 8px; }
.worked-example h3 { font-size: .875rem; margin-bottom: 12px; }
.worked-example > p:first-of-type { color: var(--ink); font-size: 1.125rem; font-weight: 650; }
.faq-list details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-list summary { min-height: 28px; font-weight: 650; font-size: .9375rem; cursor: pointer; }
.faq-list details p { margin: 16px 0 0; }
.next-tools { background: #fff; padding-block: 12px 48px; }
.next-tools .tool-row { margin-inline: calc(-1 * max(24px, calc((100vw - 1280px) / 2))); }
.site-footer { padding: 32px max(24px, calc((100vw - 1280px) / 2)); background: var(--ink); color: #fff; }
.footer-mark { display: flex; font-size: 1.5rem; font-weight: 750; line-height: 1; margin-bottom: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px 40px; padding: 0; }
.footer-links nav { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: .8125rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-links p { width: 100%; margin: 0; color: #b9d0db; font-size: .8125rem; max-width: 80ch; }
.analytics-settings { padding: 0; border: 0; background: none; color: inherit; text-decoration: underline; text-underline-offset: .2em; font-size: .8125rem; min-height: 28px; }
.footer-analytics { width: 100%; border-top: 1px solid #ffffff30; padding-top: 16px; font-size: .8125rem; color: #b9d0db; }
.footer-analytics > div { margin-top: 10px; }
.footer-analytics .analytics-settings { color: #fff; margin-left: 8px; }
@media (max-width: 1000px) {
  .home-workbench-hero { gap: 32px; }
  .home-intro h1 { font-size: 2.5rem; }
  .quick-fields { grid-template-columns: 1fr; gap: 12px; }
  .quick-form .result-main strong { font-size: 1.875rem; }
  .workspace-grid { grid-template-columns: 1fr 1fr; }
  .input-panel,.results-panel { padding: 20px; }
  .secondary-metrics { grid-template-columns: 1fr; }
  .breakdown-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding-inline: 20px; }
  .site-header { gap: 16px; min-height: 68px; }
  .primary-nav { display: none; }
  .home-workbench-hero { grid-template-columns: 1fr; padding-block: 32px; gap: 28px; }
  .home-intro h1 { font-size: 2.25rem; margin-bottom: 16px; }
  .home-intro > p { max-width: 48ch; font-size: 1rem; }
  .home-intro > .quiet-note { margin-top: 16px; }
  .home-tool-links { gap: 10px 20px; margin-top: 16px; }
  .quick-workspace { padding: 24px; }
  .quick-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .tool-index { padding-block: 32px; }
  .tool-row { padding: 22px 20px; grid-template-columns: 1fr 44px; gap: 8px 16px; }
  .tool-row strong,.tool-row span { grid-column: 1; }
  .tool-row i { grid-column: 2; grid-row: 1 / span 2; }
  .workbench-page { padding-block: 24px 40px; }
  .workbench-heading h1 { font-size: 1.75rem; }
  .workbench-heading p { font-size: .875rem; }
  .text-entry { padding: 16px 20px; }
  .description-label textarea { font-size: 1rem; }
  .workspace-grid { grid-template-columns: 1fr; }
  .mobile-summary { display: flex; position: sticky; top: 0; z-index: 5; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; background: #e4f1ec; border-bottom: 1px solid #b5d0c4; }
  .mobile-summary > div { display: grid; gap: 2px; }
  .mobile-summary span { font-size: .75rem; color: var(--muted); }
  .mobile-summary strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
  .input-panel { border-right: 0; }
  .results-panel { border-top: 1px solid var(--line); padding: 24px 20px; }
  .secondary-metrics { grid-template-columns: 1fr 1fr; }
  .main-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .result-main strong { font-size: 2.25rem; }
  .workspace-toolbar { padding-inline: 16px; }
  .workspace-actions { padding: 20px; gap: 10px; }
  .plan-name { flex-basis: 100%; }
  .workspace-actions .button { flex: 1 1 calc(50% - 10px); }
  .action-feedback,.share-link { padding-inline: 20px; }
  .breakdown-list { grid-template-columns: 1fr; }
  .scenario-grid,.saved-grid { grid-template-columns: 1fr; }
  .scenario + .scenario { border-left: 0; border-top: 1px solid var(--line); }
  .scenario { padding: 20px; }
  .scenario dl { gap: 8px; }
  .guide-section { grid-template-columns: 1fr; gap: 36px; padding-block: 36px; }
  .next-tools .tool-row { margin-inline: -20px; }
  .analysis-heading h2,.guide-section h2 { font-size: 1.25rem; }
  .platform-notice { padding-inline: 20px; }
}
@media (max-width: 390px) {
  .wrap { padding-inline: 16px; }
  .quick-workspace { padding: 20px; }
  .quick-fields { gap: 12px; }
  .input-grid { gap: 16px 12px; }
  .next-tools .tool-row { margin-inline: -16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *,*::before,*::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }
