:root {
  --ink: #191915;
  --muted: #716f67;
  --paper: #f3f1ea;
  --surface: #fffef9;
  --surface-soft: #f8f6ef;
  --line: #dfdbcf;
  --purple: #6547dc;
  --purple-dark: #4f35be;
  --purple-soft: #ece8ff;
  --lime: #d9ff62;
  --green: #27764b;
  --green-soft: #e8f5ec;
  --orange: #b96a2f;
  --orange-soft: #fff0df;
  --red: #b33f35;
  --red-soft: #fff0ed;
  --rail-width: 96px;
  --topbar-height: 78px;
  --shadow: 0 24px 70px rgba(44, 41, 27, 0.13), 0 2px 8px rgba(44, 41, 27, 0.05);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.drawer-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
}

.side-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--rail-width);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 17px 10px 15px;
  background: rgba(255, 254, 249, 0.96);
  border-right: 1px solid rgba(59, 54, 37, 0.09);
  backdrop-filter: blur(20px);
}

.brand-button,
.mobile-brand {
  border: 0;
  background: transparent;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.brand-button {
  min-height: 52px;
  display: grid;
  place-items: center;
  gap: 4px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--purple);
  color: white;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
  font-size: 20px;
  line-height: 1;
}

.brand-word { font-size: 11px; }
.rail-nav { display: grid; gap: 6px; margin-top: 28px; }
.rail-bottom { display: grid; gap: 6px; margin-top: auto; }

.rail-item {
  position: relative;
  min-height: 67px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 7px 3px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #66645d;
  font-size: 10px;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.rail-item:hover { color: var(--ink); background: var(--surface-soft); }
.rail-item:active { transform: scale(0.98); }
.rail-item.is-active { color: var(--purple); background: var(--purple-soft); }
.rail-icon { min-height: 24px; display: grid; place-items: center; font-size: 22px; font-weight: 500; }
.rail-badge {
  position: absolute;
  top: 7px;
  right: 10px;
  min-width: 18px;
  height: 18px;
  display: none;
  place-items: center;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--purple);
  color: white;
  font-size: 9px;
}
.rail-badge.is-visible { display: grid; }
.profile-rail-button .avatar { margin-bottom: 1px; }

.avatar {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple-soft), var(--lime));
  color: #443581;
  font-size: 13px;
  font-weight: 850;
}
.avatar-small { width: 28px; height: 28px; border-radius: 9px; }
.avatar-large { width: 48px; height: 48px; border-radius: 15px; font-size: 17px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 26px 0 30px;
  border-bottom: 1px solid rgba(59, 54, 37, 0.08);
  background: rgba(243, 241, 234, 0.88);
  backdrop-filter: blur(20px);
}

.mobile-brand { display: none; align-items: center; gap: 9px; font-size: 17px; }
.page-heading { min-width: 0; display: grid; gap: 3px; }
.page-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; letter-spacing: -0.025em; }
.page-eyebrow { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }

.usage-chip,
.profile-button {
  height: 50px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(51, 47, 32, 0.1);
  background: rgba(255, 254, 249, 0.9);
  box-shadow: 0 3px 12px rgba(48, 44, 30, 0.05);
}
.usage-chip { gap: 9px; padding: 0 15px; border-radius: 15px; color: #56544e; font-size: 11px; font-weight: 700; }
.usage-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(39, 118, 75, 0.12); }
.profile-button { gap: 10px; min-width: 205px; padding: 6px 11px 6px 7px; border-radius: 16px; text-align: left; }
.profile-copy { min-width: 0; flex: 1; display: grid; gap: 1px; }
.profile-copy strong, .profile-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 12px; }
.profile-copy small { color: var(--muted); font-size: 9px; }

.workspace {
  min-width: 0;
  grid-column: 2;
  grid-row: 2;
  background:
    radial-gradient(circle at 10% 12%, rgba(216, 255, 98, 0.34), transparent 28rem),
    radial-gradient(circle at 92% 82%, rgba(101, 71, 220, 0.14), transparent 32rem),
    linear-gradient(135deg, #f6f3eb 0%, #eef6f6 54%, #f3f0fb 100%);
}
.app-view { display: none; min-height: calc(100vh - var(--topbar-height)); }
.app-view.is-active { display: block; animation: view-in 220ms ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.send-layout {
  width: min(1210px, calc(100% - 56px));
  min-height: calc(100vh - var(--topbar-height));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(390px, 458px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(58px, 8vw, 124px);
  padding: 38px 0 62px;
}

.composer-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(48, 44, 30, 0.08);
  border-radius: 27px;
  box-shadow: var(--shadow);
}
.card-accent { height: 7px; display: flex; background: var(--purple); }
.card-accent span { width: 34%; margin-left: auto; background: var(--lime); }
.form-view { padding: 25px 27px 27px; }
.form-view.is-hidden { display: none; }
.composer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.section-label { display: block; margin-bottom: 5px; color: var(--purple); font-size: 9px; font-weight: 850; letter-spacing: 0.13em; text-transform: uppercase; }
.composer-head h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 400; letter-spacing: -0.04em; }
.encryption-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; padding: 7px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 9px; font-weight: 800; }
.encryption-pill span { font-size: 7px; }

.resume-banner { display:grid; grid-template-columns:auto 1fr auto auto; gap:12px; align-items:center; margin:0 0 18px; padding:13px 14px; border:1px solid #b8c8ff; border-radius:14px; background:#eef3ff; color:#233166; }
.resume-banner[hidden] { display:none; }
.resume-banner .resume-icon { display:grid; width:34px; height:34px; place-items:center; border-radius:10px; background:#3157e8; color:#fff; font-size:19px; }
.resume-banner strong { display:block; font-size:13px; }
.resume-banner p { margin:3px 0 0; font-size:11px; line-height:1.4; color:#58658f; }
.resume-banner button { min-height:40px; padding:0 13px; border:0; border-radius:11px; background:#3157e8; color:#fff; font:inherit; font-size:12px; font-weight:800; cursor:pointer; }
.resume-banner .resume-cancel { background:transparent; color:#58658f; }

.delivery-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 18px; padding: 4px; border-radius: 13px; background: #efede6; }
.delivery-option { height: 37px; border: 0; border-radius: 10px; background: transparent; color: #77746d; font-size: 11px; font-weight: 750; }
.delivery-option.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(51, 47, 32, 0.09); }

.drop-zone {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px;
  border: 1.5px dashed #b7b2a5;
  border-radius: 16px;
  background: #fbfaf5;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
  cursor: pointer;
}
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--purple); background: var(--purple-soft); }
.drop-zone.is-dragging { transform: scale(1.01); }
.add-files { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; border: 0; border-radius: 15px; background: var(--purple); color: white; box-shadow: 0 7px 18px rgba(101, 71, 220, 0.25); font-size: 26px; font-weight: 350; }
.add-files:hover { background: var(--purple-dark); }
.drop-title { margin: 0 0 4px; font-size: 13px; font-weight: 800; }
.drop-help { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }

.file-summary { display: none; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 2px 7px; font-size: 10px; }
.file-summary.is-visible { display: flex; }
.file-summary span { color: var(--muted); }
.file-list { display: grid; gap: 6px; max-height: 146px; margin: 0 0 14px; padding: 0; overflow: auto; list-style: none; }
.file-item { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) 28px; align-items: center; gap: 10px; padding: 8px 9px; border: 1px solid #e7e3d9; border-radius: 12px; background: var(--surface-soft); }
.file-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--purple-soft); color: var(--purple); font-size: 8px; font-weight: 850; }
.file-copy { min-width: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 750; }
.file-size { margin-top: 2px; color: var(--muted); font-size: 8px; }
.remove-file { width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: #8a867e; font-size: 17px; }
.remove-file:hover { background: #ece8df; color: var(--red); }
.more-files { display: block; padding: 6px; color: var(--muted); text-align: center; font-size: 9px; }

.field-stack { display: grid; gap: 13px; margin-top: 15px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { min-width: 0; }
.field label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; font-size: 9px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.field-hint { color: #99958c; font-size: 8px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.field input, .field textarea, .field select, .setting-row input, .setting-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: white;
  color: var(--ink);
  font-size: 11px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.field input, .field select, .setting-row input, .setting-row select { height: 42px; padding: 0 12px; }
.field textarea { min-height: 94px; padding: 11px 12px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .setting-row input:focus, .setting-row select:focus, .recipient-box:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(101, 71, 220, 0.11); }
.field input::placeholder, .field textarea::placeholder, .setting-row input::placeholder { color: #aaa69d; }
.input-hint { margin: 5px 2px 0; color: #99958c; font-size: 8px; line-height: 1.4; }

.recipient-box { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 11px; background: white; transition: border-color 140ms ease, box-shadow 140ms ease; }
.recipient-box input { min-width: 130px; height: 29px; flex: 1; padding: 0 5px; border: 0; outline: 0; background: transparent; font-size: 11px; }
.recipient-chips { display: contents; }
.recipient-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 190px; height: 28px; padding: 0 7px 0 9px; border-radius: 9px; background: var(--purple-soft); color: #4e3ca1; font-size: 9px; font-weight: 750; }
.recipient-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipient-chip button { width: 17px; height: 17px; padding: 0; border: 0; border-radius: 50%; background: rgba(101, 71, 220, 0.13); color: inherit; line-height: 1; }

.link-explainer { display: flex; gap: 12px; margin: 15px 0 0; padding: 13px; border-radius: 13px; background: var(--purple-soft); color: #4d4680; }
.link-explainer-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--purple); color: white; }
.link-explainer strong { display: block; margin-bottom: 3px; color: #33276c; font-size: 10px; }
.link-explainer p { margin: 0; font-size: 9px; line-height: 1.5; }

.transfer-options { margin-top: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fbfaf6; }
.transfer-options summary { height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; list-style: none; font-size: 10px; font-weight: 750; }
.transfer-options summary::-webkit-details-marker { display: none; }
.transfer-options summary::after { content: "+"; color: var(--purple); font-size: 16px; }
.transfer-options[open] summary::after { content: "−"; }
.summary-meta { margin-left: auto; color: var(--muted); font-size: 8px; font-weight: 600; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 2px 12px 11px; }
.check-row { display: flex; align-items: center; gap: 9px; margin: 0 12px 12px; padding: 10px; border-radius: 10px; background: white; font-size: 9px; cursor: pointer; }
.check-row input { accent-color: var(--purple); }
.check-row span { display: grid; gap: 2px; }
.check-row small { color: var(--muted); font-size: 8px; }

.local-error { display: none; margin: 12px 0 0; padding: 9px 11px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 9px; line-height: 1.45; }
.local-error.is-visible { display: block; }
.primary-button, .secondary-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 140ms ease, background 140ms ease, opacity 140ms ease;
}
.primary-button { width: 100%; margin-top: 14px; border: 0; background: var(--ink); color: white; font-size: 11px; }
.primary-button:hover { background: #303029; }
.primary-button:active, .secondary-button:active { transform: scale(0.99); }
.primary-button:disabled { opacity: 0.52; cursor: not-allowed; }
.primary-button.compact { width: auto; min-height: 42px; margin: 0; padding: 0 16px; }
.secondary-button { width: 100%; margin-top: 20px; border: 1px solid var(--line); background: white; font-size: 10px; }
.fine-print { margin: 9px 7px 0; color: #99958d; text-align: center; font-size: 7.5px; line-height: 1.45; }

.send-story { max-width: 620px; padding: 20px 0 30px; }
.story-kicker { margin: 0 0 20px; color: var(--purple); font-size: 10px; font-weight: 850; letter-spacing: 0.16em; text-transform: uppercase; }
.send-story > h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(56px, 5.6vw, 83px); font-weight: 400; line-height: 0.94; letter-spacing: -0.06em; }
.send-story > h2 span { position: relative; z-index: 0; white-space: nowrap; }
.send-story > h2 span::after { content: ""; position: absolute; z-index: -1; left: -0.03em; right: -0.02em; bottom: 0.03em; height: 0.2em; border-radius: 99px; background: var(--lime); transform: rotate(-1deg); }
.send-story > p:not(.story-kicker) { max-width: 580px; margin: 26px 0 0; color: #55534d; font-size: 17px; line-height: 1.55; }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 34px; }
.story-grid article { min-height: 142px; padding: 16px; border: 1px solid rgba(52, 48, 32, 0.09); border-radius: 17px; background: rgba(255, 254, 249, 0.58); backdrop-filter: blur(10px); }
.story-number { display: block; margin-bottom: 24px; color: var(--purple); font: 16px Georgia, serif; }
.story-grid strong { font-size: 11px; }
.story-grid p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.security-banner { display: flex; align-items: center; gap: 13px; margin-top: 14px; padding: 15px 17px; border-radius: 17px; background: var(--ink); color: white; }
.security-banner > span { color: var(--lime); font-size: 26px; }
.security-banner strong { font-size: 10px; }
.security-banner p { margin: 3px 0 0; color: #bbb9b0; font-size: 8px; line-height: 1.45; }

.status-view { display: none; min-height: 635px; padding: 53px 31px 31px; text-align: center; }
.status-view.is-visible { display: block; }
.status-orb { width: 78px; height: 78px; display: grid; place-items: center; margin: 0 auto 25px; border-radius: 50%; background: var(--purple-soft); color: var(--purple); font-size: 28px; }
.status-orb.is-working { animation: breathe 1.8s ease-in-out infinite; }
.status-orb.is-success { background: var(--green-soft); color: var(--green); animation: pop 320ms ease both; }
.status-orb.is-error { background: var(--red-soft); color: var(--red); }
.status-view h2 { margin: 7px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 31px; font-weight: 400; letter-spacing: -0.04em; }
.status-view > p { max-width: 330px; margin: 11px auto 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.progress-track { width: 100%; height: 7px; margin: 29px 0 22px; overflow: hidden; border-radius: 99px; background: #e9e5dc; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), #9b85ff); transition: width 180ms ease; }
.status-steps { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; text-align: left; }
.status-step { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; color: #97938b; font-size: 10px; }
.step-dot { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid #d8d4ca; border-radius: 50%; background: white; font-size: 8px; }
.status-step.is-active { color: var(--ink); font-weight: 800; }
.status-step.is-active .step-dot { border-color: var(--purple); background: var(--purple); color: white; }
.status-step.is-done { color: #54725c; }
.status-step.is-done .step-dot { border-color: #c7e0ce; background: var(--green-soft); color: var(--green); }
.step-state { color: #9a968e; font-size: 8px; }
.share-result { margin-top: 21px; padding: 13px; border-radius: 13px; background: var(--purple-soft); text-align: left; }
.share-result label { display: block; margin-bottom: 6px; color: #4e3ca1; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.copy-field input { min-width: 0; height: 39px; padding: 0 10px; border: 1px solid #d6cffb; border-radius: 9px; background: white; font-size: 9px; }
.copy-field button { padding: 0 12px; border: 0; border-radius: 9px; background: var(--purple); color: white; font-size: 9px; font-weight: 800; }
.transfer-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; font-size: 8px !important; }

.view-container { width: min(1160px, calc(100% - 58px)); margin: 0 auto; padding: 48px 0 72px; }
.narrow-container { max-width: 880px; }
.settings-container { max-width: 920px; }
.view-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.view-header h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 5vw, 66px); font-weight: 400; letter-spacing: -0.055em; }
.view-header p { max-width: 590px; margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 18px; }
.stats-grid article { min-height: 132px; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; border: 1px solid rgba(52, 48, 32, 0.09); border-radius: 19px; background: rgba(255, 254, 249, 0.74); backdrop-filter: blur(12px); }
.stats-grid article > span { margin-bottom: auto; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.stats-grid strong { font: 34px Georgia, serif; letter-spacing: -0.04em; }
.stats-grid small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.list-card, .creation-card, .settings-card { border: 1px solid rgba(52, 48, 32, 0.09); border-radius: 22px; background: rgba(255, 254, 249, 0.91); box-shadow: 0 15px 42px rgba(48, 44, 30, 0.07); backdrop-filter: blur(15px); }
.list-toolbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 17px; border-bottom: 1px solid var(--line); }
.list-toolbar > strong { font-size: 12px; }
.toolbar-note { color: var(--muted); font-size: 9px; }
.filter-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: var(--surface-soft); }
.filter-tab { height: 33px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 750; }
.filter-tab.is-active { background: white; color: var(--ink); box-shadow: 0 2px 7px rgba(48, 44, 30, 0.08); }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 16px; }
.record-list { min-height: 300px; }
.empty-state { min-height: 300px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 40px 20px; text-align: center; }
.empty-state > span { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 5px; border-radius: 17px; background: var(--purple-soft); color: var(--purple); font-size: 24px; }
.empty-state strong { font: 22px Georgia, serif; }
.empty-state p { max-width: 360px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.empty-state button { margin-top: 7px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 9px; font-weight: 800; }
.compact-empty { min-height: 250px; }
.record-row { display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(100px, 0.6fr) minmax(90px, 0.5fr) minmax(120px, 0.7fr) auto; align-items: center; gap: 18px; min-height: 78px; padding: 13px 17px; border-bottom: 1px solid #ebe7dd; }
.record-row:last-child { border-bottom: 0; }
.record-row:hover { background: #fbfaf5; }
.record-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.record-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--purple-soft); color: var(--purple); font-size: 10px; font-weight: 850; }
.record-copy { min-width: 0; display: grid; gap: 3px; }
.record-copy strong, .record-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-copy strong { font-size: 11px; }
.record-copy span, .record-meta span { color: var(--muted); font-size: 8px; }
.record-meta { display: grid; gap: 3px; }
.record-meta strong { font-size: 10px; }
.status-badge { width: max-content; display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 99px; font-size: 8px; font-weight: 800; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge.ready { background: var(--green-soft); color: var(--green); }
.status-badge.processing { background: var(--orange-soft); color: var(--orange); }
.status-badge.failed, .status-badge.expired, .status-badge.deleted { background: var(--red-soft); color: var(--red); }
.row-actions { display: flex; align-items: center; gap: 6px; }
.row-action { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: 8px; font-weight: 800; }
.row-action.primary { border-color: var(--ink); background: var(--ink); color: white; }
.row-action.danger { color: var(--red); }

.split-view { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.view-main { min-width: 0; }
.creation-card { position: sticky; top: calc(var(--topbar-height) + 25px); padding: 25px; }
.creation-card h2 { margin: 0; font: 30px Georgia, serif; letter-spacing: -0.04em; }
.creation-card > p { margin: 8px 0 21px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.creation-card form { display: grid; gap: 13px; }

.settings-card { overflow: hidden; }
.setting-row { min-height: 88px; display: grid; grid-template-columns: minmax(0, 1fr) 240px; align-items: center; gap: 30px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.setting-row strong { display: block; margin-bottom: 5px; font-size: 12px; }
.setting-row p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.toggle { justify-self: end; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { position: relative; width: 46px; height: 25px; display: block; border-radius: 99px; background: #d7d3ca; transition: background 150ms ease; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: transform 150ms ease; }
.toggle input:checked + span { background: var(--purple); }
.toggle input:checked + span::after { transform: translateX(21px); }
.settings-actions { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 22px; }
.settings-actions > span { color: var(--muted); font-size: 9px; }
.privacy-card { display: flex; align-items: flex-start; gap: 16px; margin-top: 16px; padding: 20px 22px; border-radius: 18px; background: var(--ink); color: white; }
.privacy-card > span { color: var(--lime); font-size: 28px; }
.privacy-card strong { font-size: 12px; }
.privacy-card p { margin: 5px 0 0; color: #bbb9b0; font-size: 9px; line-height: 1.6; }

.mobile-nav { display: none; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(24, 23, 18, 0.28); backdrop-filter: blur(2px); }
.profile-drawer, .detail-drawer { position: fixed; z-index: 90; top: 12px; right: 12px; bottom: 12px; width: min(390px, calc(100vw - 24px)); overflow: auto; border: 1px solid rgba(52, 48, 32, 0.1); border-radius: 24px; background: var(--surface); box-shadow: 0 30px 90px rgba(28, 26, 18, 0.25); transform: translateX(calc(100% + 28px)); transition: transform 220ms ease; }
.profile-drawer.is-open, .detail-drawer.is-open { transform: translateX(0); }
.detail-drawer { width: min(500px, calc(100vw - 24px)); }
.drawer-head { min-height: 84px; display: flex; align-items: center; gap: 13px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head > div:not(.avatar) { min-width: 0; flex: 1; display: grid; gap: 3px; }
.drawer-head strong { font-size: 13px; }
.drawer-head span:not(.section-label) { color: var(--muted); font-size: 9px; }
.drawer-head button { width: 35px; height: 35px; border: 0; border-radius: 10px; background: var(--surface-soft); color: var(--muted); font-size: 20px; }
.drawer-section { padding: 21px 19px; border-bottom: 1px solid var(--line); }
.drawer-label { display: block; margin-bottom: 18px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.usage-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 11px 0 6px; font-size: 10px; }
.usage-bar { height: 7px; overflow: hidden; border-radius: 99px; background: #e8e4db; }
.usage-bar span { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--purple); transition: width 280ms ease; }
.plan-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.plan-heading .drawer-label { margin-bottom: 6px; }
.plan-heading strong { font-size: 15px; }
.plan-badge { padding: 5px 8px; border-radius: 99px; background: #ebe7dc; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.plan-section.is-pro .plan-badge { background: #f0ddff; color: #7a18ce; }
.period-copy { margin: 9px 0 16px; color: var(--muted); font-size: 9px; }
.plan-ladder { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 7px; margin: -2px 0 21px; }
.plan-ladder span { padding: 7px 5px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 8px; font-weight: 850; text-align: center; text-transform: uppercase; }
.plan-ladder i { color: #bbb6aa; font-size: 10px; font-style: normal; }
.plan-ladder span.is-complete { border-color: #cdc5ff; background: #f3f0ff; color: var(--purple); }
.plan-ladder span.is-current { border-color: var(--ink); background: var(--ink); color: white; }
.plan-upsell { margin-top: 19px; padding: 15px; border: 1px solid #ded7ff; border-radius: 15px; background: linear-gradient(145deg, #faf8ff, #f3efff); }
.plan-section.is-pro .plan-upsell { border-color: #d7ead8; background: linear-gradient(145deg, #f8fcf7, #eef8ee); }
.upsell-eyebrow { display: block; margin-bottom: 7px; color: var(--purple); font-size: 7px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.plan-section.is-pro .upsell-eyebrow { color: var(--green); }
.plan-upsell > strong { display: block; font: 19px Georgia, serif; letter-spacing: -.03em; }
.plan-upsell > p { margin: 7px 0 11px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.plan-upsell ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.plan-upsell li { display: grid; grid-template-columns: 16px 1fr; align-items: start; gap: 5px; font-size: 8px; line-height: 1.4; }
.plan-upsell li > span:first-child { width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--purple); font-size: 7px; font-weight: 900; }
.upgrade-button { width: 100%; min-height: 43px; margin-top: 18px; border: 0; border-radius: 12px; background: var(--purple); color: white; font-size: 9px; font-weight: 850; }
.plan-section.is-pro .upgrade-button { background: var(--surface-soft); color: var(--muted); }
.plan-price { margin: 8px 0 0; color: var(--muted); font-size: 8px; text-align: center; }
.drawer-links { display: grid; padding: 8px 19px; }
.drawer-links button { min-height: 51px; display: flex; align-items: center; justify-content: space-between; border: 0; border-bottom: 1px solid #ece8df; background: transparent; font-size: 11px; text-align: left; }
.drawer-links button:last-child { border-bottom: 0; }
.drawer-admin-link { min-height: 51px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ece8df; color: #7a18ce; font-size: 11px; font-weight: 800; text-decoration: none; }
.drawer-security { display: flex; gap: 11px; border-bottom: 0; color: var(--green); }
.drawer-security > span { font-size: 8px; }
.drawer-security p { margin: -2px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.drawer-security strong { color: var(--ink); }
.detail-content { padding: 21px 19px 30px; }
.detail-section { padding: 17px 0; border-bottom: 1px solid var(--line); }
.detail-section:first-child { padding-top: 0; }
.detail-section h3 { margin: 0 0 10px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.detail-kv { display: flex; justify-content: space-between; gap: 20px; margin-top: 8px; font-size: 10px; }
.detail-kv span { color: var(--muted); }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.detail-actions button { min-height: 42px; border: 1px solid var(--line); border-radius: 11px; background: white; font-size: 9px; font-weight: 800; }
.detail-actions button.primary { border-color: var(--ink); background: var(--ink); color: white; }
.detail-actions button.danger { color: var(--red); }

.feature-gate {
  display: grid;
  justify-items: start;
  gap: 10px;
  max-width: 720px;
  padding: 28px;
  border: 1px solid rgba(52, 48, 32, 0.09);
  border-radius: 22px;
  background: rgba(255, 254, 249, 0.9);
  box-shadow: 0 15px 42px rgba(48, 44, 30, 0.07);
}
.feature-gate strong { font: 27px Georgia, serif; }
.feature-gate p { max-width: 570px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.feature-gate button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--purple); color: white; font-size: 10px; font-weight: 800; }
.feature-form, .branding-form, .branding-preview {
  padding: 25px;
  border: 1px solid rgba(52, 48, 32, 0.09);
  border-radius: 22px;
  background: rgba(255, 254, 249, 0.92);
  box-shadow: 0 15px 42px rgba(48, 44, 30, 0.07);
}
.feature-form { display: grid; gap: 15px; margin-bottom: 20px; }
.feature-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.feature-form-head h2 { margin: 0; font: 30px Georgia, serif; letter-spacing: -.04em; }
.feature-form-grid, .color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.transfer-picker { min-width: 0; margin: 2px 0; padding: 14px; border: 1px solid var(--line); border-radius: 15px; }
.transfer-picker legend { padding: 0 6px; font-size: 10px; font-weight: 800; }
.picker-list { display: grid; gap: 7px; max-height: 270px; overflow: auto; }
.picker-row { min-height: 49px; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 11px; padding: 8px 10px; border: 1px solid #ebe7dd; border-radius: 12px; background: white; }
.picker-row input { width: 18px; height: 18px; accent-color: var(--purple); }
.picker-row span { min-width: 0; overflow: hidden; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.picker-row small { color: var(--muted); font-size: 9px; }
.picker-order-actions { display:flex; gap:4px; }
.picker-order-actions button { width:34px; height:34px; border:1px solid var(--line); border-radius:9px; background:white; font-size:12px; }
.picker-row.is-unavailable { border-color: #ecc8c2; background: var(--red-soft); }
.picker-unavailable-mark { width:18px; height:18px; display:grid; place-items:center; border-radius:50%; background:var(--red); color:white; }
.picker-row .picker-remove { min-height:34px; padding:0 9px; border:1px solid #e2b2aa; border-radius:9px; background:white; color:var(--red); font-size:8px; font-weight:800; }
.showcase-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.showcase-card { min-width: 0; padding: 22px; border: 1px solid rgba(52,48,32,.09); border-radius: 21px; background: rgba(255,254,249,.91); box-shadow: 0 15px 42px rgba(48,44,30,.07); }
.showcase-card-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.showcase-card h2 { margin: 0; overflow-wrap: anywhere; font: 27px Georgia, serif; letter-spacing: -.035em; }
.showcase-card p { margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.showcase-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.showcase-meta span { padding: 6px 8px; border-radius: 99px; background: var(--surface-soft); color: var(--muted); font-size: 8px; font-weight: 750; }
.showcase-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 19px; }
.showcase-actions button { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: white; font-size: 9px; font-weight: 800; }
.showcase-actions .primary { border-color: var(--ink); background: var(--ink); color: white; }
.showcase-actions .danger { color: var(--red); }
.branding-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .85fr); gap: 20px; align-items: start; }
.branding-form { display: grid; gap: 15px; }
.color-grid { grid-template-columns: repeat(3, 1fr); }
.color-grid input[type="color"] { height: 48px; padding: 4px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-state { min-height: 16px; margin: 0; color: var(--green); font-size: 9px; line-height: 1.5; }
.branding-preview { position: sticky; top: calc(var(--topbar-height) + 24px); min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: linear-gradient(135deg, var(--brand-preview-start, #eef4ff), var(--brand-preview-end, #f8fbff)); }
.branding-preview::before { content:""; position:absolute; width:250px; height:250px; top:-90px; right:-90px; border-radius:50%; background:var(--brand-preview-accent,#3157e8); opacity:.12; }
.preview-brand { position: absolute; z-index:1; top:22px; left:22px; display:flex; align-items:center; gap:9px; font-size:12px; }
.preview-brand img, .preview-brand>span { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; object-fit:contain; background:var(--brand-preview-accent,#3157e8); color:#fff; }
.branding-preview h2 { position:relative; margin:0; font:40px/1 Georgia,serif; letter-spacing:-.05em; }
.branding-preview p { position:relative; margin:14px 0 22px; color:#55534d; font-size:11px; line-height:1.55; }
.branding-preview>button { position:relative; width:max-content; min-height:45px; padding:0 16px; border:0; border-radius:12px; background:var(--brand-preview-accent,#3157e8); color:#fff; font-size:10px; font-weight:800; opacity:1; }
.account-state h2 { margin: 0 0 7px; font: 24px Georgia, serif; letter-spacing: -.03em; }
.account-state>p { margin: 0 0 15px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.account-state form { display: grid; gap: 8px; margin-top: 13px; }
.account-state label { font-size: 9px; font-weight: 800; }
.account-state input, .account-state select { width: 100%; min-height: 43px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; background: white; font-size: 10px; }
.account-state form button, .drawer-secondary { min-height: 43px; padding: 0 12px; border: 0; border-radius: 11px; background: var(--ink); color: white; font-size: 9px; font-weight: 800; }
.guest-value-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 14px 0 4px; }
.guest-value-grid span { display: grid; gap: 2px; padding: 10px; border-radius: 11px; background: var(--surface-soft); color: var(--muted); font-size: 7px; }
.guest-value-grid strong { color: var(--ink); font-size: 13px; }
.drawer-secondary { width: 100%; margin-top: 10px; border: 1px solid var(--line); background: white; color: var(--ink); }
.drawer-text-button { min-height: 40px; margin-top: 8px; border: 0; background: transparent; color: var(--red); font-size: 9px; font-weight: 800; }
.form-alert { min-height: 0; margin: 0; color: var(--red); font-size: 9px; line-height: 1.45; }
.member-list { display: grid; gap: 7px; margin: 13px 0; padding: 0; list-style: none; }
.member-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; align-items:center; padding:10px; border:1px solid var(--line); border-radius:12px; }
.member-row>div { min-width:0; display:grid; gap:3px; }
.member-row strong { overflow:hidden; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.member-row small { color:var(--muted); font-size:8px; }
.member-actions { display:flex; gap:4px; }
.member-actions select { width:auto; min-height:36px; }
.member-actions button, .invitation-row button { min-width:36px; min-height:36px; padding:0 8px; border:1px solid var(--line); border-radius:9px; background:white; color:var(--red); font-size:8px; font-weight:800; }
.invitation-list { display:grid; gap:6px; margin:12px 0; }
.invitation-row { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 10px; border-radius:11px; background:var(--surface-soft); }
.invitation-row div { min-width:0; display:grid; gap:2px; }
.invitation-row strong { overflow:hidden; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.invitation-row small { color:var(--muted); font-size:8px; }
.dashboard-error { margin:0; padding:17px; border-bottom:1px solid var(--line); background:var(--red-soft); color:var(--red); font-size:10px; line-height:1.5; }
.detail-inline-action { width:100%; min-height:42px; margin-top:13px; border:1px solid var(--line); border-radius:11px; background:white; font-size:9px; font-weight:800; }
.event-list { display:grid; gap:13px; margin:0; padding:0 0 0 18px; }
.event-list li { padding-left:4px; }
.event-list strong,.event-list span { display:block; }
.event-list strong { font-size:9px; text-transform:capitalize; }
.event-list span { margin-top:2px; color:var(--muted); font-size:8px; }
.event-list p { margin:4px 0 0; color:#55534d; font-size:9px; line-height:1.45; }
.request-transfer-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 0; border-bottom:1px solid var(--line); }
.request-transfer-row>div { min-width:0; display:grid; gap:3px; }
.request-transfer-row strong { overflow:hidden; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.request-transfer-row span { color:var(--muted); font-size:8px; }
.request-transfer-row button { min-height:38px; padding:0 10px; border:1px solid var(--line); border-radius:9px; background:white; font-size:8px; font-weight:800; }

.toast { position: fixed; z-index: 120; left: 50%; bottom: 24px; max-width: min(420px, calc(100vw - 30px)); padding: 11px 15px; border-radius: 12px; background: var(--ink); color: white; box-shadow: 0 12px 35px rgba(0,0,0,.18); font-size: 10px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity 170ms ease, transform 170ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes pop { 0% { transform: scale(.72); } 72% { transform: scale(1.08); } 100% { transform: scale(1); } }

@media (max-width: 1080px) {
  .send-layout { width: min(850px, calc(100% - 40px)); grid-template-columns: minmax(370px, 440px) minmax(0, 1fr); gap: 44px; }
  .send-story > h2 { font-size: clamp(48px, 6vw, 68px); }
  .story-grid { grid-template-columns: 1fr; }
  .story-grid article { min-height: 0; display: grid; grid-template-columns: 32px 1fr; column-gap: 8px; padding: 13px; }
  .story-number { grid-row: 1 / 3; margin: 0; }
  .story-grid p { grid-column: 2; }
  .split-view { grid-template-columns: minmax(0, 1fr) 330px; }
  .record-row { grid-template-columns: minmax(190px, 1.4fr) minmax(90px, .6fr) minmax(90px, .5fr) auto; }
  .record-row > .record-meta:nth-of-type(3) { display: none; }
}

@media (max-width: 820px) {
  :root { --rail-width: 0px; --topbar-height: 68px; }
  .app-shell { display: block; padding-bottom: 68px; }
  .side-rail { display: none; }
  .topbar { position: sticky; grid-column: auto; height: var(--topbar-height); padding: 0 14px; }
  .mobile-brand { display: flex; }
  .page-heading { display: none; }
  .usage-chip { display: none; }
  .profile-button { min-width: 0; width: 44px; height: 44px; padding: 4px; border-radius: 13px; }
  .profile-copy, .profile-button > span:last-child { display: none; }
  .profile-button .avatar { width: 34px; height: 34px; }
  .workspace { min-height: calc(100vh - 68px); }
  .app-view { min-height: calc(100vh - 136px); }
  .send-layout { width: min(620px, calc(100% - 24px)); min-height: auto; grid-template-columns: 1fr; gap: 25px; padding: 22px 0 42px; }
  .composer-card { order: 2; }
  .send-story { order: 1; padding: 13px 5px 0; }
  .send-story > h2 { font-size: clamp(46px, 11vw, 68px); }
  .send-story > p:not(.story-kicker), .story-grid { display: none; }
  .security-banner { margin-top: 21px; }
  .view-container { width: min(680px, calc(100% - 24px)); padding: 28px 0 42px; }
  .view-header { align-items: flex-start; }
  .view-header h1 { font-size: 45px; }
  .stats-grid { grid-template-columns: 1fr 1fr 1fr; }
  .stats-grid article { min-height: 108px; padding: 15px; }
  .stats-grid strong { font-size: 27px; }
  .split-view { display: flex; flex-direction: column; }
  .view-main, .creation-card { width: 100%; }
  .creation-card { position: static; order: -1; }
  .setting-row { grid-template-columns: 1fr 210px; }
  .branding-layout { grid-template-columns: 1fr; }
  .branding-preview { position: static; min-height: 360px; }
  .mobile-nav { position: fixed; z-index: 45; left: 8px; right: 8px; bottom: 8px; height: 60px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px; border: 1px solid rgba(52, 48, 32, 0.09); border-radius: 18px; background: rgba(255, 254, 249, 0.94); box-shadow: 0 14px 38px rgba(28, 26, 18, 0.16); backdrop-filter: blur(18px); }
  .mobile-nav button { display: grid; place-items: center; align-content: center; gap: 2px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); }
  .mobile-nav button.is-active { background: var(--purple-soft); color: var(--purple); }
  .mobile-nav button > span { font-size: 18px; }
  .mobile-nav small { font-size: 8px; font-weight: 750; }
  .toast { bottom: 82px; }
}

@media (max-width: 560px) {
  .send-layout { width: calc(100% - 18px); padding-top: 15px; }
  .send-story { padding-inline: 7px; }
  .story-kicker { margin-bottom: 11px; font-size: 8px; }
  .send-story > h2 { font-size: clamp(42px, 14vw, 59px); }
  .security-banner { display: none; }
  .composer-card { border-radius: 22px; }
  .form-view { padding: 21px 17px 22px; }
  .resume-banner { grid-template-columns: auto minmax(0, 1fr); }
  .resume-banner button { width: 100%; grid-column: 1 / -1; }
  .composer-head h1 { font-size: 26px; }
  .drop-zone { min-height: 105px; padding: 14px; }
  .field-row, .options-grid { grid-template-columns: 1fr; }
  .summary-meta { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .status-view { min-height: 580px; padding: 42px 20px 25px; }
  .view-container { width: calc(100% - 18px); padding-top: 24px; }
  .view-header { display: block; margin-bottom: 22px; }
  .view-header .primary-button { width: 100%; margin-top: 16px; }
  .view-header h1 { font-size: 41px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid article:last-child { grid-column: 1 / -1; }
  .filter-tabs { width: 100%; overflow-x: auto; }
  .filter-tab { flex: 1 0 auto; }
  .list-toolbar { align-items: stretch; }
  .list-toolbar:has(.filter-tabs) { flex-direction: column; }
  .list-toolbar:has(.filter-tabs) .icon-button { display: none; }
  .record-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .record-row > .record-meta { display: none; }
  .row-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .row-action { min-height: 44px; }
  .empty-state { min-height: 250px; }
  .setting-row { grid-template-columns: 1fr; gap: 13px; }
  .toggle { justify-self: start; }
  .settings-actions { align-items: stretch; flex-direction: column; }
  .settings-actions .primary-button { width: 100%; }
  .feature-form-grid, .color-grid, .showcase-grid { grid-template-columns: 1fr; }
  .branding-form, .branding-preview, .feature-form { padding: 19px; }
  .form-actions { display:grid; }
  .form-actions button { width:100%; }
  .profile-drawer, .detail-drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: calc(100vh - 80px); border-radius: 24px; transform: translateY(calc(100% + 20px)); }
  .profile-drawer.is-open, .detail-drawer.is-open { transform: translateY(0); }
}

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

:focus-visible { outline: 3px solid rgba(101, 71, 220, 0.35); outline-offset: 2px; }
