:root {
  --color-orange: #ff824c;
  --color-page: #ffffff;
  --color-muted-bg: #f5f5f5;
  --color-border: #e4e4e4;
  --color-text: #000000;
  --color-text-soft: rgba(0, 0, 0, 0.4);
  --color-text-soft-desk: rgba(0, 0, 0, 0.52);
  --color-muted-text: #909092;
  --color-btn-muted-text: #272729;
  --color-on-orange: #f8f8fa;
  --radius-pill: 999px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--color-page);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

body:not(.gate-unlocked) {
  overflow: hidden;
}

.site-shell[hidden] {
  display: none !important;
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.02em;
  border-radius: var(--radius-pill);
  padding: 12px 18px;
  transition: opacity 0.15s ease;
}

.btn:hover {
  opacity: 0.92;
}

.btn:active {
  opacity: 0.85;
}

.btn--primary {
  background: var(--color-orange);
  color: var(--color-on-orange);
}

.btn--muted {
  background: var(--color-muted-bg);
  color: var(--color-btn-muted-text);
}

.btn--wide {
  width: 100%;
}

.btn--header {
  padding: 12px 16px;
}

.btn--download {
  width: 100%;
  max-width: 361px;
  min-height: 52px;
}

@media (min-width: 768px) {
  .btn--download {
    width: 175px;
    max-width: none;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-page);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  max-width: 1440px;
  margin: 0 auto;
}

.brand {
  flex-shrink: 0;
}

.btn--header {
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 16px;
    padding: 23px 28px;
    min-height: 89px;
    gap: 0;
    justify-content: stretch;
  }

  .brand {
    justify-self: start;
  }

  .btn--header {
    justify-self: end;
  }

  .site-nav--desktop {
    justify-self: center;
  }
}

@media (max-width: 767px) {
  .site-nav--desktop {
    display: none !important;
  }

  .site-header .btn--header {
    height: 36px;
    padding: 8px 12px;
    box-sizing: border-box;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1;
  }
}

.brand__logo {
  width: auto;
  height: 36px;
  display: block;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 36px;
  font-size: 20px;
  font-weight: 500;
}

@media (min-width: 768px) {
  .site-nav--desktop.site-nav {
    display: flex;
  }
}

.site-nav a:last-child {
  color: var(--color-text-soft);
}

.hero {
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.hero__inner {
  max-width: 759px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 44px;
}

@media (max-width: 767px) {
  .hero {
    padding-top: 88px;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 48px;
  }

  .hero__subtitle {
    margin-bottom: 24px;
  }

  .hero__inner {
    gap: 0;
  }

  .hero .tag {
    margin-bottom: 16px;
  }

  .hero__actions {
    margin-top: 188px;
  }
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero__title {
  margin: 0;
  font-weight: 600;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  margin: 0 0 16px;
  width: 100%;
  max-width: 305px;
  text-align: center;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--color-muted-text);
  box-sizing: border-box;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 362px;
}

.hero__actions .btn {
  display: flex;
  height: 52px;
  padding: 17px 10px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .hero {
    padding: 56px 24px 96px;
  }

  .hero__subtitle {
    margin: 0 0 44px;
    font-size: 28px;
    letter-spacing: -0.02em;
    color: var(--color-text-soft);
    max-width: 566px;
  }

  .hero__actions {
    margin-top: 0;
  }

  .hero .tag {
    margin-bottom: 0;
  }

  .hero__copy {
    gap: 24px;
  }

  .hero__title {
    font-size: 64px;
    letter-spacing: -0.02em;
  }

  .hero__actions {
    flex-direction: row;
    width: 362px;
    max-width: none;
    gap: 10px;
  }

  .hero__actions .btn {
    flex: 1 0 0;
    width: auto;
    min-width: 0;
  }
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  letter-spacing: -0.02em;
  color: var(--color-text-soft);
}

@media (min-width: 768px) {
  .tag {
    font-size: 20px;
    gap: 8px;
    letter-spacing: -0.02em;
  }
}

.tag--outline {
  border: 1px solid var(--color-border);
  background: var(--color-page);
}

.tag__icon {
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .tag:not(.tag--instruction) .tag__icon {
    width: 16px;
    height: 16px;
  }

  .tag:not(.tag--instruction) {
    gap: 4px;
  }
}

.instruction {
  padding: 32px 16px 48px;
}

.instruction__inner {
  max-width: 1264px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
}

@media (min-width: 768px) {
  .instruction {
    padding: 80px 24px 120px;
  }

  .instruction__inner {
    gap: 52px;
  }
}

.instruction__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

@media (max-width: 767px) {
  .instruction__intro {
    gap: 16px;
  }
}

.instruction__title {
  margin: 0;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .instruction__title {
    font-size: 52px;
    letter-spacing: -0.02em;
    max-width: 900px;
  }

  .instruction__title-line {
    display: block;
  }
}

.platform-toggle {
  flex-shrink: 0;
}

.platform-toggle__track {
  display: flex;
  position: relative;
  align-items: stretch;
  padding: 4px;
  background: var(--color-muted-bg);
  border-radius: var(--radius-pill);
  gap: 0;
}

.platform-toggle__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 16px) / 2);
  border-radius: var(--radius-pill);
  background: var(--color-page);
  box-shadow: none;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
  transform: translateX(0);
}

.platform-toggle[data-platform="android"] .platform-toggle__thumb {
  transform: translateX(calc(100% + 8px));
}

.platform-toggle__btn {
  position: relative;
  z-index: 1;
  flex: 1 1 50%;
  border: none;
  box-shadow: none;
  background: transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--color-text-soft-desk);
  border-radius: var(--radius-pill);
  padding: 8px 24px;
  min-width: 118px;
  min-height: 37px;
  cursor: pointer;
  transition:
    color 0.22s ease,
    transform 0.14s ease;
}

.platform-toggle__btn:active {
  transform: scale(0.98);
}

.platform-toggle__btn.is-active {
  color: var(--color-text);
}

.platform-toggle__btn:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .platform-toggle__btn:not(.is-active) {
    color: var(--color-text-soft-desk);
  }

  .platform-toggle__btn.is-active {
    color: var(--color-text);
  }
}

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

  .platform-toggle__btn {
    transition: none;
  }

  .platform-toggle__btn:active {
    transform: none;
  }
}

.step-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step-panel__main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
  opacity: 1;
  transition: opacity 0.28s ease;
}

.step-panel__main.is-step-hiding {
  opacity: 0;
}

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

.step-panel__left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step-panel__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-panel__label {
  margin: 0;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--color-text-soft);
}

.step-panel__body {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.step-panel__body p {
  margin: 0;
}

.step-panel__mockup {
  flex-shrink: 0;
  margin: 0 auto;
  width: min(316px, 100%);
}

.step-panel__img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

@media (max-width: 767px) {
  .step-panel__left {
    display: contents;
  }

  .step-panel__text {
    order: 1;
    width: 100%;
  }

  .step-panel__mockup {
    order: 2;
  }

  .step-panel__nav {
    order: 3;
    margin-top: 0;
    padding-top: 0;
  }
}

@media (min-width: 768px) {
  .step-panel__text,
  .step-panel__mockup,
  .step-panel__nav {
    order: unset;
  }

  .step-panel__main {
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    gap: 48px;
    min-height: 685px;
  }

  .step-panel__left {
    display: flex;
    flex: 1;
    min-width: 0;
    justify-content: space-between;
    min-height: 685px;
    gap: 0;
  }

  .step-panel__text {
    gap: 24px;
  }

  .step-panel__label {
    font-size: 24px;
  }

  .step-panel__body {
    font-size: 20px;
    font-weight: 500;
  }

  .step-panel__mockup {
    margin: 0;
    width: 316px;
    flex-shrink: 0;
  }
}

.step-panel__nav {
  display: flex;
  gap: 12px;
  width: 100%;
}

@media (min-width: 768px) {
  .step-panel__nav {
    width: auto;
    gap: 16px;
    margin-top: auto;
    padding-top: 24px;
  }
}

.step-nav-btn {
  flex: 1;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-muted-bg);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 10px;
}

@media (min-width: 768px) {
  .step-nav-btn {
    flex: none;
    width: 52px;
    height: 52px;
    min-height: 52px;
  }
}

.step-nav-btn__inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-nav-btn--prev img {
  transform: rotate(180deg);
}

.step-nav-btn[disabled],
.step-nav-btn.is-disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}

.instruction__download {
  display: flex;
  justify-content: center;
  width: 100%;
}

.site-footer {
  background: var(--color-muted-bg);
  padding: 16px 16px 28px;
  min-height: 201px;
}

.site-footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
  min-height: 168px;
}

.site-footer__links {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--color-muted-text);
}

.site-footer__links a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .site-footer {
    padding: 16px 28px 40px;
  }
}

.site-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: var(--color-page);
}

.site-gate[hidden] {
  display: none !important;
}

.site-gate__card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.site-gate__title {
  margin: 0;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-gate__hint {
  margin: -8px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-muted-text);
  letter-spacing: -0.02em;
  max-width: 320px;
}

.gate-cells {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(6px, 2vw, 10px);
  width: 100%;
  max-width: 380px;
  padding: 4px 0;
}

.gate-cell {
  flex: 1 1 0;
  min-width: 0;
  height: 52px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-family: inherit;
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--color-text);
  background: var(--color-page);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.gate-cell:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(255, 130, 76, 0.25);
}

.gate-cell:focus-visible {
  outline: none;
}

.gate-cells--invalid .gate-cell {
  border-color: #e04848;
}

.site-gate__error {
  margin: -4px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: #c62828;
  letter-spacing: -0.02em;
  min-height: 1.4em;
}

.site-gate__submit {
  width: 100%;
  max-width: 280px;
  min-height: 52px;
  margin-top: 4px;
}

@keyframes gate-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(6px);
  }
}

.gate-cells--shake {
  animation: gate-shake 0.45s ease;
}

@media (prefers-reduced-motion: reduce) {
  .gate-cells--shake {
    animation: none;
  }
}

.admin-body {
  margin: 0;
  min-height: 100vh;
}

.admin-body:not(.admin-logged-in) {
  overflow: hidden;
  background: var(--color-page);
}

.admin-body.admin-logged-in {
  background: var(--color-muted-bg);
}

.admin-app[hidden] {
  display: none !important;
}

.admin-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-header__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.admin-header__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-orange);
}

.admin-header__link:hover {
  text-decoration: underline;
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-card {
  background: var(--color-page);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-card__heading {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.admin-card__muted {
  margin: -4px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-muted-text);
}

.admin-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-soft);
  text-align: left;
  width: 100%;
}

.admin-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  box-sizing: border-box;
}

.admin-input:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(255, 130, 76, 0.22);
}

.admin-file {
  width: 100%;
  font-size: 14px;
}

.admin-btn-full {
  width: 100%;
  margin-top: 8px;
  min-height: 48px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.admin-btn-grow {
  flex: 1 1 160px;
  min-height: 48px;
}

.admin-msg {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.4;
  min-height: 1.4em;
}

.admin-msg--error {
  color: #c62828;
}

.admin-msg--success {
  color: #2e7d32;
}

@media (min-width: 480px) {
  .admin-page {
    padding-top: 40px;
  }
}
