/* Send files: one calm first screen (the converter's drop surface, in this tool's indigo), then cards for the link,
   what is on offer, and progress. Light and dark from app.css tokens. */
.drop { --sf: #4f46e5; --sf-soft: color-mix(in srgb, var(--sf) 10%, var(--surface)); position: relative; min-height: 100svh; display: flex; flex-direction: column; background: radial-gradient(120% 80% at 50% 0%, #eef0fd 0%, var(--bg) 60%); color: var(--ink) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .drop { --sf: #8b8cf6; background: radial-gradient(120% 80% at 50% 0%, #1b1c3a 0%, var(--bg) 60%) } }
.drop-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: max(14px, env(safe-area-inset-top)) 20px 0; font-size: .86rem }
.drop-top a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 999px } .drop-top a:hover { color: var(--ink); background: var(--soft) }
.drop-center { flex: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: 24px 20px 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px }
.drop-h { margin: 6px 0 0; font-size: .95rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) }
.drop-big { margin: 0; font: 750 clamp(1.9rem, 1.2rem + 3vw, 3.2rem)/1.08 var(--display); letter-spacing: -.03em; color: var(--ink); text-wrap: balance; max-width: 17ch }
.drop-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 0 30px; border: 0; border-radius: 999px; background: var(--sf); color: #fff; font: 700 1.1rem var(--sans); text-decoration: none; cursor: pointer; box-shadow: 0 10px 30px color-mix(in srgb, var(--sf) 30%, transparent); transition: transform .15s var(--ease), box-shadow .25s var(--ease), background .2s }
.drop-btn:hover { box-shadow: 0 14px 36px color-mix(in srgb, var(--sf) 38%, transparent); text-decoration: none } .drop-btn:active { transform: scale(.98) }
.drop-btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none }
.drop-btn-alt { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow) }
.drop-btn-alt:hover { border-color: var(--muted); box-shadow: var(--shadow) }
.drop-btn-sm { min-height: 48px; padding: 0 22px; font-size: 1rem }
input.sr:focus-visible + .drop-btn, .drop-btn:focus-visible, label.drop-btn:has(+ input:focus-visible), label.btn:has(+ input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px }
.drop-hint { margin: 0; color: var(--muted); font-size: .92rem }
.drop-more { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); color: var(--muted); font-size: .88rem; text-decoration: none; white-space: nowrap }
body.dragging .drop { box-shadow: inset 0 0 0 4px var(--sf) } body.dragging .drop-center { pointer-events: none; opacity: .12; transition: opacity .2s }
.drop::after { content: attr(data-drop-text); position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.96); padding: 18px 28px; border-radius: 20px; background: var(--sf); color: #fff; font: 750 clamp(1.3rem, 1rem + 1.5vw, 2rem) var(--display); box-shadow: 0 20px 50px color-mix(in srgb, var(--sf) 35%, transparent); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease) }
body.dragging .drop::after { opacity: 1; transform: translate(-50%, -50%) scale(1) }

/* Home */
.sf-home { display: flex; flex-direction: column; align-items: center; gap: 16px }
.sf-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 10px }
.sf-alt { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px }
.sf-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink2); font: 600 .9rem var(--sans); cursor: pointer; transition: border-color .2s, background .2s }
.sf-chip:hover { border-color: var(--muted); background: var(--surface) }
.sf-chip svg { color: var(--sf) }
.sf-clutter { font-size: .85rem; color: var(--muted) }

/* Session */
.drop[data-state="session"] .drop-center, .drop[data-state="manual"] .drop-center { justify-content: flex-start; padding-top: 4vh }
.sf-session { width: 100%; display: flex; flex-direction: column; gap: 14px; text-align: left }
.sf-card { position: relative; width: 100%; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow) }
.sf-h { margin: 0 0 6px; font: 700 1.25rem/1.25 var(--display); letter-spacing: -.015em; color: var(--ink) }
.sf-h3 { display: block; margin: 18px 0 8px; font: 650 1rem/1.3 var(--display); color: var(--ink) }
.sf-sub { margin: 0 0 14px; color: var(--ink2); font-size: .98rem }
.sf-connect { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: center; transition: grid-template-columns .3s var(--ease) }
.sf-connect.is-small { grid-template-columns: 120px 1fr }
.sf-qr { aspect-ratio: 1; width: 100%; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px rgba(17, 19, 22, .08) }
.sf-qr svg { display: block; width: 100%; height: 100% }
.sf-qr-sm { max-width: 260px; margin: 6px 0 12px }
.sf-linkrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.sf-url { flex: 1 1 220px; min-width: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--ink2); font: 500 .88rem var(--mono); text-overflow: ellipsis }
.sf-url:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent) }
.sf-status { margin: 2px 4px; font-weight: 600; color: var(--ink2); display: flex; align-items: center; gap: 10px }
.sf-status::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); animation: sf-pulse 1.6s ease-in-out infinite }
.sf-status[data-tone="ok"]::before { background: #16a34a; animation: none }
.sf-status[data-tone="warn"]::before { background: #d97706 }
.sf-status[data-tone="error"] { color: #b42318 } .sf-status[data-tone="error"]::before { background: #b42318; animation: none }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sf-status[data-tone="error"] { color: #ff8a7a } }
@keyframes sf-pulse { 50% { opacity: .35; transform: scale(.8) } }
.sf-peers { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px }
.sf-peer { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .9rem; color: var(--ink) }
.sf-peer > svg { color: var(--sf) }
.sf-peer-state { color: var(--muted); font-size: .82rem; padding-right: 6px }
.sf-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: #e8f6ec; color: #166534 }
.sf-badge-direct { background: #e8effd; color: #1e40af } .sf-badge-relay { background: #fdf1e4; color: #9a3412 }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sf-badge { background: #12301c; color: #86efac } :root:not([data-theme="light"]) .sf-badge-direct { background: #172340; color: #9fb8ff } :root:not([data-theme="light"]) .sf-badge-relay { background: #3a2412; color: #fdba74 } }
.sf-stack { display: flex; flex-direction: column; gap: 14px }
.sf-stack:empty { display: none }

/* Offer and preview cards */
.sf-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: .82rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--sf) }
.sf-title { margin: 0; font: 750 clamp(1.3rem, 1.1rem + .8vw, 1.7rem)/1.2 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere }
.sf-meta { margin: 4px 0 14px; color: var(--muted); font-variant-numeric: tabular-nums }
.sf-grid { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px }
.sf-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 10px 6px 8px; border-radius: 14px; background: var(--soft); text-align: center }
.sf-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; box-shadow: 0 1px 3px rgba(17, 19, 22, .18) }
.sf-ficon { display: block; width: 54px; height: 64px } .sf-ficon .ficon { width: 100%; height: 100% }
.sf-ficon-sm { width: 22px; height: 26px; flex: none }
.sf-tname { max-width: 100%; font-size: .8rem; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.sf-tsize { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums }
.sf-more { justify-content: center; color: var(--muted); font-size: .85rem; font-weight: 600 }
.sf-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px }
.sf-decide { margin-top: 18px }
.sf-btn-quiet { border-color: transparent; background: transparent; color: var(--ink2) } .sf-btn-quiet:hover { background: var(--soft); border-color: transparent }
.sf-select { margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 14px }
.sf-select summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: .92rem; color: var(--ink2) }
.sf-tree { list-style: none; margin: 0; padding: 0 6px 8px; max-height: 320px; overflow: auto }
.sf-tree-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; font-size: .92rem }
.sf-tree-row:hover { background: var(--soft) }
.sf-tree-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--sf); flex: none }
.sf-tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink) }
.sf-tree-meta { flex: none; color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums }
.sf-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px }
.sf-modes-l { font-size: .88rem; font-weight: 650; color: var(--ink2) }
.sf-modes .seg button { display: inline-flex; align-items: center; gap: 6px }
.sf-modes .seg svg { width: 15px; height: 15px }
.sf-modes-hint { flex-basis: 100%; margin: 0; font-size: .85rem; color: var(--muted) }
.sf-note { margin: 10px 0 0; font-size: .9rem; color: var(--ink2) }
.sf-error { color: #b42318 } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sf-error { color: #ff8a7a } }
.sf-to { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line) }
.sf-to-h { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-weight: 650 }
.sf-to-state { color: var(--muted); font-weight: 500; font-size: .9rem; text-align: right }

/* Progress */
.sf-prog { margin-top: 10px }
.sf-bar { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden }
.sf-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--sf), color-mix(in srgb, var(--sf) 70%, #22d3ee)); transition: width .3s linear }
.sf-prog-text { margin: 8px 0 0; font-size: .92rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums }
.sf-prog-file { margin: 2px 0 0; font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1.3em }
.sf-prog-actions { display: flex; gap: 6px; margin-top: 8px }
.sf-done-h { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-weight: 700; color: #166534; overflow-wrap: anywhere }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sf-done-h { color: #86efac } }

.sf-pickbar { text-align: center } .sf-pickbar .sf-actions { margin-top: 4px }
.sf-foot { margin: 8px 0 0; text-align: center }
.sf-link { color: var(--muted); font-size: .9rem }
.sf-video { display: block; width: 100%; max-width: 360px; margin-top: 10px; border-radius: 14px; background: #000 }
.sf-manual .sf-card { text-align: left }

/* Content below */
.sf-steps { padding-left: 1.2em } .sf-steps li { margin-bottom: 14px }
.sf-tips li { margin-bottom: 10px; color: var(--ink2) }

@media (max-width: 640px) {
  .drop-center { padding: 16px 14px 84px; gap: 14px }
  .sf-card { padding: 16px; border-radius: 18px }
  .sf-connect, .sf-connect.is-small { grid-template-columns: 1fr; gap: 14px; justify-items: center; text-align: center }
  .sf-connect .sf-qr { max-width: 240px } .sf-connect.is-small .sf-qr { max-width: 140px }
  .sf-connect .sf-linkrow { justify-content: center }
  .sf-url { font-size: 16px }
  .sf-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px }
  .drop-btn { min-height: 54px; padding: 0 24px; font-size: 1.02rem }
  .sf-accept { flex: 1 1 100% }
}
