/* Handy ↔ PC (web/src/handy/app.js) */
.hp-main { max-width: 860px; }
.hp-loading { color: var(--muted); padding: 40px 0; text-align: center; }
.hp-muted { color: var(--muted); }
.hp-small { font-size: .85rem; }
.hp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l); padding: 18px; box-shadow: var(--shadow); margin-top: 16px; }
.hp-link { border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.hp-x { border: 0; background: none; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.hp-x:hover { background: var(--accent-soft); color: var(--text); }
.hp-err { color: #dc2626; margin: 8px 0 0; }

/* Koppeln */
.hp-pair-head { display: flex; justify-content: space-between; align-items: center; }
.hp-pair h2 { margin: 0; font-size: 1.25rem; }
.hp-pair h3 { margin: 0 0 6px; font-size: 1.05rem; }
.hp-pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 14px 0 10px; }
.hp-pair-grid > div { min-width: 0; padding: 16px; border-radius: var(--r-l); background: var(--bg); overflow-wrap: anywhere; }
.hp-qr { display: inline-block; padding: 10px; background: #fff; border-radius: var(--r-l); margin: 8px 0; box-shadow: 0 4px 14px rgba(20, 24, 40, .12); }
.hp-qr svg { display: block; width: 220px; height: 220px; }
.hp-code b { font-size: 2rem; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.hp-code-form { display: flex; gap: 8px; margin-top: 10px; }
.hp-code-form input { flex: 1; min-width: 0; font: inherit; font-size: 1.4rem; letter-spacing: .15em; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--r-m); background: var(--surface); color: var(--text); }
.hp-code-form input:focus { outline: none; border-color: var(--accent); }
.hp-pair.hp-mobile .hp-pair-enter { order: -1; }

/* Geräte */
.hp-devices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hp-dev-list { display: contents; }
.hp-dev { display: inline-flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--border); border-radius: var(--r-l); background: var(--surface); font: inherit; color: var(--text); }
.hp-dev-ico { font-size: 1.5rem; }
.hp-dev-txt { display: flex; flex-direction: column; line-height: 1.2; }
.hp-dev-txt small { color: var(--muted); }
.hp-dev-txt small::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: #94a3b8; vertical-align: 1px; }
.hp-st-on .hp-dev-txt small::before { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.hp-st-slow .hp-dev-txt small::before { background: #eab308; }
.hp-st-wait .hp-dev-txt small::before { background: #eab308; animation: hpBlink 1s infinite; }
.hp-dev.sel { border-color: var(--accent); }
.hp-dev-add { cursor: pointer; color: var(--accent); font-weight: 600; padding: 12px 16px; border-style: dashed; }
@keyframes hpBlink { 50% { opacity: .3; } }

/* Senden */
.hp-send { position: relative; }
.hp-target { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.hp-chip { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; }
.hp-chip.on { background: var(--accent-soft); border-color: var(--accent); font-weight: 700; }
.hp-note { display: flex; gap: 8px; align-items: stretch; }
.hp-note textarea { flex: 1; min-width: 0; font: inherit; font-size: 1.02rem; padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--r-l); background: var(--bg); color: var(--text); resize: vertical; min-height: 52px; }
.hp-note textarea:focus { outline: none; border-color: var(--accent); }
.hp-send-btn { min-width: 56px; font-size: 1.3rem; border-radius: var(--r-l); }
.hp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.hp-btn:hover { border-color: var(--accent); }
.hp-btn-main { background: var(--accent); border-color: var(--accent); color: #fff; }
.hp-btn-main:hover { filter: brightness(1.08); color: #fff; }
.hp-btn-s { padding: 6px 12px; font-size: .88rem; font-weight: 600; }
.hp-hint-pc { margin: 10px 0 0; }
@media (pointer: coarse) { .hp-hint-pc, #hpClip { display: none; } .hp-actions .hp-btn-main { flex: 1; padding: 14px; font-size: 1.05rem; } }
.hp-drop-overlay { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; background: rgba(79, 70, 229, .14); border: 4px dashed var(--accent); color: var(--accent); font-size: 1.6rem; font-weight: 800; pointer-events: none; }

/* Verlauf */
.hp-feed-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 22px; }
.hp-feed-head h2 { font-size: 1.15rem; margin: 0; }
.hp-feed { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.hp-empty { text-align: center; padding: 18px 0; }
.hp-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l); padding: 12px 14px; animation: hpIn .25s ease; }
.hp-item.hp-in { border-left: 4px solid #22c55e; }
.hp-item.hp-out { border-left: 4px solid var(--accent); }
.hp-item-head { font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.hp-text { white-space: pre-wrap; word-break: break-word; font-size: 1rem; }
.hp-item-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.hp-files { display: flex; flex-direction: column; gap: 6px; }
.hp-file { position: relative; display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 6px; border-radius: var(--r-m); background: var(--bg); overflow: hidden; }
.hp-thumb { width: 52px; height: 52px; border-radius: var(--r-m); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; background: var(--surface); overflow: hidden; }
.hp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hp-file-info { min-width: 0; }
.hp-file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-file-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hp-prog { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p, 0%); background: var(--accent); transition: width .15s; }
.hp-saveall { margin-top: 10px; }
@keyframes hpIn { from { transform: translateY(-6px); } }

.hp-privacy { margin: 22px 0 4px; text-align: center; font-size: .9rem; color: var(--muted); }
.hp-me { text-align: center; margin: 0; }
.hp-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; padding: 10px 18px; border-radius: var(--r-pill); background: #111827; color: #fff; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: calc(100% - 32px); text-align: center; }

@media (max-width: 700px) {
  .hp-pair-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hp-qr svg { width: min(220px, 60vw); height: auto; aspect-ratio: 1; }
  .hp-file { grid-template-columns: 44px 1fr; }
  .hp-thumb { width: 44px; height: 44px; }
  .hp-file-acts { grid-column: 1 / -1; justify-content: flex-start; }
}
.hp-prog[hidden] { display: none; }
#hpApp [hidden], .hp-drop-overlay[hidden], .hp-toast[hidden] { display: none !important; }
.hp-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: var(--r-pill); font-weight: 600; font-size: .92rem; color: var(--muted); cursor: pointer; user-select: none; }
.hp-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.hp-toggle:has(input:checked) { color: var(--accent); background: var(--accent-soft); }
.hp-offhint { margin: 10px 0 0; padding: 10px 14px; border-radius: var(--r-m); background: #fef9c3; color: #713f12; font-size: .9rem; }
@media (prefers-color-scheme: dark) { .hp-offhint { background: #422006; color: #fde68a; } }
.hp-item-head { display: flex; align-items: baseline; gap: 4px; }
.hp-del { margin-left: auto; font-size: 1.1rem; opacity: .55; }
.hp-item:hover .hp-del, .hp-del:focus { opacity: 1; }
.hp-btn-del { padding: 6px 10px; }
@media (pointer: coarse) { .hp-del { opacity: .8; } }
.hp-keep-opt { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.hp-keep-opt input { accent-color: var(--accent); }
.hp-keep { white-space: nowrap; }
.hp-pair-next { margin: -4px 0 12px; font-size: .92rem; }
