* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 37.5px;
}

:root {
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;
  --fw-700: 700;
  --fw-800: 800;
  --string-font: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --headline-font: 'Plus Jakarta Sans', 'Roboto', sans-serif;
  --number-font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --fs-12: 0.32rem;
  --fs-14: 0.37333rem;
  --fs-16: 0.42667rem;
  --fs-20: 0.53333rem;
  --fs-28: 0.74667rem;
  --lh-body-18: 0.48rem;
  --lh-body-20: 0.53333rem;
  --lh-headline-36: 0.96rem;
  --lh-title-20: 0.53333rem;
  --panel-bg: #1f160b;
  --page-purple: #5c3d18;
}

body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background: var(--page-purple);
  font-family: var(--string-font);
}

#toast {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#toast.show {
  opacity: 1;
}

/* =============================================================================
   for-web (Desktop)
   ============================================================================= */

.for-web.page {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.for-web .page-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  pointer-events: none;
  z-index: 1;
}

.for-web .page-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex: none;
  width: 100%;
  max-width: 1281px;
  min-height: 0;
  margin: 0 auto;
  padding-bottom: 212px;
}

.for-web .hero {
  padding: 0.96rem clamp(0.42667rem, calc((100% - 17.09333rem) / 2), 8.53333rem) 0;
}

.for-web .headline {
  padding: 0.26667rem 0;
  font-family: var(--headline-font);
  font-size: var(--fs-28);
  font-weight: var(--fw-800);
  font-style: italic;
  line-height: var(--lh-headline-36);
  color: #ffffff;
  text-align: left;
}

.for-web .subtitle-card {
  margin-top: 0.10667rem;
  padding: 0.21333rem 0.32rem;
  border: 0.5px solid #ffffff;
  border-radius: 0.32rem;
  background: linear-gradient(180deg, rgba(240, 170, 120, 0.8) 0%, rgba(240, 170, 120, 0.4) 100%);
  backdrop-filter: blur(5px);
}

.for-web .subtitle-card p {
  font-family: var(--headline-font);
  font-size: var(--fs-14);
  font-weight: var(--fw-400);
  line-height: var(--lh-body-18);
  color: #ffffff;
}

.for-web .phone-section {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex: none;
  padding: 0;
  margin-bottom: -212px;
}

.for-web .phone-img {
  width: 100%;
  max-width: 10rem;
  height: auto;
  display: block;
}

.for-web .bottom-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  width: 100%;
  margin-top: 0;
  padding: 0.64rem 0 0;
  background: var(--panel-bg);
  border: 1px solid #ffffff;
  border-bottom: none;
  border-radius: 0.42667rem 0.42667rem 0 0;
  --web-cards-row-width: calc(640px + 0.10667rem);
}

.for-web .download-cards {
  display: flex;
  gap: 0.10667rem;
  width: var(--web-cards-row-width);
  max-width: calc(100% - 0.85334rem);
  margin: 0 auto;
  padding: 0;
  overflow-x: visible;
  justify-content: center;
}

.for-web .download-card {
  flex: 0 0 320px;
  width: 320px;
  max-width: 320px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  padding: 0.32rem;
  border-radius: 0.42667rem;
  background: rgba(255, 255, 255, 0.1);
}

.for-web .download-card .app-icon {
  width: 1.17333rem;
  height: 1.17333rem;
  border-radius: 0.21333rem;
  object-fit: cover;
  flex-shrink: 0;
}

.for-web .store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.10667rem;
  flex: 1;
  min-width: 0;
  padding: 0.32rem 0.64rem;
  border: none;
  border-radius: 0.96rem;
  background: #ffffff;
  color: #333333;
  font-family: var(--string-font);
  font-size: var(--fs-16);
  font-weight: var(--fw-400);
  line-height: var(--lh-title-20);
  white-space: nowrap;
  cursor: pointer;
}

.for-web .store-btn .store-icon {
  width: 0.64rem;
  height: 0.64rem;
  flex-shrink: 0;
}

.for-web .invite-bar {
  width: var(--web-cards-row-width);
  max-width: calc(100% - 0.85334rem);
  margin: 0 auto;
  padding: 0.32rem 0 0.64rem;
}

.for-web .invite-code-copy {
  display: flex;
  align-items: center;
  gap: 0.10667rem;
  width: 100%;
  padding: 0.21333rem 0.32rem;
  border-radius: 0.42667rem;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.for-web .invite-code-copy .nickname {
  font-family: var(--number-font);
  font-size: var(--fs-12);
  line-height: 0.42667rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.for-web .invite-code-copy .code-text {
  flex: 1;
  min-width: 0;
  font-family: var(--number-font);
  font-size: var(--fs-12);
  line-height: 0.42667rem;
  color: #ffffff;
  word-break: break-all;
}

.for-web .invite-code-copy .copy-icon {
  width: 0.42667rem;
  height: 0.42667rem;
  flex-shrink: 0;
}

.for-web .invite-code-copy .copy-label {
  font-family: var(--number-font);
  font-size: var(--fs-12);
  line-height: 0.42667rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

html[dir='rtl'] .for-web .invite-code-copy {
  flex-direction: row-reverse;
}

/* =============================================================================
   for-mobile
   ============================================================================= */

.for-mobile.page {
  position: relative;
  display: none;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.for-mobile .page-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  z-index: 1;
}

.for-mobile .page-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: auto;
}

.for-mobile .hero {
  padding: 0.42667rem 0.42667rem 0;
}

.for-mobile .headline {
  padding: 0.26667rem 0;
  font-family: var(--headline-font);
  font-size: var(--fs-28);
  font-weight: var(--fw-800);
  font-style: italic;
  line-height: var(--lh-headline-36);
  color: #ffffff;
  text-align: left;
}

.for-mobile .subtitle-card {
  margin-top: 0.10667rem;
  padding: 0.21333rem 0.32rem;
  border: 0.5px solid #ffffff;
  border-radius: 0.32rem;
  background: linear-gradient(180deg, rgba(240, 170, 120, 0.8) 0%, rgba(240, 170, 120, 0.4) 100%);
  backdrop-filter: blur(5px);
}

.for-mobile .subtitle-card p {
  font-family: var(--headline-font);
  font-size: var(--fs-14);
  font-weight: var(--fw-400);
  line-height: var(--lh-body-18);
  color: #ffffff;
}

.for-mobile .phone-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex: none;
  padding: 0;
}

.for-mobile .phone-img {
  width: 100%;
  max-width: 10rem;
  height: auto;
  display: block;
}

.for-mobile .bottom-panel {
  position: relative;
  z-index: 3;
  margin-top: -150px;
  padding: 0.64rem 0 0;
  background: var(--panel-bg);
  border: 1px solid #ffffff;
  border-bottom: none;
  border-radius: 0.42667rem 0.42667rem 0 0;
}

.for-mobile .download-cards {
  display: flex;
  gap: 0.10667rem;
  padding: 0 0.42667rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: auto;
  max-width: none;
  margin: 0;
  justify-content: stretch;
}

.for-mobile .download-card {
  flex: 1;
  flex-shrink: 0;
  min-width: 4rem;
  width: auto;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  padding: 0.32rem;
  border-radius: 0.42667rem;
  background: rgba(255, 255, 255, 0.1);
}

.for-mobile .download-card .app-icon {
  width: 1.17333rem;
  height: 1.17333rem;
  border-radius: 0.21333rem;
  object-fit: cover;
  flex-shrink: 0;
}

.for-mobile .store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.10667rem;
  width: 100%;
  min-width: 0;
  padding: 0.32rem 0.64rem;
  border: none;
  border-radius: 0.96rem;
  background: #ffffff;
  color: #333333;
  font-family: var(--string-font);
  font-size: var(--fs-16);
  font-weight: var(--fw-400);
  line-height: var(--lh-title-20);
  white-space: nowrap;
  cursor: pointer;
}

.for-mobile .store-btn .store-icon {
  width: 0.64rem;
  height: 0.64rem;
  flex-shrink: 0;
}

.for-mobile .invite-bar {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0.32rem 0.42667rem 0.64rem;
}

.for-mobile .invite-code-copy {
  display: flex;
  align-items: center;
  gap: 0.10667rem;
  width: auto;
  padding: 0.21333rem 0.32rem;
  border-radius: 0.42667rem;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.for-mobile .invite-code-copy .nickname {
  font-family: var(--number-font);
  font-size: var(--fs-12);
  line-height: 0.42667rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.for-mobile .invite-code-copy .code-text {
  flex: 1;
  min-width: 0;
  font-family: var(--number-font);
  font-size: var(--fs-12);
  line-height: 0.42667rem;
  color: #ffffff;
  word-break: break-all;
}

.for-mobile .invite-code-copy .copy-icon {
  width: 0.42667rem;
  height: 0.42667rem;
  flex-shrink: 0;
}

.for-mobile .invite-code-copy .copy-label {
  font-family: var(--number-font);
  font-size: var(--fs-12);
  line-height: 0.42667rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

html[dir='rtl'] .for-mobile .invite-code-copy {
  flex-direction: row-reverse;
}

/* =============================================================================
   Responsive toggle
   ============================================================================= */

@media screen and (max-width: 767px) {
  .for-web.page {
    display: none;
  }

  .for-mobile.page {
    display: block;
  }
}
