/* sorapps.com: 밝은 화면은 낮 하늘, 어두운 화면은 밤 하늘(머리 그림도 같이 바뀐다). 글꼴은 방문자 기기 글꼴만 쓴다. */
:root {
  color-scheme: light dark;
  --bg: #f3f8fe;
  --surface: #ffffff;
  --text: #10233f;
  --muted: #566a86;
  --line: #dde7f3;
  --accent: #1c74dc;
  --accent-hover: #135fbb;
  --accent-text: #ffffff;
  --chip: #e8f1fc;
  --chip-text: #1d5aa6;
  --new: #ffd34d;
  --new-text: #4a3500;
  --shadow: 0 1px 2px rgba(16, 35, 63, 0.06), 0 8px 24px rgba(16, 35, 63, 0.06);
  --radius: 22px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1322;
    --surface: #111d31;
    --text: #e7eef9;
    --muted: #9db0ca;
    --line: #213250;
    --accent: #5ea9ff;
    --accent-hover: #86beff;
    --accent-text: #071629;
    --chip: #18294a;
    --chip-text: #a8cbf7;
    --new: #ffd75e;
    --new-text: #3a2a00;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.25);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

html:lang(ja) body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic",
    Meiryo, "Segoe UI", Roboto, sans-serif;
  word-break: normal;
  line-break: strict;
}

html:lang(en) body {
  word-break: normal;
}

a {
  color: var(--accent);
}

a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 8px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 10px;
}

/* 머리 줄 */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: block;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.langs a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.3;
}

.langs a:hover {
  color: var(--text);
  background: var(--chip);
}

.langs a[aria-current="page"] {
  color: var(--chip-text);
  background: var(--chip);
  font-weight: 700;
}

/* 좁은 휴대폰: 머리 줄이 한 줄에 들어가게 줄인다 */
@media (max-width: 420px) {
  .top {
    gap: 8px;
  }

  .brand {
    gap: 8px;
    font-size: 15px;
  }

  .brand img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .langs {
    gap: 0;
  }

  .langs a {
    padding: 5px 7px;
    font-size: 13px;
  }
}

/* 머리 그림: 글을 그림 위에 얹지 않는다(화면 폭마다 빈 하늘 자리가 달라지고, 밤 그림 구름 위 흰 글자는 읽기 어렵다).
   휴대폰은 그림 아래 글, 넓은 화면은 왼쪽 글과 오른쪽 그림 카드 */
.hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 4px;
}

.hero picture {
  display: block;
  border-radius: 26px;
  overflow: hidden;
  background: #4fb3ff;
  box-shadow: var(--shadow);
}

@media (prefers-color-scheme: dark) {
  .hero picture {
    background: #1b2f73;
  }
}

.hero-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.hero-text {
  padding: 0 2px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(27px, 4.2vw, 46px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.ph {
  display: inline-block;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 19px);
  max-width: 32em;
}

@media (min-width: 860px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    align-items: center;
    gap: clamp(32px, 5vw, 64px);
    padding-top: 12px;
  }

  .hero-text {
    order: -1;
  }
}

/* 앱 목록 */
.apps {
  padding-top: clamp(32px, 6vw, 56px);
  padding-bottom: 24px;
}

.apps h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 16px;
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.3;
}

.count {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.app-icon {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--chip);
  box-shadow: 0 0 0 1px var(--line);
}

.card h3 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.35;
}

.sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.tag.new {
  background: var(--new);
  color: var(--new-text);
}

.desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  flex: 1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-play {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-play:hover {
  background: var(--accent-hover);
}

.btn-site {
  color: var(--text);
  border-color: var(--line);
  background: transparent;
}

.btn-site:hover {
  background: var(--chip);
}

.empty {
  color: var(--muted);
}

/* 아래 줄 */
.foot {
  margin-top: 24px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.foot p {
  margin: 0 0 8px;
}

.foot .contact a {
  font-weight: 700;
}

.sns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.sns a {
  color: var(--muted);
}

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

.small {
  font-size: 12px;
}

/* 404 */
.nf {
  padding: 48px 0 32px;
}

.nf section {
  margin-bottom: 28px;
}

.nf h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.nf p {
  margin: 0 0 6px;
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .langs a {
    transition: background-color 0.15s ease, color 0.15s ease;
  }
}
