:root {
  color-scheme: light;
  --background: #fff8ef;
  --surface: #fff8ef;
  --surface-low: #fbf3e4;
  --surface-mid: #f5edde;
  --surface-high: #efe7d9;
  --surface-highest: #e9e2d3;
  --paper: #ffffff;
  --ink: #1e1b13;
  --muted: #56423d;
  --primary: #9a4025;
  --primary-strong: #7e2b12;
  --primary-container: #ba573b;
  --secondary-container: #febdab;
  --teal: #006764;
  --teal-container: #8ef3ee;
  --danger: #ba1a1a;
  --danger-soft: #ffdad6;
  --outline-soft: rgba(137, 114, 108, 0.15);
  --ambient-shadow: 0 12px 32px rgba(30, 27, 19, 0.06);
  --deep-shadow: 0 28px 52px rgba(30, 27, 19, 0.10);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #201a18;
  color: var(--ink);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

svg {
  width: 1.35em;
  height: 1.35em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-frame {
  width: min(100%, 430px);
  min-height: 100svh;
  margin: 0 auto;
  background: var(--background);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: calc(16px + env(safe-area-inset-top)) 24px 10px;
  background: linear-gradient(180deg, rgba(255, 248, 239, 0.96), rgba(255, 248, 239, 0.74));
  backdrop-filter: blur(24px);
}

.app-frame.auth-mode .topbar {
  display: none;
}

.app-frame.wizard-mode .topbar {
  display: none;
}

.app-frame.wizard-mode .screen {
  padding: 24px 20px calc(36px + env(safe-area-inset-bottom));
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-label {
  display: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.step-tracker {
  position: sticky;
  top: 0;
  z-index: 7;
  height: 3px;
  background: var(--surface-highest);
}

.step-tracker span {
  display: block;
  height: 100%;
  width: 12%;
  background: var(--primary);
  transition: width 180ms ease;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.menu-mark {
  display: inline-flex;
  color: var(--primary);
}

.icon-button,
.avatar-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  color: var(--primary);
  background: transparent;
}

.avatar-button {
  color: #ffffff;
  background: #2d3337;
  box-shadow: 0 0 0 2px var(--secondary-container);
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
}

.topbar h1 {
  margin: 0;
  color: var(--primary);
  font-size: 23px;
  line-height: 1.1;
  font-weight: 800;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow.teal {
  color: var(--teal);
}

.screen {
  flex: 1;
  padding: 28px 24px calc(116px + env(safe-area-inset-bottom));
  overflow: auto;
}

.onboarding-shell {
  min-height: calc(100svh - 60px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.onboarding-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: env(safe-area-inset-top);
}

.onboarding-header h2 {
  margin: 4px 0 0;
  color: var(--primary);
  font-size: 29px;
  line-height: 1.05;
  font-weight: 800;
}

.onboarding-header > span {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  height: 34px;
  color: var(--primary);
  background: var(--secondary-container);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.onboarding-progress {
  height: 5px;
  overflow: hidden;
  background: var(--surface-highest);
  border-radius: 999px;
}

.onboarding-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  transition: width 180ms ease;
}

.wizard-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: var(--paper);
  border-radius: 8px;
  box-shadow: var(--ambient-shadow);
}

.wizard-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 31px;
  line-height: 1.08;
  font-weight: 800;
}

.wizard-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.wizard-card .form-grid {
  gap: 14px;
}

.wizard-card .field.wide {
  grid-column: 1 / -1;
}

.wizard-list {
  display: grid;
  gap: 12px;
  margin: 8px 0;
}

.wizard-list div {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  color: var(--muted);
  background: var(--surface-low);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
}

.wizard-list svg {
  color: var(--teal);
}

.ownership-note,
.ownership-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: start;
  gap: 12px;
  color: var(--muted);
  background: rgba(142, 243, 238, 0.24);
  border-radius: 8px;
  box-shadow: inset 4px 0 0 var(--teal);
}

.ownership-note {
  padding: 14px;
  font-size: 14px;
  line-height: 1.4;
}

.ownership-card {
  margin: -12px 0 28px;
  padding: 18px;
  font-size: 15px;
  line-height: 1.45;
}

.ownership-note svg,
.ownership-card svg {
  color: var(--teal);
}

.ownership-card p {
  margin: 0;
}

.wizard-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: auto;
}

.wizard-actions .secondary-button,
.wizard-actions .primary-button {
  width: 100%;
}

.itsme-card,
.cozo-card,
.wizard-card.done {
  text-align: center;
}

.itsme-phone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 8px auto 4px;
  width: min(100%, 260px);
  padding: 28px 18px;
  overflow: hidden;
  color: #1d1d1d;
  background: #ffffff;
  border: 10px solid #1f2528;
  border-radius: 30px;
  box-shadow: 0 24px 42px rgba(30, 27, 19, 0.16);
}

.itsme-phone::after {
  content: "";
  position: absolute;
  inset: auto 18px 14px;
  height: 4px;
  background: #1f2528;
  border-radius: 999px;
}

.itsme-logo {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  color: #ffffff;
  background: #ff4a2a;
  border-radius: 22px;
  font-size: 19px;
  font-weight: 900;
}

.itsme-rings {
  position: relative;
  width: 88px;
  height: 42px;
}

.itsme-rings span {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 74, 42, 0.45);
  border-radius: 50%;
}

.itsme-rings span:nth-child(2) {
  width: 54px;
  height: 54px;
}

.itsme-rings span:nth-child(3) {
  width: 74px;
  height: 74px;
}

.itsme-phone.scanning .itsme-rings span {
  animation: itsme-pulse 900ms ease-in-out infinite;
}

.itsme-phone.verified .itsme-logo {
  background: var(--teal);
}

.itsme-phone strong {
  font-size: 18px;
  line-height: 1.2;
}

.itsme-phone p {
  color: #5d5d5d;
  font-size: 13px;
}

@keyframes itsme-pulse {
  0%,
  100% {
    scale: 0.92;
    opacity: 0.45;
  }

  50% {
    scale: 1.08;
    opacity: 1;
  }
}

.cozo-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 10px 0;
}

.cozo-preview div {
  display: grid;
  gap: 4px;
  padding: 18px 12px;
  background: var(--surface-low);
  border-radius: 8px;
}

.cozo-preview strong {
  color: var(--primary);
  font-size: 30px;
  line-height: 1;
}

.cozo-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.tabbar {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 0 16px;
  padding: 12px 8px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 248, 239, 0.88);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -18px 42px rgba(30, 27, 19, 0.14);
  backdrop-filter: blur(24px);
}

.tab-button {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 58px;
  padding: 7px 4px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.tab-button.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  box-shadow: var(--ambient-shadow);
}

.nav-icon {
  display: inline-flex;
}

.paper-card,
.paper-section,
.folder-card,
.summary-hero {
  background: var(--paper);
  border-radius: 32px;
  box-shadow: var(--ambient-shadow);
}

.paper-card,
.paper-section {
  padding: 24px;
  margin-bottom: 24px;
}

.paper-section {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.home-hero {
  margin: 10px 0 26px;
}

.home-hero h2,
.data-hero h2,
.vault-hero h2,
.share-hero h2,
.auth-copy h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(42px, 13vw, 58px);
  line-height: 1.04;
  font-weight: 800;
}

.home-hero h2 span,
.data-hero h2 span,
.vault-hero h2 {
  color: var(--primary-container);
}

.summary-hero {
  padding: 38px 32px;
  margin-bottom: 32px;
  background: var(--surface-low);
  box-shadow: none;
}

.summary-hero p:last-child {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.55;
  font-weight: 500;
}

.summary-hero strong {
  color: var(--teal);
}

.cta-card {
  margin-bottom: 32px;
  padding: 32px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  border-radius: 28px;
  box-shadow: var(--deep-shadow);
}

.cta-card svg {
  width: 34px;
  height: 34px;
  margin-bottom: 26px;
}

.cta-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.15;
}

.cta-card p {
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.section-heading.compact {
  align-items: center;
  margin: 28px 0 16px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
}

.section-heading p,
.muted {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.auth-layout {
  display: grid;
  gap: 24px;
}

.secure-auth {
  min-height: calc(100svh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: 12px 0 36px;
}

.secure-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  color: var(--primary);
}

.secure-brand strong {
  font-size: 25px;
  font-weight: 800;
}

.secure-intro {
  text-align: center;
}

.secure-intro h2 {
  margin: 0;
  font-size: 46px;
  line-height: 1.08;
  font-weight: 800;
}

.secure-intro p {
  width: min(100%, 340px);
  margin: 16px auto 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.45;
}

.secure-panel {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.secure-field {
  gap: 12px;
}

.secure-field span {
  color: var(--primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  letter-spacing: 0;
}

.secure-field input {
  min-height: 66px;
  border-radius: 0;
  background: #eadbd3;
  box-shadow: inset 0 0 0 2px rgba(137, 114, 108, 0.18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.secure-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 70px;
  margin-top: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #c86546);
  border-radius: 4px;
  box-shadow: var(--deep-shadow);
  font-size: 22px;
  font-weight: 800;
}

.biometric-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 66px;
  margin-top: 16px;
  overflow: hidden;
  color: var(--primary);
  background: #eadbd3;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px rgba(137, 114, 108, 0.18);
  font-size: 18px;
  font-weight: 800;
}

.biometric-button::after {
  content: "";
  position: absolute;
  inset: 0;
  translate: -110% 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
}

.biometric-button.scanning::after {
  animation: biometric-scan 820ms ease-out;
}

.biometric-orbit {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(154, 64, 37, 0.10);
}

.biometric-orbit svg {
  width: 22px;
  height: 22px;
}

.biometric-button.scanning .biometric-orbit {
  animation: biometric-pulse 820ms ease-out;
}

@keyframes biometric-scan {
  from {
    translate: -110% 0;
  }

  to {
    translate: 110% 0;
  }
}

@keyframes biometric-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(154, 64, 37, 0);
  }

  45% {
    box-shadow: 0 0 0 10px rgba(154, 64, 37, 0.14);
  }
}

.auth-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px 34px;
  margin-top: 14px;
}

.auth-links button {
  min-height: auto;
  padding: 0;
  color: rgba(86, 66, 61, 0.72);
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-copy {
  padding: 12px 0 0;
}

.auth-copy p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.auth-panel h2 {
  margin: 0 0 22px;
  font-size: 25px;
  line-height: 1.15;
}

.security-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 18px;
  background: var(--surface-low);
  border-radius: 16px;
  box-shadow: inset 4px 0 0 var(--primary);
}

.security-note svg {
  color: var(--primary);
  flex: 0 0 auto;
}

.security-note strong,
.security-note span {
  display: block;
}

.security-note span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  border: 0;
  border-radius: 12px 12px 8px 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--surface-high);
  outline: 0;
  box-shadow: inset 0 -2px 0 rgba(137, 114, 108, 0.24);
}

textarea {
  min-height: 82px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  background: var(--paper);
  box-shadow: inset 0 -2px 0 var(--primary), 0 0 0 4px rgba(154, 64, 37, 0.12);
}

select {
  appearance: none;
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.inverted-button,
.inverted-ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
}

.secondary-button {
  color: var(--primary);
  background: var(--surface-low);
}

.danger-button {
  color: var(--danger);
  background: var(--danger-soft);
}

.ghost-button,
.text-button {
  min-height: 38px;
  color: var(--primary);
  background: transparent;
  padding: 8px 4px;
}

.inverted-button {
  width: 100%;
  color: var(--primary);
  background: var(--paper);
}

.inverted-ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button-row > button,
.button-row > a {
  flex: 1 1 145px;
}

.switch-auth {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.switch-auth button {
  min-height: auto;
  color: var(--primary);
  background: transparent;
  padding: 4px;
  font-weight: 800;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stats-grid.two-up {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 28px;
}

.stat {
  min-height: 112px;
  padding: 16px;
  border-radius: 24px;
  background: var(--surface-low);
}

.stat svg {
  color: var(--primary);
}

.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 26px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.teal-stat {
  background: var(--surface-highest);
}

.teal-stat svg {
  color: var(--teal);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--secondary-container);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.needs_id {
  color: var(--primary);
  background: var(--surface-highest);
}

.status-pill.received {
  color: var(--teal);
  background: rgba(142, 243, 238, 0.36);
}

.status-pill.found,
.status-pill.requested {
  color: var(--muted);
  background: var(--surface-mid);
}

.mini-list,
.source-list,
.document-list,
.summary-list {
  display: grid;
  gap: 16px;
}

.mini-item,
.source-item,
.document-item,
.summary-item {
  background: var(--paper);
  border-radius: 24px;
}

.mini-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.mini-item h3,
.source-item h3,
.document-item h3,
.summary-item h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
}

.mini-item p,
.source-item p,
.document-item p,
.summary-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.data-hero,
.vault-hero,
.share-hero {
  margin: 6px 0 28px;
}

.data-hero p,
.vault-hero p,
.share-hero p {
  max-width: 86%;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.48;
}

.source-section {
  display: grid;
  gap: 12px;
}

.source-item {
  padding: 22px;
}

.source-item header,
.document-item header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.source-lockup,
.document-lockup {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.source-icon,
.doc-icon,
.folder-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  color: var(--primary);
  background: rgba(254, 189, 171, 0.44);
}

.source-icon.teal {
  color: var(--teal);
  background: rgba(142, 243, 238, 0.28);
}

.source-icon.warm {
  color: var(--primary);
  background: rgba(154, 64, 37, 0.10);
}

.progress-row {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.progress-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-mid);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.source-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.source-actions input:not([hidden]) + button {
  margin-top: 0;
}

.folder-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
}

.folder-card {
  position: relative;
  overflow: hidden;
  min-height: 236px;
  padding: 28px;
  background: var(--surface-low);
  box-shadow: none;
}

.folder-card.private {
  background: var(--paper);
  box-shadow: var(--ambient-shadow);
}

.folder-card.drag-over {
  box-shadow: inset 0 0 0 4px rgba(0, 103, 100, 0.16), var(--ambient-shadow);
}

.accent-strip {
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: var(--primary-container);
}

.folder-card.private .accent-strip {
  background: var(--teal);
}

.folder-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
}

.folder-card h2 {
  margin: 0 0 10px;
  font-size: 25px;
}

.folder-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.folder-card.private .folder-symbol {
  color: var(--teal);
  background: rgba(142, 243, 238, 0.25);
}

.folder-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 24px;
}

.folder-tags span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: -6px;
  border-radius: 12px;
  color: var(--primary-strong);
  background: var(--secondary-container);
  box-shadow: 0 0 0 2px var(--surface-low);
  font-size: 9px;
  font-weight: 800;
}

.folder-card.private .folder-tags span {
  color: var(--teal);
  background: rgba(142, 243, 238, 0.38);
  box-shadow: 0 0 0 2px var(--paper);
}

.document-panel {
  overflow: hidden;
  padding: 24px 0 10px;
}

.document-panel .section-heading {
  padding: 0 24px;
}

.document-list {
  padding: 0 14px 8px;
}

.document-item {
  padding: 16px 14px;
  background: transparent;
}

.document-item:hover {
  background: var(--surface-low);
}

.document-item[draggable="true"] {
  cursor: grab;
}

.document-item h3 {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.document-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0 0 64px;
}

.document-actions a,
.document-actions button {
  flex: 1;
}

.document-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  color: var(--primary);
  background: var(--surface-low);
  text-decoration: none;
  font-weight: 800;
}

.summary-list {
  margin-bottom: 24px;
}

.summary-item {
  padding: 22px;
}

.summary-text {
  margin-top: 14px;
  white-space: pre-wrap;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.share-output {
  display: grid;
  gap: 20px;
}

.share-summary-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  margin-bottom: 22px;
}

.summary-action-grid {
  display: grid;
  gap: 14px;
}

.summary-action-grid article {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--outline-soft);
  border-radius: 18px;
  background: var(--surface-low);
}

.summary-action-grid h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
}

.summary-action-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.summary-action-grid .eyebrow {
  color: var(--teal);
}

.share-qr-card,
.share-link-card,
.family-card,
.share-private-card,
.share-security-note,
.share-method-card {
  margin-bottom: 22px;
  border-radius: 32px;
}

.share-qr-card {
  padding: 28px;
  background: var(--surface-low);
}

.share-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.share-card-heading h2,
.share-link-card h2,
.family-card h2,
.share-private-card h2,
.share-method-card h2 {
  margin: 0 0 6px;
  font-size: 21px;
  line-height: 1.18;
}

.share-card-heading p,
.share-link-card p,
.family-card p,
.share-private-card p,
.share-security-note p,
.share-method-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.share-card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  color: var(--primary);
  background: #eadbd3;
  border-radius: 14px;
}

.share-card-icon.neutral {
  color: var(--muted);
  background: var(--surface-high);
}

.qr-frame {
  display: grid;
  place-items: center;
  width: min(190px, 100%);
  margin: 0 auto 18px;
  padding: 10px;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--ambient-shadow);
}

.qr-frame #qr-canvas {
  width: 100%;
  border-radius: 8px;
  box-shadow: none;
}

.code-box.compact {
  min-height: 48px;
  font-size: 22px;
}

.share-link-card {
  padding: 28px;
  color: #ffffff;
  background: linear-gradient(145deg, #078d86, var(--teal));
  box-shadow: var(--deep-shadow);
}

.share-link-card .share-card-icon {
  margin-bottom: 24px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.share-link-card h2,
.share-link-card p {
  color: #ffffff;
}

.share-link-card p {
  margin-bottom: 24px;
  opacity: 0.9;
}

.share-link.on-teal {
  margin-top: 16px;
  color: #ffffff;
  font-size: 12px;
}

.share-methods {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.share-method-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  background: var(--paper);
  box-shadow: var(--ambient-shadow);
}

.share-method-card.disabled {
  background: rgba(255, 255, 255, 0.42);
  box-shadow: none;
}

.share-method-card.disabled .share-card-icon {
  color: var(--muted);
  background: var(--surface-high);
}

.share-method-card .muted {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  width: 146px;
  aspect-ratio: 1;
  margin: 2px auto 0;
  border: 1px dashed rgba(86, 66, 61, 0.28);
  border-radius: 18px;
  color: var(--muted);
  background: var(--surface-low);
  font-weight: 800;
}

.family-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  overflow: hidden;
  padding: 28px;
  background: var(--paper);
  box-shadow: var(--ambient-shadow);
}

.family-stack {
  display: flex;
  margin-top: 18px;
}

.family-stack span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: -6px;
  color: var(--primary);
  background: var(--surface-high);
  border-radius: 12px;
  box-shadow: 0 0 0 2px var(--paper);
  font-size: 11px;
  font-weight: 800;
}

.share-private-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 28px;
  background: var(--surface-low);
}

.share-private-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.share-private-card i {
  position: relative;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-highest);
}

.share-private-card i::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(30, 27, 19, 0.18);
  transition: transform 160ms ease;
}

.share-private-card input:checked + i {
  background: var(--primary);
}

.share-private-card input:checked + i::after {
  transform: translateX(20px);
}

.share-security-note {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  background: rgba(255, 255, 255, 0.38);
}

.share-security-note svg {
  flex: 0 0 auto;
  color: var(--teal);
}

.code-box {
  display: grid;
  place-items: center;
  min-height: 82px;
  border-radius: 18px;
  color: var(--teal);
  background: rgba(142, 243, 238, 0.26);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0;
}

.share-link {
  display: block;
  overflow-wrap: anywhere;
  color: var(--primary);
  font-weight: 800;
}

.qr-wrap {
  display: grid;
  place-items: center;
}

#qr-canvas {
  width: min(260px, 100%);
  height: auto;
  border-radius: 22px;
  background: white;
  box-shadow: var(--ambient-shadow);
}

.empty-state {
  border-radius: 22px;
  padding: 22px;
  color: var(--muted);
  background: var(--surface-low);
  text-align: center;
  font-size: 14px;
}

.access-card {
  padding: 28px;
  margin-top: 26px;
  background: var(--surface-mid);
  border-radius: 32px;
}

.activity-list {
  display: grid;
  gap: 18px;
}

.activity-list.full {
  max-height: 60svh;
  overflow: auto;
  padding-right: 4px;
}

.activity-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.activity-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  color: var(--teal);
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--ambient-shadow);
}

.activity-item h3 {
  margin: 0;
  font-size: 15px;
}

.activity-item p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.activity-item strong {
  color: var(--teal);
  font-size: 12px;
}

.access-card .secondary-button {
  width: 100%;
  margin-top: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.38);
}

.vault-tools {
  display: grid;
  gap: 12px;
  padding: 0 24px 18px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fab-button {
  position: fixed;
  right: max(22px, calc((100vw - 430px) / 2 + 22px));
  bottom: calc(102px + env(safe-area-inset-bottom));
  z-index: 8;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  min-height: 56px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  border-radius: 18px;
  box-shadow: var(--deep-shadow);
  font-size: 34px;
  line-height: 1;
  font-weight: 400;
}

.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(30, 27, 19, 0.28);
  backdrop-filter: blur(8px);
}

.drawer-panel,
.popover-panel,
.modal-panel {
  position: fixed;
  z-index: 31;
  color: var(--ink);
  background: rgba(255, 248, 239, 0.94);
  box-shadow: var(--deep-shadow);
  backdrop-filter: blur(24px);
}

.drawer-panel {
  inset: 0 auto 0 max(0px, calc((100vw - 430px) / 2));
  width: min(360px, calc(100vw - 36px));
  padding: calc(22px + env(safe-area-inset-top)) 24px 24px;
  border-radius: 0 32px 32px 0;
}

.popover-panel {
  top: calc(72px + env(safe-area-inset-top));
  right: max(14px, calc((100vw - 430px) / 2 + 14px));
  width: min(380px, calc(100vw - 28px));
  max-height: 76svh;
  overflow: auto;
  padding: 22px;
  border-radius: 28px;
}

.modal-panel {
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(400px, calc(100vw - 28px));
  max-height: 86svh;
  overflow: auto;
  transform: translateX(-50%);
  padding: 24px;
  border-radius: 32px;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.drawer-panel h2,
.popover-panel h2,
.modal-panel h2,
.privacy-illustration h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.12;
}

.drawer-panel p,
.popover-panel p,
.modal-panel p,
.privacy-illustration p {
  color: var(--muted);
}

.drawer-nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.drawer-nav.compact {
  margin: 20px 0;
}

.drawer-nav button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  padding: 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.drawer-nav button.active,
.drawer-nav button:hover {
  color: var(--primary);
  background: var(--surface-low);
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  color: #ffffff;
  background: #2d3337;
  box-shadow: 0 0 0 3px var(--secondary-container);
  border-radius: 18px;
  font-weight: 800;
}

.profile-menu .danger-button {
  width: 100%;
}

.privacy-illustration {
  overflow: hidden;
  margin-bottom: 24px;
}

.secure-window {
  display: grid;
  place-items: center;
  min-height: 230px;
  margin-bottom: 26px;
  background: var(--surface-mid);
  border-radius: 32px;
}

.secure-window::before {
  content: "";
  width: 64px;
  height: 8px;
  align-self: start;
  margin-top: -4px;
  background: var(--teal);
  border-radius: 999px;
}

.secure-window div {
  width: 70%;
  aspect-ratio: 1;
  border-radius: 32px;
  background: var(--surface-high);
}

.privacy-list {
  display: grid;
  gap: 14px;
}

.toggle-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  background: var(--paper);
  border-radius: 24px;
  box-shadow: var(--ambient-shadow);
}

.toggle-card strong,
.toggle-card em {
  display: block;
}

.toggle-card strong {
  font-size: 16px;
}

.toggle-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
}

.toggle-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-card i {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-highest);
}

.toggle-card i::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(30, 27, 19, 0.18);
  transition: transform 160ms ease;
}

.toggle-card input:checked + i {
  background: var(--teal);
}

.toggle-card input:checked + i::after {
  transform: translateX(20px);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 20;
  width: min(382px, calc(100% - 28px));
  transform: translateX(-50%);
  padding: 14px 16px;
  border-radius: 18px;
  color: #ffffff;
  background: #362f2d;
  box-shadow: 0 18px 42px rgba(30, 27, 19, 0.24);
  font-size: 14px;
}

.hidden {
  display: none !important;
}

.share-body {
  background: var(--background);
}

.share-page {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px;
}

.share-summary {
  padding: 24px;
  background: white;
  border-radius: 32px;
  box-shadow: var(--ambient-shadow);
}

.share-summary h1 {
  margin: 6px 0;
  color: var(--primary);
  font-size: 30px;
  line-height: 1.15;
}

@media (min-width: 760px) {
  .app-frame {
    min-height: min(100svh, 920px);
    margin-top: 0;
  }

  .folder-grid {
    grid-template-columns: 1fr 1fr;
  }
}
