:root {
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #152A3D;
  background: #F5F8FA;
  font-synthesis: none;
  --ink: #152A3D;
  --muted: #5B7186;
  --line: #E3EAF0;
  --accent: #7BC043;
  --accent-dark: #3B6D11;
  --accent-soft: #EAF6E0;
  --navy: #17395C;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
a { color: var(--accent-dark); }
button, input { font: inherit; }
[hidden] { display: none !important; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.logo-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px max(28px, calc((100vw - 1220px) / 2)); border-bottom: 1px solid var(--line); background: #fff; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); font-size: 18px; font-weight: 700; line-height: 1.25; text-decoration: none; white-space: nowrap; }
.brand-mark { flex: 0 0 34px; width: 34px; height: 42px; }
.brand small { display: block; margin-top: 2px; color: #8AA2B8; font-size: 12px; font-weight: 500; letter-spacing: .06em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 10px 25px; font-size: 14px; font-weight: 500; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover, .links a:hover, .public-tool:hover { text-decoration: underline; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); align-items: center; gap: clamp(40px, 7vw, 115px); max-width: 1220px; min-height: calc(100vh - 134px); margin: auto; padding: 70px 28px 95px; }
.intro { max-width: 590px; }
.eyebrow { color: var(--accent-dark); font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.intro h1 { margin: 20px 0 21px; font-size: clamp(38px, 4.8vw, 62px); line-height: 1.16; letter-spacing: -.04em; }
.intro h1 em { color: var(--accent-dark); font-style: normal; }
.intro > p { max-width: 530px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.story-points { display: grid; gap: 18px; margin-top: 42px; }
.story-points > div { display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; align-items: baseline; }
.story-points span { grid-row: span 2; color: var(--accent-dark); font-size: 11px; font-weight: 800; }
.story-points strong { font-size: 13px; }
.story-points small { margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.public-tool { display: inline-block; margin-top: 31px; font-size: 12px; font-weight: 800; text-decoration: none; }

.panel { min-width: 0; padding: 31px 33px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 18px 48px #0D213712; }
.auth-switch { display: flex; gap: 22px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.auth-switch a { margin-bottom: -1px; padding: 0 0 12px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13px; font-weight: 750; text-decoration: none; }
.auth-switch a[aria-current="page"] { border-color: var(--accent); color: var(--ink); }
.panel h2 { margin: 0 0 8px; font-size: 29px; letter-spacing: -.03em; }
.panel h3 { margin: 26px 0 14px; font-size: 17px; }
.subhead { margin: 0 0 26px; color: var(--muted); font-size: 13px; line-height: 1.7; }
form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; font-size: 12px; font-weight: 750; }
input { width: 100%; min-height: 45px; padding: 10px 13px; border: 1px solid #C4D6E4; border-radius: 9px; background: #fff; color: var(--ink); }
button { min-height: 43px; padding: 10px 16px; border: 1px solid var(--navy); border-radius: 9px; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
button:hover { background: #1E4A75; }
button:disabled { cursor: not-allowed; opacity: .55; }
button.danger { border-color: #aa4e46; background: #aa4e46; }
button.danger:hover { background: #873a34; }
.hint { margin: 1px 0 2px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.agreement { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.7; }
.agreement input { flex: 0 0 17px; width: 17px; min-height: 17px; margin: 1px 0 0; accent-color: var(--accent-dark); }
.agreement span { min-width: 0; }
.links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 23px; font-size: 12px; font-weight: 750; }
.notice { margin: 0 0 22px; padding: 12px 14px; border: 1px solid #CDE6BD; border-radius: 9px; background: var(--accent-soft); color: #3C7020; font-size: 12px; line-height: 1.6; }
.notice.error { border-color: #e8c6c0; background: #fff0ec; color: #923329; }
footer { padding: 20px; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
footer a { margin-left: 5px; }

body.legal-view .layout { display: block; max-width: 940px; min-height: calc(100vh - 134px); padding-top: 45px; }
body.legal-view .intro, body.legal-view .auth-switch { display: none; }
body.legal-view .panel { padding: clamp(26px, 5vw, 52px); }
.legal-copy h2 { margin: 14px 0 4px; }
.legal-copy h3 { margin: 26px 0 8px; }
.legal-copy p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.legal-copy .legal-meta { margin-bottom: 28px; font-size: 11px; }
.legal-copy .back-link { display: inline-block; }

body.account-view { background: #F5F8FA; }
body.account-view .layout { grid-template-columns: 92px minmax(0, 1fr); align-items: stretch; gap: 0; max-width: none; min-height: calc(100vh - 71px); padding: 0; }
body.account-view .intro, body.account-view .auth-switch, body.account-view footer { display: none; }
.workspace-nav { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 24px 7px; background: #0D2137; color: #D7E3EE; }
.workspace-mark { width: 35px; height: 45px; padding: 2px; border-radius: 6px; background: #fff; }
.workspace-nav nav { display: grid; gap: 6px; width: 100%; margin-top: 46px; }
.workspace-nav nav a, .workspace-nav .nav-pending { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; min-height: 64px; border-radius: 9px; color: #D7E3EE; font-size: 10px; font-weight: 700; text-align: center; text-decoration: none; }
.workspace-nav nav a span, .workspace-nav .nav-pending span { font-size: 20px; font-weight: 500; }
.workspace-nav nav a:hover, .workspace-nav nav a[aria-current="page"] { background: #17395C; color: #fff; box-shadow: inset 3px 0 var(--accent); }
.workspace-nav .nav-pending { color: #8AA2B8; cursor: not-allowed; }
.nav-foot { margin-top: auto; color: #8AA2B8; font-size: 10px; writing-mode: vertical-rl; }
body.account-view .panel { width: 100%; max-width: 1560px; margin: 0 auto; padding: 36px clamp(26px, 4vw, 64px) 70px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 25px; }
.breadcrumb { color: var(--muted); font-size: 11px; font-weight: 750; }
.workspace-heading h2 { margin: 8px 0 5px; font-size: clamp(26px, 2.7vw, 34px); }
.workspace-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.account-ident { display: flex; align-items: center; gap: 10px; max-width: 360px; min-width: 0; }
.account-ident strong { display: block; overflow-wrap: anywhere; font-size: 11px; }
.avatar { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 13px; font-weight: 800; }
.text-action { min-height: 0; padding: 3px 0; border: 0; background: transparent; color: var(--accent-dark); font-size: 11px; font-weight: 750; }
.text-action:hover { background: transparent; text-decoration: underline; }
.privacy-banner { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 0 0 25px; padding: 12px 15px; border: 1px solid #CDE6BD; border-radius: 9px; background: var(--accent-soft); color: #3C7020; font-size: 11px; line-height: 1.6; }
.privacy-banner > span { font-size: 16px; }
.command-strip { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 17px; padding: 23px 25px; border-radius: 13px; background: #14304A; color: #fff; }
.command-strip .eyebrow { color: #A6D477; }
.command-strip h3 { margin: 6px 0 5px; font-size: 22px; }
.command-strip p { margin: 0; color: #B9CBDD; font-size: 11px; line-height: 1.6; }
.command-status { flex: 0 0 auto; padding: 8px 11px; border: 1px solid #5C7A99; border-radius: 99px; color: #D7E3EE; font-size: 10px; font-weight: 700; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.surface { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 6px 22px #0D213709; }
.surface h3 { margin: 5px 0 14px; font-size: 17px; }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-heading h3 { margin: 5px 0 15px; font-size: 19px; }
.small-muted { color: var(--muted); font-size: 11px; }
.table-head { display: grid; grid-template-columns: minmax(160px, 1fr) 120px 90px; gap: 12px; padding: 11px 10px; border-top: 1px solid var(--line); background: #F5F8FA; color: var(--muted); font-size: 10px; font-weight: 800; }
.empty-state { display: grid; justify-items: center; padding: 68px 20px; color: var(--muted); text-align: center; }
.empty-state > span { color: #AFC7D9; font-size: 30px; }
.empty-state strong { margin: 9px 0 5px; color: var(--ink); font-size: 14px; }
.empty-state p { max-width: 450px; margin: 0; font-size: 11px; line-height: 1.8; }
.dashboard-rail { display: grid; gap: 15px; }
.dashboard-rail .surface { padding: 19px; }
.dashboard-rail h3 { font-size: 16px; }
.tool-list { display: grid; }
.tool { display: grid; gap: 7px; padding: 12px 0; border-top: 1px solid var(--line); }
.tool strong { font-size: 11px; }
.state { font-size: 11px; font-weight: 750; }
.state.valid { color: var(--accent-dark); }
.state.expired { color: #995820; }
.state.none { color: var(--muted); }
.future-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); font-size: 12px; font-weight: 700; }
.future-row span { color: var(--muted); font-size: 10px; font-weight: 600; }
.dashboard-rail .hint { margin-top: 13px; }
.back-link { font-size: 12px; font-weight: 800; text-decoration: none; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; align-items: start; }
.settings-card { padding: 23px; }
.settings-card h3 { margin: 7px 0 21px; }
.settings-card .hint { margin: -9px 0 15px; }
.settings-card form { gap: 15px; }
.settings-card button { width: 100%; margin-top: 5px; }

@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; padding: 17px 20px; }
  .layout { grid-template-columns: 1fr; gap: 28px; min-height: auto; padding: 28px 17px 50px; }
  .intro { padding: 0 3px; }
  .intro h1 { margin: 10px 0; font-size: 37px; }
  .story-points { margin-top: 25px; }
  .panel { grid-row: 1; padding: 25px 21px; }
  body.account-view .layout { display: block; }
  .workspace-nav { display: block; padding: 14px 16px; }
  .workspace-mark, .nav-foot { display: none; }
  .workspace-nav nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; margin: 0; }
  .workspace-nav nav a, .workspace-nav .nav-pending { min-height: 53px; padding: 5px 0; font-size: 10px; }
  .workspace-nav nav a span, .workspace-nav .nav-pending span { font-size: 16px; }
  body.account-view .panel { padding: 25px 16px 55px; }
  .workspace-heading { align-items: flex-start; }
  .account-ident { max-width: 150px; }
  .command-strip { flex-wrap: wrap; }
  .dashboard-rail { grid-template-columns: 1fr; }
  .table-head { display: none; }
}
@media (max-width: 420px) {
  .workspace-heading { display: block; }
  .account-ident { max-width: none; margin-top: 16px; }
  .empty-state { padding: 48px 13px; }
}
