:root {
  color-scheme: light;
  --bg: #fffaf0;
  --bg-deep: #f7e8c9;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #fffdf8;
  --ink: #37261e;
  --ink-soft: #725e52;
  --accent: #f4a61f;
  --accent-strong: #d77d09;
  --mint: #b9dfdb;
  --line: rgba(86, 58, 41, 0.16);
  --shadow: 0 18px 48px rgba(83, 52, 28, 0.12);
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --content: 1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #201a16;
    --bg-deep: #2c231d;
    --surface: rgba(54, 43, 35, 0.82);
    --surface-solid: #302721;
    --ink: #fff7e9;
    --ink-soft: #d7c4b5;
    --accent: #ffc44f;
    --accent-strong: #ffb52e;
    --mint: #91cbc5;
    --line: rgba(255, 239, 220, 0.14);
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, rgba(244, 166, 31, 0.18), transparent 28rem),
    radial-gradient(circle at 92% 20%, rgba(185, 223, 219, 0.24), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family:
    Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(118, 78, 46, 0.09) 0.8px, transparent 0.8px);
  background-size: 18px 18px;
  content: "";
  pointer-events: none;
}

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

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

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

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 68%, white);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  width: min(calc(100% - 80px), var(--content));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.brand img {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: cover;
}

.brand picture,
.hero-visual picture {
  display: block;
  line-height: 0;
}

.hero-visual picture {
  width: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.nav-links a {
  padding: 8px 11px;
  border-radius: 11px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.nav-links a:hover {
  background: var(--surface);
  color: var(--ink);
}

.nav-links .lang-link {
  margin-left: 4px;
  border: 1px solid var(--line);
  color: var(--ink);
}

.language-menu {
  position: relative;
  margin-left: 4px;
}

.language-menu summary {
  min-width: 88px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  text-align: center;
  white-space: nowrap;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-menu summary::after {
  display: inline-block;
  margin-left: 7px;
  color: var(--ink-soft);
  content: "▾";
  font-size: 10px;
  transition: transform 160ms ease;
}

.language-menu[open] summary {
  background: var(--surface);
}

.language-menu[open] summary::after {
  transform: rotate(180deg);
}

.language-options {
  position: absolute;
  z-index: 100;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  min-width: 160px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.language-options a {
  padding: 9px 11px;
  color: var(--ink-soft);
  text-align: left;
}

.language-options a[aria-current="page"] {
  background: var(--bg-deep);
  color: var(--ink);
}

.hero {
  display: grid;
  min-height: min(660px, calc(100vh - 72px));
  grid-template-columns: minmax(0, 1.14fr) minmax(300px, 0.86fr);
  align-items: center;
  gap: clamp(40px, 6vw, 72px);
  padding-block: 64px;
}

.hero > * {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-lowercase {
  text-transform: lowercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.08;
  word-break: keep-all;
}

.hero h1 span {
  color: var(--accent-strong);
}

.hero-copy {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.7vw, 18px);
  word-break: keep-all;
}

html[lang="ja"] .hero h1,
html[lang="ja"] .hero-copy {
  word-break: normal;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-solid);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(83, 52, 28, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button.primary {
  border-color: transparent;
  background: var(--ink);
  color: var(--bg);
}

.button:hover {
  box-shadow: 0 12px 26px rgba(83, 52, 28, 0.14);
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  isolation: isolate;
  width: min(100%, 390px);
  aspect-ratio: 1 / 1;
  margin-left: auto;
}

.hero-visual::before,
.hero-visual::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
}

.hero-visual::before {
  inset: -9% -7% 4% 10%;
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  filter: blur(1px);
}

.hero-visual::after {
  width: 38%;
  aspect-ratio: 1;
  right: -7%;
  bottom: -6%;
  background: color-mix(in srgb, var(--mint) 72%, transparent);
}

.hero-logo {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: clamp(24px, 4vw, 42px);
  object-fit: contain;
  box-shadow: var(--shadow);
}

.section {
  padding-block: 78px;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 38px;
  text-align: center;
}

.section h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.15;
  word-break: keep-all;
}

.section-lead {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  word-break: keep-all;
}

/* 일본어는 단어 사이 공백이 없어 keep-all을 적용하면 긴 제목이 모바일 화면을
   밀어낼 수 있습니다. 자연스러운 문자 단위 줄바꿈을 허용해 가로 넘침을 막습니다. */
html[lang="ja"] .section h2,
html[lang="ja"] .section-lead {
  word-break: normal;
  overflow-wrap: anywhere;
}

.values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.value-card,
.app-card,
.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(83, 52, 28, 0.06);
}

.value-card {
  padding: 25px;
}

.value-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-strong);
  font-weight: 900;
}

.value-card h3,
.app-card h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.value-card p,
.app-card p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.app-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 21px;
}

/* 실제 성과가 가장 좋은 Daily Counter는 목록의 대표 카드로 보여줍니다.
   기존 카드의 색감은 유지하면서 크기, 테두리, 버튼 위계만 확실히 구분합니다. */
#app-daily-counter {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  overflow: hidden;
  grid-template-areas:
    "top meta"
    "top description"
    "top links";
  grid-template-columns: minmax(380px, 0.95fr) minmax(0, 1.05fr);
  align-content: center;
  column-gap: clamp(28px, 5vw, 64px);
  row-gap: 16px;
  padding: clamp(26px, 4vw, 42px);
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background:
    radial-gradient(circle at 88% 20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 15rem),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface));
  box-shadow: 0 22px 56px rgba(83, 52, 28, 0.14);
}

#app-daily-counter::after {
  position: absolute;
  right: -52px;
  bottom: -74px;
  width: 180px;
  height: 180px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.featured-app-meta {
  z-index: 1;
  display: flex;
  grid-area: meta;
  align-items: center;
  justify-content: flex-start;
}

.featured-app-proof {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
}

.featured-app-proof::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
  content: "";
}

#app-daily-counter .app-top {
  z-index: 1;
  grid-area: top;
  align-self: center;
  gap: 20px;
}

#app-daily-counter .app-icon {
  width: 104px;
  height: 104px;
  flex-basis: 104px;
  border-radius: 26px;
}

#app-daily-counter h3 {
  font-size: clamp(30px, 3.4vw, 40px);
  white-space: nowrap;
}

#app-daily-counter .app-description {
  z-index: 1;
  grid-area: description;
  min-height: 0;
  align-self: center;
  margin-top: 0;
  font-size: 16px;
}

#app-daily-counter .store-links {
  z-index: 1;
  grid-area: links;
  align-self: start;
  margin-top: 0;
}

#app-daily-counter .store-link--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #37261e;
}

#app-daily-counter .store-link--primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.app-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(66, 43, 27, 0.12);
}

.app-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.platform {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.app-description {
  min-height: 70px;
  flex: 1;
}

.app-card p.app-description {
  margin-top: 14px;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.store-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-solid);
  font-size: 12px;
  font-weight: 800;
}

.store-link:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--accent-strong);
}

.developer-store-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.developer-store-links .store-link {
  min-height: 40px;
  padding-inline: 14px;
  background: var(--surface-solid);
}

.about-copy {
  padding: clamp(28px, 4vw, 42px);
}

.about-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.about-copy p + p {
  margin-top: 18px;
}

.contact-box {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  padding: clamp(12px, 1.5vw, 16px) clamp(28px, 4vw, 42px) clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 23%, transparent), transparent 56%),
    var(--surface);
  box-shadow: var(--shadow);
}

.contact-box h2 {
  font-size: clamp(26px, 3.6vw, 36px);
}

.contact-box .eyebrow {
  margin-bottom: 18px;
}

.contact-box p {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

@media (min-width: 681px) {
  .contact-box > .button {
    position: relative;
    top: clamp(6px, 0.5vw, 8px);
  }
}

.site-footer {
  padding-block: 36px;
  border-top: 1px solid var(--line);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 20px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--ink);
}

.copyright {
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.footer-business {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 14px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.footer-business span {
  overflow-wrap: anywhere;
}

/* 개인정보처리방침과 이용약관에 공통으로 사용하는 읽기 전용 문서 레이아웃입니다. */
.legal-hero {
  padding-block: 60px 36px;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.05em;
  line-height: 1.12;
}

.legal-hero p {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 30px;
  padding-bottom: 82px;
}

.legal-nav {
  position: sticky;
  top: 100px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.legal-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.legal-nav a:hover {
  background: var(--bg-deep);
  color: var(--ink);
}

.legal-document {
  min-width: 0;
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.legal-language + .legal-language {
  margin-top: 84px;
  padding-top: 68px;
  border-top: 2px solid var(--line);
}

.legal-language {
  scroll-margin-top: 100px;
}

.legal-document h2 {
  margin: 0 0 24px;
  font-size: clamp(25px, 3.5vw, 32px);
  letter-spacing: -0.035em;
}

.legal-document h3 {
  margin: 36px 0 12px;
  font-size: 18px;
  letter-spacing: -0.02em;
  scroll-margin-top: 100px;
}

.legal-document p,
.legal-document li {
  color: var(--ink-soft);
  font-size: 14px;
}

.legal-document ul,
.legal-document ol {
  padding-left: 24px;
}

.legal-document a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-meta {
  display: inline-flex;
  margin-bottom: 22px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

/* 두 열을 유지하기 어려워지는 시점에는 이미지를 억지로 압축하지 않고
   한 열로 전환해 원본의 정사각형 비율을 보존합니다. */
@media (max-width: 1080px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 64px 80px;
    text-align: center;
  }

  .hero h1 {
    /* 한 열 레이아웃에서는 제목이 사용할 수 있는 가로 폭이 충분하므로,
       데스크톱용 유동 크기의 최솟값보다 크게 유지해 시각적 위계를 보존합니다. */
    font-size: clamp(42px, 7vw, 52px);
    margin-inline: auto;
  }

  .hero-copy {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    width: min(100%, 380px);
    margin-inline: auto;
  }

  .section h2 {
    /* 좁은 화면의 섹션 제목도 본문과 확실히 구분되도록 별도 크기를 적용합니다.
       한 줄이 지나치게 길어지지 않는 범위에서 히어로 제목에 가까운 존재감을 줍니다. */
    font-size: clamp(38px, 7vw, 42px);
  }

  .apps-grid,
  .values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
  }
}

/* 대표 카드 내부가 지나치게 좁아지기 전에 한 열로 전환하여
   큰 앱 아이콘과 제목이 설명 영역을 침범하지 않도록 합니다. */
@media (max-width: 820px) {
  #app-daily-counter {
    grid-template-areas:
      "meta"
      "top"
      "description"
      "links";
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    row-gap: 0;
  }

  .featured-app-meta {
    margin-bottom: 22px;
  }

  #app-daily-counter .app-description {
    margin-top: 22px;
  }

  #app-daily-counter .store-links {
    margin-top: 20px;
  }
}

@media (max-width: 680px) {
  .wrap {
    width: min(calc(100% - 32px), var(--content));
  }

  .nav {
    min-height: 64px;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding-block: 10px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 2px;
    flex-wrap: wrap;
    overflow: visible;
  }

  .nav-links a {
    white-space: nowrap;
  }

  .language-menu {
    margin-left: auto;
  }

  .language-options {
    right: 0;
  }

  .hero {
    padding-top: 50px;
  }

  .section {
    padding-block: 64px;
  }

  .apps-grid,
  .values {
    grid-template-columns: 1fr;
  }

  .app-description {
    min-height: auto;
  }

  .contact-box {
    grid-template-columns: 1fr;
  }

  .contact-box .button {
    width: 100%;
  }

  .footer-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .legal-hero {
    padding-top: 50px;
  }

  .legal-document {
    padding: 24px 20px;
  }
}

/* 매우 좁은 화면에서는 아이콘과 제목을 위아래로 배치해
   Daily Counter 이름을 한 줄로 유지하면서 가로 넘침을 막습니다. */
@media (max-width: 440px) {
  #app-daily-counter .app-top {
    align-items: flex-start;
    flex-direction: column;
  }

  #app-daily-counter .app-icon {
    width: 88px;
    height: 88px;
    flex-basis: 88px;
    border-radius: 22px;
  }

  #app-daily-counter h3 {
    font-size: clamp(28px, 9vw, 34px);
  }
}

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

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