:root {
  --ink: #202b3b;
  --heading: #192435;
  --muted: #5f6b7a;
  --line: #dce2e8;
  --field-line: #c7d0da;
  --paper: #fff;
  --canvas: #f4f6f8;
  --sidebar: #f8f9fa;
  --surface-hover: #faf7f2;
  --gold: #8b5e2b;
  --gold-dark: #70471d;
  --gold-soft: #f6f1ea;
  --gold-line: #ded1c0;
  --positive: #147a55;
  --positive-soft: #edf8f3;
  --danger: #8b2925;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "STSong", serif;
  --page-width: 1120px;
  --page-title: clamp(26px, 2.6vw, 32px);
  --section-gap: clamp(22px, 2.7vw, 32px);
  --surface-radius: 12px;
  --control-radius: 8px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: var(--canvas); line-height: 1.5; }
[hidden] { display: none !important; }
:where(button, textarea, input, select) { font: inherit; }
:where(input:not([type="checkbox"], [type="radio"]), select, textarea) {
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--field-line);
  border-radius: var(--control-radius);
  background: var(--paper);
  color: var(--ink);
}
:where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--gold); }
:where(textarea) { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type="file"]::file-selector-button {
  margin-inline-end: 9px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--sidebar);
  color: var(--ink);
  cursor: pointer;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1[tabindex="-1"]:focus { outline: none; }
h1, p { margin: 0; }
.subtle { color: var(--muted); }
.error { color: var(--danger); line-height: 1.55; overflow-wrap: anywhere; }
.ui-icon { display: block; flex: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.brand { display: flex; gap: 11px; align-items: center; }
.brand strong { display: block; font-size: 18px; font-weight: 650; }
.brand-copy { min-width: 0; }
.brand-copy small { display: block; margin-top: 2px; color: var(--gold-dark); font-size: 10px; letter-spacing: .09em; white-space: nowrap; }
.mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  background: linear-gradient(145deg, #c1915b, #87551f);
  color: var(--paper);
  border-radius: 11px;
  font: 600 23px Georgia, serif;
}
.primary, .outline, .text-button {
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  padding: 9px 15px;
  min-height: 40px;
}
a:is(.primary, .outline) { display: inline-flex; align-items: center; justify-content: center; }
.primary { background: var(--gold); color: var(--paper); font-weight: 600; }
.primary:hover:not(:disabled) { background: var(--gold-dark); }
.outline { background: var(--paper); border-color: var(--field-line); color: var(--ink); }
.outline:hover { background: var(--surface-hover); }
.text-button { color: var(--gold); background: transparent; padding-inline: 0; }
.text-button:hover { text-decoration: underline; }
.guest-home {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 50% 19%, #f3e8d7, transparent 60%),
    linear-gradient(155deg, #fdfbf7 10%, #f8f9fb 88%);
}
.guest-home::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(680px, 90dvh);
  background-image:
    linear-gradient(rgb(122 95 62 / 7%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(122 95 62 / 7%) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center top;
  mask-image: radial-gradient(ellipse at 50% 36%, #000, transparent 70%);
  pointer-events: none;
}
.guest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(calc(100% - clamp(32px, 8vw, 112px)), 1280px);
  margin-inline: auto;
  padding-block: 14px;
  border-bottom: 1px solid rgb(139 94 43 / 16%);
}
.guest-actions { display: flex; gap: clamp(8px, 2vw, 18px); align-items: center; white-space: nowrap; }
.guest-actions button { min-height: 44px; }
.guest-bar .outline { border-color: var(--gold-line); background: rgb(255 255 255 / 70%); }
.guest-bar .outline:hover { background: var(--paper); }
.guest-main {
  width: min(calc(100% - 32px), 744px);
  margin-inline: auto;
  padding: clamp(56px, 13svh, 138px) 0 40px;
}
.guest-main .welcome { margin: 0 0 clamp(24px, 4vh, 36px); padding: 0; }
.guest-main .welcome::before, .guest-main .welcome-brand::after { content: none; }
.guest-main .welcome-brand {
  padding: 5px 10px;
  border: 1px solid rgb(139 94 43 / 18%);
  border-radius: 999px;
  background: rgb(255 255 255 / 52%);
}
.guest-main .welcome-brand::before { width: 6px; height: 6px; border-radius: 50%; background: #a67643; }
.guest-main .welcome h1 { margin-top: 16px; font-size: clamp(27px, 4.5vw, 54px); }
.guest-main .welcome-slogan { margin-top: 12px; font-size: clamp(14px, 1.6vw, 17px); }
.guest-main .composer-frame {
  border-color: #ded2c1;
  background: var(--paper);
  box-shadow: 0 18px 48px rgb(52 43 32 / 8%), 0 2px 6px rgb(52 43 32 / 4%);
}
.guest-main .composer-frame:focus-within { border-color: #a87948; }
.guest-main .composer textarea {
  min-height: 96px;
  padding: 17px 18px 8px;
  font-size: 16px;
  resize: none;
}
.guest-main .composer textarea:focus-visible { outline: none; }
.guest-main .composer-frame:has(textarea:focus-visible) {
  outline: 2px solid #a87948;
  outline-offset: 3px;
}
.guest-main .composer-toolbar { flex-wrap: nowrap; gap: 8px; padding: 4px 12px 12px 18px; }
.guest-main .composer-actions { flex: none; }
#guest-continuation { color: var(--muted); font-size: 12px; line-height: 1.45; }
#guest-submit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding-inline: 13px;
  border-radius: 10px;
  background: #26364a;
  white-space: nowrap;
}
#guest-submit:hover:not(:disabled) { background: #394c63; }
#guest-submit .ui-icon { width: 16px; height: 16px; }
.guest-main .error { margin-top: 12px; }
@media (max-width: 520px) {
  .guest-bar { padding-block: 10px; }
  .guest-bar .brand { gap: 8px; }
  .guest-bar .mark { width: 34px; height: 34px; }
  .guest-main { padding-top: clamp(52px, 10svh, 88px); }
  .guest-main .welcome h1 { font-size: clamp(24px, 7vw, 32px); }
  .guest-main .composer textarea { padding-inline: 14px; }
  .guest-main .composer-toolbar { padding-inline: 12px 10px; }
}
@media (max-width: 300px) {
  .guest-bar .brand-copy small { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes guest-appear {
    from { opacity: .3; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .guest-main .welcome { animation: guest-appear .4s ease-out both; }
  .guest-main .composer-frame {
    animation: guest-appear .45s .06s ease-out both;
    transition: border-color .18s ease, box-shadow .18s ease;
  }
  #guest-submit { transition: background-color .18s ease; }
  #guest-submit .ui-icon { transition: transform .18s ease; }
  #guest-submit:hover:not(:disabled) .ui-icon { transform: translateX(2px); }
}
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(330px, 1.05fr) minmax(0, .95fr); }
.auth-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  overflow: hidden;
  padding: clamp(32px, 5vw, 72px);
  color: var(--paper);
  background: linear-gradient(145deg, #172338, #263c57 58%, #8f6338);
}
.auth-intro::before, .auth-intro::after {
  content: '';
  position: absolute;
  right: -210px;
  bottom: -210px;
  width: 590px;
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 50%;
  pointer-events: none;
}
.auth-intro::after { right: -109px; bottom: -109px; width: 390px; }
.auth-intro > * { position: relative; z-index: 1; }
.auth-intro .mark { width: 46px; height: 46px; border-radius: 13px; font-size: 27px; }
.auth-intro .brand strong { font-size: 22px; }
.auth-intro .brand-copy small { color: #e1e6ec; font-size: 12px; }
.intro-copy { max-width: 36rem; }
.intro-slogan { font: 500 clamp(34px, 4vw, 55px)/1.25 var(--serif); letter-spacing: .06em; }
.intro-description { margin-top: 24px; color: #e1e6ec; font-size: 16px; line-height: 1.8; }
.auth-capabilities { display: flex; flex-wrap: wrap; gap: 10px 24px; list-style: none; padding: 0; margin: 0; color: #e1e6ec; font-size: 13px; }
.auth-panel { display: grid; place-items: center; padding: 32px clamp(26px, 6vw, 80px); background: var(--paper); }
.auth-form { display: flex; flex-direction: column; width: min(100%, 420px); }
.auth-form h1 { font: 600 var(--page-title)/1.32 var(--serif); }
.auth-form > .subtle { margin: 9px 0 16px; line-height: 1.6; }
.auth-form label { display: block; font-size: 14px; font-weight: 600; margin-block: 13px 6px; }
.auth-form input { width: 100%; min-height: 48px; padding: 11px 13px; }
.auth-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.auth-form #registration-code-status:not(:empty) { margin-top: 6px; font-size: 13px; }
.auth-form #password-help { font-size: 13px; margin-bottom: 0; }
.auth-form .error { margin-top: 10px; }
.auth-form .primary { margin-top: 21px; min-height: 48px; border-radius: 10px; }
.auth-form .text-button { align-self: flex-start; }
.auth-form .auth-home { color: var(--muted); }
.workbench { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100dvh; }
.compact-bar { display: none; }
.sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 14px;
  background: linear-gradient(180deg, var(--paper), #fbfaf7);
  border-right: 1px solid var(--line);
}
.sidebar-brand { flex: none; min-height: 46px; gap: 9px; margin: 0 1px 16px; }
.sidebar-brand .mark { width: 36px; height: 36px; }
.sidebar-collapse {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-inline-start: auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}
.sidebar-collapse:hover { border-color: var(--line); background: var(--paper); color: var(--ink); }
.sidebar-collapse .ui-icon { width: 21px; height: 21px; }
.sidebar-collapse-direction { transform-box: fill-box; transform-origin: center; }
.sidebar-collapse[aria-expanded="false"] .sidebar-collapse-direction { transform: scaleX(-1); }
.nav { flex: 1; min-height: 0; overflow: auto; }
.nav :is(a, button):focus-visible { outline-offset: -2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 6px;
  padding: 9px 10px;
  min-height: 40px;
  color: var(--muted);
}
.nav-item > .ui-icon { flex: 0 0 19px; }
.nav-item:hover, #recent-list a:hover { color: var(--gold-dark); background: var(--surface-hover); }
.nav-item[aria-current="page"], .nav-item[aria-current="page"]:hover { color: var(--gold-dark); background: var(--gold-soft); font-weight: 600; }
.nav-item.nav-new { min-height: 46px; margin-bottom: 16px; padding-inline: 12px; background: linear-gradient(135deg, #9c6b32, var(--gold-dark)); color: var(--paper); font-weight: 600; box-shadow: 0 4px 12px rgb(91 55 20 / 10%); }
.nav-item.nav-new:hover { background: var(--gold-dark); }
.nav-group + .nav-group { margin-block-start: 12px; }
.nav-group-label { margin: 0 10px 5px; color: var(--muted); font-size: 12px; }
.nav-group .nav-item { min-height: 42px; }
.sidebar-history { margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.sidebar-history-heading { position: relative; }
.sidebar-history-heading .nav-item { padding-inline-end: 42px; }
.history-disclosure { position: absolute; inset: 3px 4px auto auto; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 21px; }
.history-disclosure:hover { background: var(--surface-hover); color: var(--gold-dark); }
.history-disclosure[aria-expanded="true"] span { transform: rotate(90deg); }
.sidebar-history-empty { padding: 12px; color: var(--muted); text-align: center; font-size: 13px; }
#recent-list, .history-list { list-style: none; padding: 0; margin: 0; }
#recent-list a { display: block; padding: 8px 10px 8px 40px; border-radius: 7px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#recent-list a[aria-current="page"] { color: var(--gold-dark); background: var(--gold-soft); }
.sidebar-footer { flex: none; margin-top: 8px; padding-top: 9px; border-top: 1px solid var(--line); }
.sidebar-account { display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 6px 8px; border-radius: 9px; }
.sidebar-account:hover { background: var(--surface-hover); }
.sidebar-account[aria-current="page"] { background: var(--gold-soft); }
.sidebar-account-avatar { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border: 1px solid var(--gold-line); border-radius: 50%; background: var(--gold-soft); color: var(--gold-dark); font-size: 13px; font-weight: 600; }
.sidebar-account-copy { display: grid; flex: 1; min-width: 0; gap: 2px; }
.sidebar-account-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.sidebar-account-copy small { color: var(--muted); font-size: 12px; }
.sidebar-account > .ui-icon { width: 17px; height: 17px; color: var(--muted); }
main { min-width: 0; }
.workbench > main { padding: 32px clamp(20px, 3vw, 32px) 48px; background: var(--canvas); }
.conversation { width: min(100%, 1040px); margin-inline: auto; }
.welcome { position: relative; isolation: isolate; margin: clamp(18px, 4vh, 38px) auto 17px; padding: 6px 0; text-align: center; }
.welcome::before { content: ''; position: absolute; inset: -50px 0 -28px; z-index: -1; background: radial-gradient(ellipse at 50% 25%, rgb(188 141 81 / 13%), transparent 70%); pointer-events: none; }
.welcome-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-dark); font-size: 12px; font-weight: 600; letter-spacing: .12em; }
.welcome-brand::before, .welcome-brand::after { content: ''; width: 22px; height: 1px; background: var(--gold-line); }
.welcome-brand .mark { width: 21px; height: 21px; border-radius: 6px; font-size: 13px; }
.welcome h1 { margin: 13px 0 0; color: var(--heading); font: 400 clamp(28px, 4.2vw, 50px)/1.25 var(--serif); letter-spacing: -.035em; text-wrap: balance; }
.welcome-slogan { margin-top: 11px; color: var(--muted); line-height: 1.7; }
.composer-frame {
  position: relative;
  border: 1px solid var(--gold-line);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--paper), #fffdfb);
  box-shadow: 0 18px 46px rgb(42 35 27 / 8%), 0 2px 8px rgb(42 35 27 / 3%);
}
.composer-frame::before { content: ''; position: absolute; inset: -1px 12% auto; height: 1px; background: linear-gradient(90deg, transparent, #c5a071, transparent); pointer-events: none; }
.composer-frame:focus-within { border-color: #c4aa87; }
.composer { border-radius: inherit; }
.composer textarea { display: block; width: 100%; min-height: 132px; max-height: 45dvh; border: 0; border-radius: inherit; padding: 18px 20px 9px; line-height: 1.65; background: transparent; }
.composer textarea:focus-visible { outline-offset: -4px; }
.composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
  padding: 6px 13px 12px;
}
.composer-tools, .composer-actions { display: flex; align-items: center; min-width: 0; }
.composer-tools { gap: 3px; }
.composer-actions { gap: 9px; margin-inline-start: auto; }
.composer-workspace { display: flex; align-items: center; padding: 4px 12px; border-top: 1px solid var(--line); border-radius: 0 0 19px 19px; background: #fbf9f5; }
.composer-templates { margin-top: 32px; }
.composer-templates > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.composer-templates h2 { margin: 0; font: 500 20px/1.4 var(--serif); }
.composer-templates a { padding: 6px 2px; color: var(--gold-dark); font-size: 13px; }
.composer-templates a:hover { text-decoration: underline; text-underline-offset: 3px; }
.composer-template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr)); gap: 12px; }
.composer-template-grid button { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; min-height: 88px; gap: 11px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--surface-radius); background: var(--paper); color: var(--ink); text-align: start; }
.composer-template-grid button:hover { border-color: var(--gold-line); background: var(--surface-hover); }
.template-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--gold-soft); color: var(--gold-dark); }
.composer-template-grid strong { display: block; font-size: 14px; font-weight: 600; }
.composer-template-grid small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.composer-options > details:not([open]), .composer-accessory:not([open]) { display: none; }
.composer-options > details {
  margin: 6px 16px 9px;
  padding: 0 12px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--canvas);
}
.composer-options summary, .composer-accessory summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.composer-options summary::-webkit-details-marker, .composer-accessory summary::-webkit-details-marker { display: none; }
.composer-options summary span, .composer-accessory summary span { color: var(--muted); font-size: 12px; font-weight: 400; }
.composer-options .web-search-choice { margin: 0 16px 6px; }
.send { display: grid; flex: none; place-items: center; width: 40px; min-height: 40px; padding: 0; }
.send .ui-icon { width: 19px; height: 19px; stroke-width: 2; }
.composer:has(#draft:placeholder-shown) .send, .composer .send:disabled { background: var(--gold-soft); color: var(--muted); opacity: 1; }
.conversation-status { min-height: 1.5rem; padding: 8px 3px; font-size: 13px; }
.conversation-status:empty { margin: 0; min-height: 0; padding: 0; }
.conversation-status[data-running="true"]::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-inline-end: 7px; border-radius: 50%; background: var(--gold); vertical-align: 1px; }
.conversation-history { padding-top: 15px; }
.conversation-history h1, .panel h1 { color: var(--heading); font: 400 var(--page-title)/1.42 var(--serif); overflow-wrap: anywhere; }
.messages { display: flex; flex-direction: column; gap: 21px; margin-block: 26px; }
.message { min-width: 0; padding: 12px 15px; border-radius: 11px; max-width: 94%; }
.message-user { align-self: flex-end; background: var(--gold-soft); }
.message-assistant { align-self: flex-start; border: 1px solid var(--line); background: var(--paper); }
.message-artifact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
  margin-bottom: 13px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.message p { margin-top: 5px; overflow-wrap: anywhere; line-height: 1.68; }
.message-user .message-body { margin: 0; white-space: pre-wrap; }
.message-markdown { line-height: 1.68; overflow-wrap: anywhere; }
.message-markdown > * { margin-block: 0 10px; }
.message-markdown > :first-child { margin-top: 0; }
.message-markdown > :last-child { margin-bottom: 0; }
.message-markdown :is(h1, h2, h3, h4, h5, h6) { font: 650 1.08em/1.45 var(--sans); }
.message-markdown h1 { font-size: 1.25em; }
.message-markdown a[href] { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; }
.message-markdown :is(ol, ul) { padding-inline-start: 1.6em; }
.message-markdown blockquote { margin-inline: 0; padding-inline-start: 12px; border-inline-start: 2px solid var(--gold-line); color: var(--muted); }
.message-markdown pre { padding: 10px 12px; border-radius: 7px; background: var(--sidebar); overflow: auto; }
.message-markdown code { padding: 1px 4px; border-radius: 4px; background: var(--sidebar); font-size: .9em; }
.message-markdown pre code { padding: 0; }
.message-markdown table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.message-markdown :is(th, td) { padding: 5px 8px; border: 1px solid var(--line); }
.message-markdown th { background: var(--sidebar); }
.turn-execution { align-self: flex-start; width: min(100%, 660px); padding: 2px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--sidebar); font-size: 13px; }
.turn-execution summary { padding: 6px 0; cursor: pointer; }
.turn-execution summary > span:first-child { margin-inline-start: 4px; color: var(--ink); font-weight: 600; }
.turn-execution-state { margin-inline-start: 10px; font-variant-numeric: tabular-nums; }
.turn-execution-steps { margin: 0 0 8px; padding-inline-start: 25px; }
.turn-execution-steps > li { padding: 6px 0; border-top: 1px solid var(--line); }
.turn-execution-steps > li > span + span { margin-inline-start: 8px; }
.turn-execution-steps .message-assistant {
  max-width: none;
  margin: 7px 0 3px;
  padding: 0 0 0 10px;
  border: 0;
  border-inline-start: 2px solid var(--gold-line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}
.panel { max-width: var(--page-width); margin: 13px auto 24px; }
.page-heading { margin-bottom: var(--section-gap); }
.page-heading .subtle { max-width: 66ch; margin-top: 8px; line-height: 1.65; }
.history-page-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 18px; }
.history-page-heading > .outline { gap: 7px; color: var(--muted); }
.section-heading { margin: 0 0 10px; font: 600 18px/1.45 var(--sans); }
.panel-section + .panel-section { margin-top: var(--section-gap); }
.panel-section:has(> h2[hidden]) { display: none; }
.surface, .empty-state { padding: clamp(16px, 2.5vw, 24px); border: 1px solid var(--line); border-radius: var(--surface-radius); background: var(--paper); }
.empty-state { display: grid; justify-items: start; gap: 9px; border-style: dashed; color: var(--muted); line-height: 1.6; }
.empty-state a { margin-top: 3px; }
.empty-state strong { color: var(--ink); }
.history-list { margin-top: 11px; }
.history-list:empty { display: none; }
.history-list > li { padding: 13px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.history-list > li:has(> a:only-child) { padding: 0; }
.history-list > li > a:only-child { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px 14px; padding: 13px 12px; border-radius: 6px; }
.history-list > li > a:only-child:hover { background: var(--paper); }
.history-list a:hover, .skill-file-links a:hover { color: var(--gold-dark); }
.history-list time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.history-list p { margin-top: 5px; color: var(--muted); line-height: 1.55; }
.managed-task-record { position: relative; min-width: 0; }
.history-list > .managed-task-record, .schedule-list > .managed-task-record { padding-inline-end: 48px; }
.history-list > .managed-task-record:has(> a:first-child) { padding: 0; }
.history-list > .managed-task-record > a:first-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 7px 14px;
  padding: 13px 48px 13px 12px;
  border-radius: 6px;
}
.history-list > .managed-task-record > a:first-child:hover { background: var(--paper); }
.record-actions > summary {
  position: absolute;
  inset: 7px 8px auto auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}
.record-actions > summary::-webkit-details-marker { display: none; }
.record-actions > summary:hover, .record-actions[open] > summary {
  border-color: var(--line);
  color: var(--ink);
  background: var(--paper);
}
.record-action-list {
  position: absolute;
  z-index: 3;
  inset: 42px 8px auto auto;
  display: grid;
  min-width: 108px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 6px 18px rgb(25 36 54 / 10%);
}
.record-actions:not([open]) > .record-action-list { display: none; }
.record-action-list button {
  min-height: 32px;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  text-align: start;
  font-size: 13px;
}
.record-action-list button:hover { background: var(--sidebar); }
.record-action-list .record-remove { color: var(--danger); }
#recent-list .managed-task-record > a { padding-inline-end: 42px; }
#recent-list .record-actions > summary { inset: 2px 4px auto auto; width: 29px; height: 29px; }
#recent-list .record-actions[open] > .record-action-list {
  position: static;
  display: flex;
  justify-content: end;
  gap: 3px;
  margin: 3px 5px 5px 36px;
  box-shadow: none;
}
.handoff-dialog.task-record-dialog { width: min(calc(100% - 26px), 440px); overflow-wrap: anywhere; }
.task-record-name-field { display: grid; gap: 7px; margin-top: 16px; }
.task-record-dialog-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; margin-top: 18px; }
.record-delete-confirm {
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid var(--danger);
  border-radius: var(--control-radius);
  color: var(--paper);
  background: var(--danger);
}
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-bottom: 8px; color: var(--gold-dark); font-size: 13px; }
.back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.settings-fields { margin: 22px 0; }
.settings-fields > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.settings-fields dt { color: var(--muted); }
.settings-fields dd { margin: 0; overflow-wrap: anywhere; }
.account-surface { max-width: 680px; }
.account-surface .settings-fields { margin: 8px 0 18px; }
.artifact-list { list-style: none; margin: 0; padding: 0; }
.artifact-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 9px 18px; padding: 15px 11px; border-bottom: 1px solid var(--line); }
.artifact-list li:first-child { border-top: 1px solid var(--line); }
.artifact-identity, .artifact-actions { display: flex; align-items: center; gap: 9px; }
.artifact-identity { min-width: 0; overflow-wrap: anywhere; }
.artifact-actions { flex-wrap: wrap; color: var(--gold-dark); font-size: 13px; }
.artifact-actions a { padding: 6px 8px; border-radius: 5px; }
.artifact-actions a:hover { background: var(--gold-soft); }
.artifact-format, .record-workspace { padding: 3px 6px; border-radius: 5px; background: var(--sidebar); color: var(--muted); font-size: 12px; }
.record-workspace { margin-inline-start: 7px; }
.workspace-error { max-width: 720px; margin: 0 auto 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 761px) {
  .workbench.sidebar-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar-collapsed .sidebar { padding-inline: 10px; }
  .sidebar-collapsed .sidebar-brand { flex-direction: column; }
  .sidebar-collapsed .sidebar-collapse { margin-inline: auto; }
  .sidebar-collapsed :is(.brand-copy, .history-disclosure, #recent-tasks) { display: none; }
  .sidebar-collapsed .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sidebar-collapsed .nav-group-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sidebar-collapsed .nav-item { justify-content: center; padding-inline: 0; }
  .sidebar-collapsed .sidebar-account { justify-content: center; min-height: 44px; padding-inline: 0; }
  .sidebar-collapsed .sidebar-account :is(.sidebar-account-copy, .ui-icon) { display: none; }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-intro { padding: 24px; gap: 20px; }
  .intro-slogan { font-size: 32px; }
  .intro-description { margin-top: 12px; font-size: 14px; }
  .auth-capabilities { display: none; }
  .auth-panel { place-items: start center; padding-block: 30px; }
  .workbench { display: block; }
  .compact-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .compact-menu-toggle { display: flex; align-items: center; gap: 7px; color: var(--muted); }
  .compact-menu-toggle .ui-icon { width: 17px; height: 17px; }
  .sidebar { display: none; position: static; height: auto; max-height: min(580px, calc(100dvh - 61px)); border-right: 0; border-bottom: 1px solid var(--line); }
  .workbench.nav-open .sidebar { display: flex; }
  .sidebar-brand { display: none; }
  .welcome { margin: 22px auto 18px; }
  .welcome::before { inset-block-start: -18px; }
  .composer-frame { border-radius: 16px; }
  .composer textarea { min-height: 110px; padding-inline: 15px; }
  .composer-workspace { border-radius: 0 0 15px 15px; }
  .workbench > main { padding: 16px 16px 32px; }
}
@media (max-width: 520px) {
  .composer-toolbar { gap: 4px 6px; padding-inline: 6px; }
  .composer-actions { gap: 4px; }
  .composer-template-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .composer-template-grid button { min-height: 70px; }
}
.composer-accessory {
  margin-top: 12px;
  padding: 5px 15px 12px;
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  background: var(--paper);
}
.skill-run-entry form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; margin-block: 0.8rem; }
.skill-run-entry input { max-width: 100%; }
.skill-file-links a { display: inline-block; margin: 7px 12px 0 0; color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; }
#conversation-skill-runs-section { margin-block: 1.5rem; }
#skill-task-version { overflow-wrap: anywhere; }
.skill-task-panel, .material-panel { max-width: 880px; }
.skill-task-panel > :is(.messages, .skill-file-links) { margin-block: 0.75rem; }
.skill-task-panel .page-heading { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
