/* 圖文新手教學／地圖導覽／情境提示卡／景點小卡／旅遊護照（1002，cityTutorial.js、cityPassport.js）
   手帳＋郵戳＋車票語彙；像素小圖 pixelated、教學插圖（高解析 webp）auto。單屏免捲動。
   字型只用變數（字體 agent 定義 --font-display／--font-body／--font-num），後備系統字。 */
:root { --tut-paper:#fff8e9; --tut-ink:#302e27; --tut-line:#d8c7a3; --tut-gold:#c6a763; --tut-red:#b74d43; --tut-green:#356c61;
  --tut-fd:var(--font-display, "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif);
  --tut-fb:var(--font-body, "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif);
  --tut-fn:var(--font-num, "Arial Rounded MT Bold", "Segoe UI Black", "Microsoft JhengHei", sans-serif); }

/* ---- 共用：#helpDialog 當容器，舊子元素隱藏 ---- */
#helpDialog.tut-host > :not(.tut-root) { display:none !important; }
#helpDialog.tut-cards { width:min(900px, 96vw); max-width:none; height:min(900px, calc(100dvh - 20px)); max-height:none; padding:0; border:0; background:transparent; overflow:visible; }
#helpDialog.tut-cards::backdrop { background:#2a201899; backdrop-filter:blur(2px); }
#helpDialog.tut-tour { position:fixed; inset:0; margin:0; width:100vw; height:100dvh; max-width:none; max-height:none; padding:0; border:0; background:transparent; overflow:hidden; }
#helpDialog.tut-tour::backdrop { background:transparent; }
.tut-root img { image-rendering:pixelated; }

/* ---- 1. 翻頁卡片＝旅行手帳一頁 ---- */
#helpDialog.tut-cards .tut-root { position:relative; box-sizing:border-box; height:100%; color:var(--tut-ink); font-family:var(--tut-fb); border-radius:16px 18px 18px 16px;
  display:flex; flex-direction:column; gap:8px; padding:12px 16px 12px 22px; overflow:hidden;
  background-color:#fbf3df;
  background-image:
    radial-gradient(120% 90% at 50% 40%, #0000 60%, #b0884a26 100%),
    linear-gradient(90deg, #a07a4a33 0 2px, #0000 2px 8px, #ffffff66 8px 9px, #0000 9px),
    repeating-linear-gradient(0deg, #0000 0 23px, #d9c49a40 23px 24px),
    repeating-linear-gradient(90deg, #0000 0 23px, #d9c49a2a 23px 24px);
  box-shadow:0 22px 60px #000a, 0 0 0 1px #c9b083, inset 0 0 0 4px #fbf3df, inset 0 0 0 5px #e1cfa6; }
/* 左側手帳裝訂：一排打孔 */
#helpDialog.tut-cards .tut-root::before { content:""; position:absolute; left:7px; top:18px; bottom:18px; width:7px;
  background:radial-gradient(circle at 50% 50%, #6e5638 0 2.5px, #d8c39b 3px 3.5px, #0000 4px) 0 0 / 7px 28px repeat-y; opacity:.7; pointer-events:none; }
.tut-head { display:flex; align-items:center; gap:10px; min-height:32px; }
.tut-ticket { background:var(--tut-red); color:#fff; font:800 14px/1 var(--tut-fd); padding:6px 16px 6px 10px; letter-spacing:.12em;
  clip-path:polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%); box-shadow:inset 0 -2px 0 #0002; }
.tut-count { font:700 14px/1 var(--tut-fn); color:#9a865f; font-variant-numeric:tabular-nums; letter-spacing:.06em; }
.tut-close { margin-left:auto; background:#fffaf0; border:2px solid #cdb98f; border-radius:999px; font:800 14px/1 var(--tut-fb); padding:7px 12px; cursor:pointer; color:var(--tut-ink); box-shadow:0 2px 0 #cdb98f; }
.tut-viewport { overflow:hidden; touch-action:pan-y; flex:1 1 auto; min-height:0; perspective:1600px; }
.tut-track { display:flex; transition:transform .35s cubic-bezier(.2,.8,.2,1); height:100%; }
.tut-card { flex:0 0 100%; box-sizing:border-box; display:flex; flex-direction:column; gap:10px; min-width:0; min-height:0; height:100%; user-select:none; padding:6px 4px 2px; transform-origin:0 50%; overflow:hidden; }
.tut-card.turn-next { animation:tutTurnNext .55s cubic-bezier(.25,.8,.3,1) both; }
.tut-card.turn-prev { animation:tutTurnPrev .55s cubic-bezier(.25,.8,.3,1) both; transform-origin:100% 50%; }
@keyframes tutTurnNext { 0% { transform:rotateY(-70deg); opacity:.15; filter:brightness(.8); } 55% { opacity:1; } 100% { transform:none; filter:none; } }
@keyframes tutTurnPrev { 0% { transform:rotateY(70deg); opacity:.15; filter:brightness(.8); } 55% { opacity:1; } 100% { transform:none; filter:none; } }

/* 拍立得插圖：容器量尺寸，相框寬＝min(可用寬, 可用高換算)，不留空也不裁到 */
.tut-art { flex:1 1 auto; min-height:0; container-type:size; display:grid; place-items:center; }
.tut-photo { --pad:9px; --cap:40px; --ar:1.75; position:relative; margin:0; box-sizing:border-box; width:min(calc(100cqw - 28px), calc((100cqh - var(--cap) - var(--pad) - 14px) * var(--ar) + 2 * var(--pad)));
  padding:var(--pad) var(--pad) 0; background:#fffdf8; border-radius:3px; transform:rotate(var(--tilt, -1deg));
  box-shadow:0 1px 0 #e8dcc2, 0 8px 18px #5a3f1f40, 0 2px 4px #5a3f1f30; }
.tut-shot { aspect-ratio:var(--ar); overflow:hidden; background:#3a2e24; box-shadow:inset 0 0 0 1px #0002; }
.tut-scene { width:100%; height:100%; object-fit:cover; display:block; image-rendering:auto !important; -webkit-user-drag:none; pointer-events:none; }
.tut-cap { height:var(--cap); display:flex; align-items:center; justify-content:center; gap:6px; overflow:hidden; }
.tut-tag { font:800 18px/1 var(--tut-fd); color:#8a6b4a; letter-spacing:.06em; transform:rotate(-1.5deg); }
.tut-tape { position:absolute; top:-11px; width:88px; height:24px; background:#f2b8a8c0; box-shadow:0 1px 2px #0002; pointer-events:none; z-index:2;
  clip-path:polygon(0 8%, 6% 0, 12% 10%, 18% 0, 82% 0, 88% 10%, 94% 0, 100% 8%, 100% 92%, 94% 100%, 88% 90%, 82% 100%, 18% 100%, 12% 90%, 6% 100%, 0 92%);
  background-image:repeating-linear-gradient(45deg, #ffffff40 0 6px, #0000 6px 12px); }
.tut-tape.a { left:-14px; transform:rotate(-32deg); }
.tut-tape.b { right:-14px; transform:rotate(30deg); background-color:#9fd0c2c0; }
.tut-lvls { display:flex; align-items:center; gap:6px; }
.tut-lvl { display:flex; align-items:flex-end; gap:3px; padding:1px 6px 1px 3px; border-radius:7px; border:3px solid var(--lv); background:#fff; height:32px; box-sizing:border-box; }
.tut-lvl img { height:26px; width:auto; image-rendering:auto; } .tut-lvl b { font:900 13px/1 var(--tut-fn); }
.tut-lvl-to { font-style:normal; color:#b59b6c; font-weight:900; }
.tut-cast { display:flex; gap:4px; align-items:center; }
.tut-mug { width:30px; height:30px; border-radius:50%; overflow:hidden; display:grid; place-items:center; background:#fff; border:2px solid var(--pc); box-sizing:border-box; font-size:12px; font-weight:800; color:var(--pc); }
.tut-mug img { width:100%; height:100%; object-fit:cover; object-position:50% 18%; image-rendering:auto; }

/* 下半部 */
.tut-body { flex:0 0 auto; display:flex; flex-direction:column; gap:8px; padding:0 4px; }
.tut-hd { display:flex; align-items:center; gap:16px; min-width:0; }
.tut-mark { flex:0 0 auto; width:54px; height:54px; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; line-height:1;
  color:var(--tut-red); border:3px double var(--tut-red); background:radial-gradient(circle, #fff9ee 58%, #0000 60%); box-shadow:0 0 0 2px #fbf3df, 0 0 0 3px #b74d4366; transform:rotate(-10deg);
  font-family:var(--tut-fn); position:relative; }
.tut-mark::after { content:""; position:absolute; left:calc(100% - 12px); top:-8px; width:22px; height:14px; transform:rotate(12deg);
  background:repeating-linear-gradient(0deg, #b74d43aa 0 2px, #0000 2px 5px); -webkit-mask:radial-gradient(10px 6px at 50% 50%, #000 98%, #0000) 0 0 / 100% 100%; opacity:.8; }
.tut-mark small { font-size:12px; font-weight:800; letter-spacing:.08em; } .tut-mark b { font-size:24px; font-weight:900; }
.tut-card.on .tut-mark { animation:tutStamp .45s cubic-bezier(.3,1.6,.5,1) .1s both; }
@keyframes tutStamp { 0% { transform:rotate(-30deg) scale(1.8); opacity:0; } 100% { transform:rotate(-10deg) scale(1); opacity:1; } }
.tut-title { margin:0; font:900 30px/1.15 var(--tut-fd); letter-spacing:.03em; color:#2b241c; text-shadow:0 2px 0 #fff; min-width:0; }
.tut-lines { margin:0; display:flex; flex-direction:column; gap:2px; font-size:18px; line-height:1.45; color:#4a4030; }
.tut-line { display:block; }
.tut-lines mark { color:#7a2e1f; font-weight:900; background:linear-gradient(transparent 52%, #ffd95c 52% 92%, transparent 92%); padding:0 2px; border-radius:2px; }
.tut-chips { display:flex; gap:12px; padding:4px 2px 6px; filter:drop-shadow(0 2px 0 #d2bd93) drop-shadow(0 5px 6px #5a3f1f30); } /* 票根用 mask 打孔，陰影改在外層 */
.tut-stub { --tone:#356c61; --tint:#e3f0ea; position:relative; flex:1 1 0; min-width:0; max-width:220px; display:flex; align-items:stretch; background:#fffdf7; border-radius:8px;
  transform:rotate(var(--r, 0deg));
  -webkit-mask:radial-gradient(circle 6px at 44px 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 6px at 44px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask:radial-gradient(circle 6px at 44px 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 6px at 44px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; }
.tut-stub.good { --tone:#2f7a4a; --tint:#e2f2e3; } .tut-stub.warn { --tone:#c06a1e; --tint:#fcebd6; } .tut-stub.bad { --tone:#a03630; --tint:#f8e0dc; } .tut-stub.gold { --tone:#9a6a00; --tint:#fff1c2; }
.tut-stub-ic { flex:0 0 44px; display:grid; place-items:center; background:var(--tint); border-right:2px dashed color-mix(in srgb, var(--tone) 45%, #fff); }
.tut-px { width:24px; height:24px; object-fit:contain; } .tut-px.px32 { width:32px; height:32px; }
.tut-glyph { font:900 22px/1 var(--tut-fd); color:var(--tone); }
.tut-stub-t { display:flex; flex-direction:column; justify-content:center; gap:2px; padding:6px 10px 6px 9px; min-width:0; }
.tut-stub-t b { font:900 24px/1.05 var(--tut-fn); color:var(--tone); font-variant-numeric:tabular-nums; white-space:nowrap; letter-spacing:-.01em; }
.tut-stub-t small { font-size:13px; line-height:1.2; color:#7d705a; font-weight:700; }
.tut-card.on .tut-stub { animation:tutPop .5s cubic-bezier(.3,1.7,.5,1) both; animation-delay:calc(.2s + var(--i) * .12s); }
@keyframes tutPop { 0% { transform:rotate(calc(var(--r) - 14deg)) scale(.3); opacity:0; } 100% { transform:rotate(var(--r)) scale(1); opacity:1; } }

/* 底列：上一張／小火車進度／下一張 */
.tut-nav { display:flex; align-items:center; gap:12px; min-height:48px; }
.tut-nav > button { font:800 16px/1 var(--tut-fb); padding:0 16px; height:44px; border-radius:10px; border:2px solid #c8baa0; background:#fff; cursor:pointer; color:var(--tut-ink); flex:0 0 auto; box-shadow:0 3px 0 #c8baa0; display:inline-flex; align-items:center; gap:6px; }
.tut-nav > button:disabled { opacity:.35; cursor:default; }
.tut-arrow { font-size:20px; line-height:1; }
.tut-nav .primary { background:var(--tut-red); border-color:#8f3a32; color:#fff; box-shadow:0 3px 0 #7a2f28; min-width:116px; justify-content:center; }
.tut-nav .primary::after { content:"›"; font-size:20px; }
.tut-nav .primary.go::after { content:""; }
.tut-nav .primary.go { background:#2f7a4a; border-color:#215a35; box-shadow:0 3px 0 #1c4a2c; }
.tut-rail { --p:0; --stop:26px; position:relative; flex:1 1 auto; min-width:0; height:48px; margin:0 18px; }
.tut-rail::before { content:""; position:absolute; left:calc(var(--stop) / 2); right:calc(var(--stop) / 2); top:35px; height:8px; transform:translateY(-50%);
  background:linear-gradient(#6b5236 0 2px, #0000 2px 6px, #6b5236 6px 8px), repeating-linear-gradient(90deg, #a58a62 0 3px, #0000 3px 9px); border-radius:2px; }
.tut-stops { position:absolute; inset:auto 0 0 0; height:26px; display:flex; justify-content:space-between; bottom:0; }
.tut-stop { width:var(--stop); height:var(--stop); padding:0; border-radius:50%; border:2px solid #c6a763; background:#fffaf0; cursor:pointer; display:grid; place-items:center; position:relative; z-index:1;
  font:800 12px/1 var(--tut-fn); color:#a08a60; transition:transform .2s; }
.tut-stop.done { background:#fff; border:2px solid var(--tut-red); color:var(--tut-red); transform:rotate(var(--r)); box-shadow:inset 0 0 0 2px #fff, inset 0 0 0 3px #b74d4388; }
.tut-stop[aria-current="true"] { background:var(--tut-gold); border-color:#8a6a2a; color:#fff; transform:scale(1.12); }
.tut-train { position:absolute; top:0; left:calc(var(--stop) / 2 + var(--p) * (100% - var(--stop))); width:64px; height:32px; transform:translate(-50%, 0); transition:left .6s cubic-bezier(.4,.1,.3,1); z-index:2; pointer-events:none; filter:drop-shadow(0 2px 0 #0003); }
.tut-train.back { transform:translate(-50%, 0) scaleX(-1); }
.tut-train.hop { animation:tutChug .6s ease-in-out; }
@keyframes tutChug { 0%, 100% { margin-top:0; } 25% { margin-top:-3px; } 50% { margin-top:0; } 75% { margin-top:-2px; } }
.tut-stops, .tut-rail::before { pointer-events:auto; }
.tut-rail .tut-stops { top:auto; }

/* 桌面寬螢幕：大字 */
@media (min-width:1000px) and (min-height:900px) { .tut-title { font-size:34px; } .tut-lines { font-size:20px; } .tut-stub-t b { font-size:27px; } .tut-stub-t small { font-size:14px; }
  .tut-stub-ic { flex-basis:52px; } .tut-px, .tut-px.px32 { width:32px; height:32px; } .tut-glyph { font-size:26px; } .tut-stub { max-width:250px; }
  .tut-stub { -webkit-mask:radial-gradient(circle 6px at 52px 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 6px at 52px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; mask:radial-gradient(circle 6px at 52px 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 6px at 52px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; }
  .tut-mark { width:60px; height:60px; } .tut-mark b { font-size:27px; } }
/* 中等（820×680 等）：字稍小 */
@media (max-height:760px) {
  .tut-title { font-size:24px; } .tut-lines { font-size:16px; line-height:1.4; }
  .tut-mark { width:46px; height:46px; } .tut-mark b { font-size:20px; } .tut-mark small { font-size:12px; letter-spacing:0; }
  .tut-stub-t b { font-size:20px; } .tut-photo { --cap:36px; --pad:7px; }
  .tut-card { gap:8px; } .tut-body { gap:6px; }
}
/* 手機直式 */
@media (max-width:700px) {
  #helpDialog.tut-cards { width:calc(100vw - 12px); height:calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  #helpDialog.tut-cards .tut-root { padding:10px 10px 10px 16px; border-radius:14px; gap:6px; }
  #helpDialog.tut-cards .tut-root::before { left:4px; }
  .tut-card { gap:10px; padding:4px 2px 0; }
  .tut-photo { --pad:6px; --cap:38px; --ar:1.3; width:min(calc(100cqw - 18px), calc((100cqh - var(--cap) - var(--pad) - 14px) * var(--ar) + 2 * var(--pad))); }
  .tut-tape { width:62px; height:20px; top:-9px; } .tut-tape.a { left:-10px; } .tut-tape.b { right:-10px; }
  .tut-tag { font-size:16px; }
  .tut-title { font-size:22px; } .tut-hd { gap:10px; }
  .tut-mark { width:44px; height:44px; } .tut-mark b { font-size:19px; } .tut-mark small { font-size:12px; letter-spacing:0; transform:scale(.85); } .tut-mark::after { display:none; }
  .tut-lines { font-size:15px; }
  .tut-chips { gap:7px; padding:4px 0 6px; }
  .tut-stub { flex-direction:column; align-items:stretch; max-width:none;
    -webkit-mask:none; mask:none; }
  .tut-stub-ic { flex:0 0 30px; border-right:0; border-bottom:2px dashed color-mix(in srgb, var(--tone) 45%, #fff); border-radius:8px 8px 0 0; }
  .tut-px.px32 { width:24px; height:24px; image-rendering:auto; }
  .tut-glyph { font-size:18px; }
  .tut-stub-t { padding:5px 6px 6px; align-items:center; text-align:center; }
  .tut-stub-t b { font-size:18px; letter-spacing:-.03em; }
  .tut-stub-t small { font-size:12px; }
  .tut-cast { gap:2px; } .tut-mug { width:28px; height:28px; }
  .tut-nav { gap:8px; }
  .tut-nav > button { padding:0 12px; font-size:15px; }
  .tut-prev-text { display:none; }
  .tut-nav .primary { min-width:96px; }
  .tut-rail { --stop:20px; margin:0 12px; }
  .tut-stop { font-size:12px; pointer-events:none; }
  .tut-stop span { display:none; } .tut-stop[aria-current="true"] span, .tut-stop.done span { display:none; }
  .tut-stop.done::after { content:""; width:8px; height:8px; border-radius:50%; background:var(--tut-red); }
  .tut-train { width:48px; height:24px; top:4px; }
  .tut-rail::before { top:36px; }
}
@media (max-width:700px) and (min-height:760px) {
  .tut-photo { --ar:1; } .tut-title { font-size:24px; } .tut-lines { font-size:16px; } .tut-stub-t b { font-size:20px; } .tut-stub-t small { font-size:13px; }
  .tut-stub-ic { flex-basis:36px; } .tut-px, .tut-px.px32 { width:28px; height:28px; } .tut-mark { width:50px; height:50px; } .tut-mark b { font-size:22px; } .tut-body { gap:9px; }
}
@media (max-width:700px) and (max-height:700px) {
  .tut-title { font-size:20px; } .tut-lines { font-size:14px; line-height:1.4; } .tut-stub-t b { font-size:17px; }
  .tut-photo { --cap:34px; } .tut-card { gap:8px; } .tut-body { gap:5px; }
}
/* 手機橫式（矮）：圖左文右；需壓過 cityUI.css 的 #helpDialog .tut-* 舊規則 */
@media (min-width:701px) and (max-height:500px) {
  #helpDialog.tut-cards { width:min(900px, calc(100vw - 16px - env(safe-area-inset-left) - env(safe-area-inset-right))); height:calc(100dvh - 12px); }
  #helpDialog.tut-cards .tut-root { padding:6px 12px 6px 18px; gap:4px; height:100%; }
  #helpDialog.tut-cards .tut-head { min-height:28px; }
  #helpDialog.tut-cards .tut-ticket { padding:4px 14px 4px 8px; font-size:13px; }
  #helpDialog.tut-cards .tut-close { padding:0 12px; min-height:36px; }
  #helpDialog.tut-cards .tut-card { flex-direction:row; align-items:stretch; gap:14px; padding:2px; }
  #helpDialog.tut-cards .tut-art { flex:0 0 46%; width:auto; height:auto; max-height:none; aspect-ratio:auto; }
  #helpDialog.tut-cards .tut-photo { --pad:6px; --cap:32px; --ar:1.75; }
  #helpDialog.tut-cards .tut-tag { font-size:14px; }
  #helpDialog.tut-cards .tut-tape { width:56px; height:18px; top:-8px; }
  #helpDialog.tut-cards .tut-body { flex:1 1 auto; min-width:0; justify-content:center; gap:6px; overflow:visible; }
  #helpDialog.tut-cards .tut-title { font-size:20px; }
  #helpDialog.tut-cards .tut-mark { width:40px; height:40px; } #helpDialog.tut-cards .tut-mark b { font-size:17px; } #helpDialog.tut-cards .tut-mark small { font-size:12px; transform:scale(.8); letter-spacing:0; } #helpDialog.tut-cards .tut-mark::after { display:none; }
  #helpDialog.tut-cards .tut-lines { font-size:14px; line-height:1.4; }
  #helpDialog.tut-cards .tut-chips { gap:8px; }
  #helpDialog.tut-cards .tut-stub-ic { flex-basis:36px; } 
  #helpDialog.tut-cards .tut-stub { -webkit-mask:none; mask:none; }
  #helpDialog.tut-cards .tut-stub-t { padding:4px 7px; } #helpDialog.tut-cards .tut-stub-t b { font-size:17px; } #helpDialog.tut-cards .tut-stub-t small { font-size:12px; }
  #helpDialog.tut-cards .tut-nav { min-height:44px; }
  #helpDialog.tut-cards .tut-nav > button { height:40px; }
  #helpDialog.tut-cards .tut-rail { height:42px; }
  #helpDialog.tut-cards .tut-train { top:-2px; }
  #helpDialog.tut-cards .tut-rail::before { top:30px; }
  #helpDialog.tut-cards .tut-stop { pointer-events:none; }
  #helpDialog.tut-cards .tut-mug { width:26px; height:26px; }
}
@media (prefers-reduced-motion: reduce) {
  .tut-track, .tut-train, .tut-stop { transition:none !important; }
  .tut-card.turn-next, .tut-card.turn-prev, .tut-card.on .tut-mark, .tut-card.on .tut-stub, .tut-train.hop { animation:none !important; }
}

/* ---- 2. 地圖導覽 ---- */
.tut-tour .tut-root { position:absolute; inset:0; }
.tour-spot { position:fixed; border-radius:12px; box-shadow:0 0 0 9999px #1e160fb8, 0 0 0 3px #ffd400, 0 0 18px 6px #ffd40099; transition:all .35s cubic-bezier(.2,.8,.2,1); pointer-events:none; animation:tourPulse 1.4s ease-in-out infinite; }
@keyframes tourPulse { 50% { box-shadow:0 0 0 9999px #1e160fb8, 0 0 0 5px #ffd400, 0 0 26px 10px #ffd400aa; } }
.tour-bubble { position:fixed; display:flex; gap:10px; align-items:flex-end; background:var(--tut-paper); color:var(--tut-ink); border:2px solid var(--tut-gold); border-radius:14px; padding:10px 12px; box-shadow:0 10px 30px #0007; transition:left .3s, top .3s; }
.tour-bubble::before { content:""; position:absolute; left:var(--ax, 50%); top:-12px; transform:translateX(-50%); border:12px solid transparent; border-top:0; border-bottom-color:var(--tut-gold); }
.tour-bubble.above::before { top:auto; bottom:-12px; border-bottom:0; border-top:12px solid var(--tut-gold); }
.tour-guide { flex:0 0 auto; width:56px; display:grid; place-items:end center; }
.tour-walker { height:72px; width:auto; image-rendering:pixelated; }
.tour-text { display:flex; flex-direction:column; gap:3px; min-width:0; }
.tour-text small { color:#8a7a5c; font-weight:700; } .tour-text b { font-size:20px; } .tour-text p { margin:0; font-size:15px; line-height:1.45; }
.tour-btns { display:flex; gap:8px; justify-content:flex-end; margin-top:4px; flex-wrap:wrap; }
.tour-btns button { font-size:15px; padding:6px 12px; border-radius:9px; border:2px solid #c8baa0; background:#fff; cursor:pointer; font-weight:700; color:var(--tut-ink); }
.tour-btns .primary { background:var(--tut-red); color:#fff; border-color:#8f3a32; box-shadow:0 3px 0 #7a2f28; }
.tour-btns .tour-skip { border-color:transparent; background:none; color:#7d705a; text-decoration:underline; }

/* ---- 3. 情境提示卡（地圖右上角，非阻擋） ---- */
.tut-tip { position:absolute; right:calc(var(--right-w, 0px) + 14px); top:calc(var(--header-h, 0px) + 12px); z-index:25; display:flex; gap:10px; align-items:center; width:min(330px, calc(100% - 28px));
  background:var(--tut-paper); color:var(--tut-ink); border:2px solid var(--tut-gold); border-radius:14px; padding:8px 30px 8px 8px; box-shadow:0 8px 24px #0005; animation:tipIn .35s cubic-bezier(.2,1.4,.4,1); }
.tut-tip.out { opacity:0; transform:translateY(-8px); transition:.25s; }
@keyframes tipIn { from { opacity:0; transform:translateY(-12px) scale(.9); } }
.tut-tip-art { flex:0 0 58px; height:58px; display:grid; place-items:center; background:#fff; border-radius:10px; border:2px dashed #e0cfa8; }
.tut-tip-art img { max-width:52px; max-height:52px; image-rendering:pixelated; }
.tut-tip-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.tut-tip-text small { color:var(--tut-red); font-weight:800; letter-spacing:.08em; }
.tut-tip-text p { margin:0; font-size:15px; line-height:1.4; font-weight:700; }
.tut-tip-more { align-self:flex-start; background:none; border:0; border-bottom:2px solid #c6a763; padding:0; font-size:13px; color:var(--tut-green); cursor:pointer; font-weight:700; }
.tut-tip-close { position:absolute; right:6px; top:4px; background:none; border:0; font-size:20px; line-height:1; color:#8a7a5c; cursor:pointer; padding:2px 4px; }
@media (max-width:700px) { .tut-tip { top:auto; bottom:12px; right:8px; } }

/* ---- 景點小卡（地點資訊頁） ---- */
.spot-card { position:relative; display:flex; gap:8px; align-items:center; margin:6px 0 8px; padding:7px 9px 7px 7px; background:#fffdf6; border:2px solid color-mix(in srgb, var(--ink) 35%, #e4d5b4); border-radius:12px;
  background-image:repeating-linear-gradient(0deg, transparent 0 21px, #efe3c977 21px 22px); }
.spot-lm { flex:0 0 52px; width:52px; height:52px; object-fit:contain; image-rendering:pixelated; background:#fff; border-radius:50%; border:2px dashed color-mix(in srgb, var(--ink) 55%, #fff); padding:2px; }
.spot-text { min-width:0; display:flex; flex-direction:column; gap:4px; }
.spot-fact { margin:0; font-size:14px; line-height:1.4; color:#3c372c; }
.spot-fact.spot-intro { font-weight:700; }
.spot-fact.spot-extra { font-size:13px; color:#6a604d; }
@media (max-width:700px), (max-height:760px) { .spot-fact.spot-extra { display:none; } }
/* 1006：企劃介紹取代長小知識後空間夠，矮桌面也保留打卡梗（壓過 cityUI.css 的 max-height:820 隱藏） */
@media (min-width:701px) and (min-height:640px) { #infoBody .spot-card .spot-quip { display:inline; } }
/* 1006：局終每人一句角色台詞（cityMain showResults，shared/quips_v2.json） */
#results .person-text small.result-quip { display:block; margin-top:2px; color:#7a5a3a; font-family:var(--font-display); font-weight:700; white-space:normal; line-height:1.3; }
@media (max-height:500px) { #results .person-text small.result-quip { display:none; } }
.spot-meta { display:flex; flex-wrap:wrap; gap:4px 8px; align-items:center; font-size:13px; }
.spot-pick { background:var(--ink); color:#fff; border-radius:999px; padding:1px 9px 1px 8px; font-weight:700; }
.spot-pick::before { content:"必吃必買・"; opacity:.85; font-weight:500; }
.spot-quip { color:#7a5a3a; font-weight:700; }
@media (max-width:700px), (max-height:760px) { .spot-card { margin:4px 0; padding:5px 8px; } .spot-fact { font-size:13px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; } .spot-meta { font-size:12px; } }
@media (max-width:700px) { main.info-open .pp-toast, main.info-open .tut-tip { display:none; } }
.spot-stamped { position:absolute; right:6px; top:-9px; background:#fff8e9; color:var(--ink); border:2px solid var(--ink); border-radius:999px; font-size:12px; font-weight:800; padding:0 7px; transform:rotate(6deg); }

/* ---- 旅遊護照 ---- */
.pp-dialog { width:min(920px, 96vw); max-height:96dvh; padding:12px; background:#7b2b26; border:0; border-radius:18px; color:var(--tut-ink); box-shadow:0 18px 50px #0007; overflow:hidden; }
.pp-dialog::backdrop { background:#2a201899; }
.pp-dialog img { image-rendering:pixelated; }
.pp-head { display:flex; align-items:center; gap:10px; color:#fde9c0; padding:0 4px 8px; }
.pp-cover { height:44px; width:auto; filter:drop-shadow(0 2px 2px #0006); }
.pp-who { display:flex; flex-direction:column; line-height:1.15; } .pp-who b { font-size:21px; letter-spacing:.1em; color:#fde9c0; } .pp-who small { font-size:12px; color:#f3d8a8; }
.pp-players { display:flex; gap:6px; margin-left:auto; }
.pp-chip { padding:0; border:0; background:none; cursor:pointer; border-radius:50%; opacity:.6; } .pp-chip.on { opacity:1; transform:scale(1.1); }
.pp-close { background:#fde9c0; color:#5b2a24; border:0; border-radius:9px; font-weight:800; padding:6px 12px; cursor:pointer; font-size:15px; }
.pp-face { width:38px; height:38px; border-radius:50%; overflow:hidden; display:grid; place-items:center; background:#fff; border:3px solid var(--pc); font-weight:800; color:var(--pc); flex:0 0 auto; }
.pp-face img { width:100%; height:100%; object-fit:cover; object-position:50% 18%; }
.pp-spread { display:grid; grid-template-columns:minmax(220px, 34%) 1fr; background:#fbf2dc; border-radius:10px; overflow:hidden; box-shadow:inset 0 0 0 1px #d7c49b; position:relative; }
.pp-spread::after { content:""; position:absolute; top:0; bottom:0; left:min(34%, max(220px, 34%)); width:18px; transform:translateX(-50%); background:linear-gradient(90deg, #0000, #0000001f 45%, #ffffff55 55%, #0000); pointer-events:none; }
.pp-spread.flip-next .pp-stamps { animation:ppFlipNext .38s ease-out; } .pp-spread.flip-prev .pp-stamps { animation:ppFlipPrev .38s ease-out; }
@keyframes ppFlipNext { from { transform:perspective(900px) rotateY(-24deg); transform-origin:left; opacity:.3; } }
@keyframes ppFlipPrev { from { transform:perspective(900px) rotateY(24deg); transform-origin:right; opacity:.3; } }
.pp-page { padding:14px 16px; min-width:0; background-image:repeating-linear-gradient(0deg, transparent 0 25px, #ead9b544 25px 26px); }
.pp-id { display:flex; flex-direction:column; gap:10px; border-right:1px dashed #d7c49b; }
.pp-idrow { display:flex; gap:10px; align-items:center; } .pp-idrow .pp-face { width:56px; height:56px; }
.pp-idrow b { display:block; font-size:20px; }
.pp-title { display:inline-block; margin-top:2px; background:var(--tut-red); color:#fff; font-weight:800; font-size:13px; padding:1px 10px; border-radius:4px; clip-path:polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.pp-count { display:flex; align-items:baseline; gap:4px; } .pp-count strong { font-size:44px; line-height:1; color:var(--tut-red); font-variant-numeric:tabular-nums; } .pp-count span { font-weight:700; color:#7d705a; }
.pp-bars { display:flex; flex-direction:column; gap:6px; }
.pp-bar { display:grid; grid-template-columns:5.2em 1fr auto; align-items:center; gap:8px; background:none; border:0; padding:3px 4px; border-radius:8px; cursor:pointer; font-size:14px; color:var(--tut-ink); text-align:left; }
.pp-bar.on { background:#fff; box-shadow:inset 0 0 0 2px var(--ink); }
.pp-bar i { height:10px; border-radius:6px; background:linear-gradient(90deg, var(--ink) var(--pct), #e8dcc0 var(--pct)); }
.pp-bar small { font-variant-numeric:tabular-nums; color:#7d705a; }
.pp-stamps { display:flex; flex-direction:column; gap:8px; }
.pp-region { display:flex; align-items:baseline; gap:10px; } .pp-region b { font-size:20px; color:var(--ink); } .pp-region small { color:#7d705a; }
.pp-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:8px 6px; align-content:start; }
.pp-stamp { display:flex; flex-direction:column; align-items:center; gap:2px; text-align:center; min-width:0; }
.pp-ring { width:74px; height:74px; border-radius:50%; display:grid; place-items:center; border:3px dashed #cdbb94; background:#fff6; transform:rotate(var(--rot)); }
.pp-ring img { max-width:58px; max-height:58px; filter:grayscale(1) opacity(.22); }
.pp-stamp b { font-size:13px; line-height:1.2; color:#9a8b6d; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.pp-stamp small { font-size:12px; color:#a99a7a; }
.pp-stamp.on .pp-ring { border:4px double var(--ink); background:radial-gradient(circle, #fff 55%, color-mix(in srgb, var(--ink) 18%, #fff) 56%); box-shadow:0 0 0 2px #fbf2dc, 0 0 0 4px color-mix(in srgb, var(--ink) 55%, transparent); animation:ppStamp .4s cubic-bezier(.3,1.6,.5,1) both; }
.pp-stamp.on .pp-ring.temple { border-color:var(--tut-red); }
.pp-stamp.on .pp-ring img { filter:none; }
.pp-stamp.on b { color:var(--ink); } .pp-stamp.on small { color:#6f6250; }
@keyframes ppStamp { from { transform:rotate(var(--rot)) scale(1.4); opacity:0; } }
.pp-nav { display:flex; align-items:center; justify-content:space-between; margin-top:auto; }
.pp-nav button { background:#fff; border:2px solid #d7c49b; border-radius:9px; padding:5px 12px; font-weight:700; cursor:pointer; color:var(--tut-ink); font-size:15px; }
.pp-nav button:disabled { opacity:.35; }
@media (max-width:700px) {
  .pp-dialog { padding:8px; }
  .pp-head { flex-wrap:wrap; gap:6px; } .pp-cover { height:34px; } .pp-who b { font-size:18px; } .pp-players { order:3; width:100%; justify-content:center; margin:0; } .pp-face { width:34px; height:34px; }
  .pp-spread { grid-template-columns:1fr; } .pp-spread::after { display:none; }
  .pp-id { border-right:0; border-bottom:1px dashed #d7c49b; padding:8px 10px; gap:6px; display:grid; grid-template-columns:auto 1fr; align-items:center; }
  .pp-idrow .pp-face { width:42px; height:42px; } .pp-count strong { font-size:30px; }
  .pp-bars { grid-column:1 / -1; flex-direction:row; flex-wrap:wrap; gap:4px; }
  .pp-bar { grid-template-columns:auto 26px auto; font-size:12px; gap:4px; padding:2px 5px; }
  .pp-page.pp-stamps { padding:8px 10px; }
  .pp-grid { grid-template-columns:repeat(4, 1fr); gap:6px 4px; }
  .pp-ring { width:60px; height:60px; } .pp-ring img { max-width:46px; max-height:46px; }
  .pp-stamp b { font-size:12px; } .pp-stamp small { font-size:12px; }
}

/* 玩家分頁的護照按鈕 */
.pp-open { display:flex; align-items:center; gap:8px; width:100%; margin:6px 0; padding:5px 10px 5px 6px; background:#fff8e9; border:2px solid #7b2b26; border-radius:10px; cursor:pointer; text-align:left; color:var(--tut-ink); }
.pp-open img { height:34px; width:auto; image-rendering:pixelated; }
.pp-open span { display:flex; flex-direction:column; line-height:1.2; } .pp-open b { font-size:15px; } .pp-open small { font-size:12px; color:var(--tut-red); font-weight:700; }

/* 蓋章提示（地圖左下） */
.pp-toast { position:absolute; left:14px; bottom:calc(var(--footer-h, 0px) + 14px); z-index:24; display:flex; align-items:center; gap:8px; padding:6px 12px 6px 6px; background:#fff8e9; border:2px solid var(--ink); border-radius:999px; box-shadow:0 6px 18px #0004; cursor:pointer; color:var(--tut-ink); animation:tipIn .35s cubic-bezier(.2,1.4,.4,1); }
.pp-toast.out { opacity:0; transform:scale(.9); transition:.3s; }
.pp-toast .pp-ring { width:46px; height:46px; } .pp-toast .pp-ring img { max-width:36px; max-height:36px; image-rendering:pixelated; }
.pp-toast-text { display:flex; flex-direction:column; line-height:1.15; text-align:left; } .pp-toast-text b { color:var(--ink); font-size:15px; } .pp-toast-text small { font-size:12px; }
main.log-open .pp-toast { left:calc(var(--left-w, 0px) + 14px); }
@media (max-width:700px) { .pp-toast { left:8px; bottom:12px; } }

/* 局終：護照收集成果 */
.pp-summary { margin:10px 0; padding:8px 10px; background:#fbf2dc; border-radius:12px; border:2px dashed #d7c49b; }
.pp-summary h3 { margin:0 0 6px; font-size:16px; color:#7b2b26; }
.pp-summary-list { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px; }
.pp-summary-row { display:flex; align-items:center; gap:8px; background:#fff; border:2px solid color-mix(in srgb, var(--ink) 45%, #fff); border-radius:10px; padding:4px 8px 4px 4px; cursor:pointer; text-align:left; color:var(--tut-ink); min-width:0; }
.pp-summary-text { display:flex; flex-direction:column; min-width:0; } .pp-summary-text b { font-size:14px; }
.pp-summary-row strong { margin-left:auto; font-size:18px; color:var(--ink); }
@media (max-width:520px) { .pp-summary-list { grid-template-columns:1fr; } }
/* 1020 晚：教學卡上的圖鑑入口 */ .tut-books { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; } #helpDialog .tut-book { min-height:32px; padding:3px 12px; font:800 14px var(--font-display); color:#3b2417; background:#fff7e0; border:2px solid #3b2417; border-radius:999px; box-shadow:0 2px 0 #3b2417; cursor:pointer; } #helpDialog .tut-book::after { content:" ›"; } @media (max-height:500px) { .tut-books { margin-top:2px; } #helpDialog .tut-book { min-height:28px; font-size:12px; padding:1px 10px; } }
