:root {
  color-scheme: light;
  --background: #f5f7fa;
  --surface: #fff;
  --text: #19283e;
  --muted: #5e6d80;
  --line: #dce3ec;
  --accent: #145ce6;
  --accent-hover: #104bc0;
  --accent-soft: #edf3ff;
  --success: #17734f;
  --danger: #a52d27;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); line-height: 1.6; }
button, select, input { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: inherit; text-decoration: none; }
button, select { touch-action: manipulation; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible, .picker:focus-within {
  outline: 3px solid var(--accent); outline-offset: 4px;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; font-weight: 650; letter-spacing: -.035em; line-height: 1.42; }
h2 { font-size: 24px; font-weight: 650; letter-spacing: -.025em; line-height: 1.4; }
h3 { font-size: 15px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.app-header { height: 83px; padding: 0 36px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 23px; font-weight: 700; letter-spacing: -.035em; }
.brand img { display: block; }
.brand .brand-caption { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 16px; padding-left: 22px; border-left: 1px solid var(--line); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.status { color: var(--success); display: inline-flex; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: inline-block; flex-shrink: 0; }
.status.paused { color: var(--muted); }
.paused .status-dot, .status-dot.inactive { background: var(--muted); }
.button { border-radius: 8px; padding: 11px 17px; line-height: 1.4; font-size: 13px; font-weight: 600; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s ease, border-color .15s ease; white-space: nowrap; min-height: 44px; }
.button.secondary { background: var(--surface); border-color: #cfd8e5; color: var(--text); }
.button.secondary:hover:not(:disabled) { background: #edf2f8; border-color: #aebed1; }
.button.primary { background: var(--accent); color: white; }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); }
.button.compact { padding: 8px 12px; min-height: 36px; font-size: 12px; }
.text-button { background: transparent; border: 0; color: var(--accent); font-size: 12px; padding: 8px; min-height: 36px; white-space: nowrap; border-radius: 5px; }
.text-button:hover:not(:disabled) { background: var(--accent-soft); }
.workbench { display: grid; grid-template-columns: 334px minmax(0, 1fr); max-width: 1400px; margin: 0 auto; min-height: calc(100vh - 131px); }
.connection { background: #eef2f8; padding: 33px 32px 26px; border-right: 1px solid var(--line); }
.intro { color: var(--muted); font-size: 13px; margin-top: 13px; line-height: 1.85; }
.pairing { margin-top: 26px; background: var(--surface); padding: 12px 12px 15px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.qr { width: 100%; max-width: 240px; height: auto; aspect-ratio: 1; display: block; margin: 0 auto; }
.qr img { display: block; width: 100%; height: auto; }
.qr-placeholder { height: 240px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; white-space: pre-line; padding: 16px; }
.pairing-label { font-size: 12px; color: var(--muted); display: flex; justify-content: center; gap: 6px; align-items: center; margin-top: 3px; }
.bump-panel { margin-top: 26px; }
.bump-panel:focus-visible { outline: 3px solid var(--accent); outline-offset: 8px; border-radius: 4px; }
.bump-symbol { display: block; margin-bottom: 16px; }
.bump-panel h2 { font-size: 21px; margin-bottom: 8px; }
.bump-panel > .button { width: 100%; margin-top: 21px; gap: 12px; min-height: 52px; }
.bump-panel kbd { font: inherit; border: 1px solid #ffffff9c; border-bottom-width: 3px; border-radius: 4px; padding: 0 14px 2px; }
.bump-status { font-size: 12px; margin-top: 12px; color: var(--muted); }
.bump-panel.armed .bump-status { color: var(--accent); font-weight: 600; }
#bump-countdown { display: block; min-height: 20px; font-variant-numeric: tabular-nums; }
#express-countdown { display: block; min-height: 20px; font-variant-numeric: tabular-nums; }
.bump-panel .spacebar { min-height: 74px; background: var(--surface); color: var(--text); border: 1px solid #a7b7ce; border-bottom: 5px solid #a7b7ce; display: flex; flex-direction: column; gap: 0; }
.bump-panel .spacebar:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); }
.bump-panel .spacebar kbd { border: 0; padding: 0; letter-spacing: .12em; font-size: 19px; }
.bump-panel .spacebar span { font-size: 12px; font-weight: 400; color: var(--muted); }
.bump-panel.express-enabled .bump-status { color: var(--accent); font-weight: 600; }
.touch-safety { margin-top: 14px; font-size: 11px; }
#manual-bump-panel { margin-top: 10px; }
#manual-bump-panel kbd { border-color: #a7b7ce; }
.qr-fallback { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 14px; }
.qr-fallback summary { cursor: pointer; min-height: 44px; padding: 9px 0; font-size: 12px; color: var(--accent); }
.qr-fallback .pairing { margin-top: 10px; }
.bump-confirmation { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.bump-confirmation > p { margin-top: 6px; }
.bump-candidate { padding: 18px 0 8px; }
.bump-candidate + .bump-candidate { border-top: 1px solid var(--line); margin-top: 12px; }
.bump-candidate strong, .bump-candidate .small { display: block; overflow-wrap: anywhere; }
.bump-code { display: block; font-size: 32px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: .18em; line-height: 1.4; margin: 8px 0; color: var(--accent); }
.bump-candidate-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.device-line { display: flex; align-items: center; gap: 9px; margin: 19px 0 17px; justify-content: center; }
.device-line strong { font-size: 13px; overflow-wrap: anywhere; }
.field-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
select { width: 100%; background: #fff; border: 1px solid #cfd8e5; color: var(--text); border-radius: 7px; padding: 9px; min-height: 40px; }
#network-hint { margin-top: 6px; font-size: 11px; }
.connection-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.connection-actions .button { font-size: 12px; padding: 9px 12px; }
.privacy-note { display: flex; align-items: flex-start; gap: 9px; border-top: 1px solid var(--line); padding-top: 21px; margin-top: 24px; font-size: 11px; color: #3e526d; line-height: 1.85; }
.privacy-note svg { flex-shrink: 0; margin-top: 2px; }
.receiving { padding: 34px 34px 28px; min-width: 0; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 27px; }
.workspace-heading p { margin-top: 7px; font-size: 12px; }
.local-badge { display: inline-flex; border: 1px solid #cddbef; color: #425d83; border-radius: 5px; font-size: 11px; padding: 4px 9px; white-space: nowrap; }
.destination { display: flex; align-items: center; gap: 12px; padding: 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.phone-presence { padding: 0 0 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.phone-presence strong { font-size: 14px; font-weight: 600; color: var(--muted); }
.phone-presence.connected strong { color: var(--success); }
.phone-presence p { margin-top: 5px; overflow-wrap: anywhere; }
.folder-symbol { color: var(--accent); flex-shrink: 0; display: flex; }
.destination-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.destination-info strong { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-height: 36px; }
.count { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 6px; font-variant-numeric: tabular-nums; }
.transfer-section { margin-top: 23px; }
.transfer-section > p { margin-top: 10px; }
.history-section { margin-top: 24px; }
.file-list { min-width: 0; }
.file-row { display: flex; align-items: center; gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.file-icon { width: 42px; height: 46px; border-radius: 7px; background: #e5edfa; color: #315d9d; font-size: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.file-icon.video { background: #ece9f7; color: #68528f; }
.file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.file-name { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.received-label { color: var(--success); font-size: 11px; white-space: nowrap; }
.percent { color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
progress { appearance: none; width: 100%; height: 5px; display: block; border: 0; border-radius: 5px; margin-top: 7px; overflow: hidden; background: #dfe7f3; accent-color: var(--accent); }
progress::-webkit-progress-bar { background: #dfe7f3; border-radius: 5px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 5px; }
progress::-moz-progress-bar { background: var(--accent); }
.empty-state { text-align: center; padding: 40px 12px 49px; border: 1px dashed #ced8e6; border-radius: 10px; }
.receive-illustration { color: #7c96b8; margin-bottom: 10px; }
.empty-state h3 { font-size: 17px; font-weight: 600; }
.empty-state p { color: var(--muted); margin-top: 9px; font-size: 12px; line-height: 1.9; }
.file-types { display: flex; gap: 13px; justify-content: center; margin-top: 21px; color: var(--muted); font-size: 10px; }
.file-types span + span { border-left: 1px solid var(--line); padding-left: 13px; }
.help { margin-top: 25px; color: var(--muted); font-size: 12px; }
.help summary { cursor: pointer; width: fit-content; min-height: 36px; padding-top: 7px; color: #425a7b; }
.help p { margin-top: 10px; line-height: 1.85; }
.app-footer { border-top: 1px solid var(--line); min-height: 48px; padding: 12px 36px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); background: var(--surface); }
.notice { color: #7d3329; background: #fff1ea; border: 1px solid #eecfc0; border-radius: 8px; padding: 13px 15px; font-size: 13px; margin-bottom: 18px; overflow-wrap: anywhere; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #19283e; color: white; border-radius: 8px; padding: 12px 20px; font-size: 13px; max-width: min(520px, 90vw); box-shadow: 0 6px 24px #19283e24; z-index: 10; }
.phone { font-size: 15px; }
.phone-header { display: flex; justify-content: space-between; align-items: center; max-width: 520px; margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) 24px 18px; }
.phone-header .brand { font-size: 22px; }
.phone-main { max-width: 520px; margin: 0 auto; padding: 20px 24px 0; }
.connection-indicator { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--success); margin-bottom: 19px; }
.phone-intro h1 { font-size: clamp(32px, 9vw, 42px); line-height: 1.35; letter-spacing: -.035em; }
.phone-intro p { color: var(--muted); font-size: 14px; line-height: 1.85; margin-top: 14px; }
.target-device { display: flex; gap: 14px; align-items: center; padding: 23px 0; margin-top: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.target-device svg { color: #617b9d; flex-shrink: 0; }
.target-device > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.target-device strong { font-size: 15px; overflow-wrap: anywhere; }
.target-ready { color: var(--success); font-size: 11px; white-space: nowrap; }
.pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 23px; }
.picker { position: relative; display: flex; flex-direction: column; padding: 21px 15px; background: var(--surface); border: 1px solid #c8d5e8; border-radius: 11px; gap: 3px; cursor: pointer; min-width: 0; transition: background .15s; }
.picker:hover { background: var(--accent-soft); }
.picker svg { color: var(--accent); margin-bottom: 11px; }
.picker strong { font-size: 15px; font-weight: 600; }
.picker span { font-size: 11px; color: var(--muted); }
.picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.picker.disabled { opacity: .5; cursor: not-allowed; }
.phone-queue { margin-top: 25px; }
.video-tip { color: var(--muted); font-size: 13px; line-height: 1.85; margin-top: 14px; }
.preparing-state { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--accent-soft); }
.preparing-state strong { font-size: 15px; }
.preparing-state p { font-size: 13px; color: var(--muted); margin-top: 6px; }
.preparing-state button { margin-top: 5px; }
.transfer-status { color: #425a7b; font-size: 13px; line-height: 1.7; margin-top: 10px; overflow-wrap: anywhere; }
.phone-queue h2 { font-size: 17px; }
.phone-file { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.phone-file .file-name { font-size: 14px; }
.phone-file .file-meta { font-size: 12px; }
.phone .text-button { min-height: 44px; }
#summary { margin-top: 14px; }
.send-button { display: flex; width: 100%; min-height: 52px; margin-top: 17px; font-size: 15px; }
.phone-guidance { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.9; }
.phone-guidance strong { color: #425a7b; font-weight: 550; }
.phone-guidance p { margin-top: 6px; }
.phone-guidance p + p { margin-top: 13px; font-size: 11px; }
.phone-footer { max-width: 520px; margin: 0 auto; padding: 29px 24px max(24px, env(safe-area-inset-bottom)); font-size: 11px; color: var(--muted); }
.phone #phone-error { margin-top: 20px; margin-bottom: 0; }
.success-state { text-align: center; padding: 28px 0 4px; animation: arrive .4s cubic-bezier(.16,1,.3,1); }
.success-check { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #e0f2e9; color: var(--success); font-size: 24px; }
.success-state h2 { font-size: 25px; margin-top: 12px; }
.success-state p { color: var(--muted); font-size: 13px; margin: 9px 0 20px; overflow-wrap: anywhere; }
.error-text { color: var(--danger); }
@keyframes arrive { from { transform: translateY(8px); clip-path: inset(0 0 12% 0); } to { transform: translateY(0); clip-path: inset(0); } }
@media (max-width: 1000px) {
  .workbench { grid-template-columns: 305px minmax(0, 1fr); }
  .connection { padding-left: 25px; padding-right: 25px; }
  .receiving { padding-left: 25px; padding-right: 25px; }
  .workspace-heading { align-items: flex-start; }
  .workspace-heading .local-badge { display: none; }
  .destination { flex-wrap: wrap; }
  .destination-info { flex-basis: calc(100% - 45px); }
  .destination > .text-button { margin-left: 33px; }
}
@media (max-width: 640px) {
  .desktop .app-header { padding: 18px; height: auto; gap: 14px; }
  .desktop .brand-caption { display: none; }
  .desktop .header-actions { gap: 8px; }
  .desktop .workbench { grid-template-columns: 1fr; }
  .desktop .connection { border-right: 0; border-bottom: 1px solid var(--line); }
  .desktop .pairing { max-width: 278px; margin-left: auto; margin-right: auto; }
  .desktop .app-footer { padding: 16px; gap: 15px; }
  .phone-main, .phone-header { padding-left: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
