:root {
  color-scheme: light;
  --ink: #18211d;
  --muted: #64716b;
  --line: #dce5df;
  --paper: #f7faf8;
  --card: #fff;
  --accent: #167a52;
  --accent-dark: #0c5d3d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at 12% 0%, #e4f5eb 0, transparent 34rem), var(--paper);
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

main {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

header,
.section-head,
.app-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

header,
.app-top {
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.mark,
.app-icon {
  display: grid;
  place-items: center;
  color: #fff;
}

.mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero {
  max-width: 760px;
  padding: clamp(76px, 12vw, 132px) 0 54px;
}

h1 {
  max-width: 700px;
  margin: 12px 0 18px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.85;
}

.section-head {
  align-items: end;
  margin-bottom: 18px;
}

h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.count {
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.app {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: inherit;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: 0 18px 50px rgba(34, 65, 50, 0.07);
  text-decoration: none;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.app:hover {
  transform: translateY(-3px);
  border-color: #9ab9a8;
  box-shadow: 0 24px 58px rgba(34, 65, 50, 0.12);
}

.app:focus-visible {
  outline: 3px solid #77c7a2;
  outline-offset: 3px;
}

.app-top {
  gap: 12px;
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(145deg, #1d8a5e, #0b6844);
  font-size: 25px;
  font-weight: 760;
}

.status {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #edf1ee;
  font-size: 11px;
  font-weight: 750;
}

.status[data-status="production"] {
  color: #0c5d3d;
  background: #e7f6ed;
}

.status[data-status="closed_beta"] {
  color: #805b12;
  background: #fff3ce;
}

.status[data-status="maintenance"] {
  color: #8b3a36;
  background: #fbe9e7;
}

.status[data-status="unavailable"] {
  color: #59635e;
  background: #e9eeeb;
}

h3 {
  margin: 28px 0 9px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.app p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.open {
  margin-top: auto;
  padding-top: 24px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 750;
}

.portal-error {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: var(--card);
}

footer {
  margin-top: 42px;
  color: #829089;
  font-size: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #edf4f0;
    --muted: #9eada5;
    --line: #30423a;
    --paper: #111814;
    --card: #18221d;
    --accent: #65d39e;
    --accent-dark: #8ce5b8;
  }

  body {
    background: radial-gradient(circle at 12% 0%, #173c2c 0, transparent 34rem), var(--paper);
  }

  .mark {
    color: #122019;
    background: #ddf7e8;
  }

  .status {
    background: #27332d;
  }

  .status[data-status="production"] {
    color: #8ce5b8;
    background: #183e2d;
  }

  .status[data-status="closed_beta"] {
    color: #f1cf76;
    background: #443716;
  }

  .status[data-status="maintenance"] {
    color: #f2aaa3;
    background: #462824;
  }

  .status[data-status="unavailable"] {
    color: #aeb9b3;
    background: #2a332e;
  }

  .app {
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
  }
}

@media (max-width: 560px) {
  main {
    width: min(100% - 28px, 1080px);
    padding-top: 24px;
  }

  .hero {
    padding-top: 68px;
  }

  .app {
    min-height: 225px;
  }
}
