:root {
  --bg-top: #eef4fb;
  --bg-bottom: #f7fbff;
  --card-bg: #ffffff;
  --text: #0f2438;
  --muted: #4f6172;
  --accent: #1f7ae0;
  --border: #d8e3ef;
  --shadow: rgba(26, 63, 99, 0.08);
  --btn-bg: #ffffff;
}

:root[data-theme="dark"] {
  --bg-top: #0a1422;
  --bg-bottom: #0e1a2a;
  --card-bg: #14263a;
  --text: #e7f0fb;
  --muted: #9cb3c8;
  --accent: #7cb8ff;
  --border: #27415b;
  --shadow: rgba(0, 0, 0, 0.35);
  --btn-bg: #102035;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
}

.site-header {
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

.theme-toggle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--btn-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px var(--shadow);
}

.icon-moon,
.icon-sun {
  position: absolute;
  width: 18px;
  height: 18px;
  font-size: 0;
}

.icon-moon::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: currentColor;
  transform: scale(0.85);
  box-shadow: 5px -3px 0 0 var(--btn-bg);
}

.icon-sun::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin: 3px;
  border-radius: 50%;
  border: 2px solid currentColor;
  box-shadow:
    0 -7px 0 -5px currentColor,
    0 7px 0 -5px currentColor,
    7px 0 0 -5px currentColor,
    -7px 0 0 -5px currentColor,
    5px 5px 0 -5px currentColor,
    -5px 5px 0 -5px currentColor,
    5px -5px 0 -5px currentColor,
    -5px -5px 0 -5px currentColor;
}

.icon-sun {
  opacity: 0;
}

:root[data-theme="dark"] .icon-moon {
  opacity: 0;
}

:root[data-theme="dark"] .icon-sun {
  opacity: 1;
}

.app-grid {
  width: min(980px, 92vw);
  margin: 0 auto;
  padding: 8px 0 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.app-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px var(--shadow);
}

.app-icon {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #dce7f2;
}

.app-content {
  padding: 16px;
}

.app-content h2 {
  margin: 0;
  font-size: 1.2rem;
}

.app-content p {
  margin: 8px 0 14px;
  color: var(--muted);
}

.app-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.app-link:hover {
  text-decoration: underline;
}

.app-link.muted {
  color: var(--muted);
}

.coming-soon-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 36, 56, 0.82);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.site-footer {
  text-align: center;
  padding: 0 20px 36px;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  text-decoration: underline;
}

.policy-wrap {
  width: min(760px, 92vw);
  margin: 42px auto;
  padding: 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 28px var(--shadow);
}

.policy-wrap h1 {
  margin-top: 0;
}

.policy-wrap h2 {
  margin: 24px 0 8px;
  font-size: 1.15rem;
}

.policy-wrap p {
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .theme-toggle {
    left: 12px;
    bottom: 12px;
  }

  .policy-wrap {
    margin-top: 20px;
    padding: 20px;
  }
}
