:root {
  color-scheme: light;
  --green: #1f5945;
  --green-dark: #174333;
  --paper: #f2f0e6;
  --card: #fffefa;
  --mint: #dbe8de;
  --coral: #f1785a;
  --ink: #17211d;
  --muted: #6d756f;
  --line: rgba(23, 33, 29, .11);
  --shadow: 0 22px 60px rgba(38, 47, 40, .10), 0 2px 8px rgba(38, 47, 40, .05);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; overflow-x: hidden; background: var(--paper); }
body { min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--ink); background: var(--paper); }
button, input { font: inherit; }
button { color: inherit; }

.site-header { width: min(1120px, calc(100% - 64px)); height: 82px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 19px; font-weight: 750; letter-spacing: -.045em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 12px; }
.brand-mark svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.status-pill { color: var(--muted); font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.status-pill i { width: 7px; height: 7px; display: inline-block; margin-right: 7px; border-radius: 50%; background: #4baa64; box-shadow: 0 0 0 3px rgba(75,170,100,.13); }

main { width: min(1120px, calc(100% - 64px)); margin: 0 auto; }
.view { min-height: calc(100vh - 138px); padding: 20px 0; }
.send-view { display: grid; grid-template-columns: minmax(350px, .82fr) minmax(560px, 1.18fr); align-items: center; gap: clamp(58px, 7vw, 96px); }
.hero-copy { text-align: left; }
.eyebrow { margin: 0 0 14px; color: var(--green); font: 650 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; }
.hero-copy h1 { margin: 0; font-size: clamp(52px, 5vw, 68px); line-height: 1.08; font-weight: 700; letter-spacing: -.065em; }
.hero-copy h1 em { color: var(--green); font-style: normal; }
.lede { max-width: 390px; margin: 24px 0 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.transfer-column { min-width: 0; }

.transfer-card, .receive-card { overflow: hidden; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.drop-zone { min-height: 466px; margin: 14px; padding: 38px 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 2px dashed rgba(31,89,69,.35); border-radius: 20px; background: #fcfdf9; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.drop-zone:is(:hover, .dragging) { border-color: var(--green); background: #f4f8f3; transform: translateY(-2px); }
.drop-zone.dragging { box-shadow: inset 0 0 0 3px rgba(31,89,69,.08); }
.drop-icon { width: 76px; height: 76px; margin-bottom: 24px; display: grid; place-items: center; color: var(--green); background: var(--mint); border-radius: 24px; transition: transform .18s ease; }
.drop-zone:is(:hover, .dragging) .drop-icon { transform: translateY(-4px); }
.drop-icon svg { width: 38px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drop-kicker { margin: 0 0 8px; color: var(--green); font-size: 12px; font-weight: 700; }
.drop-zone h2 { margin: 0; font-size: clamp(24px, 4vw, 31px); line-height: 1.25; letter-spacing: -.045em; }
.drop-help { margin: 9px 0 24px; color: var(--muted); font-size: 12px; }
.expiry-setting-before { width: min(390px, 100%); margin: 0 0 18px; text-align: left; }
.expiry-setting-before .field-label { display: block; }
.primary-button { width: 100%; min-height: 54px; padding: 0 20px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 14px; color: white; background: var(--green); font-size: 14px; font-weight: 700; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.picker-actions { width: min(390px, 100%); display: grid; grid-template-columns: 1.05fr .95fr; gap: 8px; }
.choose-button { padding-inline: 15px; justify-content: space-between; font-size: 13px; }
.choose-button span:last-child { font-size: 20px; font-weight: 400; }
.folder-button { min-height: 54px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid rgba(31,89,69,.22); border-radius: 14px; color: var(--green); background: var(--mint); font-size: 12px; font-weight: 700; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.folder-button:hover { background: #cfdfd2; transform: translateY(-1px); }
.folder-button span:last-child { font-size: 20px; font-weight: 400; }
.limit-note { margin-top: 17px; color: #858d87; font-size: 10px; }

.selected-panel, .progress-panel, .success-panel { min-height: 466px; padding: 38px; }
.selected-panel { display: flex; flex-direction: column; }
.file-row { display: flex; align-items: center; gap: 15px; }
.file-glyph, .receive-glyph { width: 58px; height: 68px; flex: none; display: grid; place-items: center; position: relative; color: var(--green); background: var(--mint); border-radius: 8px 16px 8px 8px; font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.file-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.file-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.file-copy span { color: var(--muted); font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.icon-button { width: 34px; height: 34px; margin-left: auto; flex: none; border: 0; border-radius: 50%; background: rgba(0,0,0,.05); font-size: 19px; line-height: 1; cursor: pointer; }
.divider { width: 100%; height: 1px; margin: 28px 0; background: var(--line); }
.field-label { margin-bottom: 12px; font-size: 12px; font-weight: 700; }
.segment { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.055); }
.segment button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; font-size: 12px; cursor: pointer; }
.segment button.active { color: var(--green); background: white; font-weight: 700; box-shadow: 0 1px 5px rgba(0,0,0,.08); }
.selected-panel > .primary-button { margin-top: auto; }

.progress-panel { display: flex; flex-direction: column; justify-content: center; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.progress-head span { font-size: 16px; font-weight: 700; }
.progress-head strong { color: var(--green); font: 700 34px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.progress-track { height: 9px; overflow: hidden; border-radius: 99px; background: #e1e5e0; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .2s ease; }
.progress-meta { display: flex; justify-content: space-between; margin-top: 16px; color: var(--muted); font: 500 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.progress-meta button { padding: 0; border: 0; color: #a64c3c; background: none; cursor: pointer; font: inherit; }

.success-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.success-mark { width: 58px; height: 58px; margin-bottom: 18px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 50%; font-size: 22px; font-weight: 800; }
.success-panel .eyebrow { margin-bottom: 8px; }
.success-panel h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.muted { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.mail-drafts { width: 100%; margin: 22px 0 8px; display: grid; gap: 9px; }
.mail-draft { min-height: 68px; padding: 10px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; text-align: left; background: #fcfdf9; }
.owner-mail-draft { border-color: rgba(166,76,60,.2); background: #fffaf7; }
.owner-mail-draft .mail-number { background: #a64c3c; }
.mail-number { width: 34px; height: 34px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 11px; font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.mail-draft div { min-width: 0; }
.mail-draft strong, .mail-draft small { display: block; }
.mail-draft strong { font-size: 12px; }
.mail-draft small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.mail-draft button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; color: white; background: var(--green); font-size: 10px; font-weight: 700; cursor: pointer; }
.mail-draft .eml-button { padding: 0 9px; color: var(--muted); background: rgba(0,0,0,.055); }
.manual-share { width: 100%; margin-top: 4px; }
.manual-share summary { color: var(--muted); font-size: 10px; cursor: pointer; }
.owner-key small { display: block; margin-top: 7px; color: #a64c3c; font-size: 9px; }
.encryption-note { margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.link-box { width: 100%; margin: 24px 0 14px; padding: 5px; display: flex; border-radius: 12px; background: rgba(0,0,0,.04); }
.manual-share .link-box { margin: 9px 0 0; }
.link-box input { flex: 1; min-width: 0; padding: 0 8px; border: 0; outline: none; color: var(--muted); background: transparent; font: 500 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.link-box button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 8px; color: white; background: var(--ink); font-size: 11px; font-weight: 700; cursor: pointer; }
.secondary-button { margin-top: 14px; border: 0; color: var(--ink); background: none; font-size: 13px; font-weight: 700; cursor: pointer; }

.trust-row { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #8b928d; font: 500 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.trust-row i { width: 3px; height: 3px; border-radius: 50%; background: #a9aea9; }

.receive-view { display: grid; place-items: center; }
.receive-card { width: min(580px, 100%); min-height: 500px; padding: 48px; display: grid; place-items: center; text-align: center; }
.receive-key { width: min(390px, 100%); }
.key-mark { width: 66px; height: 66px; margin: 0 auto 20px; display: grid; place-items: center; color: var(--green); background: var(--mint); border-radius: 22px; font-size: 34px; }
.key-mark svg { width: 34px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.receive-key h1 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.receive-key > p:not(.eyebrow) { margin: 10px 0 24px; color: var(--muted); font-size: 11px; }
.receive-key form { text-align: left; }
.delete-tools { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); text-align: left; }
.delete-tools summary { color: #a64c3c; font-size: 11px; font-weight: 700; cursor: pointer; }
.delete-tools-title { display: block; color: #a64c3c; font-size: 11px; }
.delete-tools label { margin-top: 14px; }
.receive-key label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; }
.receive-key input { width: 100%; min-height: 52px; margin-bottom: 12px; padding: 0 14px; border: 1px solid rgba(31,89,69,.24); border-radius: 12px; outline: none; background: white; font: 500 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.receive-key input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,89,69,.1); }
.danger-button { width: 100%; min-height: 46px; margin-top: 12px; border: 1px solid rgba(166,76,60,.28); border-radius: 12px; color: #a64c3c; background: #fff7f4; font-size: 12px; font-weight: 700; cursor: pointer; }
.danger-button:hover { background: #fbeae5; }
.danger-button:disabled { opacity: .55; cursor: wait; }
.delete-note { display: block; margin-top: 9px; color: #959b96; font-size: 9px; line-height: 1.5; text-align: center; }
.receive-loading { color: var(--muted); font-size: 12px; }
.spinner { width: 36px; height: 36px; margin: 0 auto 18px; border: 3px solid var(--mint); border-top-color: var(--green); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#receive-content { width: 100%; }
.receive-glyph { width: 76px; height: 88px; margin: 0 auto 22px; border-radius: 8px 22px 8px 8px; font-size: 11px; }
.receive-card h1 { max-width: 430px; margin: 0 auto; font-size: 23px; line-height: 1.35; letter-spacing: -.035em; }
.receive-size { margin: 9px 0 0; color: var(--muted); font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.receive-facts { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-bottom: 22px; text-align: left; font-size: 11px; }
.receive-facts > span { color: var(--muted); }
.receive-facts > strong:nth-child(2) { font-size: 11px; }
.safe-label { color: var(--green); font-size: 10px; }
.privacy-note { margin: 14px 0 0; color: #959b96; font-size: 9px; }
.virus-notice { margin: 8px 0 0; color: #a64c3c; font-size: 9px; font-weight: 650; }
.receive-error > span { width: 54px; height: 54px; margin: 0 auto 19px; display: grid; place-items: center; color: #a64c3c; background: #f6dfd9; border-radius: 50%; font-weight: 800; }
.receive-error h1 { margin: 0; font-size: 24px; }
.receive-error p { color: var(--muted); font-size: 12px; }
.receive-error a { color: var(--green); font-size: 13px; font-weight: 700; }
.receive-deleted > span { width: 54px; height: 54px; margin: 0 auto 19px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 50%; font-weight: 800; }
.receive-deleted h1 { margin: 0; font-size: 24px; }
.receive-deleted p { color: var(--muted); font-size: 12px; }
.receive-deleted a { color: var(--green); font-size: 13px; font-weight: 700; }

footer { min-height: 56px; display: grid; place-items: center; color: #949b95; font: 500 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 5; padding: 11px 17px; color: white; background: var(--ink); border-radius: 10px; font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 18px); transition: .2s ease; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .site-header, main { width: min(760px, calc(100% - 40px)); }
  .view { padding: 40px 0 70px; }
  .send-view { display: block; }
  .hero-copy { margin-bottom: 30px; text-align: center; }
  .hero-copy h1 { font-size: clamp(42px, 8vw, 58px); line-height: 1.12; }
  .lede { margin: 20px auto 0; }
  .drop-zone { min-height: 448px; padding: 42px 34px; }
  .selected-panel, .progress-panel, .success-panel { min-height: 448px; }
}

@media (max-width: 560px) {
  .site-header, main { width: calc(100% - 32px); }
  .site-header { height: 70px; }
  .brand { font-size: 18px; }
  .view { min-height: auto; padding: 26px 0 56px; }
  .hero-copy { margin-bottom: 24px; }
  .hero-copy h1 { font-size: 36px; }
  .lede { max-width: 300px; margin-top: 16px; font-size: 12px; }
  .transfer-card, .receive-card { border-radius: 24px; }
  .drop-zone { min-height: 390px; margin: 10px; padding: 30px 18px; border-radius: 17px; }
  .drop-icon { width: 72px; height: 72px; border-radius: 22px; }
  .drop-zone h2 { max-width: 250px; font-size: 25px; }
  .picker-actions { grid-template-columns: 1fr; }
  .selected-panel, .progress-panel, .success-panel { min-height: 410px; padding: 28px 22px; }
  .mail-draft { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .mail-draft .eml-button { grid-column: 3; min-height: 26px; }
  .segment { grid-template-columns: repeat(3, 1fr); }
  .trust-row { flex-wrap: wrap; gap: 8px; }
  .receive-card { min-height: 470px; padding: 36px 23px; }
  .receive-facts { grid-template-columns: auto 1fr; }
  .safe-label { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
