:root {
  color-scheme: light;
  --ink: #2d3629;
  --muted: #7c8276;
  --primary: #596638;
  --primary-dark: #46532a;
  --accent: #98a55c;
  --line: #e9ece2;
  --paper: #fff;
  --soft: #f5f7ef;
  --cream: #fcfcf8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 108px; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; min-height: 44px; border: 1px solid transparent; border-radius: 10px; background: var(--primary); color: white; padding: 11px 18px; font-weight: 550; line-height: 1.5; transition: background .18s, border-color .18s, color .18s, transform .18s; }
button:disabled { opacity: .48; cursor: not-allowed; }
button.secondary { background: var(--soft); color: var(--primary); border-color: var(--line); }
button.quiet { background: transparent; color: var(--muted); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #b4c18a; outline-offset: 4px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.skip-link { position: fixed; z-index: 10; top: -70px; left: 16px; padding: 12px 20px; color: #fff; background: var(--primary); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 5; background: #fcfcf8f5; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1328px; min-height: 88px; margin: 0 auto; padding: 0 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; text-decoration: none; white-space: nowrap; }
.brand img { display: block; width: 44px; height: 44px; border-radius: 13px; }
.brand>span { font-size: 23px; font-weight: 700; letter-spacing: -.6px; }
.brand b { font-weight: 650; }
nav { display: flex; align-items: center; gap: 26px; }
nav>button { padding: 12px 0; background: transparent; color: var(--muted); font-size: 14px; border-radius: 0; position: relative; white-space: nowrap; }
nav>button.selected { color: var(--primary-dark); }
nav>button.selected::after { content: ""; position: absolute; bottom: 4px; left: 0; right: 0; height: 2px; background: var(--primary); border-radius: 2px; }
.header-account { justify-self: end; min-width: 0; }
.login-button { background: var(--primary); padding: 9px 18px; border-radius: 24px; font-size: 13px; white-space: nowrap; }
.login-button span { display: inline-block; padding-left: 12px; font-size: 17px; font-weight: 400; }
details { position: relative; }
summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; white-space: nowrap; }
summary::-webkit-details-marker { display: none; }
summary svg { width: 14px; height: 14px; transition: transform .18s; }
details[open]>summary svg { transform: rotate(180deg); }
.admin-navigation>summary { color: var(--muted); font-size: 13px; }
.admin-navigation:has(.selected)>summary { color: var(--primary); }
.navigation-menu { min-width: 172px; position: absolute; top: calc(100% + 8px); right: 0; padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: 0 12px 36px #33451e12; }
.navigation-menu button { display: block; width: 100%; background: transparent; color: var(--ink); font-size: 13px; padding: 10px 12px; text-align: left; white-space: nowrap; border-radius: 7px; }
.navigation-menu button.selected { color: var(--primary); background: var(--soft); }
.account-menu summary { font-size: 13px; }
#account-name { display: inline-block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 30px; height: 30px; border: 1px solid #e2e8d6; border-radius: 50%; background: #edf1e3; color: var(--primary); display: inline-grid; place-items: center; font-size: 12px; }
main { width: min(1120px, 100%); padding: 0 40px; margin: 0 auto; flex: 1; outline: none; }
h1, h2, p { overflow-wrap: break-word; }
h1 { margin: 0; font-weight: 650; }
h2 { font-size: 19px; font-weight: 600; margin: 0 0 22px; line-height: 1.5; }
.market-hero { text-align: center; padding: 54px 0 36px; }
.hero-mascot { display: inline-flex; position: relative; }
.hero-mascot::before { content: ""; position: absolute; inset: -17px -32px; z-index: -1; background: radial-gradient(ellipse, #f0efdc, transparent 70%); }
.hero-mascot img { display: block; width: 88px; height: 88px; border-radius: 26px; mix-blend-mode: multiply; }
.market-hero h1 { font-size: clamp(36px, 4.4vw, 52px); line-height: 1.35; letter-spacing: 1px; margin: 22px 0 16px; }
.market-hero h1>span { color: #788747; }
.market-hero>p { color: var(--muted); font-size: 16px; line-height: 1.8; margin: 0; letter-spacing: .4px; }
.entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 850px; margin: 0 auto; }
.entry-card { display: flex; gap: 17px; align-items: center; padding: 24px; border: 1px solid #e0e6d5; background: #f1f5e9; color: var(--ink); border-radius: 16px; text-align: left; min-width: 0; }
.entry-account { background: #fff; border-color: var(--line); }
.entry-icon { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 13px; background: #e5ecd6; color: var(--primary); display: grid; place-items: center; }
.entry-account .entry-icon { background: #f6f2e9; color: #8b7754; }
.entry-icon svg { width: 23px; height: 23px; }
.entry-copy { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.entry-copy>strong { font-size: 18px; font-weight: 600; }
.entry-copy>span { font-size: 12px; line-height: 1.6; color: var(--muted); font-weight: 400; }
.entry-arrow { margin-left: auto; width: 20px; height: 20px; color: var(--primary); }
.services-section { padding-top: 48px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 21px; }
.section-heading>span { color: var(--muted); font-size: 12px; }
.catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.catalog-state { grid-column: 1/-1; padding: 29px 30px; display: flex; align-items: center; justify-content: center; gap: 18px; border: 1px solid var(--line); border-radius: 15px; background: #f8f9f4; }
.state-symbol { display: grid; place-items: center; width: 44px; height: 44px; background: #ecf0e1; border-radius: 50%; color: #8a9a59; font-size: 23px; flex: 0 0 auto; }
.state-symbol svg { width: 24px; height: 24px; }
.catalog-state strong { font-size: 14px; font-weight: 550; }
.catalog-state p { margin: 7px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.catalog-state button { margin-left: 8px; white-space: nowrap; }
.model-card { min-width: 0; padding: 25px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
.model-card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.model-card-head>div { min-width: 0; }
.model-symbol { width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid #e6ebdc; border-radius: 11px; background: var(--soft); color: var(--primary); display: grid; place-items: center; font-size: 16px; font-weight: 600; }
.model-card h3 { font-size: 17px; line-height: 1.5; margin: 0 0 3px; font-weight: 600; overflow-wrap: anywhere; }
.model-card-head p { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.model-prices { display: grid; gap: 12px; margin: 0 0 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.model-prices div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.model-prices dt { font-size: 12px; color: var(--muted); }
.model-prices dd { margin: 0; font-size: 14px; font-weight: 600; }
.model-prices small { font-size: 10px; color: var(--muted); font-weight: 400; padding-left: 3px; }
.model-card>button { width: 100%; font-size: 13px; background: var(--soft); border-color: #e4ead9; color: var(--primary); }
.page-heading { padding: 48px 0 30px; }
.page-heading p { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.page-heading h1 { font-size: 29px; }
.panel { padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 30px; }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.panel-heading h2 { margin: 0; }
.panel-heading p { color: var(--muted); font-size: 12px; margin: 0; }
.trial-panel { margin-top: 40px; }
.trial-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.trial-actions>span { color: var(--muted); font-size: 12px; }
.trial-actions>button { white-space: nowrap; }
.trial-actions>button span { padding-left: 12px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.metrics>div { padding: 26px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.metrics>div:first-child { background: var(--soft); border-color: #e0e7d1; }
.metrics span { display: block; color: var(--muted); margin-bottom: 15px; font-size: 12px; }
.metrics strong { display: block; font-size: 28px; font-weight: 550; letter-spacing: -.5px; overflow-wrap: anywhere; }
#payment-status { color: var(--muted); font-size: 13px; line-height: 1.8; }
form { display: grid; gap: 20px; }
label { display: flex; flex-direction: column; gap: 9px; font-size: 13px; line-height: 1.6; color: #606956; min-width: 0; }
input, select, textarea { width: 100%; min-height: 44px; padding: 11px 13px; border: 1px solid #dfe4d7; border-radius: 9px; background: #fff; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: #96a66f; box-shadow: 0 0 0 3px #9aaf6d16; }
input::placeholder, textarea::placeholder { color: #a2a798; }
textarea { min-height: 125px; resize: vertical; line-height: 1.7; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: 1/-1; }
.span-2>button+button { margin-left: 8px; }
.check { flex-direction: row; align-items: center; gap: 8px; }
.check input { width: 16px; min-height: 16px; height: 16px; accent-color: var(--primary); }
.muted { color: var(--muted); font-size: 12px; margin: 0; }
.table-wrap { overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 28px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { padding: 15px 17px; background: #f7f9f2; color: var(--muted); font-weight: 500; white-space: nowrap; }
td { padding: 15px 17px; border-top: 1px solid #edf0e7; vertical-align: top; max-width: 240px; min-width: 100px; overflow-wrap: anywhere; line-height: 1.7; }
td small { display: block; color: var(--muted); margin-top: 5px; }
td button { font-size: 12px; padding: 6px 11px; }
.empty { padding: 38px 20px; text-align: center; color: var(--muted); }
.notice { display: flex; align-items: center; gap: 18px; position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translateX(-50%); width: max-content; max-width: min(600px, calc(100% - 32px)); padding: 9px 12px 9px 19px; border: 1px solid #dce6ca; border-radius: 12px; background: #f4f8ec; color: var(--primary-dark); box-shadow: 0 8px 35px #2f3e1914; line-height: 1.7; font-size: 13px; }
.notice>button { padding: 5px 8px; font-size: 22px; line-height: 1; flex: 0 0 auto; }
.notice.error, .error { color: #a34836; }
.notice.error { background: #fff4ef; border-color: #edd5ca; }
.error { font-size: 12px; margin: 0; line-height: 1.7; }
.chat-result { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 14px; line-height: 1.85; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 24px; }
.site-footer { margin-top: 50px; color: #919786; font-size: 11px; line-height: 1.8; }
.footer-inner { max-width: 1040px; padding: 26px 0; border-top: 1px solid var(--line); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-inner>div { display: flex; align-items: center; gap: 26px; white-space: nowrap; }
.footer-inner a { text-decoration: none; color: var(--muted); }
.preview { display: inline-flex; align-items: center; gap: 7px; }
.preview i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #98a86d; }
dialog { max-height: calc(100svh - 40px); overflow-y: auto; border: 1px solid var(--line); border-radius: 22px; padding: 32px; box-shadow: 0 24px 100px #1e2b1922; width: min(420px, calc(100% - 32px)); color: var(--ink); background: #fff; }
dialog::backdrop { background: #202b214d; backdrop-filter: blur(4px); }
.dialog-brand img { display: block; border-radius: 14px; margin-bottom: 20px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 28px; }
.dialog-head h2 { margin: 0; font-size: 21px; }
.dialog-head button { font-size: 25px; line-height: 1; padding: 5px 7px; }
.dialog-help { margin: -12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.account-submit { width: 100%; border-radius: 10px; margin-top: 2px; }
#toggle-register { font-size: 12px; padding: 4px; }
[hidden] { display: none !important; }
@media (hover: hover) {
  button:not(:disabled):not(.entry-card):hover { background: var(--primary-dark); color: white; }
  nav>button:not(:disabled):hover { background: transparent; color: var(--primary); }
  button.quiet:not(:disabled):hover { background: var(--soft); color: var(--primary); }
  .navigation-menu button:hover { background: var(--soft) !important; color: var(--primary) !important; }
  .entry-card:hover { transform: translateY(-3px); border-color: #c4d0ae; }
  .footer-inner a:hover { color: var(--primary); }
}
@media (max-width: 1100px) {
  .header-inner { padding: 0 32px; gap: 24px; }
  nav { gap: 20px; }
  .footer-inner { margin: 0 40px; }
  .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 125px; }
  .header-inner { padding: 12px 22px; min-height: 74px; grid-template-columns: 1fr auto; column-gap: 16px; row-gap: 6px; }
  .brand { gap: 8px; }
  .brand img { width: 38px; height: 38px; border-radius: 11px; }
  .brand>span { font-size: 21px; }
  nav { grid-column: 1/-1; grid-row: 2; justify-content: center; gap: 25px; }
  body:not(.signed-in) nav { display: none; }
  nav>button { font-size: 13px; padding: 10px 0; }
  .admin-navigation>summary { font-size: 12px; }
  .header-account { grid-row: 1; grid-column: 2; }
  .login-button { padding: 8px 14px; font-size: 12px; }
  .login-button span { padding-left: 6px; font-size: 15px; }
  #account-name { max-width: 80px; }
  main { padding: 0 24px; }
  .market-hero { padding: 39px 0 29px; }
  .hero-mascot img { width: 76px; height: 76px; border-radius: 23px; }
  .market-hero h1 { font-size: 36px; margin: 20px 0 15px; letter-spacing: .4px; }
  .market-hero>p { font-size: 13px; letter-spacing: 0; }
  .entry-grid { gap: 12px; }
  .entry-card { padding: 19px 16px; flex-wrap: wrap; gap: 14px 10px; border-radius: 14px; align-items: flex-start; position: relative; }
  .entry-icon { width: 36px; height: 36px; border-radius: 11px; }
  .entry-icon svg { width: 21px; height: 21px; }
  .entry-copy { flex: 0 0 100%; gap: 6px; }
  .entry-copy>strong { font-size: 16px; }
  .entry-copy>span { font-size: 11px; line-height: 1.8; }
  .entry-arrow { position: absolute; top: 27px; right: 14px; width: 17px; height: 17px; }
  .services-section { padding-top: 35px; }
  .section-heading h2 { font-size: 19px; }
  .section-heading>span { font-size: 10px; }
  .catalog { grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; }
  .catalog-state { padding: 24px 17px; gap: 13px; justify-content: flex-start; }
  .state-symbol { width: 36px; height: 36px; }
  .state-symbol svg { width: 21px; height: 21px; }
  .catalog-state strong { font-size: 13px; }
  .catalog-state p { font-size: 11px; line-height: 1.8; }
  .catalog-state button { padding: 8px 12px; }
  .model-card { padding: 22px; }
  .page-heading { padding: 32px 0 24px; }
  .page-heading h1 { font-size: 26px; }
  .panel { padding: 22px; }
  .panel-heading { flex-direction: column; gap: 7px; margin-bottom: 20px; }
  .panel-heading h2 { font-size: 17px; }
  .panel-heading p { font-size: 11px; }
  .trial-actions { flex-wrap: wrap; gap: 16px; }
  .trial-actions>span { font-size: 11px; }
  .trial-actions>button { margin-left: auto; }
  .metrics { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics>div:first-child { grid-column: 1/-1; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
  .metrics>div:first-child span { margin-bottom: 0; }
  .metrics>div:first-child strong { font-size: 26px; }
  .metrics>div { padding: 18px 12px; }
  .metrics span { font-size: 11px; }
  .metrics strong { font-size: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .span-2>button+button { margin: 10px 0 0; }
  .span-2>button { width: 100%; }
  input, select, textarea { font-size: 16px; }
  td, th { padding: 12px 14px; }
  .site-footer { margin-top: 30px; }
  .footer-inner { margin: 0 24px; padding: 23px 0; flex-direction: column; align-items: flex-start; gap: 12px; font-size: 10px; }
  .footer-inner>div { gap: 22px; }
  dialog { padding: 25px; }
  .dialog-head h2 { font-size: 20px; }
  .notice { bottom: 16px; font-size: 12px; }
}
@media (max-width: 360px) {
  .header-inner { padding-left: 18px; padding-right: 18px; }
  main { padding: 0 18px; }
  .market-hero h1 { font-size: 31px; }
  .entry-card { padding: 16px 13px; }
  .entry-copy>strong { font-size: 14px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics>div { display: flex; align-items: center; justify-content: space-between; }
  .metrics span { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
