/* RettungsQR – Design system
   Modern, ruhig, barrierearm. Keine Gesundheitsakten. */

:root {
  --font-display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --paper: #f3f5ee;
  --paper-2: #eef1e8;
  --surface: #ffffff;
  --surface-2: #e9eee3;
  --surface-3: #dde5d6;
  --ink: #0a1322;
  --ink-soft: #263246;
  --muted: #657084;
  --line: rgba(10, 19, 34, 0.1);
  --line-strong: rgba(10, 19, 34, 0.18);
  --brand: #0e7c72;
  --brand-strong: #075e57;
  --brand-soft: #d9f3e8;
  --brand-glow: rgba(14, 124, 114, 0.2);
  --lime: #c8f169;
  --lime-soft: #eafbc4;
  --coral: #ff5b5b;
  --coral-soft: #ffe3e3;
  --amber: #e79a2e;
  --amber-soft: #fff2d8;
  --blue: #4d7bf3;
  --blue-soft: #e4ebff;
  --violet: #8b6cf6;
  --shadow-sm: 0 2px 8px rgba(10, 19, 34, 0.05);
  --shadow: 0 24px 70px rgba(10, 19, 34, 0.12);
  --shadow-soft: 0 12px 36px rgba(10, 19, 34, 0.08);
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 32px;
  --radius-xl: 42px;
  --focus: #e79a2e;
  --header-h: 78px;
}

[data-theme="dark"] {
  --paper: #080e18;
  --paper-2: #0b1320;
  --surface: #101a2a;
  --surface-2: #162235;
  --surface-3: #1e2c42;
  --ink: #f4f7ef;
  --ink-soft: #d7deea;
  --muted: #94a0b5;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --brand: #3dd6c0;
  --brand-strong: #8be9d9;
  --brand-soft: #123c38;
  --brand-glow: rgba(61, 214, 192, 0.18);
  --lime: #c8f169;
  --lime-soft: #283a17;
  --coral: #ff7a7a;
  --coral-soft: #3a1c1f;
  --amber: #f4b65a;
  --amber-soft: #392b16;
  --blue: #8aa7ff;
  --blue-soft: #1a2749;
  --violet: #b09bff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.22);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.3);
  --focus: #f4b65a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--lime);
  color: #0a1322;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

p {
  margin-bottom: 0;
}

.container {
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 26px;
  height: 26px;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--lime);
  color: #0a1322;
  font-weight: 800;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* Buttons & brand */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.82rem 1.2rem;
  font-size: 0.93rem;
  font-weight: 750;
  line-height: 1.1;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 24px rgba(10, 19, 34, 0.16);
}

.btn-primary:hover {
  background: var(--ink-soft);
}

[data-theme="dark"] .btn-primary {
  background: var(--lime);
  color: #0a1322;
}

[data-theme="dark"] .btn-primary:hover {
  background: #dcff92;
}

.btn-brand {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 10px 24px var(--brand-glow);
}

.btn-brand:hover {
  background: var(--brand-strong);
}

[data-theme="dark"] .btn-brand {
  color: #06231f;
  background: var(--brand);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--ink);
}

.btn-soft {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.btn-soft:hover {
  background: var(--surface-2);
}

.btn-danger {
  background: var(--coral-soft);
  color: #b62c2c;
}

[data-theme="dark"] .btn-danger {
  color: #ffb0b0;
}

.btn-sm {
  padding: 0.58rem 0.85rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 1rem 1.45rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.icon-btn.bordered {
  border-color: var(--line);
  background: var(--surface);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: #0a1322;
  color: var(--lime);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(10, 19, 34, 0.18);
}

.brand-mark .icon {
  width: 24px;
  height: 24px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.02;
}

.brand-text strong {
  font-size: 1.1rem;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.theme-toggle {
  position: relative;
}

.theme-toggle .sun,
.theme-toggle .moon {
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.theme-toggle .moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon {
  display: block;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 245, 238, 0.82);
  backdrop-filter: blur(18px);
}

[data-theme="dark"] .site-header {
  background: rgba(8, 14, 24, 0.82);
}

.nav-wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  transition:
    color 0.18s ease,
    background 0.18s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
  background: var(--surface);
}

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

.menu-btn {
  display: none;
}

/* Landing hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(54px, 7vw, 96px) 0 44px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 110%;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 30%, rgba(200, 241, 105, 0.24), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(14, 124, 114, 0.18), transparent 30%),
    radial-gradient(circle at 60% 80%, rgba(77, 123, 243, 0.09), transparent 32%);
  filter: blur(4px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 72%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: clamp(34px, 6vw, 78px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px 7px 7px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 750;
}

.eyebrow .dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.eyebrow .dot .icon {
  width: 14px;
  height: 14px;
}

.hero h1 {
  margin-bottom: 22px;
  font-size: clamp(2.85rem, 5.6vw, 5.45rem);
  line-height: 0.97;
  letter-spacing: -0.06em;
}

.hero h1 em {
  position: relative;
  color: var(--brand);
  font-style: normal;
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 0;
  bottom: 0.02em;
  height: 0.12em;
  border-radius: 999px;
  background: var(--lime);
  z-index: -1;
  transform: rotate(-1.3deg);
}

.hero-lead {
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: clamp(1.03rem, 1.35vw, 1.2rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.meta-item .icon {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

.hero-stage {
  position: relative;
  min-height: 530px;
  display: grid;
  place-items: center;
}

.hero-halo {
  position: absolute;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 40%, rgba(200, 241, 105, 0.52), transparent 54%),
    radial-gradient(circle at 65% 65%, rgba(14, 124, 114, 0.3), transparent 58%);
  filter: blur(22px);
}

.mailbox-card {
  position: relative;
  width: min(360px, 84%);
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 34px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.06), transparent 40%),
    linear-gradient(160deg, #142236 0%, #08101c 74%);
  color: #f7f9f2;
  box-shadow:
    0 40px 90px rgba(10, 19, 34, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transform: rotate(-3.2deg);
}

.mailbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.mailbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b9c6d8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mailbox-label .icon {
  width: 15px;
  height: 15px;
  color: var(--lime);
}

.mailbox-house {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #d5deea;
  font-size: 0.67rem;
  font-weight: 700;
  white-space: nowrap;
}

.qr-frame {
  position: relative;
  display: block;
  width: min(232px, 100%);
  margin: 0 auto;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.qr-frame::before,
.qr-frame::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid var(--lime);
  border-radius: 3px;
}

.qr-frame::before {
  top: -6px;
  left: -6px;
  border-right: 0;
  border-bottom: 0;
}

.qr-frame::after {
  right: -6px;
  bottom: -6px;
  border-left: 0;
  border-top: 0;
}

.qr-mini {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  color: #0a1322;
}

.qr-mini svg {
  width: 100%;
  height: 100%;
}

.mailbox-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #c7d2e1;
  font-size: 0.72rem;
  font-weight: 650;
}

.mailbox-status strong {
  color: #ffffff;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(200, 241, 105, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(200, 241, 105, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(200, 241, 105, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(200, 241, 105, 0);
  }
}

.float-card {
  position: absolute;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.privacy-peek {
  left: -6px;
  top: 2px;
  width: 188px;
  padding: 14px;
  transform: rotate(-2deg);
}

.emergency-peek {
  right: -8px;
  bottom: -4px;
  width: 218px;
  padding: 15px;
  transform: rotate(2.2deg);
}

.peek-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.peek-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.peek-title .icon {
  width: 15px;
  height: 15px;
  color: var(--brand);
}

.peek-badge {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.6rem;
  font-weight: 800;
}

.peek-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.peek-row:first-of-type {
  border-top: 0;
}

.peek-icon {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--ink-soft);
  flex: none;
}

.peek-icon .icon {
  width: 16px;
  height: 16px;
}

.peek-copy {
  min-width: 0;
}

.peek-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peek-copy span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
}

.peek-icon.red {
  background: var(--coral-soft);
  color: #c22f2f;
}

[data-theme="dark"] .peek-icon.red {
  color: #ff9a9a;
}

/* Trust strip */
.trust-strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 19px 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.trust-item .icon {
  width: 19px;
  height: 19px;
  color: var(--brand);
}

/* Sections */
.section {
  padding: clamp(64px, 8vw, 112px) 0;
}

.section.tight {
  padding-top: clamp(38px, 5vw, 64px);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(30px, 4vw, 52px);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--brand);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.section-head h2 {
  margin-bottom: 16px;
  font-size: clamp(2.05rem, 3.6vw, 3.5rem);
  letter-spacing: -0.05em;
}

.section-head .lead {
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.65;
}

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

.step {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -36px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--brand-soft);
  opacity: 0.6;
}

.step-num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  border-radius: 15px;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}

.step h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.step p {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.6;
}

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

.feature-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.feature-icon.amber {
  background: var(--amber-soft);
  color: #a96910;
}

.feature-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.feature-icon.coral {
  background: var(--coral-soft);
  color: #c22f2f;
}

[data-theme="dark"] .feature-icon.amber {
  color: var(--amber);
}

[data-theme="dark"] .feature-icon.coral {
  color: #ff9a9a;
}

.feature-card h3 {
  margin-bottom: 7px;
  font-size: 1.06rem;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.privacy-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: clamp(28px, 5vw, 70px);
  padding: clamp(30px, 5vw, 58px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 12% 10%, rgba(200, 241, 105, 0.16), transparent 32%),
    linear-gradient(145deg, #0b1728, #07101c 70%);
  color: #f4f7ef;
  box-shadow: 0 34px 90px rgba(10, 19, 34, 0.26);
}

.privacy-panel::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(200, 241, 105, 0.15);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(200, 241, 105, 0.035),
    0 0 0 70px rgba(200, 241, 105, 0.025);
}

.privacy-panel .section-kicker {
  color: var(--lime);
}

.privacy-panel h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 3.3vw, 3.2rem);
  letter-spacing: -0.05em;
}

.privacy-panel .lead {
  color: #aab8ca;
  font-size: 0.98rem;
  line-height: 1.7;
}

.privacy-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.privacy-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.privacy-item .check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(200, 241, 105, 0.13);
  color: var(--lime);
  flex: none;
}

.privacy-item .check .icon {
  width: 15px;
  height: 15px;
}

.privacy-item strong {
  display: block;
  margin-bottom: 2px;
  color: #f5f8ef;
  font-size: 0.9rem;
}

.privacy-item span {
  display: block;
  color: #a8b5c7;
  font-size: 0.78rem;
  line-height: 1.5;
}

.cta-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(30px, 5vw, 58px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 20%, rgba(200, 241, 105, 0.3), transparent 30%),
    linear-gradient(135deg, #0f786f, #084b47 68%);
  color: #ffffff;
  box-shadow: 0 30px 80px rgba(14, 124, 114, 0.28);
}

.cta-panel h2 {
  max-width: 650px;
  margin-bottom: 10px;
  font-size: clamp(1.9rem, 3vw, 3rem);
  letter-spacing: -0.05em;
}

.cta-panel p {
  max-width: 590px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.96rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: none;
}

.cta-panel .btn-primary {
  background: #ffffff;
  color: #0a1322;
}

.cta-panel .btn-ghost {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.cta-panel .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

/* Footer */
.site-footer {
  margin-top: clamp(60px, 7vw, 100px);
  padding: 52px 0 28px;
  background: #07101c;
  color: #dbe4ef;
}

[data-theme="dark"] .site-footer {
  background: #040912;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.7fr;
  gap: 40px;
}

.footer-brand .brand {
  color: #ffffff;
}

.footer-brand .brand-mark {
  background: rgba(255, 255, 255, 0.08);
  color: var(--lime);
  box-shadow: none;
}

.footer-brand p {
  max-width: 310px;
  margin-top: 16px;
  color: #8e9daf;
  font-size: 0.84rem;
  line-height: 1.65;
}

.footer-col h3,
.footer-col h4 {
  margin-bottom: 13px;
  color: #ffffff;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #8e9daf;
  font-size: 0.84rem;
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: var(--lime);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #728196;
  font-size: 0.74rem;
}

.footer-bottom .disclaimer {
  max-width: 720px;
}

.footer-bottom strong {
  color: #c9d4e2;
}

/* Dashboard */
.dashboard-body {
  min-height: 100vh;
  background: var(--paper);
}

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px;
  background: #091321;
  color: #e7eef8;
}

[data-theme="dark"] .sidebar {
  background: #060c15;
  border-right: 1px solid var(--line);
}

.sidebar .brand {
  padding: 4px 6px;
  color: #ffffff;
}

.sidebar .brand-mark {
  background: rgba(255, 255, 255, 0.08);
  color: var(--lime);
  box-shadow: none;
}

.sidebar .brand-text small {
  color: #78899f;
}

.side-label {
  padding: 0 10px;
  color: #8395ab;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 12px;
  color: #9cabbf;
  font-size: 0.87rem;
  font-weight: 650;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.side-link .icon {
  width: 18px;
  height: 18px;
  opacity: 0.9;
}

.side-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.side-link.is-active {
  background: rgba(200, 241, 105, 0.11);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(200, 241, 105, 0.14);
}

.side-link.is-active .icon {
  color: var(--lime);
}

.sidebar-foot {
  margin-top: auto;
  padding: 15px;
  border: 1px solid rgba(200, 241, 105, 0.16);
  border-radius: 16px;
  background: rgba(200, 241, 105, 0.055);
}

.sidebar-foot-title {
  margin-bottom: 6px;
  color: #f3f7ee;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sidebar-foot p {
  color: #8fa0b4;
  font-size: 0.72rem;
  line-height: 1.55;
}

.sidebar-foot .btn {
  margin-top: 12px;
  width: 100%;
  background: var(--lime);
  color: #0a1322;
  box-shadow: none;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-user .avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(200, 241, 105, 0.12);
  color: var(--lime);
  font-size: 0.8rem;
}

.side-user strong {
  display: block;
  color: #eef4fb;
  font-size: 0.78rem;
}

.side-user span {
  display: block;
  color: #75869b;
  font-size: 0.66rem;
}

.main {
  min-width: 0;
  padding: 26px clamp(18px, 3vw, 42px) 64px;
}

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

.page-title h1 {
  margin: 0 0 4px;
  font-size: clamp(1.7rem, 2.4vw, 2.25rem);
  letter-spacing: -0.045em;
}

.page-title p {
  color: var(--muted);
  font-size: 0.84rem;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 750;
  box-shadow: var(--shadow-sm);
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #23b26d;
  box-shadow: 0 0 0 4px rgba(35, 178, 109, 0.12);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand-soft);
  opacity: 0.65;
}

.metric-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink-soft);
}

.metric-icon .icon {
  width: 18px;
  height: 18px;
}

.metric-icon.red {
  background: var(--coral-soft);
  color: #c22f2f;
}

[data-theme="dark"] .metric-icon.red {
  color: #ff9a9a;
}

.metric-icon.amber {
  background: var(--amber-soft);
  color: #a96910;
}

[data-theme="dark"] .metric-icon.amber {
  color: var(--amber);
}

.metric-value {
  position: relative;
  z-index: 1;
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-label {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-grid > *,
.quick-grid,
.quick-card,
.access-card,
.access-card > * {
  min-width: 0;
}

.panel-pad {
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -0.025em;
}

.panel-title .icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.panel-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 750;
}

.panel-link .icon {
  width: 14px;
  height: 14px;
}

.completeness {
  display: flex;
  align-items: center;
  gap: 20px;
}

.score-ring {
  --score: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(
    var(--brand) calc(var(--score) * 1%),
    var(--surface-2) 0
  );
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--surface);
}

.score-ring span {
  position: relative;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.completeness-copy h3 {
  margin-bottom: 5px;
  font-size: 1rem;
}

.completeness-copy p {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.progress {
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #44d6b9);
  transition: width 0.6s ease;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.quick-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.quick-card .icon {
  grid-row: 1 / 3;
  width: 20px;
  height: 20px;
  color: var(--brand);
}

.quick-card strong {
  font-size: 0.78rem;
  line-height: 1.3;
}

.quick-card span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.person-row,
.pet-row,
.hazard-row,
.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.person-row:first-child,
.pet-row:first-child,
.hazard-row:first-child,
.contact-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.person-row:last-child,
.pet-row:last-child,
.hazard-row:last-child,
.contact-row:last-child {
  padding-bottom: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: none;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
}

.person-main,
.pet-main,
.hazard-main {
  flex: 1;
  min-width: 0;
}

.person-main h3,
.pet-main h3,
.hazard-main h3 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.person-main p,
.pet-main p,
.hazard-main p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.person-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.67rem;
  font-weight: 750;
  line-height: 1.2;
}

.tag .icon {
  width: 12px;
  height: 12px;
}

.tag-red {
  background: var(--coral-soft);
  color: #b62c2c;
}

[data-theme="dark"] .tag-red {
  color: #ff9a9a;
}

.tag-amber {
  background: var(--amber-soft);
  color: #9b5c06;
}

[data-theme="dark"] .tag-amber {
  color: var(--amber);
}

.tag-green {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.tag-blue {
  background: var(--blue-soft);
  color: #3059c9;
}

[data-theme="dark"] .tag-blue {
  color: var(--blue);
}

.tag-neutral {
  background: var(--surface-2);
  color: var(--muted);
}

.row-actions {
  display: flex;
  gap: 2px;
  flex: none;
}

.row-actions .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.row-actions .icon-btn .icon {
  width: 15px;
  height: 15px;
}

.empty-state {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.empty-state .icon {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  opacity: 0.5;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 24px;
}

.kv {
  min-width: 0;
}

.kv-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kv-value {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.kv-value.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.77rem;
  line-height: 1.55;
}

.notice .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: none;
}

.notice-amber {
  border-color: rgba(231, 154, 46, 0.25);
  background: var(--amber-soft);
  color: #7d4c04;
}

[data-theme="dark"] .notice-amber {
  color: #f4c77d;
}

.notice-green {
  border-color: rgba(14, 124, 114, 0.2);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.notice-info {
  border-color: rgba(77, 123, 243, 0.2);
  background: var(--blue-soft);
  color: #3059c9;
}

[data-theme="dark"] .notice-info {
  color: var(--blue);
}

.hazard-row .hazard-severity {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--amber-soft);
  color: #a96910;
}

[data-theme="dark"] .hazard-row .hazard-severity {
  color: var(--amber);
}

.hazard-row.high .hazard-severity {
  background: var(--coral-soft);
  color: #c22f2f;
}

[data-theme="dark"] .hazard-row.high .hazard-severity {
  color: #ff9a9a;
}

.audit-list {
  display: grid;
  gap: 0;
}

.audit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.74rem;
}

.audit-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.audit-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: none;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
}

.audit-icon .icon {
  width: 14px;
  height: 14px;
}

.audit-copy strong {
  display: block;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.audit-copy span {
  color: var(--muted);
  font-size: 0.68rem;
}

.section-anchor {
  scroll-margin-top: 24px;
}

.dashboard-section {
  margin-top: 14px;
}

.access-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.code-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.code-box.is-masked {
  letter-spacing: 0.18em;
}

/* Modal & forms */
dialog.modal {
  width: min(680px, calc(100vw - 28px));
  max-height: min(88vh, 820px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 120px rgba(4, 10, 20, 0.35);
}

dialog.modal::backdrop {
  background: rgba(4, 10, 20, 0.58);
  backdrop-filter: blur(5px);
}

.modal-form {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 820px);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 21px 24px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 1.24rem;
}

.modal-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.modal-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  padding: 24px;
  overflow: auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-span {
  grid-column: 1 / -1;
}

.field label {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 750;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.85rem;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.field .hint {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.field-check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding-top: 22px;
}

.field-check input {
  width: 19px;
  height: 19px;
  accent-color: var(--brand);
}

.field-check label {
  font-size: 0.82rem;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}

/* Toast */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 0.8rem;
  animation: toast-in 0.25s ease both;
}

.toast .icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
  flex: none;
}

.toast.error .icon {
  color: var(--coral);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* QR page */
.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.subpage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.back-link:hover {
  color: var(--ink);
}

.back-link .icon {
  width: 17px;
  height: 17px;
}

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

.page-intro {
  margin-bottom: 24px;
}

.page-intro h1 {
  margin-bottom: 7px;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.page-intro p {
  max-width: 650px;
  color: var(--muted);
  font-size: 0.9rem;
}

.qr-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.qr-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.qr-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  font-size: 1.08rem;
}

.qr-card h2 .icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.qr-card > p {
  color: var(--muted);
  font-size: 0.75rem;
}

.qr-box {
  display: grid;
  place-items: center;
  width: min(230px, 100%);
  aspect-ratio: 1;
  margin: 20px auto;
  padding: 15px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(10, 19, 34, 0.08);
}

.qr-box svg {
  width: 100%;
  height: 100%;
}

.qr-url {
  display: block;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.67rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.qr-actions .btn {
  flex: 1;
  min-width: 92px;
}

.base-url-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin: 18px 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.base-url-box label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.base-url-box input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.8rem;
}

.plaque-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.plaque-preview {
  overflow: hidden;
  border-radius: 18px;
  background: #0a1322;
  box-shadow: var(--shadow-sm);
}

.plaque {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 105 / 148;
  padding: 8%;
  background:
    radial-gradient(circle at 86% 12%, rgba(200, 241, 105, 0.18), transparent 27%),
    linear-gradient(150deg, #122237 0%, #08111e 68%);
  color: #ffffff;
  overflow: hidden;
}

.plaque::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -18%;
  width: 50%;
  aspect-ratio: 1;
  border: 2px solid rgba(200, 241, 105, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(200, 241, 105, 0.035);
}

.plaque-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7%;
}

.plaque-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(0.55rem, 1.6vw, 0.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.plaque-brand .brand-mark {
  width: clamp(22px, 4vw, 34px);
  height: clamp(22px, 4vw, 34px);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--lime);
  box-shadow: none;
}

.plaque-brand .icon {
  width: 58%;
  height: 58%;
}

.plaque-id {
  color: #93a4b9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(0.45rem, 1.2vw, 0.65rem);
}

.plaque-kicker {
  position: relative;
  z-index: 1;
  margin-bottom: 4%;
  color: var(--lime);
  font-size: clamp(0.45rem, 1.25vw, 0.67rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.plaque-title {
  position: relative;
  z-index: 1;
  max-width: 92%;
  margin-bottom: 5%;
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.2vw, 1.7rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.plaque-title span {
  color: var(--lime);
}

.plaque-qr-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 58%;
  margin: auto;
  padding: 6%;
  border-radius: 7%;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.plaque-qr {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  color: #0a1322;
}

.plaque-qr svg {
  width: 100%;
  height: 100%;
}

.plaque-bottom {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 6%;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

.plaque-instruction {
  color: #d9e4f0;
  font-size: clamp(0.45rem, 1.2vw, 0.65rem);
  font-weight: 650;
  line-height: 1.4;
}

.plaque-instruction strong {
  color: #ffffff;
}

.plaque-emergency {
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 91, 91, 0.2), transparent 30%),
    linear-gradient(150deg, #28151a 0%, #13090d 70%);
}

.plaque-emergency .plaque-kicker,
.plaque-emergency .plaque-title span {
  color: #ff9a9a;
}

.plaque-emergency .plaque-qr-wrap {
  width: 62%;
}

.print-sheet {
  display: none;
}

.print-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

/* Public status */
.status-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 15% 10%, rgba(200, 241, 105, 0.22), transparent 30%),
    radial-gradient(circle at 88% 24%, rgba(14, 124, 114, 0.18), transparent 28%),
    var(--paper);
}

.status-head {
  padding: 22px 0;
}

.status-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 28px 20px 64px;
}

.status-card {
  width: min(570px, 100%);
  padding: clamp(26px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.status-shield {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 0 auto 20px;
  border-radius: 27px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  box-shadow: 0 14px 30px var(--brand-glow);
}

.status-shield .icon {
  width: 46px;
  height: 46px;
}

.status-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.status-card h1 {
  margin-bottom: 12px;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  letter-spacing: -0.05em;
}

.status-card > p {
  max-width: 430px;
  margin-inline: auto;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.status-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.status-id {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 650;
}

.status-date {
  color: var(--muted);
  font-size: 0.72rem;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.emergency-call {
  background: #c53030;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(197, 48, 48, 0.25);
}

.emergency-call:hover {
  background: #b3262b;
}

.notice-box {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-2);
  text-align: left;
}

.notice-box h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.notice-box h2 .icon {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

.notice-box p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.status-foot {
  padding: 22px 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.7rem;
}

.status-foot strong {
  color: var(--ink-soft);
}

/* Emergency view */
.emergency-body {
  --em-ink: #0a1322;
  --em-soft: #313c4e;
  --em-muted: #5b6679;
  --em-line: rgba(10, 19, 34, 0.11);
  --em-paper: #f1f4ed;
  --em-surface: #ffffff;
  --em-red: #c53030;
  --em-red-soft: #fff0f0;
  --em-amber: #8a5308;
  --em-amber-soft: #fff3d8;
  --em-green: #0e7c72;
  --em-green-soft: #e0f4ea;
  min-height: 100vh;
  background: var(--em-paper);
  color: var(--em-ink);
}

.emergency-top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #091321;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(4, 10, 20, 0.22);
}

.emergency-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  padding-block: 10px;
}

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

.emergency-brand .brand-mark {
  background: rgba(255, 255, 255, 0.08);
  color: var(--lime);
  box-shadow: none;
}

.emergency-brand-copy {
  min-width: 0;
}

.emergency-brand-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.emergency-brand-copy span {
  display: block;
  overflow: hidden;
  color: #8fa1b7;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emergency-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.emergency-actions .btn-ghost {
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.emergency-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

.lang-btn {
  min-width: 40px;
  padding-inline: 10px;
  font-size: 0.74rem;
  font-weight: 800;
}

.emergency-main {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
  padding: 22px 0 52px;
}

.emergency-hero {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--em-line);
  border-radius: 24px;
  background: var(--em-surface);
  box-shadow: 0 10px 32px rgba(10, 19, 34, 0.06);
}

.emergency-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.emergency-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--em-red);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.emergency-kicker .pulse-dot {
  background: var(--em-red);
  box-shadow: none;
  animation: none;
}

.emergency-title {
  margin-bottom: 5px;
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  letter-spacing: -0.055em;
}

.emergency-address {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--em-muted);
  font-size: 0.82rem;
}

.emergency-address .icon {
  width: 15px;
  height: 15px;
}

.emergency-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.emergency-meta .tag {
  background: var(--em-paper);
  color: var(--em-soft);
}

.emergency-call-btn {
  padding: 12px 16px;
  border-radius: 13px;
  background: var(--em-red);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(197, 48, 48, 0.22);
}

.emergency-call-btn:hover {
  background: #b3262b;
}

.emergency-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(169, 105, 16, 0.22);
  border-radius: 12px;
  background: var(--em-amber-soft);
  color: #774807;
  font-size: 0.78rem;
  line-height: 1.5;
}

.emergency-alert .icon {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.summary-card {
  padding: 15px;
  border: 1px solid var(--em-line);
  border-radius: 15px;
  background: var(--em-surface);
}

.summary-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.summary-label {
  display: block;
  margin-top: 5px;
  color: var(--em-muted);
  font-size: 0.69rem;
  font-weight: 700;
}

.emergency-section {
  margin-top: 24px;
}

.emergency-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.emergency-section-head h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.emergency-section-head span {
  color: var(--em-muted);
  font-size: 0.7rem;
  font-weight: 650;
}

.person-card {
  padding: 20px;
  border: 1px solid var(--em-line);
  border-left: 6px solid var(--em-green);
  border-radius: 18px;
  background: var(--em-surface);
  box-shadow: 0 8px 24px rgba(10, 19, 34, 0.04);
}

.person-card + .person-card {
  margin-top: 10px;
}

.person-card.bedridden {
  border-left-color: var(--em-red);
}

.person-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.person-name {
  margin: 0;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
}

.person-role {
  margin-top: 2px;
  color: var(--em-muted);
  font-size: 0.74rem;
}

.person-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.room-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(229, 72, 77, 0.16);
  border-radius: 12px;
  background: var(--em-red-soft);
}

.room-callout .icon {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--em-red);
  flex: none;
}

.room-label {
  display: block;
  margin-bottom: 2px;
  color: #a73338;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.room-value {
  display: block;
  color: #741f23;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.35;
}

.room-sub {
  display: block;
  margin-top: 2px;
  color: #873a3e;
  font-size: 0.72rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin-top: 16px;
}

.info-item {
  min-width: 0;
}

.info-label {
  display: block;
  margin-bottom: 2px;
  color: var(--em-muted);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.info-value {
  display: block;
  color: var(--em-soft);
  font-size: 0.87rem;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pet-grid,
.hazard-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pet-card,
.hazard-card,
.contact-card {
  padding: 16px;
  border: 1px solid var(--em-line);
  border-radius: 15px;
  background: var(--em-surface);
}

.pet-card header,
.hazard-card header,
.contact-card header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 9px;
}

.pet-icon,
.hazard-icon,
.contact-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: var(--em-green-soft);
  color: var(--em-green);
}

.hazard-icon {
  background: var(--em-amber-soft);
  color: var(--em-amber);
}

.contact-icon {
  background: #e9edff;
  color: #405fc7;
}

.pet-icon .icon,
.hazard-icon .icon,
.contact-icon .icon {
  width: 18px;
  height: 18px;
}

.pet-card h3,
.hazard-card h3,
.contact-card h3 {
  margin: 0;
  font-size: 0.93rem;
  letter-spacing: -0.02em;
}

.pet-card header p,
.hazard-card header p,
.contact-card header p {
  margin-top: 2px;
  color: var(--em-muted);
  font-size: 0.7rem;
}

.mini-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-list li {
  display: flex;
  gap: 7px;
  color: var(--em-soft);
  font-size: 0.76rem;
  line-height: 1.45;
}

.mini-list strong {
  color: var(--em-ink);
  font-weight: 750;
}

.hazard-card.high {
  border-color: rgba(229, 72, 77, 0.18);
}

.severity {
  margin-left: auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--em-amber-soft);
  color: var(--em-amber);
  font-size: 0.59rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hazard-card.high .severity {
  background: var(--em-red-soft);
  color: #b62c2c;
}

.access-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--em-line);
  border-radius: 18px;
  background: var(--em-surface);
}

.access-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 1.08rem;
}

.access-card h2 .icon {
  width: 19px;
  height: 19px;
  color: var(--em-green);
}

.access-card p {
  color: var(--em-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.emergency-code {
  min-width: 142px;
  padding: 14px 18px;
  border: 1px dashed rgba(10, 19, 34, 0.22);
  border-radius: 14px;
  background: var(--em-paper);
  text-align: center;
}

.emergency-code span {
  display: block;
  margin-bottom: 3px;
  color: var(--em-muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.emergency-code strong {
  display: block;
  color: var(--em-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.5rem;
  letter-spacing: 0.12em;
}

.emergency-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--em-line);
  color: var(--em-muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.emergency-footer strong {
  color: var(--em-ink);
}

.emergency-empty {
  padding: 42px 20px;
  border: 1px solid var(--em-line);
  border-radius: 20px;
  background: var(--em-surface);
  text-align: center;
}

.emergency-empty .icon {
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  color: var(--em-red);
}

.emergency-empty h2 {
  margin-bottom: 7px;
}

.emergency-empty p {
  max-width: 440px;
  margin: 0 auto 18px;
  color: var(--em-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

/* Auth */
.auth-shell {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 58px);
  background:
    radial-gradient(circle at 18% 18%, rgba(200, 241, 105, 0.2), transparent 30%),
    linear-gradient(150deg, #0c1a2c 0%, #07101c 70%);
  color: #ffffff;
}

.auth-visual::after {
  content: "";
  position: absolute;
  right: -16%;
  bottom: -22%;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid rgba(200, 241, 105, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 32px rgba(200, 241, 105, 0.035),
    0 0 0 70px rgba(200, 241, 105, 0.022);
}

.auth-visual .brand {
  position: relative;
  z-index: 1;
  color: #ffffff;
}

.auth-visual .brand-mark {
  background: rgba(255, 255, 255, 0.08);
  color: var(--lime);
  box-shadow: none;
}

.auth-quote {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.auth-quote .eyebrow {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #dbe6f3;
  box-shadow: none;
}

.auth-quote h1 {
  margin: 14px 0 16px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  letter-spacing: -0.055em;
}

.auth-quote h1 span {
  color: var(--lime);
}

.auth-quote p {
  max-width: 420px;
  color: #a5b4c7;
  font-size: 0.96rem;
  line-height: 1.65;
}

.auth-points {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  color: #8e9fb4;
  font-size: 0.76rem;
}

.auth-point {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-point .icon {
  width: 15px;
  height: 15px;
  color: var(--lime);
}

.auth-form-wrap {
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: var(--paper);
}

.auth-card {
  width: min(420px, 100%);
}

.auth-card .btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-card h2 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.auth-card > p {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 13px;
}

.auth-form .field input {
  padding: 12px 13px;
  background: var(--surface);
}

.auth-note {
  margin-top: 18px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

/* Legal */
.legal-page {
  min-height: 100vh;
  padding-bottom: 60px;
}

.legal-shell {
  width: min(900px, calc(100% - 40px));
  margin-inline: auto;
}

.legal-hero {
  padding: 44px 0 26px;
}

.legal-hero h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.legal-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-card {
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.legal-card h2 {
  margin: 30px 0 9px;
  font-size: 1.24rem;
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-card h3 {
  margin: 22px 0 7px;
  font-size: 1rem;
}

.legal-card p,
.legal-card li {
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.7;
}

.legal-card ul {
  padding-left: 20px;
}

.legal-card li + li {
  margin-top: 5px;
}

.legal-card .notice {
  margin-bottom: 24px;
}

/* Reveal animation */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-2);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

/* Responsive */
@media (max-width: 1120px) {
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 14px 20px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .nav-link {
    padding: 12px 13px;
    border-radius: 11px;
  }

  .menu-btn {
    display: inline-grid;
  }
}

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 780px;
  }

  .hero-stage {
    min-height: 500px;
    width: min(580px, 100%);
    margin-inline: auto;
  }

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

  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .privacy-panel {
    grid-template-columns: 1fr;
  }

  .privacy-panel .lead {
    max-width: 650px;
  }
}

@media (max-width: 900px) {
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 14px 20px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .nav-link {
    padding: 12px 13px;
    border-radius: 11px;
  }

  .menu-btn {
    display: inline-grid;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px 14px 10px;
    gap: 12px;
  }

  .sidebar .brand {
    padding: 2px 4px;
  }

  .side-label {
    display: none;
  }

  .side-nav {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .side-link {
    flex: none;
    padding: 8px 11px;
    font-size: 0.8rem;
  }

  .side-link .icon {
    width: 16px;
    height: 16px;
  }

  .sidebar-foot,
  .side-user {
    display: none;
  }

  .main {
    padding-top: 20px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-stage {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 18px;
  }

  .hero-halo {
    top: 6%;
    width: 92%;
  }

  .mailbox-card {
    transform: none;
  }

  .privacy-peek,
  .emergency-peek {
    position: relative;
    inset: auto;
    width: min(100%, 330px);
    margin: 10px auto 0;
    transform: none;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 330px;
    padding: 30px;
  }

  .auth-visual::after {
    display: none;
  }

  .auth-quote h1 {
    font-size: 2.2rem;
  }

  .auth-points {
    display: none;
  }

  .qr-layout {
    grid-template-columns: 1fr;
  }

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

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .cta-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 70px;
  }

  .container {
    width: min(100% - 28px, 1200px);
  }

  .nav-actions .btn-ghost,
  .nav-actions .btn-primary {
    display: none;
  }

  .hero {
    padding-top: 38px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  .hero h1 em {
    white-space: normal;
  }

  .hero-stage {
    min-height: 460px;
  }

  .mailbox-card {
    width: min(330px, 82%);
  }

  .privacy-peek,
  .emergency-peek {
    inset: auto;
    width: min(100%, 330px);
  }

  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .steps,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .section-head h2 {
    font-size: 2.1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .status-card {
    border-radius: 24px;
  }

  .emergency-top .container {
    align-items: flex-start;
  }

  .emergency-brand-copy span {
    max-width: 150px;
  }

  .emergency-actions .btn-ghost span {
    display: none;
  }

  .emergency-actions .btn-ghost {
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .emergency-hero-top {
    flex-direction: column;
  }

  .emergency-meta {
    justify-content: flex-start;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .access-card {
    grid-template-columns: 1fr;
  }

  .emergency-code {
    justify-self: start;
  }

  .pet-grid,
  .hazard-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .person-head {
    flex-direction: column;
  }

  .person-badges {
    justify-content: flex-start;
  }

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

  .modal-body {
    grid-template-columns: 1fr;
  }

  .field-span {
    grid-column: auto;
  }

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

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

  .base-url-box {
    grid-template-columns: 1fr;
  }

  .base-url-box .btn {
    width: 100%;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .page-title h1 {
    font-size: 1.65rem;
  }

  .completeness {
    flex-direction: column;
    align-items: flex-start;
  }

  .plaque {
    border-radius: 14px;
  }
}

@media (max-width: 520px) {
  .hero-actions .btn {
    width: 100%;
  }

  .hero-meta {
    gap: 10px 16px;
  }

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

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    padding: 14px;
  }

  .metric-value {
    font-size: 1.7rem;
  }

  .panel-pad {
    padding: 17px;
  }

  .person-row,
  .pet-row,
  .hazard-row {
    gap: 10px;
  }

  .row-actions {
    flex-direction: column;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .emergency-main {
    width: min(100% - 20px, 1120px);
  }

  .emergency-hero {
    padding: 18px;
  }

  .person-card {
    padding: 16px;
  }

  .privacy-peek,
  .emergency-peek {
    position: relative;
    inset: auto;
    width: min(100%, 300px);
    margin: 10px auto 0;
    transform: none;
  }

  .hero-stage {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 18px;
  }

  .hero-halo {
    top: 6%;
    width: 92%;
  }

  .mailbox-card {
    transform: none;
  }

  .toast-stack {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 17px;
    padding-right: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Print */
@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .no-print,
  .skip-link,
  .site-header,
  .site-footer,
  .toast-stack {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .print-sheet {
    display: flex !important;
    gap: 8mm;
    align-items: flex-start;
  }

  .print-sheet .plaque {
    width: 105mm;
    height: 148mm;
    border-radius: 4mm;
    break-inside: avoid;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .print-sheet .plaque * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .emergency-body {
    background: #ffffff !important;
  }

  .emergency-top,
  .emergency-footer .no-print,
  .emergency-alert.no-print,
  .emergency-actions,
  .emergency-call-btn {
    display: none !important;
  }

  .emergency-main {
    width: 100%;
    padding: 0;
  }

  .emergency-hero,
  .person-card,
  .pet-card,
  .hazard-card,
  .contact-card,
  .access-card,
  .summary-card {
    box-shadow: none !important;
    break-inside: avoid;
  }

  .emergency-section {
    break-inside: avoid;
  }

  .summary-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pet-grid,
  .hazard-grid,
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.print-only {
  display: none;
}
