/* スキャン・ハンター（scan）専用の見た目 */
.scan-how { font-size: 15px; line-height: 1.7; margin: 4px 0 10px; }
.scan-how p { margin: 0 0 4px; }
.scan-bests { text-align: center; font-size: 13.5px; color: var(--ink2); display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin: 8px 0 0; }
.scan-bests b { color: var(--ink); }
.scan .g-bar.scan-low > i { background: var(--ng); }
.scan-combo { min-height: 18px; text-align: right; font-size: 13px; font-weight: 900; color: var(--r-col); margin-top: 2px; }
.scan-q { font-family: var(--en); font-weight: 700; font-size: 16px; line-height: 1.4; margin: 0 0 6px; display: flex; gap: 8px; align-items: flex-start; overflow-wrap: anywhere; }
.scan-qmark { flex: none; background: var(--board); color: #fff; font-family: var(--head); border-radius: 8px; padding: 0 8px; font-size: 15px; line-height: 1.6; }

/* 文書の箱（この中だけスクロール） */
.scan-box { max-height: clamp(170px, 40vh, 380px); overflow: auto; border: 3px solid var(--line); border-radius: 12px; background: var(--bg2); padding: 8px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; -webkit-user-select: text; user-select: text; }
.scan-box:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.scan-doc { --sc-acc: #2f6fb3; --sc-acc-ink: #fff; background: var(--card); color: var(--ink); border-radius: 8px; border: 2px solid var(--line); overflow: hidden; font-size: 14px; line-height: 1.5; }
.scan-k-flyer { --sc-acc: #ffd84a; --sc-acc-ink: #1d211f; }
.scan-k-menu { --sc-acc: #6b3e26; --sc-acc-ink: #fff5e6; }
.scan-k-timetable { --sc-acc: #1f4a3c; --sc-acc-ink: #f5f2e8; }
.scan-k-notice { --sc-acc: #c8423b; --sc-acc-ink: #fff; }
.scan-k-web { --sc-acc: #2f6fb3; --sc-acc-ink: #fff; }
.scan-head { background: var(--sc-acc); color: var(--sc-acc-ink); padding: 8px 12px 9px; position: relative; }
.scan-k-notice .scan-head { background: repeating-linear-gradient(135deg, #c8423b 0 14px, #b23630 14px 28px); }
.scan-k-flyer .scan-head { text-align: center; }
.scan-k-menu .scan-title { font-family: var(--en); font-style: italic; }
.scan-kind { display: inline-block; font-size: 10.5px; font-weight: 900; letter-spacing: 0.12em; opacity: 0.85; }
.scan-title { margin: 0; font-family: var(--head); font-weight: 900; font-size: 18px; line-height: 1.25; }
.scan-sub { margin: 2px 0 0; font-size: 12.5px; font-weight: 700; opacity: 0.92; }
.scan-browser { display: flex; align-items: center; gap: 5px; background: var(--bg2); border-bottom: 2px solid var(--line); padding: 4px 8px; font-size: 11px; color: var(--ink2); }
.scan-browser i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink3, #8a8f8b); display: inline-block; flex: none; }
.scan-browser span { margin-left: 6px; background: var(--card); border-radius: 999px; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.scan-body { padding: 8px 12px 10px; display: grid; gap: 7px; }
.scan-h { margin: 4px 0 0; font-size: 14px; font-weight: 900; border-bottom: 2px solid var(--sc-acc); padding-bottom: 2px; }
.scan-k-flyer .scan-h { border-color: var(--ink); }
.scan-p { margin: 0; }
.scan-note { margin: 0; font-size: 12.5px; color: var(--ink2); }
.scan-list { margin: 0; padding-left: 1.2em; display: grid; gap: 3px; }
.scan-kv { margin: 0; display: grid; gap: 0; border: 1px solid var(--soft, #e6dfcc); border-radius: 6px; overflow: hidden; }
.scan-kv-row { display: grid; grid-template-columns: minmax(84px, 36%) 1fr; border-top: 1px solid var(--soft, #e6dfcc); }
.scan-kv-row:first-child { border-top: 0; }
.scan-kv dt { font-weight: 800; background: var(--bg); padding: 4px 8px; overflow-wrap: anywhere; }
.scan-kv dd { margin: 0; padding: 4px 8px; overflow-wrap: anywhere; }
.scan-tw { overflow-x: auto; }
.scan-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.scan-table th, .scan-table td { border: 1px solid var(--soft, #e6dfcc); padding: 4px 6px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.scan-table thead th { background: var(--sc-acc); color: var(--sc-acc-ink); font-weight: 800; font-size: 12px; }
.scan-k-flyer .scan-table thead th { background: var(--bg2); color: var(--ink); }
.scan-table tbody th { font-weight: 800; background: var(--bg); }
.scan-k-timetable .scan-table td { font-variant-numeric: tabular-nums; }
.scan-table tr.scan-hl-row > * { background: rgba(255, 216, 74, 0.3); }

/* 答えとわなの印 */
mark.scan-hl { background: var(--yellow); color: #1d211f; border-radius: 3px; box-shadow: 0 0 0 2px var(--yellow); font-weight: 800; animation: scan-blink 0.5s ease 3; }
mark.scan-tp { background: rgba(200, 66, 59, 0.16); color: inherit; border-radius: 3px; outline: 2px dashed var(--ng); outline-offset: 1px; }
@keyframes scan-blink { 50% { box-shadow: 0 0 0 5px var(--yellow); } }

/* 選択肢と解説 */
.scan-panel { margin-top: 8px; }
.scan-ch { margin-top: 0; gap: 8px; }
.scan-ch .g-btn { flex-direction: row; justify-content: flex-start; align-items: center; gap: 8px; font-size: 14.5px; line-height: 1.35; min-height: 44px; padding: 6px 10px; }
.scan-ch { gap: 6px; }
.scan-num { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); font-size: 12px; line-height: 18px; text-align: center; background: var(--bg); color: var(--ink); }
.scan-ch .g-btn:disabled { cursor: default; }
.scan-ch-done .g-btn:not(.ok):not(.ng) { display: none; }
.scan-ch-done { grid-template-columns: 1fr; }
.scan-fb { border: 2px solid var(--line); border-radius: 10px; background: var(--bg); padding: 8px 10px; margin-bottom: 8px; font-size: 14px; line-height: 1.6; }
.scan-fb p { margin: 0 0 3px; }
.scan-res { font-weight: 900; font-size: 16px; }
.scan-res.ok { color: var(--ok); }
.scan-res.ng { color: var(--ng); }
.scan-tag-hl, .scan-tag-tp { display: inline-block; font-size: 11.5px; border-radius: 6px; padding: 0 6px; margin-right: 6px; color: #1d211f; }
.scan-tag-hl { background: var(--yellow); }
.scan-tag-tp { background: #f3c1bd; }
.scan-next { width: 100%; margin-top: 8px; flex-direction: row; gap: 10px; }
.scan-rank { font-size: 17px; margin: 4px 0; }
.scan-rank b { font-family: var(--head); font-size: 22px; }
.scan-new { display: inline-block; background: var(--yellow); color: #1d211f; font-weight: 900; border: 2px solid var(--line); border-radius: 999px; padding: 2px 14px; margin: 4px 0; animation: scan-glow 1s ease-in-out infinite alternate; }
@keyframes scan-glow { from { transform: scale(1); } to { transform: scale(1.07); } }
.scan-stats { font-size: 14px; color: var(--ink2); margin: 4px 0 0; }
.scan-rv-h { font-weight: 800; margin: 14px 0 0; text-align: left; font-size: 14.5px; }
@media (prefers-reduced-motion: reduce) { mark.scan-hl, .scan-new { animation: none; } }
