/* Shared edition controls, independent of provider and conversation state. */
.sidebar-top { padding-bottom: 19px; }
.sidebar-edition-stamp { display: grid; grid-template-columns: 21px 1fr; gap: 4px 9px; align-items: center; margin: 0 5px 19px; padding: 10px 0; border-top: 1px solid #c3c0ab21; border-bottom: 1px solid #c3c0ab21; }
.sidebar-edition-stamp > span { grid-row: 1 / 3; font-family: Georgia,serif; font-size: 18px; font-weight: 400; color: #c7bfa9; }
.sidebar-edition-stamp strong { font-size: 10px; font-weight: 450; letter-spacing: .08em; color: #d4d4c8; }
.sidebar-edition-stamp small { font-size: 6px; letter-spacing: .14em; color: #8f9b9b; }
.edition-trigger { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 11px; border: 1px solid #c6c1aa50; border-radius: 7px; background: linear-gradient(120deg,#bdc5ac0c,#15202780); color: #dbd5c2; font-size: 10px; white-space: nowrap; }
.edition-trigger .ui-icon { width: 15px; height: 15px; stroke-width: 1.3; }
.edition-trigger:hover { border-color: #d6c79b9c; background: #c0c5a717; }
.topbar-right { gap: 8px; }
.editions-backdrop { position: fixed; z-index: 145; inset: 0; display: grid; place-items: center; padding: 24px; background: #020709ad; backdrop-filter: blur(14px); }
.editions-backdrop[hidden] { display: none; }
.editions-dialog { width: min(100%,750px); max-height: min(92dvh,850px); display: flex; flex-direction: column; overflow: hidden; padding: 29px; border: 1px solid #c8c6ac63; border-radius: 15px; background: linear-gradient(130deg,#252d2ded,#121d25f7 65%); box-shadow: inset 0 1px #eee4c333,0 30px 100px #0009; color: #e5e4d9; outline: none; }
.editions-header { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 0 0 23px; }
.editions-eyebrow { color: #c5b998; font-size: 8px; letter-spacing: .18em; margin: 0 0 11px; }
.editions-header h2 { font-size: 27px; line-height: 1.3; font-weight: 450; letter-spacing: -.03em; margin: 0 0 8px; }
#editions-description { font-size: 11px; color: #a6b1b3; margin: 0; line-height: 1.7; }
.editions-close { flex: none; width: 33px; height: 33px; display: grid; place-items: center; padding: 8px; background: #07121b44; border: 1px solid #c9c9b62c; border-radius: 50%; color: #bac2bf; }
.editions-close .ui-icon { width: 15px; height: 15px; }
.editions-close:hover { color: #eee8d6; border-color: #cfcaaf73; }
.edition-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; overflow: auto; min-height: 0; margin: -3px; padding: 3px; scrollbar-width: thin; scrollbar-color: #a4b3ac5c transparent; }
.edition-choices { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 3px; margin: -3px; scrollbar-width: thin; }
.edition-choices .edition-grid { overflow: visible; grid-template-columns: repeat(3,minmax(0,1fr)); }
.editions-more { margin-top: 20px; border-top: 1px solid var(--finish-edge, #b9c1b72c); }
.editions-more > summary { padding: 15px 0; color: var(--finish-label, #d7d5cd); cursor: pointer; font-size: 12px; }
.editions-more > summary:focus-visible { outline: 2px solid var(--finish-icon, #cebea0); outline-offset: 2px; }
[data-edition-option^="minimal-"] .edition-preview-rail { background: #111; border-color: #333; }
[data-edition-option^="minimal-"] .edition-preview-rail::before { content: ''; width: 13px; height: 13px; background: #e8e8e8; border: 0; border-radius: 4px; }
[data-edition-option^="minimal-"] .edition-preview-rail i { background: #555; box-shadow: none; }
[data-edition-option^="minimal-"] .edition-preview-rail > span { background: transparent; border-color: #555; }
[data-edition-option^="minimal-"] .edition-preview-stage { background: #171717; }
[data-edition-option^="minimal-"] .edition-preview-stage > i { display: none; }
[data-edition-option^="minimal-"] .edition-preview-stage > span { color: #eee; font-size: 7px; text-shadow: none; }
[data-edition-option^="minimal-"] .edition-preview-stage > b { background: #272727; border-color: #555; border-radius: 7px; box-shadow: none; }
[data-edition-option="minimal-light"] .edition-preview-rail { background: #f5f5f5; border-color: #e6e6e6; }
[data-edition-option="minimal-light"] .edition-preview-rail::before { background: #222; }
[data-edition-option="minimal-light"] .edition-preview-rail i { background: #c8c8c8; }
[data-edition-option="minimal-light"] .edition-preview-rail > span { border-color: #d5d5d5; }
[data-edition-option="minimal-light"] .edition-preview-stage { background: #fff; }
[data-edition-option="minimal-light"] .edition-preview-stage > span { color: #222; }
[data-edition-option="minimal-light"] .edition-preview-stage > b { background: #fff; border-color: #d8d8d8; }
.edition-card { min-width: 0; text-align: left; display: flex; flex-direction: column; padding: 9px 9px 14px; border: 1px solid #b9c1b72c; border-radius: 10px; background: #07121a55; color: #dfe2da; box-shadow: inset 0 1px #edf0dc09; }
.edition-card:hover { border-color: #bec8b668; background: #9eac9d0a; }
.edition-card[aria-pressed="true"] { border-color: #d3c29bba; background: #c3c4a711; box-shadow: 0 0 0 1px #cfbf9721,inset 0 1px #e4d3b225; }
.edition-preview { height: 111px; display: flex; overflow: hidden; width: 100%; border: 1px solid #bfc8c41f; border-radius: 5px; background: #050e14; }
.edition-preview-rail { width: 24%; flex: none; display: flex; flex-direction: column; align-items: flex-start; padding: 12px 8px 8px; position: relative; border-right: 1px solid #bbba9e36; background: linear-gradient(100deg,#252724,#101818); }
.edition-preview-rail::before { content: 'V'; font-family: Georgia,serif; font-size: 9px; color: #dbd4bd; border: 1px solid #cebea26b; border-radius: 50%; width: 15px; height: 17px; display: grid; place-items: center; margin-bottom: 8px; }
.edition-preview-rail i { width: 82%; height: 3px; margin-bottom: 6px; background: #979e8b5c; border-radius: 1px; }
.edition-preview-rail i:first-child { background: #bab79b82; height: 6px; margin-bottom: 9px; }
.edition-preview-rail > span { margin-top: auto; width: 100%; height: 18px; border: 1px solid #a4ac8f44; border-radius: 3px; background: #98a18c12; }
.edition-preview-stage { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 40%,#333c3b55,#07111a); }
.edition-preview-stage > i { position: absolute; width: 88px; height: 88px; border: 2px solid #c9c5b75a; box-shadow: 0 0 0 3px #a6bac917,inset 0 0 20px #a2bed512; border-radius: 50%; top: 7px; }
.edition-preview-stage > span { position: relative; font-size: 10px; line-height: 1.5; text-align: center; color: #e3e2d7; font-weight: 450; margin-top: 4px; }
.edition-preview-stage > b { display: block; position: relative; width: 78%; height: 19px; border: 1px solid #a2b6b059; border-radius: 4px; background: #182630e6; margin-top: 8px; box-shadow: 0 4px 8px #0006; }
[data-edition-option="obsidian"] .edition-preview-rail { background: repeating-linear-gradient(0deg,#5747380c 0 1px,transparent 1px 4px),linear-gradient(100deg,#24211c,#10100f); }
[data-edition-option="obsidian"] .edition-preview-rail i:first-child { background: #1e1c18; box-shadow: 0 0 0 1px #c3a9764d; }
[data-edition-option="obsidian"] .edition-preview-stage { background: radial-gradient(ellipse at 50% 40%,#5d45252e,#100f0d); }
[data-edition-option="obsidian"] .edition-preview-stage > i { border-color: #d3b67675; }
[data-edition-option="obsidian"] .edition-preview-stage > b { background: #28221aed; border-color: #c7aa6c57; }
[data-edition-option="titanium"] .edition-preview-rail { background: repeating-linear-gradient(0deg,#c0e9fb04 0 1px,transparent 1px 3px),linear-gradient(120deg,#2b363e,#0e1720); border-right-color: #beddec5e; }
[data-edition-option="titanium"] .edition-preview-rail::before { border-radius: 3px; background: #8295a42c; border-color: #afc9db91; }
[data-edition-option="titanium"] .edition-preview-rail i:first-child { background: linear-gradient(110deg,#a7b8c2,#677986); }
[data-edition-option="titanium"] .edition-preview-stage > i { border-color: #b7dded9e; }
[data-edition-option="titanium"] .edition-preview-stage > b { border-radius: 1px; border-color: #b5d5e478; }
[data-edition-option="ivory"] .edition-preview-rail { background: linear-gradient(105deg,#f2eee5,#dbd6cb); border-right-color: #d4c5a6; }
[data-edition-option="ivory"] .edition-preview-rail::before { color: #5c5549; border-color: #a4998275; }
[data-edition-option="ivory"] .edition-preview-rail i { background: #9b978857; }
[data-edition-option="ivory"] .edition-preview-rail i:first-child { background: #33342e; }
[data-edition-option="ivory"] .edition-preview-rail > span { background: #fffbef; border-color: #b9af9777; }
[data-edition-option="ivory"] .edition-preview-stage > b { background: #e8e5dc; border-color: #f2eee4; }
.edition-card-heading { display: flex; align-items: center; gap: 9px; padding: 12px 7px 0; }
.edition-number { font-family: Georgia,serif; font-size: 13px; color: #9da79e; }
.edition-card-heading strong { font-size: 13px; font-weight: 450; letter-spacing: .025em; flex: 1; }
.edition-selected-mark { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #dbcaa6; border: 1px solid #c6b89670; opacity: 0; }
.edition-selected-mark .ui-icon { width: 11px; height: 11px; }
.edition-card[aria-pressed="true"] .edition-selected-mark { opacity: 1; }
.edition-caption { padding: 5px 7px 0 31px; font-size: 6px; letter-spacing: .13em; color: #8c9b9d; }
.edition-description { padding: 9px 7px 0; font-size: 10px; color: #aab3b1; line-height: 1.6; }
.editions-footer { flex: none; margin-top: 22px; padding-top: 18px; border-top: 1px solid #c0c3aa26; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.editions-selection-status { display: block; font-size: 11px; color: #cfc9b8; }
.editions-storage-note { display: block; font-size: 9px; color: #899b9f; line-height: 1.6; margin-top: 5px; }
.editions-view { flex: none; display: inline-flex; gap: 12px; align-items: center; min-height: 38px; padding: 10px 13px; border: 1px solid #c7bd9e7a; border-radius: 6px; color: #e1d8bf; background: linear-gradient(120deg,#96937322,#17242e); font-size: 11px; }
.editions-view .ui-icon { width: 14px; height: 14px; }
.editions-view:hover { border-color: #e4d1a6; background: #9b9c7f1f; }
body:has(.editions-backdrop:not([hidden])) #sidebar-editions { color: var(--cabin-accent); border-color: rgb(var(--cabin-rgb) / .25); background-color: rgb(var(--cabin-rgb) / .07); }
body[data-edition]:not([data-edition="original"])[data-ambient="glacier"] { --cabin-accent: #b4d5e3; --cabin-rgb: 180 213 227; --cabin-muted: #929fa6; }
body[data-edition]:not([data-edition="original"])[data-ambient="amethyst"] { --cabin-accent: #c8b8e4; --cabin-rgb: 200 184 228; --cabin-muted: #a197aa; }
@media (min-width: 761px) and (min-height: 501px), (min-width: 951px) { body.sidebar-collapsed .sidebar-edition-stamp { display: none; } }
@media (min-width:761px) and (max-width:1150px) { .edition-trigger .edition-current-name { display:none; } .edition-trigger { padding: 8px; } }
@media (max-height:820px) {
  .sidebar-top { padding-bottom: 12px; }
  .sidebar-edition-stamp { margin-bottom: 12px; padding: 7px 0; grid-template-columns: 20px 1fr; gap: 2px 7px; }
  .sidebar-edition-stamp > span { font-size: 15px; }
  .sidebar-edition-stamp strong { font-size: 9px; }
  .sidebar-edition-stamp small { font-size: 5.5px; }
  .studio-nav { gap: 1px; padding-block: 8px 13px; }
  .studio-nav-item { min-height: 38px; padding-block: 4px; }
  .sidebar-section-heading { margin-top: 15px; margin-bottom: 8px; }
  .conversation-search { margin-bottom: 5px; }
  .conversation-list { min-height: 43px; padding-bottom: 5px; }
  .conversation-empty { padding-block: 7px; flex-direction: row; align-items: center; gap: 8px; font-size: 10px; }
  .sidebar-bottom { padding-top: 8px; }
  .usage-mini { padding-block: 14px 9px; }
  .access-trigger { min-height: 52px; padding-block: 9px; }
  .side-footnote { margin-top: 9px; }
}
@media (max-width:760px) {
  .topbar { padding-inline: 12px; }
  .topbar-right { gap: 4px; }
  .topbar-left { gap: 5px; }
  .edition-trigger { padding: 7px; width: 31px; min-height: 31px; }
  .edition-trigger .edition-current-name { display:none; }
  .sidebar-edition-stamp { margin-bottom: 14px; }
  .editions-backdrop { padding: 12px; }
  .editions-dialog { padding: 18px; max-height: 94dvh; border-radius: 12px; }
  .editions-header { padding-bottom: 19px; gap: 12px; }
  .editions-header h2 { font-size: 24px; }
  #editions-description { font-size: 10px; }
  .editions-eyebrow { font-size: 7px; }
  .edition-grid { gap: 10px; }
  .edition-card { padding: 6px 6px 11px; }
  .edition-preview { height: 90px; }
  .edition-preview-rail { width: 25%; padding: 8px 4px; }
  .edition-preview-rail::before { width: 11px; height: 12px; font-size: 7px; margin-bottom: 6px; }
  .edition-preview-rail i { height: 2px; margin-bottom: 4px; }
  .edition-preview-stage > i { width: 66px; height: 66px; }
  .edition-preview-stage > span { font-size: 6px; }
  .edition-preview-stage > b { height: 14px; }
  .edition-card-heading { padding: 10px 2px 0; gap: 5px; }
  .edition-card-heading strong { font-size: 11px; letter-spacing: 0; }
  .edition-number { font-size: 11px; }
  .edition-selected-mark { width: 13px; height: 13px; }
  .edition-caption { padding-left: 19px; font-size: 5px; letter-spacing: .06em; }
  .edition-description { padding: 8px 2px 0; font-size: 9px; }
  .editions-footer { margin-top: 17px; padding-top: 14px; gap: 10px; align-items: flex-start; }
  .editions-selection-status { font-size: 10px; }
  .editions-storage-note { font-size: 8px; }
  .editions-view { padding: 8px; gap: 5px; font-size: 9px; min-height: 34px; }
}
@media (max-width:350px) { .topbar-title { max-width: 40px; } .editions-dialog { padding: 15px; } .editions-footer { flex-direction: column; align-items: stretch; } .editions-view { justify-content: center; } .edition-card-heading strong { font-size:10px; } }
@media (max-width:600px) {
  .edition-choices .edition-grid { grid-template-columns: 1fr; }
  .edition-choices .edition-card { display: grid; grid-template-columns: 104px minmax(0,1fr); grid-template-rows: auto auto auto; column-gap: 12px; padding: 9px; }
  .edition-choices .edition-preview { grid-column: 1; grid-row: 1 / 4; height: 80px; }
  .edition-choices .edition-card-heading { grid-column: 2; padding-top: 3px; }
  .edition-choices .edition-caption { grid-column: 2; padding-left: 2px; }
  .edition-choices .edition-description { grid-column: 2; padding-top: 6px; }
  .edition-choices .edition-preview-stage > span { font-size: 5px; }
}
