/* 共用版面與行為。配色／質感／字型在 themes/a.css、b.css、c.css（<html class="theme-x"> 切換）。
   這裡只放「每個風格都一樣」的東西：位置、尺寸、動畫、手機版面。 */
:root{
  --indigo:#22254a;
  --indigo-deep:#14162c;
  --vermilion:#e2492a;
  --offwhite:#f5efe0;
  --gold:#d9a441;
  --green:#5ecb8c;
  --red:#ff6b5a;
  --panel-bg:rgba(18,18,36,.88);
  --text:var(--offwhite);
  --gap:12px;
  --hud-w:min(460px, 40vw);
  --dock-w:min(620px, 56vw);
  --dlg-h:150px; /* 桌面對話框高度（浮字、吉祥物站在它上緣） */
}

/* 子集字型（tools/subset_fonts.py 產生；授權見 assets/CREDITS.md、assets/fonts/*OFL*.txt） */
@font-face{font-family:"OkamiRound";src:url("assets/fonts/okami-round-subset.woff2") format("woff2");font-display:swap;}
@font-face{font-family:"OkamiSerif";src:url("assets/fonts/okami-serif-subset.woff2") format("woff2");font-weight:600;font-display:swap;}

*{box-sizing:border-box;}
html,body{height:100%;margin:0;}
body{
  font-family:"Microsoft JhengHei","PingFang TC","Noto Sans TC",sans-serif;
  background:var(--indigo-deep);
  color:var(--text);
  overflow:hidden;
}
button{
  font-family:inherit;
  background:var(--indigo);
  color:var(--offwhite);
  border:1px solid var(--gold);
  border-radius:6px;
  padding:6px 12px;
  cursor:pointer;
}
button:disabled{opacity:.35;cursor:not-allowed;}
h1,h2,h3{margin:.3em 0;}
[hidden]{display:none !important;}
svg{width:100%;height:100%;display:block;}

/* ---------- 背景場景（Canva AI 生成，7 個場景皆有圖，保持清晰不模糊） ---------- */
#bg{
  position:fixed;inset:0;z-index:0;
  box-shadow:inset 0 0 160px rgba(0,0,0,.45);
  transition:background .3s;
  background-size:cover;background-position:center;
}
#bg::after{
  content:'';position:absolute;inset:0;
  background:linear-gradient(160deg, rgba(34,20,58,.18), rgba(226,73,42,.06));
}
/* url() 圖層蓋在漸層之上；圖片載入失敗時漸層透出，作為 fallback */
.bg-shrine{background-image:url('assets/bg/shrine.jpg'), linear-gradient(160deg,#3a2f4d,#1c2440);background-size:cover, cover;background-position:center, center;}
.bg-kagura{background-image:url('assets/bg/kagura.jpg'), linear-gradient(160deg,#5a2a3a,#22163a);background-size:cover, cover;background-position:center, center;}
.bg-waterfall{background-image:url('assets/bg/waterfall.jpg'), linear-gradient(160deg,#1e3a4a,#132033);background-size:cover, cover;background-position:center, center;}
.bg-room{background-image:url('assets/bg/room.jpg'), linear-gradient(160deg,#3a3020,#211a2e);background-size:cover, cover;background-position:center, center;}
.bg-mountain_night{background-image:url('assets/bg/mountain_night.jpg'), linear-gradient(160deg,#141a30,#05060f);background-size:cover, cover;background-position:center, center;}
.bg-town{background-image:url('assets/bg/town.jpg'), linear-gradient(160deg,#4a3320,#241528);background-size:cover, cover;background-position:center, center;}
/* 季節版（第五階段 E，第二輪體檢提案 9）：從同一張圖調色——樹葉轉紅／結霜、地面積雪、櫻花換成綠葉或紅葉（tools/season_bg.py）。
   沒有季節版的場景（神社夏、神樂殿春夏秋…）照原圖；圖載不到時退回下面的漸層 */
.bg-shrine.autumn{background-image:url('assets/bg/shrine_autumn.jpg'), linear-gradient(160deg,#3a2f4d,#1c2440);}
.bg-shrine.winter{background-image:url('assets/bg/shrine_winter.jpg'), linear-gradient(160deg,#3a2f4d,#1c2440);}
.bg-kagura.winter{background-image:url('assets/bg/kagura_winter.jpg'), linear-gradient(160deg,#5a2a3a,#22163a);}
.bg-town.summer{background-image:url('assets/bg/town_summer.jpg'), linear-gradient(160deg,#4a3320,#241528);}
.bg-town.autumn{background-image:url('assets/bg/town_autumn.jpg'), linear-gradient(160deg,#4a3320,#241528);}
.bg-town.winter{background-image:url('assets/bg/town_winter.jpg'), linear-gradient(160deg,#4a3320,#241528);}
.bg-festival_night{background-image:url('assets/bg/festival_night.jpg'), linear-gradient(160deg,#5a1c30,#160f2c);background-size:cover, cover;background-position:center, center;}

/* ---------- 標題 / 結局畫面 ---------- */
.screen{
  position:fixed;inset:0;z-index:10;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;
  background:radial-gradient(circle at 50% 30%, rgba(90,42,58,.55), rgba(20,22,44,.95));
  text-align:center;padding:16px;
}
.title{font-size:2.2em;letter-spacing:.05em;text-shadow:0 2px 8px rgba(0,0,0,.6);}
.subtitle{opacity:.85;}
/* 原本的像素三烏鴉（assets/crow/crow.gif，2 格動畫）：標題畫面站一排，放大時保持像素銳利 */
.title-crows{height:min(24vh,190px);image-rendering:pixelated;filter:drop-shadow(0 4px 10px rgba(0,0,0,.55));}
.title-buttons{display:flex;gap:12px;}
.title-buttons button,#btn-ending-ok,#btn-card,#btn-book{font-size:1.1em;padding:10px 22px;min-height:48px;}
.ending-buttons{display:flex;gap:12px;justify-content:center;}
.title-mg-row{margin-top:10px;}
.title-toggles{display:flex;gap:6px 10px;justify-content:center;flex-wrap:wrap;}
.title-mg-row{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:0 10px;cursor:pointer;} /* 試玩修正 2 L2：點擊範圍 ≥48px */
.title-mg-row input,.set-row input{width:22px;height:22px;margin:0;flex:none;cursor:pointer;accent-color:var(--shu,#b7382f);}
.title-credit{margin-top:14px;font-size:.72em;opacity:.8;}
#ending-text{line-height:1.7;}
#ending-title{position:relative;z-index:1;} /* Stella 的星冠（pt 留白區）可能伸到標題上，標題壓在上面 */
#ending-title .ending-sub{display:block;font-size:.5em;font-weight:normal;margin-top:4px;letter-spacing:.05em;} /* 大巫女＋好感 100：關係成果 */
.gallery-note{display:block;font-size:.8em;opacity:.8;margin-top:2px;}
#ending-text span{display:block;}
/* 結局（第六階段 A review 修正）：立繪是半身裁切，底部不淡出、不透明——切掉的那一邊藏起來：
   桌面貼齊畫面下緣（左邊），資料、按鈕在右欄；手機立繪在上面，下緣藏在資料框（不透明、滿版）後面。
   --eh：結局立繪基準高度；--k：有 pt（頭頂留白）的立繪放大倍率，負 margin-top 把多出來的留白推到上面，臉跟其他人一樣大、一樣高 */
.ending-body{display:flex;flex-direction:column;align-items:center;gap:16px;}
.ending-figs{pointer-events:none;}
#ending-portrait,#ending-partner{--eh:min(80vh, 58vw);position:absolute;bottom:0;left:50%;width:auto;height:calc(var(--eh) * var(--k, 1));transform:translateX(-50%);}
#ending-portrait:not([src]){display:none;}
#ending-text{position:relative;z-index:2;margin:0;padding:10px 18px;border-radius:10px;background:rgba(24,18,26,.6);}
#ending-text span.wide{grid-column:1 / -1;}
/* 夥伴結局：兩張立繪同一個高度（臉一樣大，照立繪指南）；臉在圖片水平正中，用臉中心定位（中線左右各 0.27×立繪高），歐咖咪在前 */
.ending-figs:has(#ending-partner:not([hidden])) #ending-portrait{transform:translateX(calc(-50% - var(--eh) * .27));z-index:1;}
.ending-figs:has(#ending-partner:not([hidden])) #ending-partner{transform:translateX(calc(-50% + var(--eh) * .27));}
@media (min-width:701px){
  #ending-screen{align-items:flex-end;padding-right:max(24px, 5vw);}
  #ending-screen > *{width:min(440px, 38vw);}
  .ending-figs{position:fixed;left:0;bottom:0;height:100vh;width:calc(100vw - min(440px, 38vw) - max(24px, 5vw));} /* 不裁左右：長髮延伸到右欄底下（資料框在上面），不會有一道直的切口 */
  #ending-text{background:rgba(24,18,26,.8);}
}
/* 結局圖鑑 */
#gallery-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;width:min(900px,100%);max-height:60vh;overflow:auto;}
#gallery-list li{background:rgba(248,244,232,.92);color:#2C2725;border:3px solid #8A5A36;border-radius:8px;padding:10px 12px;text-align:left;display:flex;flex-direction:column;gap:4px;}
#gallery-list li.locked{opacity:.55;}
#gallery-list span{font-size:.85em;}
/* 圖鑑分頁、劇情回想列表（第三階段 F） */
.gallery-tabs{display:flex;gap:10px;}
.gallery-tabs button{min-height:48px;min-width:104px;font-size:1.1em;}
#recall-list{width:min(900px,100%);max-height:60vh;overflow:auto;text-align:left;display:flex;flex-direction:column;gap:14px;padding:2px 4px;}
.recall-group h3{margin:0 0 6px;font-size:1em;display:flex;gap:10px;align-items:baseline;}
.recall-group h3 small{font-weight:normal;opacity:.85;}
.recall-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px;}
.recall-items button{min-height:48px;padding:6px 12px;text-align:left;}
.recall-items button.locked{opacity:.5;}
#btn-gallery-back{min-height:48px;padding:0 24px;}
/* 奉納舞練習場（第四階段 C）：一首一列，評價、紀錄、練習鈕 */
#dance-list{width:min(640px,100%);display:flex;flex-direction:column;gap:10px;}
.dance-row{background:rgba(248,244,232,.92);color:#2C2725;border:3px solid #8A5A36;border-radius:8px;padding:10px 12px;display:grid;grid-template-columns:1fr auto;grid-template-areas:"h b" "d b";align-items:center;column-gap:12px;text-align:left;}
.dance-row h3{grid-area:h;margin:0;font-size:1.05em;display:flex;gap:10px;align-items:baseline;}
.dance-row h3 small{font-weight:normal;opacity:.75;font-size:.8em;}
.dance-best{grid-area:d;display:flex;gap:10px;align-items:baseline;font-size:.9em;}
.dance-rank{font-size:1.6em;line-height:1;min-width:1em;}
.dance-rank.rank-S{color:#b7382f;} .dance-rank.rank-A{color:#a8741a;}
.dance-row button{grid-area:b;min-height:48px;min-width:88px;padding:0 16px;}
.dance-row.locked{opacity:.6;}
/* 跳過鈕：壓在對話框右上框，跟左邊的名牌對稱；底緣不碰到內文（對話框上方留白 26～30px） */
#btn-skip{position:absolute;top:-30px;right:22px;min-height:48px;min-width:72px;padding:0 16px;font-weight:bold;letter-spacing:.15em;}
/* 二周目視窗 */
#ng-panel{display:flex;flex-direction:column;gap:12px;width:min(420px,100%);}
#ng-panel h2{margin:0 0 4px;text-align:center;letter-spacing:.2em;}
.ng-opt{min-height:64px;padding:10px 16px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;}
.ng-opt b{font-size:1.1em;}
.ng-opt small{font-size:.85em;line-height:1.4;}
#ng-close{width:48px;height:48px;top:4px;right:4px;}
/* 種子碼欄位（第四階段 C）：iOS 字小於 16px 會自動放大畫面，所以固定 16px 以上 */
.seed-row{display:flex;flex-direction:column;gap:6px;text-align:left;margin-top:4px;}
.seed-row span{display:flex;flex-direction:column;gap:2px;font-weight:bold;}
.seed-row small{font-weight:normal;font-size:.82em;opacity:.85;}
#seed-input{min-height:48px;font-size:18px;padding:0 12px;letter-spacing:.2em;text-transform:uppercase;border:2px solid #8A5A36;border-radius:8px;background:#fffdf8;color:#2C2725;width:100%;box-sizing:border-box;}
#seed-input::placeholder{letter-spacing:normal;text-transform:none;}
.seed-err{margin:0;color:#b7382f;font-size:.9em;text-align:left;}
/* 結果卡視窗：canvas 等比縮進畫面，下面一顆存圖 */
#card-panel{width:auto;max-width:min(560px,100%);display:flex;flex-direction:column;align-items:center;gap:10px;padding:56px 14px 14px;}
#card-canvas{display:block;width:auto;height:auto;max-width:100%;max-height:calc(86vh - 140px);border-radius:6px;box-shadow:0 2px 10px rgba(0,0,0,.4);}
#card-close{width:48px;height:48px;top:4px;right:4px;}
#card-save{min-height:48px;padding:0 28px;font-size:1.05em;}
#card-note{margin:0;font-weight:bold;}
@media (max-width:700px){
  .ending-body{gap:0;width:100%;}
  /* 手機：立繪在上面，下緣多出 --tuck 那一段壓在資料框後面（不透明、左右滿版，切口完全看不到）。單人 44vh、夥伴 40vh；
     頭髮超出螢幕邊緣沒關係（不出橫向捲軸）；夥伴的長髮往左散開壓在歐咖咪後面，不會蓋到她的臉 */
  .ending-figs{position:relative;width:100%;--tuck:6vh;height:calc(44vh - var(--tuck));}
  .ending-figs:has(#ending-partner:not([hidden])){height:calc(min(40vh, 92vw) - var(--tuck));}
  #ending-portrait,#ending-partner{--eh:44vh;top:0;bottom:auto;margin-top:calc(var(--eh) * (1 - var(--k, 1)));}
  .ending-figs:has(#ending-partner:not([hidden])) #ending-portrait,.ending-figs:has(#ending-partner:not([hidden])) #ending-partner{--eh:min(40vh, 92vw);}
  #ending-screen{overflow-x:hidden;padding-top:72px;} /* padding-top：勳章通知的位置（下面），不蓋到標題和資料 */
  #ending-text{display:grid;grid-template-columns:1fr 1fr;column-gap:14px;row-gap:2px;font-size:.92em;width:100vw;box-sizing:border-box;margin:0 -16px;padding:8px 16px;border-radius:0;
    background:#241c22;border-top:3px solid #8a5a36;border-bottom:3px solid #8a5a36;}
}

/* ---------- 遊戲主畫面（桌面：舞台全螢幕，面板浮在上面，背景大部分露出來） ---------- */
#game{position:fixed;inset:0;z-index:1;}
#core-status{display:none;gap:14px;align-items:center;font-size:.85em;padding:4px 10px;}
#stage{position:absolute;inset:0;overflow:hidden;}

/* 立繪都是同一個裁切公式（tools/crop_portraits.py：臉佔 48%、頭頂 10%），所以所有角色用同一個高度 --ph 顯示，臉就一樣大、一樣高。
   2026-09-24 版面（決策紀錄 #23）：立繪約 82vh、貼齊螢幕底部（下巴在底上 0.42ph，對話框只蓋到胸口）。
   82 不是 85：Stella 星冠往上多補最多 0.21ph，82vh×1.21 ≈ 99vh 剛好不出頂。
   臉中心對齊 --face-x：排行程時 Okami 站在「扣掉右邊面板」的空間正中；演出時兩人靠中間（Okami 偏左、對方偏右，可重疊）。
   --hw = 圖寬/高/2（src/ui.js 依 data/portraits.js 的 w 給），left = 臉中心 − 半寬，再夾在畫面內（圖比畫面寬就靠左）。 */
#game{--ph:82vh;
  --face-left-x:calc((100vw - var(--dock-w) - var(--gap)) / 2);
  --face-right-x:calc(50vw + .32 * var(--ph));
  /* 圖比左側空間寬時，上面的 max(8px…) 會把整張圖往右推；排行程時最多只推到「臉的右緣（臉中心 +0.2ph）碰到右邊面板」為止，
     再推就讓圖從左邊超出畫面——臉不能被面板蓋住（窄桌面 800～1024 寬時會發生）。演出時沒有右邊面板，不限制。 */
  --face-slack:max(0px, calc((100vw - var(--dock-w) - var(--gap)) / 2 - .2 * var(--ph)));}
.portrait{--hw:.4;position:absolute;bottom:0;height:var(--ph);width:auto;display:none;z-index:2;
  left:min(max(8px, min(calc(var(--face-x) - var(--hw) * var(--ph)), calc(100vw - 2 * var(--hw) * var(--ph) - 8px))),
           calc(var(--face-x) - var(--hw) * var(--ph) + var(--face-slack)));
  filter:drop-shadow(0 8px 16px rgba(0,0,0,.5));transition:left .25s ease, bottom .25s ease, height .25s ease, opacity .2s, filter .2s;}
.portrait-left{--face-x:var(--face-left-x);}
.portrait-right{--face-x:var(--face-right-x);}
/* 兩人同框：說話的人在前、亮；另一個在後、變暗（0.2 秒淡換，不移動不縮放）。手機版直接藏起來（見下方） */
#stage[data-speaker="left"] .portrait-right,#stage[data-speaker="right"] .portrait-left{z-index:1;filter:brightness(.55) drop-shadow(0 8px 16px rgba(0,0,0,.5));}
/* 浮字從對話框右上角往上飄 */
#floaters{position:absolute;bottom:calc(var(--dlg-h) + 8px);right:calc(var(--gap) + 24px);display:flex;flex-direction:column;gap:4px;pointer-events:none;z-index:8;align-items:flex-end;}
.floater{padding:2px 10px;border-radius:12px;background:rgba(0,0,0,.6);font-weight:bold;font-size:.95em;animation:floatUp 1s ease-out forwards;}
.floater-up{color:var(--green);}
.floater-down{color:var(--red);}
.floater-bonus{color:#D4AF37;border:1px solid #D4AF37;} /* 照建議加成：金色，跟一般浮字分開，不然玩家看不出被獎勵（裁決 34） */
/* 大成功（第四階段 A）：對話框正上方、不蓋臉；金字蹦一下再淡掉 */
.great-banner{position:absolute;left:50%;bottom:calc(var(--dlg-h) + 48px);z-index:9;pointer-events:none;white-space:nowrap;
  font-size:clamp(1.6em,6vw,2.6em);font-weight:bold;letter-spacing:.12em;color:#FFE27A;padding:.05em .7em .1em;border:2px solid #FFD95A;border-radius:.35em;
  background:rgba(50,25,0,.72);text-shadow:0 0 10px rgba(255,200,60,.85);box-shadow:0 0 18px rgba(255,200,60,.55);animation:greatPop 1.6s ease-out forwards;}
@keyframes greatPop{0%{opacity:0;transform:translateX(-50%) scale(.4);}15%{opacity:1;transform:translateX(-50%) scale(1.15);}
  25%{transform:translateX(-50%) scale(1);}80%{opacity:1;}100%{opacity:0;transform:translateX(-50%) translateY(-20px);}}
.great-banner.top{bottom:auto;top:calc(var(--top-h,0px) + 18px);} /* 稀有風景：吉祥物站在對話框上方，金字改放畫面頂端，不蓋吉祥物也不蓋臉 */
@media (prefers-reduced-motion:reduce){ .great-banner{animation:none;transform:translateX(-50%);} }
.great-hint{display:inline-block;margin-left:6px;font-size:.62em;font-weight:bold;letter-spacing:0;color:#B8860B;white-space:nowrap;vertical-align:middle;}
@media (max-width:700px){ .great-hint{margin-left:2px;} .great-hint span{display:none;} } /* 手機：卡片窄，只留「✦×2」 */
/* 御神籤（第四階段 A，提案 5）：籤條從上面掉下來、搖一下，再翻出結果；位置跟大成功一樣在對話框正上方，不蓋臉 */
.omikuji-slip{position:absolute;left:50%;bottom:calc(var(--dlg-h) + 40px);z-index:9;pointer-events:none;display:flex;flex-direction:column;align-items:center;
  padding:.3em 1.1em .45em;background:#fffaf0;color:#b3261e;border:2px solid #b3261e;border-radius:4px;box-shadow:0 6px 16px rgba(0,0,0,.45);
  animation:kujiDrop .7s ease-out both;transform:translateX(-50%);}
.omikuji-slip small{font-size:.8em;letter-spacing:.3em;color:#5a3a22;}
.omikuji-slip b{font-size:clamp(1.8em,7vw,2.8em);letter-spacing:.15em;line-height:1.1;animation:kujiOpen .35s .7s ease-out both;}
.omikuji-slip.kuji-daikichi{background:#fff3c4;box-shadow:0 0 22px rgba(255,200,60,.9);}
.omikuji-slip.kuji-kyo{color:#3b3b4f;border-color:#3b3b4f;}
@keyframes kujiDrop{0%{opacity:0;transform:translate(-50%,-60px) rotate(0);}50%{opacity:1;transform:translate(-50%,0) rotate(-4deg);}70%{transform:translate(-50%,0) rotate(4deg);}100%{transform:translate(-50%,0) rotate(0);}}
@keyframes kujiOpen{from{opacity:0;transform:scale(.3);}to{opacity:1;transform:scale(1);}}
@media (prefers-reduced-motion:reduce){ .omikuji-slip,.omikuji-slip b{animation:none;} }
/* 月份圓章右上角的小籤條（這個月抽到的籤） */
#month-badge{position:relative;}
.mb-kuji{position:absolute;top:-6px;right:-12px;writing-mode:vertical-rl;padding:3px 1px;font-size:.62em;font-weight:bold;line-height:1;letter-spacing:.05em;
  color:#b3261e;background:#fffaf0;border:1px solid #b3261e;border-radius:2px;box-shadow:0 1px 3px rgba(0,0,0,.3);}
.mb-kuji.kuji-daikichi{background:#fff3c4;}
.mb-kuji.kuji-kyo{color:#3b3b4f;border-color:#3b3b4f;}
@keyframes floatUp{from{opacity:1;transform:translateY(0);}to{opacity:0;transform:translateY(-36px);}}

/* 菸猴：手機視訊通話畫面（深色機身、上方通話列、照片、紅色掛斷鈕），放右上角；黑羽說話時 shake、菸猴開口時 pulse */
.enko-frame{position:absolute;z-index:6;top:9vh;right:calc(var(--gap) + 12px);width:128px;padding:7px 7px 9px;
  display:flex;flex-direction:column;gap:5px;background:#1f1b18;color:#f3ead6;border:2px solid #8a5a36;border-radius:20px;
  box-shadow:0 0 0 3px #f3ead6, 0 6px 14px rgba(0,0,0,.6);font-size:10px;line-height:1.2;}
.enko-frame[hidden]{display:none;}
.enko-bar{display:flex;justify-content:space-between;align-items:center;padding:1px 4px 0;white-space:nowrap;}
.enko-rec{color:#ff7a66;}
.enko-name{font-weight:bold;letter-spacing:.1em;}
.enko-frame img{width:100%;aspect-ratio:1;object-fit:cover;display:block;border-radius:12px;}
.enko-hang{align-self:center;width:22px;height:22px;border-radius:50%;background:#d9443a;box-shadow:inset 0 -2px 0 rgba(0,0,0,.3);}
/* 吉祥物（在 #game 裡，不在 #stage）：站在對話框上緣、畫面中間、人物前面；寬度限在兩張臉之間，不擋臉 */
.mascot{position:absolute;left:50%;bottom:var(--dlg-h);transform:translateX(-50%);height:calc(var(--ph) * .72);max-width:calc(var(--ph) * .3);object-fit:contain;object-position:50% 100%;z-index:3;pointer-events:none;}
.shake{animation:shake .3s;}
@keyframes shake{0%,100%{transform:translateX(0);}25%{transform:translateX(-4px);}75%{transform:translateX(4px);}}
/* 菸猴開口：輕微發光+跳一下，跟黑羽的 shake 區隔（規格 2026-09-25 playtest 一.3） */
.pulse{animation:enkoPulse .4s ease-out;}
@keyframes enkoPulse{0%{box-shadow:0 0 0 3px #f3ead6, 0 6px 14px rgba(0,0,0,.6);}40%{transform:scale(1.06);box-shadow:0 0 0 3px #f3ead6, 0 0 14px 6px #ffd76a;}100%{transform:scale(1);box-shadow:0 0 0 3px #f3ead6, 0 6px 14px rgba(0,0,0,.6);}}

/* ---------- 對話框（左下，名牌浮在左上角） ---------- */
#dialog{position:absolute;z-index:7;cursor:pointer;padding:26px 22px 14px;}
#dialog-name{position:absolute;left:18px;top:-18px;min-width:6em;padding:3px 16px;font-weight:bold;text-align:center;}
#dialog-name:empty{display:none;}
#dialog-face{position:absolute;left:24px;top:-92px;width:78px;height:78px;padding:4px;border-radius:50%;background:#f8f4e8;border:3px solid #8a5a36;box-shadow:0 3px 8px rgba(0,0,0,.45);} /* 烏鴉頭像：和紙圓牌站在名牌上，黑烏鴉疊在深色頭髮上才看得清楚 */
#dialog-text{line-height:1.6;min-height:3.2em;font-size:1.08em;}
#choices{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px;}
#choices button{padding:6px 16px;min-height:48px;}
@media (max-width:700px){ #choices{gap:12px;} #choices button{min-width:96px;} } /* 手機：選項至少 48px 高、96px 寬，兩個字的「押！」也好點（第四階段 B）*/

/* ---------- 狀態面板（能力 / 狀態 / 好感） ---------- */
#stats h3{font-size:.85em;margin:0 0 4px;}
.stat-row{display:flex;align-items:center;gap:6px;font-size:.86em;margin:3px 0;}
.stat-icon{width:1.2em;height:1.2em;flex:none;display:none;}
.stat-label{width:4.2em;flex:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hud-aff .stat-label{width:5.2em;}
.bar{flex:1;height:10px;border-radius:5px;overflow:hidden;position:relative;}
.bar-fill{height:100%;transition:width .4s;}
.stat-val{min-width:2.4em;text-align:right;flex:none;font-variant-numeric:tabular-nums;}
.stat-max{display:none;opacity:.6;}
.stat-money .stat-val{flex:1;}

/* ---------- 行程面板 ---------- */
#month-badge{grid-area:month;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1;}
.mb-num{font-size:1.6em;font-weight:bold;}
.mb-old{font-size:.75em;}
#slots{grid-area:slots;display:flex;gap:8px;min-width:0;}
.slot{flex:1;min-width:0;position:relative;cursor:pointer;display:flex;flex-direction:column;align-items:center;padding:6px 4px;transition:transform .15s;}
.slot-label{font-weight:bold;}
.slot-body{display:flex;flex-direction:row;align-items:center;gap:4px;width:100%;margin:2px 0;}
.slot-body .slot-advice{flex:1;order:2;}
.slot-advice{font-size:.74em;line-height:1.35;padding:4px 7px;border-radius:10px;position:relative;text-align:center;max-width:100%;}
.slot-crow{width:52px;height:52px;object-fit:contain;flex:none;} /* assets/crow/<烏鴉>.webp：Canva AI 頭像（tools/prep_crows.py 去背） */
.crow-name{font-size:.8em;font-weight:bold;}
.slot-pick{font-size:.8em;margin-top:2px;padding:1px 8px;border-radius:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.bounce{animation:bounce 2s ease-in-out infinite;}
@keyframes bounce{0%,100%{transform:translateY(0);}50%{transform:translateY(-2px);}}

#sched-buttons{grid-area:btns;display:flex;gap:6px;justify-content:space-between;}
.sched-btn{flex:1;min-width:0;padding:4px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;line-height:1.15;transition:transform .12s, box-shadow .12s;}
.sched-icon{width:22px;height:22px;display:none;}
.sched-name{font-size:.86em;}
#partner-row{grid-area:partner;display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
.partner-hint{font-size:.8em;}
#partner-row button{padding:3px 12px;font-size:.85em;}
.bottom-row{grid-area:footer;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;min-width:0;}
.btn-shop{flex:none;min-height:48px;padding:4px 14px;position:relative;} /* 第六階段 B：桌面也 ≥48px（pt6 Q6） */
.btn-settings{flex:none;min-height:48px;min-width:48px;padding:2px 10px;font-size:1.15em;line-height:1;margin-right:auto;}
/* 設定小視窗（試玩修正 2 L2）：開關一列一個，每列 ≥48px */
.settings-pop{position:fixed;z-index:25;display:flex;flex-direction:column;min-width:160px;padding:4px 6px;border-radius:10px;
  background:var(--washi,#fdfbf7);color:var(--sumi,#2b2118);border:2px solid var(--wood,#5c3a21);box-shadow:0 6px 18px rgba(0,0,0,.4);}
.set-row{display:flex;align-items:center;gap:10px;min-height:48px;padding:0 10px;cursor:pointer;white-space:nowrap;}
.set-row + .set-row{border-top:1px dashed rgba(92,58,33,.25);}
.shop-badge{position:absolute;top:1px;right:3px;width:8px;height:8px;border-radius:50%;background:var(--shu,#b7382f);border:1px solid #fff;} /* 有可買的東西：常駐小印章，不閃爍（規格 2026-09-25 playtest 四.3） */
#confirm{font-weight:bold;letter-spacing:.2em;transition:transform .1s;}
#confirm:active:not(:disabled){transform:scale(.94);}

/* ==================== 桌面 ==================== */
@media (min-width:701px){
  #bottom{position:absolute;inset:0;pointer-events:none;}
  #tabs{display:none;}
  #panel-stats,#panel-slots{display:block;position:absolute;pointer-events:auto;z-index:6;}
  #panel-stats[hidden]{display:block !important;}
  #panel-slots[hidden]{display:grid !important;}
  #panel-stats{top:var(--gap);right:var(--gap);width:var(--hud-w);padding:12px 14px;font-size:1.05em;transition:transform .25s ease;}
  .stat-row{font-size:.95em;}
  #stats{display:grid;grid-template-columns:1.25fr 1fr;gap:4px 16px;}
  #panel-slots{
    bottom:var(--gap);right:var(--gap);width:var(--dock-w);max-height:calc(100vh - 250px);overflow:auto;
    display:grid;grid-template-columns:86px 1fr;grid-template-areas:"month slots" "btns btns" "partner partner" "footer footer";
    gap:10px;padding:14px;transition:transform .25s ease;
  }
  /* 對話框橫跨底部，蓋在立繪胸口 */
  #dialog{left:var(--gap);right:var(--gap);bottom:var(--gap);min-height:calc(var(--dlg-h) - var(--gap));}
  #dialog-text,#choices{max-width:900px;margin-left:auto;margin-right:auto;}
  /* 演出中（busy）：行程面板／狀態面板反正都鎖住不能點，直接滑出畫面右側 */
  body.busy #panel-stats,body.busy #panel-slots{transform:translateX(140%);}
  body.busy #game{--face-left-x:calc(50vw - .32 * var(--ph));--face-slack:100vw;}
  /* 解鎖進階行程後超過 7 個：桌面改兩排；flex-wrap 換行點會被圓鈕自己的 max-width:66px 頂住而算錯（塞成 8+4），改用 grid 固定 6 欄，圓鈕維持原本大小置中即可 */
  #sched-buttons.many{display:grid;grid-template-columns:repeat(6,1fr);justify-items:center;row-gap:4px;column-gap:6px;}
  #sched-buttons.many .sched-btn{width:66px;}
}

/* 窄或矮的桌面視窗：朱印圓鈕放不下兩排文字（32px 圓圈裝不下「和夥伴出去」），
   改用手機那種橫向藥丸鈕（形狀交給 themes/a.css 覆寫），這裡只管排版：6 欄 grid、鈕本身寬度撐滿欄位
   斷點用 1100px（比下面 #panel-slots 加寬用的 1000px 更寬）：圓鈕在 1000～1100px 之間已經擠得裝不下五字標籤，
   要比「面板加寬」早一步換形狀，所以藥丸鈕的斷點比面板寬度的斷點更早觸發 */
@media (min-width:701px) and (max-width:1100px){
  #sched-buttons.many{grid-template-columns:repeat(6,1fr);justify-items:stretch;row-gap:4px;column-gap:4px;}
  #sched-buttons.many .sched-btn{width:auto;min-height:34px;padding:3px 2px;} /* min-height:34px＝藥丸鈕最小可點高度，字不擠壓也留得出上下 padding */
}

/* ==================== 手機直式 ==================== */
@media (max-width:700px){
  :root{--gap:6px;}
  #core-status{display:flex;position:absolute;top:0;left:0;right:0;height:var(--top-h);z-index:6;justify-content:center;align-items:center;gap:12px;font-size:.92em;padding:0 14px;} /* 高度留給木框＋上下空白，字不貼框 */
  /* 手機：立繪幾乎佔滿整個畫面高、貼底、正中央，只放說話的人；行程區、對話框是半透明和紙，疊在人物前面 */
  /* 排行程時：行程區精簡成固定高 --panel-h，立繪（只有 Okami，沒有 Stella 星冠問題）從狀態列下緣開始、放進上方空間，
     底部 8% 藏在行程區後面，所以看得到頭到腰，不會懸空。演出時行程區收起，改回 82vh 貼底。 */
  #game{--top-h:40px;--panel-h:284px;--ph:calc((100vh - var(--panel-h) - var(--top-h)) / .92);--face-left-x:50vw;--face-right-x:50vw;--dlg-h:124px;}
  body.busy #game{--ph:82vh;}
  .portrait{left:calc(var(--face-x) - var(--hw) * var(--ph));bottom:calc(var(--panel-h) - .08 * var(--ph));} /* 比畫面寬也不夾邊，臉保持置中 */
  body.busy .portrait{bottom:0;}
  #stage[data-speaker="left"] .portrait-right,#stage[data-speaker="right"] .portrait-left{opacity:0;}
  /* 浮字（L1）：演出時臉在畫面中間、對話框在下面，浮字改放右上（狀態列下方），往下排；不蓋臉、不蓋對話框 */
  #floaters{right:8px;top:calc(var(--top-h) + 8px);bottom:auto;max-width:42vw;font-size:.88em;}
  body.busy #floaters{top:12px;}
  .floater{white-space:nowrap;}
  .enko-frame{right:3vw;top:calc(var(--top-h) + 1vh);width:84px;padding:5px 5px 7px;gap:4px;border-radius:16px;font-size:8px;}
  .enko-frame img{border-radius:9px;}
  .enko-hang{width:16px;height:16px;}
  .mascot{height:22vh;max-width:50vw;}
  body.busy #bottom,body.busy #core-status{display:none;} /* 演出時狀態列也收起：數值變化看浮字，Stella 星冠不會被頂框切掉 */
  #dialog{bottom:6px;left:6px;right:6px;padding:30px 18px 14px;} /* 名牌壓在上框，文字要離框和名牌都有空隙 */
  #dialog-name{top:-14px;font-size:.9em;}
  #dialog-face{left:14px;top:-66px;width:56px;height:56px;padding:3px;}
  #dialog-text{font-size:1.02em;min-height:2.4em;}
  #bottom{position:absolute;z-index:6;left:0;right:0;bottom:0;height:var(--panel-h);overflow:hidden;display:flex;flex-direction:column;}
  #tabs{display:flex;flex:none;padding:3px;gap:3px;}
  .tab-btn{flex:1;border-radius:0;padding:5px;min-height:48px;} /* 試玩修正 2 L2 */
  .panel{flex:1 1 auto;min-height:0;overflow-y:auto;}
  #panel-stats{padding:8px 12px;}
  #panel-slots{
    display:grid;grid-template-columns:52px 1fr;grid-template-areas:"month slots" "btns btns" "partner partner" "footer footer";
    gap:6px;padding:8px 12px;align-content:start;
  }
  .mb-num{font-size:1.2em;}
  #slots{gap:4px;}
  .slot{padding:3px 2px;}
  .slot-crow{position:absolute;left:0;top:-2px;width:30px;height:30px;} /* 手機：縮小放卡片左上角，不佔建議文字的寬度 */
  .slot-label{padding-left:24px;}
  .slot-body{flex-direction:row;}
  .crow-name{display:none;} /* 手機精簡：烏鴉圖已經看得出是誰 */
  .slot-advice{font-size:.82em;line-height:1.3;padding:2px 4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .crow-name{font-size:.68em;}
  .slot-pick{font-size:.82em;}
  #sched-buttons{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;}
  #sched-buttons.many{grid-template-columns:repeat(6,1fr);} /* 解鎖進階行程後超過 7 個：兩排 */
  /* 清單模式多一列行程按鈕（34px＋間距 6px），行程區跟著變高；原本 284 只算到地圖模式，清單模式的確定鍵會被切掉、面板要捲（第三階段 E 修正） */
  #game:not(.map-view){--panel-h:296px;}
  #game.many-sched:not(.map-view){--panel-h:334px;} /* 兩排按鈕：再多 38 */
  #game.tab-stats{--panel-h:322px;} /* 能力分頁：三位夥伴＋好感提示（試玩修正 2：分頁鈕拉到 48px 後少了 23px，這裡補回來） */
  /* 底列：〔商店〕〔⚙〕〔確定〕一行（開關搬進 ⚙，試玩修正 2 L2） */
  .bottom-row{flex-wrap:nowrap;}
  .btn-settings{min-height:48px;min-width:48px;margin-right:0;}
  .sched-btn{padding:3px 1px;}
  .sched-name{font-size:.9em;line-height:1.1;}
  #confirm{padding:6px;flex:1;}
  .btn-shop{min-height:48px;min-width:60px;font-size:.9em;padding:3px 10px;} /* 手機點擊目標 ≥48px（第四階段 C-3）；確定鍵同一列，一起 48 */
  #confirm{min-height:48px;}
  .stat-row{font-size:.95em;}
  #stats{display:grid;grid-template-columns:1.25fr 1fr;gap:0 10px;} /* 兩欄，塞進精簡後的面板高度 */
  /* 好感提示加進來以後：列距縮小、提示右邊留空，三位夥伴放得下、字不貼框 */
  #panel-stats{padding:6px 14px 12px;}
  #stats .stat-row{margin:1px 0;}
  #stats h3{margin-bottom:2px;}
  .aff-next{padding-right:6px;margin-bottom:1px;}
  .hud-aff h3{display:none;} /* 愛心圖示已經看得出是好感，省一行讓三位夥伴都放得下 */
  .hud-aff{margin-top:4px;padding-top:3px;border-top:1px solid rgba(92,58,33,.3);}
}

/* 窄的桌面（例如 800×600）：面板加寬；旬卡片改成烏鴉在上、建議在下，建議才不會擠成一條直的把卡片撐高 */
@media (min-width:701px) and (max-width:1000px){
  :root{--hud-w:min(460px, 52vw);--dock-w:min(620px, 64vw);}
  .slot-body{flex-direction:column;}
  .slot-crow{width:36px;height:36px;}
  .slot-advice{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
  .crow-name{display:none;}
}
/* 矮的桌面視窗（例如 1024×600）：行程面板縮一點，盡量不用捲動 */
@media (min-width:701px) and (max-height:680px){
  #panel-slots{gap:4px;padding:8px 12px;font-size:.92em;}
  #panel-stats{padding:8px 12px;font-size:.92em;}
  .stat-row{margin:1px 0;}
  .slot{padding:3px 4px;}
  .slot-crow{height:44px;width:44px;}
  #game.many-sched #panel-slots{gap:1px;padding:4px 10px;} /* 矮視窗兩排行程：整體面板再擠緊一點，確定鍵才不用捲動就看得到 */
  #sched-buttons.many{row-gap:2px;justify-items:stretch;}
  #sched-buttons.many .sched-btn{width:auto;min-height:34px;padding:2px 1px;} /* min-height:34px：矮視窗也要維持跟上面同樣的最小可點高度 */
}

/* ---------- 商店視窗（規格 2026-09-25 money-shop §4）：位置/尺寸/行為，質感在 themes/a.css ---------- */
.modal-overlay{position:fixed;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;background:rgba(10,8,20,.6);padding:16px;}
.modal-panel{position:relative;width:min(520px,100%);max-height:86vh;overflow-y:auto;padding:20px 18px;border-radius:8px;}
.modal-close{position:absolute;top:8px;right:8px;width:36px;height:36px;min-height:0;padding:0;border-radius:50%;font-size:1em;line-height:1;}
.shop-section{margin-top:16px;}
.shop-section h3{font-size:1em;letter-spacing:.15em;}
.shop-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;}
.shop-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border-radius:8px;flex-wrap:wrap;}
.shop-item-info{flex:1;min-width:0;}
.shop-item-name{font-weight:bold;}
.shop-item-desc{font-size:.82em;opacity:.85;margin-top:2px;}
.shop-item button{flex:none;min-height:40px;min-width:64px;padding:4px 12px;}
.shop-check{font-size:1.3em;flex:none;}
@media (max-width:700px){
  .modal-panel{max-height:82vh;padding:16px 14px;}
  .shop-item-desc{font-size:.85em;}
  .shop-item button{min-height:48px;min-width:72px;} /* 修繕、送禮的購買鈕：手機 ≥48px（第四階段 C-3） */
  #shop-close{width:48px;height:48px;top:4px;right:4px;}
}

/* ---- 小遊戲（src/minigames.js，規格 2026-09-25 phase2e §4）：蓋在所有東西上面 ---- */
.mg-overlay{z-index:30;touch-action:none;user-select:none;-webkit-user-select:none;}
/* 矮視窗（例如手機橫放 844×390）：max-height:100%＋overflow-y:auto 讓卡片內容自己捲動，
   不會把開始／跳過擠出畫面外（review 修正 #2） */
.mg-panel{width:min(560px,100%);max-height:100%;overflow-y:auto;text-align:center;}
.mg-title{display:flex;align-items:center;justify-content:center;gap:10px;margin:0;font-size:1.5em;letter-spacing:.25em;}
.mg-crow{width:52px;height:52px;object-fit:contain;}
.mg-help{margin:6px 0 10px;font-size:.95em;line-height:1.5;}
@media (pointer:coarse), (max-width:700px){ .mg-keys{display:none;} } /* 「或按 F／J」：手機上沒有鍵盤（試玩修正 2 L3） */
.mg-area{position:relative;overflow:hidden;border-radius:8px;cursor:pointer;touch-action:none;}
.mg-status{min-height:1.6em;margin-top:8px;font-size:1.15em;font-weight:bold;}
.mg-result{font-size:1.6em;}
.mg-foot{display:flex;gap:12px;justify-content:center;margin-top:10px;flex-wrap:wrap;}
.mg-foot button{min-height:48px;min-width:120px;padding:6px 18px;font-size:1.05em;}
/* 奉納舞（phase3b）：左右兩軌，音符由上往下落到下方三分之一的判定線 */
.mg-area-dance{height:min(440px,58vh,max(200px,100vh - 350px));} /* 矮螢幕（375×667）：開場卡片三顆按鈕排兩行，場地讓出空間，「調整延遲」才不會掉到要捲才看得到 */
.rg-lane{position:absolute;top:0;bottom:0;width:50%;}
.rg-l0{left:0;} .rg-l1{left:50%;}
.rg-line{position:absolute;left:0;right:0;top:66.67%;height:4px;margin-top:-2px;pointer-events:none;}
.rg-drum{position:absolute;left:50%;top:66.67%;width:58px;height:58px;margin:-29px 0 0 -29px;border-radius:50%;}
.rg-key{position:absolute;left:0;right:0;top:calc(66.67% + 42px);font-size:1.1em;font-weight:bold;}
@media (pointer:coarse){ .rg-key{display:none;} }
.rg-note{position:absolute;top:-20%;width:48px;height:48px;margin:-24px 0 0 -24px;border-radius:50%;pointer-events:none;z-index:2;}
.rg-n0{left:25%;} .rg-n1{left:75%;}
.rg-note.rg-hold{width:24px;margin:0 0 0 -12px;border-radius:12px;}
.rg-hold::after{content:'';position:absolute;left:50%;bottom:-24px;width:48px;height:48px;margin-left:-24px;border-radius:50%;}
.rg-note.hit{opacity:0;transform:scale(1.4);transition:opacity .2s,transform .2s;}
.rg-note.rg-hold.hit{transform:none;}
.rg-note.missed{opacity:.3;}
.rg-combo{position:absolute;left:0;right:0;top:28%;font-size:1.9em;font-weight:bold;pointer-events:none;z-index:3;}
.rg-name{font-size:1.4em;}
.rg-burst{animation:rg-burst .6s ease-out;}
@keyframes rg-burst{30%{transform:scale(1.6);}}
.rg-drum.rg-cal{top:55%;width:96px;height:96px;margin:-48px 0 0 -48px;transition:transform .08s;}
.rg-drum.rg-cal.flash{transform:scale(1.15);}
/* 瀑布冥想 */
.mg-area-meditate{height:min(320px,42vh);display:flex;justify-content:center;}
.mg-gauge{position:relative;width:96px;height:100%;border-radius:10px;}
.mg-track{position:absolute;left:0;right:0;top:20px;bottom:20px;}
.mg-zone{position:absolute;left:8px;right:8px;border-radius:8px;}
.mg-heart{position:absolute;left:50%;width:40px;height:40px;margin-left:-20px;line-height:40px;font-size:30px;text-align:center;}
/* 山路夜巡 */
.mg-area-patrol{--mg-t:84px;height:min(340px,46vh);}
.mg-target{position:absolute;width:var(--mg-t);height:var(--mg-t);border-radius:50%;}
img.mg-target{object-fit:contain;-webkit-user-drag:none;}
.mg-target.hit,.mg-target.wrong{transform:scale(.6);opacity:.4;transition:transform .15s,opacity .15s;}
@media (max-width:700px){
  .mg-title{font-size:1.3em;}
  .mg-area-patrol{--mg-t:76px;}
}
/* 矮或橫放的手機（高度 < 450px）：藏起烏鴉頭像、說明文字縮小，省空間給遊戲區和開始／跳過按鈕 */
@media (max-height:450px){
  .mg-crow{display:none;}
  .mg-help{font-size:.8em;margin:2px 0 6px;line-height:1.3;}
  .mg-panel{padding:12px 14px;}
}
@media (prefers-reduced-motion:reduce){ /* 不閃不跳，只剩位移 */
  .rg-note.hit,.mg-target.hit,.mg-target.wrong,.rg-drum.rg-cal.flash{transform:none;transition:none;}
  .rg-burst{animation:none;text-decoration:underline;} /* 連擊里程碑：不放大，只加底線 */
  .mg-fire{animation:none !important;}
  .pulse{animation:none;border-color:#ffd76a;} /* 菸猴開口：不跳不閃，只變框色 */
  .shake{animation:none;} /* 黑羽說話：不震 */
}

/* ---------- 町地圖（第三階段 A 規格 §7）：桌面置中大視窗、手機全螢幕；地圖固定 9:16，太矮就上下捲動。質感在 themes/a.css ---------- */
#game.map-view #sched-buttons,#game.map-view #partner-row{display:none;}
.map-overlay{z-index:25;}
#map-panel{width:auto;max-width:100%;max-height:calc(100vh - 32px);display:flex;flex-direction:column;padding:10px 12px 12px;overflow:hidden;}
.map-head{position:relative;padding:6px 52px 10px 6px;min-height:56px;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;}
.map-head h2{margin:0;font-size:1.3em;letter-spacing:.2em;}
.map-head p{margin:0;font-size:.95em;}
.map-head .modal-close{top:2px;right:2px;width:48px;height:48px;}
.map-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;}
.map-board{--spot:62px;--pal:36px;position:relative;height:min(calc(100vh - 150px),860px);aspect-ratio:9/16;margin:auto;flex:none;border-radius:6px;overflow:hidden;}
#map-panel.walk .map-board{height:min(calc(100vh - 210px),860px);}
.map-art{position:absolute;inset:0;width:100%;height:100%;}
.map-river,.map-road{fill:none;vector-effect:non-scaling-stroke;stroke-linecap:round;}
.map-spot{position:absolute;width:calc(var(--spot) + 30px);transform:translate(-50%, calc(var(--spot) * -.5));padding:0;border:none;background:none;
  display:flex;flex-direction:column;align-items:center;gap:2px;z-index:1;}
.map-spot:disabled{opacity:1;cursor:default;}
.spot-pic{display:block;width:var(--spot);height:var(--spot);border-radius:50%;background-size:cover;background-position:center;flex:none;}
.spot-name{font-size:.82em;font-weight:bold;padding:1px 8px;border-radius:4px;white-space:nowrap;}
.spot-pals{position:absolute;top:-8px;left:calc(50% + var(--spot) * .18);display:flex;gap:2px;}
.pal{position:relative;display:inline-block;width:var(--pal);height:var(--pal);border-radius:50%;background-repeat:no-repeat;flex:none;}
.pal-heart{position:absolute;right:-5px;bottom:-4px;font-style:normal;font-size:13px;line-height:1;}
.pal-bang{position:absolute;left:-7px;top:-7px;width:18px;height:18px;border-radius:50%;font-size:12px;line-height:18px;text-align:center;animation:bounce 1.2s ease-in-out infinite;}
.map-foot{display:flex;justify-content:center;}
#map-home{margin-top:10px;min-height:48px;min-width:200px;font-size:1.05em;font-weight:bold;letter-spacing:.15em;}
/* 地點選單：從下方滑出 */
.map-sheet{position:absolute;left:0;right:0;bottom:0;z-index:3;max-height:72%;overflow-y:auto;padding:12px 14px 14px;border-radius:14px 14px 0 0;animation:sheetUp .2s ease-out;}
@keyframes sheetUp{from{transform:translateY(100%);}to{transform:translateY(0);}}
.sheet-head{position:relative;display:flex;align-items:center;gap:10px;padding-right:48px;margin-bottom:10px;}
.sheet-head .spot-pic{--spot:48px;}
.sheet-title{display:flex;flex-direction:column;gap:2px;min-width:0;}
.sheet-title b{font-size:1.15em;letter-spacing:.1em;}
.sheet-title span{font-size:.9em;}
.sheet-head .modal-close{top:0;right:0;width:48px;height:48px;}
.sheet-body{display:flex;flex-direction:column;gap:8px;}
.sheet-note{margin:0;font-size:.95em;}
.sheet-opt{min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 14px;text-align:left;}
.sheet-opt small{font-size:.8em;opacity:.85;}
.sheet-name{font-weight:bold;font-size:1.05em;}
.sheet-go{justify-content:center;font-weight:bold;font-size:1.05em;}
.sheet-label{font-weight:bold;display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;}
.sheet-label small{font-weight:normal;font-size:.8em;opacity:.85;}
.sheet-pals{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:6px;}
.sheet-pal{--pal:36px;justify-content:flex-start;padding:6px 8px;gap:6px;}
.sheet-pal > span:last-child{display:flex;flex-direction:column;min-width:0;}
.sheet-pal small{white-space:normal;}
/* 好感提示（規格 §6） */
/* 好感（含提示）獨佔一整行（桌面、手機都是），提示接在「下一段」後面，字才不會擠成好幾行 */
.hud-side{display:contents;}
.hud-aff{grid-column:1 / -1;}
.hud-aff .stat-row{margin:1px 0;}
.aff-next{font-size:.76em;line-height:1.35;margin:-2px 0 3px 1.6em;}
.aff-hint{opacity:.85;}
.aff-hint::before{content:'・';}
.aff-q{font-size:.85em;opacity:.7;white-space:nowrap;}
#month-col{grid-area:month;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;}
.btn-view{flex:none;min-height:48px;min-width:48px;padding:4px 12px;}
@media (max-width:700px){ #month-col{gap:6px;} .btn-view{padding:2px 4px;font-size:.88em;width:100%;} }
/* 烏鴉委託（第三階段 D §4）：委託牌（像素烏鴉）、點開的一行說明、地圖目標地點上的小烏鴉 */
.btn-quest{position:relative;flex:none;width:56px;height:52px;min-height:48px;padding:2px;display:flex;align-items:center;justify-content:center;}
.btn-quest[hidden]{display:none;}
.btn-quest img{width:44px;height:46px;image-rendering:pixelated;}
.btn-quest .quest-pal{--pal:44px;} .btn-quest .quest-pal[hidden]{display:none;} /* 夥伴出的委託：她的小頭像（第三階段 G） */
/* 本月清單（第六階段 A，第三輪 P2）；第六階段 C 拿掉右上角的「做得到／全部」 */
.list-tag{position:absolute;left:50%;bottom:-7px;transform:translateX(-50%);padding:0 5px;border-radius:7px;background:#5c3a21;color:#fff;font-size:11px;line-height:15px;white-space:nowrap;font-weight:bold;} /* 「本月」：跟「按鈕列」切換鈕分得出來（第六階段 B，pt6 Q7） */
/* 第六階段 B：快速結算跳過沒有要選的月初卡時，月份章的籤條和本月清單鈕閃一下（籤自動抽好了、委託接下了） */
#month-badge.flash .mb-kuji,.btn-quest.flash{animation:quietFlash .5s ease-in-out 3;}
@keyframes quietFlash{50%{transform:scale(1.18);filter:brightness(1.3) drop-shadow(0 0 6px rgba(255,210,90,.95));}}
@media (prefers-reduced-motion:reduce){ #month-badge.flash .mb-kuji,.btn-quest.flash{animation:none;outline:3px solid #f2c14e;} }
.list-pop{position:fixed;z-index:15;width:min(380px, calc(100vw - 32px));max-height:min(78vh, 560px);overflow:auto;padding:10px 14px;border-radius:10px;display:flex;flex-direction:column;gap:6px;line-height:1.45;
  background:var(--washi,#fdfbf7);color:var(--sumi,#2b2118);border:2px solid var(--wood,#5c3a21);box-shadow:0 4px 14px rgba(0,0,0,.3);}
.list-pop[hidden]{display:none;}
.list-pop > b small{font-weight:normal;font-size:.8em;opacity:.8;}
.list-rows{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;}
.list-row{display:flex;align-items:flex-start;gap:6px;padding:4px 0;border-top:1px dashed rgba(92,58,33,.25);}
.list-row:first-child{border-top:none;}
.list-mark{flex:none;width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;color:#fff;background:#8a7a6a;}
.list-row.is-ok .list-mark,.list-row.is-done .list-mark{background:#3f7d1f;}
.list-row.is-no .list-mark{background:#b7382f;}
.list-row.is-walk .list-mark{background:#3b5f8a;}
.list-row.is-dropped,.list-row.is-off{opacity:.55;}
.list-who{flex:none;--pal:28px;width:28px;height:28px;object-fit:contain;}
i.list-who{display:flex;align-items:center;justify-content:center;border-radius:6px;background:#e8d6b4;color:#5c3a21;font-style:normal;font-weight:bold;font-size:14px;}
.list-body{display:flex;flex-direction:column;gap:2px;min-width:0;font-size:.92em;}
.list-body em{font-style:normal;font-weight:bold;font-size:.92em;}
.list-row.is-no .list-body em{color:#b7382f;} .list-row.is-ok .list-body em,.list-row.is-done .list-body em{color:#3f7d1f;}
.list-body small,.list-note{font-size:.8em;opacity:.8;}
/* 第六階段 C（P1）：分層的小標；同心沒做到是「…」（灰），不是紅 ✗；順手加成收在 details 裡 */
.list-grp{display:flex;flex-direction:column;gap:2px;}
.list-h{font-size:.78em;color:#8a5a36;letter-spacing:.05em;}
.list-dir > span{font-size:.92em;} .list-dir small{font-size:.8em;opacity:.8;}
.list-risk{font-style:normal;font-size:.88em;color:#b7382f;} .list-safe{font-style:normal;font-size:.85em;opacity:.75;}
.list-bonus summary{min-height:48px;display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;cursor:pointer;font-size:.92em;}
.list-bonus summary .list-h{flex-basis:100%;}
.list-drop{align-self:flex-start;min-height:48px;padding:4px 12px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.25;margin-top:2px;}
.list-drop small{font-size:.76em;font-weight:normal;opacity:.8;}
@media (max-width:700px){ /* 手機：貼底、背景稍微變暗（上面露出臉） */
  .list-more{display:none;} /* 規則說明：手機收起，卡片才不會蓋到臉 */
  .list-bonus .list-more{display:block;} /* 第六階段 C：順手加成是自己展開的，規則就給看 */
  .list-pop{left:8px;right:8px;bottom:8px;top:auto;width:auto;max-height:52vh;box-shadow:0 0 0 100vmax rgba(10,8,20,.25), 0 4px 14px rgba(0,0,0,.3);}
}
.spot-quest{position:absolute;top:-6px;left:calc(50% - var(--spot) * .5 - 10px);width:32px;height:33px;image-rendering:pixelated;pointer-events:none;z-index:1;}
/* 手機：行程區高度固定，委託牌疊在「清單」下面會把確定鍵擠出畫面，改成月份章在上、清單和委託牌並排（旬卡片讓出 50px） */
@media (max-width:700px){
  #panel-slots.has-quest{grid-template-columns:100px 1fr;}
  #panel-slots.has-quest .slot-advice{padding:2px;} /* 卡片窄了：建議泡泡左右少一點留白，短版建議兩行放得下 */
  #panel-slots.has-quest #month-col{display:grid;grid-template-columns:48px 48px;justify-content:space-between;justify-items:center;align-content:start;gap:6px;}
  #panel-slots.has-quest #month-badge{grid-area:1 / 1 / 2 / 3;}
  .btn-quest{width:48px;height:48px;} .btn-quest img{width:38px;height:40px;} .btn-quest .quest-pal{--pal:40px;}
  .spot-quest{width:28px;height:29px;}
}
@media (max-width:700px){
  #map-modal{padding:0;}
  #map-panel{width:100%;height:100%;max-height:none;border-radius:0;padding:8px 8px 10px;}
  .map-board{--spot:54px;--pal:34px;width:100%;height:auto;}
  #map-panel.walk .map-board{height:auto;}
  .map-spot{width:calc(var(--spot) + 24px);}
  .spot-name{font-size:.78em;padding:1px 6px;}
  #map-home{width:100%;}
  .sheet-pals{grid-template-columns:1fr;}
}
@media (prefers-reduced-motion:reduce){ .map-sheet,.pal-bang{animation:none;} }
/* 桌面放不下提示時（src/ui.js fitStats）：好感回到右欄、提示收進滑鼠提示 */
@media (min-width:701px){
  #game.stats-tight .hud-side{display:block;}
  #game.stats-tight .hud-aff{grid-column:auto;}
  #game.stats-tight .aff-next{display:none;}
  #game.stats-tight .hud-next{display:block;}
}
.slot.risk .slot-advice.slot-warn{color:#a3261a;font-weight:bold;border-color:#c0392b;background:#fff3ef;} /* 基準預演的警告（第五階段 A） */
.mg-total{font-size:.76em;line-height:1.35;margin:4px 0 0;color:#8a5a12;font-weight:bold;} /* 小遊戲累計（第五階段 A） */
.hud-abil{min-width:0;} /* 提示不換行時不能把左欄撐寬（會擠掉右欄數值） */
.hud-next{display:none;margin-top:6px;padding-top:4px;border-top:1px dashed rgba(92,58,33,.3);font-size:.74em;line-height:1.4;}
.hn{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.aff-bang{margin-left:2px;}
.map-scroll.more{-webkit-mask-image:linear-gradient(#000 calc(100% - 44px),transparent);mask-image:linear-gradient(#000 calc(100% - 44px),transparent);}

/* ---------- 月初卡（試玩修正 2）：御神籤＋委託 ---------- */
#start-modal{z-index:30;}
#start-panel{width:min(400px,100%);display:flex;flex-direction:column;gap:8px;}
#start-title{margin:0;text-align:center;font-size:1.1em;letter-spacing:.15em;}
.sc-sec{border-top:1px dashed rgba(92,58,33,.35);padding-top:8px;display:flex;flex-direction:column;gap:4px;}
.sc-head{display:flex;align-items:center;gap:8px;}
.sc-head img{width:34px;height:34px;flex:none;}
.sc-head .pal{--pal:36px;}
.sc-auto{margin-left:auto;font-size:.85em;min-height:44px;padding:0 4px;}
.sc-body{display:flex;flex-direction:column;align-items:flex-start;gap:3px;font-size:.92em;line-height:1.45;}
.sc-body small{opacity:.85;}
.sc-body q,#kuji-intro q{display:block;font-size:.9em;opacity:.85;quotes:none;}
.kuji-wait{opacity:.75;}
.sc-slip{display:inline-block;padding:1px 12px;border:2px solid var(--shu,#b7382f);color:var(--shu,#b7382f);background:#fff;font-weight:bold;font-size:1.3em;letter-spacing:.2em;border-radius:3px;}
.sc-slip.kuji-daikichi{background:#fff3c4;box-shadow:0 0 12px rgba(255,200,60,.9);}
.sc-slip.kuji-kyo{color:#3b3b4f;border-color:#3b3b4f;}
.sc-draw{align-self:flex-start;min-height:48px;min-width:96px;}
.sc-btns{display:flex;gap:10px;margin-top:4px;}
.sc-ema{font-size:.8em;opacity:.8;line-height:1.4;text-align:center;} /* 第六階段 B：繪馬的回禮，一行小字 */
.sc-btns button{flex:1;min-height:48px;font-size:1.02em;}
.slot.locked{cursor:default;opacity:.7;filter:grayscale(.6);} /* B4：上個月的事件佔掉的格子 */
.btn-last-card{min-height:44px;}
@media (max-width:700px){ #start-modal,#month-modal{align-items:flex-end;} } /* 手機：卡片貼底，上面露出說話的人的臉 */

/* ---------- 快速結算的月底結算卡（第三階段 H）：月曆頁蓋住整張卡，往上翻掉露出明細；質感在 themes/a.css ---------- */
#month-modal{z-index:30;cursor:pointer;}
#month-panel{width:min(400px,100%);perspective:900px;overflow:hidden;}
#month-title{margin:0 0 10px;text-align:center;font-size:1.15em;letter-spacing:.15em;}
#month-rows{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;margin:0 0 14px;font-size:.92em;line-height:1.45;}
#month-rows dt{font-weight:bold;white-space:nowrap;}
#month-rows dd{margin:0;min-width:0;overflow-wrap:anywhere;}
#month-rows q{display:block;font-size:.9em;opacity:.85;margin-top:2px;quotes:none;}
#month-ok{display:block;width:100%;min-height:48px;font-size:1.05em;}
.cal-page{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  transform-origin:50% 0;backface-visibility:hidden;pointer-events:none;visibility:hidden;}
.cal-page.flip{visibility:visible;animation:cal-flip .75s .25s cubic-bezier(.5,0,.75,.4) forwards;}
.cal-page .cp-year{font-size:.9em;letter-spacing:.3em;}
.cal-page .cp-num{font-size:4.2em;font-weight:bold;line-height:1;}
.cal-page .cp-num small{font-size:.4em;margin-left:4px;}
.cal-page .cp-old{font-size:1.1em;letter-spacing:.3em;}
@keyframes cal-flip{99%{transform:rotateX(100deg);opacity:0;}to{transform:rotateX(100deg);opacity:0;visibility:hidden;display:none;}}
.cal-page.gone{display:none;} /* 翻完（animationend）就拿掉：有些瀏覽器會留下一條朱紅綴條的殘影 */
/* 桌面（L3）：結算卡、月初卡不放正中間（會蓋到歐咖咪的臉）；演出時右邊的面板收起來了，卡片改放右側 */
@media (min-width:1101px){
  #month-modal,#start-modal{justify-content:flex-end;padding-right:max(16px, 6vw);}
}
@media (prefers-reduced-motion:reduce){ .cal-page.flip{animation:none;visibility:hidden;} } /* 不翻頁，直接看明細 */

/* ---------- 試玩修正 3 ---------- */
/* L3 的季節色調（SVG 橢圓＋mix-blend）在第五階段 E 換成季節版背景圖，見最上面 .bg-*.summer/.autumn/.winter */
/* L5：沒見過的夥伴 */
.pal.pal-unknown{background:#5c3a21 !important;color:#fff;font-weight:bold;font-style:normal;display:inline-flex;align-items:center;justify-content:center;font-size:calc(var(--pal) * .5);}
/* #9：地圖第一次打開的圖例、標題的種子碼小連結、小遊戲延遲說明 */
.map-hint{margin:0 6px 6px;padding:4px 6px 4px 10px;border-radius:8px;background:rgba(255,248,225,.96);color:#2b2118;border:1px solid #5c3a21;font-size:.86em;line-height:1.4;display:flex;gap:8px;align-items:center;}
.map-hint b{color:#b7382f;}
.map-hint button{flex:none;min-height:44px;margin-left:auto;padding:2px 12px;}
.link-btn{background:none !important;border:none !important;box-shadow:none !important;color:inherit;text-decoration:underline;font-size:.9em;min-height:44px;padding:4px 12px;opacity:.85;cursor:pointer;}
.mg-cal-note{flex-basis:100%;text-align:center;font-size:.8em;opacity:.8;line-height:1.4;margin:0 8px;}
@media (max-width:700px){
  /* L2：浮字往上飄 36px，起點放在狀態列下方再往下 40px，不會被畫面上緣切掉 */
  #floaters,body.busy #floaters{top:calc(var(--top-h) + 40px);}
  /* L1：月初卡精簡（籤一行、按鈕不變高），貼底，不蓋到歐咖咪的眼睛 */
  #start-modal,#month-modal{padding:8px;background:rgba(10,8,20,.3);} /* 月初卡、結算卡都貼底、背景只淡淡一層，臉不被遮暗 */
  #start-panel{gap:4px;padding:10px 12px;}
  #start-title{font-size:.95em;}
  .sc-sec{padding-top:4px;gap:2px;}
  .sc-auto{min-height:40px;font-size:.8em;}
  .sc-head img{width:28px;height:28px;} .sc-head .pal{--pal:30px;}
  #kuji-res{flex-direction:row;flex-wrap:wrap;align-items:center;gap:2px 8px;}
  #kuji-res q{flex-basis:100%;}
  .sc-slip{font-size:1em;padding:0 8px;}
  .sc-body{font-size:.86em;line-height:1.35;}
  .sc-draw{min-height:44px;}
  /* L4：散步地圖縮成一頁，四個散步點都看得到，不用捲 */
  #map-panel.walk .map-scroll{overflow:hidden;align-items:center;}
  #map-panel.walk .map-board{height:100%;width:auto;max-width:100%;}
}
/* 第六階段 B-2（pt6 Q5）：手機的月初卡、月底卡（含年底回顧）出現時，立繪往上移 16vh（頭頂還在畫面裡：82vh 的圖頂在 2vh），
   下巴從 65.6vh 移到 49.6vh；卡片最高到下巴下面（50vh − 下緣 8px − 間隔 6px），超出的在卡片裡捲，按鈕黏在卡片底。
   Stella（.tall，星冠留白，圖高 ×1.2）頭頂沒有空間往上推，只推 1vh、卡片收到 35vh 以內（下巴在 64.2vh） */
@media (max-width:700px){
  body:has(#month-modal:not([hidden])) .portrait,body:has(#start-modal:not([hidden])) .portrait{bottom:16vh;}
  body:has(#month-modal:not([hidden])) .portrait.tall,body:has(#start-modal:not([hidden])) .portrait.tall{bottom:1vh;}
  #month-panel,#start-panel{max-height:calc(50vh - 14px);overflow-x:hidden;overflow-y:auto;}
  body:has(#stage .portrait.tall[src]) #month-panel,body:has(#stage .portrait.tall[src]) #start-panel{max-height:calc(35vh - 14px);}
  #month-panel .month-foot,#sc-btns{position:sticky;bottom:0;z-index:2;background:inherit;}
  #month-panel{padding-bottom:0;} #month-panel .month-foot{margin:0 -14px;padding:6px 14px 14px;}
  #start-panel{padding-bottom:0;} #sc-btns{margin:4px -12px 0;padding:6px 12px 10px;}
}
@media (max-width:700px) and (max-height:760px){
  #start-modal .sc-body q{display:none;} /* 矮螢幕：卡上的引言收起（籤名、效果、委託內容都還在） */
  #month-title{margin-bottom:4px;} #month-rows{gap:2px 8px;font-size:.84em;line-height:1.35;margin-bottom:8px;} /* 第五階段 A：回顧卡多兩行，矮螢幕排緊一點，不蓋到眼睛 */
}

/* ---------- 第五階段 C：三個月企畫（Codex 體檢 P3）---------- */
/* 月初卡的邀請：兩條路線各一顆大按鈕（名字＋三個月的行程），〔這次不接〕單獨一顆 */
.sp-routes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:4px;}
.sp-route{min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:6px 8px;line-height:1.3;}
.sp-route small{font-size:.78em;opacity:.85;font-weight:normal;}
.sp-no{grid-column:1 / -1;min-height:48px;}
.sp-note{font-size:.78em;opacity:.8;line-height:1.4;}
.sp-route .sp-cost{opacity:1;font-weight:bold;} .sp-cost-note{display:block;} /* 第六階段 C：企畫的時間成本 */
.sq-ans{font-size:.95em;}
/* 企畫邀請翻出來時：答完的委託收起（委託牌還在面板上），籤只留籤條那一行，卡片才不會蓋到臉、也不會超出畫面 */
#start-panel.pj-ask #start-quest,#start-panel.pj-ask #start-kuji .sc-head,#start-panel.pj-ask #kuji-intro,#start-panel.pj-ask #kuji-res q,#start-panel.pj-ask .kuji-wait,#start-panel.pj-ask #kuji-draw{display:none;}
@media (max-width:700px){
  .sp-note > span:not(.sp-cost-note){display:none;} /* 規則說明在本月清單的企畫那一列（第六階段 A P2）；時間成本那一句留著（第六階段 C） */
  .sp-routes{gap:6px;} .sp-route{padding:4px 6px;}
  #month-rows .pj-rn{display:none;} /* 手機：結算卡上企畫的名稱收起（完成度、印記還在）。最後一句台詞留著（第六階段 E，Codex 試玩 2 C1：卡片本來就能捲，高度不變、不蓋臉） */
}
/* 探訪線索（第五階段 D，Codex 體檢 P4）：回想分頁的線索、地圖上的放大鏡、地點選單的一行 */
.recall-items button.hinted{opacity:.85;border-style:dashed;display:flex;justify-content:space-between;align-items:center;gap:6px;}
.recall-items button.hinted small{font-size:.78em;padding:1px 6px;border-radius:4px;background:rgba(92,58,33,.15);}
.recall-items button.tracked{opacity:1;outline:3px solid #b7382f;outline-offset:-3px;}
.recall-items button.tracked small{background:#b7382f;color:#fff;}
.recall-hint{margin-top:8px;padding:8px 10px 8px 14px;border-radius:8px;background:rgba(255,248,225,.96);color:#2b2118;border:2px solid #5c3a21;display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;}
.recall-hint p{margin:0;flex:1 1 220px;line-height:1.5;}
.recall-hint button{flex:none;min-height:48px;padding:0 16px;margin-left:auto;}
.map-track{margin:0 6px 6px;padding:4px 10px;border-radius:8px;background:rgba(255,248,225,.96);color:#2b2118;border:1px solid #b7382f;font-size:.86em;line-height:1.4;display:flex;gap:8px;align-items:center;}
.map-track svg,.sheet-track svg{width:18px;height:18px;flex:none;color:#b7382f;}
.map-track b{color:#b7382f;margin-right:6px;}
#map-panel.has-track .map-board{height:min(calc(100vh - 190px),860px);}
#map-panel.has-track.walk .map-board{height:min(calc(100vh - 250px),860px);}
.spot-track{position:absolute;top:calc(var(--spot) * .58);left:calc(50% - var(--spot) * .5 - 12px);width:28px;height:28px;padding:4px;border-radius:50%;
  background:#fff8e1;color:#5c3a21;border:2px solid #5c3a21;pointer-events:none;z-index:1;box-shadow:0 1px 3px rgba(0,0,0,.35);}
.spot-track.ready{background:#b7382f;color:#fff;border-color:#fff;animation:bounce 1.2s ease-in-out infinite;}
.sheet-track{display:flex;gap:6px;align-items:center;color:#8e1f14;font-weight:bold;}
@media (max-width:700px){ #map-panel.has-track .map-board,#map-panel.has-track.walk .map-board{height:auto;} .spot-track{width:24px;height:24px;padding:3px;} }
@media (prefers-reduced-motion:reduce){ .spot-track.ready{animation:none;} }
.recall-items button.hinted[aria-expanded="true"]{opacity:1;border-color:#b7382f;}
/* 修繕的痕跡（第五階段 D，Codex 體檢 P5）：場景左上的小牌（背景層，立繪蓋在上面）、地圖圖片右下的小圖示、地點選單一行 */
.shrine-marks{position:absolute;top:12px;left:12px;z-index:1;display:flex;flex-direction:column;gap:6px;pointer-events:none;}
.shrine-mark{display:flex;align-items:center;gap:6px;padding:4px 10px 4px 6px;border-radius:6px;background:rgba(253,248,236,.9);color:#4a2e1a;border:2px solid #8A5A36;
  font-size:13px;line-height:1.2;font-weight:bold;box-shadow:0 2px 6px rgba(0,0,0,.35);white-space:nowrap;}
.rp-icon{display:inline-block;width:18px;height:18px;flex:none;color:#8e1f14;}
.spot-repairs{position:absolute;top:calc(var(--spot) * .6);left:calc(50% + var(--spot) * .22);display:flex;gap:1px;padding:2px 4px;border-radius:10px;
  background:#fdf8ec;border:2px solid #8A5A36;pointer-events:none;z-index:1;box-shadow:0 1px 3px rgba(0,0,0,.35);}
.spot-repairs .rp-icon{width:16px;height:16px;}
.sheet-repair{display:flex;gap:6px;align-items:center;color:#5c3a21;}
@media (max-width:700px){ .shrine-marks{top:48px;left:8px;} .shrine-mark{font-size:12px;padding:3px 8px 3px 5px;} .spot-repairs .rp-icon{width:14px;height:14px;} }
/* 烏鴉的勳章（第五階段 D，第二輪體檢提案 7）：圖鑑第四個分頁、結局時的通知 */
#medal-list{width:min(900px,100%);max-height:60vh;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px;padding:2px 4px;}
.medal-row{position:relative;background:rgba(248,244,232,.9);color:#2C2725;border:2px dashed #8A5A36;border-radius:8px;padding:8px 34px 8px 10px;display:flex;gap:10px;align-items:center;text-align:left;opacity:.8;}
.medal-row div{display:flex;flex-direction:column;gap:2px;min-width:0;}
.medal-row b{font-size:1em;}
.medal-row span{font-size:.82em;line-height:1.4;}
.medal-row em{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-style:normal;font-weight:bold;color:#3f7d1f;font-size:1.2em;}
.medal-row.got{border-style:solid;opacity:1;background:rgba(255,250,232,.97);}
.medal-icon{display:inline-block;width:30px;height:30px;flex:none;color:#9a8a72;}
.medal-row.got .medal-icon{color:#b7382f;}
.medal-toast{position:fixed;z-index:40;left:50%;top:14px;transform:translateX(-50%);display:flex;gap:10px;align-items:center;max-width:calc(100vw - 32px);
  padding:8px 18px 8px 12px;border-radius:10px;background:rgba(255,250,232,.97);color:#2b2118;border:3px double #b7382f;box-shadow:0 4px 14px rgba(0,0,0,.4);}
.medal-toast .medal-icon{color:#b7382f;width:32px;height:32px;}
.medal-toast span{display:flex;flex-direction:column;line-height:1.3;}
.medal-toast small{font-size:.78em;color:#8e1f14;}
.medal-toast.pop{animation:toastIn .3s ease-out;}
@keyframes toastIn{from{transform:translate(-50%,-30px);opacity:0;}to{transform:translate(-50%,0);opacity:1;}}
@media (prefers-reduced-motion:reduce){ .medal-toast.pop{animation:none;} }
@media (max-width:480px){ .gallery-tabs{width:100%;gap:6px;} .gallery-tabs button{flex:1 1 0;min-width:0;padding:0 4px;font-size:1em;} #medal-list{grid-template-columns:1fr;} }
@media (max-width:700px){ .medal-toast{top:auto;bottom:96px;} @keyframes toastIn{from{transform:translate(-50%,30px);opacity:0;}to{transform:translate(-50%,0);opacity:1;}} } /* 手機：頂端是結局標題，改放在按鈕上面（臉在中間） */
/* 從三年目重來（第五階段 D，第二輪體檢提案 8） */
.title-buttons{flex-wrap:wrap;justify-content:center;}
#y3-panel{display:flex;flex-direction:column;gap:12px;width:min(420px,100%);}
#y3-panel p{margin:0;line-height:1.6;padding-right:40px;}
.y3-btns{display:flex;gap:12px;justify-content:flex-end;}
.y3-btns button{min-height:48px;min-width:96px;padding:0 18px;font-size:1.05em;}
/* 本週的種子（第五階段 D，第二輪體檢提案 10） */
.week-btn{min-height:48px;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:6px 14px;text-align:left;}
.week-btn small{font-size:.8em;opacity:.85;}
/* 勳章通知：置中不用 left:50%（不然寬度只剩半個畫面，名稱會折行）；不擋點擊 */
.medal-toast{left:0;right:0;margin:0 auto;width:max-content;transform:none;pointer-events:none;}
@keyframes toastIn{from{transform:translateY(-30px);opacity:0;}to{transform:none;opacity:1;}}
@media (max-width:700px){ @keyframes toastIn{from{transform:translateY(30px);opacity:0;}to{transform:none;opacity:1;}} }
/* 手機的結局畫面：按鈕上面是資料（種子碼那一行），勳章通知改放在畫面頂端留好的空位（#ending-screen 的 padding-top） */
@media (max-width:700px){ body:has(#ending-screen:not([hidden])) .medal-toast{top:10px;bottom:auto;padding:4px 14px 4px 10px;} }
/* 第五階段 F（AG P1）：烏鴉的經紀專長、三旬同心 */
.crow-note{display:block;font-size:.85em;font-weight:normal;color:#8a5a36;white-space:nowrap;}
.mb-harmony{position:absolute;left:50%;bottom:-10px;transform:translateX(-50%);white-space:nowrap;font-size:.6em;font-weight:bold;line-height:1.3;color:#8a5a00;background:#fff6d6;border:1px solid #d8b24a;border-radius:8px;padding:1px 6px;pointer-events:auto;}
.kuji-charm{display:block;color:#b7382f;}
/* 第五階段 F（AG P2）：香客心願繪馬——能力分頁一行、繪馬架（點開）、地圖授與所的小木牌。繪馬＝五角形木牌（clip-path，沒有圖檔） */
.ema-line{display:flex;align-items:center;gap:6px;width:100%;min-height:48px;margin-top:4px;padding:2px 6px;font-size:.82em;text-align:left;line-height:1.3;}
.ema-tag{flex:none;display:inline-block;padding:6px 6px 3px;font-size:.85em;font-weight:bold;color:#3a2412;background:#d9b47c;clip-path:polygon(50% 0,100% 28%,100% 100%,0 100%,0 28%);}
.ema-pop{position:fixed;z-index:15;width:min(360px, calc(100vw - 32px));max-height:min(70vh, 520px);overflow:auto;padding:10px 14px;border-radius:10px;display:flex;flex-direction:column;gap:6px;line-height:1.45;
  background:var(--washi,#fdfbf7);color:var(--sumi,#2b2118);border:2px solid var(--wood,#5c3a21);box-shadow:0 4px 14px rgba(0,0,0,.3);}
.ema-pop[hidden]{display:none;}
.ema-pop small{font-size:.85em;opacity:.85;}
.ema-cur{display:flex;flex-direction:column;gap:2px;padding:6px 8px;border-radius:8px;background:rgba(217,180,124,.25);}
.ema-cur q{font-size:.9em;}
.ema-board{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:4px 8px;}
.ema-board li{display:flex;align-items:center;gap:6px;font-size:.85em;min-width:0;}
.ema-board li > span:last-child{display:flex;flex-direction:column;min-width:0;}
.ema-board li.miss,.ema-board li:not(.done):not(.now){opacity:.55;}
.ema-plaque{position:relative;flex:none;width:30px;height:28px;background:#d9b47c;clip-path:polygon(50% 0,100% 28%,100% 100%,0 100%,0 28%);}
.ema-board li.now .ema-plaque{background:#e8c992;box-shadow:inset 0 0 0 2px #b7382f;}
.ema-stamp{position:absolute;left:6px;top:8px;width:18px;height:18px;border-radius:50%;border:2px solid #b7382f;color:#b7382f;font-style:normal;font-size:11px;line-height:14px;text-align:center;font-weight:bold;transform:rotate(-12deg);}
.spot-ema{position:absolute;top:-6px;right:calc(50% - var(--spot) * .5 - 14px);padding:5px 4px 2px;font-size:11px;font-weight:bold;color:#3a2412;background:#d9b47c;clip-path:polygon(50% 0,100% 28%,100% 100%,0 100%,0 28%);pointer-events:none;z-index:1;}
.sheet-ema{display:flex;gap:8px;align-items:flex-start;}
.sheet-ema small{display:block;opacity:.85;}
@media (max-width:700px){ .ema-pop{max-height:46vh;} .ema-board{grid-template-columns:repeat(3, minmax(0,1fr));} .ema-board li small{display:none;} .ema-board li.done small{display:block;} }
.aff-bond{margin-left:8px;font-size:.8em;font-weight:bold;color:#b7382f;white-space:nowrap;}
.aff-bond-mark{margin-left:2px;color:#b7382f;font-size:.9em;}
/* 第五階段 F（AG P5）：小遊戲開場卡片的烏鴉指揮方針（三個木牌按鈕，≥48px） */
.mg-dirs{display:flex;gap:8px;justify-content:center;margin-top:8px;}
.mg-dir{flex:1 1 0;min-width:0;max-width:150px;min-height:52px;display:flex;align-items:center;justify-content:center;gap:4px;padding:4px 6px;font-size:.95em;}
.mg-dir img{width:30px;height:30px;object-fit:contain;flex:none;}
.mg-dir[aria-pressed="true"]{outline:3px solid #b7382f;outline-offset:1px;font-weight:bold;}
.mg-dir-note{margin:6px 0 0;font-size:.85em;text-align:center;opacity:.9;}
/* 第六階段 C（P3）：第一次之後指揮收成一行「本次：平穩發揮〔調整〕」 */
.mg-dirs[hidden],.mg-dir-note[hidden]{display:none;}
.mg-dir-now{margin:6px 0 0;display:flex;align-items:center;justify-content:center;gap:10px;font-size:.92em;}
.mg-dir-now{flex-wrap:wrap;} .mg-dir-skip{order:3;flex-basis:100%;text-align:center;font-size:.85em;opacity:.85;} .mg-dir-skip:empty{display:none;}
.mg-dir-toggle{min-height:48px;min-width:64px;padding:4px 12px;}
.mg-card .mg-area-dance{height:min(440px,58vh,max(150px,100vh - 470px));}
.mg-card .mg-area-meditate{height:min(320px,42vh,max(150px,100vh - 470px));}
.mg-card .mg-area-patrol{height:min(340px,46vh,max(150px,100vh - 470px));}
@media (max-width:700px){ .mg-dir{font-size:.88em;min-height:48px;} .mg-dir img{width:24px;height:24px;} .mg-dirs{gap:6px;} }
@media (max-height:700px){ .mg-card .mg-area-dance,.mg-card .mg-area-meditate,.mg-card .mg-area-patrol{height:max(110px,100vh - 540px);} .mg-card .mg-dir-note{font-size:.8em;} }
/* 第五階段 F（AG P6）：三年經紀歲月簿——和紙小冊子（純 CSS），手機貼底、背景淡（結局立繪的臉露在上面） */
#book-modal{z-index:45;background:rgba(10,8,20,.45);}
@media (min-width:1101px){ #book-modal{justify-content:flex-end;padding-right:max(16px, 6vw);} } /* 桌面：放右邊，結局立繪的臉在中間 */
#book-panel{width:min(440px,100%);display:flex;flex-direction:column;gap:6px;background:#f8f4e8;color:#2c2725;border:3px solid #8a5a36;box-shadow:inset 0 0 0 6px #f8f4e8, inset 0 0 0 7px rgba(138,90,54,.35);}
.book-head{margin:0;font-size:.82em;letter-spacing:.15em;color:#8a5a36;text-align:center;}
#book-title{margin:0;text-align:center;font-family:"OkamiSerif","Microsoft JhengHei",serif;letter-spacing:.2em;}
.book-body{overflow-y:auto;min-height:0;}
.book-rows{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;margin:4px 0;line-height:1.5;}
.book-rows dt{font-weight:bold;color:#5c3a21;white-space:nowrap;}
.book-rows dd{margin:0;}
.book-rows small{display:block;opacity:.8;}
.book-hearts{color:#b7382f;letter-spacing:1px;}
.book-crow{display:flex;gap:6px;align-items:center;margin-top:8px;font-size:.88em;opacity:.9;quotes:none;}
.book-crow img{width:28px;height:28px;object-fit:contain;flex:none;}
.book-ending{margin:4px 0;text-align:center;color:#8a5a36;}
.book-msg{margin:8px 4px;font-family:"OkamiSerif","Microsoft JhengHei",serif;font-size:1.15em;line-height:1.9;}
.book-sign{margin:0 8px;text-align:right;font-family:"OkamiSerif","Microsoft JhengHei",serif;}
.book-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:4px;}
.book-nav button{min-height:48px;min-width:96px;}
#book-dots{display:flex;gap:6px;}
#book-dots i{width:8px;height:8px;border-radius:50%;background:rgba(138,90,54,.3);}
#book-dots i.on{background:#b7382f;}
@media (max-width:700px){ #book-modal{align-items:flex-end;padding:8px;background:rgba(10,8,20,.3);} #book-panel{max-height:58vh;} .book-msg{font-size:1.05em;line-height:1.75;} }
@media (max-width:480px){ .ending-buttons{gap:8px;} .ending-buttons button{padding:10px 12px;white-space:nowrap;} } /* 第五階段 F：多了〔經紀歲月簿〕，三顆擠一行不折字 */
#ending-screen{overflow-y:auto;justify-content:safe center;} /* 矮手機：內容比畫面高時從上面排、可以捲，標題和按鈕不會被切掉 */
/* ---------- 第六階段 A：經紀方針（第三輪 P1）---------- */
#choices.choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;} /* 方針會議：六個選項三欄兩列（手機不蓋臉），每顆 ≥48px */
#choices.choice-grid button{min-width:0;padding:2px 4px;line-height:1.2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;}
#choices.choice-grid button small{font-size:.74em;font-weight:normal;opacity:.85;}
.focus-total{margin-left:8px;font-size:.82em;font-weight:normal;letter-spacing:normal;white-space:nowrap;color:#5c3a21;}
.month-foot{display:flex;gap:8px;} .month-foot #month-ok{flex:1;min-width:0;}
#month-focus{flex:0 0 auto;min-height:48px;min-width:88px;padding:2px 10px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.2;}
#month-focus small{font-size:.72em;opacity:.8;}
#month-panel.picking #month-rows{display:none;}
.month-pick p{margin:0 0 6px;font-size:.88em;}
.focus-opts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:10px;}
.focus-opts button{min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:4px 6px;line-height:1.25;}
.focus-opts button small{font-size:.78em;opacity:.8;font-weight:normal;}
.focus-opts button.selected{outline:3px solid #b7382f;outline-offset:-3px;}
/* 第六階段 A（第三輪 P4）：香客的回禮——沒趕上的心願事後揭露 */
.ema-missed{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;font-size:.82em;opacity:.8;}
.ema-missed b{margin-right:6px;}
/* ---------- 第六階段 A：試玩紀錄器（第三輪 P3）---------- */
.set-btn{width:100%;justify-content:center;font-size:.92em;}
.set-note{display:block;max-width:200px;padding:2px 10px 4px;font-size:.74em;line-height:1.35;opacity:.8;white-space:normal;}
#trace-panel{width:min(520px,100%);display:flex;flex-direction:column;gap:8px;}
#trace-title{margin:0;}
.trace-note{margin:0;font-size:.85em;opacity:.85;}
#trace-text{width:100%;box-sizing:border-box;height:min(46vh,360px);resize:vertical;font:12px/1.35 ui-monospace,Consolas,monospace;padding:6px;border:2px solid #8a5a36;border-radius:6px;background:#fffdf8;color:#2c2725;}
.trace-btns{display:flex;gap:10px;} .trace-btns button{flex:1;min-height:48px;}
/* 第六階段 D-1（pt7 Q1）：矮手機（高 ≤700）出現選項時，對話框會蓋到說話者的嘴到下巴（375×667：對話框頂 379、下巴 437）。
   選項改兩欄（單數的最後一顆佔整列）、間距縮小，每顆仍 ≥48px；一般立繪再往上移 8vh（頭頂還在畫面裡）。
   Stella（.tall，頭頂有星冠）跟 B-2 一樣只推 1vh，靠兩欄選項讓出空間 */
@media (max-width:700px) and (max-height:700px){
  #choices:not(.choice-grid){display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px;}
  #choices:not(.choice-grid) button{min-width:0;padding:2px 8px;line-height:1.25;font-size:.92em;}
  #choices:not(.choice-grid) button:last-child:nth-child(odd){grid-column:1 / -1;}
  body.busy:has(#choices button) .portrait{bottom:8vh;}
  body.busy:has(#choices button) .portrait.tall{bottom:1vh;}
}
/* 第六階段 D-2（Codex 試玩 B1）：手機的行程按鈕列（清單模式）原本一排 7 顆、每顆 46×34，太小。
   改成兩排：基本 7 顆四欄、解鎖進階後（最多 12 顆）六欄，每顆至少 48px 高（375 寬時 84×48／55×48）；行程區跟著變高 */
@media (max-width:700px){
  #sched-buttons{grid-template-columns:repeat(4,1fr);gap:4px;}
  #sched-buttons.many{grid-template-columns:repeat(6,1fr);gap:4px;}
  .sched-btn,#sched-buttons.many .sched-btn{min-height:48px;}
  #game:not(.map-view):not(.tab-stats){--panel-h:362px;} /* 能力分頁照舊 322 */
  #game:not(.map-view):not(.tab-stats):has(#partner-row:not([hidden])){--panel-h:386px;} /* 選了和夥伴出去：多一列選人，確定鍵不被切掉 */
  .map-hint button{min-height:48px;} .sc-auto{min-height:48px;} /* 地圖圖例〔知道了〕、月初卡〔自動抽籤〕 */
}
/* 第六階段 D-3（pt7 Q3）：本月清單〔換方針〕（方針能力 100 才出現），選項沿用年底卡的 .focus-opts */
.list-focus{display:block;min-height:48px;padding:2px 16px;margin:4px 0;}
.list-dir .focus-opts{margin:2px 0 6px;}
/* 第六階段 D-10（pt7）：375 的企畫邀請卡最後一行（時間成本那句）貼著卡片底邊——邀請時下面沒有黏底按鈕列，補一點底部留白 */
@media (max-width:700px){ #start-panel.pj-ask{padding-bottom:8px;gap:2px;} #start-panel.pj-ask .sp-note{line-height:1.3;} }
/* 第六階段 D-10（Codex #8）：375 的指揮方針名稱不再折成「千錘百／鍊」：手機上烏鴉在上、四個字一行；卡片底下還有東西時黏底提示 */
@media (max-width:700px){ .mg-dir{flex-direction:column;gap:0;padding:2px 4px;line-height:1.2;} .mg-dir span{white-space:nowrap;} }
.mg-more{position:sticky;bottom:-1px;margin:4px -14px -12px;padding:4px 0 6px;font-size:.8em;text-align:center;pointer-events:none;
  background:linear-gradient(rgba(244,236,225,0),#f4ece1 45%);color:#5c3a21;}
.mg-more[hidden]{display:none;}
/* 第六階段 D-10（pt7）：手機的月初／月底卡（含年底封面）一打開就出現，立繪還在往上滑（.25s），會短暫蓋到臉。
   卡片等立繪滑完（.25s）再淡入；月曆封面的翻頁跟著晚 .25s，封面還看得到 */
@media (max-width:700px){
  #month-modal:not([hidden]) #month-panel,#start-modal:not([hidden]) #start-panel{animation:cardIn .18s ease-out .25s both;}
  .cal-page.flip{animation-delay:.5s;}
}
@keyframes cardIn{from{opacity:0;}to{opacity:1;}}
/* 第六階段 E-2（pt8 Q3／Codex 試玩 2 B1）：手機清單模式的選夥伴按鈕也要 ≥48px（原本 53×26）。
   選人列變高 22px，再加上原本就超出的 15px（三旬都有 ✦×2 時面板要捲、確定鍵底邊超出視窗 2px）：選人時行程區 386→424 */
@media (max-width:700px){
  #partner-row button{min-height:48px;padding:3px 12px;}
  #game:not(.map-view):not(.tab-stats):has(#partner-row:not([hidden])){--panel-h:424px;}
}
/* 第六階段 E-5（Codex 試玩 2 B3）：現在的排法沒照建議時，✦×2 改成淡色的「照建議才×2」（不是已經加倍）；手機也照樣顯示整句 */
.great-hint.off{color:#7a6448;font-weight:normal;opacity:.85;}
@media (max-width:700px){ .great-hint.off{font-size:.6em;margin-left:1px;} }
/* 手機（第六階段 E-5）：卡片只有 79px 寬，提示放在旬名那一行會折成第二行（三旬都有時面板要捲、確定鍵底邊出框 2px），
   「照建議才×2」也會被切掉。改成貼在卡片右上角的小籤，不佔高度 */
@media (max-width:700px){
  .slot .great-hint{position:absolute;right:2px;top:-6px;margin:0;font-size:10px;line-height:14px;padding:0 3px;border-radius:6px;background:#fdf6e9;box-shadow:0 0 0 1px rgba(184,134,11,.35);}
  .slot .great-hint.off{letter-spacing:-.02em;box-shadow:0 0 0 1px rgba(122,100,72,.25);}
}
/* 第六階段 E-6（pt8 Q1）：桌面左欄的「下個事件」提示欄寬只有 134px，一行放不下會把好感門檻切掉。
   第一行「Kuu 下個事件：好感 60」，提示折到第二行（太長才用…） */
.hn{white-space:normal;margin-bottom:2px;}
.hn .hn-hint{display:block;padding-left:1em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.9;}
/* 第六階段 E-13 */
/* pt8 Q6：桌面本月清單展開〔換方針〕後可能比畫面高：最高到視窗高 − 16px，超過就在清單裡捲 */
@media (min-width:701px){ .list-pop{max-height:calc(100vh - 16px);} }
/* pt8 Q7：寬桌面（≥1280）的烏鴉建議泡泡字太小（12px）、太窄：行程區加寬到 680、泡泡字 13px */
@media (min-width:1280px){ :root{--dock-w:min(680px, 52vw);} .slot-advice{font-size:13px;} }
/* Codex 試玩 2 C3：月底／年底卡的「▼ 往下還有」（跟小遊戲卡同一款），貼在底列上方 */
.month-foot{position:relative;}
.month-more{position:absolute;left:0;right:0;bottom:100%;padding:6px 0 2px;font-size:.8em;text-align:center;pointer-events:none;
  background:linear-gradient(rgba(244,236,225,0),#f4ece1 55%);color:#5c3a21;}
.month-more[hidden]{display:none;}
