@charset "utf-8";

/* おーるいんわんくん — 共通デザインシステム
   Claude Design「おーるいんわんくん.dc.html」TURN 3（ライト）を基準に実装し、
   TURN 2（ダーク）を prefers-color-scheme で同一マークアップに載せる。 */

/* ---------- トークン ---------- */

:root {
  --backdrop: #EFE7DB;      /* キャンバス外の余白（PC幅で見える面） */
  --card: #FFFFFF;          /* アプリ本体の面 */
  --chrome: #FFFFFF;        /* ヘッダー / タブバー */
  --chrome-line: inset 0 0 0 1px #F1EBE1;
  --surface: #F4F5F6;       /* パネル・フォーム・表 */
  --text: #2B1B33;
  --body: #3C4248;          /* 解説本文 */
  --muted: #5F666D;
  --muted-2: #6B7278;
  --faint: #666D74;
  --line: #E6E8EA;          /* 見出しの罫・表ヘッダ下 */
  --line-soft: #ECEEEF;     /* 表の行間 */
  --field-line: #DEE1E3;
  --dashed: #CFD3D6;
  --accent: #D6247E;
  --accent-bg: #FDE9F2;
  --lime: #E4F13F;
  --amber: #F5A623;
  --amber-bg: #FDF1DE;
  --amber-text: #9C6404;
  --radio-off: #DFE1E1;
  --radio-dot-off: #C4C7C7;
  --radio-on: #D6247E;          /* 選択中の枠。ダークはライムに変わる */
  --radio-bg: #FFFFFF;          /* 未選択の面 */
  --radio-dot-bg: #FFFFFF;
  --radio-on-dot: radial-gradient(circle, #D6247E 0 5px, #fff 6px);
  --chip-bg: #FFFFFF;
  --chip-line: #CFD3D6;
  --focus-ring: rgba(214, 36, 126, .18);
  --result-bg: linear-gradient(180deg, #FDE9F2, #FFFFFF);
  --result-border: 2px solid #2B1B33;
  --result-shadow: 0 4px 0 #2B1B33;
  --result-error-bg: #FBE6CE;
  --result-error-border: 2px solid #2B1B33;
  --row-next: #FDE9F2;
  --nav-filter: none;
  --shell-shadow: 0 18px 40px rgba(31, 35, 40, .12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --backdrop: #17111B;
    --card: #1E1622;
    --chrome: #150F19;
    --chrome-line: none;
    --surface: #2A2030;
    --text: #F7F2EA;
    --body: #C3C8CE;
    --muted: #A8AEB6;
    --muted-2: #8A9099;
    --faint: #6C737C;
    --line: #2E3338;
    --line-soft: #262B30;
    --field-line: #33383F;
    --dashed: #3A4048;
    --accent: #F272A9;
    --accent-bg: rgba(242, 114, 169, .18);
    --amber-bg: rgba(245, 166, 35, .16);
    --amber-text: #F5A623;
    --radio-off: #33383F;
    --radio-dot-off: #4A5058;
    --radio-on: #E4F13F;
    --radio-bg: #2A2030;
    --radio-dot-bg: transparent;
    --radio-on-dot: radial-gradient(circle, #E4F13F 0 5px, transparent 6px);
    --chip-bg: #1E1622;
    --chip-line: #3A4048;
    --focus-ring: rgba(228, 241, 63, .2);
    --result-bg: linear-gradient(180deg, #20302F, #1E2226);
    --result-border: 1.5px solid #E4F13F;
    --result-shadow: none;
    --result-error-bg: #2A241C;
    --result-error-border: 1.5px solid #F5A623;
    --row-next: rgba(242, 114, 169, .12);
    --nav-filter: invert(1) brightness(.92);
    --shell-shadow: 0 24px 50px rgba(20, 18, 16, .35);
  }
}

/* ---------- ベース ---------- */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--backdrop);
  color: var(--text);
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI",
    "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
input, select, button { font-family: inherit; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

/* ピクセルアート素材はニアレストネイバーで拡縮する（2倍素材を等倍で置く） */
.px { image-rendering: pixelated; }

/* 読み上げ専用。カウントアップを1桁ずつ読み上げさせないため、結果は確定文だけを流す */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- アプリシェル（モバイル単一カラム / PC は中央寄せカード） ---------- */

.shell {
  max-width: 520px;
  margin: 0 auto;
  background: var(--card);
  overflow: hidden;
}

@media (min-width: 560px) {
  body { padding: 28px 16px 48px; }
  .shell { border-radius: 30px; box-shadow: var(--shell-shadow); }
}

/* ---------- ヘッダー ---------- */

.hdr {
  display: flex; align-items: center; justify-content: center;
  position: relative; padding: 15px 18px;
  background: var(--chrome); box-shadow: var(--chrome-line);
}
.hdr__brand { display: flex; align-items: center; gap: 9px; color: var(--text); }
.hdr__brand:hover { text-decoration: none; }
.hdr__logo { width: 39px; height: 26px; object-fit: contain; }
.hdr__name { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: .04em; }
.hdr__dots {
  position: absolute; right: 18px;
  font-size: 18px; color: var(--muted-2); letter-spacing: .1em;
}

/* ツールページのヘッダー */
.hdr--tool { justify-content: flex-start; gap: 10px; padding: 14px 18px; }
.hdr__back { font-size: 20px; color: var(--text); line-height: 1; }
.hdr__back:hover { text-decoration: none; }
.hdr__title { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: .03em; }
.hdr__pill {
  margin-left: auto; font-size: 11px; font-weight: 800;
  color: var(--accent); background: var(--accent-bg);
  padding: 4px 10px; border-radius: 99px;
}

/* ---------- ヒーロー ---------- */

.hero {
  position: relative; background: var(--chrome); overflow: hidden;
  /* 元デザインは 480px 幅で高さ 250px = 素材と同じ比率。
     幅可変でも切れないよう比率で持つ。 */
  aspect-ratio: 1738 / 905;
}
.hero img { width: 100%; height: 100%; object-fit: cover; }

.hero-dots {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 0 6px; background: var(--card);
}
.hero-dots span { width: 44px; height: 4px; border-radius: 2px; background: var(--dashed); }
.hero-dots span[data-on] { background: var(--lime); }

/* ---------- 告知バー ---------- */

.notice-wrap { padding: 10px 16px 4px; }
.notice {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; background: var(--surface); border-radius: 16px;
}
.notice__main { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 800; }
.notice__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); }
.notice__count { font-size: 13px; font-weight: 700; color: var(--muted-2); }

/* ---------- 本文コンテナ ---------- */

.body { padding: 20px 16px 6px; display: flex; flex-direction: column; gap: 22px; }
.body--tool { gap: 14px; }

/* ---------- カテゴリ ---------- */

.cat { display: flex; flex-direction: column; gap: 13px; }
.cat__head { display: flex; align-items: center; gap: 9px; }
/* カテゴリ見出しは塗りアイコン（-on）をそのまま使う。反転はタブバーの非選択だけ */
.cat__icon { width: 22px; height: 22px; }
.cat__name { font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.cat__rule { flex: 1; height: 1px; background: var(--line); }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.recent__meta { margin: -4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ---------- ツールタイル ---------- */

.tile { display: flex; flex-direction: column; align-items: center; gap: 9px; color: var(--text); }
.tile:hover { text-decoration: none; }
.tile__box {
  width: 74px; height: 74px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tile-bg); color: var(--tile-fg);
  font-size: 24px; font-weight: 800;
}
.tile__box img { width: 44px; height: 44px; }
.tile__label { font-size: 11px; font-weight: 800; text-align: center; line-height: 1.4; }

.tile--soon .tile__box {
  background: var(--surface); border: 2px dashed var(--dashed);
  font-size: 11px; font-weight: 400; color: var(--faint);
}
.tile--soon .tile__label { color: var(--faint); }

/* タイル配色（カテゴリ内で隣と被らないだけのルール。1色1ツールの固定表は作らない） */
.t-lime   { --tile-bg: #E4F13F; --tile-fg: #2B1B33; }
.t-blue   { --tile-bg: #35A0F0; --tile-fg: #08131E; }
.t-amber  { --tile-bg: #F5A623; --tile-fg: #1E1405; }
.t-pink   { --tile-bg: #FF5C7A; --tile-fg: #26060E; }
.t-purple { --tile-bg: #8B7BF0; --tile-fg: #100B26; }
.t-terra  { --tile-bg: #E2725B; --tile-fg: #FFFFFF; }
@media (prefers-color-scheme: dark) {
  .t-terra { --tile-bg: #F7F2EA; --tile-fg: #1E1622; }
}

/* ---------- マスコットのひとこと ---------- */

.mascot-note {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--surface); border-radius: 16px;
}
.mascot-note img { width: 51px; height: 34px; object-fit: contain; flex: none; }
.mascot-note p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ---------- フッター ---------- */

.foot { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 9px; }
.foot--tool { padding-top: 20px; }
.foot__links { display: flex; gap: 14px; font-size: 12px; }
.foot__links a { color: var(--muted); }
.foot__meta { font-size: 11px; color: var(--faint); line-height: 1.7; }

/* ---------- タブバー ---------- */

.tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 10px 8px 14px; background: var(--chrome); box-shadow: var(--chrome-line);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--muted-2); font-size: 11px; font-weight: 800;
}
.tabs a:hover { text-decoration: none; }
.tabs img { width: 26px; height: 26px; filter: var(--nav-filter); }
.tabs a[aria-current] { color: var(--accent); }
.tabs a[aria-current] img { filter: none; }

/* ---------- フォーム ---------- */

.lead { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.8; }

.form { background: var(--surface); border-radius: 22px; padding: 18px 16px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 13px; font-weight: 800; color: var(--muted); }
.field__hint { margin: -2px 0 0; font-size: 12px; color: var(--muted-2); line-height: 1.7; }
.field__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.field-action {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 8px 12px;
  border: 1.5px solid var(--chip-line); border-radius: 999px;
  background: var(--chip-bg); color: var(--text);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.field-action[data-tone="ghost"] { color: var(--muted); }

/* iOS Safari のフォーカス時オートズームを避けるため 16px 以上を必須にする */
.input {
  width: 100%; min-height: 52px; font-size: 17px; padding: 13px 14px;
  border: 2px solid var(--field-line); border-radius: 14px;
  background: var(--card); color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.input:focus {
  outline: none;
  border-color: var(--radio-on);
  box-shadow: 0 0 0 4px var(--focus-ring);
}
.input--native-hidden { display: none; }

.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(142px, 1fr)); gap: 8px; }
.opts--3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.opt {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; text-align: left;
  padding: 12px 13px; border: 2px solid var(--radio-off); border-radius: 13px;
  background: var(--radio-bg); color: var(--text); cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.opts--3 .opt { justify-content: center; padding: 12px 8px; }
.opts--3 .opt__label { font-size: 15px; }
.opt__dot {
  width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2px solid var(--radio-dot-off); background: var(--radio-dot-bg);
}
.opt__label { font-size: 15px; font-weight: 700; line-height: 1.45; }
.opt[aria-checked="true"] { border-color: var(--radio-on); background: var(--accent-bg); }
.opt[aria-checked="true"] .opt__dot { border-color: var(--radio-on); background: var(--radio-on-dot); }
.opt:focus-visible,
.field-action:focus-visible,
.submit:focus-visible {
  outline: none;
  border-color: var(--radio-on);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.choice-chip {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 46px;
  padding: 10px 12px; border: 2px solid var(--radio-off); border-radius: 13px;
  background: var(--radio-bg); color: var(--text);
  font-size: 14px; font-weight: 700; text-align: center; cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.choice-chip[aria-checked="true"] { border-color: var(--radio-on); background: var(--accent-bg); }
.choice-chip:focus-visible {
  outline: none;
  border-color: var(--radio-on);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.time-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.submit {
  width: 100%; padding: 16px; font-size: 17px; font-weight: 800;
  color: #2B1B33; background: var(--lime); border: none; border-radius: 15px; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.submit:active { transform: translateY(2px); }

/* ---------- 結果カード ---------- */

.result {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px; border-radius: 22px;
  border: var(--result-border); box-shadow: var(--result-shadow);
  background: var(--result-bg);
}
.result[data-phase="error"] { background: var(--result-error-bg); border: var(--result-error-border); }
.result[data-phase="done"] { animation: ow-pop .42s cubic-bezier(.2, .9, .3, 1.2) both; }

.result__shine { position: absolute; inset: 0; overflow: hidden; border-radius: 22px; pointer-events: none; }
.result__shine i {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .6) 50%, transparent 60%);
}
.result[data-phase="done"] .result__shine i { animation: ow-shine .9s ease-out .15s 1; }

.result__head { position: relative; display: flex; align-items: center; gap: 12px; }
.result__face { flex: none; }
.result[data-phase="done"] .result__face { animation: ow-wiggle .5s ease-in-out 2; }
.result__face img { width: 75px; height: 50px; object-fit: contain; }
.result__kicker { font-size: 12px; font-weight: 800; color: var(--accent); }
.result__sub { font-size: 13px; color: var(--muted); line-height: 1.6; }

.result__num { position: relative; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.result__date { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.result__days { font-size: 46px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--accent); }
.result__days--wide { font-size: 34px; line-height: 1.35; }
.result__unit { font-size: 18px; font-weight: 800; }
.result__tail, .result__mid { font-size: 14px; color: var(--muted); }

.result-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.result-grid--2 { grid-template-columns: repeat(2, 1fr); }
.result-box {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; text-align: center;
  padding: 10px 8px; border-radius: 16px; background: var(--chip-bg); border: 1.5px solid var(--chip-line);
}
.result-box__label { font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1.4; }
.result-box__value { font-size: 18px; font-weight: 800; color: var(--accent); line-height: 1.2; font-variant-numeric: tabular-nums; }
.result-box__sub { font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

.chips { position: relative; display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 11px; font-weight: 700; background: var(--chip-bg);
  border: 1.5px solid var(--chip-line); border-radius: 99px; padding: 4px 10px;
}
.chip--duty { background: var(--amber-bg); border-color: var(--amber); color: var(--amber-text); }

/* ---------- 表 ---------- */

.panel { background: var(--surface); border-radius: 22px; overflow: hidden; }
.panel__head { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.panel__title { font-size: 14px; font-weight: 800; }
.panel__note { font-size: 11px; color: var(--muted-2); }

.ow-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ow-table th {
  text-align: left; font-size: 12px; font-weight: 800; color: var(--muted-2);
  padding: 8px 16px; border-bottom: 1px solid var(--line);
}
.ow-table th:nth-child(2) { padding: 8px 8px; }
.ow-table th:last-child { text-align: right; }
.ow-table td { font-size: 14px; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); }
.ow-table td:nth-child(2) { padding: 11px 8px; color: var(--muted); }
.ow-table td:last-child { text-align: right; white-space: nowrap; }
.ow-table .days { font-size: 16px; font-weight: 800; }
.ow-table .unit { font-size: 12px; }
.ow-table tr[data-next] td { background: var(--row-next); }
.ow-table .empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 16px; }

/* 解説内の付与日数表は列が多いので、狭い画面では横スクロールさせる */
.scroll-x { overflow-x: auto; background: var(--surface); border-radius: 16px; }
.ow-table--compact th, .ow-table--compact td { padding: 9px 10px; font-size: 13px; white-space: nowrap; }
.ow-table--compact th { font-size: 11px; line-height: 1.3; text-align: right; }
.ow-table--compact th:first-child, .ow-table--compact td:first-child { text-align: left; }
.ow-table--compact td { text-align: right; }
.ow-table--compact td:nth-child(2) { color: inherit; }
.ow-table--compact tr:last-child td { border-bottom: none; }

.badge-duty {
  display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 800;
  background: var(--amber-bg); border: 1.2px solid var(--amber); color: var(--amber-text);
  border-radius: 99px; padding: 2px 6px;
}

/* 印刷時は装飾を落として読める表にする */
@media print {
  .ow-table td, .ow-table th { background: #fff !important; color: #000 !important; }
}

/* ---------- 解説・FAQ ---------- */

.prose { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.prose h2 { margin: 0; font-size: 18px; font-weight: 800; }
.prose h3 { margin: 0; font-size: 15px; font-weight: 800; }
.prose p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--body); text-wrap: pretty; }
.prose a { text-decoration: underline; }

.faq { background: var(--surface); border-radius: 16px; padding: 14px 16px; }
.faq summary { font-size: 14px; font-weight: 800; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.faq summary::after { content: "＋"; color: var(--accent); font-size: 18px; }
.faq[open] summary::after { content: "－"; }
.faq p { margin: 10px 0 0; font-size: 13px; line-height: 1.85; color: var(--body); }

.related { display: flex; flex-direction: column; gap: 11px; padding-top: 4px; }
.related__title { font-size: 15px; font-weight: 800; }

/* ---------- モーション ---------- */

@keyframes ow-pop {
  0% { transform: scale(.92) translateY(10px); opacity: 0 }
  65% { transform: scale(1.02) translateY(0); opacity: 1 }
  100% { transform: scale(1) }
}
@keyframes ow-wiggle {
  0%, 100% { transform: rotate(-4deg) }
  50% { transform: rotate(4deg) }
}
@keyframes ow-shine {
  0% { transform: translateX(-100%); opacity: 1 }
  100% { transform: translateX(100%); opacity: 0 }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================================================================
   トップページ（Claude Design「おーるいんわんくん トップ（スマホ改善）」）

   ホーム / さがす / 最近 / 情報 の4ビューを1枚の HTML に持ち、
   .shell--home[data-view] で出し分ける。ツールページに影響を出さないため、
   このセクションのセレクタはすべて .shell--home 配下に閉じている。
   ================================================================ */

.shell--home {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 100vh;
  /* sticky なチップバー/タブバーを効かせるため、スクロールコンテナを作らない */
  overflow: visible;

  --bar-bg: rgba(255, 255, 255, .94);
  --bar-bg-strong: rgba(255, 255, 255, .96);
  --bar-line: #EFEAE2;
  --chip-count: #8A9099;
  --chip-on-text: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  .shell--home {
    --bar-bg: rgba(21, 15, 25, .94);
    --bar-bg-strong: rgba(21, 15, 25, .96);
    --bar-line: #2E3338;
    --chip-on-text: #17111B;
  }
}

@media (min-width: 560px) {
  .shell--home {
    min-height: calc(100vh - 76px);
    /* clip はスクロールコンテナを作らないので、角丸のクリップと sticky が両立する */
    overflow: clip;
  }
}

.shell--home [hidden] { display: none !important; }

/* ---------- ビュー切り替え ---------- */

.shell--home .view { display: none; flex-direction: column; }
.shell--home[data-view="home"] .view--home,
.shell--home[data-view="home"] .view--tools,
.shell--home[data-view="all"] .view--tools,
.shell--home[data-view="recent"] .view--recent,
.shell--home[data-view="info"] .view--info { display: flex; }

.shell--home[data-view="all"] .view--tools,
.shell--home[data-view="recent"] .view--recent,
.shell--home[data-view="info"] .view--info { animation: ow-fade .24s ease both; }

@keyframes ow-fade {
  from { opacity: 0; transform: translateY(6px) }
  to { opacity: 1; transform: none }
}

/* ---------- ヘッダー ---------- */

.hdr--home { justify-content: flex-start; gap: 9px; padding: 13px 16px; }
.hdr--home .hdr__name { flex: none; }
.hdr__count {
  margin-left: auto; font-size: 11px; font-weight: 800;
  color: var(--accent); background: var(--accent-bg);
  padding: 5px 10px; border-radius: 99px; white-space: nowrap;
}

/* ---------- ヒーロー下の注記 ---------- */

.notice-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px 4px;
}
.notice-row__main { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--body); }
.notice-row__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); flex: none; }
.notice-row__sub { font-size: 12px; font-weight: 700; color: var(--muted-2); text-align: right; }

/* ---------- カテゴリチップ（横スクロール・上に固定） ---------- */

.chipbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bar-bg); backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--bar-line);
}
.shell--home .chipbar { display: none; }
.shell--home[data-view="home"] .chipbar,
.shell--home[data-view="all"] .chipbar { display: block; }

.chipbar__inner {
  display: flex; gap: 8px; padding: 11px 16px;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.noscroll::-webkit-scrollbar { display: none; }

.chip-cat {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  min-height: 44px; padding: 10px 15px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--card); color: var(--body);
  font: inherit; font-size: 14px; font-weight: 800; white-space: nowrap;
  cursor: pointer; scroll-snap-align: start;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.chip-cat__count { font-size: 11px; font-weight: 700; color: var(--chip-count); }
.chip-cat[aria-pressed="true"] {
  border-color: var(--text); background: var(--accent); color: var(--chip-on-text);
}
.chip-cat[aria-pressed="true"] .chip-cat__count { color: currentColor; opacity: .8; }
.chip-cat:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus-ring); }

/* ---------- 本文コンテナ ---------- */

.home-main { flex: 1; padding: 18px 16px 26px; display: flex; flex-direction: column; gap: 20px; }

.view__title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: .03em; }

/* ---------- カテゴリ（ホーム = 1つだけ / さがす = 全部） ---------- */

.shell--home .view--tools { gap: 26px; }
.shell--home[data-view="home"] .view--tools { gap: 16px; }

.all-lead { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.8; }
.shell--home[data-view="home"] .all-lead { display: none; }

.shell--home .cat { scroll-margin-top: 64px; }
.shell--home .cat__name { margin: 0; }
.shell--home .cat__count { font-size: 11px; font-weight: 700; color: var(--muted-2); }
.shell--home .cat__note { margin: -6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* さがすビュー: 罫線つきの小見出し */
.shell--home[data-view="all"] .cat__head { align-items: center; }
.shell--home[data-view="all"] .cat__count--long,
.shell--home[data-view="all"] .cat__note { display: none; }

/* ホームビュー: 選択中の1カテゴリだけを大きな見出しで出す */
.shell--home[data-view="home"] .cat { display: none; gap: 16px; }
.shell--home[data-view="home"] .cat.is-active { display: flex; }
.shell--home[data-view="home"] .cat__head { align-items: baseline; gap: 10px; }
.shell--home[data-view="home"] .cat__name { font-size: 20px; letter-spacing: .03em; }
.shell--home[data-view="home"] .cat__rule,
.shell--home[data-view="home"] .cat__count--short { display: none; }
.shell--home[data-view="home"] .cat__count--long { font-size: 12px; }

/* ---------- 前後のカテゴリ送り ---------- */

.cat-pager { display: flex; gap: 10px; padding-top: 2px; }
.shell--home[data-view="all"] .cat-pager { display: none; }
.cat-pager__btn {
  flex: 1; min-height: 52px; padding: 12px 14px; border-radius: 14px;
  font: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
  border: 2px solid var(--line); background: var(--card); color: var(--body);
  text-align: left;
}
.cat-pager__btn--next {
  border-color: #2B1B33; background: var(--lime); color: #2B1B33; text-align: right;
}
.cat-pager__btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus-ring); }

/* ---------- タイル（トップページの寸法はデザイン準拠） ---------- */

.shell--home .grid { gap: 10px 8px; }
.shell--home .tile { gap: 8px; min-height: 112px; }
.shell--home .tile__box {
  width: 100%; max-width: 70px; height: auto; aspect-ratio: 1; font-size: 22px;
}
.shell--home .tile__label { font-size: 12px; line-height: 1.35; letter-spacing: -.01em; }

/* ---------- 最近つかった（空のとき） ---------- */

.shell--home .view--recent { gap: 16px; }
.empty-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 34px 20px; background: var(--surface); border-radius: 22px; text-align: center;
}
.empty-card img { width: 44px; height: 44px; object-fit: contain; }
.empty-card__title { margin: 0; font-size: 13px; font-weight: 800; line-height: 1.7; }
.empty-card__note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.8; }
.empty-card__cta {
  min-height: 48px; padding: 13px 20px; border: 2px solid #2B1B33; border-radius: 14px;
  background: var(--lime); color: #2B1B33; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer;
}
.empty-card__cta:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus-ring); }

/* ---------- このサイトについて ---------- */

.shell--home .view--info { gap: 18px; }
.shell--home .mascot-note { padding: 16px; }
.shell--home .mascot-note p { line-height: 1.8; }

.spec { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.spec__row { display: flex; justify-content: space-between; gap: 16px; }
.spec__row:not(:last-child) { padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.spec dt { font-size: 13px; font-weight: 800; color: var(--muted); }
.spec dd { margin: 0; font-size: 13px; font-weight: 700; text-align: right; }

.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-row {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; padding: 14px 16px;
  border: 2px solid var(--line); border-radius: 14px;
  color: var(--text); font-size: 14px; font-weight: 800;
}
.link-row:hover { text-decoration: none; }
.link-row__arrow { color: var(--muted-2); }

/* ---------- タブバー（下に固定） ---------- */

.tabs--home {
  position: sticky; bottom: 0; z-index: 30;
  gap: 4px; padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
  background: var(--bar-bg-strong); backdrop-filter: blur(8px);
  box-shadow: 0 -1px 0 var(--bar-line);
}
.tabs--home .tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 56px; padding: 6px 2px; border: none; background: none;
  font: inherit; font-size: 11px; font-weight: 800; color: var(--muted-2); cursor: pointer;
}
.tabs--home .tab[aria-current] { color: var(--accent); }
.tabs--home .tab__icon { width: 26px; height: 26px; filter: var(--nav-filter); }
.tabs--home .tab[aria-current] .tab__icon { filter: none; }
/* マスコットは多色なので、ダークでも反転させない */
.tabs--home .tab--mascot .tab__icon { filter: none; }
.tabs--home .tab:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus-ring); border-radius: 12px; }
