:root {
  color-scheme: light;
  --page: #f7f8fc;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --field: #f8f8fb;
  --text: #1a1920;
  --muted: #777582;
  --line: rgba(43, 38, 67, 0.09);
  --line-strong: rgba(43, 38, 67, 0.15);
  --accent: #6958e8;
  --accent-bright: #725fe8;
  --accent-soft: rgba(105, 88, 232, 0.12);
  --success: #27865a;
  --danger: #cf4059;
  --shadow: 0 28px 80px rgba(67, 57, 106, 0.13);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(139, 124, 255, 0.18), transparent 35rem),
    var(--page);
}

button,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.page-glow {
  position: fixed;
  z-index: -1;
  top: -22rem;
  left: 50%;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
  background: rgba(121, 98, 244, 0.12);
  filter: blur(110px);
  transform: translateX(-50%);
  pointer-events: none;
}

.site-header,
main,
footer {
  width: min(100% - 40px, 940px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  align-content: center;
  gap: 3px;
  width: 34px;
  height: 34px;
  padding: 8px;
  border: 1px solid rgba(105, 88, 232, 0.16);
  border-radius: 11px;
  background: linear-gradient(145deg, #9d91ff, #6756ea);
  box-shadow: 0 8px 24px rgba(105, 85, 235, 0.34);
}

.brand-mark i {
  display: block;
  height: 2px;
  border-radius: 99px;
  background: #fff;
}

.brand-mark i:nth-child(2) {
  width: 72%;
}

.brand-mark i:nth-child(3) {
  width: 44%;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 24px rgba(63, 54, 101, 0.07);
}

.local-badge > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(39, 134, 90, 0.28);
}

.hero {
  padding: 76px 0 58px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  color: #17161d;
  font-size: clamp(58px, 9vw, 96px);
  font-weight: 720;
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.hero h1 span {
  color: transparent;
  background: linear-gradient(105deg, #17161d 0%, #5d4bd9 52%, #826ff1 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.intro {
  max-width: 600px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.tool {
  position: relative;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(130%);
  -webkit-backdrop-filter: blur(30px) saturate(130%);
}

.tool::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18%;
  width: 64%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(115, 96, 232, 0.55), transparent);
}

.tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  max-width: 300px;
  margin: 6px auto 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(91, 79, 139, 0.06);
}

.tab {
  min-height: 42px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  color: #fff;
  background: linear-gradient(140deg, rgba(154, 141, 255, 0.96), rgba(102, 83, 230, 0.96));
  box-shadow: 0 6px 20px rgba(91, 70, 220, 0.3);
}

.panel {
  padding: 32px;
  border: 1px solid rgba(43, 38, 67, 0.07);
  border-radius: 22px;
  background: rgba(250, 250, 253, 0.8);
}

form {
  display: grid;
  gap: 22px;
}

.field {
  display: grid;
  gap: 10px;
}

.field-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.field-heading label {
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.field-heading span {
  color: var(--muted);
  font-size: 12px;
}

textarea {
  width: 100%;
  min-height: 118px;
  padding: 16px 17px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  outline: none;
  color: var(--text);
  caret-color: var(--accent-bright);
  background: var(--field);
  font-size: 15px;
  line-height: 1.65;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea::placeholder {
  color: #a09eaa;
}

textarea:hover {
  border-color: rgba(61, 54, 90, 0.24);
}

textarea:focus {
  border-color: rgba(139, 124, 255, 0.9);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

textarea[readonly] {
  min-height: 110px;
  color: #443b7d;
  border-color: rgba(139, 124, 255, 0.24);
  background: rgba(105, 88, 232, 0.055);
}

.primary-button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 680;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-button {
  width: 100%;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #9688ff, #6854e8);
  box-shadow: 0 12px 30px rgba(95, 73, 225, 0.28);
}

.primary-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-button:hover {
  box-shadow: 0 15px 34px rgba(95, 73, 225, 0.38);
  transform: translateY(-1px);
}

.primary-button:active,
.copy-button:active {
  transform: translateY(1px);
}

.form-error {
  margin: -7px 0 0;
  padding: 11px 13px;
  border: 1px solid rgba(255, 156, 170, 0.2);
  border-radius: 12px;
  color: var(--danger);
  background: rgba(255, 100, 125, 0.08);
  font-size: 13px;
  line-height: 1.55;
}

.result {
  display: grid;
  gap: 15px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  animation: result-in 320ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.result-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.result-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--success);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.result-heading h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 670;
  letter-spacing: -0.025em;
}

.result-stat {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}

.copy-button {
  width: max-content;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: #ffffff;
}

.copy-button:hover {
  border-color: rgba(139, 124, 255, 0.52);
  background: rgba(139, 124, 255, 0.1);
}

.copy-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 64px 0 36px;
  color: #85838f;
  font-size: 12px;
}

footer a {
  text-underline-offset: 3px;
}

footer a:hover {
  color: var(--muted);
}

.toast {
  position: fixed;
  z-index: 20;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--text);
  background: rgba(30, 30, 41, 0.96);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.34);
  font-size: 13px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.copy-helper {
  position: fixed;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@keyframes result-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 700px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 940px);
  }

  .site-header {
    min-height: 72px;
  }

  .hero {
    padding: 58px 4px 42px;
  }

  .hero h1 {
    font-size: clamp(54px, 19vw, 76px);
  }

  .intro {
    font-size: 14px;
    line-height: 1.75;
  }

  .tool {
    padding: 8px;
    border-radius: 24px;
  }

  .tabs {
    max-width: none;
    margin: 2px 0 7px;
  }

  .panel {
    padding: 22px 16px 18px;
    border-radius: 18px;
  }

  .field-heading {
    display: grid;
    gap: 4px;
  }

  .field-heading span {
    font-size: 11px;
  }

  textarea {
    min-height: 110px;
    font-size: 16px;
  }

  .result-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .copy-button {
    width: 100%;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 50px;
  }
}

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

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