:root {
  --bg: #f4f6f9;
  --card: #fff;
  --text: #1e2633;
  --sub: #5f6b7a;
  --line: #e1e6ed;
  --accent: #1e3a8a;
  --accent2: #0f766e;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161d;
    --card: #1b212b;
    --text: #e8edf3;
    --sub: #9aa6b5;
    --line: #2b3340;
  }
}
* { box-sizing: border-box; }
body {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
header {
  text-align: center;
  padding: 32px 12px;
  margin-bottom: 8px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 24px rgb(30 58 138 / 0.22);
}
h1 { margin: 0; font-size: clamp(1.4em, 6vw, 2.4em); white-space: nowrap; letter-spacing: 0.02em; }
header p { margin: 4px 0 0; opacity: 0.92; font-size: 0.95em; }
h2 { font-size: 1.1em; color: var(--sub); }
#search {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 4px;
  font-size: 1em;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}
#search:focus { outline: 2px solid var(--accent2); border-color: transparent; }
.apps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.apps li {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.apps li:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgb(0 0 0 / 0.1); }
.apps li[hidden] { display: none; }
.apps li.soon { opacity: 0.6; }
.apps li.soon:hover { transform: none; box-shadow: none; }
.icon {
  width: 84px; height: 84px; max-width: 100%;
  border-radius: 20px;
  display: grid; place-items: center;
  font-size: 38px;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 78%, #fff), var(--c));
  box-shadow: 0 4px 10px color-mix(in srgb, var(--c) 30%, transparent);
  transition: transform 0.2s;
}
.apps li:hover .icon { transform: rotate(-6deg) scale(1.05); }
.apps li.soon:hover .icon { transform: none; }
.apps div { line-height: 1.35; }
.apps a, .apps span:not(.icon):not(.wip) { font-size: min(0.95em, 3.6vw); font-weight: bold; color: var(--text); text-decoration: none; }
/* 名前のリンクをカード全体に広げる */
.apps div a::after { content: ""; position: absolute; inset: 0; }
.apps a:focus-visible { outline: none; }
.apps li:has(a:focus-visible) { outline: 2px solid var(--accent2); outline-offset: 2px; }
.apps p { margin: 4px 0 0; font-size: min(0.75em, 2.9vw); color: var(--sub); }
.wip { display: inline-block; margin-left: 4px; font-size: 0.7em; padding: 0 6px; border-radius: 999px; background: var(--line); color: var(--sub); vertical-align: 2px; }
#no-hit { color: var(--sub); text-align: center; }
footer { margin-top: 48px; color: var(--sub); font-size: 0.9em; text-align: center; }
@media (max-width: 420px) {
  .apps { gap: 8px; }
  .apps li { padding: 14px 4px 10px; }
  .icon { width: 64px; height: 64px; font-size: 28px; border-radius: 16px; }
}
h2 small { font-size: 0.75em; font-weight: normal; margin-left: 6px; }
h2[hidden], .apps[hidden] { display: none; }
