:root {
  --ink: #22252b;
  --muted: #686d77;
  --line: #d9dce3;
  --orange: #2d4bd2;
  --soft: #edf0fc;
  --canvas: #f4f5f7;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .35; cursor: default; }
button, a, input, select, textarea { outline-offset: 4px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--orange); }
a { color: inherit; text-decoration: none; }
i { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
i svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.shell { min-height: 100vh; }
.sidebar { display: flex; align-items: center; gap: 48px; background: #fff; border-bottom: 1px solid var(--ink); padding: 0 max(32px, calc((100vw - 1216px) / 2)); min-height: 80px; }
.brand { display: inline-flex; align-items: baseline; font: bold 30px Georgia, serif; letter-spacing: -1.4px; white-space: nowrap; }
.brand-period { font: normal 35px 'DM Sans', sans-serif; margin-left: 9px; color: var(--orange); }
.sidebar nav { display: flex; align-self: stretch; gap: 24px; }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-actions .account-button { margin-left: 0; }
.nav-item { padding: 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 14px; }
.nav-item.active { border-bottom-color: var(--orange); color: var(--ink); font-weight: 650; }
.nav-item:hover { color: var(--orange); }
.studio-label { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
main { min-width: 0; }
.topbar { max-width: 1216px; margin: auto; display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 0 16px; }
.draft-label { font-size: 12px; color: var(--muted); }
.draft-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.draft-toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.draft-toggle input { accent-color: var(--orange); width: 15px; height: 15px; margin: 0; }
.draft-divider { color: #a7acb6; padding: 0 8px; }
.top-actions { display: flex; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; background: #fff; border: 1px solid var(--line); border-radius: 3px; font-size: 14px; font-weight: 550; white-space: nowrap; transition: background .15s, color .15s; }
.button:hover { background: #e9ecf1; }
.button.primary { background: var(--orange); border-color: var(--orange); color: white; padding: 13px 20px; }
.button.primary:hover { background: #233db4; }
.button.quiet { border-color: transparent; background: transparent; padding: 8px 10px; color: var(--muted); }
.button.quiet:hover { color: var(--ink); background: #e9ecf1; }
.button i svg { width: 16px; height: 16px; }
.main-content { max-width: 1216px; margin: auto; padding: 17px 16px 28px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 29px; }
h1 { font-size: 38px; line-height: 1.15; font-weight: 600; letter-spacing: -1.6px; margin: 0 0 12px; }
.page-heading p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }
.builder-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.builder-bar strong { font-size: 15px; font-weight: 600; }
.builder-bar > div { min-width: 0; }
.builder-bar strong { overflow-wrap: anywhere; }
.builder-bar > button { flex-shrink: 0; }
.builder-bar small { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.builder-bar .button { text-decoration: underline; text-underline-offset: 4px; }
.builder-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.editor-panel { min-width: 0; }
.tabs { display: flex; gap: 30px; height: 50px; border-bottom: 1px solid var(--line); }
.tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 14px; }
.tabs button.active { color: var(--orange); border-bottom-color: var(--orange); font-weight: 650; }
.tabs i svg { width: 16px; height: 16px; }
.editor-content { padding: 24px 0 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.section-heading h2, .form-section h3 { font-size: 16px; font-weight: 600; margin: 0; }
.section-heading p, .helper { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 6px 0 0; }
.section-count { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.field-card { border-top: 1px solid var(--line); background: #fff; }
.field-card:last-child { border-bottom: 1px solid var(--line); }
.field-top { display: flex; align-items: center; gap: 12px; padding: 15px 14px 12px; }
.field-number { font-family: ui-monospace, monospace; font-size: 12px; color: var(--orange); width: 22px; flex-shrink: 0; }
.field-type-icon { display: none; }
.field-text { flex: 1; min-width: 0; }
.field-text strong { display: block; font-size: 15px; font-weight: 550; overflow-wrap: anywhere; }
.field-text small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 2px; background: transparent; color: #7b8290; }
.icon-button:hover { background: var(--soft); color: var(--orange); }
.icon-button i svg { width: 16px; height: 16px; }
.field-chip-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 15px 16px 48px; }
.field-chip { display: inline-flex; align-items: baseline; gap: 7px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.field-chip b { font-family: ui-monospace, monospace; font-size: 12px; font-weight: 500; color: var(--ink); }
.field-chip { min-width: 0; max-width: 100%; }
.field-chip > span { overflow-wrap: anywhere; }
.field-chip b { flex-shrink: 0; }
.empty-fields { padding: 24px 16px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.6; }
.add-field { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; margin-top: 16px; border: 1px dashed #aeb5c3; border-radius: 2px; background: transparent; color: var(--ink); font-size: 14px; }
.add-field:hover { border-color: var(--orange); background: var(--soft); color: var(--orange); }
.editor-tip { display: flex; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.editor-tip i { align-self: flex-start; margin-top: 2px; }
.editor-tip i svg { width: 14px; height: 14px; }
.preview-panel { min-width: 0; }
.preview-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 50px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.preview-header > div:first-child { display: flex; align-items: baseline; gap: 12px; }
.preview-header strong { font-size: 14px; font-weight: 600; }
#preview-total { color: var(--orange); font: 600 14px ui-monospace, monospace; }
.preview-header > div:first-child { flex-wrap: wrap; gap: 4px 12px; }
.preview-sub { font-size: 12px; color: var(--muted); }
.device-buttons { display: flex; gap: 3px; }
.device-buttons button { display: flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--muted); padding: 6px 9px; }
.device-buttons button.active { background: #fff; border-color: var(--line); color: var(--ink); }
.device-buttons svg { width: 16px; height: 16px; }
.preview-canvas { display: flex; justify-content: center; padding: 24px; background: #e7eaf0; border: 1px solid #d7dce5; }
#calculator-preview { width: 440px; max-width: 100%; transition: width .25s; }
#calculator-preview.mobile { width: 320px; }
.preview-foot { color: var(--muted); font-size: 12px; text-align: right; margin-top: 12px; }
.page-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--ink); }
.footer-meta { display: grid; gap: 7px; }
.footer-meta > span:first-child { font: bold 18px Georgia, serif; letter-spacing: -.6px; }
.footer-meta > span:last-child { color: var(--muted); font-size: 12px; line-height: 1.6; }
.footer-meta > span { font-size: 12px; color: var(--muted); line-height: 1.6; }
.legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 17px; margin-top: 5px; font-size: 12px; color: var(--muted); }
.legal-links a:hover, .legal-links button:hover { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.legal-links button { border: 0; background: none; padding: 0; font: inherit; color: inherit; }
.form-section { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 22px; }
.form-section:last-child { border: 0; padding-bottom: 0; margin-bottom: 0; }
.form-section h3 { margin-bottom: 15px; }
label.control { display: block; font-size: 14px; font-weight: 500; margin: 15px 0 0; }
.control > input, .control > textarea, .control > select { display: block; width: 100%; margin-top: 7px; padding: 10px 11px; border: 1px solid #bcc3cf; border-radius: 2px; background: #fff; color: var(--ink); font-size: 14px; }
.control > textarea { min-height: 82px; resize: vertical; }
.control > input[type=color] { height: 40px; padding: 4px; cursor: pointer; }
.control > input[type=range] { padding: 0; accent-color: var(--orange); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row > * { min-width: 0; }
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.theme-card { position: relative; padding: 10px; border: 1px solid var(--line); border-radius: 2px; background: #fff; text-align: left; font-size: 14px; }
.theme-card.selected { border-color: var(--orange); outline: 1px solid var(--orange); }
.theme-card.selected:after { content: '✓'; position: absolute; right: 10px; bottom: 10px; color: var(--orange); }
.theme-mini { height: 64px; padding: 12px; margin-bottom: 9px; }
.theme-mini .mini-line { height: 4px; width: 60%; background: currentColor; opacity: .3; margin-bottom: 8px; }
.theme-mini .mini-input { height: 12px; border: 1px solid currentColor; opacity: .2; margin-bottom: 7px; }
.theme-mini .mini-button { height: 8px; width: 38%; margin-left: auto; }
.theme-card strong { font-weight: 550; }
.switch-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; margin: 17px 0; }
.switch-label input { width: 18px; height: 18px; accent-color: var(--orange); }
.field-edit { border-top: 1px solid var(--line); padding: 0 16px 17px; background: #f9fafb; }
.option-edit { display: grid; grid-template-columns: minmax(0, 1fr) 82px 32px; gap: 8px; margin-top: 9px; }
.option-edit input { min-width: 0; width: 100%; padding: 9px; border: 1px solid #bcc3cf; border-radius: 2px; background: #fff; font-size: 14px; }
.option-labels { display: flex; justify-content: space-between; padding-right: 40px; color: var(--muted); font-size: 12px; margin-top: 16px; }
.field-edit-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.danger { color: #b64040; }
.small-button { padding: 8px 11px; font-size: 13px; background: #fff; border: 1px solid #bcc3cf; border-radius: 2px; }
.small-button:hover { background: var(--soft); }
dialog { width: 680px; max-width: calc(100vw - 32px); max-height: 90vh; padding: 28px; border: 1px solid var(--ink); border-radius: 4px; color: var(--ink); box-shadow: 0 16px 60px #18213a25; }
dialog::backdrop { background: #151b2b80; }
.modal-heading { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--ink); padding-bottom: 20px; margin-bottom: 20px; }
.eyebrow { font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.modal-heading h2 { font-size: 26px; letter-spacing: -.8px; font-weight: 550; margin: 8px 0 0; }
.modal-heading .icon-button { align-self: flex-start; }
#modal-content > p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.template-card { padding: 20px; text-align: left; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.template-card:hover { border-color: var(--orange); background: #f7f8fe; }
.template-card > i { color: var(--orange); margin-bottom: 15px; }
.template-card > i svg { width: 24px; height: 24px; }
.template-card strong { display: block; font-size: 16px; font-weight: 600; }
.template-card p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.template-card small { font-size: 12px; font-family: ui-monospace, monospace; color: var(--muted); }
.embed-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0; }
.embed-tabs button { padding: 9px 14px; font-size: 14px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.embed-tabs button.selected { color: var(--orange); border-color: var(--orange); }
.embed-method-title { font-size: 16px; font-weight: 600; margin: 20px 0 7px; }
.code-area { display: block; width: 100%; height: 165px; padding: 14px; resize: vertical; border: 1px solid #bcc3cf; border-radius: 2px; background: #f5f6f9; color: #3b465d; font: 12px/1.6 ui-monospace, monospace; overflow-wrap: anywhere; }
.embed-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.replace-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.export-error { color: #a12937; font-size: 14px; line-height: 1.6; }
.embed-help { border-left: 2px solid var(--orange); padding: 9px 14px; margin: 20px 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.embed-help strong { color: var(--ink); }
.file-note { font-size: 13px; line-height: 1.7; color: var(--muted); }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); padding: 13px 20px; background: var(--ink); color: #fff; border-radius: 3px; font-size: 14px; max-width: 90vw; opacity: 0; transition: .2s; pointer-events: none; z-index: 20; }
#toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.kofi-support { display: flex; align-items: center; justify-content: flex-end; flex-shrink: 0; min-height: 38px; }
.kofi-fallback { display: inline-flex; align-items: center; justify-content: center; padding: 8px 15px; min-height: 38px; color: #fff; background: #4aafb3; border-radius: 7px; font-size: 14px; font-weight: 650; white-space: nowrap; }
.kofi-fallback:hover { opacity: .85; }
.kofi-support a.kofi-button { font-family: 'DM Sans', sans-serif!important; }
.kofi-frame { display: block; width: 230px; height: 44px; border: 0; }
#privacy-dialog > p { color: var(--muted); font-size: 14px; line-height: 1.7; }
#privacy-dialog a { text-decoration: underline; text-underline-offset: 3px; }
.privacy-choice { display: flex; gap: 20px; align-items: flex-start; border-top: 1px solid var(--line); padding: 20px 0; cursor: pointer; }
.privacy-choice > span { flex: 1; min-width: 0; }
.privacy-choice strong { font-size: 15px; font-weight: 600; }
.privacy-choice small { display: block; font-size: 13px; line-height: 1.7; color: var(--muted); margin-top: 6px; }
.privacy-choice input { margin-top: 3px; accent-color: var(--orange); width: 18px; height: 18px; flex-shrink: 0; }
.privacy-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 20px; }
[hidden] { display: none!important; }
body.embed-mode { background: transparent; }
#embedded { max-width: 650px; margin: auto; padding: 16px; }
@media(min-width:1500px) { .main-content { padding-top: 28px; } }
@media(min-width:1100px) { .theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media(min-width:761px) and (max-width:1250px) {
  .sidebar { flex-wrap: wrap; padding-top: 12px; gap: 8px 24px; }
  .sidebar nav { order: 3; width: 100%; min-height: 44px; }
}
@media(max-width:1050px) { .sidebar { padding: 0 28px; gap: 30px; } .sidebar nav { gap: 20px; } .studio-label { display: none; } .main-content { padding: 16px 28px 24px; } .topbar { padding: 0 28px; } .builder-grid { gap: 28px; } .preview-canvas { padding: 16px; } .preview-header > div:first-child { gap: 8px; } .preview-sub { font-size: 11px; } }
@media(min-width:761px) and (max-width:1050px) { .sidebar { padding-top: 12px; gap: 8px 24px; } }
@media(max-width:760px) {
  .sidebar { flex-wrap: wrap; padding: 16px 20px 0; gap: 8px 20px; }
  .brand { font-size: 28px; }
  .header-actions { order: 2; width: 100%; margin-left: 0; justify-content: space-between; }
  .sidebar nav { order: 3; width: 100%; justify-content: space-between; gap: 16px; height: 44px; }
  .nav-item { font-size: 13px; }
  .topbar { padding: 10px 20px; min-height: 56px; flex-wrap: wrap; gap: 8px; }
  .top-actions { margin-left: auto; }
  .draft-label { font-size: 11px; }
  .draft-divider { padding: 0 4px; }
  .top-actions { gap: 3px; }
  .top-actions .button { font-size: 12px; padding: 7px; }
  .top-actions .button i { display: none; }
  .main-content { padding: 20px 20px 24px; }
  .page-heading { flex-wrap: wrap; align-items: flex-start; gap: 19px; padding-bottom: 24px; }
  h1 { font-size: 33px; letter-spacing: -1.2px; margin-bottom: 11px; }
  .page-heading p { font-size: 14px; max-width: 320px; }
  .page-heading .button.primary { font-size: 13px; padding: 11px 15px; }
  .builder-bar { align-items: flex-start; gap: 10px; padding: 14px 0; }
  .builder-bar strong { font-size: 13px; }
  .builder-bar .button { font-size: 12px; padding: 2px 0; }
  .builder-bar small { font-size: 11px; }
  .builder-grid { grid-template-columns: 1fr; gap: 34px; }
  .tabs { gap: 25px; }
  .tabs button { font-size: 13px; }
  .editor-content { padding-top: 22px; }
  .field-top { padding: 14px 10px 12px; gap: 10px; }
  .field-chip-row { margin-left: 42px; gap: 9px 14px; }
  .field-text strong { font-size: 14px; }
  .preview-sub { display: none; }
  .preview-canvas { padding: 12px; }
  .page-footer { align-items: flex-start; flex-direction: column; }
  .kofi-support { justify-content: flex-start; }
  .form-row { gap: 10px; }
  dialog { padding: 20px; }
  .modal-heading h2 { font-size: 23px; }
  .template-card { padding: 15px; }
  .template-card strong { font-size: 14px; }
  .template-card p { font-size: 12px; }
  .embed-actions { flex-wrap: wrap; }
}
@media(max-width:360px) {
  .topbar { flex-wrap: wrap; gap: 4px; padding-top: 8px; padding-bottom: 8px; }
  .template-grid { grid-template-columns: 1fr; }
  .field-number { display: none; }
  .field-chip-row { margin-left: 10px; }
  .tabs { gap: 15px; }
  .preview-canvas { padding: 8px; }
}
@media(prefers-reduced-motion:reduce) { * { transition: none!important; } .kofi-support .kofitext img.kofiimg { animation: none!important; } }

/* Accounts and saved work use the same quiet studio layout as the editor. */
.account-button { margin-left: auto; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-status { color: var(--muted); font-size: 12px; margin: -10px 0 20px; overflow-wrap: anywhere; }
.preview-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#account-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
#account-content > p { color: var(--muted); line-height: 1.6; }
.account-form { display: grid; gap: 16px; margin: 24px 0; }
.account-form .control { margin: 0; }
.account-form > .button { justify-self: start; }
.account-form .helper { margin: -4px 0 0; }
.account-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.6; }
.account-check input { width: 17px; height: 17px; flex-shrink: 0; margin-top: 3px; accent-color: var(--orange); }
.account-check a { text-decoration: underline; text-underline-offset: 3px; }
.account-error { padding: 12px 16px; background: #fff2ef; border-left: 3px solid #a43124; font-size: 14px; line-height: 1.5; margin: 0 0 20px; overflow-wrap: anywhere; }
.account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.account-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.account-section h3 { font-size: 16px; margin: 0 0 10px; }
.account-section p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.account-text-button { background: none; border: 0; padding: 8px 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.recovery-code { display: block; padding: 20px; background: var(--canvas); border: 1px solid var(--line); font-size: 17px; line-height: 1.5; user-select: all; overflow-wrap: anywhere; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.library-toolbar .embed-tabs { margin: 0; }
.library-toolbar .embed-tabs span { margin-left: 5px; opacity: .65; }
.library-search { margin: 0 0 20px; }
.library-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.library-open { text-align: left; flex: 1; min-width: 0; border: 0; padding: 0; background: none; }
.library-open strong { display: block; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.library-open span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.library-item-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.library-empty { padding: 40px 16px; border: 1px dashed var(--line); text-align: center; }
.library-empty strong { font: 22px Georgia, serif; }
.library-empty p { font-size: 13px; line-height: 1.7; color: var(--muted); max-width: 380px; margin: 12px auto 0; }
.saved-preview { background: var(--canvas); padding: 20px; margin-top: 24px; }
.saved-preview .qc-calculator { max-width: 600px; margin: auto; }
.saved-preview [data-qc-field]:disabled { opacity: 1; }
@media (max-width: 1100px) { .sidebar { gap: 24px; } .sidebar nav { gap: 16px; } }
@media (max-width: 600px) {
  .account-button { margin: 0; max-width: 120px; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .cloud-status { margin-top: 0; }
  .library-item { gap: 8px; }
  .saved-preview { padding: 8px; }
  .library-toolbar .embed-tabs { flex-wrap: wrap; }
}

@media (max-width: 980px) {
  .sidebar { flex-wrap: wrap; gap: 8px 20px; padding-top: 16px; }
  .sidebar .brand { order: 1; }
  .sidebar .account-button { order: 2; margin-left: auto; }
  .sidebar nav { order: 3; width: 100%; height: 44px; gap: 20px; overflow-x: auto; justify-content: flex-start; }
  .sidebar .nav-item { white-space: nowrap; flex-shrink: 0; }
}
