/* SSH Console app. Tokens live in base.css. */
html, body { height: 100%; }
.err { color: var(--fehler); font-weight: 550; }
.err:empty, .hint:empty { display: none; }
.ok { color: var(--schluessel); font-weight: 600; }
.hint { color: var(--ink-2); font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 620; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.check { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; line-height: 1.35; }
.check input { margin-top: 1px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--kabel); font-weight: 600; cursor: pointer; font-size: 12.5px; }
.wide { width: 100%; }
.icon.big { width: 44px; height: 44px; stroke-width: 1.3; }

/* ---------- login ---------- */
#login-screen { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(380px, 100%); border: 1px solid #ccc; padding: 20px; }
.login-mark { display: flex; align-items: center; gap: 8px; color: var(--kabel); font-weight: 650; font-size: 13px; }
.login-card h1 { font-size: 20px; margin: 6px 0 14px; }
#s-qr { align-self: center; border-radius: var(--r-md); border: 1px solid var(--line); }
#l-go { min-height: 42px; margin-top: 4px; }

/* ---------- frame ---------- */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--paper); }
#header {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 8px; flex: none;
  background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 3;
}
.brand { width: 30px; height: 30px; display: grid; place-items: center; color: #000; flex: none; }
.brand .icon { width: 20px; height: 20px; stroke-width: 2.1; }
#tabs { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; }
#tabs::-webkit-scrollbar { display: none; }
#quick input { width: 200px; min-height: 34px; font-family: var(--mono); font-size: 13px; background: var(--wash); border-color: var(--line); transition: width var(--t-med) var(--ease), border-color var(--t-fast), box-shadow var(--t-fast); }
#quick input:focus { width: 260px; background: var(--paper); }
#tb-sftp[aria-pressed=true] { background: var(--quittung-soft); border-color: var(--quittung); color: var(--quittung-ink); }
#tb-sftp[aria-pressed=true] .icon { fill: var(--quittung); stroke: var(--quittung-ink); }
#tb-shares .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ddd; color: #000; font-size: 12px; font-weight: 750; display: grid; place-items: center; font-variant-numeric: tabular-nums; }

/* session tabs: luggage tags with a coloured punch hole */
.tab { --hue: #888; display: flex; align-items: center; gap: 6px; height: 30px; max-width: 230px; padding: 0 2px 0 8px; flex: none; border: 1px solid #ccc; background: #f4f4f4; cursor: pointer; user-select: none; white-space: nowrap; color: #333; }
@keyframes tag-in { from { opacity: 0; transform: translateY(-8px) rotate(-3deg); } }
.tab:active { transform: scale(.97); }
@media (hover: hover) { .tab:hover { border-color: var(--line-strong); color: var(--ink); } }
.tab.active { background: #fff; border-color: #666; color: #000; font-weight: 600; }
.tab .st { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #bbb; transition: background-color var(--t-med) var(--ease); }
.tab.live .st { background: #1a7f37; }
.tab.wait .st { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { background: var(--hue); } }
.tab.dead { color: var(--ink-3); }
.tab.dead .tt { text-decoration: line-through; }
.tab .tt { overflow: hidden; text-overflow: ellipsis; }
.tab.activity:not(.active) .tt { color: var(--ink); font-weight: 750; }
.tab.activity:not(.active) .st { box-shadow: 0 0 0 2.5px var(--hue), 0 0 0 5px color-mix(in srgb, var(--hue) 30%, transparent); }
.tab .x { width: 24px; height: 24px; border: 0; background: none; border-radius: 5px; display: grid; place-items: center; color: inherit; cursor: pointer; opacity: .55; padding: 0; }
.tab .x .icon { width: 14px; height: 14px; }
@media (hover: hover) { .tab .x:hover { opacity: 1; background: var(--wash-2); } }
.tab.dragover { outline: 2px dashed var(--kabel); outline-offset: 2px; }
.tab-new { order: 99; flex: none; }

.workspace { flex: 1; display: flex; min-height: 0; position: relative; }
.termwrap { flex: 1; position: relative; min-width: 0; min-height: 0; background: #000; }
#terms, .term { position: absolute; inset: 0; }
.term { visibility: hidden; padding: 6px 0 0 8px; }
.term.active { visibility: visible; }
.term .xterm { height: 100%; }
.empty { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; background: var(--wash); color: var(--ink-2); font-weight: 600; }
.empty .icon { color: var(--kabel); }
.overlay {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center;
  background: rgb(10 14 24 / .62); color: #fff; text-align: center; padding: 20px; font-weight: 600;
  animation: fade var(--t-med) var(--ease);
}
.overlay:not(:has(#overlay-btn:not([hidden]))) { pointer-events: none; }
.searchbar {
  position: absolute; top: 10px; right: 22px; z-index: 6; display: flex; gap: 4px; align-items: center; padding: 5px 6px 5px 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop);
  animation: drop var(--t-med) var(--spring);
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
.searchbar #search-input { width: 200px; border: 0; min-height: 30px; padding: 0 4px; box-shadow: none !important; }
.chk { display: flex; gap: 4px; align-items: center; font: 600 12px var(--mono); color: var(--ink-2); padding: 0 4px; cursor: pointer; }

#statusbar { display: flex; align-items: center; flex: none; height: 26px; font-size: 12px; color: var(--ink-2); background: var(--paper); border-top: 1px solid var(--line); padding-left: 10px; }
#statusbar > span:not(.dot) { padding: 0 10px; white-space: nowrap; }
#statusbar > span + span:not(.grow) { border-left: 1px solid var(--line); }
#statusbar .grow { overflow: hidden; text-overflow: ellipsis; }
#statusbar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: background-color var(--t-med); }
#statusbar .dot.live { background: var(--schluessel); }
#statusbar .dot.wait { background: var(--quittung); }
#st-lat.good { color: var(--schluessel); }
#st-lat.bad { color: var(--fehler); }

#keybar, #fkeys { display: flex; gap: 5px; padding: 6px 8px; background: var(--wash); border-top: 1px solid var(--line); flex: none; overflow-x: auto; scrollbar-width: none; }
#fkeys { border-top: 0; padding-top: 0; }
#keybar button, #fkeys button { flex: none; min-width: 42px; height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 7px; background: var(--paper); font: 600 13px var(--mono); touch-action: manipulation; transition: transform var(--t-press) var(--ease), background-color var(--t-fast); }
#keybar button:active, #fkeys button:active { transform: translateY(1px); border-bottom-width: 1px; }
#keybar button.on { background: var(--kabel); border-color: var(--kabel-deep); color: #fff; }

/* ---------- files ---------- */
.resizer { width: 6px; margin: 0 -3px; cursor: col-resize; z-index: 4; position: relative; flex: none; background: transparent; touch-action: none; }
.resizer::after { content: ''; position: absolute; inset: 0 2px; background: transparent; transition: background-color var(--t-fast); }
.resizer:hover::after, .resizer.drag::after, .resizer:focus-visible::after { background: var(--kabel); }
.files {
  --w: 460px; width: var(--w); flex: none; display: flex; flex-direction: column; min-height: 0; position: relative;
  background: var(--paper); border-left: 1px solid var(--line);
  animation: slide-in var(--t-slow) var(--ease);
}
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.files.max { position: absolute; inset: 0; width: auto; z-index: 6; border-left: 0; animation: grow var(--t-slow) var(--ease); }
@keyframes grow { from { clip-path: inset(0 0 0 calc(100% - var(--w))); } to { clip-path: inset(0); } }
.f-head { display: flex; align-items: center; gap: 2px; padding: 8px 6px 6px; border-top: 3px solid var(--hue, var(--quittung)); }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #0000, #000 14px); padding-left: 6px; cursor: text; min-height: 34px; }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs button { flex: none; border: 0; background: none; padding: 4px 6px; border-radius: 5px; font: 520 13px var(--mono); color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background-color var(--t-fast), color var(--t-fast); }
.crumbs button:last-child { color: #000; font-weight: 700; }
@media (hover: hover) { .crumbs button:hover { background: var(--wash-2); color: var(--ink); } }
.crumbs .sep { color: var(--line-strong); font-family: var(--mono); flex: none; }
.crumbs button.drop { background: var(--quittung-soft); outline: 2px dashed var(--quittung); }
#sf-path { flex: 1; font-size: 13px; }
.f-tools { display: flex; gap: 6px; padding: 0 10px 10px; align-items: center; }
.f-filter { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; }
.f-filter .icon { position: absolute; left: 9px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.f-filter input { width: 100%; padding-left: 31px !important; background: var(--wash) !important; border-color: var(--line) !important; }
#sf-hidden[aria-pressed=true] { background: var(--kabel-soft); border-color: var(--kabel); color: var(--kabel); }

.f-list { flex: 1; overflow: auto; min-height: 0; outline: none; border-top: 1px solid var(--line); position: relative; overscroll-behavior: contain; }
.f-list:focus-visible { box-shadow: inset 0 0 0 2px var(--kabel); }
.f-row {
  display: grid; grid-template-columns: 18px 20px minmax(0, 1fr) auto 110px 64px; align-items: center; gap: 0 10px;
  min-height: 30px; padding: 0 6px 0 8px; border-bottom: 1px solid #eee; cursor: pointer; user-select: none; position: relative;
  transition: background-color var(--t-fast) var(--ease);
}
.f-list.narrow .f-row { grid-template-columns: 18px 20px minmax(0, 1fr) 64px; }
.f-list.narrow .f-row .sz, .f-list.narrow .f-row .dt { display: none; }
.f-row.cursor { box-shadow: inset 3px 0 0 var(--kabel); }
@media (hover: hover) { .f-row:hover { background: var(--wash); } }
.f-row.sel { background: var(--quittung-soft) !important; }
.f-row.cut { opacity: .5; }
.f-row.drop { background: var(--kabel-soft) !important; outline: 2px dashed var(--kabel); outline-offset: -2px; }
.f-row .ck { width: 14px; height: 14px; }
.f-row.sel .ck, .f-list.selecting .ck, .f-row:focus-within .ck { opacity: 1; }
@media (hover: hover) { .f-row:hover .ck { opacity: 1; } }
@media (hover: none) { .f-row .ck { opacity: 1; } }
.f-ico { width: 20px; height: 20px; display: grid; place-items: center; color: #555; }
.f-ico .icon { width: 19px; height: 19px; }
.f-name { min-width: 0; display: flex; flex-direction: column; }
.f-name b { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-dir .f-name b { font-weight: 680; }
.f-name small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-name small:empty { display: none; }
.f-row .shared { color: var(--marke-ink); display: inline-grid; vertical-align: -3px; margin-right: 6px; }
.sz { display: flex; justify-content: flex-end; align-items: center; }
.f-row .shared .icon { width: 16px; height: 16px; }
.sz, .dt { color: var(--ink-2); font-size: 12.5px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.f-acts { display: flex; justify-content: flex-end; gap: 0; }
.f-acts .btn { width: 28px; min-height: 26px; }
.f-row:hover .f-acts .btn, .f-row.cursor .f-acts .btn, .f-acts .btn:focus-visible, .f-acts .btn[aria-expanded=true] { opacity: 1; }
@media (hover: none) { .f-acts .btn.dl { display: none; } .f-acts .btn { opacity: 1; } }
.f-head-row { position: sticky; top: 0; z-index: 1; background: var(--paper); min-height: 32px; border-bottom: 1px solid var(--line); cursor: default; font-size: 12px; font-weight: 650; color: var(--ink-3); }
.f-head-row button { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 4px 0; text-align: inherit; }
.f-head-row button[aria-sort]::after { content: ' ↑'; }
.f-head-row button[aria-sort=descending]::after { content: ' ↓'; }
.f-head-row .sz, .f-head-row .dt { color: inherit; font-size: inherit; }
.f-empty { padding: 48px 20px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.f-empty .icon { color: var(--quittung); width: 40px; height: 40px; fill: var(--quittung-soft); stroke-width: 1.4; }
.f-skel { height: 42px; border-bottom: 1px solid var(--wash-2); background: linear-gradient(90deg, var(--wash) 30%, var(--wash-2) 50%, var(--wash) 70%) 0 0 / 300% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -300% 0; } }
.f-list.enter .f-row:not(.f-head-row) { animation: row-in var(--t-med) var(--ease) both; animation-delay: calc(min(var(--i), 14) * 16ms); }
.f-list.enter.back .f-row:not(.f-head-row) { animation-name: row-in-back; }
@keyframes row-in { from { opacity: 0; transform: translateX(14px); } }
@keyframes row-in-back { from { opacity: 0; transform: translateX(-14px); } }
.files.drag::after { content: 'Loslassen zum Hochladen'; position: absolute; inset: 8px; display: grid; place-items: center; z-index: 7; background: rgb(238 243 255 / .9); border: 2px dashed var(--kabel); }
.f-bar { display: flex; align-items: center; gap: 6px; padding: 7px 8px 7px 10px; border-top: 1px solid var(--line); animation: bar-up var(--t-med) var(--spring); }
@keyframes bar-up { from { transform: translateY(100%); opacity: 0; } }
.f-sel { background: #e8f0fe; }

@media (hover: hover) { .f-sel .btn:hover { background: rgb(255 255 255 / .45); } }
.f-sel .btn.danger { color: #8a1222; }
.f-clip { background: var(--kabel-soft); }
.f-clip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--kabel-deep); }
.f-prog { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.f-prog .track { flex: 1; height: 6px; border-radius: 3px; background: var(--wash-2); overflow: hidden; }
.f-prog i { display: block; height: 100%; width: 100%; background: var(--kabel); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform var(--t-med) var(--ease); }
.f-foot { padding: 6px 12px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); min-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-foot.err { color: var(--fehler); }

/* ---------- menus & toasts ---------- */
.menu {
  position: fixed; z-index: 50; min-width: 220px; max-width: min(320px, calc(100vw - 16px)); padding: 5px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop);
  transform-origin: var(--ox, top right); animation: pop var(--t-med) var(--spring);
}
.menu.out { animation: pop-out var(--t-fast) var(--ease-in) forwards; pointer-events: none; }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-4px); } }
@keyframes pop-out { to { opacity: 0; transform: scale(.96); } }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: none; cursor: pointer; text-align: left; font-weight: 520; }
.menu button .icon { color: var(--ink-3); width: 17px; height: 17px; }
.menu button kbd { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.menu button:focus-visible, .menu button:hover { background: var(--wash); outline: none; }
.menu button.danger { color: var(--fehler); }
.menu button.danger .icon { color: var(--fehler); }
.menu button.ticket .icon { color: var(--marke-ink); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu .m-title { padding: 6px 10px 4px; font-size: 12px; color: var(--ink-3); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#toasts { position: fixed; z-index: 60; left: 50%; bottom: 40px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 3px; background: #222; color: #fff; font-weight: 560; box-shadow: var(--shadow-pop); animation: toast-in var(--t-slow) var(--spring); pointer-events: auto; }
.toast .icon { color: #7fe3cd; }
.toast.err { background: var(--fehler); }
.toast.err .icon { color: #fff; }
.toast.out { animation: toast-out var(--t-med) var(--ease-in) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- dialogs ---------- */
.dlg { width: min(94vw, 520px); max-height: min(92vh, 900px); overflow: auto; padding: 16px; background: #fff; color: #000; border: 1px solid #888; border-radius: 3px; }
.dlg::backdrop { background: rgb(0 0 0 / .3); }
.dlg.wide { width: min(94vw, 760px); }
.dlg.huge { width: min(96vw, 1100px); }
.dlg.narrow { width: min(94vw, 420px); }
.dlg h2 { font-size: 17px; margin-bottom: 12px; }
.dlg h3 { font-size: 14px; font-weight: 700; margin: 18px 0 8px; }
.dlg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dlg-head h2 { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
#connect-form { display: flex; flex-direction: column; gap: 14px; }
.grid3 { display: grid; grid-template-columns: minmax(0, 1fr) 84px minmax(0, .8fr); gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.row-end { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.profiles { display: flex; flex-wrap: wrap; gap: 6px; }
.profiles:empty { display: none; }
.prof { --hue: var(--kabel); display: inline-flex; align-items: center; height: 32px; border-radius: 7px; border: 1px solid var(--line); background: var(--paper); overflow: hidden; transition: border-color var(--t-fast), background-color var(--t-fast); }
.prof.on { border-color: var(--hue); background: color-mix(in srgb, var(--hue) 12%, white); }
.prof > button { border: 0; background: none; height: 100%; cursor: pointer; }
.prof .pick { display: flex; align-items: center; gap: 7px; padding: 0 10px; font-weight: 600; }
.prof .pick::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--hue); }
.prof .del { width: 26px; color: var(--ink-3); display: grid; place-items: center; border-left: 1px solid var(--line); }
.prof .del .icon { width: 13px; height: 13px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; background: var(--wash); border-radius: 9px; border: 1px solid var(--line); align-self: flex-start; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 12px; border-radius: 6px; font-weight: 600; color: var(--ink-2); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast); }
.seg input:checked + span { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgb(20 26 42 / .18); }
.seg input:focus-visible + span { outline: 2px solid var(--kabel); }
.seg-group { border: 0; padding: 0; margin: 0 0 14px; }
.seg-group legend { font-size: 13px; font-weight: 650; margin-bottom: 7px; padding: 0; }
.more summary { cursor: pointer; font-weight: 600; color: var(--ink-2); list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.more summary::before { content: '▸'; transition: transform var(--t-fast) var(--ease); display: inline-block; }
.more[open] summary::before { transform: rotate(90deg); }
.more::details-content { height: 0; overflow: clip; transition: height var(--t-med) var(--ease), content-visibility var(--t-med) allow-discrete; }
.more[open]::details-content { height: auto; }
.more .stack { padding-top: 12px; }
.fp { white-space: pre-wrap; word-break: break-all; background: var(--wash); border-radius: var(--r-sm); padding: 8px 10px; margin: 6px 0 12px; font-size: 13px; }
.fp.warn { background: var(--fehler-soft); color: var(--fehler); }
#hk-text { margin-bottom: 10px; }
.share-what { display: flex; align-items: center; gap: 9px; padding: 10px 12px; margin: -4px 0 16px; background: var(--wash); border-radius: var(--r-sm); min-width: 0; }
.share-what b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.share-what span { color: var(--ink-2); font-size: 12.5px; flex: none; }

.tablebox { max-height: 170px; overflow: auto; font-size: 13px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.tablebox.tall { max-height: 230px; font-family: var(--mono); font-size: 12px; }
.tablebox table { width: 100%; border-collapse: collapse; }
.tablebox td { padding: 5px 10px; white-space: nowrap; text-align: left; border-bottom: 1px solid var(--wash-2); }
.tablebox td:last-child { text-align: right; }
.tablebox > div { padding: 12px; color: var(--ink-2); }
#sn-list { max-height: 240px; margin-bottom: 14px; }
#sn-list tr { cursor: pointer; transition: background-color var(--t-fast); }
#sn-list tr:hover td { background: var(--wash); }
#sn-list tr.sel td { background: var(--quittung-soft); }
#sn-list td.cmd { font-family: var(--mono); font-size: 12px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; text-align: left; color: var(--ink-2); }
#ed-title { font-size: 14px; font-weight: 600; font-stretch: 100%; }
#ed-text { width: 100%; height: 64vh; resize: none; font: 13px/1.5 var(--mono); white-space: pre; tab-size: 4; }
.view .vw-stage { display: grid; place-items: center; min-height: 240px; max-height: 70vh; background: repeating-conic-gradient(var(--wash) 0 25%, var(--paper) 0 50%) 0 0 / 20px 20px; border-radius: var(--r-md); overflow: auto; }
.view img { max-width: 100%; max-height: 70vh; display: block; }
.help ul { padding-left: 18px; margin: 0; } .help li { margin: 6px 0; line-height: 1.5; }
.help h3:first-child { margin-top: 0; }

/* ---------- phones ---------- */
@media (max-width: 820px) {
  #quick { display: none; }
  #header .lbl { display: none; }
  #header .btn:not(.icon-only) { width: 38px; padding: 0; position: relative; }
  #tb-shares .count { position: absolute; top: -6px; right: -6px; }
  .files, .files.max { position: absolute; inset: 0; width: auto !important; z-index: 6; border-left: 0; }
  #sf-max, .resizer { display: none !important; }
  .f-row:not(.f-head-row) { min-height: 44px; }
  #statusbar > span:nth-child(n+5) { display: none; }
  .grid3 { grid-template-columns: minmax(0, 1fr) 80px; }
  .grid3 .field:last-child { grid-column: 1 / -1; }
  .grid2 { grid-template-columns: 1fr; }
  .dlg { padding: 18px 16px 16px; }
  .searchbar { left: 8px; right: 8px; }
  .searchbar #search-input { flex: 1; width: auto; }
}
@media (max-width: 420px) { .tab { max-width: 150px; } }

/* link tables */
.ltab { width: 100%; border-collapse: collapse; font-size: 13px; }
.ltab th, .ltab td { text-align: left; padding: 4px 6px; border-bottom: 1px solid #ddd; vertical-align: top; }
.ltab td.url input { width: 100%; font-family: var(--mono); font-size: 12px; min-height: 26px; }
.ltab .acts { white-space: nowrap; }
.ltab .acts .btn { min-height: 26px; padding: 0 6px; }
.ltab tr.ended td { color: #888; }
.ltab .sub td { background: #fafafa; font-size: 12px; }
.formrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.formrow .field { flex: 1 1 140px; }
#info-tbl td:first-child { color: #555; width: 110px; }
#info-tbl td { padding: 3px 6px; word-break: break-all; }
#sh-result input { width: 100%; font-family: var(--mono); }
.f-search { padding: 4px 10px; background: #fff8e1; border-top: 1px solid #ddd; font-size: 12px; display: flex; gap: 8px; align-items: center; }
.cmds { display: grid; gap: 6px; margin-top: 8px; }
.cmd { display: grid; grid-template-columns: 9.5em 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.cmd code { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--wash-2); overflow-x: auto; white-space: nowrap; user-select: all; }
.cmds.dead code { text-decoration: line-through; color: var(--ink-2); }
@media (max-width: 640px) { .cmd { grid-template-columns: 1fr auto; } .cmd span { grid-column: 1 / -1; } }

.up-drop { display: grid; place-items: center; min-height: 96px; padding: 12px; text-align: center; color: var(--ink-2); border: 2px dashed var(--line); border-radius: 3px; transition: background var(--t-med) var(--ease), border-color var(--t-med) var(--ease), color var(--t-med) var(--ease); }
.up-drop.over { background: var(--kabel-soft); border-color: var(--kabel); color: var(--ink); }
