/* kazuapps「アプリ一覧」。設計は docs/superpowers/specs/2026-10-11-kazuapps-app-list-design.md。
   主役はアプリごとの深い色の面。ほかは静かにする（影、線、飾りを足さない）。
   このファイルは /assets/ で 1 年キャッシュするので、中身を変えたら名前の番号を上げる（site-v2.css）。 */

:root {
  --page: #ECEEF1;
  --ink: #1A1C21;
  --ink-soft: #5A5F69;
  --on-card: #FFFFFF;
  --on-card-soft: rgba(255, 255, 255, .74);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
  --wordmark-font: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #000000;
    --ink: #F2F3F5;
    --ink-soft: #A3A8B2;
  }
}

/* 途中で折り返さない語と、かっこを含む日本語の文節（scripts/tidy-site-text.py が囲む。Tonari のサイトと同じ） */
.nw,
.jw {
  white-space: nowrap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  /* 日本語は文節の途中で折り返さない。折り返す場所は <wbr> で示す */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.masthead,
.apps,
.colophon {
  width: 100%;
  max-width: calc(1080px + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---- 上部 ---- */

.masthead {
  padding-top: clamp(40px, 9vw, 96px);
  padding-bottom: clamp(32px, 6vw, 56px);
}

.wordmark {
  margin: 0;
  font-family: var(--wordmark-font);
  font-size: clamp(56px, 14vw, 136px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: .9;
  /* 大きな文字の左の余白を、下の文の左端にそろえる */
  margin-left: -0.04em;
}

.masthead h1 {
  margin: 20px 0 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
}

.lead {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.shelf ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 24px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.shelf a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 80px;
  text-decoration: none;
  border-radius: 18px;
}

.shelf img {
  width: 72px;
  height: 72px;
  border-radius: 22%;
}

.shelf span {
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  color: var(--ink-soft);
}

.shelf a:hover span {
  color: var(--ink);
}

/* 開いたときに 1 回だけ、アイコンが順に浮かぶ（合計 0.56 秒） */
@media (prefers-reduced-motion: no-preference) {
  .shelf li {
    animation: rise .4s cubic-bezier(.2, .7, .2, 1) both;
  }
  .shelf li:nth-child(2) { animation-delay: .04s; }
  .shelf li:nth-child(3) { animation-delay: .08s; }
  .shelf li:nth-child(4) { animation-delay: .12s; }
  .shelf li:nth-child(5) { animation-delay: .16s; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---- アプリのカード ---- */

.apps {
  display: grid;
  gap: 16px;
}

.app {
  --card: #000000;
  --accent: #FFFFFF;
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 0 16px;
  padding: 20px;
  border-radius: 28px;
  /* アイコンの後ろに、アプリの色の光を薄く置く（カードとアイコンを結ぶ）。地の色と光は別の宣言にする：color-mix() を
     知らないブラウザでは光の宣言だけが無効になり、地の色は残る（scripts/tests/test_css.py） */
  background-color: var(--card);
  background-image:
    radial-gradient(160px 160px at 52px 52px, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
  color: var(--on-card);
  scroll-margin-top: 16px;
}

.app--tonari    { --card: #000000; --accent: #FFB45A; }
.app--michilog  { --card: #073B37; --accent: #14B8A6; }
.app--lastfront { --card: #23300F; --accent: #F0A500; }
.app--ai-usage  { --card: #0E1B38; --accent: #5BC8F5; }
.app--oshinote  { --card: #3D0B22; --accent: #FF4F92; }

.app :focus-visible {
  outline-color: var(--on-card);
}

.app__icon {
  width: 64px;
  height: 64px;
  border-radius: 22%;
  /* 黒いアイコン（Tonari）が黒い面に溶けないように、薄い縁を付ける */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}

/* スマホでは、名前をアイコンの横に、説明から下を全幅に置く（中身をカードのグリッドに直に並べる） */
.app__body {
  display: contents;
}

.app__lead,
.platforms,
.app__note,
.app__actions {
  grid-column: 1 / -1;
}

.app h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.app__lead {
  margin: 16px 0 0;
  max-width: 34em;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.platforms li {
  padding: 1px 12px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.7;
}

.app__note {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--on-card-soft);
  max-width: 40em;
}

.app__actions {
  margin-top: 18px;
  display: grid;
  /* 2 つが横に収まらない幅（375 など）では縦に積む */
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}

.btn--primary {
  background: var(--on-card);
  color: var(--card);
}

.btn--primary:hover {
  background: #E9EBEF;
  background: color-mix(in srgb, var(--accent) 22%, #FFFFFF);
}

.btn--ghost {
  border: 1.5px solid rgba(255, 255, 255, .7);
  color: var(--on-card);
}

.btn--ghost:hover {
  border-color: var(--on-card);
  background: rgba(255, 255, 255, .1);
}

/* 幅 900 以上：アイコン｜文｜ボタン の 3 列 */
@media (min-width: 900px) {
  :root {
    --gutter: 32px;
  }

  .app {
    grid-template-columns: 112px 1fr auto;
    gap: 0 32px;
    padding: 32px;
    background-image:
      radial-gradient(240px 240px at 88px 50%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
  }

  .app__icon {
    width: 112px;
    height: 112px;
    align-self: start;
  }

  .app__body {
    display: block;
    min-width: 0;
  }

  .app__lead,
  .platforms,
  .app__note,
  .app__actions {
    grid-column: auto;
  }

  .app h2 {
    font-size: 28px;
  }

  .app__lead {
    margin-top: 6px;
    font-size: 17px;
  }

  .app__actions {
    margin-top: 0;
    grid-template-columns: 1fr;
    width: 200px;
  }
}

/* ---- 下部 ---- */

.colophon {
  padding-top: 40px;
  padding-bottom: 56px;
  font-size: 14px;
  color: var(--ink-soft);
}

.colophon p {
  margin: 0;
}

@media (prefers-color-scheme: dark) {
  /* 黒い地の上では、カードの縁にアプリの色の線を薄く付けて地と分ける（Tonari の面は地と同じ黒） */
  .app {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
  }

  .shelf img {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
  }
}
