@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #f7f5ee;
  --surface: #fffef9;
  --ink: #253d35;
  --muted: #6d7770;
  --line: #dfE3d9;
  --soft: #eef0e7;
  --accent: #d64e34;
  --accent-soft: #fae8dd;
  --green: #427658;
  --shadow: 0 16px 50px #253d350a;
  --body-font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --display-font: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  --mono-font: "Cascadia Code", "SFMono-Regular", "Consolas", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #18241f;
  --surface: #1f2d26;
  --ink: #edf0df;
  --muted: #a3afa4;
  --line: #3a493d;
  --soft: #2a382d;
  --accent: #ff9676;
  --accent-soft: #46342c;
  --green: #96c4a0;
  --shadow: 0 16px 50px #00000012;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 14px/1.6 var(--body-font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, a, input { outline-offset: 5px; }
:focus-visible { outline: 2px solid var(--accent); }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
p, h1, h2, h3 { margin: 0; }
.shell { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.site-header { height: 108px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 13px; align-items: center; font-family: Georgia, var(--display-font); font-weight: 700; font-size: 25px; letter-spacing: -.7px; }
.brand-mark { position: relative; width: 45px; height: 45px; display: grid; place-items: center; background: var(--ink); color: var(--paper); border-radius: 13px; font-size: 22px; letter-spacing: -2px; padding-right: 2px; }
.brand-mark span { position: absolute; width: 9px; height: 9px; border: 2px solid var(--paper); border-radius: 50%; background: var(--accent); bottom: -2px; right: -2px; }
.brand-caption { display: block; font: 8px/1.5 var(--mono-font); letter-spacing: 1.5px; color: var(--muted); margin-top: 1px; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.connection-status { display: flex; align-items: center; gap: 8px; margin-right: 16px; font-size: 12px; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #b59450; box-shadow: 0 0 0 4px #b5945010; }
.connection-status[data-state="online"] .status-dot { background: var(--green); box-shadow: 0 0 0 4px #42765812; }
.connection-status[data-state="offline"] .status-dot { background: var(--accent); }
.icon-button { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 9px; background: transparent; }
.icon-button:hover { background: var(--soft); border-color: var(--line); }
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; min-height: 393px; padding: 50px 28px 44px; }
.hero-copy { animation: arrive .6s ease-out both; }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 10px var(--mono-font); letter-spacing: 1.5px; margin-bottom: 25px; }
.eyebrow > span { width: 15px; height: 2px; background: var(--accent); }
h1 { font: 600 64px/1.2 var(--display-font); letter-spacing: -2.5px; }
.accent-word { position: relative; color: var(--accent); white-space: nowrap; }
.accent-word svg { width: 100%; height: 12px; position: absolute; bottom: -6px; left: 0; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; opacity: .7; }
.hero-copy > p { color: var(--muted); font-size: 15px; line-height: 1.9; margin-top: 23px; }
.hero-facts { display: flex; gap: 12px; align-items: center; font-size: 11px; margin-top: 24px; color: var(--muted); }
.hero-facts > span { display: inline-flex; align-items: center; gap: 5px; }
.hero-facts .icon { width: 15px; height: 15px; color: var(--green); }
.fact-divider { height: 11px; width: 1px; background: var(--line); }
.connection-art { position: relative; height: 310px; width: 100%; display: grid; place-items: center; animation: arrive .8s .1s ease-out both; background: radial-gradient(circle at 50% 50%, #d9ded322 0, transparent 65%); }
.orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; width: 130px; height: 130px; }
.orbit-two { width: 220px; height: 220px; border-style: dashed; }
.orbit-three { width: 310px; height: 310px; opacity: .65; }
.art-center { width: 75px; height: 75px; border-radius: 24px; background: var(--accent); color: var(--paper); display: grid; place-items: center; box-shadow: 0 0 0 10px var(--accent-soft), 0 10px 25px #d64e3415; transform: rotate(-8deg); }
.art-center .icon { width: 32px; height: 32px; transform: rotate(8deg); }
.orbit-node { position: absolute; width: 63px; height: 63px; border: 1px solid var(--line); border-radius: 18px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); }
.orbit-node .icon { width: 30px; height: 30px; }
.orbit-node span { position: absolute; top: 72px; white-space: nowrap; font: 9px var(--mono-font); letter-spacing: 1px; }
.node-computer { top: 36px; left: calc(50% - 148px); transform: rotate(-8deg); }
.node-phone { bottom: 45px; right: calc(50% - 150px); transform: rotate(9deg); }
.art-dot { position: absolute; width: 9px; height: 9px; background: var(--green); border-radius: 50%; border: 2px solid var(--paper); }
.dot-one { top: 51px; right: calc(50% - 92px); }
.dot-two { bottom: 63px; left: calc(50% - 90px); background: var(--accent); }
.art-label { position: absolute; bottom: -5px; left: 30px; font: 9px var(--mono-font); letter-spacing: 1px; color: var(--muted); transform: rotate(-7deg); }
.notice { background: var(--accent-soft); border: 1px solid #d64e3426; border-radius: 10px; color: var(--ink); padding: 12px 16px; font-size: 12px; line-height: 1.8; }
#environment-warning { margin-bottom: 20px; }
.workspace { border: 1px solid var(--line); display: grid; grid-template-columns: 300px 1fr; background: var(--surface); border-radius: 19px; overflow: hidden; box-shadow: var(--shadow); }
.room-panel { padding: 30px 27px 24px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--soft) 40%, var(--surface)); display: flex; flex-direction: column; }
.section-kicker { font: 9px/1.5 var(--mono-font); letter-spacing: 1.5px; color: var(--muted); margin-bottom: 7px; }
h2 { font-size: 20px; line-height: 1.5; font-weight: 600; letter-spacing: -.4px; }
.room-panel h2 { font: 600 27px/1.5 var(--display-font); margin-bottom: 5px; }
.muted { color: var(--muted); }
.room-panel > p { font-size: 12px; margin-bottom: 24px; }
.button { min-height: 42px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border-radius: 9px; padding: 10px 17px; font-size: 12px; font-weight: 600; transition: transform .15s, background .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.primary { background: var(--ink); color: var(--paper); }
.primary:hover:not(:disabled) { background: var(--green); }
.secondary { border-color: var(--line); background: var(--surface); }
.secondary:hover { background: var(--soft); }
.wide { width: 100%; }
.or-divider { display: flex; align-items: center; gap: 10px; font-size: 10px; color: var(--muted); margin: 21px 0 17px; }
.or-divider::before, .or-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.small-label { font-size: 10px; display: block; color: var(--muted); margin-bottom: 6px; }
.input-action { display: flex; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; overflow: hidden; }
input { min-width: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 12px; border-radius: 9px; }
input::placeholder { color: var(--muted); opacity: .65; }
.input-action input { width: 100%; border: none; background: transparent; font: 15px var(--mono-font); letter-spacing: 2px; padding: 13px 11px; }
.compact { padding: 9px; min-width: 42px; background: var(--soft); border-radius: 0; }
.room-footnote { display: flex; align-items: flex-start; gap: 7px; font-size: 10px; line-height: 1.8; color: var(--muted); margin-top: auto; padding-top: 27px; }
.tiny-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex-shrink: 0; margin-top: 6px; }
.room-code { font: 600 24px/1.4 var(--mono-font); letter-spacing: 2px; margin-bottom: 15px; }
.qr-code { width: 132px; min-height: 132px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: white; color: #253d35; margin: 0 auto 12px; display: grid; place-items: center; }
.qr-code svg { width: 100%; display: block; }
.room-note { font-size: 11px; color: var(--muted); margin-bottom: 14px; text-align: center; line-height: 1.8; }
.text-button { border: none; background: transparent; color: var(--muted); padding: 8px 3px; font-size: 11px; }
.text-button:hover { color: var(--accent); }
.device-panel { padding: 30px; min-height: 395px; display: flex; flex-direction: column; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.count-badge { font: 10px var(--mono-font); background: var(--soft); color: var(--muted); border-radius: 5px; padding: 3px 7px; margin-left: 10px; vertical-align: middle; }
.live-indicator { font: 9px var(--mono-font); letter-spacing: 1px; color: var(--green); display: flex; align-items: center; gap: 7px; }
.live-indicator > span { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.self-device { display: flex; align-items: center; padding: 14px 0; gap: 12px; margin-top: 12px; border-bottom: 1px dashed var(--line); }
.self-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: var(--muted); background: var(--soft); }
.self-device .small-label { margin-bottom: 0; font-size: 9px; }
.self-device strong { font-size: 12px; font-weight: 500; }
.self-device .icon-button { margin-left: auto; color: var(--muted); }
.self-device .icon-button .icon { width: 16px; height: 16px; }
.peer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.peer-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-height: 155px; padding: 18px 15px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; text-align: left; transition: border-color .15s, transform .15s, background .15s; }
.peer-card:hover, .peer-card.drag-over { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-3px); }
.peer-device-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--soft); display: grid; place-items: center; margin-bottom: 7px; }
.peer-card:nth-child(3n + 2) .peer-device-icon { background: var(--accent-soft); color: var(--accent); }
.peer-name { font-weight: 600; font-size: 13px; width: 100%; overflow-wrap: anywhere; }
.peer-subtitle { color: var(--muted); font-size: 10px; }
.peer-arrow { position: absolute; top: 18px; right: 13px; color: var(--muted); }
.peer-arrow .icon { width: 16px; height: 16px; }
.devices-empty { min-height: 196px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14px; }
.empty-symbol { position: relative; width: 70px; height: 55px; display: grid; place-items: center; color: var(--muted); margin-bottom: 13px; }
.empty-symbol .icon { width: 28px; height: 28px; position: relative; background: var(--surface); }
.empty-symbol span { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 1px dashed var(--line); }
.empty-symbol span:nth-child(2) { width: 70px; height: 70px; opacity: .5; }
.devices-empty h3 { font-size: 14px; font-weight: 500; margin-bottom: 5px; }
.devices-empty p { font-size: 11px; color: var(--muted); }
.empty-hint { font-size: 10px; color: var(--muted); opacity: .8; margin-top: 13px; }
.drop-tip { font-size: 10px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: auto; padding-top: 21px; }
.drop-tip .icon { width: 14px; height: 14px; }
.transfer-section { padding: 35px 0 0; }
.transfer-section h2 { font-size: 18px; }
.transfers { margin-top: 17px; display: flex; flex-direction: column; gap: 12px; }
.transfer-empty { padding: 25px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 11px; border: 1px dashed var(--line); border-radius: 12px; }
.transfer-empty .icon { width: 17px; height: 17px; }
.transfer-card { background: var(--surface); padding: 19px 22px; border-radius: 12px; border: 1px solid var(--line); }
.transfer-heading { display: flex; align-items: center; gap: 12px; }
.transfer-icon { width: 39px; height: 39px; background: var(--soft); display: grid; place-items: center; border-radius: 10px; }
.transfer-detail { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.transfer-detail strong { font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.transfer-detail > span { font-size: 10px; }
.transfer-status { font-size: 10px; color: var(--muted); white-space: nowrap; }
.transfer-card[data-status="completed"] .transfer-status, .transfer-card[data-status="completed"] .transfer-icon { color: var(--green); }
.transfer-card[data-status="failed"] .transfer-status { color: var(--accent); }
.transfer-progress { display: block; width: 100%; height: 4px; border: 0; border-radius: 4px; overflow: hidden; margin-top: 18px; background: var(--soft); accent-color: var(--accent); }
.transfer-progress::-webkit-progress-bar { background: var(--soft); }
.transfer-progress::-webkit-progress-value { background: var(--accent); }
.transfer-progress::-moz-progress-bar { background: var(--accent); }
.transfer-stats { display: flex; justify-content: space-between; gap: 15px; font-size: 10px; color: var(--muted); margin-top: 8px; }
.transfer-stats span:first-child { overflow-wrap: anywhere; }
.transfer-stats span:last-child { white-space: nowrap; font-family: var(--mono-font); }
.transfer-note { margin-top: 10px; font-size: 11px; color: var(--muted); }
.download-list { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.download-link, .saved-file { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; border: 1px solid var(--line); padding: 5px 9px; font-size: 11px; overflow-wrap: anywhere; max-width: 100%; }
.download-link { color: var(--accent); }
.download-link:hover { background: var(--accent-soft); }
.download-link .icon { width: 14px; height: 14px; }
.saved-file { color: var(--green); }
.site-footer { border-top: 1px solid var(--line); margin-top: 46px; padding: 22px 0 30px; display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.site-footer strong { font: 600 12px Georgia, serif; color: var(--ink); }
.footer-version { font: 9px var(--mono-font); letter-spacing: 1px; }
.modal { width: min(440px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); padding: 30px; box-shadow: 0 30px 100px #00000025; max-height: calc(100dvh - 48px); }
.modal::backdrop { background: #18241f75; backdrop-filter: blur(5px); }
.modal h2 { font: 600 27px/1.5 var(--display-font); margin-bottom: 10px; }
.modal > .muted { font-size: 12px; line-height: 1.8; margin-bottom: 18px; }
.modal-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-heading .section-kicker { margin: 0; }
.modal-icon { background: var(--accent-soft); color: var(--accent); border-radius: 12px; width: 45px; height: 45px; display: grid; place-items: center; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions > .button { flex: 1; }
.modal-note { font-size: 10px; line-height: 1.8; color: var(--muted); margin-top: 15px; }
.full-input { width: 100%; margin-bottom: 18px; }
.receive-files { list-style: none; padding: 0; margin: 15px 0; max-height: 180px; overflow-y: auto; }
.receive-files li { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; font-size: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.receive-files li span:first-child { overflow-wrap: anywhere; }
.receive-files li span:last-child { white-space: nowrap; font-size: 10px; }
.help-modal { width: min(500px, calc(100% - 32px)); }
.help-steps { padding-left: 25px; margin: 15px 0 22px; }
.help-steps li { padding-left: 8px; margin-bottom: 15px; }
.help-steps li::marker { color: var(--accent); font: 12px var(--mono-font); }
.help-steps strong { font-size: 13px; }
.help-steps p { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 4px; }
.help-modal > .notice + p { margin-top: 16px; }
.toast-region { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); z-index: 10; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { font-size: 12px; padding: 12px 20px; border-radius: 10px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow); text-align: center; animation: arrive .2s ease-out both; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1450px) {
  .hero { min-height: 450px; padding-top: 65px; padding-bottom: 60px; }
}
@media (max-width: 1000px) {
  .shell { width: calc(100% - 48px); }
  .hero { padding-inline: 12px; gap: 10px; }
  h1 { font-size: 55px; }
  .workspace { grid-template-columns: 265px 1fr; }
  .room-panel, .device-panel { padding: 24px; }
  .peer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 32px); }
  .site-header { height: 82px; }
  .brand { font-size: 22px; gap: 10px; }
  .brand-mark { width: 38px; height: 38px; font-size: 19px; border-radius: 11px; }
  .brand-caption { font-size: 6px; letter-spacing: 1.1px; }
  .connection-status { margin-right: 3px; font-size: 10px; gap: 6px; }
  .header-tools { gap: 0; }
  .header-tools .icon-button { width: 31px; }
  .hero { min-height: 315px; padding: 32px 8px; grid-template-columns: 1fr .6fr; }
  .eyebrow { font-size: 7px; letter-spacing: .7px; margin-bottom: 18px; gap: 7px; }
  h1 { font-size: clamp(37px, 6.6vw, 49px); letter-spacing: -1.5px; }
  .hero-copy > p { font-size: 12px; margin-top: 17px; }
  .hero-facts { font-size: 9px; gap: 7px; margin-top: 18px; flex-wrap: wrap; }
  .connection-art { height: 235px; transform: scale(.72); transform-origin: 50% 50%; animation: none; }
  .art-label { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .room-panel { border-right: none; border-bottom: 1px solid var(--line); padding: 22px; }
  .room-panel h2 { font-size: 25px; }
  .room-panel > p { margin-bottom: 16px; }
  #room-empty { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: end; }
  #room-empty > .button { min-height: 46px; }
  .or-divider { display: none; }
  .room-footnote { padding-top: 15px; }
  #room-active { position: relative; min-height: 162px; padding-right: 145px; }
  #room-active .qr-code { position: absolute; top: 0; right: 0; width: 120px; min-height: 120px; }
  .room-code { font-size: 22px; margin-bottom: 10px; }
  .room-note { text-align: left; margin-bottom: 10px; }
  .device-panel { min-height: 330px; padding: 22px; }
  .panel-heading h2 { font-size: 18px; }
  .devices-empty { min-height: 170px; }
  .peer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .peer-card { min-height: 145px; padding: 14px 12px; }
  .peer-subtitle { font-size: 9px; }
  .peer-arrow { display: none; }
  .transfer-section { padding-top: 28px; }
  .transfer-card { padding: 16px; }
  .transfer-stats { flex-direction: column; gap: 3px; }
  .site-footer { margin-top: 32px; padding-bottom: 24px; gap: 10px; }
}
@media (max-width: 460px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-block: 33px; }
  .hero-copy { position: relative; }
  .connection-art { display: none; }
  h1 { font-size: 47px; }
  .hero-copy > p { font-size: 13px; }
  .hero-facts { font-size: 10px; }
  .eyebrow { font-size: 8px; }
  .connection-status { font-size: 0; margin-right: 8px; }
  .connection-status .status-dot { width: 7px; height: 7px; }
  #room-empty { grid-template-columns: 1fr; gap: 12px; }
  #room-empty .small-label { margin-bottom: 5px; }
  .peer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #room-active { padding-right: 116px; }
  #room-active .qr-code { width: 100px; min-height: 100px; }
  .room-code { font-size: 19px; letter-spacing: 1px; }
  .room-active .button { padding-inline: 9px; }
  .room-panel, .device-panel { padding: 20px; }
  .transfer-section .panel-heading { align-items: flex-end; gap: 5px; }
  .transfer-section h2 { font-size: 17px; }
  #clear-history { font-size: 10px; }
  .transfer-heading { gap: 9px; flex-wrap: wrap; }
  .transfer-icon { width: 32px; height: 32px; }
  .transfer-status { font-size: 9px; }
  .transfer-detail { min-width: 120px; }
  .transfer-heading .icon-button { width: 24px; height: 28px; }
  .site-footer { flex-direction: column; }
  .modal { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
