:root {
  color-scheme: light;
  --bg: #f4f5f0;
  --surface: #ffffff;
  --ink: #17211b;
  --muted: #657169;
  --line: #dde2dc;
  --green: #176b47;
  --green-dark: #105537;
  --green-soft: #e2f1e8;
  --danger: #a13b32;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
[hidden] { display: none !important; }

.topbar {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 11px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { background: var(--ink); color: white; border-radius: 7px; padding: 7px 8px; font-size: 12px; letter-spacing: .08em; }
.topbar-note { color: var(--muted); font-size: 13px; }
main { width: min(920px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 48px 0 36px; max-width: 740px; }
.hero.compact { padding-bottom: 30px; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .18em; margin: 0 0 16px; }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.08; letter-spacing: -.055em; margin: 0; font-weight: 760; }
.hero-copy { color: var(--muted); font-size: 17px; line-height: 1.75; margin: 22px 0 0; max-width: 620px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 45px rgba(23, 33, 27, .04); overflow: hidden; }
.drop-zone { margin: 16px; padding: 50px 24px; border: 1.5px dashed #bcc8bf; border-radius: 13px; text-align: center; transition: border-color .15s, background .15s; }
.drop-zone.dragging { border-color: var(--green); background: var(--green-soft); }
.file-icon { width: 48px; height: 48px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: 30px; font-weight: 300; }
.drop-zone h2 { font-size: 20px; margin: 0 0 10px; letter-spacing: -.02em; }
.drop-zone p { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.button { border: 0; border-radius: 9px; min-height: 42px; padding: 10px 18px; font-weight: 650; font-size: 14px; transition: background .15s; }
.button.primary { background: var(--green); color: white; }
.button.primary:hover:not(:disabled) { background: var(--green-dark); }
.button.quiet { background: #edf0ec; color: var(--ink); }
.button.quiet:hover:not(:disabled) { background: #e1e6e0; }
.button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(23, 107, 71, .28); outline-offset: 3px; }
#host-workspace { padding: 26px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading h2 { font-size: 19px; margin: 4px 0 0; }
.section-label { color: var(--muted); font-size: 12px; margin: 0; }
.host-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.prepare-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 20px; padding: 18px 0 4px; border-top: 1px solid var(--line); }
.prepare-actions .button { min-height: 48px; }
.prepare-actions p { flex: 1; min-width: 210px; margin: 0; }
.file-list { list-style: none; padding: 0; margin: 0; }
.file-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.file-item:last-child { border-bottom: 0; }
.file-name { font-size: 14px; font-weight: 650; overflow-wrap: anywhere; margin: 0 0 5px; }
.file-meta { font-size: 12px; color: var(--muted); margin: 0; }
.file-main { min-width: 0; }
.share-box { margin-top: 24px; padding: 22px; background: #f4f7f3; border-radius: 12px; }
.share-box > label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.copy-row { display: flex; gap: 10px; }
.copy-row input { min-width: 0; flex: 1; border: 1px solid #cfd8d0; border-radius: 9px; background: white; color: var(--ink); padding: 10px 13px; font-size: 13px; }
.connection-line { display: flex; align-items: center; gap: 8px; margin-top: 15px; color: var(--muted); font-size: 13px; }
.connection-line.large { margin: 0; padding: 23px 26px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 650; }
.dot { display: inline-block; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #b0b7b2; }
.dot.online { background: #279564; box-shadow: 0 0 0 4px rgba(39, 149, 100, .12); }
.dot.offline { background: var(--danger); }
.notice { margin-top: 18px; padding: 14px 16px; background: #edf4ef; color: #385145; border-radius: 10px; font-size: 13px; line-height: 1.65; }
.notice.warning { margin: 20px 26px 0; background: #f8eae7; color: #7b3730; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 0; margin: 34px 0 70px; }
.steps li { display: flex; align-items: flex-start; gap: 12px; }
.steps li > span { color: var(--green); font-size: 11px; font-weight: 800; padding-top: 3px; }
.steps strong { font-size: 13px; }
.steps p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 5px 0 0; }
.receive-panel { margin-bottom: 20px; }
.batch-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 26px 0; }
.batch-toolbar .button { margin-left: auto; }
.select-all-label { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-size: 13px; font-weight: 650; cursor: pointer; }
.select-all-label input, .file-checkbox { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
#selected-count { flex: 1; }
.file-select { display: grid; place-items: center; align-self: center; width: 48px; height: 48px; margin-left: -12px; cursor: pointer; }
.receive-list { padding: 0 26px; }
.receive-list .file-item { padding: 20px 0; }
.file-progress { width: 100%; height: 5px; margin-top: 12px; accent-color: var(--green); border: 0; }
.download-status { color: var(--muted); font-size: 12px; margin: 8px 0 0; min-height: 1em; }
.download-actions { padding: 0 26px 20px; }
.save-mode { display: flex; align-items: center; gap: 8px; padding: 0 26px 12px; color: var(--muted); font-size: 12px; cursor: pointer; }
.save-mode input { width: 15px; height: 15px; margin: 0; accent-color: var(--green); }
.support-note { padding: 0 26px 22px; margin: 0; font-size: 12px; line-height: 1.6; }
.muted { color: var(--muted); font-size: 12px; }
#send-status { margin: 8px 0 0; min-height: 1em; }
.empty-state { padding: 45px 26px; color: var(--muted); text-align: center; font-size: 14px; line-height: 1.8; }
.receive-notice { max-width: 680px; margin: 0 auto 70px; background: transparent; padding: 10px 0; color: var(--muted); }
footer { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 30px; border-top: 1px solid var(--line); display: flex; gap: 24px; color: var(--muted); font-size: 11px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); background: var(--ink); color: white; padding: 12px 18px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.18); font-size: 13px; z-index: 10; }

@media (max-width: 640px) {
  .topbar, main, footer { width: min(100% - 28px, 920px); }
  .topbar { padding: 20px 0; }
  .topbar-note { display: none; }
  .hero { padding: 34px 0 26px; }
  h1 { font-size: 39px; }
  .hero-copy { font-size: 15px; }
  .drop-zone { padding: 38px 16px; margin: 10px; }
  #host-workspace { padding: 20px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .host-actions { width: 100%; }
  .host-actions .button { flex: 1; }
  .steps { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
  .copy-row { flex-direction: column; }
  .copy-row .button { width: 100%; }
  .file-item { align-items: start; }
  .file-item .button { padding: 9px 12px; }
  footer { justify-content: space-between; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
