:root {
  color-scheme: light;
  --ink: #13243a;
  --muted: #637187;
  --line: #d9e1ea;
  --paper: #f4f7fa;
  --surface: rgba(255, 255, 255, 0.94);
  --brand: #1768e4;
  --brand-dark: #0d4fad;
  --safe: #147a5b;
  --expired: #a2473d;
  --shadow: 0 28px 80px rgba(23, 48, 82, 0.14);
  --radius: 8px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    repeating-linear-gradient(90deg, rgba(19, 36, 58, 0.025) 0, rgba(19, 36, 58, 0.025) 1px, transparent 1px, transparent 48px),
    repeating-linear-gradient(0deg, rgba(19, 36, 58, 0.018) 0, rgba(19, 36, 58, 0.018) 1px, transparent 1px, transparent 48px),
    var(--paper);
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--brand-dark);
  border-radius: 6px;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.share-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 72px) 20px;
}

.share-shell--home { padding-block: clamp(32px, 7vw, 84px); }

.share-card {
  position: relative;
  width: min(100%, 680px);
  overflow: hidden;
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid rgba(19, 36, 58, 0.12);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.share-card--home { width: min(100%, 760px); }

.share-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--brand) 0 68%, var(--safe) 68% 100%);
}

.share-card::after {
  content: "SLP / VERIFIED ROUTE";
  position: absolute;
  top: 30px;
  right: -56px;
  width: 220px;
  padding: 8px 0;
  color: rgba(19, 36, 58, 0.42);
  border-block: 1px solid rgba(19, 36, 58, 0.08);
  font: 600 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.13em;
  text-align: center;
  transform: rotate(45deg);
}

.share-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 34px;
  font-weight: 760;
  letter-spacing: 0;
}

.share-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(23, 104, 228, 0.24);
}

.share-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.share-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.share-status--valid { color: var(--safe); background: #eaf7f2; }
.share-status--valid::before { box-shadow: 0 0 0 4px rgba(20, 122, 91, 0.13); }
.share-status--expired { color: var(--expired); background: #fff0ed; }
.share-status--expired::before { box-shadow: 0 0 0 4px rgba(162, 71, 61, 0.13); }

h1 {
  max-width: 13ch;
  margin: 20px 0 14px;
  font-size: clamp(34px, 7vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

.share-lead {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2.5vw, 18px);
  line-height: 1.75;
}

.share-route {
  display: grid;
  gap: 0;
  margin: 32px 0;
  border-block: 1px solid var(--line);
}

.share-route > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.share-route > div:last-child { border-bottom: 0; }

.share-route dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.share-route dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font: 600 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.share-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 32px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.share-principles article {
  min-height: 116px;
  padding: 20px;
  background: var(--surface);
}

.share-principles strong,
.share-principles span { display: block; }

.share-principles strong { margin-bottom: 9px; font-size: 15px; }
.share-principles span { color: var(--muted); font-size: 13px; line-height: 1.6; }

.share-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 14px 28px rgba(23, 104, 228, 0.22);
  font-size: 16px;
  font-weight: 720;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.share-action:hover {
  background: var(--brand-dark);
  box-shadow: 0 18px 34px rgba(23, 104, 228, 0.28);
  transform: translateY(-2px);
}

.share-action:focus-visible {
  outline: 3px solid rgba(23, 104, 228, 0.28);
  outline-offset: 4px;
}

.share-safety {
  margin: 26px 0 0;
  padding-top: 20px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  font-size: 13px;
  line-height: 1.75;
}

.share-safety strong { color: var(--ink); font-weight: 680; overflow-wrap: anywhere; }

@media (max-width: 540px) {
  .share-shell { align-items: start; padding: 16px; }
  .share-card { padding: 28px 22px; border-radius: 8px; }
  .share-card::after { display: none; }
  .share-brand { margin-bottom: 28px; }
  h1 { font-size: clamp(32px, 11vw, 44px); }
  .share-route > div { grid-template-columns: 1fr; gap: 5px; }
  .share-principles { grid-template-columns: 1fr; }
  .share-principles article { min-height: 0; }
  .share-action { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .share-action { transition: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #edf4ff;
    --muted: #a6b4c8;
    --line: #314056;
    --paper: #0d1520;
    --surface: rgba(18, 29, 43, 0.95);
    --brand: #5596ff;
    --brand-dark: #76aaff;
    --safe: #62d3ae;
    --expired: #ff9187;
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  }
  body {
    background:
      repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 48px),
      repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.014) 0, rgba(255, 255, 255, 0.014) 1px, transparent 1px, transparent 48px),
      var(--paper);
  }
  .share-status--valid { background: rgba(98, 211, 174, 0.1); }
  .share-status--expired { background: rgba(255, 145, 135, 0.1); }
  .share-action { color: #07111f; }
}
