/* =====================================================
   hard-pick.css — 数学「🔥 高難度」：型えらびの画面と、5問のあとの結果のボタン（本番用・2026-10-09）
   デモ（2026-10-08）の hard-pick.css から、型の番号と「本番に章なし」の札の見た目を外したもの。見た目はデモのまま。
   効くのは #hardpick（型えらび）と、結果の画面に足した 2 つだけ。
   色は今のアプリにそろえる：クリームの地・白いカード・🔥 の紫（--hard2 #5B4B8A）・★ の金（#C9821E）・マナモンの緑。
   スマホ 390・360 で横にはみ出さない。読む文字 16px 以上・押す所 44px 以上。動きは控えめ（reduced-motion で止める）。
===================================================== */
#hardpick.screen{padding-bottom:104px;}   /* 右下のマスコットに、いちばん下の型がかくれないように */
.hp-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}

/* ---------- 見出し（章の名前と、やること） ---------- */
.hp-top{position:relative;overflow:hidden;margin:0 0 12px;padding:20px 18px 16px;border-radius:18px;background:#fff;
  border:1px solid var(--line);box-shadow:0 2px 6px -4px rgba(70,55,30,.22);}
.hp-top::before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:linear-gradient(90deg,#5B4B8A,#FFD86B);}
.hp-eyebrow{display:flex;align-items:center;gap:4px;margin:0;font-size:13px;font-weight:800;letter-spacing:.04em;color:#5B4B8A;}
.hp-dot{color:#B9A8E3;}
.hp-title{margin:4px 0 6px;font-size:22px;font-weight:900;line-height:1.45;color:var(--ink);}
.hp-title:focus{outline:none;}
.hp-lead{margin:0;font-size:16px;line-height:1.8;color:#5c554b;letter-spacing:normal;}
.hp-lead .nb{display:inline-block;}
.hp-lead b{color:var(--ink);}

/* ---------- しぼりこみ（むずかしさ・発展だけ） ---------- */
.hp-filter{display:flex;flex-direction:column;gap:8px;margin:0 0 16px;padding:12px;border-radius:16px;background:#fff;border:1px solid var(--line);}
.hp-frow{display:flex;flex-wrap:wrap;align-items:center;gap:6px;}
.hp-frow-star{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;}   /* 「すべて・★1・★2・★3」を1行に（360 の幅でも） */
.hp-chip{display:inline-flex;align-items:center;justify-content:center;gap:2px;min-width:0;min-height:44px;padding:0 14px;
  border:1.5px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font:inherit;font-size:16px;font-weight:800;
  line-height:1;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background-color .15s,border-color .15s,color .15s;}
.hp-chip-star{color:#C9821E;}
.hp-chip.on{background:#5B4B8A;border-color:#5B4B8A;color:#fff;}
.hp-chip.on .hp-chip-star{color:#FFD86B;}
.hp-chip:disabled{opacity:.4;cursor:default;}
.hp-chip-box{position:relative;display:inline-block;width:18px;height:18px;margin-right:6px;border:2px solid #B9A8E3;border-radius:5px;background:#fff;}
.hp-chip-h.on .hp-chip-box{background:#FFD86B;border-color:#FFD86B;}
.hp-chip-h.on .hp-chip-box::after{content:"";position:absolute;left:4px;top:0;width:5px;height:10px;border:solid #3A3357;border-width:0 2.5px 2.5px 0;transform:rotate(45deg);}
.hp-count{margin-left:auto;font-size:14px;font-weight:800;color:var(--ink-soft);white-space:nowrap;}
.hp-sel{display:block;position:relative;}
.hp-sel::after{content:"";position:absolute;right:16px;top:50%;width:8px;height:8px;margin-top:-6px;border:solid #5B4B8A;border-width:0 2px 2px 0;transform:rotate(45deg);pointer-events:none;}
.hp-sel select{display:block;width:100%;min-height:46px;padding:8px 40px 8px 14px;border:1.5px solid var(--line);border-radius:12px;background:#fff;
  color:var(--ink);font:inherit;font-size:16px;font-weight:700;-webkit-appearance:none;appearance:none;cursor:pointer;text-overflow:ellipsis;}
.hp-sel select:focus-visible{outline:3px solid #297f67;outline-offset:2px;}
#hardpick .backbtn{min-height:44px;}

/* ---------- 型の一覧（小さな単元ごと） ---------- */
.hp-group{margin:0 0 18px;}
.hp-group[hidden]{display:none;}
.hp-gname{display:flex;align-items:center;gap:7px;margin:0 2px 8px;font-size:14px;font-weight:800;line-height:1.5;color:#594873;}
.hp-gname::before{content:"";flex:0 0 auto;width:7px;height:7px;border-radius:2px;background:#B9A8E3;}
.hp-rows{display:flex;flex-direction:column;gap:8px;}
.hp-type{display:flex;align-items:center;gap:10px;width:100%;min-height:64px;margin:0;padding:12px 12px 12px 14px;
  border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink);font:inherit;text-align:left;cursor:pointer;
  box-shadow:0 2px 6px -4px rgba(70,55,30,.22);-webkit-tap-highlight-color:transparent;
  transition:border-color .15s,box-shadow .15s,background-color .6s;}
.hp-type[hidden]{display:none;}
.hp-type:hover{border-color:#B9A8E3;}
.hp-type:active{background:#F6F3FA;}
.hp-type-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;}
.hp-type-tags{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;}
.hp-stars{font-size:14px;font-weight:800;letter-spacing:.04em;color:#C9821E;white-space:nowrap;}
.hp-pill{display:inline-block;padding:1px 8px;border-radius:999px;font-size:12px;font-weight:800;line-height:1.6;white-space:nowrap;}
.hp-hatten{background:#EDE6FA;color:#5B4B8A;box-shadow:inset 0 0 0 1px #B9A8E3;}
.hp-few{background:#F4EEE2;color:#6E665B;box-shadow:inset 0 0 0 1px #E2D6C2;}
.hp-done{padding:1px 8px;border-radius:999px;background:#EAF7F3;color:#1F8F7C;font-size:12px;font-weight:800;line-height:1.6;white-space:nowrap;}
.hp-type-name{font-size:17px;font-weight:800;line-height:1.5;color:var(--ink);overflow-wrap:anywhere;}
.hp-type-desc{font-size:16px;line-height:1.65;color:#5c554b;letter-spacing:normal;overflow-wrap:anywhere;}
.hp-type-go{flex:0 0 auto;display:flex;align-items:center;justify-content:center;gap:3px;min-height:44px;
  padding:4px 9px 4px 11px;border-radius:999px;background:#F1EDF8;color:#5B4B8A;font-size:13px;font-weight:800;line-height:1;white-space:nowrap;}
.hp-go-n b{font-size:18px;font-weight:900;margin-right:1px;}
.hp-type-go i{font-style:normal;font-size:18px;line-height:1;}
/* 結果の画面から「ほかの型をえらぶ」でもどったとき、さっきの型を少しだけ光らせる */
.hp-type.hp-justback{border-color:#5B4B8A;background:#F6F3FA;box-shadow:0 0 0 3px rgba(91,75,138,.22);}

.hp-empty{margin:4px 0 16px;padding:18px 16px;border:1px dashed #CFC4E3;border-radius:14px;background:#fff;font-size:16px;line-height:1.7;text-align:center;color:var(--ink-soft);}
.hp-empty[hidden]{display:none;}
.hp-reset{display:block;margin:10px auto 0;min-height:44px;padding:0 18px;border:1.5px solid var(--line);border-radius:999px;background:#fff;
  color:#5B4B8A;font:inherit;font-size:16px;font-weight:800;cursor:pointer;}

/* いちばん下：これまでの「型をまぜて 8問」（ひかえめに） */
.hp-foot{margin:6px 0 0;}
.hp-mix{display:flex;flex-direction:column;align-items:center;gap:2px;width:100%;min-height:52px;padding:10px 14px;
  border:1.5px dashed #CFC4E3;border-radius:14px;background:transparent;color:#5B4B8A;font:inherit;font-size:16px;font-weight:800;
  line-height:1.5;cursor:pointer;}
.hp-mix small{font-size:14px;font-weight:600;color:var(--ink-soft);}
.hp-mix:active{background:#F6F3FA;}

/* ---------- 結果の画面（5問のときだけ出す） ---------- */
.hp-res-type{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 8px;margin:14px 0 8px;
  font-size:16px;line-height:1.6;color:var(--ink);}
.hp-res-type[hidden]{display:none;}
.hp-res-label{padding:1px 9px;border-radius:999px;background:#EDE6FA;color:#5B4B8A;font-size:12px;font-weight:800;}
.done-card .btn.hp-pickbtn[hidden]{display:none;}

@media (max-width:360px){
  .hp-top{padding:18px 14px 14px;}
  .hp-filter{padding:10px;}
  .hp-chip{padding:0 8px;}
  .hp-type{padding:12px 10px 12px 12px;gap:8px;}
  .hp-type-go{padding:4px 7px 4px 9px;}
}
@media (prefers-reduced-motion: reduce){
  .hp-chip,.hp-type{transition:none;}
}
