.online { min-width: 0; min-height: 100svh; display: flex; flex-direction: column; background: var(--surface); }
.online .app-header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); flex-shrink: 0; width: 100%; height: 80px; max-width: 1280px; margin: 0 auto; padding: 0 40px; border: 0; }
.online .brand { font-size: 22px; }
.online .header-actions { gap: 4px; justify-self: end; }
.online .brand { min-width: 0; justify-self: start; overflow-wrap: anywhere; }
.online .brand img { flex-shrink: 0; }
.online .app-header { gap: 12px; }
.online .page-tabs { justify-self: center; }
#info-dialog .language-setting label { margin: 0; }
.online button { overflow-wrap: anywhere; white-space: normal; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; flex-shrink: 0; }
.icon-button:hover:not(:disabled) { color: var(--accent); background: var(--accent-soft); }
.icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#retry svg { transform-origin: center; }
#refresh-status { margin: 0 0 12px; overflow-wrap: anywhere; }
.page-tabs { display: flex; align-items: center; gap: 6px; background: var(--background); padding: 4px; border-radius: 12px; }
.page-tabs button { min-height: 44px; min-width: 94px; padding: 8px 18px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; }
.page-tabs button[aria-selected=true] { background: var(--surface); color: var(--accent); box-shadow: 0 2px 5px #19283e14; }
.page-tabs span { font-size: 12px; }
.online-workbench { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 16px 40px 24px; }
.online h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 650; letter-spacing: -.035em; }
.online h2 { font-size: 18px; letter-spacing: -.02em; }
.online h3 { font-size: 15px; }
.online .text-button { min-height: 44px; font-size: 13px; }
.receive-target { text-align: center; padding: 0 0 24px; border-radius: 8px; }
.receive-target:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.transfer-scene { display: block; width: min(100%, 480px); height: auto; margin: auto; }
.device-shell { fill: #f5f7fa; stroke: #8193aa; stroke-width: 2; }
.device-screen { fill: var(--accent-soft); stroke: #c6d5ed; }
.device-detail { stroke: #8193aa; stroke-width: 2; stroke-linecap: round; }
.accent-stroke { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.key-base { fill: #dce3ec; stroke: #a7b6ca; stroke-width: 1.5; }
.key-top { fill: white; stroke: #a7b6ca; stroke-width: 1.5; }
.touch-mark { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; opacity: 0; }
.flow-scene { display: none; }
.source-computer { display: none; }
.receive-target[data-source=computer] .source-phone { display: none; }
.receive-target[data-source=computer] .source-computer { display: block; }
.flow-track { stroke: #c6d5ed; stroke-width: 2; stroke-dasharray: 3 8; }
.flying-file { fill: white; stroke: var(--accent); stroke-width: 1.7; stroke-linejoin: round; }
.file-second { opacity: 0; }
.received-check { opacity: 0; }
.receive-target[data-motion=transferring] .touch-scene,
.receive-target[data-motion=waiting] .touch-scene,
.receive-target[data-motion=complete] .touch-scene { display: none; }
.receive-target[data-motion=transferring] .flow-scene,
.receive-target[data-motion=waiting] .flow-scene,
.receive-target[data-motion=complete] .flow-scene { display: block; }
.receive-target[data-motion=complete] .flying-file { display: none; }
.receive-target[data-motion=complete] .received-check { opacity: 1; }
.touch-phone { transform: rotate(-12deg); transform-origin: 240px 136px; }
.receive-target[data-motion=idle][data-animate=true] .touch-phone { animation: touch-phone 4s cubic-bezier(.3333,0,.6667,1) infinite; }
.receive-target[data-motion=idle][data-animate=true] .touch-key { animation: touch-key 4s cubic-bezier(.3333,0,.6667,1) infinite; }
.receive-target[data-motion=idle][data-animate=true] .touch-mark { animation: touch-mark 4s cubic-bezier(.3333,0,.6667,1) infinite; }
.receive-target[data-motion=transferring][data-animate=true] .flying-file { animation: file-flight 1.8s linear infinite; }
.receive-target[data-motion=transferring][data-animate=true] .file-second { animation-delay: .9s; }
.receive-target[data-enabled=false] .touch-phone { opacity: .55; }
@keyframes touch-phone { 0%, 15%, 80%, 100% { transform: translate(0,0) rotate(-12deg); } 40%, 52% { transform: translate(16px,29px) rotate(-4deg); } }
@keyframes touch-key { 0%, 33.75%, 59%, 100% { transform: translateY(0); } 40%, 52% { transform: translateY(4px); } }
@keyframes touch-mark { 0%, 33.75%, 59%, 100% { opacity: 0; } 40%, 52% { opacity: 1; } }
@keyframes file-flight { 0% { transform: translateX(0); opacity: 0; } 14% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateX(144px); opacity: 0; } }
.hero-caption { margin-top: 10px; color: var(--muted); }
.hero-caption kbd { font: inherit; color: var(--text); border-bottom: 2px solid #b2bfd0; border-radius: 4px; padding: 3px 8px; background: var(--background); white-space: nowrap; }
.receive-heading { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
#receive-state { color: var(--success); font-size: 13px; }
.receive-target[data-enabled=false] #receive-state { color: var(--muted); }
.field-hint { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
#bump-status:not(:empty) { margin-top: 8px; }
#keyboard-status:not(:empty) { margin-top: 8px; }
.storage-bar { padding: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.storage-bar > div { min-width: 0; }
#storage-note { font-size: 13px; overflow-wrap: anywhere; margin-top: 3px; }
#storage-details { position: relative; width: fit-content; max-width: 100%; }
#storage-note[tabindex] { cursor: help; text-decoration: underline dotted var(--muted); text-underline-offset: 4px; }
#storage-note:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
#storage-limit { position: absolute; bottom: 100%; left: 0; z-index: 2; width: max-content; max-width: min(54ch, calc(100vw - 40px)); padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); box-shadow: 0 6px 20px #19283e24; visibility: hidden; }
#storage-details:not([data-tooltip-dismissed]):is(:hover, :focus-within) #storage-limit { visibility: visible; }
.storage-bar .button { flex-shrink: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nearby-section { margin-top: 32px; }
.nearby-actions { display: flex; gap: 8px; align-items: center; }
#connection-status { color: var(--muted); font-size: 12px; }
#nearby-peers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 28px; list-style: none; margin: 8px 0 0; padding: 0; }
#nearby-peers li { min-width: 0; }
.nearby-device { display: flex; gap: 14px; align-items: center; width: 100%; min-height: 78px; padding: 14px 8px; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--text); border-radius: 0; }
.peer-icon { width: 28px; height: 32px; flex-shrink: 0; fill: none; stroke: #8193aa; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.peer-copy { min-width: 0; }
.nearby-device strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.nearby-device .peer-detail { display: block; font-size: 12px; margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
button.nearby-device:hover:not(:disabled), button.nearby-device[aria-pressed=true] { background: var(--accent-soft); }
.nearby-device:disabled { opacity: 1; cursor: default; }
.empty-transfer { color: var(--muted); padding: 22px 0; font-size: 13px; }
.send-heading { text-align: center; padding: 36px 0 28px; }
.send-heading p { margin-top: 10px; }
.file-drop-zone { padding: 32px 20px; text-align: center; background: var(--background); border: 1px dashed #a7b6ca; border-radius: 12px; }
.file-drop-zone > svg { display: block; width: 44px; height: 44px; margin: 0 auto 16px; stroke: #8193aa; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.file-drop-zone strong { display: block; font-size: 16px; }
.file-drop-zone .field-hint { margin-top: 4px; }
.file-drop-zone .picker { margin-top: 20px; }
.file-drop-zone.drag-over { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.file-drop-zone[aria-disabled=true] { opacity: .6; }
.picker { position: relative; cursor: pointer; }
.picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
#selection { margin-top: 16px; }
#selection-summary { font-weight: 600; }
#selection-files { list-style: none; padding: 0; margin: 8px 0; max-height: 220px; overflow: auto; font-size: 13px; }
#selection-files li { border-bottom: 1px solid var(--line); padding: 10px 0; overflow-wrap: anywhere; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.button-row:has(:not([hidden])) { margin-top: 18px; }
.transfer-ledger:empty { display: none; }
.transfer-ledger { margin-top: 20px; }
.file-progress { padding: 14px 0; border-bottom: 1px solid var(--line); }
.file-progress strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.file-progress p { font-size: 12px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.file-progress progress { width: 100%; height: 4px; margin-top: 10px; appearance: none; border: 0; background: #dce3ec; border-radius: 2px; overflow: hidden; }
.file-progress progress::-webkit-progress-bar { background: #dce3ec; }
.file-progress progress::-webkit-progress-value { background: var(--accent); }
.file-progress progress::-moz-progress-bar { background: var(--accent); }
.download-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 24px; }
#download-summary { margin-right: auto; }
.received-file { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 20px; padding: 20px 0; }
.preview-column { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.preview-column .button { min-height: 44px; text-align: center; }
.file-copy { min-width: 0; padding-top: 4px; }
.file-copy .text-button { margin-top: 8px; }
.file-preview { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--background); color: var(--muted); font-size: 12px; }
.file-kind { border: 1px solid #a7b6ca; padding: 14px 6px; border-radius: 3px; max-width: 90%; overflow: hidden; }
.file-preview img, .file-preview video { position: absolute; width: 100%; height: 100%; object-fit: cover; opacity: 0; background: var(--background); }
.file-preview .preview-ready { opacity: 1; }
.online-notice { padding: 12px 16px; border: 1px solid #deb2ac; background: #fff0ed; color: #8a261f; margin: 12px 0; border-radius: 6px; overflow-wrap: anywhere; }
.online .app-footer { display: block; flex-shrink: 0; width: 100%; max-width: 1280px; margin: 0 auto; padding: 12px 40px max(12px, env(safe-area-inset-bottom)); height: auto; border: 0; font-size: 12px; }
.no-script-note { width: 100%; max-width: 1280px; margin: 16px auto; padding: 0 40px; color: var(--muted); }
.footer-downloads { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.footer-downloads .button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.ios-download { position: relative; max-width: 100%; }
.ios-download-qr { position: absolute; bottom: 100%; left: 0; z-index: 3; width: 232px; max-width: calc(100vw - 40px); padding-bottom: 8px; visibility: hidden; }
.ios-download:not([data-tooltip-dismissed]):is(:hover, :focus-within) .ios-download-qr { visibility: visible; }
.ios-download-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 6px 20px #19283e24; text-align: center; }
.ios-download-card img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.ios-download-card p { margin-top: 8px; font-size: 13px; overflow-wrap: anywhere; }
.online .footer-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding: 8px 0; }
.online .footer-brand, .online .footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; min-width: 0; max-width: 100%; }
.online .footer-brand > *, .online .footer-meta > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.online .footer-meta { margin-left: auto; justify-content: flex-end; text-align: right; }
.online .icp-link { display: inline-flex; align-items: center; min-height: 44px; }
.online .icp-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.online .legal-links { justify-content: flex-end; font-size: inherit; }
.online #legal-error { margin-top: 8px; color: var(--danger); text-align: right; }
.online .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#info-dialog { width: min(580px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 28px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 64px #19283e30; }
#info-dialog::backdrop { background: #19283e66; }
#info-dialog section { margin-top: 28px; }
#connection-help { margin-top: 28px; }
#connection-help > summary { min-height: 44px; padding-block: 12px; cursor: pointer; }
#info-dialog p { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.8; }
#info-dialog label { display: block; margin: 22px 0 8px; font-size: 13px; }
#device-name { width: 100%; min-height: 44px; border: 1px solid #a7b6ca; border-radius: 6px; padding: 8px 12px; font: inherit; }
#info-dialog .motion-preference { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.motion-preference input { width: 18px; height: 18px; accent-color: var(--accent); }
.connection-log summary { padding: 12px 0; cursor: pointer; }
.connection-log ol { padding-left: 20px; max-height: 300px; overflow: auto; }
.connection-log li { padding: 12px 0; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.connection-log strong, .connection-log time { display: block; }
.connection-log time { color: var(--muted); font-size: 12px; }
.connection-diagnostic { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; user-select: text; }
.received-file.received-text { grid-template-columns: minmax(0, 1fr); }
.text-card-body { margin: 12px 0 0; padding: 16px; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 16px; line-height: 1.6; color: var(--text); background: var(--background); border: 1px solid var(--line); border-radius: 8px; user-select: text; }
.text-card-body:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.received-text .button-row { align-items: center; }
.received-text .button, .received-text .text-button { min-width: 44px; min-height: 44px; margin-top: 0; }
@media (max-width: 900px) {
  .online .app-header { grid-template-columns: minmax(0, 1fr) auto; height: auto; min-height: 76px; padding: 12px 20px; }
  .online .page-tabs { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .page-tabs button { flex: 1; min-width: 0; }
}
@media (max-width: 600px) {
  .online .brand { font-size: 19px; }
  .online .brand img { width: 28px; height: 28px; }
  .online-workbench { padding: 8px 20px 20px; }
  .transfer-scene { margin: 8px auto; }
  #nearby-peers { grid-template-columns: 1fr; }
  .storage-bar { gap: 12px; flex-wrap: wrap; }
  .received-file { grid-template-columns: 88px minmax(0,1fr); gap: 16px; }
  .download-actions { flex-wrap: wrap; }
  .online .app-footer { padding-inline: 20px; }
  .ios-download { position: static; }
  .hero-caption { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .transfer-scene * { animation: none !important; }
  .receive-target[data-motion=transferring] .flying-file { transform: translateX(60px); }
  .file-second { display: none; }
}
@media (scripting: none) {
  [data-language-loading] body.online { visibility: visible; }
  .online-workbench, .online .page-tabs, .online .header-actions { display: none; }
}
