/* nuki.tokyo — 画像が主役の、アプリのような見た目 */
:root {
  --bg: #0b0c16;
  --bg-2: #121426;
  --surface: #171a2e;
  --surface-2: #1f2340;
  --line: #2a2e50;
  --text: #f3f2fb;
  --muted: #9ea2c6;
  --accent: #8a6cff;
  --accent-2: #34e0bd;
  --pink: #ff8fc8;
  --like: #34e0bd;
  --nope: #ff5d73;
  --warn: #ffc452;
  --radius: 18px;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --grad: linear-gradient(135deg, #8a6cff 0%, #ff6fb5 100%);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.7; font-size: 16px;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 8px);
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(138,108,255,.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(255,111,181,.10), transparent 60%);
  background-attachment: fixed;
}
body.has-buybar { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 84px); }
a { color: var(--accent-2); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.3; letter-spacing: .01em; }
main { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.kicker { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--accent-2); text-transform: uppercase; }
.lead { font-size: 16px; color: #d9d8ee; margin: 0 0 16px; }
.byline { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.textlink { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 14px; }

/* ---------- ボタン ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 13px 22px; font-weight: 800; font-size: 15px; color: #fff; background: var(--surface-2); cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease; text-decoration: none; font-family: inherit; }
.btn { box-shadow: 0 4px 0 #0c0e1d; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 #0c0e1d; }
.btn-main { background: var(--grad); box-shadow: 0 4px 0 #5a3fc4, 0 10px 24px rgba(138,108,255,.3); }
.btn-main:hover { filter: brightness(1.06); }
.btn-main:active { transform: translateY(4px); box-shadow: 0 0 0 #5a3fc4, 0 4px 12px rgba(138,108,255,.3); }
.btn-xl { font-size: 18px; padding: 18px 34px; min-width: 260px; }
.btn-block { display: flex; width: 100%; margin: 20px 0; }

/* ---------- 上部バー・下部タブバー ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: rgba(11,12,22,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.05); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 900; font-size: 18px; letter-spacing: .02em; }
.brand-mark { width: 28px; height: 28px; border-radius: 9px; background: var(--grad); display: grid; place-items: center;
  font-weight: 900; color: #fff; font-size: 17px; line-height: 1; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(14,15,28,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid rgba(255,255,255,.06); }
.tab { position: relative; display: flex; white-space: nowrap; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tab svg { width: 24px; height: 24px; fill: currentColor; }
.tab.is-active { color: var(--text); }
.tab-main { color: #fff; }
.tab-main svg { padding: 7px; width: 42px; height: 42px; border-radius: 14px; background: var(--grad); box-shadow: 0 6px 18px rgba(138,108,255,.45); margin-top: -16px; }

/* ---------- セクション ---------- */
.block { margin: 32px 0; }
.block > h2, .sec-head h2 { font-size: 20px; margin: 0 0 12px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { margin: 0; }
.sec-head a { font-size: 13px; font-weight: 700; white-space: nowrap; }
h3.sub { font-size: 15px; margin: 20px 0 10px; color: var(--muted); }
.pagehead { padding: 28px 0 4px; }
.pagehead h1 { font-size: 28px; margin: 0 0 8px; }
.card-note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card-note h2 { font-size: 17px; margin: 0 0 8px; }

/* ---------- ヒーロー(トップ・診断) ---------- */
.hero, .mhero { position: relative; text-align: center; padding: 24px 0 8px; }
.hero h1, .mhero h1 { font-size: clamp(30px, 8vw, 46px); margin: 0 0 12px; font-weight: 900;
  background: linear-gradient(90deg, #fff, #d9ccff 60%, #ffc3e2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead, .mhero .lead { max-width: 30em; margin: 0 auto 20px; }
.hero-arts, .mhero-arts { position: relative; height: 150px; margin: 0 auto 8px; max-width: 460px; }
.hero-arts span, .mhero-arts span { position: absolute; top: 50%; left: 50%; animation: float 5s ease-in-out infinite; animation-delay: calc(var(--i) * -0.9s);
  transform: translate(calc(-50% + (var(--i) - 2) * min(19vw, 84px)), calc(-50% + (var(--i) - 2) * (var(--i) - 2) * 6px)) rotate(calc((var(--i) - 2) * 7deg)) scale(calc(1 - (var(--i) - 2) * (var(--i) - 2) * .08)); }
.mhero-arts span { transform: translate(calc(-50% + (var(--i) - 1.5) * 84px), -50%) rotate(calc((var(--i) - 1.5) * 8deg)); }
.mhero-facts { list-style: none; padding: 0; margin: 0 0 20px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.mhero-facts li { font-size: 13px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.hero-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.mytype { margin: 18px auto 0; }
.mytype[hidden] { display: none; }
.mytype a, .saved { display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--tc, var(--accent)); border-radius: 14px; padding: 6px 14px 6px 6px; color: var(--text); font-size: 13px; text-align: left; }
.mytype b { display: block; font-size: 16px; color: var(--tc, var(--accent-2)); letter-spacing: .06em; }
.saved { margin-top: 16px; padding: 10px 14px; flex-wrap: wrap; justify-content: center; }
.saved[hidden] { display: none; }
.saved span { color: var(--muted); }
.saved button { border: 0; background: none; color: var(--accent-2); font-weight: 800; cursor: pointer; font-size: 14px; font-family: inherit; }

/* ---------- 作品カード ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(44%, 190px); gap: 12px; overflow-x: auto;
  scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 10px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .tile { scroll-snap-align: start; }
.tile { display: flex; flex-direction: column; gap: 6px; color: var(--text); min-width: 0; }
.tile-img { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--surface); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tile:hover .tile-img img { transform: scale(1.05); }
.tile-badges { position: absolute; left: 6px; top: 6px; display: flex; gap: 4px; }
.badge { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: rgba(11,12,22,.78); color: #fff; backdrop-filter: blur(6px); }
.badge.sale { background: var(--nope); }
.badge.star { color: var(--warn); }
.tile-title { font-size: 13px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--muted); }
.tile-meta b { color: var(--text); font-size: 14px; }
.tile-extra { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rank { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 8px; background: var(--grad); color: #fff; font-weight: 900; font-size: 12px; }
.pct { color: var(--accent-2); font-weight: 800; }

/* ---------- タイプ ---------- */
.type-art { display: block; }
.typecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.typerail { display: grid; grid-auto-flow: column; grid-auto-columns: 230px; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 10px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.typerail::-webkit-scrollbar { display: none; }
.typecard { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 6px; border-radius: 16px; color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 20%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent);
  scroll-snap-align: start; transition: transform .2s ease; }
.typecard:hover { transform: translateY(-2px); }
.typecard-art { flex: none; }
.typecard-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.typecard-text b { font-size: 13px; letter-spacing: .12em; color: var(--tc); }
.typecard-text strong { font-size: 14px; }
.typecard-text small { font-size: 12px; color: var(--muted); }
.group { margin: 0 0 20px; }
.group-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.group-head h3 { margin: 0; font-size: 17px; color: var(--tc); }
.group-head p { margin: 0; font-size: 13px; color: var(--muted); }
.legend { display: grid; gap: 8px; }
.legend-row { display: grid; grid-template-columns: 3.6em 1fr 1fr; gap: 8px; align-items: stretch; }
.legend-name { font-size: 12px; font-weight: 800; color: var(--muted); align-self: center; }
.legend-side { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 13px; font-weight: 700; }
.legend-side b { font-size: 18px; letter-spacing: .06em; color: var(--muted); line-height: 1.2; }
.legend-side small { font-weight: 400; color: var(--muted); font-size: 11px; line-height: 1.4; }
.legend-side.is-on { border-color: var(--tc, var(--accent)); background: color-mix(in srgb, var(--tc, var(--accent)) 16%, var(--surface)); }
.legend-side.is-on b { color: var(--tc, var(--accent)); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: center; background: var(--surface); border-radius: 14px; padding: 12px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); font-weight: 900; }
.steps b { font-size: 15px; }
.steps span { font-size: 13px; color: var(--muted); }

/* タイプページ */
.typehero { position: relative; text-align: center; padding: 16px 0 8px; margin: 0 -16px; overflow: hidden;
  background: radial-gradient(600px 320px at 50% 30%, color-mix(in srgb, var(--tc) 30%, transparent), transparent 70%); }
.typehero .back { position: absolute; left: 16px; top: 12px; font-size: 13px; color: var(--muted); }
.typehero-art { display: flex; justify-content: center; margin: 18px 0 0; }
.typehero-group { display: inline-block; margin: 6px 0 0; padding: 2px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--tc) 25%, transparent); color: var(--tc); }
.typehero-code { font-size: 54px; font-weight: 900; letter-spacing: .12em; margin: 4px 0 0; line-height: 1; color: var(--tc); text-shadow: 0 0 30px color-mix(in srgb, var(--tc) 55%, transparent); }
.typehero h1 { font-size: 26px; margin: 8px 16px 4px; }
.typehero-short { color: var(--muted); margin: 0 16px; }

/* ジャンル */
.genres { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.genre { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .2s ease; }
.genre:hover { transform: translateY(-2px); }
.genre-covers { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 16 / 10; gap: 2px; overflow: hidden; background: var(--bg-2); }
.genre-covers img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.genre-covers img:first-child { grid-row: span 2; }
.genre-text { padding: 10px 12px 12px; display: flex; flex-direction: column; }
.genre-emoji { font-size: 20px; line-height: 1; margin-bottom: 4px; }
.genre-text strong { font-size: 16px; }
.genre-text small { font-size: 12px; color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; font-size: 13px; font-weight: 700; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.chips a.is-on { background: var(--grad); border-color: transparent; }

/* ---------- 作品ページ ---------- */
.workhero { position: relative; margin: 0 -16px; padding: 12px 16px 20px; overflow: hidden; isolation: isolate; }
.workhero-bg { position: absolute; inset: -40px; z-index: -1; background: var(--cover) center / cover no-repeat; filter: blur(40px) saturate(1.3); opacity: .45; }
.workhero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,12,22,.35), var(--bg) 92%); }
.crumbs { display: flex; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.workhero-cover { width: 100%; height: auto; max-width: 560px; max-height: 70vh; margin: 0 auto; border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0,0,0,.5); aspect-ratio: 4 / 3; object-fit: contain; background: rgba(0,0,0,.35); }
.workhero h1 { font-size: 21px; margin: 16px 0 6px; }
.workhero-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.workhero-sub a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 800; font-size: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 5px 12px; }
.chip small { font-weight: 400; color: var(--muted); font-size: 12px; }
.chip small.off { color: var(--nope); font-weight: 800; }
.chip-ai { color: var(--warn); }
.fav { margin: 0 0 12px; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12px; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 3px 10px; }
.chobit { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.chobit iframe { display: block; width: 100%; height: 220px; border: 0; }
.chobit-load { position: absolute; inset: 0; margin: auto; width: 240px; height: 54px; border: 0; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; box-shadow: 0 8px 24px rgba(138,108,255,.4); font-family: inherit; }
.samples { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; align-items: center; }
.samples::-webkit-scrollbar { display: none; }
.samples img { flex: none; height: min(62vw, 360px); width: auto; max-width: 86vw; object-fit: contain; border-radius: 14px; scroll-snap-align: start; background: var(--surface); }
.mymatch { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 10px 14px; border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tc, var(--accent)) 22%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--tc, var(--accent)) 40%, transparent); }
.mymatch[hidden] { display: none; }
.mymatch p { margin: 0; display: flex; flex-direction: column; }
.mymatch span { font-size: 13px; color: var(--muted); }
.mymatch b { font-size: 30px; font-weight: 900; color: var(--tc, var(--accent-2)); line-height: 1.1; }
.meter-card { background: var(--surface); border-radius: var(--radius); padding: 16px; }
.meter-num { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.meter-num b { font-size: 28px; color: var(--warn); }
.meter-num span { color: var(--muted); font-size: 13px; }
.meter { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--p); border-radius: inherit; background: var(--grad); }
.meter-label { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.meter-label b { color: var(--text); }
blockquote { margin: 0 0 6px; padding: 14px 16px; background: var(--surface); border-radius: var(--radius); border-left: 4px solid var(--pink); font-size: 15px; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.note h2 { margin-top: 0; }
.timeline { list-style: none; padding: 0; margin: 0 0 12px; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.timeline time { font-family: ui-monospace, SFMono-Regular, monospace; color: var(--accent-2); font-weight: 800; min-width: 3.4em; }
.folds { display: grid; gap: 10px; margin: 28px 0; }
.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
.fold summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; font-weight: 800; font-size: 15px; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary span { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 13px; white-space: nowrap; }
.fold summary::after { content: "＋"; color: var(--muted); }
.fold[open] summary::after { content: "−"; }
.fold[open] { padding-bottom: 14px; }
.verdict { font-weight: 800; margin: 0 0 10px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0 0 12px; }
.stats div { background: var(--bg-2); border-radius: 12px; padding: 8px 12px; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 0; font-weight: 800; }
.stats-big div { background: var(--surface); }
.stats-big dd { font-size: 18px; }
.price-chart { width: 100%; height: auto; background: var(--bg-2); border-radius: 12px; }
.price-line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.low-line { stroke: var(--accent-2); stroke-dasharray: 4 4; stroke-width: 1; }
.chart-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.buybar { position: fixed; z-index: 35; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b)); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: rgba(14,15,28,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid rgba(255,255,255,.06); }
.buybar-price { font-size: 20px; font-weight: 900; }
.buybar-price small { color: var(--nope); font-size: 13px; margin-left: 6px; }
.buybar .btn { flex: 1; max-width: 260px; }
#vote[hidden] { display: none; }
.vote-buttons { display: flex; gap: 12px; }
.vote-buttons button { flex: 1; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 14px; font-size: 16px; font-weight: 800; border-radius: 16px;
  border: 2px solid var(--line); border-bottom-width: 5px; background: var(--surface); color: var(--text); cursor: pointer; font-family: inherit; transition: transform .1s ease; }
.vote-buttons button:active:not(:disabled) { transform: translateY(3px); border-bottom-width: 2px; }
.vote-buttons button[data-v="good"]:hover:not(:disabled), .vote-buttons button[data-v="good"].chosen { border-color: var(--like); color: var(--like); }
.vote-buttons button[data-v="bad"]:hover:not(:disabled), .vote-buttons button[data-v="bad"].chosen { border-color: var(--nope); color: var(--nope); }
.vote-buttons button:disabled { cursor: default; }
.vote-buttons button span { font-size: 14px; color: var(--muted); font-weight: 400; }

/* ---------- 読み物(このサイトについて等) ---------- */
.prose { max-width: 720px; padding: 24px 0; }
.prose h1 { font-size: 26px; }
.prose h2 { font-size: 18px; margin-top: 28px; }

/* ---------- フッター ---------- */
.site-footer { max-width: 1040px; margin: 48px auto 0; padding: 20px 16px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }
.site-footer nav { display: flex; justify-content: center; gap: 18px; margin-bottom: 10px; }
.site-footer nav a { color: var(--muted); }
.pr-note { max-width: 640px; margin: 0 auto 8px; }

/* ---------- 年齢確認 ---------- */
.gate-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(6,7,14,.86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.gate-overlay[hidden], .gate-box[hidden] { display: none; }
.gate-box { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px 22px; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.gate-logo { font-size: 26px; font-weight: 900; margin: 0 0 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gate-lead { font-weight: 800; color: var(--accent-2); margin: 0 0 6px; }
.gate-actions { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.gate-actions button { border: 0; border-radius: 999px; padding: 15px; font-size: 16px; font-weight: 800; background: var(--grad); color: #fff; cursor: pointer; font-family: inherit; }
.gate-actions button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.gate-links { font-size: 12px; }

/* ---------- 相性診断(没入モード) ---------- */
body.is-immersive { overflow: hidden; }
body.is-immersive .topbar, body.is-immersive .tabbar, body.is-immersive .buybar { visibility: hidden; }
.mx { position: fixed; inset: 0; z-index: 60; display: none; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(900px 600px at 50% -10%, color-mix(in srgb, var(--tc, var(--accent)) 30%, transparent), transparent 70%), var(--bg); }
.mx.is-open { display: block; }
.mx-screen { position: absolute; left: 0; right: 0; top: 0; min-height: 100%; max-width: 560px; margin: 0 auto; padding: 12px 18px calc(28px + var(--safe-b)); display: flex; flex-direction: column; }
.mx-screen.in-right { animation: inRight .32s cubic-bezier(.2,.8,.2,1) both; }
.mx-screen.in-left { animation: inLeft .32s cubic-bezier(.2,.8,.2,1) both; }
.mx-screen.in-fade { animation: fadeUp .4s ease both; }
.mx-screen.out-left { animation: outLeft .3s ease both; pointer-events: none; }
.mx-screen.out-right { animation: outRight .3s ease both; pointer-events: none; }
.mx-top { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.mx-icon { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); color: var(--text); font-size: 20px; cursor: pointer; flex: none; font-family: inherit; }
.mx-progress { flex: 1; height: 8px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.mx-progress span { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .35s ease; }
.mx-count { font-size: 13px; font-weight: 800; color: var(--muted); min-width: 3.2em; text-align: right; }
.mx-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 12px 0; }
.mx-kicker { margin: 0; text-align: center; font-size: 12px; font-weight: 900; letter-spacing: .2em; color: var(--accent-2); }
.mx-title { text-align: center; font-size: 28px; margin: 6px 0 8px; }
.mx-sub { text-align: center; color: var(--muted); margin: 0 0 20px; }
.mx-genres { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mx-genre { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 10px; border-radius: 22px; border: 2px solid var(--line); border-bottom-width: 6px; background: var(--surface); color: var(--text); cursor: pointer; font-family: inherit; transition: transform .1s ease, border-color .2s ease; }
.mx-genre:hover { border-color: var(--accent); }
.mx-genre:active { transform: translateY(4px); border-bottom-width: 2px; margin-bottom: 4px; }
.mx-genre-emoji { font-size: 38px; line-height: 1.1; }
.mx-genre strong { font-size: 18px; }
.mx-genre small { font-size: 12px; color: var(--muted); }
.mx-q { text-align: center; justify-content: flex-start; padding-top: 8vh; }
.mx-q-emoji { height: 84px; line-height: 1; margin-bottom: 10px; animation: float 4s ease-in-out infinite; }
.mx-q-emoji .ic, .mx-genre-emoji .ic { display: block; }
.mx-q-text { font-size: clamp(20px, 5.6vw, 25px); line-height: 1.5; margin: 0 0 30px; font-weight: 800; min-height: 4.5em; display: flex; align-items: center; justify-content: center; }
.mx-scale { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 3.5vw, 18px); }
.mx-dot { border-radius: 50%; border: 3px solid; background: transparent; cursor: pointer; padding: 0; transition: transform .15s ease, background .15s ease; }
.mx-dot:active { transform: scale(.9); }
.mx-dot-0, .mx-dot-4 { width: 58px; height: 58px; }
.mx-dot-1, .mx-dot-3 { width: 46px; height: 46px; }
.mx-dot-2 { width: 34px; height: 34px; border-color: var(--muted); }
.mx-dot-0, .mx-dot-1 { border-color: var(--accent-2); }
.mx-dot-3, .mx-dot-4 { border-color: var(--accent); }
.mx-dot:hover { background: rgba(255,255,255,.08); }
.mx-dot.is-on.mx-dot-0, .mx-dot.is-on.mx-dot-1 { background: var(--accent-2); }
.mx-dot.is-on.mx-dot-3, .mx-dot.is-on.mx-dot-4 { background: var(--accent); }
.mx-dot.is-on.mx-dot-2 { background: var(--muted); }
.mx-dot.is-on { animation: pop .3s ease; }
.mx-scale-labels { display: flex; justify-content: space-between; max-width: 340px; width: 100%; margin: 12px auto 0; font-size: 13px; font-weight: 800; }
.mx-scale-labels span:first-child { color: var(--accent-2); }
.mx-scale-labels span:last-child { color: var(--accent); }
.mx-analyze { align-items: center; text-align: center; }
.mx-silhouette { filter: brightness(0) invert(1) opacity(.25) blur(1px); animation: pulse 1.1s ease-in-out infinite; }
.mx-analyze-text { font-weight: 800; font-size: 18px; margin: 20px 0 14px; min-height: 1.6em; }
.mx-meter { width: 220px; height: 8px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.mx-meter span { display: block; height: 100%; background: var(--grad); animation: meter 1.9s ease-in-out forwards; }
.mx-card { position: relative; text-align: center; padding: 22px 18px 16px; border-radius: 28px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 32%, var(--surface)), var(--surface) 60%); border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent);
  box-shadow: 0 24px 60px color-mix(in srgb, var(--tc) 22%, transparent); }
.mx-you { margin: 0; color: var(--muted); font-weight: 800; font-size: 14px; }
.mx-code { margin: 2px 0 0; font-size: 58px; font-weight: 900; letter-spacing: .1em; line-height: 1.05; color: var(--tc); text-shadow: 0 0 36px color-mix(in srgb, var(--tc) 60%, transparent); }
.mx-code span { display: inline-block; opacity: 0; transform: translateY(20px) scale(.6); }
.is-revealed .mx-code span { animation: letter .5s cubic-bezier(.2,1.4,.4,1) forwards; animation-delay: var(--d); }
.mx-art { display: flex; justify-content: center; margin: 4px 0; opacity: 0; transform: scale(.7); }
.is-revealed .mx-art { animation: artIn .7s cubic-bezier(.2,1.3,.4,1) .55s forwards; }
.mx-name { font-size: 24px; margin: 4px 0 6px; }
.mx-group { margin: 0 0 16px; font-size: 14px; color: #dcdaf2; }
.mx-group span { display: inline-block; margin-right: 8px; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--tc) 30%, transparent); color: var(--tc); }
.mx-axes { display: grid; gap: 10px; text-align: left; }
.mx-axis-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); font-weight: 700; }
.mx-axis-head .is-win { color: var(--text); }
.mx-axis-head b { color: var(--tc); font-size: 14px; }
.mx-axis-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.mx-axis-bar { display: flex; }
.mx-axis-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--tc); }
.mx-axis-bar.is-right { justify-content: flex-end; }
.is-revealed .mx-axis-bar span { transition: width 1s cubic-bezier(.2,.8,.2,1) .9s; width: var(--p); }
.mx-brand { margin: 14px 0 0; font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.mx-actions { display: grid; gap: 10px; margin-top: 18px; text-align: center; }
.mx-btn { display: flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; padding: 15px 18px; font-weight: 800; font-size: 15px; color: #fff; cursor: pointer; text-decoration: none; font-family: inherit; }
.mx-btn-main { background: var(--grad); box-shadow: 0 5px 0 #5a3fc4, 0 12px 28px rgba(138,108,255,.35); font-size: 16px; animation: glow 2.4s ease-in-out infinite; transition: transform .1s ease; }
.mx-btn-main:active { transform: translateY(5px); box-shadow: 0 0 0 #5a3fc4; }
.mx-btn-x:active, .mx-btn-line:active, .mx-btn-ghost:active { transform: translateY(3px); }
.mx-btn-x { box-shadow: 0 3px 0 #222; } .mx-btn-line { box-shadow: 0 3px 0 #04913e; } .mx-btn-ghost { box-shadow: 0 3px 0 #0c0e1d; }
.mx-share { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.mx-btn-x { background: #000; border: 1px solid #333; }
.mx-btn-line { background: #06c755; }
.mx-btn-ghost { background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.mx-partner { display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; padding: 10px; color: var(--text); }
.mx-partner span { font-size: 12px; color: var(--muted); }
.mx-link { background: none; border: 0; color: var(--accent-2); font-weight: 800; font-size: 14px; cursor: pointer; padding: 8px; font-family: inherit; text-align: center; }
.mx-hint { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.mx-swipecard { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 3 / 4; max-height: 60vh; background: var(--surface); touch-action: pan-y; user-select: none;
  transition: transform .25s ease; box-shadow: 0 24px 60px rgba(0,0,0,.45); margin: 0 auto; width: 100%; }
.mx-swipecard.is-dragging { transition: none; }
.mx-swipecard img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.mx-swipecard-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 16px 16px; background: linear-gradient(180deg, transparent, rgba(6,7,14,.92)); }
.mx-swipecard-info p { margin: 6px 0 8px; font-weight: 800; font-size: 17px; line-height: 1.4; }
.mx-swipecard-info ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mx-swipecard-info li { font-size: 12px; color: #d8d7ee; }
.mx-chip { font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--grad); }
.mx-stamp { position: absolute; top: 22px; font-size: 32px; font-weight: 900; border: 4px solid; border-radius: 10px; padding: 0 12px; opacity: 0; transition: opacity .15s ease; }
.mx-stamp.like { left: 18px; color: var(--like); transform: rotate(-14deg); }
.mx-stamp.nope { right: 18px; color: var(--nope); transform: rotate(14deg); }
.mx-stamp.like { opacity: var(--like, 0); }
.mx-stamp.nope { opacity: var(--nope, 0); }
.mx-swipecard.out-right .like, .mx-swipecard.out-left .nope { opacity: 1; }
.mx-swipecard.out-right { transform: translateX(130%) rotate(18deg) !important; }
.mx-swipecard.out-left { transform: translateX(-130%) rotate(-18deg) !important; }
.mx-swipe-actions { display: flex; justify-content: center; gap: 36px; margin: 18px 0 4px; }
.mx-round { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font-size: 30px; cursor: pointer; box-shadow: 0 5px 0 #0c0e1d, 0 12px 24px rgba(0,0,0,.35); transition: transform .1s ease; font-family: inherit; }
.mx-round:active { transform: translateY(5px); box-shadow: 0 0 0 #0c0e1d; }
.mx-round.like { color: var(--like); }
.mx-round.nope { color: var(--nope); }
.mx-matches .mx-body { justify-content: flex-start; }
.mx-burst { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.mx-burst span { position: absolute; bottom: -40px; left: var(--x); color: var(--pink); font-size: calc(24px * var(--s)); animation: burst 2.6s ease-out var(--d) forwards; opacity: 0; }
.mx-topmatch { position: relative; display: block; border-radius: 24px; overflow: hidden; color: var(--text); margin: 4px 0 14px; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.mx-topmatch img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mx-topmatch-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 50px 16px 14px; display: flex; flex-direction: column; background: linear-gradient(180deg, transparent, rgba(6,7,14,.95)); }
.mx-topmatch-info strong { font-size: 16px; line-height: 1.4; }
.mx-topmatch-info small { color: var(--muted); }
.mx-pct { color: var(--accent-2); font-weight: 900; font-size: 22px; }
.mx-matchlist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.mx-match { display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.mx-match img { border-radius: 14px; aspect-ratio: 4 / 3; object-fit: cover; }
.mx-match .mx-pct { font-size: 16px; }
.mx-match-title { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mx-note { color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- タイプのイラストの動き ---------- */
.ta-bob { animation: bob 3.2s ease-in-out infinite; }
.ta-rise { animation: rise 3.4s ease-in-out infinite; }
.ta-fall { animation: fall 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ta-ripple { animation: ripple 3s ease-out infinite; transform-origin: 100px 112px; }
.ta-flame { animation: flame 1.4s ease-in-out infinite alternate; transform-origin: 100px 170px; }
.ta-orbit { animation: spin 7s linear infinite; transform-origin: 100px 100px; }
.ta-twinkle { animation: twinkle 2.4s ease-in-out infinite; }
.ta-delay { animation-delay: -1.2s; }
.ta-delay2 { animation-delay: -2.2s; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes rise { 0% { transform: translateY(8px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-26px); opacity: 0; } }
@keyframes fall { 0% { transform: translate(0, -10px) rotate(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(-8px, 22px) rotate(160deg); opacity: 0; } }
@keyframes ripple { 0% { transform: scale(.75); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes flame { from { transform: scaleY(.92); opacity: .45; } to { transform: scaleY(1.08); opacity: .75; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes meter { from { width: 0; } to { width: 100%; } }
@keyframes letter { to { opacity: 1; transform: none; } }
@keyframes artIn { to { opacity: 1; transform: none; } }
@keyframes glow { 0%, 100% { box-shadow: 0 10px 28px rgba(138,108,255,.35); } 50% { box-shadow: 0 10px 36px rgba(255,111,181,.55); } }
@keyframes burst { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-110vh) scale(1.1) rotate(25deg); opacity: 0; } }
@keyframes inRight { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes inLeft { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes outLeft { to { transform: translateX(-40px); opacity: 0; } }
@keyframes outRight { to { transform: translateX(40px); opacity: 0; } }
@keyframes fadeUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .mx-code span, .mx-art { opacity: 1; transform: none; }
}

/* ---------- 広い画面 ---------- */
@media (min-width: 760px) {
  .rail { grid-auto-columns: 200px; }
  .workhero { display: grid; grid-template-columns: 360px 1fr; gap: 8px 28px; align-items: start; padding-top: 24px; }
  .workhero .crumbs { grid-column: 1 / -1; }
  .workhero-cover { grid-row: span 5; }
  .workhero h1 { margin-top: 0; font-size: 26px; }
  .samples { grid-auto-columns: 40%; }
  .buybar { justify-content: center; }
  .pagehead h1 { font-size: 34px; }
}

/* ---------- 診断タブの吹き出し(年齢確認のあと一度だけ) ---------- */
.nudge { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(6px); opacity: 0; pointer-events: none;
  white-space: nowrap; font-size: 12px; font-weight: 800; color: #fff; background: var(--grad); padding: 8px 12px; border-radius: 12px;
  box-shadow: 0 8px 20px rgba(138,108,255,.45); transition: opacity .3s ease, transform .3s ease; }
.nudge::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: #c46fd8; }
.nudge.show { opacity: 1; transform: translateX(-50%) translateY(0); animation: nudge 1.6s ease-in-out .4s 3; }
@keyframes nudge { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }

/* ---------- お気に入り ---------- */
.fav { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.07); color: var(--text);
  border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 14px; cursor: pointer; font-family: inherit; transition: transform .15s ease; }
.fav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav.is-on { color: var(--pink); border-color: color-mix(in srgb, var(--pink) 50%, transparent); }
.fav.is-on svg { fill: currentColor; animation: pop .35s ease; }
.fav:active { transform: scale(.94); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-emoji { font-size: 48px; }

/* ---------- サンプル画像の拡大表示 ---------- */
.samples img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; background: rgba(4,5,10,.94); animation: fadeUp .2s ease; }
.lightbox img { max-width: 100%; max-height: 86vh; object-fit: contain; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 10px; top: 50%; }
.lightbox .lb-next { right: 10px; top: 50%; }
.lightbox .lb-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- 読みもの(記事) ---------- */
.article { max-width: 720px; margin: 0 auto; padding-top: 16px; }
.a-head { text-align: center; padding: 8px 0 12px; }
.a-head-art { display: flex; justify-content: center; }
.a-head h1 { font-size: clamp(23px, 6vw, 30px); margin: 8px 0; }
.a-meta { font-size: 12px; color: var(--muted); margin: 0; }
.a-toc { background: var(--surface); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; }
.a-toc p { margin: 0 0 4px; font-weight: 800; font-size: 13px; color: var(--muted); }
.a-toc ol { margin: 0; padding-left: 20px; }
.a-toc li { margin: 4px 0; }
.a-body { font-size: 16.5px; line-height: 1.9; }
.a-body h2 { font-size: 21px; margin: 44px 0 14px; padding-left: 12px; border-left: 5px solid var(--tc, var(--accent)); }
.a-body h3 { font-size: 17px; margin: 28px 0 10px; }
.a-body p { margin: 0 0 16px; }
.a-body mark { background: linear-gradient(transparent 55%, color-mix(in srgb, var(--pink) 45%, transparent) 55%); color: inherit; padding: 0 2px; }
.a-body ul { padding-left: 20px; }
.a-tldr { background: color-mix(in srgb, var(--tc, var(--accent)) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tc, var(--accent)) 40%, transparent); border-radius: var(--radius); padding: 14px 18px; margin: 18px 0; }
.a-tldr-label { margin: 0 0 4px; font-weight: 900; font-size: 13px; color: var(--tc, var(--accent-2)); }
.a-tldr ul { margin: 0; }
.a-work { display: grid; grid-template-columns: 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 18px 0; }
.a-work-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 12px; background: rgba(0,0,0,.35); }
.a-work-title { font-weight: 800; margin: 0 0 4px; line-height: 1.45; }
.a-work-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.a-work-meta b { color: var(--text); font-size: 16px; }
.a-work-meta .off { color: var(--nope); font-weight: 800; }
.a-work-sub { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.a-work-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.a-work-actions .btn { flex: 1; min-width: 140px; }
.a-cta-wrap { text-align: center; margin: 24px 0; }
.a-cta { width: 100%; max-width: 420px; }
.a-samples { margin: 16px -16px; }
.a-review { position: relative; }
.a-review cite { display: block; margin-top: 8px; font-style: normal; font-size: 12px; color: var(--muted); }
.a-fit { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border-left: 4px solid var(--warn); border-radius: 12px; padding: 12px 16px; margin: 16px 0; }
.a-fit strong { font-size: 13px; color: var(--warn); }
.a-fit p { margin: 4px 0 0; font-size: 15px; }
.a-types { margin: 16px 0; }
.a-faq dt { font-weight: 800; margin-top: 16px; }
.a-faq dt::before { content: "Q. "; color: var(--accent-2); }
.a-faq dd { margin: 4px 0 0; color: #dcdaf2; }
.a-diag { margin: 40px 0 0; text-align: center; }
.a-list { display: grid; gap: 10px; }
.a-item { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tc, var(--accent)); border-radius: 16px; padding: 12px 14px; color: var(--text); }
.a-item strong { display: block; font-size: 15px; line-height: 1.45; }
.a-item small { color: var(--muted); font-size: 12px; }
@media (min-width: 760px) { .a-work { grid-template-columns: 240px 1fr; } }

/* ---------- Duolingo風: まばたき・回答への反応 ---------- */
.ta-face { animation: blink 5s infinite; transform-origin: 100px 112px; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.mx-q-emoji { position: relative; display: inline-block; align-self: center; }
.mx-react { position: absolute; left: 70%; top: -8px; white-space: nowrap; font-size: 14px; font-weight: 900; color: #fff; background: var(--grad); padding: 5px 12px; border-radius: 14px 14px 14px 4px;
  opacity: 0; transform: scale(.4) translateY(10px); pointer-events: none; }
.mx-react.show { animation: react .56s cubic-bezier(.2,1.5,.4,1) forwards; }
@keyframes react { 0% { opacity: 0; transform: scale(.4) translateY(10px); } 40% { opacity: 1; transform: scale(1.08) translateY(0); } 100% { opacity: 1; transform: scale(1); } }

/* ---------- お祝い(トースト・紙吹雪) ---------- */
.toasts { position: fixed; left: 0; right: 0; top: 12px; z-index: 130; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { display: flex; align-items: center; gap: 12px; max-width: 420px; width: 100%; padding: 12px 16px; border-radius: 18px; background: var(--surface-2); border: 2px solid var(--line); border-bottom-width: 5px;
  box-shadow: 0 16px 40px rgba(0,0,0,.45); transform: translateY(-120%) scale(.9); opacity: 0; transition: transform .45s cubic-bezier(.2,1.4,.4,1), opacity .3s ease; }
.toast.show { transform: none; opacity: 1; }
.toast-emoji { font-size: 30px; line-height: 1; animation: pop .6s ease .2s; }
.toast b { display: block; font-size: 15px; }
.toast small { display: block; font-size: 12px; color: var(--muted); }
.confetti { position: fixed; inset: 0; z-index: 125; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: confetti 2.2s cubic-bezier(.25,.6,.4,1) forwards; }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: .8; } }

/* ---------- 今夜のミッション・連続記録 ---------- */
.mission { margin: 20px 0 8px; padding: 16px; border-radius: 22px; background: var(--surface); border: 2px solid var(--line); border-bottom-width: 6px; }
.mission[hidden] { display: none; }
.mission-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mission-head .kicker { margin: 0; }
.mission-count { margin: 0; font-size: 20px; font-weight: 900; }
.mission-bar { height: 14px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin: 10px 0 12px; }
.mission-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #34e0bd, #8a6cff); transition: width .6s cubic-bezier(.2,.8,.2,1); box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.mission-list { list-style: none; padding: 0; margin: 0 0 4px; display: grid; gap: 6px; }
.mission-list a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--bg-2); color: var(--text); font-weight: 700; font-size: 14px; }
.mission-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; font-weight: 900; flex: none; }
.mission-label { flex: 1; }
.mission-num { color: var(--muted); font-size: 13px; }
.mission-list .is-done a { color: var(--muted); }
.mission-list .is-done .mission-check { background: var(--accent-2); border-color: var(--accent-2); color: #0b0c16; animation: pop .4s ease; }
.mission-list .is-done .mission-label { text-decoration: line-through; }
.streak { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; color: var(--muted); background: var(--bg-2); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.streak b { font-size: 20px; color: var(--text); }
.streak-fire { filter: grayscale(1); opacity: .6; }
.streak.is-hot { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--bg-2)); }
.streak.is-hot b { color: var(--warn); }
.streak.is-hot .streak-fire { filter: none; opacity: 1; display: inline-block; animation: bob 1.6s ease-in-out infinite; }

/* ---------- マイページ・バッジ・図鑑 ---------- */
.me-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
.me-stats > div { background: var(--surface); border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 18px; padding: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.me-stats b { font-size: 26px; font-weight: 900; }
.me-stats b small { font-size: 14px; color: var(--muted); }
.me-stats > div > small { color: var(--muted); font-size: 12px; }
.badges { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 14px 10px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); border-bottom-width: 5px; opacity: .55; }
.badge-item.is-got { opacity: 1; border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.badge-emoji { font-size: 34px; line-height: 1.2; }
.badge-item b { font-size: 14px; }
.badge-item small { font-size: 11px; color: var(--muted); }
.zukan { background: var(--surface); border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 20px; padding: 14px 16px; }
.zukan p:first-child { display: flex; justify-content: space-between; margin: 0 0 8px; }
.zukan-bar { height: 14px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.zukan-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ffc452, #ff6fb5); transition: width .8s ease; }
.typecard.is-found::after { content: "✓"; position: absolute; top: 6px; right: 8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; background: var(--tc); color: #0b0c16; }

/* ---------- 細かい動き(fx.js) ---------- */
/* 押したときに少し縮む */
.tile, .typecard, .genre, .a-item, .mission-list a, .chips a, .mx-partner, .mx-match, .mx-topmatch { -webkit-tap-highlight-color: transparent; }
.tile:active, .typecard:active, .genre:active, .a-item:active, .mission-list a:active, .mx-match:active, .mx-topmatch:active { transform: scale(.97); transition: transform .08s ease; }
.chips a:active { transform: scale(.94); }
/* 下部タブ: 押したらアイコンが弾む・今いる場所に点 */
.tab.is-tapped svg { animation: tabpop .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes tabpop { 0% { transform: scale(.8); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.tab.is-active:not(.tab-main)::after { content: ""; position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-2); }
.tab-main.is-active svg { box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 6px 18px rgba(138,108,255,.45); }
/* スクロールで見えたら下からふわっと */
html.fx .rv { opacity: 0; transform: translateY(14px); transition: opacity .5s ease var(--rv-d, 0ms), transform .5s cubic-bezier(.2,.8,.2,1) var(--rv-d, 0ms); }
html.fx .rv.is-in { opacity: 1; transform: none; }
html.fx .rv .meter span, html.fx .rv .mission-bar span { transform-origin: left; }
html.fx .meter-card.rv:not(.is-in) .meter span { width: 0 !important; }
.meter span { transition: width 1s cubic-bezier(.2,.8,.2,1) .2s; }
/* 画像: 読み込み中はきらめき、読めたらふわっと */
html.fx .tile-img, html.fx .genre-covers, html.fx .samples img, html.fx .a-work-img img { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
html.fx .tile-img img, html.fx .genre-covers img, html.fx .samples img, html.fx .workhero-cover, html.fx .a-work-img img { opacity: 0; transition: opacity .45s ease, transform .35s ease; }
html.fx img.is-loaded { opacity: 1 !important; }
html.fx .tile-img:has(img.is-loaded), html.fx .genre-covers:has(img.is-loaded) { animation: none; }
@keyframes shimmer { to { background-position: -300% 0; } }
/* 進捗バーの光 */
.mx-progress span, .mission-bar span, .zukan-bar span { position: relative; overflow: hidden; }
.mx-progress span::after, .mission-bar span::after, .zukan-bar span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.45) 50%, transparent 80%); transform: translateX(-100%); animation: shine 2.4s ease-in-out infinite; }
.mx-progress span, .mission-bar span { box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.18); }
@keyframes shine { 0%, 40% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.mx-progress span { transition: width .45s cubic-bezier(.3,1.5,.5,1); }
/* 診断: 選択肢が順にポンと出る・選ぶと波紋 */
html.fx .mx-dot { animation: dotin .42s cubic-bezier(.2,1.5,.4,1) both; animation-delay: calc(var(--i) * 55ms + 120ms); position: relative; }
@keyframes dotin { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.mx-dot.is-on { animation: pop .3s ease !important; }
.mx-ring { position: absolute; inset: -3px; border-radius: 50%; border: 3px solid currentColor; animation: ring .55s ease-out forwards; pointer-events: none; }
.mx-dot-0 .mx-ring, .mx-dot-1 .mx-ring { color: var(--accent-2); }
.mx-dot-3 .mx-ring, .mx-dot-4 .mx-ring { color: var(--accent); }
.mx-dot-2 .mx-ring { color: var(--muted); }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
html.fx .mx-q-text { animation: fadeUp .4s ease both .05s; }
html.fx .mx-genre { animation: dotin .4s cubic-bezier(.2,1.4,.4,1) both; }
html.fx .mx-genre:nth-child(2) { animation-delay: 60ms; } html.fx .mx-genre:nth-child(3) { animation-delay: 120ms; } html.fx .mx-genre:nth-child(4) { animation-delay: 180ms; }
.mx-genre.is-picked { border-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 16%, var(--surface)); animation: pop .25s ease !important; }
/* スワイプ: 後ろのカードが見える・送ると繰り上がる */
.mx-stack { position: relative; display: grid; }
.mx-stack > .mx-swipecard { grid-area: 1 / 1; }
.mx-peek { transform: scale(.94) translateY(14px); filter: brightness(.6); pointer-events: none; transition: transform .3s ease, filter .3s ease; }
.mx-peek.is-rising { transform: none; filter: none; }
.mx-round.is-hit { animation: pop .3s ease; }
.mx-round.like.is-hit { background: color-mix(in srgb, var(--like) 20%, var(--surface)); }
.mx-round.nope.is-hit { background: color-mix(in srgb, var(--nope) 20%, var(--surface)); }
/* ハートがはじける */
.burst { position: fixed; z-index: 140; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; animation: burst-p .6s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes burst-p { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.is-bump span { display: inline-block; animation: bump .45s cubic-bezier(.2,1.8,.4,1); }
@keyframes bump { 0% { transform: translateY(0); } 40% { transform: translateY(-8px) scale(1.3); } 100% { transform: none; } }
/* ミッション: チェックが描かれる */
.mission-check svg { width: 16px; height: 16px; fill: none; stroke: #0b0c16; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .45s ease .1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* 連続記録の炎がゆらめく */
.streak.is-hot .streak-fire { animation: flicker 1.3s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.12) rotate(3deg); } }

/* 上部バーの連続記録 */
.topbar-streak { display: inline-flex; align-items: center; gap: 3px; font-weight: 900; color: var(--muted); background: var(--surface); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 999px; padding: 2px 12px; font-size: 15px; }
.topbar-streak[hidden] { display: none; }
.topbar-streak .streak-fire { filter: grayscale(1); opacity: .6; }
.topbar-streak.is-hot { color: var(--warn); }
.topbar-streak.is-hot .streak-fire { filter: none; opacity: 1; display: inline-block; animation: flicker 1.3s ease-in-out infinite; transform-origin: 50% 90%; }
.notfound { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 32px; }
.notfound h1 { font-size: 22px; color: var(--text); margin: 8px 0 0; }

/* ---------- イラストアイコン ---------- */
.ic { display: inline-block; vertical-align: middle; flex: none; }
h2 > .ic, summary > .ic, .kicker > .ic, .sec-head h2 > .ic { margin-right: 8px; margin-top: -3px; }
.chip .ic { margin: -2px 2px 0 -2px; align-self: center; }
.mhero-facts li { display: inline-flex; align-items: center; gap: 6px; }
.legend-side .ic { margin-right: 4px; }
.mx-axis-head span { display: inline-flex; align-items: center; gap: 4px; }
.vote-buttons button .ic { margin-right: 2px; }
.genre-emoji .ic { display: block; }
.mx-round svg { width: 34px; height: 34px; }
.mx-round.nope svg { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; width: 30px; height: 30px; }
.streak-fire .ic, .topbar-streak .ic { display: block; }
.empty-emoji .ic { margin: 0 auto 8px; display: block; }
.badge-emoji .ic { display: block; margin: 0 auto 4px; }
.toast-emoji .ic { display: block; }
.zukan p .ic { margin-right: 6px; }
.hero-tags { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.hero-tags li { font-size: 14px; font-weight: 800; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); border-bottom-width: 4px; }
.hero-tags li:nth-child(1) { color: var(--accent-2); } .hero-tags li:nth-child(2) { color: var(--pink); } .hero-tags li:nth-child(3) { color: var(--warn); } .hero-tags li:nth-child(4) { color: var(--nope); }

/* ---------- データで見るこの作品・感想まとめ ---------- */
.insights { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.insights li { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; padding: 10px 14px; font-size: 15px; line-height: 1.6; }
.sum-lead { font-size: 16px; line-height: 1.85; background: var(--surface); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 12px; }
.sum-cols { display: grid; gap: 10px; }
.sum-cols > div { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.sum-cols h3 { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 0 0 6px; }
.sum-good h3 { color: var(--pink); } .sum-bad h3 { color: var(--warn); }
.sum-cols ul { margin: 0; padding-left: 18px; font-size: 14px; }
.sum-cols li { margin: 4px 0; }
.sum-fit { background: color-mix(in srgb, var(--accent-2) 12%, var(--surface)); border-left: 4px solid var(--accent-2); border-radius: 12px; padding: 10px 14px; margin: 12px 0 8px; }
.sum-fit b { display: block; font-size: 12px; color: var(--accent-2); }
@media (min-width: 760px) { .sum-cols { grid-template-columns: 1fr 1fr; } }
/* PC幅: 下部タブバーを中央に浮かぶ細長いバーにする */
@media (min-width: 760px) {
  .tabbar { left: 50%; right: auto; bottom: 16px; width: 520px; transform: translateX(-50%); height: var(--tab-h); padding: 0; border-radius: 22px; border: 2px solid var(--line); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
  .buybar { bottom: calc(var(--tab-h) + 28px); left: 50%; right: auto; width: 520px; transform: translateX(-50%); border-radius: 18px; border: 2px solid var(--line); }
  body { padding-bottom: calc(var(--tab-h) + 40px); }
  body.has-buybar { padding-bottom: calc(var(--tab-h) + 120px); }
}
