:root {
  color-scheme: light dark;

  --surface-0: light-dark(#eae8df, #0b0b0b);
  --surface-1: light-dark(#f5f3ec, #151515);
  --surface-2: light-dark(#fdfcf9, #1a1a19);
  --surface-3: light-dark(#ffffff, #20201f);
  --surface-card: light-dark(#ffffff, #111111);

  --text-primary: light-dark(#141413, #f0efec);
  --text-secondary: light-dark(#3f3e39, #c3c2b7);
  --text-muted: light-dark(#6d6b63, #898781);
  --text-disabled: light-dark(rgb(0 0 0 / 0.38), rgb(255 255 255 / 0.35));

  --border: light-dark(rgb(0 0 0 / 0.1), rgb(255 255 255 / 0.1));
  --border-strong: light-dark(rgb(0 0 0 / 0.22), rgb(255 255 255 / 0.2));
  --hairline: 1px;

  --fill-field: light-dark(rgb(0 0 0 / 0.04), rgb(255 255 255 / 0.05));
  --fill-primary: light-dark(#141413, #ffffff);
  --fill-primary-hover: light-dark(#35342f, #e1e0d9);
  --on-primary: light-dark(#faf9f5, #0b0b0b);
  --fill-secondary: light-dark(rgb(0 0 0 / 0.07), rgb(255 255 255 / 0.1));
  --fill-secondary-hover: light-dark(rgb(0 0 0 / 0.11), rgb(255 255 255 / 0.14));
  --fill-ghost-hover: light-dark(rgb(0 0 0 / 0.05), rgb(255 255 255 / 0.075));
  --fill-ghost-selected: light-dark(rgb(0 0 0 / 0.09), rgb(255 255 255 / 0.15));

  --accent: light-dark(#b34a76, #e09ebb);
  --accent-hover: light-dark(#9c3d65, #e9b6cc);
  --on-accent: light-dark(#ffffff, #0b0b0b);
  --accent-subtle: light-dark(rgb(179 74 118 / 0.1), rgb(224 158 187 / 0.12));
  --accent-border: light-dark(rgb(179 74 118 / 0.4), rgb(224 158 187 / 0.35));
  --accent-glow: light-dark(rgb(179 74 118 / 0.3), rgb(224 158 187 / 0.45));
  --accent-selection: light-dark(rgb(179 74 118 / 0.22), rgb(224 158 187 / 0.3));

  --danger: light-dark(#b3261e, #ec7e7e);
  --fill-danger: light-dark(#cc3a37, #d03b3b);
  --fill-danger-hover: light-dark(#b32f2d, #e34948);
  --danger-subtle: light-dark(rgb(208 59 59 / 0.1), rgb(208 59 59 / 0.16));
  --success: light-dark(#2c7a31, #55bf50);
  --success-subtle: light-dark(rgb(0 147 0 / 0.1), rgb(0 147 0 / 0.16));
  --warning: light-dark(#8a5a00, #db9300);
  --warning-subtle: light-dark(rgb(219 147 0 / 0.12), rgb(219 147 0 / 0.14));

  --scrim: light-dark(rgb(0 0 0 / 0.32), rgb(0 0 0 / 0.6));

  --shadow-cast: light-dark(rgb(0 0 0 / 0.1), #00000052);
  --shadow-edge: light-dark(rgb(0 0 0 / 0.05), #0003);
  --shadow-card-near: light-dark(rgb(0 0 0 / 0.06), rgb(0 0 0 / 0.16));
  --shadow-card-far: light-dark(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.12));
  --shadow-composer-cast: light-dark(rgb(0 0 0 / 0.07), rgb(0 0 0 / 0.25));

  --shadow-popover: 0 8px 24px var(--shadow-cast), 0 2px 6px var(--shadow-edge);
  --shadow-card: 0 4px 24px 0 var(--shadow-card-near), 0 16px 32px 0 var(--shadow-card-far);
  --shadow-composer: 0 4px 20px 0 var(--shadow-composer-cast);

  --focus-ring: 0 0 0 1px var(--surface-1), 0 0 0 2px var(--accent), 0 0 8px 1px var(--accent-glow);
  --field-ring: inset 0 0 0 1px var(--border);
  --field-ring-hover: inset 0 0 0 1px var(--border-strong);
  --field-ring-invalid: inset 0 0 0 1px var(--danger);

  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

@media (min-resolution: 2dppx) {
  :root { --hairline: 0.5px; }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}
@keyframes slide-in {
  from { transform: translateX(-100%); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

*, ::before, ::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid var(--border);
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  background: var(--surface-1);
  color: var(--text-primary);
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
img, svg { display: block; }
ul, ol { list-style: none; }
table { border-collapse: collapse; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  background: transparent;
}
textarea { resize: vertical; }
::placeholder { color: var(--text-muted); opacity: 1; }
::selection { background: var(--accent-selection); color: var(--text-primary); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
:focus { outline: none; }
:focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: var(--focus-ring); }
button:not(:disabled), [role="button"]:not([aria-disabled="true"]), summary { cursor: pointer; }
[hidden] { display: none !important; }
dialog::backdrop { background: var(--scrim, rgb(0 0 0 / 0.6)); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.icon { width: 16px; height: 16px; flex-shrink: 0; }
.spin { animation: spin 1s linear infinite; }
.font-display { font-family: var(--font-serif); font-weight: 300; letter-spacing: -0.01em; }
.mono { font-family: var(--font-mono); font-size: 13px; line-height: 20px; letter-spacing: -0.025em; }
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.text-xs { font-size: 12px; line-height: 16px; }
.text-13 { font-size: 13px; line-height: 20px; }
.text-sm { font-size: 14px; line-height: 20px; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.tabular { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.w-full { width: 100%; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.stack { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 16px; }
.inline { display: inline; }

.link { color: var(--accent); }
.link:hover { text-decoration: underline; }
.link-muted { color: var(--text-muted); transition: color 0.15s; }
.link-muted:hover { color: var(--text-secondary); }
.link-quiet { font-size: 13px; line-height: 20px; color: var(--text-muted); transition: color 0.15s; }
.link-quiet:hover { color: var(--accent); }

.mark { flex-shrink: 0; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}
.wordmark .mark { width: 0.95em; height: 0.95em; color: var(--accent); }
.wordmark-text {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 1.25em;
  line-height: 1em;
  letter-spacing: -0.02em;
}

.btn {
  display: inline-flex;
  flex-shrink: 0;
  user-select: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  height: 32px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  line-height: 20px;
  background: var(--fill-secondary);
  color: var(--text-primary);
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--fill-secondary-hover); }
.btn:disabled, .btn[aria-disabled="true"] { pointer-events: none; opacity: 0.4; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--fill-primary); color: var(--on-primary); font-weight: 500; }
.btn-primary:hover { background: var(--fill-primary-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--fill-ghost-hover); color: var(--text-primary); }
.btn-outline { background: transparent; border: var(--hairline) solid var(--border-strong); color: var(--text-secondary); }
.btn-outline:hover { background: var(--fill-ghost-hover); color: var(--text-primary); }
.btn-accent { background: var(--accent); color: var(--on-accent); font-weight: 500; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-danger { background: var(--fill-danger); color: #fff; font-weight: 500; }
.btn-danger:hover { background: var(--fill-danger-hover); }
.btn-sm { height: 28px; border-radius: 6px; padding: 0 10px; font-size: 13px; line-height: 20px; }
.btn-lg { height: 40px; border-radius: 10px; padding: 0 16px; font-size: 15px; line-height: 22px; }
.btn-icon { width: 32px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }
.btn-block { width: 100%; }

.input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 32px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  line-height: 20px;
  background: var(--fill-field);
  color: var(--text-primary);
  box-shadow: var(--field-ring);
  transition: box-shadow 0.15s;
}
.input:hover:not(:focus-visible):not(:disabled) { box-shadow: var(--field-ring-hover); }
.input[aria-invalid="true"] { box-shadow: var(--field-ring-invalid); }
.input:focus-visible { box-shadow: var(--focus-ring); }
.input:disabled { cursor: not-allowed; opacity: 0.4; }
.input-sm { height: 28px; border-radius: 6px; padding: 0 8px; font-size: 13px; }
.input-lg { height: 40px; border-radius: 10px; padding: 0 16px; font-size: 16px; line-height: 24px; }
textarea.input {
  height: auto;
  min-height: 80px;
  max-height: 256px;
  padding: 8px 12px;
  field-sizing: content;
}
textarea.input.tall { min-height: 140px; max-height: 420px; }
select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23898781' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}
select.input option { background: var(--surface-3); color: var(--text-primary); }
input[type="file"].input { padding: 5px 6px; height: auto; font-size: 13px; }
input[type="file"].input::file-selector-button {
  margin-right: 10px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: var(--fill-secondary);
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
}
input[type="datetime-local"].input::-webkit-calendar-picker-indicator { opacity: 0.6; cursor: pointer; }

.password {
  display: flex;
  width: 100%;
  align-items: center;
  height: 32px;
  border-radius: 8px;
  background: var(--fill-field);
  box-shadow: var(--field-ring);
  transition: box-shadow 0.15s;
}
.password:hover:not(:focus-within) { box-shadow: var(--field-ring-hover); }
.password:focus-within:has(:focus-visible) { box-shadow: var(--focus-ring); }
.password[aria-invalid="true"] { box-shadow: var(--field-ring-invalid); }
.password input {
  height: 100%;
  min-width: 0;
  flex: 1;
  background: transparent;
  padding-left: 12px;
  font-size: 14px;
  color: var(--text-primary);
}
.password input:focus-visible { box-shadow: none; }
.password input.mono { font-size: 13px; }
.password-toggle {
  display: grid;
  height: 100%;
  width: 36px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
  transition: color 0.15s;
}
.password-toggle:hover, .password-toggle:focus-visible { color: var(--text-primary); box-shadow: none; }
.password-lg { height: 40px; border-radius: 10px; }
.password-lg input { padding-left: 16px; font-size: 16px; line-height: 24px; }
.password-lg .password-toggle { width: 44px; border-radius: 0 10px 10px 0; }

.field { display: grid; align-content: start; gap: 6px; }
.label { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--text-secondary); }
.hint { font-size: 13px; line-height: 20px; color: var(--text-muted); }
.field-error { font-size: 13px; line-height: 20px; color: var(--danger); }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 20px; cursor: pointer; }
.checkbox input { margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--accent); cursor: pointer; }
.checkbox-desc { margin-top: 2px; display: block; font-size: 13px; line-height: 20px; color: var(--text-muted); }

.form-grid { display: grid; gap: 16px; }
.form-actions { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
@media (min-width: 640px) {
  .form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: span 2 / span 2; }
}

.auth {
  display: flex;
  flex: 1;
  flex-direction: column;
  background: var(--surface-1);
}
.auth-header { display: flex; padding: 24px 24px 0; }
.auth-home { display: inline-flex; border-radius: 6px; font-size: 17px; }
.auth-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 8vh 16px 64px;
}
.auth-footer { background: var(--surface-1); padding: 0 24px 24px; text-align: center; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.auth-heading {
  text-wrap: balance;
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 300;
  letter-spacing: -0.01em;
  font-size: 2rem;
  line-height: 1.25;
  color: var(--text-primary);
}
.auth-sub { margin-top: 8px; text-align: center; font-size: 14px; line-height: 20px; color: var(--text-muted); max-width: 28rem; }
.auth-card {
  margin-top: 32px;
  width: 100%;
  max-width: 28rem;
  border-radius: 2rem;
  border: var(--hairline) solid var(--border);
  background: var(--surface-card);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.auth-form { display: grid; gap: 12px; }
.auth-form fieldset { display: grid; gap: 12px; min-width: 0; }
.auth-alt { margin-top: 24px; display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--text-muted); }
.auth-code { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
@media (min-width: 640px) {
  .auth-header { padding: 28px 40px 0; }
  .auth-main { padding-top: 11vh; }
  .auth-heading { font-size: 2.5rem; }
}

.callout {
  display: flex;
  gap: 12px;
  border-radius: 12px;
  border: var(--hairline) solid var(--border);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
}
.callout > .icon { margin-top: 2px; }
.callout-title { font-weight: 500; color: var(--text-primary); }
.callout-info { border-color: var(--accent-border); background: var(--accent-subtle); }
.callout-info > .icon { color: var(--accent); }
.callout-success { border-color: color-mix(in srgb, var(--success) 40%, transparent); background: var(--success-subtle); }
.callout-success > .icon { color: var(--success); }
.callout-warning { border-color: color-mix(in srgb, var(--warning) 40%, transparent); background: var(--warning-subtle); }
.callout-warning > .icon { color: var(--warning); }
.callout-danger { border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: var(--danger-subtle); }
.callout-danger > .icon { color: var(--danger); }

.badge {
  display: inline-flex;
  height: 20px;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  border-radius: 6px;
  padding: 0 6px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  background: var(--fill-secondary);
  color: var(--text-secondary);
}
.badge-accent { background: var(--accent-subtle); color: var(--accent); }
.badge-success { background: var(--success-subtle); color: var(--success); }
.badge-warning { background: var(--warning-subtle); color: var(--warning); }
.badge-danger { background: var(--danger-subtle); color: var(--danger); }
.badge-outline { background: transparent; border: var(--hairline) solid var(--border-strong); color: var(--text-muted); }

.panel {
  display: flex;
  height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-1);
}
.panel-main { min-height: 0; min-width: 0; flex: 1; overflow-y: auto; }

.mobile-bar {
  display: flex;
  height: 48px;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  border-bottom: var(--hairline) solid var(--border);
  padding: 0 12px;
}
.mobile-bar .wordmark { font-size: 15px; }

.icon-btn {
  display: grid;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: color 0.15s, background-color 0.15s;
}
.icon-btn:hover { background: var(--fill-ghost-hover); color: var(--text-primary); }
.icon-btn.quiet { color: var(--text-muted); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 41;
  display: flex;
  width: 288px;
  max-width: 85vw;
  flex-direction: column;
  border-right: var(--hairline) solid var(--border);
  background: var(--surface-1);
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 220ms var(--ease), visibility 220ms;
}
.sidebar.open { transform: none; visibility: visible; box-shadow: var(--shadow-popover); }
.sidebar-scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); display: none; }
.sidebar-scrim.open { display: block; }
.sidebar-head {
  display: flex;
  height: 56px;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px 0 16px;
}
.sidebar-head .wordmark { font-size: 17px; }
.sidebar-head a { border-radius: 6px; }
.nav {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  padding: 0 8px 12px;
}
.nav-primary {
  display: flex;
  height: 32px;
  width: 100%;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-primary);
  transition: background-color 0.15s;
}
.nav-primary:hover { background: var(--fill-ghost-hover); }
.nav-primary-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--on-accent);
}
.nav-primary-icon .icon { width: 14px; height: 14px; stroke-width: 2.5; }
.nav-group { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-group-admin { margin-top: 24px; }
.nav-heading { padding: 0 10px 4px; font-size: 13px; line-height: 20px; color: var(--text-muted); }
.nav-link {
  position: relative;
  display: flex;
  height: 32px;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
  transition: color 0.15s, background-color 0.15s;
}
.nav-link:hover { background: var(--fill-ghost-hover); color: var(--text-primary); }
.nav-link.active { background: var(--fill-ghost-selected); color: var(--text-primary); }
.nav-link span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count {
  border-radius: 6px;
  background: var(--accent-subtle);
  padding: 0 6px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.sidebar-foot { position: relative; flex-shrink: 0; border-top: var(--hairline) solid var(--border); padding: 8px; }
.account-trigger {
  display: flex;
  height: 44px;
  width: 100%;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 0 8px;
  text-align: left;
  transition: background-color 0.15s;
}
.account-trigger:hover, .account-trigger[aria-expanded="true"] { background: var(--fill-ghost-hover); }
.account-trigger > .icon { color: var(--text-muted); }
.avatar {
  display: grid;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 9999px;
  background: var(--fill-secondary);
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  color: var(--text-primary);
}
.account-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; color: var(--text-primary); }
.account-name .muted { color: var(--text-muted); }

@media (min-width: 768px) {
  .panel { flex-direction: row; }
  .mobile-bar { display: none; }
  .sidebar {
    position: relative;
    inset: auto;
    z-index: auto;
    max-width: none;
    transform: none;
    visibility: visible;
    transition: none;
    box-shadow: none;
  }
  .sidebar.open { box-shadow: none; }
  .sidebar-scrim, .sidebar-scrim.open { display: none; }
  .sidebar-close { display: none; }
}

.menu {
  position: absolute;
  bottom: calc(100% - 4px);
  left: 8px;
  right: 8px;
  z-index: 50;
  display: none;
  min-width: 208px;
  border-radius: 12px;
  border: var(--hairline) solid var(--border);
  background: var(--surface-3);
  padding: 6px;
  color: var(--text-primary);
  box-shadow: var(--shadow-popover);
}
.menu.open { display: block; animation: pop-in 160ms var(--ease); }
.menu-label { padding: 4px 8px 6px; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.menu-label strong { display: block; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-primary); }
.menu-item {
  display: flex;
  height: 32px;
  width: 100%;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 0 8px;
  text-align: left;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-primary);
  transition: background-color 0.15s;
}
.menu-item .icon { color: var(--text-muted); }
.menu-item:hover { background: var(--fill-ghost-hover); }
.menu-item-danger, .menu-item-danger .icon { color: var(--danger); }
.menu-sep { margin: 6px -6px; height: var(--hairline); background: var(--border); }
.theme-row { display: flex; height: 32px; align-items: center; gap: 8px; padding: 0 4px 0 8px; }
.theme-row > span { flex: 1; font-size: 14px; line-height: 20px; color: var(--text-primary); }
.segmented { display: flex; align-items: center; gap: 2px; border-radius: 8px; background: var(--fill-field); padding: 2px; }
.segmented button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  color: var(--text-muted);
  transition: color 0.15s, background-color 0.15s;
}
.segmented button:hover { background: var(--fill-ghost-hover); color: var(--text-primary); }
.segmented button[aria-pressed="true"] { background: var(--fill-ghost-selected); color: var(--text-primary); }
.segmented .icon { width: 14px; height: 14px; }

.page { margin: 0 auto; width: 100%; max-width: 1024px; padding: 32px 16px; }
.page-narrow { max-width: 720px; }
.page-header { margin-bottom: 32px; }
.back-link {
  margin-left: -4px;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-radius: 6px;
  padding-right: 4px;
  font-size: 13px;
  line-height: 20px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.back-link:hover { color: var(--text-primary); }
.page-header-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.page-header-row > div:first-child { min-width: 0; }
.page-title {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-weight: 300;
  letter-spacing: -0.01em;
  font-size: 1.875rem;
  line-height: 1.2;
}
.page-title.is-mono {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.page-desc { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--text-muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (min-width: 640px) {
  .page { padding: 40px 32px; }
  .page-title.is-mono { font-size: 1.75rem; }
}

.section ~ .section { margin-top: 40px; }
.section-title { margin-bottom: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-title h2 { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--text-primary); }
.section-title p { margin-top: 2px; font-size: 13px; line-height: 20px; color: var(--text-muted); }

.card { border-radius: 12px; border: var(--hairline) solid var(--border); background: var(--surface-2); }
.card-body { padding: 20px; }
.card-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 16px 20px; }
.card-row + .card-row { border-top: var(--hairline) solid var(--border); }
.card-row-title { font-weight: 500; color: var(--text-primary); }
.card-row-desc { margin-top: 2px; font-size: 13px; line-height: 20px; color: var(--text-muted); }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.stat {
  display: block;
  border-radius: 12px;
  border: var(--hairline) solid var(--border);
  background: var(--surface-2);
  padding: 16px;
  transition: border-color 0.15s, background-color 0.15s;
}
a.stat:hover { border-color: var(--border-strong); background: var(--fill-ghost-hover); }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.stat-value { margin-top: 12px; font-size: 24px; line-height: 32px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-primary); }

.dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  border-radius: 12px;
  border: var(--hairline) solid var(--border);
  background: var(--surface-2);
  padding: 16px;
}
.dl dt { font-size: 12px; line-height: 16px; color: var(--text-muted); }
.dl dd { margin-top: 4px; overflow-wrap: anywhere; font-size: 14px; line-height: 20px; color: var(--text-primary); }
@media (min-width: 640px) { .dl { gap: 20px 32px; padding: 20px; } }
@media (min-width: 1024px) { .dl { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.table-wrap { overflow-x: auto; border-radius: 12px; border: var(--hairline) solid var(--border); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 20px; }
.table thead { text-align: left; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.table th { height: 36px; white-space: nowrap; padding: 0 12px; font-weight: 500; text-align: left; }
.table td { height: 44px; border-top: var(--hairline) solid var(--border); padding: 0 12px; vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 16px; }
.table th:last-child, .table td:last-child { padding-right: 16px; }
.table tbody tr { position: relative; transition: background-color 0.15s; }
.table tbody tr:hover { background: var(--fill-ghost-hover); }
.table .row-link::after { content: ""; position: absolute; inset: 0; }
.table .row-link:focus-visible { box-shadow: none; }
.table .row-link:focus-visible::after { box-shadow: var(--focus-ring); border-radius: 12px; }
.table .row-actions { position: relative; z-index: 1; display: flex; justify-content: flex-end; gap: 4px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .nowrap { white-space: nowrap; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 12px;
  border: var(--hairline) dashed var(--border-strong);
  padding: 56px 24px;
  text-align: center;
}
.empty-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 9999px;
  background: var(--fill-secondary);
  color: var(--text-secondary);
}
.empty-title { margin-top: 16px; font-weight: 500; color: var(--text-primary); }
.empty-desc { margin-top: 4px; max-width: 384px; font-size: 13px; line-height: 20px; color: var(--text-muted); }
.empty .btn { margin-top: 16px; }

.toolbar { margin-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar .input { width: auto; }
.toolbar .grow { flex: 1; min-width: 200px; }
.pager { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 20px; color: var(--text-muted); }

.dialog {
  margin: auto;
  max-height: calc(100dvh - 2rem);
  width: min(440px, calc(100vw - 2rem));
  overflow-y: auto;
  border-radius: 16px;
  border: var(--hairline) solid var(--border);
  background: var(--surface-2);
  padding: 0;
  color: var(--text-primary);
  box-shadow: var(--shadow-popover);
}
.dialog[open] { animation: pop-in 160ms var(--ease); }
.dialog-wide { width: min(560px, calc(100vw - 2rem)); }
.dialog-body { padding: 24px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-title { font-size: 18px; line-height: 28px; font-weight: 500; color: var(--text-primary); }
.dialog-desc { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--text-secondary); }
.dialog-close { margin: -4px -8px 0 0; }
.dialog-content { margin-top: 20px; }
.dialog-footer { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.toast-stack { position: fixed; right: 16px; bottom: 16px; left: 16px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex;
  max-width: 420px;
  align-items: flex-start;
  gap: 10px;
  border-radius: 12px;
  border: var(--hairline) solid var(--border);
  background: var(--surface-3);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-primary);
  box-shadow: var(--shadow-popover);
  animation: toast-in 220ms var(--ease);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.leaving { opacity: 0; transform: translateY(8px); }
.toast > .icon { margin-top: 2px; }
.toast-success > .icon { color: var(--success); }
.toast-danger > .icon { color: var(--danger); }
.toast-info > .icon { color: var(--accent); }
.toast button { margin: -2px -4px 0 4px; color: var(--text-muted); }
.toast button:hover { color: var(--text-primary); }

.hero { padding: 0 16px 80px; }
.hero-inner { margin: 0 auto; max-width: 672px; padding-top: 9vh; }
.greeting {
  text-wrap: balance;
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 300;
  letter-spacing: -0.01em;
  font-size: 2.25rem;
  line-height: 1.25;
  color: var(--text-primary);
}
.greeting .mark { display: inline-block; vertical-align: middle; margin: -4px 12px 0 0; width: 32px; height: 32px; color: var(--accent); }
.composer {
  margin-top: 32px;
  border-radius: 16px;
  border: var(--hairline) solid var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow-composer);
  transition: border-color 0.15s;
}
.composer:focus-within { border-color: var(--accent-border); }
.composer input { display: block; width: 100%; background: transparent; padding: 16px 16px 12px; font-size: 16px; line-height: 24px; color: var(--text-primary); }
.composer input:focus-visible { box-shadow: none; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 12px; }
.composer-hint { padding-left: 4px; font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--text-muted); }
.composer-submit {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  transition: background-color 0.15s;
}
.composer-submit:hover { background: var(--accent-hover); }
.chips { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  border: var(--hairline) solid var(--border-strong);
  padding: 0 12px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
  transition: color 0.15s, background-color 0.15s;
}
.chip:hover { background: var(--fill-ghost-hover); color: var(--text-primary); }
.chip .icon { color: var(--text-muted); }
.below-hero { margin: 64px auto 0; max-width: 896px; }
@media (min-width: 640px) {
  .hero { padding: 0 32px 80px; }
  .hero-inner { padding-top: 13vh; }
  .greeting { font-size: 2.75rem; }
}

.code {
  overflow-x: auto;
  border-radius: 12px;
  border: var(--hairline) solid var(--border);
  background: var(--surface-1);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 20px;
  white-space: pre;
  color: var(--text-secondary);
  tab-size: 2;
}
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.code-label { font-size: 12px; line-height: 16px; color: var(--text-muted); }
.endpoint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.method { border-radius: 6px; background: var(--accent-subtle); padding: 0 6px; font-family: var(--font-mono); font-size: 12px; line-height: 20px; font-weight: 500; color: var(--accent); }

.key-display {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  border: var(--hairline) solid var(--border);
  background: var(--surface-2);
  padding: 10px 10px 10px 16px;
}
.key-display .mono { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 15px; color: var(--text-primary); }

.tabs { display: flex; flex-shrink: 0; gap: 4px; box-shadow: inset 0 calc(-1 * var(--hairline)) 0 var(--border); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: inline-flex;
  height: 36px;
  align-items: center;
  padding: 0 10px;
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.15s;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--text-primary); }
.tab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); }

.version-list > li { padding: 16px 20px; }
.version-list > li + li { border-top: var(--hairline) solid var(--border); }
.version-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.version-num { font-family: var(--font-mono); font-size: 15px; line-height: 22px; font-weight: 500; letter-spacing: -0.02em; color: var(--text-primary); }
.version-notes { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 20px; color: var(--text-secondary); }
.version-meta { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.version-meta a { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); }
.version-meta a:hover { color: var(--accent); }
.version-meta .icon { width: 13px; height: 13px; }

.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, transparent); }

.avatar-lg { width: 40px; height: 40px; font-size: 14px; line-height: 20px; }

.profile-pop { padding: 8px; }
.profile-head { display: flex; align-items: center; gap: 12px; padding: 6px 6px 10px; }
.profile-id { min-width: 0; flex: 1; }
.profile-name { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-primary); }
.profile-email { font-size: 12px; line-height: 16px; color: var(--text-muted); }
.profile-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border-radius: 10px; background: var(--fill-field); padding: 8px 10px; }
.profile-meta dt { font-size: 11px; line-height: 16px; color: var(--text-muted); }
.profile-meta dd { font-size: 13px; line-height: 20px; color: var(--text-primary); }
.profile-pop .menu-sep { margin: 8px -8px; }

.tab { gap: 6px; }
.tab .icon { width: 14px; height: 14px; }
.tab-count { border-radius: 6px; background: var(--fill-secondary); padding: 0 6px; font-size: 11px; line-height: 18px; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.tab.active .tab-count { background: var(--accent-subtle); color: var(--accent); }
.tabs + .section { margin-top: 0; }

.select { position: relative; display: block; width: 100%; min-width: 0; }
.select-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
.select-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  user-select: none;
}
.select-trigger .select-value { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger.is-placeholder .select-value { color: var(--text-muted); }
.select-trigger > .icon { color: var(--text-muted); transition: transform 0.15s; }
.select-trigger[aria-expanded="true"] { box-shadow: var(--field-ring-hover); }
.select-trigger[aria-expanded="true"] > .icon { transform: rotate(180deg); }
.select-trigger:disabled { cursor: not-allowed; opacity: 0.4; }
.select-list {
  position: fixed;
  z-index: 80;
  display: none;
  max-height: 288px;
  overflow-y: auto;
  border-radius: 12px;
  border: var(--hairline) solid var(--border);
  background: var(--surface-3);
  padding: 6px;
  color: var(--text-primary);
  box-shadow: var(--shadow-popover);
  overscroll-behavior: contain;
}
.select-list.open { display: block; animation: pop-in 160ms var(--ease); }
.select-option {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  user-select: none;
}
.select-option > span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-option > .icon { color: var(--accent); visibility: hidden; }
.select-option[aria-selected="true"] > .icon { visibility: visible; }
.select-option[aria-selected="true"] { font-weight: 500; }
.select-option.active { background: var(--fill-ghost-hover); }
.select-option[aria-disabled="true"] { cursor: default; opacity: 0.4; }
.toolbar .select { width: auto; min-width: 150px; }
.toolbar .select .input { width: 100%; }
.nav-primary.active { background: var(--fill-ghost-selected); }
.sidebar-rail-toggle,
.sidebar-collapse,
.sidebar-resize { display: none; }
.sidebar-home { display: inline-flex; border-radius: 6px; }
.sidebar-rail-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  transition: background-color 0.15s;
}
.sidebar-rail-toggle:hover { background: var(--fill-ghost-hover); }
.sidebar-rail-toggle .mark { width: 18px; height: 18px; color: var(--accent); transition: opacity 0.15s; }
.sidebar-rail-toggle .icon { position: absolute; color: var(--text-primary); opacity: 0; transition: opacity 0.15s; }
.sidebar-rail-toggle:hover .mark, .sidebar-rail-toggle:focus-visible .mark { opacity: 0; }
.sidebar-rail-toggle:hover .icon, .sidebar-rail-toggle:focus-visible .icon { opacity: 1; }

.sidebar-resize {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -6px;
  z-index: 10;
  width: 12px;
  cursor: col-resize;
  touch-action: none;
}
.sidebar-resize:focus-visible { box-shadow: none; }
.sidebar-grip {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 28px;
  transform: translate(-50%, -50%);
  border-radius: 9999px;
  background: var(--text-secondary);
  box-shadow: 0 0 0 1px var(--border-strong);
  opacity: 0;
  transition: opacity 0.15s, background-color 0.15s;
}
.sidebar-resize:hover .sidebar-grip,
.sidebar-resize:focus-visible .sidebar-grip { opacity: 1; }
.sidebar-resize:focus-visible .sidebar-grip { box-shadow: 0 0 0 1px var(--accent); }
.sidebar-resize.dragging .sidebar-grip { opacity: 1; background: var(--text-primary); }
.sidebar-resize-tip {
  pointer-events: none;
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 4px;
  transform: translateY(-50%);
  white-space: nowrap;
  border-radius: 6px;
  background: var(--fill-primary);
  padding: 4px 8px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--on-primary);
  box-shadow: var(--shadow-popover);
  opacity: 0;
  transition: opacity 0.15s;
}
.sidebar-resize:hover .sidebar-resize-tip { opacity: 1; transition-delay: 0.2s; }
.sidebar-resize.dragging .sidebar-resize-tip { opacity: 0; transition-delay: 0s; }
html.is-resizing, html.is-resizing * { cursor: col-resize !important; user-select: none !important; }

@media (min-width: 768px) {
  .sidebar {
    z-index: 20;
    width: var(--sidebar-width, 288px);
    transition: width 200ms;
  }
  .sidebar.resizing { transition: width 150ms ease-out; }
  .sidebar-collapse { display: grid; }
  .sidebar-resize { display: block; }

  .sidebar.rail { width: 56px; }
  .sidebar.rail .sidebar-head { justify-content: center; padding: 0; }
  .sidebar.rail .sidebar-home,
  .sidebar.rail .sidebar-collapse { display: none; }
  .sidebar.rail .sidebar-rail-toggle { display: grid; }
  .sidebar.rail .nav { cursor: e-resize; }
  .sidebar.rail .nav a, .sidebar.rail .nav button { cursor: pointer; }
  .sidebar.rail .nav-link,
  .sidebar.rail .nav-primary { justify-content: center; padding: 0; }
  .sidebar.rail .nav-label,
  .sidebar.rail .nav-heading {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .sidebar.rail .nav-group-admin::before {
    content: "";
    display: block;
    margin: 0 auto 4px;
    width: 24px;
    height: var(--hairline);
    background: var(--border);
  }
  .sidebar.rail .account-trigger { justify-content: center; padding: 0; }
  .sidebar.rail .account-name,
  .sidebar.rail .account-trigger > .icon { display: none; }
  .sidebar.rail .menu { right: auto; width: 288px; }
}
/* Settings: section tabs as a left-hand nav on wider screens */
.settings-content { min-width: 0; }
@media (min-width: 768px) {
  .settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
  .tabs-vertical { position: sticky; top: 24px; flex-direction: column; gap: 2px; margin-bottom: 0; box-shadow: none; overflow: visible; }
  .tabs-vertical .tab { height: 34px; border-radius: 8px; padding: 0 10px; transition: color 0.15s, background-color 0.15s; }
  .tabs-vertical .tab:hover { background: var(--fill-ghost-hover); }
  .tabs-vertical .tab.active { background: var(--fill-ghost-selected); }
  .tabs-vertical .tab.active::after { display: none; }
  .tabs-vertical .tab-count { margin-left: auto; }
  .settings-content > .section:first-child { margin-top: 0; }
}

/* Settings: compact session list */
.btn-danger-ghost, .btn-danger-ghost .icon { color: var(--danger); }
.btn-danger-ghost:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.session-row { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; }
.session-row + .session-row { border-top: var(--hairline) solid var(--border); }
.session-icon { display: grid; width: 32px; height: 32px; flex-shrink: 0; place-items: center; border-radius: 8px; background: var(--fill-secondary); color: var(--text-muted); }
.session-icon .icon { width: 16px; height: 16px; }
.session-info { min-width: 0; flex: 1; }
.session-title { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-primary); }
.session-title .badge { flex-shrink: 0; }
.session-meta { font-size: 12px; line-height: 18px; color: var(--text-muted); }
.session-row .btn-ghost { flex-shrink: 0; color: var(--text-muted); }
.session-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: var(--hairline) solid var(--border); padding: 6px 8px 6px 16px; background: var(--fill-field); }
.session-list { overflow: hidden; }

.platform-icon { display: inline-block; width: 14px; height: 14px; flex-shrink: 0; object-fit: contain; }
.platform-icon.is-mono { background: currentColor; -webkit-mask: var(--platform-icon) center / contain no-repeat; mask: var(--platform-icon) center / contain no-repeat; }
.platforms { border: 0; padding: 0; margin: 0; min-width: 0; }
.platforms > legend { padding: 0; margin-bottom: 6px; }
.platform-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; box-shadow: var(--field-ring); font-size: 13px; color: var(--text-secondary); cursor: pointer; user-select: none; }
.platform-chip:hover { box-shadow: var(--field-ring-hover); color: var(--text-primary); }
.platform-chip input { position: absolute; opacity: 0; pointer-events: none; }
.platform-chip:has(input:checked) { box-shadow: inset 0 0 0 1px var(--accent); background: var(--fill-ghost-selected); color: var(--text-primary); }
.platform-chip:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.platform-panel { display: grid; gap: 12px; margin-top: 4px; padding: 14px; border-radius: 10px; box-shadow: var(--field-ring); }
.platform-panel[hidden] { display: none; }
.platform-panel-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-primary); }
.platform-current { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-secondary); }
.platform-current > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.platform-current .icon { width: 13px; height: 13px; flex-shrink: 0; }
.platform-downloads { margin-top: 10px; display: grid; gap: 6px; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.platform-downloads li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.platform-downloads a { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); overflow-wrap: anywhere; }
.platform-downloads a:hover { color: var(--accent); }
.platform-downloads .icon { width: 13px; height: 13px; }
.platform-name { display: inline-flex; align-items: center; gap: 6px; min-width: 96px; font-weight: 500; color: var(--text-secondary); }
.platform-buttons { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
