:root {
  color-scheme: light;
  --ink: #141827;
  --muted: #626977;
  --accent: #4338ca;
  --accent-hover: #3730a2;
  --accent-soft: #e9eaff;
  --line: #e3e4ec;
  --paper: #fff;
  --canvas: #f8f7f5;
  --sidebar: clamp(225px, 18.36vw, 282px);
  --radius: 14px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}
body[data-role="execution"] { --sidebar: clamp(225px, 19.92vw, 306px); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.55; }
h1, h2, h3, h4, p, dl { margin: 0; }
button, select, input, textarea { color: inherit; font: inherit; }
button { border: 0; background: none; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
select, summary { cursor: pointer; }
a { color: var(--accent-hover); }
img { display: block; max-width: 100%; }
.icon { display: block; flex: 0 0 auto; }
:focus-visible { outline: 3px solid #6a60dc; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 20; top: 12px; left: 12px; padding: 9px 14px; background: white; border-radius: 8px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.sidebar { width: var(--sidebar); position: fixed; z-index: 4; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 21px 13px 15px; background: #f7f6f4; border-right: 1px solid #e2e2e7; }
.brand { display: flex; align-items: center; gap: 15px; padding: 2px 12px 25px; white-space: nowrap; }
.brand img { width: 45px; height: 45px; border-radius: 12px; }
.brand strong { font-size: clamp(18px, 1.82vw, 28px); font-weight: 760; letter-spacing: -.035em; }
#navigation { overflow: auto; padding: 2px 0 10px; }
.nav-item, .nav-child { width: 100%; min-height: 60px; border-radius: 9px; display: flex; align-items: center; gap: 17px; padding: 9px 16px; text-align: left; font-size: clamp(16px, 1.42vw, 22px); white-space: nowrap; }
.nav-item .icon { width: 27px; height: 27px; }
.nav-item:hover, .nav-child:hover { background: #efedf9; }
.nav-item[aria-current], .nav-child[aria-current] { color: var(--accent-hover); background: var(--accent-soft); font-weight: 660; }
.nav-parent .indicator { margin-left: auto; width: 17px; height: 17px; color: var(--muted); }
.nav-parent[aria-expanded="true"] .indicator { transform: rotate(180deg); }
.nav-children { position: relative; margin: 0 0 16px 31px; padding-left: 22px; }
.nav-children::before { content: ""; position: absolute; top: 1px; bottom: 23px; left: 0; width: 1px; background: #ced0da; }
.nav-child { min-height: 46px; position: relative; padding: 6px 6px 6px 20px; font-size: clamp(15px, 1.32vw, 20px); }
.nav-child::before { content: ""; position: absolute; width: 17px; height: 1px; background: #ced0da; left: -22px; top: 50%; }
.nav-child::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #bfc2cd; position: absolute; top: calc(50% - 2px); left: -9px; }
.role-dock { margin-top: auto; position: relative; }
.role-trigger { display: flex; align-items: center; width: 100%; gap: 12px; text-align: left; min-height: 66px; border: 1px solid transparent; border-radius: 12px; padding: 8px 10px; }
.role-trigger:hover, .role-trigger[aria-expanded="true"] { background: var(--paper); border-color: var(--line); }
.avatar { background: #e3e4e9; color: #727782; display: grid; place-items: center; width: 47px; height: 47px; flex: 0 0 auto; border-radius: 50%; }
.avatar .icon { width: 29px; height: 29px; }
.role-info { flex: 1; min-width: 0; display: grid; }
.role-info strong { font-size: 18px; font-weight: 690; white-space: nowrap; }
.role-info > span { font-size: 14px; color: var(--muted); }
.role-arrow { width: 18px; height: 18px; color: var(--muted); }
.role-menu { position: absolute; bottom: calc(100% + 10px); left: 5px; right: 5px; z-index: 6; padding: 8px; background: white; border: 1px solid #d9dbe2; border-radius: 12px; box-shadow: 0 3px 18px #2430581b; }
.role-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 45px; text-align: left; padding: 6px 12px; border-radius: 8px; }
.role-menu button[aria-pressed="true"], .role-menu button:hover { background: var(--accent-soft); }
.role-menu .icon { width: 18px; height: 18px; color: var(--accent); }
.role-menu button[aria-pressed="false"] .icon { visibility: hidden; }
.page { min-width: 0; margin-left: var(--sidebar); padding: 26px 25px 33px 27px; }
body[data-view="broadcast"] .page { padding-top: clamp(31px, 4.5vw, 69px); padding-left: 28px; }
.main-heading { margin-bottom: 19px; }
.main-heading h1 { font-size: clamp(27px, 3vw, 42px); line-height: 1.22; letter-spacing: -.028em; font-weight: 760; }
.main-heading p { color: var(--muted); margin-top: 7px; }
.surface { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(17px, 2vw, 28px); min-width: 0; }
.primary-button, .secondary-button { min-height: 44px; border-radius: 10px; padding: 8px 15px; font-weight: 650; border: 1px solid var(--accent); text-decoration: none; }
.primary-button { background: var(--accent); color: white; }
.primary-button:hover { background: var(--accent-hover); }
.secondary-button { background: white; color: var(--accent-hover); }
.secondary-button:hover { background: var(--accent-soft); }
.form-actions, .suggestions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-top: 13px; }
.form-label { display: block; font-weight: 650; margin-bottom: 7px; }
:where(textarea, input[type="search"], input[type="text"], select) { width: 100%; min-height: 44px; border: 1px solid #cfd3e1; border-radius: 10px; padding: 8px 12px; background: var(--paper); }
textarea { display: block; min-height: 105px; resize: vertical; }
::placeholder { color: #687288; }
.suggestion { min-height: 43px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; color: var(--accent-hover); background: #f6f6ff; text-align: left; }
.result-card, .notice, .empty-state { margin-top: 14px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 11px; background: #f6f6ff; }
.result-card h2, .result-card h3 { font-size: 19px; }
.result-card p { margin-top: 6px; overflow-wrap: anywhere; white-space: pre-wrap; }
.source-note, .field-note { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
[role="status"]:empty { display: none; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin-top: 14px; }
.product-card { border: 1px solid var(--line); border-radius: 10px; background: white; padding: 15px; display: grid; gap: 8px; text-align: left; }
.product-card[aria-pressed="true"], .product-card:hover { border-color: #aaa6e9; background: #f3f2ff; }
.product-card .source-note { margin-top: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 9px; margin-top: 12px; }
.detail-grid > div { background: white; border: 1px solid var(--line); border-radius: 9px; padding: 12px; }
.detail-grid dt { font-size: 14px; color: var(--muted); }
.detail-grid dd { margin: 4px 0 0; }
.issue-form { display: grid; gap: 8px; margin-top: 15px; }
@media (prefers-reduced-motion: no-preference) { button, a { transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; } }

@media (max-width: 750px) {
  .sidebar { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 13px; }
  .brand { padding: 0 3px 6px; gap: 8px; }
  .brand img { width: 33px; height: 33px; border-radius: 8px; }
  .brand strong { font-size: 17px; }
  #navigation { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; overflow: visible; }
  .nav-item, .nav-child { min-height: 44px; width: auto; gap: 6px; padding: 5px 8px; font-size: 14px; }
  .nav-item .icon { width: 17px; height: 17px; }
  .nav-group { position: relative; }
  .nav-children { display: flex; flex-wrap: wrap; margin: 0; padding: 0 2px; }
  .nav-child { color: var(--muted); }
  .nav-children::before, .nav-child::before, .nav-child::after { content: none; }
  .role-dock { position: fixed; z-index: 8; bottom: 10px; left: 12px; width: 182px; }
  .role-trigger { background: white; border-color: var(--line); min-height: 52px; padding: 4px 8px; box-shadow: 0 3px 16px #24305815; }
  .avatar { width: 36px; height: 36px; }
  .avatar .icon { width: 23px; height: 23px; }
  .role-info strong { font-size: 14px; }
  .role-info > span { font-size: 12px; }
  .page, body[data-view="broadcast"] .page { margin-left: 0; padding: 18px 13px 86px; }
}

@media (min-width: 751px) { body[data-role="execution"] #navigation { padding-top: 19px; } }

.role-account { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 4px; }
.role-account button { color: var(--accent-hover); font-weight: 650; }
.account-entry-status { padding: 0 12px; color: var(--muted); font-size: 13px; }
