/* Savona only for Cyrillic — Latin stays Poppins / Righteous */
@font-face {
  font-family: "Savona";
  src: url("/static/fonts/savona/Savona-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-04FF, U+0500-052F, U+2DE0-2DFF, U+A640-A69F, U+1C80-1C8F;
}
@font-face {
  font-family: "Savona";
  src: url("/static/fonts/savona/Savona-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-04FF, U+0500-052F, U+2DE0-2DFF, U+A640-A69F, U+1C80-1C8F;
}
@font-face {
  font-family: "Savona";
  src: url("/static/fonts/savona/Savona-Semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-04FF, U+0500-052F, U+2DE0-2DFF, U+A640-A69F, U+1C80-1C8F;
}
@font-face {
  font-family: "Savona";
  src: url("/static/fonts/savona/Savona-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-04FF, U+0500-052F, U+2DE0-2DFF, U+A640-A69F, U+1C80-1C8F;
}
@font-face {
  font-family: "Savona";
  src: url("/static/fonts/savona/Savona-Extrabold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-04FF, U+0500-052F, U+2DE0-2DFF, U+A640-A69F, U+1C80-1C8F;
}
@font-face {
  font-family: "Savona";
  src: url("/static/fonts/savona/Savona-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-04FF, U+0500-052F, U+2DE0-2DFF, U+A640-A69F, U+1C80-1C8F;
}

:root {
  --bg: #fff5eb;
  --bg2: #ffe4cc;
  --ink: #1c140f;
  --muted: #7a6456;
  --line: rgba(28, 20, 15, 0.1);
  --orange: #ff6b00;
  --orange2: #ff8a2b;
  --orange3: #ffb347;
  --deep: #d95100;
  --white: #ffffff;
  --ok: #1f7a45;
  --err: #c62828;
  --logo: "Righteous", system-ui, sans-serif;
  --sans: "Savona", "Poppins", system-ui, sans-serif;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(255, 107, 0, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1000px 520px at 0% -10%, rgba(255, 179, 71, 0.45), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(255, 107, 0, 0.22), transparent 50%),
    linear-gradient(180deg, #fff8f1 0%, var(--bg) 45%, #ffe8d4 100%);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0 1.25rem;
}
.logo {
  font-family: var(--logo);
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.logo:hover { color: var(--orange); text-decoration: none; }
.logo.small { font-size: 1.15rem; }
.logo-inline {
  font-family: var(--logo);
  color: var(--orange);
  letter-spacing: 0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink);
  color: #fff !important;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--orange); }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
  min-height: min(72vh, 640px);
  padding: 1rem 0 2.5rem;
}
.pill {
  display: inline-flex;
  margin: 0 0 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.12);
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 600;
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 4.8vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 34ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-visual {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  animation: float 8s var(--ease) infinite alternate;
}
.orb-1 {
  width: 220px; height: 220px;
  background: radial-gradient(circle at 30% 30%, #ffd089, #ff6b00 70%);
  left: 8%; top: 12%;
  opacity: 0.85;
}
.orb-2 {
  width: 140px; height: 140px;
  background: radial-gradient(circle at 35% 30%, #ffe0a8, #ff8a2b 75%);
  right: 10%; bottom: 14%;
  opacity: 0.75;
  animation-delay: -3s;
}
@keyframes float {
  from { transform: translateY(0); }
  to { transform: translateY(-14px); }
}
.panel-preview {
  position: relative;
  z-index: 1;
  width: min(100%, 300px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 107, 0, 0.16);
  border-radius: 22px;
  padding: 1.1rem 1.15rem 1.3rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: rise 0.8s var(--ease) both;
}
.preview-top { display: flex; gap: 0.35rem; margin-bottom: 1rem; }
.preview-top span {
  width: 9px; height: 9px; border-radius: 50%;
  background: #ffd0a8;
}
.preview-top span:first-child { background: #ff6b00; }
.preview-brand {
  font-family: var(--logo);
  font-size: 1.35rem;
  margin: 0 0 1rem;
  color: var(--orange);
}
.preview-lines { display: grid; gap: 0.55rem; }
.preview-lines i {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 107, 0, 0.28), rgba(255, 179, 71, 0.12));
}
.preview-lines i.short { width: 62%; }

.btn {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease), background 0.2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--orange2), var(--orange) 55%, var(--deep));
  color: #fff;
  box-shadow: 0 12px 28px rgba(255, 107, 0, 0.28);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.wide { width: 100%; }
.btn.danger {
  background: #fff;
  color: var(--err);
  border: 1px solid rgba(198, 40, 40, 0.25);
}

.upload-section,
.how {
  padding: 2.5rem 0 1rem;
}
.section-head {
  margin-bottom: 1.25rem;
}
.section-head h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  font-weight: 800;
}
.section-head p {
  margin: 0;
  color: var(--muted);
}

.upload-card,
.article-card,
.status-card,
.link-card,
.banner {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 107, 0, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.upload-card {
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}
.field label,
.link-card label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font: inherit;
  background: #fff;
  color: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
input[type="text"]:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.14);
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 0.2rem;
  text-align: center;
  min-height: 170px;
  padding: 1.4rem 1rem;
  border-radius: 16px;
  border: 1.5px dashed rgba(255, 107, 0, 0.45);
  background:
    radial-gradient(420px 160px at 50% 0%, rgba(255, 179, 71, 0.25), transparent 70%),
    #fff8f1;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.dropzone:hover,
.dropzone.drag,
.dropzone.has-file {
  transform: translateY(-2px);
  border-color: var(--orange);
}
.dropzone.invalid {
  border-color: #d9480f;
  box-shadow: 0 0 0 4px rgba(217, 72, 15, 0.16);
}
.drop-ico {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange2), var(--orange));
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.35rem;
  pointer-events: none;
  z-index: 1;
}
.drop-title { font-weight: 700; font-size: 1.05rem; pointer-events: none; z-index: 1; }
.drop-title-mobile { display: none; }
.drop-sub { color: var(--muted); font-size: 0.9rem; pointer-events: none; z-index: 1; max-width: 28ch; }
.upload-hint {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.92rem;
  color: #d9480f;
  font-weight: 600;
}
.upload-hint.is-info {
  color: var(--deep);
}
.upload-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: center;
}
.upload-progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.12);
  overflow: hidden;
}
.upload-progress-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange2), var(--orange), var(--deep));
  transition: width 0.2s linear;
}
#upload-progress-label {
  font-family: var(--logo);
  color: var(--orange);
  font-size: 0.95rem;
  min-width: 2.5rem;
  text-align: right;
}

.flow-steps {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}
.flow-steps li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 107, 0, 0.12);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}
.flow-steps span {
  flex: 0 0 auto;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange2), var(--orange));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.link-help {
  margin: -0.15rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.link-open {
  display: inline-flex;
  font-weight: 700;
  margin-top: 0.15rem;
}
.waiting-hint {
  padding: 1rem 0.2rem;
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.step {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 107, 0, 0.12);
  border-radius: 18px;
  padding: 1.2rem;
}
.step-num {
  font-family: var(--logo);
  color: var(--orange);
  font-size: 1.2rem;
}
.step h3 {
  margin: 0.55rem 0 0.35rem;
  font-size: 1.1rem;
}
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.note-page,
.manage-page {
  padding: 0.5rem 0 1rem;
  width: min(820px, 100%);
  margin: 0 auto;
}
.note-head h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-weight: 800;
}
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--deep);
  background: rgba(255, 107, 0, 0.08);
  border: 1px solid rgba(255, 107, 0, 0.14);
}
.meta-chip.muted {
  color: var(--muted);
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.06);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Title already in page header — hide duplicate H1 from article body */
.article > h1:first-child {
  display: none;
}
.muted { color: var(--muted); }
.err { color: var(--err); margin: 0.4rem 0 0; }
.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ffe0c2;
  color: #9a3412;
}
.badge.done { background: #d8f3e3; color: var(--ok); }
.badge.error { background: #ffe1e1; color: var(--err); }
.badge.busy { background: #ffe8c8; color: #9a3412; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}
.toolbar form { margin: 0; }

.status-card {
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}
.status-card strong { display: block; margin-bottom: 0.2rem; }

.article-card { padding: clamp(1.2rem, 3vw, 2rem); }

.article {
  font-size: 1.08rem;
  line-height: 1.75;
}
.article h1,
.article h2,
.article h3 {
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 1.5em 0 0.5em;
  font-weight: 800;
}
.article h1 {
  margin-top: 0;
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
}
.article h2 {
  font-size: 1.2rem;
  color: var(--deep);
  border-bottom: 2px solid rgba(255, 107, 0, 0.16);
  padding-bottom: 0.3rem;
}
.article h3 { font-size: 1.05rem; }
.article p { margin: 0 0 1em; }
.article ul, .article ol { padding-left: 1.2rem; margin: 0 0 1em; }
.article li { margin: 0.3em 0; }
.article blockquote {
  margin: 1.2em 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--orange);
  background: linear-gradient(90deg, rgba(255, 138, 43, 0.14), transparent 85%);
  border-radius: 0 14px 14px 0;
}
.article code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9em;
  background: #fff1e2;
  padding: 0.1em 0.35em;
  border-radius: 6px;
}
.article pre {
  background: #1c140f;
  color: #fff5eb;
  padding: 1rem;
  border-radius: 14px;
  overflow: auto;
}
.article hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.banner {
  padding: 1rem 1.15rem;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #fff0d8, #ffe1c0);
}
.banner p { margin: 0.35rem 0 0; color: var(--muted); }

.link-grid {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}
@media (min-width: 800px) {
  .link-grid { grid-template-columns: 1fr 1fr; }
}
.link-card {
  padding: 1rem;
}
.link-card.accent {
  border-color: rgba(255, 107, 0, 0.28);
  background: #fff7ef;
}
.link-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.55rem;
}
.link-row input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
}

.drawer {
  margin-top: 1.4rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.2rem 1rem 1rem;
}
.drawer summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.9rem 0;
}
.transcript {
  margin: 0;
  white-space: pre-wrap;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  background: #1c140f;
  color: #ffe8d2;
  border-radius: 12px;
  padding: 1rem;
  max-height: 360px;
  overflow: auto;
}

.footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  align-items: center;
}

/* Live progress */
.live-card { overflow: hidden; }
.live-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.7rem;
}
.live-percent {
  font-family: var(--logo);
  color: var(--orange);
  font-size: 1.15rem;
}
.live-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.12);
  overflow: hidden;
  margin-bottom: 1rem;
}
.live-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange2), var(--orange), var(--deep));
  transition: width 0.45s var(--ease);
}
.live-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}
.live-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e7d5c4;
}
.live-step.is-done { color: var(--ok); }
.live-step.is-done .live-dot { background: var(--ok); }
.live-step.is-active { color: var(--deep); }
.live-step.is-active .live-dot {
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.45);
  animation: livepulse 1.4s ease-out infinite;
}
@keyframes livepulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 107, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0); }
}
.appear {
  animation: rise 0.55s var(--ease) both;
}
.live-done {
  border-color: rgba(31, 122, 69, 0.25);
}

@media (max-width: 720px) {
  .live-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.25rem; }
  .live-step { font-size: 0.62rem; align-items: center; text-align: center; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 1.25rem;
    padding: 0.25rem 0 1.5rem;
  }
  .hero-visual { min-height: 220px; order: -1; }
  .steps { grid-template-columns: 1fr; }
  .subtitle { max-width: none; }
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(720px 380px at 10% -5%, rgba(255, 179, 71, 0.4), transparent 55%),
      radial-gradient(520px 320px at 100% 0%, rgba(255, 107, 0, 0.18), transparent 50%),
      linear-gradient(180deg, #fff8f1 0%, var(--bg) 50%, #ffe8d4 100%);
  }

  .page {
    width: 100%;
    max-width: none;
    padding: 0.65rem max(0.9rem, env(safe-area-inset-right)) calc(2.5rem + env(safe-area-inset-bottom)) max(0.9rem, env(safe-area-inset-left));
  }

  .nav {
    padding: 0.35rem 0 0.9rem;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 248, 241, 0.88);
    backdrop-filter: blur(12px);
    margin: 0 calc(-1 * max(0.9rem, env(safe-area-inset-left))) 0.35rem;
    padding-left: max(0.9rem, env(safe-area-inset-left));
    padding-right: max(0.9rem, env(safe-area-inset-right));
    padding-top: max(0.35rem, env(safe-area-inset-top));
  }
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-cta {
    min-height: 42px;
    padding: 0.55rem 1rem;
  }
  .logo { font-size: 1.4rem; }

  .hero h1 {
    font-size: clamp(1.85rem, 8.2vw, 2.35rem);
    margin-bottom: 0.75rem;
  }
  .subtitle {
    font-size: 1rem;
    margin-bottom: 1.1rem;
  }
  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
  }
  .hero-visual {
    min-height: 180px;
    margin-bottom: 0.25rem;
  }
  .orb-1 { width: 150px; height: 150px; }
  .orb-2 { width: 96px; height: 96px; }
  .panel-preview {
    width: min(100%, 240px);
    padding: 0.95rem 1rem 1.1rem;
  }

  .upload-section,
  .how {
    padding: 1.35rem 0 0.5rem;
  }
  .section-head h2 {
    font-size: 1.45rem;
  }
  .flow-steps {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .flow-steps li {
    min-height: 44px;
  }

  .upload-card {
    padding: 1rem;
    border-radius: 18px;
    gap: 0.85rem;
  }
  .dropzone {
    min-height: 168px;
    padding: 1.25rem 0.85rem;
  }
  .drop-title-desktop { display: none; }
  .drop-title-mobile { display: inline; }
  .drop-title { font-size: 1.08rem; }
  .drop-sub { font-size: 0.86rem; }

  .btn {
    min-height: 48px;
    padding: 0.85rem 1.1rem;
    font-size: 0.98rem;
  }
  .btn.wide { width: 100%; }

  .note-page,
  .manage-page {
    width: 100%;
    padding-top: 0.15rem;
  }
  .note-head h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
    margin-bottom: 0.85rem;
  }
  .meta-row { gap: 0.4rem; }
  .meta-chip {
    max-width: min(100%, 260px);
    font-size: 0.74rem;
  }
  .meta-chip.muted { max-width: 100%; }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .toolbar .btn,
  .toolbar form,
  .toolbar form .btn {
    width: 100%;
  }
  .note-actions {
    grid-template-columns: 1fr;
  }

  .link-grid { gap: 0.75rem; }
  .link-card { padding: 0.9rem; }
  .link-row {
    flex-direction: column;
    align-items: stretch;
  }
  .link-row .btn { width: 100%; }
  .link-row input {
    font-size: 0.74rem;
    padding: 0.8rem 0.85rem;
  }

  .status-card,
  .banner,
  .article-card {
    padding: 0.95rem;
    border-radius: 16px;
  }
  .article {
    font-size: 1.02rem;
    line-height: 1.7;
  }
  .article h2 { font-size: 1.1rem; }
  .article ul, .article ol { padding-left: 1.05rem; }

  .live-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .live-step span:not(.live-dot) {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 2.2rem;
    font-size: 0.86rem;
  }

  /* Prefer native share on phones */
  .page-note #copy-link { order: 2; }
  .page-note #share-btn { order: 1; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 1.7rem; }
  .live-step { font-size: 0.58rem; }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .panel-preview, .live-step.is-active .live-dot { animation: none; }
}

