/* Helstify panel — Storage boxes. A file manager first: buckets on the left,
   the folder you are in on the right, everything else one rail button away. */

.sbx { --sbx-row: 40px; }
:where(.sbx) button { font: inherit; color: inherit; }
.sbx-mono { font-family: var(--hp-mono); font-size: 12.5px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.sbx-label { font: 500 10.5px/1.2 var(--hp-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--hp-ink-3); }
.sbx-fine { margin: 0; font-size: 12.5px; color: var(--hp-ink-3); }
.sbx-fine.is-bad { color: var(--hp-err); }
.sbx-fine.is-warn { color: color-mix(in srgb, var(--hp-warn) 75%, var(--hp-ink)); }
.sbx-sep { color: var(--hp-ink-3); margin: 0 6px; }
.sbx-break { word-break: break-all; }
.sbx-kbd { font: 500 10.5px/1 var(--hp-mono); padding: 2px 5px; border-radius: 4px; border: 1px solid var(--hp-line-2); color: var(--hp-ink-3); background: none; }
.sbx-link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--hp-ink); text-decoration: underline; text-decoration-color: var(--hp-line-2); text-underline-offset: 3px; }
.sbx-link:hover { color: var(--hp-accent); text-decoration-color: currentColor; }
.sbx-iconbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 28px; min-width: 28px; padding: 0 8px;
    border: 1px solid transparent; border-radius: 6px; background: none; cursor: pointer; color: var(--hp-ink-2);
    font: 500 12.5px/1 var(--hp-font) !important; white-space: nowrap;
}
.sbx-iconbtn:hover { background: var(--hp-fill-2); color: var(--hp-ink); }
.sbx-iconbtn:disabled { opacity: .4; pointer-events: none; }
.sbx-iconbtn.is-danger:hover { color: var(--hp-err); background: color-mix(in srgb, var(--hp-err) 9%, transparent); }
.sbx-chip { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 5px; border: 1px solid var(--hp-line-2); font: 500 11px/1 var(--hp-mono); color: var(--hp-ink-2); white-space: nowrap; }
.sbx-chip.is-pub { border-color: var(--hp-accent-line); color: var(--hp-accent); }
.sbx-chip.is-ro { border-style: dashed; }
.sbx-copy { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 3px 7px; border: 1px solid var(--hp-line-2); border-radius: 6px; background: var(--hp-fill); cursor: pointer; color: var(--hp-ink-2); }
.sbx-copy code { font: 500 12px/1.3 var(--hp-mono); color: var(--hp-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbx-copy:hover { border-color: var(--hp-ink-3); }
.sbx-code { margin: 0; padding: 14px 16px; border: 1px solid var(--hp-line-2); border-radius: 10px; background: var(--hp-bg-2); font: 400 12.5px/1.65 var(--hp-mono); color: var(--hp-ink); white-space: pre; overflow-x: auto; tab-size: 4; }
.hp-btn--danger-solid { background: var(--hp-err) !important; color: #fff !important; }
.sbx-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.sbx-field .hp-input { width: 100%; }
.sbx-notice { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid color-mix(in srgb, var(--hp-warn) 45%, transparent); border-radius: 10px; font-size: 13px; }
.sbx-notice > span { flex: 1; }

.sbx-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 50; min-width: 180px; padding: 4px; border: 1px solid var(--hp-line-2); border-radius: 8px; background: var(--hp-bg-2); box-shadow: 0 14px 34px -14px rgb(0 0 0 / .4); }
.sbx-menu--float { position: fixed; right: auto; top: 0; transform: translateX(-100%); }
.sbx-menu button { display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: 5px; background: none; text-align: left; font-size: 13px; cursor: pointer; color: var(--hp-ink); white-space: nowrap; }
.sbx-menu button:hover { background: var(--hp-fill-2); }
.sbx-menu button:disabled { opacity: .45; pointer-events: none; }
.sbx-menu .is-danger { color: var(--hp-err); }
.sbx-menu hr { border: 0; border-top: 1px solid var(--hp-line); margin: 4px 0; }

/* ============================================================ files ===== */
.sbf { flex: 1; min-height: 0; display: grid; grid-template-columns: 232px minmax(0, 1fr); height: max(520px, calc(100dvh - 232px)); border: 1px solid var(--hp-line-2); border-radius: var(--hp-r-lg); background: var(--hp-bg); overflow: hidden; }
.sbf[x-cloak], .sbf[style*="display: none"] { display: none; }

.sbf-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--hp-line); background: var(--hp-surface); }
.sbf-side__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 8px 16px; }
.sbf-side__list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px; display: flex; flex-direction: column; gap: 1px; scrollbar-width: thin; }
.sbf-side__skel { display: grid; gap: 8px; padding: 6px 8px; }
.sbf-side__skel i { display: block; height: 18px; }
.sbf-side__none { padding: 8px; }
.sbf-bucket { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; height: 34px; padding: 0 8px; border: 0; border-radius: 7px; background: none; cursor: pointer; color: var(--hp-ink-2); text-align: left; }
.sbf-bucket:hover { background: var(--hp-fill-2); color: var(--hp-ink); }
.sbf-bucket.is-active { background: var(--hp-bg); color: var(--hp-ink); box-shadow: inset 0 0 0 1px var(--hp-line-2); }
.sbf-bucket.is-active > .hp-ico:first-child { color: var(--hp-accent); }
.sbf-bucket__name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbf-bucket__pub { color: var(--hp-accent); }
.sbf-bucket small { font: 400 11px/1 var(--hp-mono); color: var(--hp-ink-3); }
.sbf-side__foot { display: flex; flex-direction: column; gap: 7px; padding: 14px 16px 16px; border-top: 1px solid var(--hp-line); font-size: 12px; color: var(--hp-ink-3); }
.sbf-side__foot b { color: var(--hp-ink); font-weight: 600; }

.sbf-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; container: sbmain / inline-size; }
.sbf-tool { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 16px 10px 18px; border-bottom: 1px solid var(--hp-line); }
.sbf-tool__buckets { display: none !important; }
.sbf-crumbs { display: flex; align-items: center; min-width: 120px; flex: 1; overflow: hidden; white-space: nowrap; }
.sbf-crumb__wrap { display: inline-flex; align-items: center; min-width: 0; }
.sbf-crumb__wrap > i { font-style: normal; color: var(--hp-ink-3); margin: 0 2px; }
.sbf-crumb { height: 28px; padding: 0 6px; border: 0; border-radius: 6px; background: none; cursor: pointer; color: var(--hp-ink-2); font-size: 14px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.sbf-crumb:hover { background: var(--hp-fill-2); color: var(--hp-ink); }
.sbf-crumb.is-root { font: 600 14px/1 var(--hp-display); letter-spacing: -0.01em; color: var(--hp-ink); }
.sbf-crumb__wrap:last-child .sbf-crumb { color: var(--hp-ink); font-weight: 500; }
.sbf-tool__end { display: flex; align-items: center; gap: 6px; flex: none; }
.sbf-filter { display: flex; align-items: center; gap: 7px; height: 30px; width: 210px; padding: 0 8px 0 10px; border: 1px solid var(--hp-line-2); border-radius: 8px; color: var(--hp-ink-3); background: var(--hp-bg); }
.sbf-filter:focus-within { border-color: var(--hp-accent-line); box-shadow: 0 0 0 3px var(--hp-accent-soft); }
.sbf-filter input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--hp-ink); font: 13px var(--hp-font); }
.sbf-filter input::-webkit-search-cancel-button { display: none; }
.sbf-seg { display: inline-flex; padding: 2px; border: 1px solid var(--hp-line-2); border-radius: 8px; background: var(--hp-fill); }
.sbf-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 28px; height: 24px; padding: 0 8px; border: 0; border-radius: 6px; background: none; cursor: pointer; color: var(--hp-ink-3); font-size: 12.5px; }
.sbf-seg button.is-on { background: var(--hp-bg); color: var(--hp-ink); box-shadow: 0 0 0 1px var(--hp-line-2); }
.sbf-split { position: relative; display: inline-flex; }
.sbf-split > .hp-btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.sbf-split__more { width: 28px !important; padding: 0 !important; border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; border-left: 1px solid rgb(255 255 255 / .28) !important; }

.sbf-selbar { display: flex; align-items: center; gap: 4px; padding: 6px 12px 6px 18px; border-bottom: 1px solid var(--hp-line); background: var(--hp-accent-soft); font-size: 13px; }
.sbf-selbar > span { margin-right: auto; }

.sbf-head, .sbf-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 110px 170px 76px; align-items: center; }
.sbf-head { height: 34px; padding: 0 8px 0 10px; border-bottom: 1px solid var(--hp-line); }
.sbf-head > button { justify-self: start; height: 26px; padding: 0 6px; border: 0; border-radius: 5px; background: none; cursor: pointer; font: 500 10.5px/1 var(--hp-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--hp-ink-3); }
.sbf-head > button:hover, .sbf-head > button.is-sorted { color: var(--hp-ink); }
.sbf-head > button i { font-style: normal; }
.sbf-check { display: grid; place-items: center; width: 28px; height: 28px; cursor: pointer; }
.sbf-check input { width: 14px; height: 14px; margin: 0; accent-color: var(--hp-accent); cursor: pointer; }

.sbf-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.sbf-row { height: var(--sbx-row); padding: 0 8px 0 10px; border-bottom: 1px solid var(--hp-line); cursor: default; user-select: none; }
.sbf-row:hover { background: var(--hp-fill); }
.sbf-row.is-sel { background: var(--hp-accent-soft); }
.sbf-row.is-folder { cursor: pointer; }
.sbf-row .sbf-check { opacity: 0; transition: opacity .1s; }
.sbf-row:hover .sbf-check, .sbf-row.is-sel .sbf-check, .sbf-list:has(.is-sel) .sbf-check { opacity: 1; }
.sbf-name { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 6px; font-size: 13.5px; }
.sbf-name img { flex: none; }
.sbf-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbf-row.is-folder .sbf-name span { font-weight: 500; }
.sbf-col-size, .sbf-col-date { padding: 0 6px; color: var(--hp-ink-3); font-size: 12.5px; white-space: nowrap; }
.sbf-row .sbf-col-size { color: var(--hp-ink-2); }
.sbf-act { display: flex; justify-content: flex-end; gap: 2px; opacity: 0; transition: opacity .1s; }
.sbf-row:hover .sbf-act, .sbf-row:focus-within .sbf-act { opacity: 1; }
.sbf-act .sbx-iconbtn { min-width: 28px; padding: 0; }

.sbf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 16px 18px; }
.sbf-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 8px 8px 10px; border: 1px solid var(--hp-line); border-radius: 10px; cursor: pointer; min-width: 0; }
.sbf-tile:hover { border-color: var(--hp-line-2); background: var(--hp-fill); }
.sbf-tile.is-sel { border-color: var(--hp-accent-line); background: var(--hp-accent-soft); }
.sbf-tile .sbf-check { position: absolute; top: 10px; left: 10px; z-index: 1; opacity: 0; background: var(--hp-bg); border-radius: 6px; width: 24px; height: 24px; }
.sbf-tile:hover .sbf-check, .sbf-tile.is-sel .sbf-check { opacity: 1; }
.sbf-tile__pic { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 6px; background: var(--hp-bg-2); overflow: hidden; margin-bottom: 4px; }
.sbf-tile__pic img:not(.is-icon) { width: 100%; height: 100%; object-fit: cover; }
.sbf-tile__name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbf-tile small { font: 400 11px/1 var(--hp-mono); color: var(--hp-ink-3); }

.sbf-skel { display: grid; }
.sbf-skel > div { display: grid; grid-template-columns: 1fr 90px 140px; gap: 24px; align-items: center; height: var(--sbx-row); padding: 0 24px 0 52px; border-bottom: 1px solid var(--hp-line); }
.sbf-skel i { display: block; height: 11px; }
.sbf-skel > div:nth-child(3n+1) i:first-child { width: 62%; }
.sbf-skel > div:nth-child(3n+2) i:first-child { width: 44%; }
.sbf-skel > div:nth-child(3n) i:first-child { width: 71%; }
.sbf-more { display: flex; justify-content: center; padding: 16px; }
.sbf-count { margin: 0; padding: 12px 20px 20px; font: 400 11.5px/1 var(--hp-mono); color: var(--hp-ink-3); }

.sbf-blank { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; max-width: 440px; margin: 0 auto; padding: 72px 24px; }
.sbf-blank h2 { margin: 8px 0 0; font: 600 18px/1.25 var(--hp-display); letter-spacing: -0.02em; }
.sbf-blank p { margin: 0 0 10px; font-size: 13.5px; color: var(--hp-ink-2); }
.sbf-blank--drop { margin-top: 28px; border: 1px dashed var(--hp-line-2); border-radius: 14px; padding: 48px 32px; }

.sbf-drop { position: absolute; inset: 8px; z-index: 20; display: grid; place-items: center; border: 1.5px dashed var(--hp-accent); border-radius: 12px; background: color-mix(in srgb, var(--hp-bg) 88%, transparent); pointer-events: none; }
.sbf-drop > div { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--hp-ink-2); font-size: 13px; }
.sbf-drop strong { font: 600 16px/1.2 var(--hp-display); color: var(--hp-ink); }
.sbf-drop .hp-ico { color: var(--hp-accent); }

/* =========================================================== pages ====== */
.sbx-page { display: flex; flex-direction: column; gap: 18px; max-width: 1180px; }
.sbx-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.sbx-head h2 { margin: 0 0 4px; font: 600 18px/1.25 var(--hp-display); letter-spacing: -0.02em; }
.sbx-head p { max-width: 70ch; }

.sbx-table { border: 1px solid var(--hp-line-2); border-radius: 12px; overflow: hidden; }
.sbx-tr { display: grid; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px 0 16px; border-top: 1px solid var(--hp-line); font-size: 13.5px; }
.sbx-th { min-height: 36px; border-top: 0; background: var(--hp-surface); font: 500 10.5px/1 var(--hp-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--hp-ink-3); }

/* overview */
.sbo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sbo > * { border: 1px solid var(--hp-line-2); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sbo-use { grid-row: span 2; }
.sbo-use__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.sbo-traffic__head { display: flex; flex-direction: column; gap: 10px; }
.sbo-big { margin: 8px 0 0; font: 600 34px/1 var(--hp-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.sbo-big small, .sbo-mid small { font: 500 14px/1 var(--hp-font); letter-spacing: 0; color: var(--hp-ink-3); }
.sbo-mid { margin: 8px 0 0; font: 600 20px/1.1 var(--hp-display); letter-spacing: -0.03em; }
.sbo-use__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sbo-use__side .sbx-mono { font-size: 15px; font-weight: 600; }
.sbo-bar { position: relative; height: 14px; border-radius: 4px; background: var(--hp-fill-2); overflow: hidden; }
.sbo-bar i, .sbo-legend i { position: absolute; top: 0; bottom: 0; }
.sbo-bar i + i { box-shadow: -1px 0 0 var(--hp-bg); }
.is-s0 { background: var(--hp-accent); }
.is-s1 { background: var(--hp-ink); }
.is-s2 { background: var(--hp-ink-3); }
.is-s3 { background: color-mix(in srgb, var(--hp-accent) 45%, var(--hp-bg)); }
.is-none { background: var(--hp-fill-2); }
.sbo-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sbo-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 90px; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--hp-line); font-size: 13.5px; }
.sbo-legend li > i { position: static; width: 10px; height: 10px; border-radius: 3px; }
.sbo-legend .sbx-link { text-decoration: none; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.sbo-legend .sbx-fine { text-align: right; }
.sbo-note { margin-top: auto; }
.sbo-key { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; font-size: 12px; color: var(--hp-ink-3); }
.sbo-key li { display: flex; align-items: center; gap: 6px; }
.sbo-key i { width: 9px; height: 9px; border-radius: 2px; }
.sbo-key .is-out, .sbo-out { background: var(--hp-accent); fill: var(--hp-accent); }
.sbo-key .is-in, .sbo-in { background: var(--hp-ink-3); fill: var(--hp-ink-3); }
.sbo-chart { position: relative; }
.sbo-chart svg { display: block; width: 100%; height: 140px; }
.sbo-axis { stroke: var(--hp-line-2); stroke-width: 1; }
.sbo-chart__x { display: flex; justify-content: space-between; margin-top: 6px; font: 400 11px/1 var(--hp-mono); color: var(--hp-ink-3); }
.sbo-chart__max { position: absolute; top: -2px; left: 0; font-size: 10.5px; color: var(--hp-ink-3); }
.sbo-facts dl { margin: 0; display: flex; flex-direction: column; }
.sbo-facts dl > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--hp-line); font-size: 13.5px; }
.sbo-facts dl > div:first-child { border-top: 0; padding-top: 0; }
.sbo-facts dt { color: var(--hp-ink-3); }
.sbo-facts dd { margin: 0; min-width: 0; font-weight: 500; }
.sbo-facts code { font: 500 12.5px var(--hp-mono); }

/* buckets */
.sbb-new { display: flex; align-items: flex-end; gap: 12px; padding: 16px; border: 1px solid var(--hp-line-2); border-radius: 12px; background: var(--hp-surface); }
.sbb-new .sbx-field { flex: 1; max-width: 420px; }
.sbb-new__go { display: flex; gap: 6px; padding-bottom: 22px; }
.sbb-cols { grid-template-columns: minmax(0, 1.6fr) 80px 100px 120px 120px 132px; }
.sbb-item > .sbx-tr { cursor: pointer; }
.sbb-item > .sbx-tr:hover { background: var(--hp-fill); }
.sbb-item.is-open > .sbx-tr { background: var(--hp-fill); }
.sbb-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sbb-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbb-name .hp-ico { color: var(--hp-ink-3); flex: none; }
.sbb-go { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.sbb-chev { color: var(--hp-ink-3); transition: transform .15s; }
.sbb-item.is-open .sbb-chev { transform: rotate(180deg); }
.sbb-cfg { padding: 4px 16px 16px 42px; border-top: 1px solid var(--hp-line); background: var(--hp-fill); }
.sbb-cfg__skel { display: grid; gap: 10px; padding: 14px 0; }
.sbb-cfg__skel i { display: block; height: 14px; width: 60%; }
.sbb-cfg__grid { display: flex; flex-direction: column; }
.sbb-set { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0; border-top: 1px solid var(--hp-line); }
.sbb-set:first-child { border-top: 0; }
.sbb-set > div:first-child { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; max-width: 64ch; }
.sbb-set strong { font-size: 13.5px; font-weight: 600; }
.sbb-days { display: flex; align-items: center; gap: 8px; flex: none; }
.sbb-days .hp-input { width: 92px; height: 32px; }

/* keys */
.sbk-cols { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1.3fr) 110px 132px; }
.sbk-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sbk-name .hp-ico { color: var(--hp-ink-3); flex: none; }
.sbk-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbk-scope { display: flex; flex-wrap: wrap; gap: 5px; }
.sbk-act { display: flex; justify-content: flex-end; gap: 2px; }
.sbk-form, .sbk-made { padding: 18px; border: 1px solid var(--hp-line-2); border-radius: 12px; background: var(--hp-surface); }
.sbk-made { border-color: var(--hp-accent-line); }
.sbk-made > div { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.sbk-made__head { display: flex; flex-direction: column; gap: 3px; }
.sbk-form__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 14px; align-items: end; }
.sbk-form__go { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 6px; }
.sbk-perm { height: 40px; align-items: center; }
.sbk-perm button { height: 32px; padding: 0 12px; }
.sbk-cred { margin: 0; width: 100%; display: flex; flex-direction: column; border: 1px solid var(--hp-line-2); border-radius: 10px; background: var(--hp-bg); }
.sbk-cred > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-top: 1px solid var(--hp-line); }
.sbk-cred > div:first-child { border-top: 0; }
.sbk-cred dt { font-size: 12.5px; color: var(--hp-ink-3); }
.sbk-cred dd { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.sbk-cred code { font: 500 13px/1.4 var(--hp-mono); word-break: break-all; }
.sbk-rclone { width: 100%; }
.sbk-rclone summary { cursor: pointer; font-size: 13px; color: var(--hp-ink-2); margin-bottom: 8px; }
.sbk-rclone .sbx-iconbtn { margin-top: 6px; }

/* connect */
.sbc-creds { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--hp-line-2); border-radius: 12px; overflow: hidden; }
.sbc-creds > div { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-left: 1px solid var(--hp-line); min-width: 0; }
.sbc-creds > div:first-child { border-left: 0; }
.sbc-creds dt { font: 500 10.5px/1 var(--hp-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--hp-ink-3); }
.sbc-creds dd { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.sbc-creds dd > code { font: 500 12.5px/1.3 var(--hp-mono); }
.sbc-tools { border: 1px solid var(--hp-line-2); border-radius: 12px; overflow: hidden; }
.sbc-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--hp-line); background: var(--hp-surface); scrollbar-width: none; }
.sbc-tabs button { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; white-space: nowrap; color: var(--hp-ink-3); font-size: 13px; font-weight: 500; }
.sbc-tabs button:hover { color: var(--hp-ink); }
.sbc-tabs button.is-on { color: var(--hp-ink); border-bottom-color: var(--hp-accent); }
.sbc-snip { position: relative; }
.sbc-snip .sbx-code { border: 0; border-radius: 0; background: var(--hp-bg); padding: 18px 20px; }
.sbc-copy { position: absolute; top: 10px; right: 10px; background: var(--hp-bg-2); border-color: var(--hp-line-2); }
.sbc-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sbc-notes > div { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; border: 1px solid var(--hp-line); border-radius: 12px; }
.sbc-notes strong { font-size: 13.5px; }

/* ===================================================== chrome =========== */
.sbx-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(480px, 100vw); border-left: 1px solid var(--hp-line-2); background: var(--hp-bg); box-shadow: -24px 0 60px -30px rgb(0 0 0 / .45); }
.sbx-drawer__in { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.sbx-drawer__in--link { gap: 14px; padding-bottom: 18px; }
.sbx-drawer__in--link > p, .sbx-drawer__in--link > textarea, .sbx-drawer__in--link > .sbx-drawer__go { margin: 0 18px; }
.sbx-drawer__head { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 10px 0 18px; border-bottom: 1px solid var(--hp-line); flex: none; }
.sbx-drawer__head strong { flex: 1; min-width: 0; font: 600 14px/1.2 var(--hp-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbx-drawer__view { flex: 1 1 auto; min-height: 180px; max-height: 58%; display: grid; place-items: center; background: var(--hp-bg-2); border-bottom: 1px solid var(--hp-line); overflow: auto; }
.sbx-drawer__view img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sbx-drawer__view.is-image { background: var(--hp-fill-2); }
.sbx-drawer__view video { width: 100%; max-height: 100%; background: #000; }
.sbx-drawer__view audio { width: calc(100% - 36px); }
.sbx-drawer__view iframe { width: 100%; height: 100%; min-height: 420px; border: 0; background: #fff; }
.sbx-drawer__view.is-text { place-items: stretch; }
.sbx-drawer__view .sbx-code { border: 0; border-radius: 0; background: none; white-space: pre-wrap; word-break: break-word; font-size: 12px; }
.sbx-drawer__wait { width: 60%; } .sbx-drawer__wait i { display: block; height: 120px; }
.sbx-drawer__none { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sbx-drawer__meta { margin: 0; padding: 6px 18px; overflow-y: auto; flex: 1 1 0; min-height: 90px; }
.sbx-drawer__meta > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid var(--hp-line); font-size: 13px; }
.sbx-drawer__meta > div:first-child { border-top: 0; }
.sbx-drawer__meta dt { color: var(--hp-ink-3); }
.sbx-drawer__meta dd { margin: 0; min-width: 0; }
.sbx-drawer__go { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--hp-line); flex: none; }
.sbx-drawer__in--link .sbx-drawer__go { border: 0; padding: 0; }
.sbx-linkbox { height: auto !important; resize: none; font-size: 12px !important; line-height: 1.5 !important; word-break: break-all; }

.sbx-tray { position: fixed; right: 20px; bottom: 20px; z-index: 65; width: min(400px, calc(100vw - 24px)); border: 1px solid var(--hp-line-2); border-radius: 12px; background: var(--hp-bg); box-shadow: 0 24px 60px -24px rgb(0 0 0 / .5); overflow: hidden; }
.sbx-tray__head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 14px; cursor: pointer; }
.sbx-tray__head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sbx-tray__head strong { font-size: 13.5px; }
.sbx-tray__head small { font-size: 11px; color: var(--hp-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbx-tray__chev { display: inline-flex; color: var(--hp-ink-3); transition: transform .15s; }
.sbx-tray__chev.is-up { transform: rotate(180deg); }
.sbx-tray__bar { height: 2px !important; border-radius: 0 !important; }
.sbx-tray__list { list-style: none; margin: 0; padding: 4px 0; max-height: 280px; overflow-y: auto; scrollbar-width: thin; }
.sbx-tray__list li { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 10px 6px 14px; font-size: 12.5px; }
.sbx-tray__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbx-tray__st { font-size: 11px; color: var(--hp-ink-3); }
.sbx-tray__list li.is-done .sbx-tray__st { color: var(--hp-ok); }
.sbx-tray__list li.is-error .sbx-tray__st, .sbx-tray__err { color: var(--hp-err); }
.sbx-tray__list li.is-cancelled { opacity: .5; }
.sbx-tray__err { grid-column: 2 / -1; margin: 0; font-size: 11.5px; }
.sbx-tray__prog { position: absolute; left: 14px; right: 10px; bottom: 1px; height: 2px; background: var(--hp-fill-2); }
.sbx-tray__prog::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--v); background: var(--hp-accent); transition: width .3s linear; }

.sbx-progress { position: fixed; left: 50%; bottom: 24px; z-index: 66; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--hp-line-2); border-radius: 10px; background: var(--hp-bg); box-shadow: 0 18px 40px -20px rgb(0 0 0 / .45); font-size: 13px; }
.sbx-spin { width: 14px; height: 14px; border: 2px solid var(--hp-line-2); border-top-color: var(--hp-accent); border-radius: 50%; animation: sbx-spin .7s linear infinite; }
@keyframes sbx-spin { to { transform: rotate(360deg); } }

.sbx-dialog { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .42); }
.sbx-dialog__box { width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--hp-line-2); border-radius: 14px; background: var(--hp-bg); box-shadow: var(--hp-shadow-lg); }
.sbx-dialog__box h2 { margin: 0; font: 600 16px/1.3 var(--hp-display); letter-spacing: -0.015em; }
.sbx-dialog__box p { margin: 0; font-size: 13.5px; color: var(--hp-ink-2); }
.sbx-dialog__box code { font: 500 12px var(--hp-mono); color: var(--hp-ink); }
.sbx-dialog__seg { align-self: flex-start; }
.sbx-dialog__seg button { height: 30px; padding: 0 14px; }
.sbx-dialog__go { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.sbx-toasts { position: fixed; left: 50%; top: 18px; z-index: 95; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.sbx-toast { display: flex; align-items: center; gap: 9px; max-width: min(560px, calc(100vw - 32px)); padding: 9px 14px; border: 1px solid var(--hp-line-2); border-radius: 9px; background: var(--hp-bg); box-shadow: 0 14px 34px -16px rgb(0 0 0 / .45); font-size: 13px; pointer-events: auto; cursor: pointer; }
.sbx-toast.is-err { border-color: color-mix(in srgb, var(--hp-err) 45%, transparent); }

/* ===================================================== responsive ======= */
@media (max-width: 1180px) {
    .sbo { grid-template-columns: minmax(0, 1fr); }
    .sbo-use { grid-row: auto; }
}
@media (max-width: 900px) {
    .sbf { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 230px); min-height: 480px; }
    .sbf-side { position: absolute; z-index: 30; top: 0; bottom: 0; left: 0; width: 260px; transform: translateX(-104%); visibility: hidden; transition: transform .2s var(--hp-ease), visibility 0s .2s; }
    .sbf-side.is-open { transform: none; visibility: visible; transition: transform .2s var(--hp-ease); box-shadow: 12px 0 40px -20px rgb(0 0 0 / .4); }
    .sbf { position: relative; }
    .sbf-tool { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
    .sbf-tool__buckets { display: inline-flex !important; }
    .sbf-tool__end { width: 100%; }
    .sbf-filter { flex: 1; width: auto; }
    .sbf-hide-s { display: none; }
    .sbf-act { opacity: 1; }
    .sbf-row .sbf-check { opacity: 1; }

    .sbx-head { flex-direction: column; }
    .sbb-cols { grid-template-columns: minmax(0, 1fr) 80px 40px; }
    .sbb-cols > :nth-child(2), .sbb-cols > :nth-child(4), .sbb-cols > :nth-child(5) { display: none; }
    .sbb-go .sbx-iconbtn { display: none; }
    .sbb-cfg { padding-left: 16px; }
    .sbb-set { flex-direction: column; align-items: flex-start; gap: 10px; }
    .sbb-new { flex-direction: column; align-items: stretch; }
    .sbb-new__go { padding: 0; justify-content: flex-end; }
    .sbk-cols { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px; }
    .sbk-cols > :nth-child(2), .sbk-cols > :nth-child(4) { display: none; }
    .sbk-cols > .sbk-scope { grid-column: 1; grid-row: 2; }
    .sbk-cols > .sbk-act { grid-column: 2; grid-row: 1 / span 2; }
    .sbk-form__grid { grid-template-columns: minmax(0, 1fr); }
    .sbc-notes { grid-template-columns: minmax(0, 1fr); }
    .sbc-creds { grid-template-columns: minmax(0, 1fr); }
    .sbc-creds > div { border-left: 0; border-top: 1px solid var(--hp-line); }
    .sbc-creds > div:first-child { border-top: 0; }
    .sbo-legend li { grid-template-columns: 10px minmax(0, 1fr) auto; }
    .sbo-legend li .sbx-fine { display: none; }
    .sbx-tray { right: 12px; bottom: 12px; }

}

/* The file area answers to its own width, which the AI dock and the rail change. */
@container sbmain (max-width: 820px) {
    .sbf-filter { width: 150px; }
    .sbf-hide-s { display: none; }
    .sbf-col-date { display: none; }
    .sbf-head, .sbf-row { grid-template-columns: 34px minmax(0, 1fr) 96px 76px; }
}
@container sbmain (max-width: 640px) {
    .sbf-tool { flex-wrap: wrap; }
    .sbf-tool__end { width: 100%; flex-wrap: wrap; }
    .sbf-filter { flex: 1; width: auto; }
}
@container sbmain (max-width: 460px) {
    .sbf-filter { flex: 1 1 100%; order: 9; }
    .sbf-tool__end { justify-content: flex-end; }
    .sbf-tool__end > .sbx-iconbtn { margin-right: auto; }
    .sbf-head, .sbf-row { grid-template-columns: 30px minmax(0, 1fr) 64px 32px; padding: 0 4px 0 6px; }
    .sbf-act .sbx-iconbtn:not(:last-child) { display: none; }
    .sbf-name { gap: 8px; padding: 0 2px; }
    .sbf-col-size { padding: 0 2px; font-size: 11.5px; }
    .sbf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
    .sbf-selbar { flex-wrap: wrap; padding-left: 12px; }
}
