:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b7280;
  --card: #f7f7f8;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-fg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0f;
    --fg: #f3f4f6;
    --muted: #9ca3af;
    --card: #18181b;
    --border: #2a2a2e;
    --accent: #3b82f6;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.6;
}

.lang-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.lang-toggle:hover {
  opacity: 0.8;
}

.hero {
  text-align: center;
  padding: 4rem 1.5rem 2rem;
}

.avatar-wrap {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  margin-bottom: 1rem;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.18);
}

.avatar {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--card);
}

.avatar-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(
      90% 55% at 80% 102%,
      rgba(255, 255, 255, 0.2),
      rgba(255, 255, 255, 0) 60%
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.38),
      rgba(255, 255, 255, 0.12) 35%,
      rgba(255, 255, 255, 0) 55%,
      rgba(0, 0, 0, 0.08) 100%
    );
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, 0.55),
    inset -2px -2px 3px rgba(255, 255, 255, 0.4),
    inset 0 0 1px 1px rgba(255, 255, 255, 0.12);
}

.hero h1 {
  margin: 0;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

.apps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.app-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero);
  background-size: cover;
  background-position: center;
  filter: blur(1px) saturate(1.1);
  transform: scale(1.05);
  opacity: 0.3;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .app-card::before {
    opacity: 0.35;
  }
}

.app-card > * {
  position: relative;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.app-link {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.app-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.app-body {
  min-width: 0;
}

.app-name {
  margin: 0 0 0.15rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.app-subtitle {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  line-height: 1.4;
}

.app-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-left: calc(80px + 1rem);
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--fg);
  background: var(--bg);
  transition: opacity 0.15s ease;
}

.btn:hover {
  opacity: 0.8;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
}

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

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

@media (max-width: 480px) {
  .app-actions {
    padding-left: 0;
  }
}
