:where(.asobi) button { -webkit-appearance: none; appearance: none; color: var(--ink); background: none; border: 0; font: inherit; }
:where(.asobi) :where(button, a):focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* あそびプリント (/asobi/) — 迷路・まちがいさがし。scripts/asobi/build.py が生成するページ用。
   問題の紙 (.sheet) は印刷物なので、ダークモードでも白い紙のまま (色は変数にせず固定する)。
   印刷は A4 たて 1 枚。こたえは「こたえも いっしょに」を選んだときだけ 2 枚目に出す */

.asobi .brand-sub { margin-left: 8px; font-size: 12px; font-weight: 700; color: var(--soft); }

/* ---- いちらん ---- */
.asobi-hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 32px; padding-block: 32px 48px; }
.asobi-hero h1 { margin: 6px 0 14px; font-size: clamp(34px, 5vw, 58px); line-height: 1.2; letter-spacing: -.02em; }
.asobi-hero h1 span { color: var(--accent-text); }
.asobi-hero .lead { color: var(--soft); font-size: 16px; max-width: 34em; }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.asobi .btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 999px; background: var(--sun); color: var(--on-sun); font-weight: 800; text-decoration: none; box-shadow: 0 6px 16px rgb(var(--sun-shadow-rgb) / 35%); }
.asobi .btn.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.hero-art { position: relative; aspect-ratio: 1.15; }
.hero-art img { position: absolute; height: auto; filter: drop-shadow(0 8px 10px rgb(var(--shadow-rgb) / 12%)); }
.hero-art .h-map { width: 48%; left: 4%; bottom: 4%; }
.hero-art .h-mag { width: 42%; right: 6%; top: 2%; }
.hero-art .h-mii { width: 20%; right: 10%; bottom: 6%; }
.hero-art .h-piyo { width: 12%; left: 50%; bottom: 8%; }

.asobi-list { padding-block: 28px; }
.asobi-list h2 { margin: 0 0 4px; font-size: 32px; }
.list-lead { margin: 0 0 8px; color: var(--soft); }
.level-head { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; font-size: 18px; }
.level-head span { color: #E0A93A; letter-spacing: .1em; }
.level-head small { color: var(--soft); font-size: 13px; font-weight: 700; }

.puzzle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.puzzle-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 16px; border-radius: 20px; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: 0 1px 0 var(--line), 0 10px 24px rgb(var(--shadow-rgb) / 8%); transition: transform .2s ease, box-shadow .2s ease; }
.puzzle-card:hover { transform: translateY(-3px); box-shadow: 0 1px 0 var(--line), 0 16px 30px rgb(var(--shadow-rgb) / 14%); }
.puzzle-card img { width: 100%; height: auto; aspect-ratio: 480 / 340; object-fit: cover; object-position: top; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.puzzle-card strong { font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif; font-size: 17px; line-height: 1.4; }
.card-level { align-self: flex-start; margin-top: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--chip-mint-bg); color: var(--chip-mint-text); }
.card-level.l2 { background: var(--chip-yellow-bg); color: var(--chip-yellow-text); }
.card-level.l3 { background: var(--sakura); color: #7A3036; }
.card-story { color: var(--soft); font-size: 13px; line-height: 1.6; }

.asobi-faq { padding-block: 28px 56px; }
.asobi-faq h2 { font-size: 26px; }
.asobi-faq details { padding: 14px 0; border-bottom: 1px solid var(--line); }
.asobi-faq summary { cursor: pointer; font-weight: 700; }
.asobi-faq p { margin: 8px 0 0; color: var(--soft); }

/* ---- 1 枚のページ ---- */
.asobi-page { padding-block: 8px 48px; }
.crumbs { margin: 0 0 12px; font-size: 13px; color: var(--soft); }
.crumbs a { color: var(--soft); }

.sheet { max-width: 820px; margin: 0 auto; padding: 28px 30px 18px; border-radius: 6px; background: #fff; color: #5C4633;
  box-shadow: 0 1px 2px rgb(0 0 0 / 8%), 0 18px 40px rgb(var(--shadow-rgb) / 14%); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 10px; }
.sheet-kind { margin: 0; font-size: 13px; font-weight: 700; color: #8B6B4F; }
.sheet-kind .stars { color: #E0A93A; letter-spacing: .08em; }
.sheet h1 { margin: 2px 0 4px; font-size: 26px; line-height: 1.3; color: #5C4633; }
.sheet-story { margin: 0; font-size: 15px; color: #5C4633; }
.sheet-name { flex: none; display: flex; align-items: flex-end; gap: 6px; margin: 4px 0 0; font-size: 13px; font-weight: 700; color: #8B6B4F; }
.sheet-name span { display: inline-block; width: 150px; border-bottom: 1.5px solid #8B6B4F; height: 26px; }
.sheet-art { display: block; width: 100%; height: auto; }
.sheet-art .lbl { font: 800 4.2px "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif; fill: #5C4633; text-anchor: middle; }
.panel { margin: 0 0 8px; }
.panel figcaption { margin: 0 0 3px; font-size: 12px; font-weight: 800; color: #8B6B4F; }
.tally { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; font-size: 13px; font-weight: 800; color: #8B6B4F; }
.tally span:first-child { margin-right: 4px; }
.tally-dot { width: 20px; height: 20px; border: 1.8px solid #C9B49C; border-radius: 50%; }
.sheet-foot { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0 0; padding-top: 8px; border-top: 1px dashed #E3D3BD; font-size: 11px; color: #A08870; }

.answer-sheet { display: none; margin-top: 24px; }
.show-answer .answer-sheet { display: block; }

.sheet-tools { max-width: 820px; margin: 18px auto 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.sheet-tools button { min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px; font: inherit; font-weight: 800; cursor: pointer; }
.btn-sub { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--sun); }
.btn-print { background: var(--sun); color: var(--on-sun); box-shadow: 0 6px 16px rgb(var(--sun-shadow-rgb) / 35%); }
.btn-print:disabled { opacity: .5; cursor: default; }
.btn-sub { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 800; text-decoration: none; box-shadow: inset 0 0 0 2px var(--line); }
.btn-answer { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.with-answer { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--soft); cursor: pointer; }
.tools-note { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--soft); }

.related { max-width: 820px; margin: 44px auto 0; }
.related h2 { font-size: 22px; }
.related .more { margin-top: 14px; }
.asobi-apps { max-width: 820px; margin: 40px auto 0; display: flex; align-items: center; gap: 20px; padding: 20px 24px; border-radius: 24px; background: var(--blush); }
.asobi-apps img { width: 110px; height: auto; flex: none; }
.asobi-apps h2 { margin: 0 0 6px; font-size: 20px; }
.asobi-apps p { margin: 0 0 6px; color: var(--soft); font-size: 14px; }

@media (max-width: 760px) {
  .asobi-hero { grid-template-columns: 1fr; padding-top: 12px; }
  .hero-art { max-width: 420px; width: 100%; margin: 0 auto; }
  .sheet { padding: 16px 14px 12px; }
  .sheet h1 { font-size: 21px; }
  .sheet-head { flex-direction: column; gap: 6px; }
  .sheet-name span { width: 120px; }
  .asobi-apps { flex-direction: column; text-align: center; }
  /* スマホはボタンを横いっぱいに */
  .sheet-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .sheet-tools button { width: 100%; padding: 0 10px; }
  .sheet-tools .btn-print { grid-column: 1 / -1; }
  .with-answer, .tools-note { grid-column: 1 / -1; }
}

/* ---- 印刷 ---- */
@page { size: A4 portrait; margin: 10mm; }
@media print {
  html, body { background: #fff !important; }
  body.asobi { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .asobi .page-shell > :not(main), .asobi .no-print, .asobi .guide, .asobi .family-strip { display: none !important; }
  .asobi-page { width: auto; padding: 0; }
  .sheet { max-width: none; margin: 0; padding: 0; border-radius: 0; box-shadow: none; break-inside: avoid; }
  /* 印刷の幅 (約 720px) はスマホ向けの段組みに入ってしまうので、見出しは横並びに戻す */
  .sheet-head { flex-direction: row; gap: 12px; margin-bottom: 6px; }
  .sheet h1 { font-size: 19pt; }
  .sheet-story { font-size: 10.5pt; }
  .sheet-art { max-height: 218mm; width: auto; max-width: 100%; margin: 0 auto; }
  .panel { margin-bottom: 3mm; }
  .panel .sheet-art { max-height: 90mm; }   /* お話が 2 行でも 足もとの行が 2 まいめに こぼれないように */
  .tally { margin-top: 2mm; }
  .sheet-foot { margin-top: 3mm; padding-top: 2mm; }
  .answer-sheet { display: none !important; }
  .print-answer .answer-sheet { display: block !important; break-before: page; margin-top: 0; }
  .print-sheet + .print-sheet { break-before: page; }
  .print-page { width: auto; padding: 0; }
  .pick-bar, }

/* ---- なぜ紙とえんぴつ? / おでかけセット / おうちの方へ ---- */
.asobi-hero .lead strong { color: var(--ink); }
.asobi-why { padding-block: 40px 24px; text-align: center; }
.asobi-why h2 { margin: 6px 0 14px; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.35; }
.why-lead { max-width: 40em; margin: 0 auto 28px; color: var(--soft); font-size: 16px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; text-align: left; }
.why-card { padding: 22px 22px 20px; border-radius: 24px; background: var(--card); box-shadow: 0 1px 0 var(--line), 0 10px 24px rgb(var(--shadow-rgb) / 7%); }
.why-card img { width: 72px; height: 72px; object-fit: contain; }
.why-card h3 { margin: 8px 0 6px; font-size: 19px; }
.why-card p { margin: 0; color: var(--soft); font-size: 14px; line-height: 1.75; }


.asobi-tips { padding-block: 28px 8px; }
.asobi-tips h2 { font-size: 24px; }
.tips-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tips-cols h3 { margin: 0 0 6px; font-size: 16px; }
.tips-cols ul, .parent-note ul { margin: 0; padding-left: 1.2em; color: var(--soft); font-size: 14px; }
.tips-cols li, .parent-note li { margin-bottom: 6px; }

.parent-note { max-width: 820px; margin: 28px auto 0; padding: 20px 24px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.parent-note h2 { margin: 0 0 8px; font-size: 18px; }
.parent-note p { margin: 8px 0 0; font-size: 13px; color: var(--soft); }

@media (max-width: 860px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
    .tips-cols { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
  .why-grid { grid-template-columns: 1fr; gap: 12px; }
  .why-card { display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; padding: 16px; }
  .why-card img { width: 56px; height: 56px; grid-row: span 2; }
  .why-card h3 { margin: 0 0 4px; font-size: 17px; }
  }

/* ---- 一覧: 数・流れるサムネイル・しぼりこみ・横スワイプの列・えらぶ ---- */
.hero-count { display: flex; gap: 10px; margin: 0 0 14px; }
.hero-count a { display: flex; flex-direction: column; align-items: center; min-width: 118px; padding: 10px 16px 8px; border-radius: 20px; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 2px var(--sun), 0 8px 20px rgb(var(--sun-shadow-rgb) / 22%); line-height: 1.1; font-weight: 800; }
.hero-count b { font: 800 44px/1 "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif; color: var(--accent-text); }
.hero-count small { margin-top: 4px; font-size: 12px; color: var(--soft); }
.hero-count a.is-new { position: relative; }
.hero-count a i { position: absolute; top: -8px; right: -6px; padding: 2px 7px; border-radius: 999px; background: #e8833a; color: #fff; font: 800 10px/1.4 "M PLUS Rounded 1c", sans-serif; font-style: normal; letter-spacing: .04em; }

.thumb-marquee { overflow: hidden; margin: 0 0 8px; padding: 6px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 10px; width: max-content; animation: asobi-marquee 70s linear infinite; }
.marquee-track img { width: 150px; height: auto; border-radius: 10px; background: #fff; box-shadow: 0 4px 12px rgb(var(--shadow-rgb) / 12%); }
@keyframes asobi-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

.asobi-filter { margin: 8px 0 4px; }
.filter-inner { padding: 16px 18px 12px; border-radius: 24px; background: var(--card); box-shadow: 0 1px 0 var(--line), 0 10px 24px rgb(var(--shadow-rgb) / 7%); box-sizing: border-box; }
.filter-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 3px 0; }
.filter-label { flex: none; width: 5.6em; font-size: 12px; font-weight: 800; color: var(--soft); white-space: nowrap; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row button { flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; }
.filter-row button small { color: var(--soft); font-weight: 700; }
.filter-row button[aria-pressed="true"] { background: var(--sun); color: var(--on-sun); box-shadow: none; }
.filter-row button[aria-pressed="true"] small { color: var(--on-sun); }
.filter-result { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); }
.filter-result p { margin: 0 auto 0 0; font-weight: 800; color: var(--soft); }
.filter-result b { font: 800 26px/1 "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif; color: var(--accent-text); }
.omakase { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--sun); cursor: pointer; }
.omakase::before { content: "🎲 "; }

.asobi-list h2 small { font-size: 15px; color: var(--soft); }
.level-row[hidden], .card-wrap[hidden], .asobi-list[hidden] { display: none !important; }
.level-head { align-items: center; }
.card-wrap { position: relative; }
.card-wrap .puzzle-card { height: 100%; box-sizing: border-box; }
.pick-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: var(--card); box-shadow: 0 -6px 20px rgb(var(--shadow-rgb) / 16%); }
.pick-bar[hidden] { display: none; }
.pick-bar-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pick-bar p { margin: 0; font-weight: 800; }
.pick-bar b { font-size: 22px; color: var(--accent-text); }
.pick-bar label { font-size: 13px; color: var(--soft); display: inline-flex; align-items: center; gap: 4px; }
.pick-go { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--sun); color: var(--on-sun); font-weight: 800; text-decoration: none; }
.pick-clear { border: 0; background: none; color: var(--soft); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.has-picks body { padding-bottom: 84px; }

.asobi-tips summary { list-style: none; cursor: pointer; }
.asobi-tips summary::-webkit-details-marker { display: none; }
.asobi-tips summary h2 { display: inline; }
.asobi-tips summary::after { content: " ＋"; font-weight: 800; color: var(--accent-text); }
.asobi-tips details[open] summary::after { content: " −"; }

.print-page { padding-block: 8px 48px; }
.print-tools { max-width: 820px; margin: 0 auto 18px; }
.print-tools h1 { margin: 0 0 4px; font-size: 26px; }
.print-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.print-actions button { min-height: 46px; padding: 0 26px; border: 0; border-radius: 999px; font: inherit; font-weight: 800; cursor: pointer; }
.print-sheets .sheet { margin-bottom: 20px; }

/* スマホ: 列は横にスワイプ (縦に長くならない)。絞り込んだときだけ 2 列の一覧 */
@media (max-width: 760px) {
  .asobi-hero .hero-art { display: none; }
  .asobi-hero { padding-block: 8px 12px; }
  .asobi-hero h1 { font-size: 32px; margin-bottom: 10px; }
  .hero-count a { flex: 1; min-width: 0; padding-inline: 6px; }
  .hero-count b { font-size: 36px; }
  .hero-count small { font-size: 11px; white-space: nowrap; }
  .asobi-list { padding-block: 16px; }
  .asobi-list h2 { font-size: 24px; }
  .list-lead { font-size: 13px; }
  html:not(.asobi-filtered) .level-row .puzzle-grid { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 2px 20px 12px; scrollbar-width: none; }
  html:not(.asobi-filtered) .level-row .puzzle-grid::-webkit-scrollbar { display: none; }
  html:not(.asobi-filtered) .level-row .card-wrap { flex: 0 0 44%; scroll-snap-align: start; }
  .asobi-filtered .puzzle-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .puzzle-card { padding: 8px 8px 10px; border-radius: 16px; gap: 4px; }
  .puzzle-card strong { font-size: 14px; }
  .card-story { display: none; }
  .card-level { font-size: 11px; padding: 1px 8px; }
    .level-head { margin: 14px 0 8px; font-size: 16px; white-space: nowrap; gap: 6px; }
  .level-head small { font-size: 12px; }
  .level-head .age { display: none; }
  .why-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px 8px; }
  .why-card { flex: 0 0 78%; scroll-snap-align: start; }
  .pick-go { margin-left: 0; }
}

/* ---- いちばん上: なぜ、紙とえんぴつ? (h1 もここ) と 数 ---- */
.asobi-top { display: grid; grid-template-columns: 1.25fr .75fr; gap: 12px 28px; align-items: center; padding-block: 28px 8px; text-align: left; }
.asobi-top h1 { margin: 6px 0 12px; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.3; letter-spacing: -.01em; }
.asobi-top h1 span { color: var(--accent-text); }
.asobi-top .why-lead { margin: 0; max-width: 34em; text-align: left; }
.top-art { position: relative; aspect-ratio: 1.1; }
.top-art img { position: absolute; height: auto; filter: drop-shadow(0 8px 10px rgb(var(--shadow-rgb) / 12%)); }
.top-art .h-map { width: 58%; left: 0; bottom: 0; }
.top-art .h-mag { width: 50%; right: 0; top: 0; }
.asobi-top .why-grid { grid-column: 1 / -1; margin-top: 18px; }
.asobi-count { padding-block: 18px 6px; }
.asobi-count .hero-count { margin: 0 0 8px; }
.count-note { margin: 0; color: var(--soft); font-size: 14px; }

@media (max-width: 760px) {
  .asobi-top { grid-template-columns: 1fr; padding-block: 12px 4px; }
  .asobi-top h1 { font-size: 27px; }
  .asobi-top .why-lead { font-size: 14px; }
  .top-art { display: none; }
  .asobi-top .why-grid { margin-top: 12px; }
  .asobi-top .why-card p { font-size: 13px; line-height: 1.7; }   /* 文は短く書いて、切らずに全部見せる (…で切れると読めない) */
  .filter-inner { padding: 12px 12px 10px; }
  .filter-label { width: 5.4em; font-size: 11px; }
  .filter-row button { min-height: 34px; padding: 0 12px; font-size: 13px; }
}
.filter-empty { margin: 18px 0; padding: 18px; border-radius: 18px; background: var(--blush); color: var(--soft); font-weight: 700; text-align: center; }
.filter-empty[hidden] { display: none; }

/* ---- まとめて いんさつ: しぼった条件のまま / えらんで ---- */
.print-actions-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-top: 10px; }
.print-these { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--sun); color: var(--on-sun); font-weight: 800; text-decoration: none; box-shadow: 0 6px 16px rgb(var(--sun-shadow-rgb) / 35%); }
.print-these b { font-size: 20px; }
.print-these::before { content: "🖨 "; }
.print-these.disabled, .pick-go.disabled { opacity: .45; pointer-events: none; }
.select-start { min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 800; box-shadow: inset 0 0 0 2px var(--sun); cursor: pointer; }
.select-start::before { content: "☑ "; }
.kotae-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--soft); }
.kotae-check input { width: 18px; height: 18px; accent-color: #E0A93A; }

.select-head { position: fixed; top: 0; left: 0; right: 0; z-index: 25; box-shadow: 0 6px 18px rgb(var(--shadow-rgb) / 18%); padding: 10px 0; background: var(--sun); color: var(--on-sun); }
.select-head[hidden] { display: none; }
.select-head p { margin: 0; font-size: 14px; }
.select-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px !important; }
.select-tools button { min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--card); color: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; }

/* えらぶモード: カードを チェックつきの 1 行に */
.check { display: none; }
.select-mode .puzzle-grid { display: flex !important; flex-direction: column; gap: 6px; }
.select-mode .card-wrap { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; }
.select-mode .card-wrap.picked { box-shadow: inset 0 0 0 2.5px var(--sun); background: var(--blush); }
.select-mode .check { display: block; grid-row: 1; width: 26px; height: 26px; border-radius: 8px; box-shadow: inset 0 0 0 2px #C9B49C; background: #fff; }
.select-mode .picked .check { background: var(--sun); box-shadow: none; }
.select-mode .picked .check::after { content: "✓"; display: block; text-align: center; line-height: 26px; font-weight: 800; color: #5C4633; }
.select-mode .puzzle-card { display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 0; background: none; box-shadow: none; pointer-events: none; }
.select-mode .puzzle-card img { grid-row: 1 / 3; width: 76px; border-radius: 8px; }
.select-mode .puzzle-card strong { font-size: 14px; }
.select-mode .puzzle-card .card-level { grid-column: 2; margin: 0; justify-self: start; }
.select-mode .card-story { display: none; }
.select-mode .card-wrap { order: 0; }
.select-mode .level-row .puzzle-grid { margin: 0 !important; padding: 0 !important; overflow: visible !important; }
.select-mode .level-row .card-wrap { flex: none !important; }

.to-list { display: inline-block; margin-top: 6px; font-size: 14px; font-weight: 800; color: var(--accent-text); }
.sheet-tools .to-list { grid-column: 1 / -1; }

/* ---- しぼりこみを 大きく・手ごたえを つける ---- */
.filter-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.filter-top h2 { margin: 0; font-size: 20px; }
.filter-reset { min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--blush); color: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; }
.filter-reset[hidden] { display: none; }
.filter-row { padding: 5px 0; gap: 8px; }
.filter-label { width: 7.4em; font-size: 13px; color: var(--ink); }
.filter-row button { min-height: 44px; padding: 0 18px; font-size: 15px; box-shadow: inset 0 0 0 2px var(--line); transition: background .15s, box-shadow .15s, transform .15s; }
.filter-row button:hover { box-shadow: inset 0 0 0 2px var(--sun); }
.filter-row button:active { transform: scale(.94); }
.filter-row button[aria-pressed="true"] { box-shadow: 0 4px 12px rgb(var(--sun-shadow-rgb) / 45%); }
.filter-row button[aria-pressed="true"]::before { content: "✓ "; font-weight: 900; }
.filter-row button.pop { animation: chip-pop .32s ease; }
@keyframes chip-pop { 0% { transform: scale(.9); } 55% { transform: scale(1.1); } 100% { transform: scale(1); } }
.filter-summary { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--blush); color: var(--ink); }
.filter-result b.bump { display: inline-block; animation: count-bump .45s ease; }
@keyframes count-bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); color: #E0A93A; } 100% { transform: scale(1); } }
.card-wrap.appear { animation: card-in .35s ease both; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.see-results { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 28; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; min-height: 50px; padding: 0 26px; border-radius: 999px; background: var(--ink); color: var(--ivory); font-weight: 800; text-decoration: none; box-shadow: 0 10px 26px rgb(0 0 0 / 25%); white-space: nowrap; }
.see-results[hidden] { display: none; }
.see-results b { font-size: 20px; color: var(--sun); }
.see-results.appear { animation: see-in .3s ease both; }
@keyframes see-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.has-picks .see-results { bottom: calc(92px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { .filter-row button.pop, .filter-result b.bump, .card-wrap.appear, .see-results.appear { animation: none; } }
@media (max-width: 760px) {
  .filter-row { flex-wrap: wrap; overflow: visible; }
  .filter-label { width: 100%; margin: 4px 0 -2px; font-size: 12px; }
  .filter-row button { min-height: 42px; padding: 0 14px; font-size: 14px; }
  .filter-top h2 { font-size: 18px; }
  .print-these { width: 100%; justify-content: center; box-sizing: border-box; }
  .select-start { flex: 1 0 auto; white-space: nowrap; }
  .kotae-check { flex-basis: 100%; }
}
.select-mode .asobi-lists { scroll-margin-top: 96px; }
.select-mode body { padding-top: 88px; }
