:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --border: #e5e5e5;
  --card-bg: #ffffff;
  --hover-border: #111111;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(960px, 90%);
  margin-inline: auto;
}

/* Header */
header.site {
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 20;
}

header.site .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #111111;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

/* Main */
main {
  flex: 1;
  padding: 48px 0 64px;
}

/* Centered Page Titles */
.page-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  color: var(--text);
}

/* App Grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  transition: border-color 0.2s, transform 0.2s;
  color: var(--text);
  height: 100%;
}

.app-card:hover {
  border-color: var(--hover-border);
  transform: translateY(-2px);
  text-decoration: none;
}

.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  margin-bottom: 20px;
  background: #fafafa;
}

.app-icon-img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.app-icon-img.lg {
  width: 110px;
  height: 110px;
  border-radius: 24px;
}

.app-card h2,
.app-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.app-card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Carousel controls */
.carousel-nav-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.carousel-nav-btn:hover {
  border-color: var(--hover-border);
  background: #f5f5f5;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
}

.carousel-dot.active {
  background: var(--text);
}

/* App Detail Page */
.app-detail-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.app-detail-header .app-icon {
  width: 110px;
  height: 110px;
  font-size: 3rem;
  border-radius: 26px;
}

.app-detail-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.app-detail-header .app-desc {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 540px;
}

.legal-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.legal-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.legal-content {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.65;
}

.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-content p {
  margin-bottom: 14px;
  line-height: 1.65;
}

.legal-content ul {
  margin: 10px 0 16px 20px;
}

.legal-content li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.legal-content .effective-date {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.placeholder-box {
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Support Page */
.support-card {
  max-width: 600px;
  margin: 0 auto 48px;
  text-align: center;
  padding: 36px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.support-card h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.support-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.support-email {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  display: inline-block;
  margin-bottom: 12px;
}

/* FAQ */
.faq-section {
  max-width: 680px;
  margin: 0 auto;
}

.faq-section h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

details {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: #ffffff;
}

summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--muted);
}

details[open] summary::after {
  content: "−";
}

details p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */
footer.site {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: auto;
  background: #ffffff;
}

footer.site .container {
  display: flex;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 820px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 540px) {
  .app-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
