:root {
  --bg: #f6f6f2;
  --surface: #ffffff;
  --surface-soft: #efefe9;
  --ink: #101113;
  --muted: #66686f;
  --line: rgba(16, 17, 19, 0.12);
  --dark: #111214;
  --cyan: #25d9cf;
  --cyan-dark: #087f79;
  --rose: #ff3d6e;
  --rose-soft: #ffe8ef;
  --container: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 8% 3%, rgba(37, 217, 207, 0.12), transparent 24rem),
    radial-gradient(circle at 96% 12%, rgba(255, 61, 110, 0.09), transparent 26rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

a,
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid rgba(37, 217, 207, 0.72);
  outline-offset: 4px;
}

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

.legal-header {
  position: sticky;
  z-index: 20;
  top: 0;
  padding: 12px 0;
}

.legal-nav {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 12px 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 42px rgba(16, 17, 19, 0.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.legal-brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.legal-brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--dark);
  box-shadow: 4px 4px 0 var(--cyan), -3px -3px 0 var(--rose);
}

.legal-brand-mark::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 11px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid white;
}

.legal-back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.legal-hero { padding: 76px 0 48px; }

.legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--cyan-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.legal-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.legal-hero p {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.legal-updated {
  display: inline-flex;
  margin-top: 22px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.legal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
  padding-bottom: 88px;
}

.legal-toc {
  position: sticky;
  top: 96px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.legal-toc strong {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-toc a {
  min-height: 38px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.legal-toc a:hover { color: var(--ink); }

.legal-document {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(16, 17, 19, 0.08);
}

.legal-section {
  padding: 34px 38px;
  border-bottom: 1px solid var(--line);
}

.legal-section:last-child { border-bottom: 0; }

.legal-section h2 {
  margin: 0 0 16px;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.legal-section h3 {
  margin: 24px 0 10px;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.legal-section p { margin: 0 0 14px; }
.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul,
.legal-section ol {
  display: grid;
  gap: 9px;
  margin: 14px 0;
  padding-left: 22px;
}

.legal-section li::marker { color: var(--cyan-dark); font-weight: 800; }

.legal-section a {
  color: var(--cyan-dark);
  font-weight: 720;
  overflow-wrap: anywhere;
}

.legal-callout {
  margin: 20px 0;
  padding: 17px 18px;
  border: 1px solid rgba(8, 127, 121, 0.18);
  border-radius: 16px;
  background: rgba(37, 217, 207, 0.09);
}

.legal-callout.is-warning {
  border-color: rgba(255, 61, 110, 0.20);
  background: var(--rose-soft);
}

.legal-callout strong { display: block; margin-bottom: 5px; }

.seller-card,
.contact-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.seller-card {
  padding: 20px;
  border-radius: 17px;
  background: var(--surface-soft);
}

.seller-card address { font-style: normal; }

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

.contact-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.contact-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.contact-card strong {
  display: block;
  font-size: 17px;
  line-height: 1.35;
}

.legal-form-copy {
  padding: 20px;
  border: 1px dashed rgba(16, 17, 19, 0.25);
  border-radius: 16px;
  background: var(--surface-soft);
  white-space: pre-line;
}

.legal-footer { padding: 34px 0 calc(46px + env(safe-area-inset-bottom)); }

.legal-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.legal-footer a { min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 760px) {
  html { scroll-padding-top: 16px; }
  .legal-container { width: min(calc(100% - 24px), var(--container)); }
  .legal-header {
    position: static;
    top: auto;
    padding: max(7px, env(safe-area-inset-top)) 0 4px;
  }
  .legal-nav { min-height: 54px; padding: 5px 8px 5px 10px; border-radius: 18px; }
  .legal-brand { font-size: 15px; }
  .legal-brand-mark { width: 27px; height: 27px; }
  .legal-brand-mark::before { top: 7px; left: 10px; }
  .legal-back { padding-inline: 13px; font-size: 11px; }
  .legal-hero { padding: 44px 0 32px; }
  .legal-hero h1 { font-size: clamp(36px, 11vw, 52px); overflow-wrap: anywhere; }
  .legal-hero p { font-size: 15px; }
  .legal-layout { grid-template-columns: 1fr; gap: 20px; padding-bottom: 58px; }
  .legal-toc { position: static; padding: 16px; }
  .legal-toc div { display: flex; flex-wrap: wrap; gap: 6px; }
  .legal-toc a {
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
  }
  .legal-document { border-radius: 22px; }
  .legal-section { padding: 27px 18px; }
  .legal-section h2 { font-size: 22px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { min-height: 0; }
  .legal-footer-inner { grid-template-columns: 1fr; gap: 12px; }
  .legal-footer-links { justify-content: flex-start; }
}

@media (max-width: 390px) {
  .legal-brand span:last-child { display: none; }
  .legal-back { padding-inline: 11px; }
}

@media print {
  body { background: white; }
  .legal-header,
  .legal-toc,
  .legal-footer { display: none; }
  .legal-hero { padding-top: 0; }
  .legal-layout { display: block; }
  .legal-document { border: 0; box-shadow: none; }
  .legal-section { padding-inline: 0; }
}
