:root {
  --bg: #f4f7fd; --card: #ffffff; --ink: #14234a; --muted: #55678a; --line: #d9e3f3;
  --blue: #2a6fd6; --violet: #5b4bc4; --violet-soft: #efeafb; --sky: #e1effc; --mint: #e2f6ef; --mark: #ffe58a;
  --shadow: 0 8px 26px rgba(40, 70, 140, .10);
  --btn-from: #2a8de3; --btn-to: #1b5fcf;
  --flag-bg: #fff0cf; --flag-fg: #744600;
  --font-head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1630; --card: #15264b; --ink: #e9f0fd; --muted: #aebbd6; --line: #2a4379; --blue: #86b6ff; --violet: #b9aaff; --violet-soft: #2a2457; --sky: #183261; --mint: #12373b; --mark: #6e5d1c; --shadow: 0 8px 26px rgba(0,0,0,.35); --flag-bg: #3b2c0c; --flag-fg: #f3c66f; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 1rem; line-height: 1.9; letter-spacing: .02em; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 900; line-height: 1.5; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* 確認の印（見本のみ） */
.flag { display: inline-block; vertical-align: middle; margin-left: .5em; padding: 0 .6em; font-size: .72rem; font-weight: 700; line-height: 1.7; color: var(--flag-fg); background: var(--flag-bg); border: 1px solid var(--flag-fg); border-radius: 4px; max-width: 100%; }
body.clean .flag { display: none; }
.proof { background: var(--flag-bg); color: var(--flag-fg); font-size: .86rem; line-height: 1.7; }
.proof .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-block: 10px; }
.proof p { flex: 1 1 280px; min-width: 0; }
.proof button { font: inherit; font-weight: 700; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 6px; padding: 4px 12px; cursor: pointer; }
body.clean .proof { background: var(--sky); color: var(--muted); }

/* ヘッダー */
.site-head { background: color-mix(in srgb, var(--card) 94%, transparent); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 42px; height: 38px; flex: none; }
.brand b { font-family: var(--font-head); font-weight: 900; font-size: 1.5rem; letter-spacing: .04em; line-height: 1.2; }
.brand small { display: block; font-size: .74rem; color: var(--muted); font-weight: 500; line-height: 1.4; letter-spacing: .02em; }
.head-link { font-family: var(--font-head); font-weight: 700; font-size: .92rem; text-decoration: none; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 18px; white-space: nowrap; }
.head-link:hover { background: var(--ink); color: var(--card); }

/* 一覧ページ上部 */
.lp-top { padding-block: clamp(30px, 5vw, 56px) 8px; }
.lp-top h1 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); }
.lp-top .sub { color: var(--muted); margin-top: 10px; max-width: 40em; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 26px; }
.search { position: relative; flex: 1 1 280px; max-width: 380px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px 11px 42px; }
.search input::placeholder { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-weight: 500; font-size: .92rem; color: var(--ink); background: transparent; border: 0; border-radius: 10px; padding: 8px 16px; cursor: pointer; }
.chip:hover { background: var(--violet-soft); }
.chip[aria-pressed="true"] { background: var(--violet); color: #fff; font-weight: 700; }

.count { margin: 22px 0 16px; font-size: .88rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-bottom: clamp(36px, 6vw, 64px); }
.empty { padding: 40px 0 70px; color: var(--muted); }

/* カード */
.acard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.acard[hidden], .catsec[hidden] { display: none; }
/* カテゴリ色 */
[data-cc="know"], [data-cat="know"] { --cc: #2a6fd6; }
[data-cc="work"], [data-cat="work"] { --cc: #0f7482; }
[data-cc="job"], [data-cat="job"] { --cc: #5b4bc4; }
[data-cc="mind"], [data-cat="mind"] { --cc: #c2441d; }
[data-cc="student"], [data-cat="student"] { --cc: #26407f; }
@media (prefers-color-scheme: dark) {
  [data-cc="know"], [data-cat="know"] { --cc: #86b6ff; }
  [data-cc="work"], [data-cat="work"] { --cc: #6fd0d6; }
  [data-cc="job"], [data-cat="job"] { --cc: #b9aaff; }
  [data-cc="mind"], [data-cat="mind"] { --cc: #ffa17f; }
  [data-cc="student"], [data-cat="student"] { --cc: #9db6ee; }
}
.acard { border: 2px solid var(--cc, var(--line)); }
.acard:hover { border-color: var(--cc); }
.catsec { margin-top: 8px; }
.cathead { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; margin: 18px 0 14px; color: var(--ink); }
.cathead i, .chip i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--cc); flex: none; }
.cathead small { font-family: var(--font-body); font-weight: 500; font-size: .84rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 8px; }
.chip[data-cc][aria-pressed="true"] { background: var(--cc); }
.chip[data-cc][aria-pressed="true"] i { background: #fff; }
.advbanner { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; margin: 10px 0 clamp(36px, 6vw, 64px); padding: clamp(20px, 3vw, 30px); border-radius: 20px; text-decoration: none; background: linear-gradient(120deg, #1a2f66, #3a5fb0); color: #fff; box-shadow: var(--shadow); }
.advbanner small { font-size: .8rem; font-weight: 700; opacity: .85; }
.advbanner h2 { font-size: 1.35rem; margin: 2px 0 4px; }
.advbanner p { font-size: .92rem; opacity: .92; max-width: 34em; }
.advbanner .go { font-family: var(--font-head); font-weight: 700; background: #fff; color: #1a2f66; border-radius: 999px; padding: 8px 20px; white-space: nowrap; }
.advbanner:hover { filter: brightness(1.08); }
.advnote { margin-top: 22px; max-width: 760px; }
.advnote h2 { font-size: 1.05rem; margin-bottom: 6px; }
.head-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.guide .viewer { max-width: 920px; }
.guide .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--card); scrollbar-width: thin; }
.guide figure { flex: 0 0 100%; scroll-snap-align: start; margin: 0; }
.guide figure img { width: 100%; height: auto; }
.guide .vbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.guide .vbar button { font: inherit; font-family: var(--font-head); font-weight: 700; color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 20px; cursor: pointer; min-height: 44px; }
.guide .vbar button:disabled { opacity: .35; cursor: default; }
.guide .vpos { font-weight: 700; color: var(--muted); }
.guide .pdf { display: inline-block; margin-top: 10px; font-size: .9rem; color: var(--muted); text-underline-offset: 4px; }
.acard:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(40, 70, 140, .16); }
.acard .body { padding: 18px 20px 6px; display: flex; flex-direction: column; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: .82rem; font-weight: 700; }
.tag-cat { color: var(--violet); }
.pill { display: inline-block; padding: 0 10px; border-radius: 6px; font-size: .78rem; font-weight: 700; line-height: 1.8; }
.pill.stu { display: none; background: #fff0cf; color: #744600; }
.pill.wait { background: var(--flag-bg); color: var(--flag-fg); border: 1px solid var(--flag-fg); }
.pill.soon { background: var(--line); color: var(--muted); }
body.dk .pill.stu { display: none; background: #3b2c0c; color: #f3c66f; }
.acard h2 { font-size: 1.28rem; margin: 10px 0 8px; }
.acard .desc { color: var(--muted); font-size: .93rem; line-height: 1.8; }
.forbox { margin: 14px 0 0; background: var(--violet-soft); border-radius: 10px; padding: 10px 14px; font-size: .86rem; line-height: 1.7; }
.forbox b { display: block; font-size: .78rem; color: var(--violet); margin-bottom: 2px; }
.acard .foot { margin-top: auto; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 20px 16px; margin-inline: 0; font-size: .86rem; }
.acard .foot::before { content: ""; position: absolute; }
.acard .foot { border-top: 1px solid var(--line); margin: 14px 20px 0; padding-inline: 0; }
.foot .time { color: var(--muted); }
.foot .go { font-family: var(--font-head); font-weight: 700; color: var(--violet); white-space: nowrap; }

/* サムネイル（アプリごとに作ったバナー） */
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; container-type: inline-size; color: #fff; background: var(--g); isolation: isolate; }
.thumb::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.22) 0 9%, transparent 9% 13%, rgba(255,255,255,.1) 13% 17%, transparent 17%); z-index: 0; }
.thumb .lab { position: absolute; left: 6cqw; top: 6cqw; display: inline-flex; align-items: center; gap: 2cqw; font-size: 3.4cqw; font-weight: 700; letter-spacing: .06em; z-index: 2; }
.thumb .lab i { width: 8cqw; height: 8cqw; border-radius: 2.4cqw; background: rgba(255,255,255,.95); display: grid; place-items: center; color: var(--gc); }
.thumb .lab i svg { width: 5.4cqw; height: 5.4cqw; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.thumb .tt { position: absolute; left: 6cqw; top: 20cqw; width: 62cqw; z-index: 2; }
.thumb .tt b { display: block; font-family: var(--font-head); font-weight: 900; font-size: 8.6cqw; line-height: 1.3; word-break: keep-all; text-shadow: 0 1px 0 rgba(0,0,0,.08); }
.thumb .tt span { display: block; margin-top: 2.6cqw; font-size: 3.3cqw; line-height: 1.6; font-weight: 500; opacity: .96; }
.thumb .ch { position: absolute; right: 3cqw; bottom: 0; height: 80%; width: auto; z-index: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.18)); }
.thumb .big { position: absolute; right: 7cqw; bottom: 9cqw; width: 32cqw; height: 32cqw; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; z-index: 1; }
.thumb .big svg { width: 20cqw; height: 20cqw; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.thumb .mini { position: absolute; right: 5cqw; top: 6cqw; font-size: 3cqw; font-weight: 700; background: rgba(255,255,255,.95); color: var(--gc); border-radius: 999px; padding: .4cqw 3cqw; z-index: 2; }
.g-know { --g: linear-gradient(135deg, #2f86e0, #7cc4f5); --gc: #1f6fc2; }
.g-work { --g: linear-gradient(135deg, #17909f, #6fd0d6); --gc: #107582; }
.g-job { --g: linear-gradient(135deg, #5a4bd0, #a595f2); --gc: #4a3cb8; }
.g-mind { --g: linear-gradient(135deg, #f0683f, #ffb08f); --gc: #c24a24; }
.g-student { --g: linear-gradient(135deg, #12285a, #3a5fb0); --gc: #12285a; }

/* 詳細ページ */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .84rem; color: var(--muted); padding-top: 22px; }
.crumb a { color: var(--muted); text-underline-offset: 3px; }
.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 28px clamp(24px, 4vw, 52px); align-items: start; padding-block: 22px 18px; }
.detail .thumb { border-radius: 20px; box-shadow: var(--shadow); }
.detail h1 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); margin: 10px 0 8px; }
.detail .one { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; line-height: 1.8; }
.metas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.meta { background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 14px; font-size: .86rem; font-weight: 700; line-height: 2; }
.btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 60px; padding: 10px 14px 10px 30px; background: linear-gradient(100deg, var(--btn-from), var(--btn-to)); color: #fff; font-family: var(--font-head); font-weight: 900; font-size: 1.1rem; text-decoration: none; border-radius: 999px; box-shadow: 0 10px 24px rgba(27, 95, 207, .3); border: 2px solid rgba(255,255,255,.7); }
.btn .arr { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--btn-to); display: grid; place-items: center; font-size: 1.1rem; }
.btn:hover { filter: brightness(1.07); }
.btn.off { background: var(--line); color: var(--muted); box-shadow: none; border-color: transparent; pointer-events: none; }
.btn.off .arr { background: var(--card); color: var(--muted); }
.cta-wrap { margin-top: 24px; }
.cta-note { margin-top: 10px; font-size: .84rem; color: var(--muted); }
.sec { padding-block: 10px; }
.sec h2 { font-size: 1.3rem; margin-bottom: 12px; padding-left: 14px; border-left: 6px solid var(--violet); line-height: 1.4; }
.card { background: var(--card); border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 30px); }
.card ul { margin: 0; padding-left: 1.3em; }
.card li + li { margin-top: 8px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.notes { color: var(--muted); font-size: .92rem; }
.free { margin-top: 26px; background: linear-gradient(120deg, var(--sky), var(--mint)); border-radius: 24px; padding: clamp(22px, 4vw, 34px); display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.free h2 { font-size: 1.25rem; }
.free p { color: var(--muted); font-size: .92rem; margin-top: 4px; max-width: 34em; }
.pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.pn a { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; text-decoration: none; font-family: var(--font-head); font-weight: 700; }
.pn a small { display: block; font-size: .78rem; color: var(--muted); font-weight: 500; }
.pn a:last-child { text-align: right; }
.pn a:hover { border-color: var(--violet); }
.related { margin-top: 36px; }
.related h2 { font-size: 1.2rem; margin-bottom: 14px; }
.related .grid { padding-bottom: 8px; }
footer { margin-top: 40px; background: var(--sky); padding-block: 30px 44px; font-size: .86rem; color: var(--muted); }
footer a { color: var(--ink); font-weight: 700; text-underline-offset: 4px; }
footer p + p { margin-top: 6px; }

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .two, .pn { grid-template-columns: minmax(0, 1fr); }
  .pn a:last-child { text-align: left; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; flex: 1 1 100%; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; white-space: nowrap; background: var(--card); border: 1px solid var(--line); }
  .brand small { display: none; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .acard { transition: none; } .acard:hover { transform: none; } }

/* カテゴリ色の上書き（最後に置く） */
.tag-cat { color: var(--cc, var(--violet)); }
.forbox { background: color-mix(in srgb, var(--cc, var(--violet)) 11%, var(--card)); }
.forbox b { color: var(--cc, var(--violet)); }
.foot .go { color: var(--cc, var(--violet)); }
.sec h2 { border-left-color: var(--cc, var(--violet)); }
