/* Builder und Teilen-Screen (Design-Handoff 03/04/06a) */
.app.b { height: 100dvh; min-height: 0; overflow: hidden; }   /* feste Kopf-/Fußleiste, nur der Mittelteil scrollt */
.screen { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.screen[hidden] { display: none; }
.btop { flex: none; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--hf-line); background: var(--hf-bg); }
.btop strong { font-size: 15px; font-weight: 600; }
.back { font-size: 15px; color: var(--hf-ink-2); text-decoration: none; background: none; border: 0; padding: 10px 8px; min-width: 88px; text-align: left; }
.btop-ph { min-width: 88px; }
.bscroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.bscroll > * { flex: none; }
.notice { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--hf-surface-2); border: 1px solid var(--hf-line); font-size: 12.5px; }

.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > span { font: 600 11px 'DM Sans', sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--hf-muted); display: flex; justify-content: space-between; }
.fld small { font: 400 11px 'DM Mono', monospace; letter-spacing: 0; }
input, textarea { font: 400 16px/1.4 'DM Sans', sans-serif; color: var(--hf-ink); background: var(--hf-surface); border: 1px solid var(--hf-line-strong); border-radius: 6px; padding: 0 12px; height: 44px; width: 100%; }
textarea { padding: 10px 12px; height: auto; resize: none; }
input:focus, textarea:focus { outline: none; border-color: var(--hf-accent); }

.tabs { display: flex; border-bottom: 1px solid var(--hf-line); margin-top: 4px; }
.tabs button { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 12px 18px; font-size: 13.5px; font-weight: 500; color: var(--hf-muted); }
.tabs button[aria-selected="true"] { color: var(--hf-ink); font-weight: 600; border-bottom-color: var(--hf-ink); }
.srow { display: flex; gap: 10px; margin-bottom: 16px; }
.srow .search { flex: 1; min-width: 0; }
.seg { flex: none; display: flex; height: 44px; border: 1px solid var(--hf-line-strong); border-radius: 6px; overflow: hidden; }
.seg button { flex: none; padding: 0 12px; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--hf-ink-2); }
.seg button[aria-pressed="true"] { background: var(--hf-ink); color: var(--hf-bg); }
.hint { margin: 0; font-size: 12px; color: var(--hf-muted); text-wrap: pretty; }
#search-hint { text-align: center; padding: 8px; }
#res-label { margin: -4px 0 10px; }

/* Alben-Raster */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; }
.grid.tracks { grid-template-columns: 1fr; gap: 0; }
.tile { position: relative; background: none; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile .art { position: relative; aspect-ratio: 1; border-radius: var(--hf-r-cover); background: var(--hf-surface-2); overflow: hidden; box-shadow: var(--hf-cover-shadow); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.on .art { outline: 2px solid var(--hf-accent); outline-offset: 2px; }
.tile b { font-size: 12.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile span.sub2 { font-size: 11.5px; color: var(--hf-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbadge { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--hf-surface); color: var(--hf-ink); font: 600 16px/1 'DM Mono', monospace; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.tile.on .pbadge { background: var(--hf-accent); color: var(--hf-accent-ink); }
.tile.busy .pbadge { opacity: .6; }
.trow { display: flex; align-items: center; gap: 12px; min-height: 60px; background: none; border: 0; border-bottom: 1px solid var(--hf-line); padding: 8px 0; text-align: left; width: 100%; }
.trow img { width: 44px; height: 44px; border-radius: 3px; object-fit: cover; flex: none; background: var(--hf-surface-2); }
.trow .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.trow .t b { font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .t span { font-size: 12px; color: var(--hf-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .add { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--hf-line-strong); display: grid; place-items: center; font: 600 16px 'DM Mono', monospace; flex: none; }
.trow.on .add { background: var(--hf-accent); border-color: var(--hf-accent); color: var(--hf-accent-ink); }
.none { grid-column: 1 / -1; text-align: center; color: var(--hf-ink-2); padding: 24px 0; }

/* Reihenfolge */
.order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.orow { display: flex; align-items: center; gap: 8px; height: 56px; background: var(--hf-surface); border: 1px solid var(--hf-line); border-radius: 8px; padding-left: 10px; position: relative; touch-action: pan-y; }
.orow.drag { z-index: 5; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: none; }
.orow .pos { font: 400 12px 'DM Mono', monospace; color: var(--hf-muted); width: 22px; }
.orow img { width: 40px; height: 40px; border-radius: 3px; object-fit: cover; flex: none; background: var(--hf-surface-2); }
.orow .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.orow .t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orow .t span { font-size: 12px; color: var(--hf-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orow .rm { width: 40px; height: 44px; background: none; border: 0; color: var(--hf-muted); font-size: 16px; }
.orow .grip { width: 44px; height: 54px; border: 0; border-left: 1px solid var(--hf-line); background: none; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; cursor: grab; touch-action: none; }
.orow .grip i { width: 16px; height: 2px; background: var(--hf-muted); border-radius: 1px; }

.empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 12px; }
.empty[hidden] { display: none; }
.empty h2 { margin: 12px 0 0; font-size: 17px; font-weight: 600; }
.empty p { margin: 0 0 8px; color: var(--hf-ink-2); max-width: 280px; }
.empty-art { position: relative; width: 240px; height: 130px; }
.empty-art i { position: absolute; border: 1.5px dashed var(--hf-line-strong); border-radius: var(--hf-r-cover); background: transparent; top: 17px; width: 96px; height: 96px; }
.empty-art i:nth-child(1) { left: 0; transform: perspective(600px) rotateY(52deg); }
.empty-art i:nth-child(2) { left: 58px; top: 3px; width: 124px; height: 124px; z-index: 2; background: var(--hf-bg); }
.empty-art i:nth-child(3) { right: 0; transform: perspective(600px) rotateY(-52deg); }
.danger { display: block; margin: 16px auto 0; background: none; border: 0; color: var(--hf-danger); font-size: 14px; padding: 12px; }

/* Buttons */
.btn-primary { height: 48px; min-width: 96px; padding: 0 22px; border: 0; border-radius: var(--hf-r-btn); background: var(--hf-accent); color: var(--hf-accent-ink); font-size: 15px; font-weight: 600; }
.btn-primary:disabled { opacity: .4; cursor: default; }
.btn-secondary { height: 44px; padding: 0 16px; border-radius: var(--hf-r-btn); border: 1px solid var(--hf-line-strong); background: var(--hf-surface); font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn-secondary.wide { width: 100%; height: 52px; font-size: 16px; }

/* Bottom-Bar */
.bbar { flex: none; background: var(--hf-surface); border-top: 1px solid var(--hf-line); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; }
.thumbs { display: flex; padding-left: 10px; min-width: 0; }
.thumbs img, .thumbs i { width: 32px; height: 32px; border-radius: 3px; object-fit: cover; margin-left: -10px; box-shadow: 0 0 0 2px var(--hf-surface); background: var(--hf-surface-2); }
.thumbs i { border: 1.5px dashed var(--hf-line-strong); box-shadow: none; background: none; }
.count-label { flex: 1; font: 500 11px 'DM Mono', monospace; letter-spacing: .06em; color: var(--hf-ink-2); white-space: nowrap; }

/* Teilen */
.sharepane { gap: 20px; padding-top: 20px; }
.chat { margin-top: 8px; background: var(--hf-surface-2); border: 1px solid var(--hf-line); border-radius: 14px; padding: 16px 12px; display: flex; justify-content: flex-end; }
.bubble { width: 288px; max-width: 100%; background: var(--hf-surface); border-radius: 14px 14px 4px 14px; padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.bubble img { width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 9px; background: var(--hf-surface-2); display: block; }
.bub-host { font: 400 10.5px 'DM Mono', monospace; color: var(--hf-muted); padding: 4px 6px 0; }
.bub-title { font-size: 14px; font-weight: 600; padding: 0 6px; }
.bub-desc { font-size: 12px; color: var(--hf-ink-2); padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bub-link { font: 400 12px 'DM Mono', monospace; color: var(--hf-accent); padding: 0 6px 4px; word-break: break-all; }
.copyrow { display: flex; gap: 8px; margin-top: 8px; }
.copyrow input { height: 48px; font: 400 13px 'DM Mono', monospace; text-overflow: ellipsis; }
.wa { display: flex; align-items: center; justify-content: center; height: 52px; border-radius: var(--hf-r-btn); background: var(--hf-whatsapp); color: var(--hf-whatsapp-ink); font-size: 16px; font-weight: 600; text-decoration: none; }
.textlink { color: var(--hf-accent); font-size: 14px; text-decoration: none; align-self: center; }
.editbox { border-top: 1px solid var(--hf-line); padding-top: 18px; }
.editbox .hint { margin-top: 8px; }
