/* styles.css */
*, *:before, *:after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f5f5f7;
  --surface: #fff;
  --border: #00000014;
  --border-focus: #0071e3;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-active: #006edb;
  --green: #34c759;
  --red: #ff3b30;
  --input-bg: #f5f5f7;
  --shadow-card: 0 1px 3px #0000000a, 0 8px 32px #0000000f;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: -apple-system, BlinkMacSystemFont, SF Pro Text, SF Pro Display, Helvetica Neue, Arial, sans-serif;
  line-height: 1.5;
}

.page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items:  center;
  min-height: 100vh;
  padding: 80px 20px;
}

.header {
  text-align: center;
  width: 100%;
  max-width: 480px;
  margin-bottom: 40px;
}

.header h1 {
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.05;
}

.header p {
  color: var(--text-secondary);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 36px 36px 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  color: var(--text-secondary);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}

.field input, .field textarea {
  background: var(--input-bg);
  color: var(--text-primary);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border: 1.5px solid #0000;
  border-radius: 12px;
  width: 100%;
  padding: 12px 14px;
  transition: border-color .18s, box-shadow .18s, background .18s;
  font-family: inherit;
  font-size: 15px;
}

.field input::placeholder, .field textarea::placeholder {
  color: var(--text-tertiary);
}

.field input:hover, .field textarea:hover {
  border-color: #0000001f;
}

.field input:focus, .field textarea:focus {
  border-color: var(--border-focus);
  background: var(--surface);
  box-shadow: 0 0 0 4px #0071e31f;
}

.field textarea {
  resize: none;
  min-height: 130px;
  line-height: 1.55;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  display: flex;
  letter-spacing: .01em;
  border: none;
  border-radius: 12px;
  justify-content: center;
  align-items:  center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  padding: 14px 24px;
  transition: background .15s, transform .1s, box-shadow .15s;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 1px 2px #0071e333;
}

.btn-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px #0071e34d;
}

.btn-primary:active {
  background: var(--blue-active);
  box-shadow: none;
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.error-banner {
  display: flex;
  background: #ff3b300d;
  border: 1.5px solid #ff3b3033;
  border-radius: 12px;
  align-items:  flex-start;
  gap: 10px;
  padding: 12px 14px;
}

.error-banner svg {
  color: var(--red);
  flex-shrink: 0;
  margin-top: 1px;
}

.error-banner p {
  color: var(--red);
  font-size: 14px;
  line-height: 1.45;
}

.success {
  display: flex;
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items:  center;
  padding: 60px 36px;
}

.success-icon {
  display: flex;
  background: #34c7591a;
  border-radius: 50%;
  justify-content: center;
  align-items:  center;
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
}

.success-icon svg {
  color: var(--green);
}

.success h2 {
  color: var(--text-primary);
  letter-spacing: -.3px;
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 600;
}

.success p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.55;
}

.btn-link {
  color: var(--blue);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
}

.btn-link:hover {
  text-decoration: underline;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin .75s linear infinite;
}

.footer {
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 32px;
  font-size: 13px;
}

.footer a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color .15s;
}

.footer a:hover {
  color: var(--text-secondary);
}

.privacy-nav {
  position: sticky;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--border);
  background: #f5f5f7cc;
  top: 0;
}

.privacy-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  max-width: 760px;
  height: 52px;
  margin: 0 auto;
  padding: 0 32px;
}

.privacy-nav a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color .15s;
  font-size: 14px;
  font-weight: 500;
}

.privacy-nav a:hover {
  color: var(--blue);
}

.privacy-nav span {
  color: var(--text-secondary);
  font-size: 14px;
}

.privacy-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 32px 80px;
}

.privacy-header {
  margin-bottom: 48px;
}

.privacy-header h1 {
  letter-spacing: -2px;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-size: 52px;
  font-weight: 700;
  line-height: 1.05;
}

.privacy-header .updated {
  color: var(--text-tertiary);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-size: 13px;
}

.privacy-header .intro {
  color: var(--text-secondary);
  max-width: 600px;
  font-size: 17px;
  line-height: 1.7;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-radius: 18px;
  margin-bottom: 10px;
  padding: 24px 28px;
}

.toc-label {
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
}

.toc ol {
  list-style: none;
  display: flex;
  counter-reset: toc;
  flex-direction: column;
  gap: 7px;
}

.toc ol li {
  counter-increment: toc;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.toc ol li:before {
  content: counter(toc, decimal-leading-zero);
  color: var(--text-tertiary);
  letter-spacing: .04em;
  min-width: 22px;
  font-size: 11px;
  font-weight: 600;
}

.toc a {
  color: var(--blue);
  text-decoration: none;
  transition: opacity .15s;
  font-size: 15px;
  font-weight: 400;
}

.toc a:hover {
  opacity: .7;
  text-decoration: underline;
}

.privacy-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.privacy-section {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-radius: 18px;
  padding: 28px 32px;
  scroll-margin-top: 68px;
  transition: box-shadow .2s;
}

.privacy-section:target {
  box-shadow: 0 0 0 3px #0071e326, var(--shadow-card);
}

.privacy-section h2 {
  color: var(--text-primary);
  letter-spacing: -.2px;
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 600;
}

.privacy-section p, .privacy-section li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.privacy-section p + p {
  margin-top: 12px;
}

.privacy-section ul, .privacy-section ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding-left: 0;
}

.privacy-section ul li, .privacy-section ol li {
  position: relative;
  padding-left: 20px;
}

.privacy-section ul li:before {
  content: "–";
  position: absolute;
  color: var(--text-tertiary);
  left: 0;
}

.privacy-section .controller-block {
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  border-radius: 12px;
  flex-direction: column;
  gap: 3px;
  margin-top: 14px;
  padding: 14px 16px;
}

.privacy-section .controller-block p {
  color: var(--text-primary);
  font-size: 14px;
}

.privacy-section a {
  color: var(--blue);
  text-decoration: none;
}

.privacy-section a:hover {
  text-decoration: underline;
}

.privacy-footer {
  text-align: center;
  color: var(--text-tertiary);
  margin-top: 48px;
  font-size: 13px;
}

@media (width <= 540px) {
  .page {
    justify-content: flex-start;
    padding: 80px 16px 60px;
  }

  .header h1 {
    letter-spacing: -1px;
    font-size: 34px;
  }

  .header p {
    font-size: 16px;
  }

  .form {
    padding: 28px 22px 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .privacy-content {
    padding: 48px 20px 64px;
  }

  .privacy-header h1 {
    letter-spacing: -1px;
    font-size: 36px;
  }

  .privacy-section {
    border-radius: 14px;
    padding: 22px 20px;
  }

  .privacy-nav-inner {
    padding: 0 20px;
  }
}
