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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #e8e8e8;
  background: #0d0d0f;
  overflow-x: hidden;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212, 181, 131, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(212, 181, 131, 0.06), transparent 50%),
    linear-gradient(180deg, #131313 0%, #0d0d0f 100%);
}

.page-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 80%);
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 20px calc(156px + env(safe-area-inset-bottom));
}

.topbar {
  position: relative;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.brand-logo {
  display: block;
  height: 28px;
  width: auto;
}

.lang-wrap {
  position: relative;
  z-index: 201;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(212, 181, 131, 0.25);
  border-radius: 999px;
  background: rgba(24, 24, 24, 0.85);
  color: #d4b583;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lang-icon {
  font-size: 14px;
  line-height: 1;
}

.lang-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #d4b583;
  opacity: 0.8;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 202;
  min-width: 148px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid rgba(212, 181, 131, 0.2);
  border-radius: 12px;
  background: rgba(24, 24, 24, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lang-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ccc;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.lang-option:hover,
.lang-option.is-active {
  background: rgba(212, 181, 131, 0.12);
  color: #d4b583;
}

.hero {
  text-align: center;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d4b583;
  opacity: 0.85;
}

.title {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #f5f5f5;
}

.subtitle {
  margin: 0 auto 18px;
  max-width: 320px;
  font-size: 15px;
  color: #9a9a9a;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(212, 181, 131, 0.2);
  border-radius: 999px;
  background: rgba(24, 24, 24, 0.6);
  font-size: 13px;
  color: #888;
}

.version-badge strong {
  color: #d4b583;
  font-weight: 600;
}

.shots {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.phone-shell {
  position: relative;
  width: min(260px, 72vw);
  padding: 10px;
  border-radius: 28px;
  background: linear-gradient(145deg, #2a2a2e 0%, #1a1a1d 100%);
  box-shadow:
    0 0 0 1px rgba(212, 181, 131, 0.15),
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.phone-shell-secondary {
  width: min(220px, 62vw);
  opacity: 0.92;
  transform: scale(0.96);
}

.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: #0d0d0f;
  z-index: 2;
}

.phone-screen {
  overflow: hidden;
  border-radius: 20px;
  background: #181818;
  aspect-ratio: 9 / 19.5;
}

.shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.download-dock {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 50;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(400px, calc(100% - 24px));
  padding: 0;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 12px 16px 12px 14px;
  border-radius: 16px;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.download-btn:active {
  transform: scale(0.985);
}

.download-btn--android {
  border: 0;
  color: #131313;
  background: linear-gradient(135deg, #ecd098 0%, #d4b583 48%, #c4a06e 100%);
  box-shadow:
    0 10px 28px rgba(212, 181, 131, 0.35),
    0 2px 0 rgba(255, 255, 255, 0.25) inset;
}

.download-btn--android:active {
  box-shadow:
    0 6px 18px rgba(212, 181, 131, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.2) inset;
}

.download-btn--ios {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(36, 36, 40, 0.98) 0%, rgba(24, 24, 26, 0.98) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.download-btn__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 40px;
}

.download-btn__icon img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.download-btn--ios .download-btn__icon {
  width: 40px;
  height: 40px;
}

.download-btn__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.download-btn__name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.download-btn--android .download-btn__name {
  color: #1a1a1a;
}

.download-btn--ios .download-btn__name {
  color: #f0f0f0;
}

.download-btn__hint {
  font-size: 12px;
  line-height: 1.3;
  opacity: 0.78;
}

.download-btn--android .download-btn__hint {
  color: #3d3428;
}

.download-btn--ios .download-btn__hint {
  color: #888;
}

.download-btn__action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.download-btn--android .download-btn__action {
  color: #131313;
  background: rgba(255, 255, 255, 0.35);
}

.download-btn--ios .download-btn__action {
  color: #666;
  background: rgba(255, 255, 255, 0.06);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border: 0;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #131313;
  background: linear-gradient(135deg, #e0c896 0%, #d4b583 45%, #b8956a 100%);
  box-shadow: 0 8px 24px rgba(212, 181, 131, 0.25);
}

.install {
  padding: 20px;
  border-radius: 16px;
  background: rgba(24, 24, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.install-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: #d4b583;
}

.install-steps {
  margin: 0;
  padding-left: 20px;
  color: #9a9a9a;
  font-size: 14px;
}

.install-steps li {
  margin-bottom: 8px;
}

.install-steps li:last-child {
  margin-bottom: 0;
}

.footer {
  margin-top: 28px;
  text-align: center;
}

.footer-note {
  margin: 0;
  font-size: 12px;
  color: #555;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(150px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(24, 24, 24, 0.95);
  border: 1px solid rgba(212, 181, 131, 0.25);
  color: #e8e8e8;
  font-size: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.modal {
  border: 0;
  padding: 0;
  max-width: none;
  width: 100%;
  height: 100%;
  background: transparent;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-card {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(340px, calc(100% - 40px));
  padding: 28px 24px 24px;
  border-radius: 20px;
  background: linear-gradient(180deg, #1e1e22 0%, #181818 100%);
  border: 1px solid rgba(212, 181, 131, 0.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.modal-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.modal-title {
  margin: 0 0 10px;
  font-size: 20px;
  color: #f5f5f5;
}

.modal-text {
  margin: 0 0 22px;
  font-size: 14px;
  color: #9a9a9a;
  line-height: 1.6;
}

.modal-close {
  min-height: 46px;
}

/* ── PC / Tablet landscape ── */
@media (min-width: 900px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 24px;
  }

  .page-bg::after {
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2));
  }

  .page {
    width: 100%;
    max-width: 1120px;
    margin: 0;
    padding: 40px 56px 48px;
    display: grid;
    grid-template-columns: minmax(300px, 420px) 1fr;
    grid-template-rows: auto auto auto auto auto;
    column-gap: 64px;
    row-gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background: rgba(19, 19, 19, 0.72);
    box-shadow:
      0 32px 100px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(212, 181, 131, 0.06) inset;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .topbar {
    grid-column: 1 / -1;
    margin-bottom: 40px;
  }

  .brand-logo {
    height: 32px;
  }

  .hero {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    margin-bottom: 0;
    align-self: end;
    padding-bottom: 28px;
  }

  .eyebrow {
    font-size: 13px;
  }

  .title {
    font-size: 40px;
    margin-bottom: 16px;
  }

  .subtitle {
    margin: 0;
    max-width: none;
    font-size: 16px;
    line-height: 1.65;
  }

  .download-dock {
    position: static;
    left: auto;
    bottom: auto;
    z-index: auto;
    transform: none;
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    max-width: none;
    margin: 0 0 32px;
    gap: 12px;
  }

  .download-btn {
    min-height: 68px;
    padding: 14px 18px;
    border-radius: 18px;
  }

  .download-btn--android:hover {
    filter: brightness(1.05);
    box-shadow:
      0 14px 36px rgba(212, 181, 131, 0.42),
      0 2px 0 rgba(255, 255, 255, 0.25) inset;
  }

  .download-btn--ios:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(44, 44, 48, 0.98) 0%, rgba(28, 28, 30, 0.98) 100%);
  }

  .download-btn:active {
    transform: scale(0.99);
  }

  .install {
    grid-column: 1;
    grid-row: 4;
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 18px;
  }

  .install-title {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .install-steps {
    font-size: 15px;
    line-height: 1.6;
  }

  .footer {
    grid-column: 1;
    grid-row: 5;
    margin-top: 0;
    text-align: left;
    align-self: start;
  }

  .shots {
    grid-column: 2;
    grid-row: 2 / 6;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-bottom: 0;
    padding: 16px 0;
    align-self: center;
  }

  .phone-shell {
    width: 240px;
  }

  .phone-shell-secondary {
    width: 220px;
    opacity: 1;
    transform: translateY(32px);
  }

  .lang-btn:hover {
    border-color: rgba(212, 181, 131, 0.45);
    background: rgba(32, 32, 32, 0.95);
  }

  .lang-option:hover {
    background: rgba(212, 181, 131, 0.12);
    color: #d4b583;
  }

  .modal-card {
    width: min(400px, calc(100% - 40px));
    padding: 32px 28px 28px;
  }
}

@media (min-width: 1200px) {
  .page {
    max-width: 1180px;
    column-gap: 80px;
    padding: 48px 64px 56px;
  }

  .title {
    font-size: 44px;
  }

  .phone-shell {
    width: 260px;
  }

  .phone-shell-secondary {
    width: 240px;
    transform: translateY(40px);
  }
}

/* Mobile: dock fixed at bottom */
@media (max-width: 899px) {
  .download-dock {
    position: fixed;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 50;
    transform: translateX(-50%);
  }
}
