@font-face {
  font-family: "Source Sans 3";
  src: url("/source-sans-3-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/source-sans-3-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/jetbrains-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

@font-face {
  font-family: "Dancing Script";
  src: url("/dancing-script.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --bg: #f1f4fb;
  --page-glow: #d9e5ff;
  --surface: #fff;
  --muted-surface: #f3f6fc;
  --guide: #213458;
  --guide-deep: #25314e;
  --guide-ink: #f3f7ff;
  --guide-muted: #cbd8ef;
  --signal: #c7fca1;
  --ink: #17213a;
  --muted: #465673;
  --signature: #4b656e;
  --line: #d1dbec;
  --blue: #2447cc;
  --accent-surface: #eaf0ff;
  --button: #254ce0;
  --button-hover: #1737b7;
  --on-button: #fff;
  --error: #9d3041;
  --success: #146149;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2a374d;
    --page-glow: #3b4c70;
    --surface: #303f57;
    --muted-surface: #28364b;
    --guide: #2b3e60;
    --guide-deep: #2d3853;
    --ink: #f3f6fe;
    --muted: #c7d2e7;
    --signature: #bdd7e0;
    --line: #536787;
    --blue: #b5c8ff;
    --accent-surface: #3a4d73;
    --button: #a3baff;
    --button-hover: #c5d3ff;
    --on-button: #192b59;
    --error: #ffb7c1;
    --success: #a8e9cc;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse 60rem 25rem at 86% 0%, var(--page-glow), transparent), var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-user-select: none;
  user-select: none;
}
button, input { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.wrap { max-width: 1056px; width: calc(100% - 64px); margin-inline: auto; }
main.wrap { flex: 1; }

.startup-screen {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse 26rem 20rem at center, var(--page-glow), transparent), var(--bg);
  animation: startup-timeout 0s 3s forwards;
}
.startup-screen::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
  mask-image: radial-gradient(ellipse 15rem 11rem at center, #0006, transparent);
  content: "";
}
.startup-screen:not(.is-ready) ~ :is(header, main, footer) {
  visibility: hidden;
  animation: startup-show-page 0s 3s forwards;
}
.startup-screen.is-ready { pointer-events: none; animation: startup-close 680ms cubic-bezier(.25, .58, .3, 1) both; }
.startup-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.startup-brand { position: relative; width: min(66vw, 230px); text-align: center; }
.startup-brand p { margin: 21px 0 0; font-size: 1.12rem; font-weight: 650; letter-spacing: -.025em; }
.startup-brand p span { color: var(--blue); }
.startup-transfer { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; }
.startup-card {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 10px 24px #17233e20;
}
.startup-card .icon { --icon-size: 22px; }
.startup-card span { width: 31px; height: 3px; }
.startup-contact { transform: rotate(-8deg); }
.startup-contact span { border-radius: 3px; background: currentColor; box-shadow: 0 5px 0 var(--line); }
.startup-code { transform: rotate(8deg); }
.startup-code span { background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 5.6px); }
.startup-track {
  display: grid;
  align-items: center;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 8px);
}
#startup-pulse {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent 52%, var(--blue));
  transform: scaleX(.2);
  transform-origin: right;
}

@media (prefers-reduced-motion: no-preference) {
  .startup-contact { animation: startup-send 1100ms ease both; }
  .startup-code { animation: startup-receive 1100ms ease both; }
  #startup-pulse { animation: startup-signal 1100ms ease-out both; }
}
@media (prefers-reduced-motion: reduce) {
  .startup-screen.is-ready { animation-duration: 0s; }
}
@keyframes startup-send {
  0%, 100% { transform: rotate(-8deg); }
  28% { transform: translateX(3px) rotate(-3deg); }
}
@keyframes startup-receive {
  0%, 55% { transform: rotate(8deg); }
  75% { transform: rotate(2deg); }
  75%, 100% { border-color: var(--blue); }
}
@keyframes startup-signal {
  0% { opacity: 0; transform: translateX(-75%) scaleX(.2); }
  18% { opacity: 1; }
  68%, 100% { transform: scaleX(1); }
}
@keyframes startup-close { to { opacity: 0; visibility: hidden; } }
@keyframes startup-timeout { to { opacity: 0; visibility: hidden; } }
@keyframes startup-show-page { to { visibility: visible; } }

.header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand {
  display: flex;
  align-items: center;
  font-size: 1.18rem;
  font-weight: 650;
  letter-spacing: -.025em;
  text-decoration: none;
  white-space: nowrap;
}
.brand > span { color: var(--blue); }
.brand-mark { flex: none; margin-right: 9px; }
.nav {
  --tab-inset: 3px;
  --tab-gap: 4px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--tab-gap);
  padding: var(--tab-inset);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--muted-surface);
}
.nav::before {
  position: absolute;
  inset: var(--tab-inset) auto var(--tab-inset) var(--tab-inset);
  width: calc((100% - 2 * var(--tab-inset) - var(--tab-gap)) / 2);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  opacity: 0;
  pointer-events: none;
  content: "";
}
.nav:has(a[aria-current])::before { opacity: 1; }
.nav:has([data-route="download"][aria-current])::before { transform: translateX(calc(100% + var(--tab-gap))); }
.nav a {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--blue); }

@media (prefers-reduced-motion: no-preference) {
  .nav::before { transition: transform 840ms cubic-bezier(.25, .58, .3, 1); }
  .nav a { transition: color 440ms ease; }
}

.page-stage { position: relative; display: flow-root; }
.page-stage.is-switching { overflow-y: clip; }
.page-stage > .page { display: flow-root; }
.page-stage > .is-leaving { position: absolute; z-index: 1; inset: 0 0 auto; pointer-events: none; }
.transfer-ripple { position: absolute; z-index: 2; inset: 0; overflow: hidden; pointer-events: none; }
.transfer-ripple > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(43%, 248px);
  background:
    linear-gradient(90deg, transparent 20%, color-mix(in srgb, var(--blue) 17%, transparent) 52%, transparent 84%),
    conic-gradient(at 2px 2px, transparent 0 270deg, color-mix(in srgb, var(--blue) 57%, transparent) 0) center / 9px 9px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 6%, transparent 72%);
  mask-image: radial-gradient(ellipse at center, #000 6%, transparent 72%);
  opacity: 0;
}

h1, h2, h3, p, dl, dd { margin: 0; }
.intro { margin-block: 51px 25px; }
h1 { font-size: clamp(1.85rem, 4.75vw, 3.55rem); font-weight: 650; letter-spacing: -.04em; line-height: 1.06; text-wrap: balance; }
#share-title { font-weight: 620; line-height: 1.12; }
.intro p { max-width: 550px; margin-top: 12px; color: var(--muted); font-size: clamp(1rem, 1.75vw, 1.12rem); }
.panel {
  display: grid;
  grid-template-columns: minmax(0, 1.17fr) minmax(0, 1fr);
  gap: 12px;
}
.panel-body {
  min-width: 0;
  display: grid;
  align-content: center;
  min-height: 280px;
  padding: 29px clamp(20px, 3vw, 33px);
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--surface);
}
h2 { font-size: 1.48rem; font-weight: 650; letter-spacing: -.025em; line-height: 1.25; }
.description { margin-top: 7px; color: var(--muted); }
.actions { display: grid; gap: 8px; margin-top: 18px; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 600;
  cursor: pointer;
}
.button:disabled { cursor: default; opacity: .62; }
.primary { background: var(--button); color: var(--on-button); }
.primary:hover:not(:disabled) { background: var(--button-hover); }
.secondary { background: var(--surface); border-color: var(--line); color: var(--blue); }
.secondary:hover:not(:disabled) { background: var(--accent-surface); }
.wide { width: 100%; }
.hint { margin-top: 10px; color: var(--muted); font-size: .875rem; }
.selection { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.selection-line { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: var(--blue); }
.selection-info { flex: 1; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.selection-count { display: block; color: var(--muted); font-size: .875rem; }
.selection .hint { margin: 0 0 10px; }
.link { min-height: 44px; padding: 4px; color: var(--blue); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.link:disabled { cursor: default; opacity: .62; }
.danger-link { color: var(--error); }
.result-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 8px; margin-top: 12px; }
.result-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px; margin-top: 4px; font-size: .875rem; }
.result-links .link { justify-self: start; text-align: start; }
.result-links .danger-link { justify-self: end; text-align: end; }
.result-links:has(#reset[hidden]) .danger-link { grid-column: 1 / -1; }
.link-fallback { margin-top: 12px; }
.link-fallback label { display: block; margin-bottom: 5px; font-size: .875rem; }
.link-input { -webkit-user-select: text; user-select: text; }
.draft-session { margin-top: 5px; color: var(--muted); font-size: .875rem; }
.draft-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--line);
}
.draft-summary > div { min-width: 0; padding: 10px 13px; background: var(--muted-surface); }
.draft-summary dt { color: var(--muted); font-size: .82rem; font-weight: 600; }
.draft-summary dd { display: flex; align-items: baseline; gap: 7px; margin-top: 3px; color: var(--ink); font-size: .94rem; font-weight: 600; overflow-wrap: anywhere; }
.draft-summary dd::before { flex: 0 0 6px; height: 6px; border-radius: 50%; background: var(--muted); content: ""; }
.draft-summary dd[data-state="ready"]::before { background: var(--success); }
.draft-summary dd[data-state="pending"]::before { background: var(--blue); }
.draft-summary dd[data-state="error"]::before { background: var(--error); }
.draft-location-note { margin-top: 8px; }
.draft-attachments .result-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.attachment-list { max-height: 12rem; overflow-y: auto; margin: 8px 0 0; padding: 0; list-style: none; }
.attachment-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); }
.attachment-description { min-width: 0; padding-block: 6px; overflow-wrap: anywhere; }
.attachment-description small { display: block; color: var(--muted); }
.attachment-list .link { flex: none; }
.draft-delivery { margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
.draft-delivery h3 { color: var(--muted); font-size: .94rem; font-weight: 600; }
.draft-delivery .transfer-code { margin-top: 5px; }
.draft-delivery .hint { margin-top: 5px; }
.finish-button { margin-top: 14px; }
.feedback { margin-top: 10px; color: var(--success); overflow-wrap: anywhere; }
.feedback[data-error] { color: var(--error); }
.transfer-code {
  display: block;
  width: fit-content;
  margin-top: 13px;
  padding: 8px 13px 8px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--accent-surface);
  color: var(--blue);
  font: 750 2rem/1.35 var(--mono);
  letter-spacing: .18em;
  -webkit-user-select: text;
  user-select: text;
}
form label { display: block; margin-bottom: 5px; font-weight: 600; font-size: .875rem; }
form .button { margin-top: 14px; }
.input {
  width: 100%;
  min-height: 48px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--muted-surface);
  color: var(--ink);
}
.input[aria-invalid="true"] { border-color: var(--error); }
.code-input {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 750;
  letter-spacing: .24em;
  -webkit-user-select: text;
  user-select: text;
}
.code-input::placeholder { color: var(--muted); opacity: .76; }

.guide {
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(143px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 19px clamp(19px, 2.45vw, 28px) 20px;
  border: 1px solid #8098d34d;
  border-radius: 21px;
  background:
    radial-gradient(ellipse at 75% -10%, #8882ec5c, transparent 57%),
    linear-gradient(145deg, var(--guide), var(--guide-deep));
  color: var(--guide-ink);
}
.guide::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -9.5rem;
  right: -3rem;
  width: 23rem;
  aspect-ratio: 1;
  border: 1px solid #a9baff35;
  border-radius: 50%;
  box-shadow: 0 0 0 22px #a9baff0f;
  pointer-events: none;
}
.guide h3 { font-size: 1.09rem; font-weight: 650; letter-spacing: -.02em; }
.guide p { margin-top: 4px; color: var(--guide-muted); font-size: .875rem; }
.guide-text { min-width: 0; padding-top: 12px; border-top: 1px solid #a9baff49; }
.transfer-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(44px, .6fr) minmax(0, 1fr);
  align-items: center;
  width: min(100%, 334px);
  margin: 4px auto 0;
  padding: 10px 5px;
}
.visual-card {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 95px;
  display: grid;
  justify-items: center;
  place-content: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #a1b8fd95;
  border-radius: 15px;
  background: linear-gradient(135deg, #475e94, #314568);
  color: #d4e2ff;
  box-shadow: 0 12px 23px #17233e62;
}
.visual-card:first-child { transform: translateY(-8px) rotate(-8deg); }
.visual-card:last-child { transform: translateY(8px) rotate(8deg); }
.visual-card .icon { --icon-size: 30px; }
.visual-code { border-color: #b7ec978c; background: linear-gradient(135deg, #394d55, #2a3e4d); color: var(--signal); }
.visual-lines, .visual-digits {
  display: block;
  width: 45px;
  max-width: 100%;
  height: 3px;
  border-radius: 3px;
}
.visual-lines { background: #b2c6fb; box-shadow: 0 6px 0 #b2c6fb5c; margin-bottom: 5px; }
.visual-digits { width: 53px; background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 9.5px); }
.visual-link {
  display: grid;
  justify-items: center;
  align-items: center;
  background: repeating-linear-gradient(90deg, #b6caffae 0 2px, transparent 2px 6px) center / 100% 1px no-repeat;
}
.visual-link .icon {
  --icon-size: 17px;
  color: #172a3a;
}
.visual-link::before, .visual-link .icon { grid-area: 1 / 1; }
.visual-link::before {
  content: "";
  width: 35px;
  aspect-ratio: 1;
  border: 3px solid #35486a;
  border-radius: 50%;
  background: var(--signal);
}
#share:has(#share-result:not([hidden]) #share-active:not([hidden])) .visual-code {
  border-color: var(--signal);
  box-shadow: 0 0 18px #c7fca145, 0 12px 23px #17233e62;
}
.qr-content {
  grid-row: 1 / -1;
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding-block: 7px;
  text-align: center;
}
.qr-content canvas {
  display: block;
  width: min(100%, 170px);
  height: auto;
  border-radius: 10px;
  background: #fff;
  image-rendering: pixelated;
}
.guide:has(.qr-content:not([hidden])) { align-self: start; grid-template-rows: auto; }

.dashboard {
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  margin-top: 29px;
  font-family: var(--mono);
}
.dashboard h2 { margin-bottom: 11px; font-size: 1.16rem; font-weight: 800; letter-spacing: -.045em; }
.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.15fr);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.metric {
  min-width: 0;
  min-height: 105px;
  display: grid;
  grid-template-rows: minmax(2.6rem, auto) 1fr;
  gap: 6px;
  padding: 14px 18px;
}
.metric + .metric { border-left: 1px solid var(--line); }
.metric dt { grid-row: 2; display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: .875rem; font-weight: 750; }
.metric dt .icon { --icon-size: 17px; margin-top: 2px; color: var(--blue); }
.metric dd { grid-row: 1; overflow-wrap: anywhere; }
.metric-count { color: var(--blue); font: 750 clamp(1.6rem, 3vw, 2.22rem)/1.1 var(--mono); letter-spacing: -.055em; }
.metric-latest dd { font-size: 1rem; font-weight: 800; line-height: 1.2; }
.metric-latest time { display: grid; gap: 4px; }
#last-upload-time { color: var(--muted); font: 700 .875rem/1.25 var(--mono); }

@supports (grid-template-rows: subgrid) {
  .metric {
    grid-row: span 2;
    grid-template-rows: subgrid;
  }
}

.footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-block: 17px 24px; color: var(--muted); font-size: .875rem; }
.footer-note { display: flex; align-items: center; gap: 7px; }
.footer .icon { --icon-size: 17px; }
.footer-signature {
  flex: none;
  color: var(--signature);
  font: 600 1.375rem/1.15 "Dancing Script", "Segoe Script", cursive;
  white-space: nowrap;
}

.icon {
  --icon-size: 19px;
  display: inline-block;
  flex: none;
  width: var(--icon-size);
  height: var(--icon-size);
  vertical-align: middle;
  background-color: currentColor;
  -webkit-mask: url("/icons.png") var(--slot, 0%) center / 1100% 100% no-repeat;
  mask: url("/icons.png") var(--slot, 0%) center / 1100% 100% no-repeat;
}
.icon.file { --slot: 10%; }
.icon.download { --slot: 20%; }
.icon.upload { --slot: 30%; }
.icon.access { --slot: 40%; }
.icon.photo { --slot: 50%; }
.icon.group { --slot: 60%; }
.icon.books { --slot: 70%; }
.icon.clock { --slot: 80%; }
.icon.share { --slot: 90%; }
.icon.key { --slot: 100%; }

@media (max-width: 740px) {
  .wrap { width: calc(100% - 36px); }
  .intro { margin-block: 33px 21px; }
  h1 { text-wrap: initial; }
  .panel { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .panel-body { min-height: 0; padding: 21px; border-radius: 16px; }
  .guide { grid-template-rows: minmax(63px, auto) auto; gap: 7px; padding: 12px 17px 14px; border-radius: 16px; }
  .guide::before { top: -17rem; }
  .transfer-visual { width: min(100%, 260px); padding-block: 3px; }
  .visual-card { min-height: 51px; gap: 5px; border-radius: 11px; }
  .visual-card:first-child { transform: translateY(-3px) rotate(-5deg); }
  .visual-card:last-child { transform: translateY(3px) rotate(5deg); }
  .visual-card .icon { --icon-size: 21px; }
  .metric { padding: 12px; }
}

@media (max-width: 520px) {
  .wrap { width: calc(100% - 30px); }
  .header-inner { flex-wrap: wrap; gap: 7px; padding-block: 9px; }
  .nav { width: 100%; }
  .intro { margin-block: 26px 17px; }
  #share:has(#share-result:not([hidden])) .intro { margin-block: 19px 12px; }
  #share:has(#share-result:not([hidden])) .intro p { display: none; }
  .draft-summary > div { padding: 9px 10px; }
  .draft-attachments .button { gap: 6px; padding-inline: 7px; font-size: .9rem; }
  .draft-attachments .icon { --icon-size: 16px; }
  .panel-body { padding: 18px; }
  .dashboard { margin-top: 23px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 86px; }
  .metric-latest { grid-column: 1 / -1; min-height: 79px; }
  .metric + .metric-latest { border-left: 0; border-top: 1px solid var(--line); }
}
