:root {
  color-scheme: light;
  --paper: #faf9f6; --ink: #1b1c19; --muted: #62645f; --rule: #d6d6ce;
  --red: #c92a20; --tint: #f0efe9;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink); background: var(--paper);
}
.release-page {max-width:680px;margin:clamp(32px,9vh,88px) auto;padding:0 24px}
.release-page h1 {margin-bottom:24px}
.release-page p {margin:12px 0;line-height:1.65}
.release-page .pair-actions {margin:24px 0}
@media(max-width:420px){.mast .mast-inner{gap:12px}.mast nav{gap:10px}}
* {box-sizing:border-box}
body {margin:0}
input,button {font:inherit}
button,a {touch-action:manipulation}
button {cursor:pointer}
a {color:inherit}
button:disabled {cursor:not-allowed}
:focus-visible {outline:3px solid #6974ae;outline-offset:3px}
.hidden,[hidden] {display:none!important}
.mast {border-bottom:1px solid var(--ink)}
.mast-inner,.workspace {max-width:1200px;margin:auto;padding-inline:clamp(16px,4vw,52px)}
.mast-inner {min-height:78px;display:flex;align-items:center;gap:42px}
.brand {display:inline-flex;align-items:center;gap:11px;font-weight:850;font-size:30px;line-height:1;text-decoration:none;letter-spacing:-.06em}
.paper {width:34px;height:32px;display:block;background:var(--red);clip-path:polygon(0 39%,100% 0,73% 100%,54% 65%,84% 17%,43% 59%)}
nav {display:flex;gap:24px} nav a {font-size:14px;text-decoration:none;color:var(--muted)}
nav a:hover,.text-button:hover {color:var(--red);text-decoration:underline}
.connection {margin-left:auto;font-size:12px;line-height:1.3;color:var(--muted);display:inline-flex;align-items:center;gap:7px}
.connection i,.online-dot {height:8px;width:8px;border-radius:50%;display:inline-block;background:#807d75;flex:none}
.connection.online i,.online-dot {background:#258459}
.connection.offline i {background:var(--red)}
.workspace {display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,29%);column-gap:clamp(32px,5vw,72px);padding-block:clamp(28px,5vw,68px);align-items:start}
.desk {grid-area:1/1;min-width:0}
.rail {grid-area:1/2;min-width:0;padding-top:7px}
h1,h2,h3,p {margin:0}
h1 {font-size:clamp(42px,6vw,78px);line-height:1.08;letter-spacing:-.04em;font-weight:800}
h2,h3 {font-size:21px;letter-spacing:-.035em;line-height:1.4}
.send-head,.section-head,.status-line {display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.send-head {padding-bottom:23px;border-bottom:3px solid var(--ink)}
.limit,.pill,.status-line,.inbox-hint,.notice,.device span,.history-item span,.empty,.drop-note,.pair-copy p {font-size:13px;color:var(--muted);line-height:1.65}
.limit,.pill {white-space:nowrap}
.pill {padding:1px 8px;background:var(--tint);border:1px solid var(--rule)}
.pill.active {color:#175e41;border-color:#bbd5c5}
.section-head {border-top:2px solid var(--ink);padding-block:13px}
.dropzone {min-height:238px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;background:var(--tint);border:1px solid var(--rule);margin-top:14px;padding:24px;cursor:pointer}
.dropzone.drag {outline:2px dashed var(--red);outline-offset:-5px}
.dropzone.disabled {cursor:default}
.dropzone strong {font-size:19px;font-weight:650}
.file-symbol {width:44px;height:48px;position:relative;margin-bottom:4px}
.file-symbol i,.file-symbol b {position:absolute;display:block;background:var(--paper);border:1.8px solid var(--ink);width:31px;height:38px}
.file-symbol i {left:1px;top:1px;transform:rotate(-10deg)}
.file-symbol b {left:10px;top:6px;display:grid;place-items:center;font:25px Arial;color:var(--red)}
.button,.inbox-button {display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:8px 13px;min-height:38px;font-size:14px;font-weight:600;text-decoration:none;border:1px solid var(--ink);color:var(--ink);background:var(--paper);border-radius:2px}
.primary {background:var(--red);color:white;border-color:var(--red)}
.primary:hover:not(:disabled) {background:#a42119}
.secondary:hover,.inbox-button:hover {background:var(--tint)}
.primary:disabled {color:white;background:#777971;border-color:#777971}
.dropzone .button {margin-top:9px;min-width:146px}
.send-tools {display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.recipient-bar,.file-kind {display:flex;align-items:center;gap:8px;font-size:14px}
.recipient-bar {margin-top:12px}.file-kind {margin-top:5px;color:var(--muted);font-size:13px}
.recipient-bar select,.file-kind select {font:inherit;max-width:80%;padding:4px 6px;color:var(--ink);background:var(--paper);border:1px solid var(--rule)}
.send-tools .secondary:disabled {color:var(--muted);border-color:var(--rule)}
.draft-footer {display:flex;justify-content:space-between;align-items:center;gap:10px}
.draft-footer .dialog-actions {margin:0}
#text-draft,.inbox-preview-text {display:block;width:100%;min-width:0;font:inherit;font-size:16px;line-height:1.6;color:var(--ink);background:white;border:1px solid var(--rule);padding:9px;resize:vertical}
#text-draft {margin:15px 0;max-height:45vh}
#paste-files {margin:12px 0;padding-left:20px;max-height:32vh;overflow:auto;overflow-wrap:anywhere}
.inbox-item .inbox-name {flex:1 1 150px}
.inbox-select {display:inline-flex;align-items:center;justify-content:center;min-height:32px}
.inbox-select input {width:17px;height:17px;margin:0;accent-color:var(--red)}
.inbox-item:only-child .inbox-select {display:none}
.inbox-preview {width:100%;display:flex;gap:8px;flex-wrap:wrap}
.inbox-preview-text {min-height:5em}
.inbox-selection-count {font-size:13px;color:var(--muted)}
.text-button {background:none;border:none;padding:5px 0;color:var(--muted);font-size:13px}
.transfer-status {padding:12px 0 0}
.progress {margin-top:6px;height:3px;background:var(--rule)}
#progress-bar {height:100%;width:0;background:var(--red)}
.status-actions,.dialog-actions,.inbox-actions,.pair-actions,.inbox-zip {display:flex;flex-wrap:wrap;gap:8px}
.status-actions:not(:has(.button:not(.hidden))) {display:none}
.status-actions,.dialog-actions {margin-top:13px}
.inbox {margin:35px 0 15px;border-top:2px solid var(--ink);padding-top:13px;scroll-margin-top:15px}
.inbox h3 {font-size:25px}
.inbox-hint,.notice {margin:8px 0 13px}
.inbox-item,.history-item {border-top:1px solid var(--rule);padding:12px 0}
.inbox-item {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
.inbox-name,.history-item strong,.device strong,.pair-copy {overflow-wrap:anywhere;min-width:0}
.inbox-name {font-weight:650}
.inbox-zip {margin-top:10px;align-items:center}
.inbox .inbox-button,.inbox .inbox-download {font-size:13px;min-height:35px}
.pairing,.devices {margin-bottom:27px}
.pair-copy label {display:block;font-size:13px;margin:9px 0 4px}
.pair-copy p {margin-block:4px 10px}
.pair-body>.device-icon {display:none}
.pair-code {font:700 26px/1.6 monospace;letter-spacing:.15em;margin-bottom:8px}
.qr {width:224px;max-width:100%;background:#fff;margin:2px 0 12px}
.qr svg {display:block;width:100%;height:auto}
.link-row {display:flex;gap:6px}
.link-row input {width:0;min-width:0;flex:1;border:1px solid var(--rule);padding:8px;background:white}
.pair-actions {margin-top:9px}
.device {display:flex;align-items:center;gap:9px;padding:7px 0}
.device strong,.device span:not(.device-icon) {display:block}
.device strong {font-size:15px}
.device-icon {display:grid;place-items:center;width:29px;height:29px;background:var(--tint);flex:none}
.device .online-dot {margin-left:auto}
.history-card {padding-top:12px;border-top:1px solid var(--rule)}
.history-card summary {cursor:pointer;font-size:14px}
.history-item span {display:block}
.history-item strong {font-size:14px}
dialog {color:var(--ink);background:var(--paper);border:1px solid var(--ink);border-top:4px solid var(--red);padding:24px;width:min(400px,calc(100% - 32px))}
dialog::backdrop {background:#1118}
dialog p {font-size:15px;margin-top:10px;overflow-wrap:anywhere}
#toast {position:fixed;bottom:18px;left:50%;transform:translateX(-50%);max-width:min(580px,92vw);width:max-content;background:var(--ink);color:white;padding:10px 16px;font-size:14px;pointer-events:none;opacity:0;z-index:4}
#toast.show {opacity:1}
.download-status {
  position:fixed; right:max(16px,env(safe-area-inset-right)); bottom:max(16px,env(safe-area-inset-bottom));
  z-index:3; width:min(340px,calc(100vw - 32px)); padding:14px 16px;
  color:var(--ink); background:var(--paper); border:1px solid var(--ink);
  box-shadow:0 3px 16px rgb(0 0 0 / 12%); overflow-wrap:anywhere;
}
.download-status strong {display:block;font-size:15px;max-height:3em;overflow:hidden}
.download-line {display:flex;justify-content:space-between;gap:8px;font-size:13px;margin-top:4px}
.download-status progress {display:block;width:100%;height:8px;accent-color:var(--red);margin-top:8px}
#send-queue .upload-item {display:flex;flex-direction:column;gap:4px}
.upload-name {overflow-wrap:anywhere}
.upload-phase, .upload-details {display:block}
.upload-details {color:var(--muted);font-size:12px}
.upload-item progress {display:block;width:100%;height:8px;accent-color:var(--red)}
.download-status .text-button {margin-top:6px}
@media(max-width:760px) {
  .send-tools .button {min-width:0}
  .mast-inner {min-height:62px;gap:19px}.brand {font-size:24px}.paper {width:26px;height:25px}
  nav {gap:12px}nav a {font-size:13px}.connection {font-size:11px}
  .workspace {display:flex;flex-direction:column;padding-block:22px;gap:24px}
  .rail,.desk {width:100%}.rail {padding:0}.rail .devices,.rail .history-card {display:none}
  .pairing {margin:0}.desk {order:2}
  .workspace:has(#unpair) .desk {order:-1}
  .workspace:has(#unpair) .pairing {margin-bottom:22px}
  .workspace:has(#unpair) .devices,.workspace:has(#unpair) .history-card {display:block}
  .send-head {padding-bottom:14px}.dropzone {min-height:176px;margin-top:9px;padding:14px}
  .drag-label {display:none}
  .inbox {margin-top:21px}.inbox-actions .inbox-button,.inbox-actions .inbox-download {min-height:42px}
  .pairing:has(#qr) .pair-body {display:flex;gap:12px;align-items:center}.qr {width:110px;flex:none}
}
/* 共用服务界面 */
.rail .devices {display:block}.pair-actions {margin-bottom:14px}.pair-copy label,#claim-form label {display:block;font-size:13px;margin:12px 0 5px}.scan-link {display:inline-block;margin-top:12px;font-size:14px}.peer-actions {margin-left:auto}.peer-actions button {white-space:nowrap}.inbox-item small {display:block;color:var(--muted);font-weight:normal;margin-top:4px}.inbox-item .inbox-name {flex:1}.inbox-item .inbox-actions {align-items:center}.recipient-bar select {min-width:160px}.pair-code {user-select:all}.pair-copy .qr img {max-width:100%}.error {color:#a42119;overflow-wrap:anywhere}#claim-form p {font-size:13px;color:var(--muted);margin-top:8px}#send-queue div {padding:6px 0;font-size:13px;overflow-wrap:anywhere}#inbox-list .empty {padding:12px 0}.device.muted {font-size:13px}.device strong {overflow-wrap:anywhere}
@media(max-width:760px){.rail .devices {display:block}.workspace .desk {order:0}.workspace .rail {order:0}.workspace {gap:24px}.pair-actions .button {flex:1}.inbox-item {align-items:flex-start}.inbox-item .inbox-actions {width:100%;justify-content:flex-end}}
#text-compose { margin: 1rem 0; } #text-compose textarea { display: block; box-sizing: border-box; width: 100%; margin: .5rem 0; padding: .65rem; font: inherit; } #text-compose small { display: block; margin-top: .5rem; }
.recipient-bar { flex-wrap: wrap; } .online-choice { display: inline-flex; align-items: center; gap: .35em; font-weight: normal; } #live-queue > div { padding: .5em 0; }
