
:root {
  --bg: #f4f4f2;
  --surface: #ffffff;
  --surface-soft: #f8f8f6;

  --text: #151515;
  --muted: #5f636c;
  --muted-light: #767b84;

  --line: #d9dce1;
  --line-soft: rgba(17, 17, 17, 0.08);

  --accent: #f28c28;
  --accent-dark: #cf6e0d;
  --accent-soft: #fff4e8;

  --success: #087a55;
  --success-soft: #edf9f4;

  --danger: #b42318;
  --danger-soft: #fff2f0;

  --shadow:
    0 18px 45px rgba(16, 24, 40, 0.08);

  --shadow-small:
    0 10px 28px rgba(16, 24, 40, 0.07);

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;

  --container: 1020px;
}


/* =========================================================
   02. RESET
   ========================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

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

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

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


.top {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(244, 244, 242, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(calc(100% - 28px), var(--container));
  min-height: 70px;
  margin: 0 auto;
}

.brand {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 750;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.back::before {
  content: "←";
  font-size: 1rem;
}

.back:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 17, 17, 0.2);
  background: #ffffff;
}

.back:focus-visible,
.brand:focus-visible {
  outline: 3px solid rgba(242, 140, 40, 0.25);
  outline-offset: 3px;
}


.legal {
  width: min(calc(100% - 28px), var(--container));
  margin: 42px auto;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal > *:first-child {
  margin-top: 0;
}

.legal > *:last-child {
  margin-bottom: 0;
}



.legal-header {
  margin-bottom: 42px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-soft);
}

.legal-eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal h1,
.legal h2,
.legal h3 {
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.legal h1 {
  max-width: 780px;
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 5vw, 3.5rem);
}

.legal h2 {
  margin: 0 0 16px;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.legal h3 {
  margin: 24px 0 10px;
  font-size: 1.08rem;
}

.legal-updated {
  margin: 0 0 20px;
  color: var(--muted-light);
  font-size: 0.9rem;
}

.legal-intro {
  max-width: 790px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 1.75;
}



.legal-section {
  margin-top: 38px;
  padding-top: 6px;
}

.legal-section + .legal-section {
  padding-top: 36px;
  border-top: 1px solid var(--line-soft);
}

.legal p {
  margin: 0 0 16px;
  color: var(--muted);
}

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

.legal strong {
  color: var(--text);
}


.legal p a,
.legal li a,
.legal td a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(207, 110, 13, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease;
}

.legal p a:hover,
.legal li a:hover,
.legal td a:hover {
  color: #a85100;
  text-decoration-color: currentColor;
}

.legal a:focus-visible,
.legal button:focus-visible {
  outline: 3px solid rgba(242, 140, 40, 0.26);
  outline-offset: 3px;
}



.legal ul,
.legal ol {
  margin: 18px 0;
  padding-left: 24px;
  color: var(--muted);
}

.legal li {
  padding-left: 4px;
}

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

.legal li::marker {
  color: var(--accent);
}



.legal-table-wrap {
  width: 100%;
  margin: 22px 0;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-small);
  scrollbar-width: thin;
}

.legal-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.55;
}

.legal-table th,
.legal-table td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: #f0f1ef;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-table td {
  color: var(--muted);
}

.legal-table tbody tr:last-child td {
  border-bottom: 0;
}

.legal-table tbody tr:nth-child(even) {
  background: #fafaf9;
}

.legal-table tbody tr:hover {
  background: #fffaf4;
}

.legal-table td:first-child,
.legal-table th:first-child {
  width: 190px;
}

.legal-table code {
  white-space: nowrap;
}



.legal code {
  display: inline-block;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 7px;
  background: #f0f1ef;
  color: #272727;
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 0.84em;
  overflow-wrap: anywhere;
}



.notice,
.warning,
.legal-note {
  margin: 22px 0;
  padding: 17px 19px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.65;
}

.notice {
  border: 1px solid rgba(242, 140, 40, 0.32);
  background: var(--accent-soft);
  color: #6d4a18;
}

.warning {
  border: 1px solid rgba(180, 35, 24, 0.22);
  background: var(--danger-soft);
  color: #7a271a;
}

.legal-note {
  border: 1px solid rgba(8, 122, 85, 0.16);
  background: var(--success-soft);
  color: #195c47;
}

.notice p,
.warning p,
.legal-note p {
  color: inherit;
}

.placeholder {
  font-weight: 750;
  color: var(--danger);
}



.legal-card {
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.legal-card h3 {
  margin-top: 0;
}

.legal-card p:last-child {
  margin-bottom: 0;
}



.legal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding-top: 30px;
  border-top: 1px solid var(--line-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

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

.btn-primary {
  background: var(--text);
  color: #ffffff;
  box-shadow:
    0 10px 24px rgba(17, 17, 17, 0.16);
}

.btn-primary:hover {
  background: #303030;
}

.btn-secondary {
  border-color: rgba(17, 17, 17, 0.14);
  background: #ffffff;
  color: var(--text);
  box-shadow:
    0 8px 20px rgba(16, 24, 40, 0.06);
}

.btn-secondary:hover {
  border-color: rgba(17, 17, 17, 0.32);
  background: #f7f7f5;
}

.legal-text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-dark);
  font-size: 0.94rem;
  font-weight: 800;
}

.legal-text-link::after {
  content: "→";
  transition: transform 0.2s ease;
}

.legal-text-link:hover::after {
  transform: translateX(4px);
}


.legal-footer {
  width: min(calc(100% - 28px), var(--container));
  margin: 0 auto 34px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.legal-footer a {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}


.legal details {
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.legal summary {
  position: relative;
  padding: 17px 52px 17px 18px;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.legal summary::-webkit-details-marker {
  display: none;
}

.legal summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  font-size: 1.3rem;
}

.legal details[open] summary::after {
  content: "−";
}

.legal details > div {
  padding: 0 18px 18px;
}



@media (max-width: 820px) {
  .legal {
    margin-top: 28px;
    margin-bottom: 28px;
    padding: 30px 24px;
  }

  .legal-header {
    margin-bottom: 34px;
  }

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


@media (max-width: 700px) {
  .top-inner {
    min-height: 64px;
  }

  .brand {
    font-size: 0.86rem;
  }

  .back {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.84rem;
  }

  .legal {
    width: min(calc(100% - 20px), var(--container));
    margin: 18px auto 24px;
    padding: 25px 18px;
    border-radius: 22px;
  }

  .legal-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
  }

  .legal h1 {
    font-size: clamp(2rem, 10vw, 2.65rem);
  }

  .legal h2 {
    font-size: 1.32rem;
  }

  .legal-section {
    margin-top: 30px;
  }

  .legal-section + .legal-section {
    padding-top: 28px;
  }

  .legal ul,
  .legal ol {
    padding-left: 21px;
  }

  .legal-table-wrap {
    margin-right: -4px;
    margin-left: -4px;
    border-radius: 16px;
  }

  .legal-table {
    min-width: 720px;
    font-size: 0.84rem;
  }

  .legal-table th,
  .legal-table td {
    padding: 14px;
  }

  .notice,
  .warning,
  .legal-note {
    padding: 15px 16px;
  }

  .legal-actions {
    gap: 17px;
    margin-top: 38px;
    padding-top: 25px;
  }

  .legal-actions .btn {
    width: 100%;
  }

  .legal-text-link {
    width: 100%;
    justify-content: center;
    padding: 10px 0;
  }
}



@media (max-width: 420px) {
  .top-inner {
    width: min(calc(100% - 20px), var(--container));
  }

  .back {
    padding: 0 12px;
  }

  .legal {
    padding: 23px 16px;
  }

  .legal-intro {
    font-size: 0.96rem;
  }

  .legal p,
  .legal li {
    font-size: 0.94rem;
  }
}


/* =========================================================
   19. REDUCED MOTION
   ========================================================= */

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

  .back,
  .btn,
  .legal-text-link::after {
    transition: none;
  }

  .back:hover,
  .btn:hover {
    transform: none;
  }
}