/* Workspace roles inherit the same brand faces and palette as the home page. */
:root { --sidebar-width: 248px; --ease-out: cubic-bezier(.16,1,.3,1); }
body { font-size: 16px; line-height: 1.6; }
.page-heading { margin-bottom: 34px; align-items: flex-start; }
.page-heading h1 {
  font: 400 36px/1.3 var(--display);
  letter-spacing: -.035em;
  max-width: 26ch;
  text-wrap: balance;
}
.page-heading p { font-size: 14px; line-height: 1.8; max-width: 70ch; margin-top: 14px; }
.page-heading > .button { margin-top: 3px; }

h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.025em; }
.panel-heading { padding-block: 20px; gap: 12px; }
.panel-heading h2, .review-heading h2 { font-size: 18px; line-height: 1.5; }
.preview-name-row h3, .candidate-copy > strong {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.4;
}
.preview-name-row h3 { font-size: 28px; }
.candidate-copy > strong { font-size: 20px; }
.direction-option > strong { font: 400 18px/1.5 var(--display); letter-spacing: -.025em; }
.memory-introduction h2{ font-size: 28px; line-height: 1.45; }
.empty-state h2 { font-size: 24px; line-height: 1.45; }
#account-records > h2, #admin-records h2, .local-feedback-heading h2,
.operations-section h2, .launch-columns h2, .launch-form h2, .operation-plan h2,
.wallet-chooser h2 { font: 400 23px/1.5 var(--display); letter-spacing: -.025em; }

.button {
  min-height: 44px;
  padding: 11px 19px;
  font-size: 14px;
  line-height: 1.4;
  background: var(--fg);
  color: #080808;
  border-color: var(--fg);
}
.button:not(:disabled):hover { background: #cfcfcb; border-color: #cfcfcb; }
.button.outline { color: var(--fg); border-color: #555; }
.button.outline:not(:disabled):hover { background: #171717; border-color: #999; }
.agent-action .button, .editor-footer .button, .draft-row .button,
.review-panel > .button, .account-toolbar .button, .account-row .button {
  min-height: 44px;
  font-size: 13px;
}
.wallet-button { min-height: 44px; font-size: 12px; border-color: #555; }
.nav-item { font-size: 14px; min-height: 44px; }
.workspace-switch strong { font-size: 12px; }
.generation-modes > button { font-size: 13px; min-height: 48px; }
.flow-nav > a, .flow-nav > button { font-size: 12px; }

.composer { background: var(--surface); border-color: #555; }
.composer > label, .field > label, .field-label-row > label { font-size: 13px; }
.composer > textarea, .field input, .field textarea,
.search-box > input, .feedback-submit select, .feedback-submit textarea { font-size: 14px; line-height: 1.75; }
.field input, .field textarea, .input-prefix, .search-box > input { border-color: #555; }
.input-prefix > input { border: 0; }
.field input:disabled { background: var(--surface); }
input::placeholder, textarea::placeholder { color: #999; opacity: 1; }
.composer-footer, .counter, .mode-label { color: var(--muted); }
.preview-description, .memory-introduction p, .empty-state p, .account-row p, .generation-feedback > p:not([hidden]),
.candidate-copy > .candidate-reason { font-size: 14px; line-height: 1.8; }
.preview-identity { padding-block: 28px; }
.preview-details > div { font-size: 12px; }
.preview-ticker, .candidate-copy > .candidate-symbol { font-size: 12px; }
.agent-note h3 { font-size: 14px; }
.agent-note p { font-size: 13px; line-height: 1.8; }
.upload-button strong, .feedback-option strong, .optional-settings summary { font-size: 13px; }
.agent-action > p, .checkout-heading p, .checkout-availability,
.checkout-preview p, .checkout-summary > div { font-size: 13px; line-height: 1.8; }
.checkout-heading h3 { font-size: 18px; font-weight: 500; }
.checkout-pay { font-size: 14px; }
.draft-title h3 { font-size: 16px; }
.account-row strong { font-size: 16px; }
.operation-plan dd { font-variant-numeric: tabular-nums; }
.launch-board { border-block: 1px solid var(--line); }
.board-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.board-table th {
  padding: 18px 0;
  color: var(--muted);
  font: 400 11px/1.6 var(--mono);
  letter-spacing: .04em;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.board-table th:first-child { width: 50%; padding-left: 28px; }
.board-table th:nth-child(2) { width: 25%; }
.board-table th:last-child { width: 25%; text-align: right; padding-right: 28px; }
.board-table td { padding: 0; }
.board-empty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: 242px;
  padding: 42px 28px;
  background: var(--surface);
}
.board-message { display: flex; align-items: flex-start; gap: 20px; max-width: 640px; min-width: 0; }
.board-message > svg { width: 26px; height: 26px; flex-shrink: 0; margin-top: 7px; color: var(--muted); }
.board-message h2 { font: 400 26px/1.45 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.board-message p { max-width: 58ch; margin-top: 12px; color: var(--muted); font: 400 14px/1.8 var(--body); }
.board-actions { display: flex; flex-direction: column; align-items: stretch; gap: 18px; flex-shrink: 0; }
.board-actions .button { justify-content: space-between; gap: 28px; min-height: 44px; }
.board-drafts-link { display: flex; align-items: center; gap: 10px; min-height: 32px; font: 400 13px/1.6 var(--body); color: var(--muted); }
.board-drafts-link svg { width: 14px; height: 14px; transition: transform 180ms var(--ease-out); }
.board-drafts-link:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 5px; }
.board-drafts-link:hover svg { transform: translateX(3px); }
.board-footnote { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 28px; border-top: 1px solid var(--line); color: var(--muted); font: 400 12px/1.7 var(--body); }
.board-footnote .mode-label { font-size: 12px; }
@media (max-width: 1050px) {
  .board-empty-row { align-items: flex-start; gap: 28px; }
  .board-message h2 { font-size: 24px; }
}
@media (max-width: 700px) {
  .board-empty-row { flex-direction: column; padding: 28px 20px; min-height: 0; }
  .board-message { gap: 14px; }
  .board-message > svg { width: 22px; height: 22px; }
  .board-message h2 { font-size: 23px; }
  .board-actions { width: 100%; gap: 12px; }
  .board-actions .button { align-self: flex-start; }
  .board-table th:first-child { padding-left: 20px; }
  .board-table th:last-child { padding-right: 20px; }
  .board-footnote { padding: 16px 20px; }
}
@media (max-width: 380px) {
  .board-message { display: block; }
  .board-message > svg { margin: 0 0 16px; }
  .board-actions .button { align-self: stretch; }
  .board-footnote { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .board-drafts-link svg { transition: none; }
  .board-drafts-link:hover svg { transform: none; }
}
::selection { background: var(--fg); color: #080808; }
:focus-visible { outline-color: var(--fg); }

.sidebar { font-family: var(--display); overflow-y: auto; overscroll-behavior: contain; }
.sidebar-brand { height: 58px; padding-inline: 8px; }
.workspace-switch { margin-top: 24px; padding: 13px 10px; }
.workspace-switch strong { font: 400 14px/1.5 var(--display); }
.workspace-switch div > span { font: 400 12px/1.7 var(--display); }
.workspace-monogram { font: 400 20px/1 var(--display); border-color: #555; }
.sidebar .nav-group-label { font: 400 11px/1.7 var(--display); letter-spacing: .08em; }
.sidebar .nav-item { font: 400 16px/1.5 var(--display); padding: 12px 11px; gap: 10px; }
.sidebar .nav-item > span:not(.nav-count) { min-width: 0; overflow-wrap: anywhere; }
.sidebar .agent-signature strong { font: 400 14px/1.6 var(--display); }
.sidebar .agent-signature p { font: 400 12px/1.8 var(--display); }
.sidebar .storage-indicator { font: 400 11px/1.8 var(--display); }
.sidebar .nav-count { font-family: var(--mono); }
.breadcrumb-root, #breadcrumb-current { font: 400 13px/1.6 var(--display); }
.app-topbar .mobile-brand { display: none; }
.primary-nav { position: relative; isolation: isolate; }
.nav-marker {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #444;
  pointer-events: none;
  transition: transform 260ms var(--ease-out), height 260ms var(--ease-out);
}
.primary-nav.has-marker .nav-item.active { background: transparent; border-color: transparent; }
.nav-item, .nav-item > svg, .nav-item > span {
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 200ms var(--ease-out);
}
@media (hover: hover) {
  .nav-item:hover > span:not(.nav-count) { transform: translateX(3px); }
  .nav-item:hover > svg { color: var(--fg); }
  .button:not(:disabled):hover > svg:last-child { transform: translateX(3px); }
}
.button, .wallet-button, .sample-chip, .direction-option, .icon-button {
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 140ms var(--ease-out);
}
.button > svg { transition: transform 200ms var(--ease-out); }
.button:not(:disabled):active, .wallet-button:active, .sample-chip:active, .direction-option:active { transform: scale(.985); }
.composer, .field input, .field textarea, .input-prefix, .upload-button,
.feedback-submit select, .feedback-submit textarea { transition: border-color 180ms ease, background-color 180ms ease; }
.composer:focus-within, .input-prefix:focus-within { border-color: var(--fg); }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--fg); }
.generation-modes { position: relative; }
.generation-modes.has-indicator > button[aria-pressed=true] { border-bottom-color: transparent; }
.mode-indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--fg);
  pointer-events: none;
  transition: transform 240ms var(--ease-out), width 240ms var(--ease-out);
}
.direction-option[aria-pressed=true] { border-color: #d0d0cb; }
.token-cover { overflow: hidden; }
.sidebar { transition: transform 260ms var(--ease-out); }
.wallet-chooser { animation: chooser-arrive 200ms var(--ease-out); }
@keyframes chooser-arrive {
  from { clip-path: inset(0 0 12px 0); }
  to { clip-path: inset(0); }
}

@media (max-width: 860px) {
  .app-topbar .mobile-brand { display: inline-flex; }
  .app-topbar .mobile-brand .brand-emblem { width: 32px; height: 36px; }
  .app-topbar .mobile-brand .brand-wordmark { width: 58px; height: 28px; }
  .sidebar .nav-item { font-size: 16px; }
}
@media (max-width: 360px) {
  .app-topbar .topbar-left { gap: 6px; }
  .app-topbar .mobile-brand { gap: 0; }
  .app-topbar .mobile-brand .brand-emblem { width: 27px; }
  .app-topbar .mobile-brand .brand-wordmark { width: 47px; }
  .app-topbar .topbar-actions { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-marker, .mode-indicator { transition: none !important; }
  .sidebar, .button, .button > svg, .wallet-button, .sample-chip,
  .direction-option, .icon-button, .nav-item, .nav-item > svg, .nav-item > span {
    transition: color 80ms linear, background-color 80ms linear, border-color 80ms linear !important;
    animation: none !important;
  }
  .nav-item:hover > span:not(.nav-count), .button:not(:disabled):hover > svg:last-child,
  .button:not(:disabled):active, .wallet-button:active, .sample-chip:active, .direction-option:active { transform: none; }
  .wallet-chooser { animation: none; }
}

html[lang='zh-CN'] .page-heading h1,
html[lang='zh-CN'] h2,
html[lang='zh-CN'] .preview-name-row h3,
html[lang='zh-CN'] .candidate-copy > strong { letter-spacing: 0; line-height: 1.5; }

@media (max-width: 1050px) and (min-width: 861px) {
  .page-heading h1 { font-size: 32px; }
  .panel-heading { flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .page-heading { gap: 18px; }
  .page-heading h1 { font-size: 32px; }
  .page-heading > div { min-width: 0; }
  .page-heading > .button { flex-shrink: 0; }
}
@media (max-width: 480px) {
  .page-heading { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 28px; }
  .page-heading h1 { font-size: 30px; max-width: 100%; line-height: 1.35; }
  .page-heading p { font-size: 14px; max-width: 100%; }
  .page-heading > .button { justify-self: start; font-size: 13px; padding: 10px 14px; margin: 0; }
  .panel-heading { flex-wrap: wrap; padding-block: 18px; }
  .panel-heading h2, .review-heading h2 { font-size: 17px; }
  .memory-introduction h2{ font-size: 25px; }
  .preview-name-row h3 { font-size: 27px; }
  .flow-nav { display: grid; grid-template-columns: 1fr 8px 1fr 8px 1fr; gap: 8px; align-items: start; }
  .flow-nav > a, .flow-nav > button { font-size: 12px; white-space: normal; text-align: left; line-height: 1.6; }
  .generation-modes { gap: 20px; }
  .generation-modes > button { font-size: 12px; }
  .agent-action .button, .editor-footer .button, .draft-actions .button { font-size: 13px; }
  .editor-footer { gap: 12px; }
  .wallet-button { font-size: 12px; }
  .workspace-switch strong { font-size: 12px; }
  .composer > textarea, .field input, .field textarea, .search-box > input,
  .feedback-submit select, .feedback-submit textarea, #admin-records textarea,
  .operations-section input, .operations-section select, .operations-section textarea,
  .launch-form input, #launch-workspace .account-row input { font-size: 16px; }
}

/* Keep the save shortcut aligned after retiring the footer tagline. */
.workspace-footer .keyboard-tip { margin-left: auto; }
@media (max-width: 700px) { .workspace-footer { display: none; } }
