:root {
  color-scheme: dark;
  --bg: #10131f;
  --surface: #181c2b;
  --well: #121725;
  --ink: #f5f4f9;
  --secondary: #b7bfd2;
  --edge: #32394d;
  --accent: #ff9a87;
  --accent-hover: #ffb09f;
  --on-accent: #291816;
  --radius: 16px;
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 94% 19%, #243459 0, transparent 37rem), var(--bg);
  min-width: 280px;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button:not(:disabled), label[tabindex] { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
[hidden] { display: none !important; }
.shell { width: min(1112px, calc(100% - 64px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid #2a3247; background: #10131fe8; }
.header-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  gap: 20px;
}
.brand { display: inline-flex; gap: 10px; align-items: center; justify-self: start; font-size: 19px; font-weight: 720; letter-spacing: -.035em; }
.brand-end { font-weight: 480; color: var(--secondary); }
.brand-mark {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 9px;
  font-weight: 820;
}
nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; color: var(--secondary); }
nav a { padding-block: 10px; }
.nav-active, nav a:hover { color: var(--ink); }
.header-button {
  justify-self: end; border: 1px solid #515e78; border-radius: 8px; padding: 9px 13px;
  font-size: 14px; white-space: nowrap;
}
.header-button:hover { border-color: var(--accent); }
.hero {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 30px;
  padding: clamp(42px, 7vw, 88px) 0 42px;
}
h1, h2, h3, p { margin: 0; }
.hero h1 { font-size: clamp(3rem, 8vw, 6.25rem); letter-spacing: -.08em; line-height: .96; font-weight: 730; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { max-width: 42ch; margin-top: 21px; color: var(--secondary); line-height: 1.65; }
.format {
  display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 24px);
  color: #a6bde8; background: #1b29474d; border: 1px solid #425980; border-radius: 16px;
  min-width: clamp(125px, 25vw, 310px); padding: 26px 16px; font: clamp(22px, 4vw, 44px) ui-monospace, monospace;
  letter-spacing: .12em; align-self: center;
}
.format-bracket { color: #687ea6; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr); gap: 16px; }
.panel { min-width: 0; padding: 23px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); }
.panel h2 { font-size: 18px; letter-spacing: -.025em; font-weight: 670; }
.input-panel { display: flex; flex-direction: column; gap: 14px; }
.drop-zone {
  position: relative; overflow: hidden; min-height: 160px; display: grid; text-align: center;
  place-items: center; padding: 15px; border: 1px dashed #647498; border-radius: 12px;
  background: #161d2f; color: var(--secondary);
}
.drop-zone:hover, .drop-zone.dragging { border-color: var(--accent); background: #202940; }
.drop-zone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--well); }
.drop-content { display: grid; gap: 7px; justify-items: center; font-size: 14px; }
.drop-content strong { color: var(--ink); font-size: 16px; }
.file-mark {
  position: relative; display: grid; place-items: center; width: 38px; height: 42px;
  margin-bottom: 5px; border: 1px solid #9aaccd; border-radius: 8px; color: var(--accent);
}
.file-mark::before { content: "+"; font-size: 27px; line-height: 1; }
.file-name {
  position: absolute; left: 10px; right: 10px; bottom: 8px; text-overflow: ellipsis;
  overflow: hidden; white-space: nowrap; border-radius: 5px; padding: 4px 8px;
  background: #10131fdf; font-size: 13px; color: var(--ink);
}
.input-caption { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--secondary); }
.email-field { display: grid; gap: 8px; }
.email-field label { font-size: 14px; }
.email-field span, .email-field small { color: var(--secondary); }
.email-field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--edge); border-radius: 8px;
  color: var(--ink); background: var(--well);
}
.email-field input::placeholder { color: #8d98b2; }
.result-panel { display: flex; flex-direction: column; gap: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.file-format {
  color: var(--secondary); font: 12px ui-monospace, monospace;
  border: 1px solid var(--edge); border-radius: 6px; padding: 4px 7px;
}
.result-frame {
  position: relative; display: grid; place-items: center; text-align: center; flex: 1; min-height: 218px;
  padding: 20px; border: 1px solid #3b4867; border-radius: 12px;
  background: repeating-linear-gradient(0deg, #56639420 0 1px, transparent 1px 25px),
    repeating-linear-gradient(90deg, #56639420 0 1px, transparent 1px 25px),
    radial-gradient(ellipse at 50% 45%, #253455, #141a29 75%);
}
.result-copy { display: grid; justify-items: center; gap: 8px; max-width: 35ch; }
.result-copy strong { font-size: 18px; }
.result-copy p, .link-note { color: var(--secondary); font-size: 14px; line-height: 1.5; }
.result-mark { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 6px; color: #a9bbdc; }
.result-mark span { width: 25px; height: 25px; transform: rotate(45deg); border: 1px solid currentColor; border-radius: 4px; }
.result-frame[data-state="queued"] .result-mark span, .result-frame[data-state="sending"] .result-mark span {
  border-radius: 50%; border-width: 2px; border-right-color: var(--accent); animation: rotate 1s linear infinite;
}
.result-frame[data-state="ready"] .result-mark span {
  width: 14px; height: 27px; border: solid var(--accent); border-width: 0 2px 2px 0; border-radius: 0; transform: rotate(42deg);
}
@keyframes rotate { to { transform: rotate(405deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; } }
.primary-button, .secondary-button {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 46px; padding: 10px 15px; border: 1px solid transparent; border-radius: 8px; font-weight: 700;
}
.primary-button { color: var(--on-accent); background: var(--accent); }
.primary-button:hover:not(:disabled) { background: var(--accent-hover); }
.primary-button:disabled { color: #c3bdd1; background: #34384c; }
.secondary-button { color: var(--ink); background: #222b40; border-color: #4a5876; }
.secondary-button:hover { border-color: var(--accent); }
.text-btn { padding: 6px 0; background: transparent; border: 0; color: var(--secondary); font-size: 13px; text-decoration: underline; }
.text-btn:hover { color: var(--ink); }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 11px; }
.upload-note { color: var(--secondary); font-size: 13px; line-height: 1.45; }
.link-note { overflow-wrap: anywhere; }
.form-error { color: #ffad9e; font-size: 14px; line-height: 1.5; }
.guide { padding-block: 46px 39px; }
.guide > h2 { font-size: 27px; letter-spacing: -.04em; margin-bottom: 15px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.guide-grid article { background: #171d2d; border: 1px solid var(--edge); border-radius: 12px; padding: 16px; }
.guide-grid h3 { font-size: 16px; margin-bottom: 7px; }
.guide-grid p { color: var(--secondary); font-size: 14px; line-height: 1.55; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding-block: 17px 27px; color: var(--secondary); border-top: 1px solid var(--edge); font-size: 13px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 700px) {
  .shell { width: calc(100% - 34px); }
  .header-layout { grid-template-columns: 1fr auto; min-height: 63px; }
  nav { display: none; }
  .hero { gap: 12px; padding-block: 41px 27px; }
  .hero h1 { font-size: clamp(2.7rem, 11vw, 4rem); }
  .hero p { margin-top: 15px; }
  .format { display: none; }
  .workspace, .guide-grid { grid-template-columns: 1fr; }
  .panel { padding: 17px; }
  .guide { padding-block: 35px 27px; }
}
@media (max-width: 350px) {
  .brand { font-size: 16px; gap: 6px; }
  .header-button { padding-inline: 8px; font-size: 12px; }
  .hero h1 { font-size: 2.4rem; }
}
