/* 由 tools/hide-mode-build.cjs 從 ../redesign-preview/hide-mode/hm.css 產生，請改來源後重跑。 */
/* 2026-10-22 注音躲貓貓兩種模式（搭配 hm.js）：分類頁選模式＋第 N 關、遊戲頁蓋章模式（蓋印章）的印章效果 */
/* ── 分類頁：標題下面兩顆大鈕 ── */
.hm-left{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}
.hm-left h1{margin:0}
.hm-modes{display:flex;gap:10px}
html:root body .hm-mode{display:flex;align-items:center;gap:8px;margin:0;border:2px solid #E3F1DA;background:#FBFDF9!important;border-radius:20px;padding:5px 16px 5px 6px;font-family:inherit;color:#2A4A30!important;cursor:pointer;box-shadow:0 3px 0 #E3F1DA;text-align:left;transition:transform .15s,box-shadow .15s,border-color .15s}
.hm-mode i{flex:none;width:46px;height:46px;border-radius:50%;background:#EAF6E4;display:grid;place-items:center}
.hm-mode i svg{width:38px;height:38px;overflow:visible}
.hm-mode b{display:block;font-size:20px;font-weight:900;line-height:1.15;color:#2E7A38;white-space:nowrap}
.hm-mode small{display:block;font-size:14px;font-weight:700;color:#6a8460;white-space:nowrap}
html:root body .hm-mode:hover{transform:translateY(-2px)}
html:root body .hm-mode.on{border-color:#F28C28;background:#FFF4E8!important;box-shadow:0 0 0 3px #FFD9B8,0 4px 0 #F2B27A}
.hm-mode.on b{color:#E8590C}.hm-mode.on i{background:#fff}
/* 小圖示動畫：選到的那一個才會動 */
.hm-ic-c{fill:none;stroke:#D40D20;stroke-width:3.5;stroke-linecap:round;stroke-dasharray:82;stroke-dashoffset:0}
.hm-ic-imp{fill:none;stroke:#D40D20;stroke-width:3;opacity:.9}
.hm-mode.on .hm-ic-c{animation:hm-drawc 2.4s ease-in-out infinite}
.hm-mode.on .hm-ic-pen{animation:hm-pen 2.4s ease-in-out infinite}
.hm-mode.on .hm-ic-st{animation:hm-thump 1s ease-in infinite}
.hm-mode.on .hm-ic-imp{animation:hm-impin 1s ease-out infinite}
@keyframes hm-drawc{0%{stroke-dashoffset:82}60%,90%{stroke-dashoffset:0;opacity:1}100%{stroke-dashoffset:0;opacity:0}}
@keyframes hm-pen{0%,100%{transform:translate(0,0)}30%{transform:translate(-14px,6px)}60%{transform:translate(-4px,14px)}}
@keyframes hm-thump{0%,50%{transform:translateY(-3px)}62%{transform:translateY(7px)}75%{transform:translateY(-1px)}}
@keyframes hm-impin{0%,58%{opacity:0;transform:scale(1.4);transform-origin:24px 38px}66%{opacity:1;transform:scale(1)}90%{opacity:1}100%{opacity:0}}
/* 第 N 關（卡片左上）＋現在的模式（卡片右上）、下方小格前面的數字 */
.hm-lv{position:absolute;left:12px;top:-13px;z-index:3;background:linear-gradient(#6BBF59,#3E9A4A);color:#fff;font-weight:900;font-size:16px;line-height:1;border-radius:999px;padding:5px 13px;box-shadow:0 2px 0 #2E6E33,0 0 0 2px #fff;pointer-events:none}
.hm-cm{position:absolute;right:12px;top:-13px;z-index:3;background:#fff;border:2px solid #CFE8C3;color:#2E7A38;font-weight:900;font-size:14px;line-height:1;border-radius:999px;padding:4px 11px;pointer-events:none}
.hm-cm.m-stamp{border-color:#F28C28;color:#E8590C;background:#FFF4E8}
.zc-card .hm-lv{font-size:13px;padding:4px 9px;left:6px}.zc-card .hm-cm{display:none}
.hm-n{font-style:normal;display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:50%;background:#fff;color:#3E9A4A;font-size:14px;margin-right:6px;vertical-align:2px}
.zc-chip.on .hm-n{color:#F28C28}
@media(max-height:700px),(max-width:1100px){
 .hm-left{gap:4px}.hm-modes{gap:8px}
 html:root body .hm-mode{padding:3px 12px 3px 4px;border-radius:16px}.hm-mode i{width:36px;height:36px}.hm-mode i svg{width:30px;height:30px}
 .hm-mode b{font-size:16px}.hm-mode small{font-size:12px}
 .hm-lv{font-size:14px;padding:4px 11px}.hm-cm{font-size:12px}}

/* 分類頁卡片示範（蓋章模式）：印章蓋下去的那一下，記號從大變小「啪」地出現 */
.hm-dimp{opacity:0;transform-box:fill-box;transform-origin:center}
.hm-dimp.on{animation:hm-dpop .22s cubic-bezier(.3,1.6,.5,1) forwards}
@keyframes hm-dpop{0%{opacity:0;transform:scale(1.7)}35%{opacity:1}100%{opacity:1;transform:scale(1)}}
.hm-dtool{pointer-events:none;filter:drop-shadow(0 6px 5px rgba(60,20,10,.28));transition:opacity .2s}
@media (prefers-reduced-motion:reduce){.hm-dimp.on{animation:none;opacity:1}}

/* ── 遊戲頁：左欄「選一個注音朋友」右上角的模式小鈕 ── */
.hm-has-switch{position:relative}
html:root body .hm-has-switch>.section-tag,html.go1 .go1-rail .go1-pick.hm-has-switch>.section-tag{display:block;padding-right:62px!important;padding-left:2px!important;text-align:left!important;white-space:nowrap}
html:root body .hm-switch{position:absolute;right:6px;top:5px;z-index:3;display:flex;align-items:center;gap:2px;margin:0;padding:1px 8px 1px 2px;height:30px;border:2px solid #CFE8C3;border-radius:999px;background:#fff!important;color:#2E7A38!important;font:900 13px/1 Park,"Microsoft JhengHei",sans-serif;cursor:pointer;box-shadow:0 2px 0 #E3F1DA}
.hm-switch i{width:24px;height:24px;display:grid;place-items:center}.hm-switch i svg{width:22px;height:22px;overflow:visible}
html:root body .hm-switch.m-stamp{border-color:#F28C28;background:#FFF4E8!important;color:#E8590C!important}
html:root body .hm-switch:disabled{cursor:default;opacity:1}
/* ── 蓋章模式：蓋印章 ── */
html.hm-stamp #board .tile{cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='46' viewBox='0 0 40 46'><circle cx='20' cy='6' r='5' fill='%23B8742B' stroke='%23fff' stroke-width='1.5'/><rect x='17' y='10' width='6' height='12' rx='2' fill='%23D9954A' stroke='%23fff' stroke-width='1.2'/><rect x='7' y='21' width='26' height='9' rx='3' fill='%23E9273A' stroke='%23fff' stroke-width='1.5'/><rect x='9' y='30' width='22' height='4' rx='1' fill='%23A80718'/><circle cx='20' cy='42' r='3' fill='none' stroke='%23D40D20' stroke-width='1.5'/></svg>") 20 42,pointer}
/* 蓋上去的印記：紅色、邊緣有點不平（#hm-rough），每個稍微歪一點點；「啪」一下從大變小蓋上 */
.hm-imp{position:absolute;left:-14%;top:-14%;width:128%;height:128%;pointer-events:none;z-index:4;rotate:var(--r,0deg);animation:hm-imp .24s .07s cubic-bezier(.3,1.6,.5,1) both}
.hm-imp svg{display:block;width:100%;height:100%;overflow:visible}
.hm-imp path{fill:none;stroke:#D40D20;stroke-width:8;stroke-linecap:round;stroke-linejoin:round}
@keyframes hm-imp{0%{scale:1.6;opacity:0}35%{opacity:1}100%{scale:1;opacity:.94}}
/* 印章本體：從上面壓下來、彈起來就不見（很短，不會擋住下一下） */
.hm-slam{position:fixed;z-index:9000;pointer-events:none;width:calc(60px*var(--s,1));height:calc(60px*var(--s,1));translate:-50% -64%;animation:hm-slam .34s ease-out forwards}
.hm-slam svg{width:100%;height:100%;overflow:visible;filter:drop-shadow(0 4px 4px rgba(60,20,10,.25))}.hm-slam .hm-ic-imp{display:none}
@keyframes hm-slam{0%{transform:translateY(-34px) rotate(-14deg);opacity:0}25%{opacity:1}42%{transform:translateY(6px) rotate(0) scale(1.05,.88)}62%{transform:translateY(-4px) scale(1)}100%{transform:translateY(-36px) rotate(6deg);opacity:0}}
.hm-ring{position:fixed;z-index:8999;pointer-events:none;translate:-50% -50%;border-radius:50%;border:3px solid rgba(212,13,32,.5);animation:hm-ring .45s .08s ease-out both}
@keyframes hm-ring{from{scale:.45;opacity:1}to{scale:1.7;opacity:0}}
.hm-combo{position:fixed;z-index:9001;pointer-events:none;translate:-50% -100%;font:900 18px/1 Park,"Microsoft JhengHei",sans-serif;color:#fff;background:linear-gradient(#FFB35C,#FF7A2F);padding:6px 13px;border-radius:999px;box-shadow:0 0 0 3px #fff,0 4px 10px rgba(232,89,12,.35);white-space:nowrap;animation:hm-combo .9s ease-out forwards}
@keyframes hm-combo{0%{transform:scale(.6);opacity:0}20%{transform:scale(1.12);opacity:1}100%{transform:translateY(-30px);opacity:0}}
/* 蓋章模式不要再蓋「好棒」小章（fx-stamp 的），印章已經蓋在注音上了；大的「過關」章照常 */
html.hm-stamp .fxs-stamp:not(.big){display:none!important}
@media (prefers-reduced-motion:reduce){.hm-mode *,.hm-imp{animation:none!important}}

/* ══ 2026-10-28 第三種：手電筒模式（注音躲貓貓進階版；搭配 torch.js） ══ */
html:root body .hm-mode{position:relative}
.hm-adv{position:absolute;right:-8px;top:-11px;transform:rotate(8deg);background:linear-gradient(#FFB547,#F28C28);color:#fff;font:900 12px/1.4 Park,"Microsoft JhengHei",sans-serif;font-style:normal;padding:0 7px 1px;border-radius:9px;border:2px solid #fff;box-shadow:0 2px 0 #C86A12;pointer-events:none}
.hm-mode.m-torch i{background:#2A3550}
.hm-mode.m-torch.on i{background:#1D2740}
.hm-mode.on .hm-ic-beam{animation:hm-beam 1.6s ease-in-out infinite;transform-origin:20px 23px}
@keyframes hm-beam{0%,100%{opacity:.55;transform:scaleY(.85)}50%{opacity:1;transform:scaleY(1.12)}}
.hm-cm.m-torch{border-color:#3B4A73;color:#fff;background:#2A3550}
html:root body .hm-switch.m-torch{border-color:#3B4A73;background:#2A3550!important;color:#FFE27A!important}
/* 分類頁卡片示範：天黑的那一層 */
.hm-dark{fill:#141C33;opacity:.86}
@media (max-width:1100px),(max-height:700px){.hm-modes{gap:6px}html:root body .hm-mode{padding:3px 10px 3px 4px}.hm-adv{font-size:11px;top:-9px;right:-6px}}
/* 三顆模式鈕排得下（不碰到機器人）：鈕縮小一點 */
.hm-modes{gap:8px}
html:root body .hm-modes .hm-mode{padding:4px 12px 4px 5px;gap:6px}
.hm-modes .hm-mode i{width:40px;height:40px}.hm-modes .hm-mode i svg{width:33px;height:33px}
.hm-modes .hm-mode b{font-size:18px}.hm-modes .hm-mode small{font-size:13px}
@media (max-width:1100px),(max-height:700px){html:root body .hm-modes .hm-mode{padding:3px 9px 3px 4px}.hm-modes .hm-mode i{width:32px;height:32px}.hm-modes .hm-mode i svg{width:27px;height:27px}.hm-modes .hm-mode b{font-size:15px}.hm-modes .hm-mode small{font-size:11px}}
