/* 台南政策島：配色沿用官網（深綠 #176b38、桃紅 #e04a67） */
:root {
  --green: #176b38;
  --green-2: #237641;
  --pink: #e04a67;
  --pink-2: #d93f72;
  --ink: #1f2421;
  --muted: #5d665f;
  --paper: #fffdf8;
  --cream: #fff8f1;
  --line: #e8e1d5;
  --yellow: #fcea8b;
  --shadow: 0 1px 0 #fff inset, 0 2px 6px rgba(40, 30, 20, .08), 0 18px 48px rgba(40, 30, 20, .14);
  --radius: 18px;
  --side-w: 318px;
  --card-w: 340px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --font: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 20%, #fffdf9 0%, #f3e9dc 60%, #e9dccb 100%);
  color: var(--ink);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  overscroll-behavior: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow {
  font: 700 10px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 2px;
  color: var(--pink);
  text-transform: uppercase;
}

#app { position: fixed; inset: 0; overflow: hidden; }
#stage { position: absolute; inset: 0; touch-action: none; -webkit-user-select: none; user-select: none; }
#stage canvas { display: block; width: 100%; height: 100%; outline: none; }
/* z-index 建立獨立堆疊層：CSS2DRenderer 給每個標籤的 z-index 才不會蓋過卡片與抽屜 */
.css2d { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }

/* ---------- 品牌卡 ---------- */
.brand {
  position: absolute;
  top: calc(14px + var(--safe-t));
  left: calc(14px + var(--safe-l));
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  background: rgba(255, 252, 246, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(60, 40, 20, .12);
}
.brand-logo { display: block; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: #fff; flex: none; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; display: block; }
.brand-text h1 { margin: 0; font-size: 21px; letter-spacing: 2px; color: var(--green); line-height: 1.15; }
.brand-text p { margin: 2px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 1px; }
.brand-who { color: var(--pink); }

.hero-note {
  position: absolute;
  top: calc(96px + var(--safe-t));
  left: calc(14px + var(--safe-l));
  z-index: 3;
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 330px;
  padding: 10px 14px;
  background: rgba(255, 252, 246, .78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(60, 40, 20, .1);
  transition: opacity .3s;
}
.hero-num { font: italic 700 40px/1 Georgia, "Times New Roman", serif; color: var(--pink); white-space: nowrap; }
.hero-num small { font-size: 26px; color: var(--green); margin: 0 1px; }
.hero-note h2 { margin: 0; font-size: 16px; line-height: 1.35; color: var(--green); }
.hero-note p { margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
body.has-card .hero-note { opacity: 0; pointer-events: none; }

/* ---------- 工具列 ---------- */
.toolbar {
  position: absolute;
  top: calc(14px + var(--safe-t));
  right: calc(var(--side-w) + 26px + var(--safe-r));
  z-index: 7;
  display: flex;
  gap: 6px;
}
body.side-closed .toolbar { right: calc(14px + var(--safe-r)); }
.toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #fff;
  border-radius: 12px;
  background: rgba(255, 253, 248, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 3px 12px rgba(60, 40, 20, .1);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.toolbar button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toolbar button#btn-tour svg { fill: currentColor; stroke: none; }
.toolbar button.icon-only { padding: 0; width: 44px; justify-content: center; }
.toolbar button[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.mob-only { display: none !important; }

.zoom {
  position: absolute;
  right: calc(var(--side-w) + 26px + var(--safe-r));
  bottom: calc(24px + var(--safe-b));
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.side-closed .zoom { right: calc(14px + var(--safe-r)); }
.zoom button {
  width: 44px; height: 44px;
  border: 1px solid #fff;
  border-radius: 12px;
  background: rgba(255, 253, 248, .92);
  box-shadow: 0 3px 12px rgba(60, 40, 20, .1);
  font-size: 22px; font-weight: 700; line-height: 1;
}

/* ---------- HUD ---------- */
.hud {
  position: absolute;
  bottom: calc(16px + var(--safe-b));
  left: 50%;
  transform: translateX(calc(-50% - var(--side-w) / 2));
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  max-width: 520px;
  transition: opacity .25s;
}
.hud .daybar { order: -2; flex: 0 0 auto; }
.hud::before { content: ""; order: -1; flex-basis: 100%; height: 0; }
body.touring .hud { opacity: 0; pointer-events: none; }
body.side-closed .hud { transform: translateX(-50%); }
/* 卡片開著時，置中在卡片右側的可用區域 */
body.has-card .hud { transform: translateX(calc(-50% + (var(--card-w) + 14px) / 2 - var(--side-w) / 2)); }
body.has-card.side-closed .hud { transform: translateX(calc(-50% + (var(--card-w) + 14px) / 2)); }
.seg {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 253, 248, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 3px 12px rgba(60, 40, 20, .1);
}
.seg button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 2px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}
.seg button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.seg button.on, .seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.daybar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 253, 248, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 3px 12px rgba(60, 40, 20, .1);
  font-size: 13px;
  font-weight: 700;
}
.daybar output { font: italic 700 17px/1 Georgia, serif; color: var(--green); }
.daybar .eyebrow { color: var(--muted); letter-spacing: 1px; }

/* ---------- 側欄清單 ---------- */
.sidebar {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  width: calc(var(--side-w) + var(--safe-r));
  padding-right: var(--safe-r);
  display: flex;
  flex-direction: column;
  background: rgba(255, 252, 246, .93);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-left: 1px solid rgba(255, 255, 255, .9);
  box-shadow: -12px 0 40px rgba(60, 40, 20, .08);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
body.side-closed .sidebar { transform: translateX(105%); }
.side-head { position: relative; padding: calc(24px + var(--safe-t)) 20px 12px; }
.side-head h2 { margin: 8px 0 6px; font-size: 22px; line-height: 1.3; color: var(--green); }
.side-head p { margin: 0 0 12px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.side-close { position: absolute; top: calc(14px + var(--safe-t)); right: 12px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: #f1ebe1; font-size: 16px; }
.search {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 16px; /* 16px 以上 iOS 才不會自動放大 */
  outline: none;
}
.search:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 107, 56, .15); }
.side-tabs { display: flex; gap: 6px; margin-top: 10px; }
.side-tabs button {
  flex: 1;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}
.side-tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tree { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px 16px; -webkit-overflow-scrolling: touch; }
.side-foot { display: flex; justify-content: space-between; gap: 8px; padding: 10px 20px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.side-foot a { font-weight: 700; text-decoration: none; }

.t-isl { border-bottom: 1px solid #efe8dc; }
.t-isl > summary {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: 6px 6px;
  list-style: none;
  cursor: pointer;
  border-radius: 12px;
}
.t-isl > summary::-webkit-details-marker { display: none; }
.t-isl.sel > summary { background: var(--t, #f6f1e8); box-shadow: inset 3px 0 0 var(--c); }
.t-num { font: italic 700 26px/1 Georgia, serif; color: var(--c); }
.t-name b { display: block; font-size: 15px; }
.t-name small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.t-count { font-size: 11px; color: var(--muted); }
.t-items { margin: 0 0 10px; padding: 0 0 0 10px; list-style: none; }
.t-items button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.35;
}
.t-items button.sel { background: var(--t, #f6f1e8); }
.t-items i { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font: 700 11px/1 var(--font); font-style: normal; }
.t-flow {
  display: block;
  width: 100%;
  padding: 10px 10px;
  margin: 6px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
}
.t-flow .route { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; font-weight: 700; }
.t-flow p { margin: 6px 0 0; font-size: 13px; line-height: 1.45; }
.t-empty { padding: 24px 10px; color: var(--muted); font-size: 13px; text-align: center; }
mark { background: #fff1a8; color: inherit; padding: 0 1px; border-radius: 3px; }

/* ---------- 詳細卡片 ---------- */
.card {
  position: absolute;
  top: calc(84px + var(--safe-t));
  left: calc(14px + var(--safe-l));
  bottom: auto;
  z-index: 9;
  width: var(--card-w);
  max-height: calc(100% - 104px - var(--safe-t) - var(--safe-b));
  display: flex;
  flex-direction: column;
  background: #fffdf9; /* 不透明：背後的 3D 標籤才不會透出來 */
  border: 1px solid #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
  animation: card-in .28s cubic-bezier(.2, .8, .2, 1);
}
.card[hidden] { display: none; }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #f3ede3;
  font-size: 22px;
  line-height: 1;
}
#card-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 18px 26px 20px; -webkit-overflow-scrolling: touch; }
.c-head { display: flex; gap: 12px; align-items: flex-start; padding-right: 36px; }
.c-badge { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--t, #f1f1f1); color: var(--c); font: italic 700 24px/1 Georgia, serif; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06); }
.c-badge.round { border-radius: 50%; font: 700 20px/1 var(--font); font-style: normal; color: #fff; background: var(--c); }
.c-title { margin: 4px 0 0; font-size: 21px; line-height: 1.3; }
.c-lead { margin: 14px 0 0; font-size: 16px; font-weight: 700; line-height: 1.55; color: var(--c); }
.c-sub { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.c-quote { margin: 14px 0 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--c); font-size: 14px; line-height: 1.7; color: #4a4f4a; }
.c-quote cite { display: block; margin-top: 4px; font-style: normal; font-size: 11.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(74, 42, 20, .06);
}
button.chip { cursor: pointer; }
.chip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--green)); }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.tag.done { background: #e3f2e6; color: #1e6b37; }
.tag.plan { background: #fff0d9; color: #8a5a12; }
.tag.seek { background: #e6f0fb; color: #22578f; }
.tag.idea { background: #f1ebfa; color: #5b3f93; }
.c-sec { margin: 20px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--muted); }
.c-items { list-style: none; margin: 0; padding: 0; }
.c-items button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin: 0 0 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.c-items .n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--pc, var(--c)); color: #fff; font-size: 12px; }
.c-items .nm { flex: 1; }
.c-items .tag { flex: none; }
.facts { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 14px 0 0; }
.fact { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 14px; background: var(--t, #f6f3ee); font-size: 14.5px; font-weight: 700; line-height: 1.45; }
.fact b { flex: none; font: italic 700 20px/1 Georgia, serif; color: var(--c); }
.c-body { margin: 14px 0 0; font-size: 14.5px; line-height: 1.85; color: #333a35; }
.c-list { margin: 8px 0 0; padding: 12px 14px; border-radius: 14px; background: #faf7f1; }
.c-list h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
.c-list ol, .c-list ul { margin: 0; padding-left: 1.4em; font-size: 13.5px; line-height: 1.75; }
.c-src { margin: 16px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.c-note { margin: 12px 0 0; padding: 9px 12px; border-radius: 12px; background: #fff7e5; font-size: 12.5px; line-height: 1.6; color: #7a5410; }
.c-nav { display: flex; gap: 8px; margin-top: 18px; }
.c-nav button { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 13.5px; font-weight: 700; }
.c-nav button:disabled { opacity: .35; cursor: default; }
.video-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #20302a;
  box-shadow: 0 8px 22px rgba(30, 40, 30, .18);
}
.video-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card .play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .45)); color: #fff; }
.video-card .play span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--pink); font-size: 14px; font-weight: 700; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.video-soon { margin: 16px 0 0; padding: 14px; border-radius: 14px; border: 1px dashed #d8cfc0; color: var(--muted); font-size: 13px; text-align: center; }
.route-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.c-fig { float: right; width: 96px; margin: 0 0 8px 10px; border-radius: 14px; background: #fff; }

/* ---------- 3D 標籤 ---------- */
.isl-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 3px 10px rgba(40, 30, 20, .18);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity .2s, transform .2s, background .2s;
}
.isl-label b { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--c); color: #fff; font: 800 12px/1 var(--font); }
.isl-label.sel { background: var(--ink); color: #fff; border-color: var(--ink); }
.isl-label.dim { opacity: .5; }
.isl-label.compact span { display: none; }
.isl-label.compact { padding-right: 8px; }
.isl-label.gone { opacity: 0; pointer-events: none; }
.region-label { font: italic 800 15px/1 var(--font); letter-spacing: 6px; color: rgba(23, 107, 56, .62); text-shadow: 0 1px 0 rgba(255, 255, 255, .8); pointer-events: none; white-space: nowrap; }
.region-label.river { color: rgba(40, 117, 138, .75); font-size: 13px; letter-spacing: 4px; }
.region-label.sea { color: rgba(40, 90, 120, .55); font-size: 12px; letter-spacing: 3px; }
.pin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 3px;
  border: 2px solid var(--c);
  border-radius: 999px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 3px 10px rgba(40, 30, 20, .16);
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity .2s;
}
.pin i { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font-style: normal; font-size: 12px; }
.pin.sel { background: var(--c); color: #fff; }
.pin.sel i { background: #fff; color: var(--c); }
.pin.compact span { display: none; }
.pin.compact { padding-right: 3px; }
.pin.gone { opacity: 0; pointer-events: none; }
.lit-pin { box-shadow: 0 0 0 4px rgba(252, 234, 139, .85), 0 3px 10px rgba(40, 30, 20, .16); }

/* ---------- 圖例、吉祥物、導覽 ---------- */
.legend {
  position: absolute;
  left: calc(14px + var(--safe-l));
  bottom: calc(76px + var(--safe-b));
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 253, 248, .92);
  box-shadow: 0 3px 12px rgba(60, 40, 20, .1);
  font-size: 12px;
}
.legend[hidden] { display: none; }
.legend i { display: inline-block; width: 26px; height: 0; margin-right: 6px; vertical-align: middle; border-top: 3px solid var(--pink); }
.legend i.dash { border-top-style: dashed; }
body.has-card .legend { left: calc(var(--card-w) + 28px + var(--safe-l)); bottom: auto; top: calc(84px + var(--safe-t)); }
.mascot {
  position: absolute;
  left: calc(14px + var(--safe-l));
  bottom: calc(18px + var(--safe-b));
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 5px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: rgba(255, 253, 248, .92);
  box-shadow: 0 3px 12px rgba(60, 40, 20, .12);
  font-size: 13px;
  font-weight: 700;
}
.mascot img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #fff; }
body.has-card .mascot, body.touring .mascot { opacity: 0; pointer-events: none; }
.tour-caption {
  position: absolute;
  left: 50%;
  bottom: calc(26px + var(--safe-b));
  z-index: 10;
  width: min(620px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 14px 18px 12px;
  border-radius: 18px;
  background: rgba(31, 36, 33, .9);
  color: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}
.tour-caption[hidden] { display: none; }
.tour-caption p { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.55; }
.tour-ctl { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 8px; font-size: 12px; color: #cfd6d1; }
.tour-ctl button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 700; }

/* ---------- 導覽說明、影片、載入 ---------- */
.intro, .video-modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(40, 32, 24, .32);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.intro[hidden], .video-modal[hidden] { display: none; }
.intro-box {
  display: flex;
  gap: 16px;
  align-items: center;
  width: min(480px, 100%);
  padding: 22px 24px 20px 14px;
  border-radius: 24px;
  background: var(--cream);
  box-shadow: var(--shadow);
}
.intro-fig { flex: none; width: 95px; height: auto; border-radius: 16px; background: #fff; }
.intro-body { flex: 1; min-width: 0; }
.intro-box h2 { margin: 8px 0 6px; font-size: 22px; line-height: 1.35; color: var(--green); }
.intro-box p { margin: 0; font-size: 14.5px; line-height: 1.7; color: #4d554f; }
.intro-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.intro-actions button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 700; }
.intro-actions .primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.video-box { width: min(920px, 100%); border-radius: 20px; overflow: hidden; background: #111; box-shadow: var(--shadow); }
.video-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 10px 18px; color: #fff; font-size: 15px; }
.video-head button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-link { display: block; padding: 10px 18px 14px; color: #cfe8d8; font-size: 13px; text-align: right; text-decoration: none; }
.loading {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: radial-gradient(120% 90% at 50% 30%, #fffdf9 0%, #f3e9dc 70%);
  transition: opacity .6s;
}
.loading.done { opacity: 0; pointer-events: none; }
.loading img { width: 120px; height: 120px; mix-blend-mode: multiply; }
.loading h2 { margin: 8px 0 0; font-size: 24px; letter-spacing: 4px; color: var(--green); }
.loading p { margin: 6px 0 0; font-size: 14px; color: var(--muted); text-align: center; line-height: 1.6; padding: 0 20px; }
.loading .load-fallback { margin-top: 14px; font-weight: 700; }
.load-fallback[hidden] { display: none; }
.noscript { position: absolute; inset: 0; z-index: 40; display: grid; place-content: center; text-align: center; background: var(--cream); padding: 24px; }

/* ---------- 中型螢幕 ---------- */
@media (max-width: 1280px) {
  .hero-note { display: none; }
  .seg button span { display: none; }
  .seg button { padding: 2px 6px; }
}
@media (max-width: 1100px) {
  .daybar .eyebrow { display: none; }
  .zoom, body.side-closed .zoom { bottom: auto; top: 50%; transform: translateY(-50%); }
  .toolbar button span { display: none; }
  .toolbar button { padding: 0; width: 44px; justify-content: center; }
}

/* ---------- 手機（≤ 800px） ---------- */
@media (max-width: 800px) {
  :root { --side-w: 0px; }
  .mob-only { display: inline-flex !important; }
  .brand { top: calc(10px + var(--safe-t)); left: calc(10px + var(--safe-l)); padding: 6px 12px 6px 6px; gap: 8px; border-radius: 14px; }
  .brand-logo { width: 40px; height: 40px; border-radius: 10px; }
  .brand-text h1 { font-size: 17px; letter-spacing: 1px; }
  .brand-text p { font-size: 11px; }
  .toolbar { top: calc(10px + var(--safe-t)); right: calc(10px + var(--safe-r)); flex-direction: column; }
  body.side-closed .toolbar { right: calc(10px + var(--safe-r)); }
  .toolbar button { flex-direction: column; gap: 1px; width: 52px; min-height: 52px; padding: 4px 0; font-size: 11px; justify-content: center; }
  .toolbar button span { display: block; }
  .toolbar button.icon-only { width: 52px; }
  .zoom, body.side-closed .zoom { right: calc(10px + var(--safe-r)); bottom: auto; top: calc(10px + var(--safe-t) + 5 * 58px + 8px); transform: none; }
  body.side-closed .zoom { right: calc(10px + var(--safe-r)); }
  .zoom button { width: 52px; height: 46px; }

  .hud {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none !important;
    max-width: none;
    padding: 12px 12px calc(14px + var(--safe-b));
    border-radius: 20px 20px 0 0;
    background: rgba(255, 252, 246, .96);
    box-shadow: 0 -10px 30px rgba(60, 40, 20, .14);
    display: none;
    z-index: 11;
  }
  body.m-time .hud { display: flex; }
  .seg { box-shadow: none; background: #f4eee4; }
  .seg button span { display: block; }
  .hud .daybar { order: -2; width: 100%; justify-content: center; box-shadow: none; background: transparent; padding: 2px 0 4px; }
  .daybar .eyebrow { display: inline; }

  .sidebar {
    top: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 58%;
    height: 58dvh;
    padding-right: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 40px rgba(60, 40, 20, .16);
    transform: translateY(0);
  }
  body.side-closed .sidebar { transform: translateY(105%); }
  .sidebar.full { height: calc(100% - 56px - var(--safe-t)); }
  .side-head { padding: 6px 16px 10px; }
  .side-head h2 { font-size: 19px; margin-top: 4px; }
  .side-close { top: 6px; }
  .side-foot { padding-bottom: calc(10px + var(--safe-b)); }

  .card {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 46%;
    max-height: 46dvh;
    border-radius: 22px 22px 0 0;
    animation: sheet-in .3s cubic-bezier(.2, .8, .2, 1);
  }
  .card.full { max-height: calc(100% - 56px - var(--safe-t)); height: calc(100% - 56px - var(--safe-t)); }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  #card-content { padding: 4px 16px calc(24px + var(--safe-b)); }
  .card-close { top: 8px; }
  .c-title { font-size: 19px; }
  .c-lead { font-size: 15px; }
  .sheet-handle { display: flex !important; justify-content: center; align-items: center; width: 100%; height: 26px; border: 0; background: transparent; flex: none; touch-action: none; }
  .sheet-handle i { display: block; width: 44px; height: 5px; border-radius: 999px; background: #d6cdbf; }

  .legend { bottom: auto; top: calc(66px + var(--safe-t)); left: calc(10px + var(--safe-l)); }
  body.has-card .legend { display: none; }
  .mascot { bottom: calc(14px + var(--safe-b)); left: calc(10px + var(--safe-l)); }
  .mascot span { display: none; }
  .mascot { padding: 4px; }
  body.m-time .mascot, body:not(.side-closed) .mascot { opacity: 0; pointer-events: none; }
  .isl-label { font-size: 12.5px; padding: 4px 10px 4px 5px; }
  .isl-label b { min-width: 22px; height: 20px; font-size: 11px; }
  .pin { font-size: 11.5px; }
  .tour-caption { bottom: calc(14px + var(--safe-b)); }
  .tour-caption p { font-size: 15px; }
  .intro-box { flex-direction: column; text-align: center; padding: 18px 18px 16px; }
  .intro-fig { width: 72px; }
  .intro-actions { justify-content: center; }
}

/* ---------- 橫放手機（高度 ≤ 500px）：右側浮動面板，一次只開一個 ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --side-w: 0px; }
  .mob-only { display: inline-flex !important; }
  .sheet-handle { display: none !important; }
  .hero-note, .legend, .mascot { display: none !important; }
  .brand { top: calc(8px + var(--safe-t)); left: calc(8px + var(--safe-l)); padding: 5px 10px 5px 5px; gap: 6px; border-radius: 12px; }
  .brand-logo { width: 34px; height: 34px; border-radius: 8px; }
  .brand-text h1 { font-size: 15px; letter-spacing: 1px; }
  .brand-text p { font-size: 10.5px; }
  .toolbar, body.side-closed .toolbar { top: calc(8px + var(--safe-t)); right: calc(8px + var(--safe-r)); flex-direction: row; }
  .toolbar button, .toolbar button.icon-only { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .toolbar button span { display: none; }
  .zoom, body.side-closed .zoom { top: auto; bottom: calc(8px + var(--safe-b)); right: calc(8px + var(--safe-r)); flex-direction: row; transform: none; }
  .zoom button { width: 44px; height: 44px; }
  .hud {
    top: auto; left: 0; right: 0; bottom: 0; transform: none !important; max-width: none;
    padding: 6px 10px calc(6px + var(--safe-b)); border-radius: 16px 16px 0 0;
    background: rgba(255, 252, 246, .96); box-shadow: 0 -10px 30px rgba(60, 40, 20, .14);
    display: none; z-index: 11; flex-wrap: nowrap;
  }
  body.m-time .hud { display: flex; }
  .hud::before { display: none; }
  .hud .daybar { order: 0; box-shadow: none; background: transparent; padding: 0 4px; }
  .hud .daybar .eyebrow { display: none; }
  .seg { box-shadow: none; background: #f4eee4; }
  .seg button span { display: none; }
  .sidebar, .card {
    top: calc(60px + var(--safe-t)); bottom: calc(8px + var(--safe-b)); right: calc(8px + var(--safe-r)); left: auto;
    width: min(380px, 48vw); height: auto; max-height: none; border-radius: 18px; border-left: 0;
  }
  .sidebar { padding-right: 0; transform: none; }
  body.side-closed .sidebar { transform: translateX(calc(100% + 24px)); }
  .side-head { padding: 14px 16px 8px; }
  .side-head h2 { font-size: 17px; margin: 4px 0; }
  .side-head p { display: none; }
  .side-close { display: inline-flex !important; top: 8px; }
  .card.full { height: auto; max-height: none; }
  #card-content { padding: 16px 14px 20px 16px; }
  .intro-box { max-height: calc(100% - 16px); overflow: auto; padding: 14px 18px 12px 10px; }
  .intro-fig { width: 70px; }
  .tour-caption { bottom: calc(8px + var(--safe-b)); width: min(520px, calc(100% - 140px)); padding: 10px 14px 8px; }
  .tour-caption p { font-size: 14px; }
}

/* ---------- 滑鼠才有 hover：觸控螢幕點過的按鈕不會一直卡在黃色 ---------- */
@media (hover: hover) {
  .toolbar button:hover { background: var(--yellow); }
  .zoom button:hover { background: var(--yellow); }
  .seg button:hover { background: var(--yellow); color: var(--ink); }
  .t-isl > summary:hover { background: #fbf5ea; }
  .t-flow:hover { border-color: var(--green); }
  button.chip:hover { border-color: var(--c, var(--green)); }
  .c-items button:hover { border-color: var(--c); background: var(--t, #fbf8f2); }
  .c-nav button:hover { border-color: var(--c); }
  .isl-label:hover { transform: translateY(-2px); }
  .t-items button:hover { background: var(--t, #f6f1e8); }
  .fs:hover { opacity: 1; background: rgba(31, 36, 33, .78); }
}

/* ---------- 全螢幕鈕（仿 ai2.html）、提示訊息、導覽提示 ---------- */
.fs {
  position: absolute;
  left: calc(14px + var(--safe-l));
  bottom: calc(18px + var(--safe-b));
  z-index: 6;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  background: rgba(31, 36, 33, .42);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  opacity: .38;
  transition: opacity .25s, background .25s;
}
.fs[hidden] { display: none; }
.fs:focus-visible, .fs[aria-pressed="true"] { opacity: .9; background: rgba(31, 36, 33, .7); }
body.has-fs .mascot { left: calc(14px + 50px + 10px + var(--safe-l)); }
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(110px + var(--safe-b));
  z-index: 25;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(31, 36, 33, .9);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transform: translate(-50%, 8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s, transform .25s, visibility .25s;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.tour-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  animation: hint-pulse 1.6s ease-in-out infinite;
}
.tour-hint[hidden] { display: none; }
.tour-hint span { font-size: 18px; }
@keyframes hint-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---------- 競選總部觸控展示機（?kiosk=1，24 吋 1920×1080 橫放） ---------- */
body.kiosk {
  --side-w: 384px;
  --card-w: 430px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body.kiosk #app { touch-action: pan-x pan-y; } /* 面板可以捲動，但雙指不會放大整頁 */
body.kiosk #stage { touch-action: none; }
body.kiosk .search, body.kiosk .side-foot a, body.kiosk .video-link, body.kiosk .c-src a { display: none !important; }
body.kiosk .brand { padding: 10px 20px 10px 10px; border-radius: 20px; }
body.kiosk .brand-logo { width: 64px; height: 64px; border-radius: 14px; }
body.kiosk .brand-text h1 { font-size: 27px; }
body.kiosk .brand-text p { font-size: 14.5px; }
body.kiosk .hero-note { top: calc(112px + var(--safe-t)); max-width: 410px; }
body.kiosk .hero-num { font-size: 50px; }
body.kiosk .hero-note h2 { font-size: 20px; }
body.kiosk .hero-note p { font-size: 14.5px; }
body.kiosk .toolbar button { min-height: 58px; padding: 0 20px; border-radius: 14px; font-size: 17px; }
body.kiosk .toolbar button svg { width: 22px; height: 22px; }
body.kiosk .toolbar button.icon-only { width: 58px; padding: 0; }
body.kiosk .zoom { gap: 10px; }
body.kiosk .zoom button { width: 62px; height: 62px; border-radius: 16px; font-size: 30px; }
body.kiosk .hud { max-width: 700px; }
body.kiosk .seg button { min-width: 64px; min-height: 64px; padding: 2px 10px; font-size: 13px; }
body.kiosk .seg button span { display: block; }
body.kiosk .seg button svg { width: 23px; height: 23px; }
body.kiosk .daybar { padding: 9px 20px; font-size: 16px; }
body.kiosk .daybar output { font-size: 22px; }
body.kiosk .side-head h2 { font-size: 27px; }
body.kiosk .side-head p { font-size: 14.5px; }
body.kiosk .side-tabs button { min-height: 56px; font-size: 16.5px; }
body.kiosk .t-isl > summary { grid-template-columns: 58px 1fr auto; min-height: 72px; }
body.kiosk .t-num { font-size: 31px; }
body.kiosk .t-name b { font-size: 17.5px; }
body.kiosk .t-name small { font-size: 14px; }
body.kiosk .t-count { font-size: 13.5px; }
body.kiosk .t-items button { min-height: 54px; font-size: 16px; }
body.kiosk .t-items i { width: 28px; height: 28px; font-size: 13.5px; }
body.kiosk .t-flow { padding: 14px; }
body.kiosk .t-flow .route { font-size: 14px; }
body.kiosk .t-flow p { font-size: 15.5px; }
body.kiosk .side-foot { font-size: 13.5px; }
body.kiosk .card { top: calc(102px + var(--safe-t)); max-height: calc(100% - 122px - var(--safe-t) - var(--safe-b)); border-radius: 26px; }
body.kiosk #card-content { padding: 26px 24px 32px 26px; }
body.kiosk .card-close { width: 54px; height: 54px; border-radius: 14px; font-size: 30px; }
body.kiosk .c-head { padding-right: 52px; }
body.kiosk .c-badge { width: 62px; height: 62px; font-size: 28px; }
body.kiosk .c-badge.round { font-size: 24px; }
body.kiosk .c-title { font-size: 26px; }
body.kiosk .c-lead { font-size: 19.5px; }
body.kiosk .c-sub, body.kiosk .c-quote { font-size: 16.5px; }
body.kiosk .c-quote cite { font-size: 13.5px; }
body.kiosk .c-body { font-size: 17.5px; line-height: 1.8; }
body.kiosk .fact { padding: 13px 15px; font-size: 17.5px; }
body.kiosk .fact b { font-size: 24px; }
body.kiosk .chip { min-height: 40px; padding: 6px 15px; font-size: 15px; }
body.kiosk .tag { min-height: 28px; padding: 3px 11px; font-size: 13.5px; }
body.kiosk .c-sec { margin-top: 24px; font-size: 14px; }
body.kiosk .c-items button { min-height: 62px; font-size: 16.5px; }
body.kiosk .c-items .n { width: 32px; height: 32px; font-size: 15px; }
body.kiosk .c-list h4 { font-size: 14px; }
body.kiosk .c-list ol, body.kiosk .c-list ul { font-size: 16px; }
body.kiosk .c-nav button { min-height: 58px; font-size: 16.5px; }
body.kiosk .c-src, body.kiosk .c-note { font-size: 14px; }
body.kiosk .video-card .play span { padding: 14px 22px; font-size: 18px; }
body.kiosk .video-soon { font-size: 15px; }
body.kiosk .isl-label { padding: 8px 15px 8px 9px; font-size: 17.5px; }
body.kiosk .isl-label b { min-width: 31px; height: 27px; font-size: 14px; }
body.kiosk .pin { padding: 4px 13px 4px 4px; font-size: 15.5px; }
body.kiosk .pin i { width: 27px; height: 27px; font-size: 14px; }
body.kiosk .region-label { font-size: 18px; }
body.kiosk .region-label.river { font-size: 16px; }
body.kiosk .legend { bottom: calc(92px + var(--safe-b)); font-size: 14px; }
body.kiosk.has-card .legend { bottom: auto; top: calc(102px + var(--safe-t)); }
body.kiosk .mascot { padding: 6px 18px 6px 6px; font-size: 15.5px; }
body.kiosk .mascot img { width: 52px; height: 52px; }
body.kiosk .fs { width: 60px; height: 60px; font-size: 27px; opacity: .45; }
body.kiosk.has-fs .mascot { left: calc(14px + 60px + 12px + var(--safe-l)); }
body.kiosk .tour-caption { width: min(840px, calc(100% - 48px)); padding: 20px 26px 16px; border-radius: 22px; }
body.kiosk .tour-caption p { font-size: 24px; }
body.kiosk .tour-ctl { margin-top: 10px; font-size: 14.5px; }
body.kiosk .tour-ctl button { min-height: 46px; padding: 0 20px; font-size: 15.5px; }
body.kiosk .tour-hint { font-size: 17px; padding: 8px 20px; }
body.kiosk .tour-hint span { font-size: 21px; }
body.kiosk .toast { bottom: calc(150px + var(--safe-b)); padding: 13px 24px; font-size: 17px; }
body.kiosk .intro-box { width: min(640px, 100%); padding: 30px 32px 26px 20px; gap: 22px; }
body.kiosk .intro-fig { width: 124px; }
body.kiosk .intro-box h2 { font-size: 28px; }
body.kiosk .intro-box p { font-size: 17.5px; }
body.kiosk .intro-actions button { min-height: 58px; padding: 0 24px; font-size: 17px; }
body.kiosk .video-box { width: min(1320px, 100%); }
body.kiosk .video-head { font-size: 19px; padding: 12px 14px 12px 22px; }
body.kiosk .video-head button { width: 56px; height: 56px; font-size: 30px; }

/* ---------- 集章、測驗、分享（island2） ---------- */
.toolbar button.has-badge { position: relative; }
.tb-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font: 800 12px/20px var(--font);
  text-align: center;
  box-shadow: 0 2px 6px rgba(224, 74, 103, .35);
}
.tb-badge[hidden] { display: none; }

.quiz-entry {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 10px;
  padding: 6px 14px 6px 8px;
  border: 1px solid #f2c9b3;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff4ec, #fff);
  text-align: left;
}
.quiz-entry img { width: 44px; height: 60px; object-fit: contain; mix-blend-mode: multiply; }
.quiz-entry b { display: block; font-size: 15px; color: var(--pink); }
.quiz-entry small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.quiz-entry i { font-style: normal; font-size: 18px; font-weight: 800; color: var(--pink); }

.c-head { position: relative; }
.c-stamp {
  position: absolute;
  top: 30px;
  right: -8px;
  width: 84px;
  height: 84px;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: .88;
  transform: rotate(-8deg);
}
.c-stamp.fresh { animation: stamp-in .6s cubic-bezier(.2, .9, .3, 1.25) .3s both; }
@keyframes stamp-in {
  0% { opacity: 0; transform: scale(2.3) rotate(-28deg); }
  60% { opacity: 1; transform: scale(.9) rotate(-6deg); }
  100% { opacity: .88; transform: scale(1) rotate(-8deg); }
}
.t-stamp { width: 30px; height: 30px; margin: -6px 4px -6px 0; vertical-align: middle; mix-blend-mode: multiply; }

.c-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(74, 42, 20, .06);
}
.act svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.act[data-act="opinion"] { border-color: #06c755; background: #06c755; color: #fff; } /* LINE 綠 */

/* 總部觸控機：側欄下方的 QR code */
.take {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 14px 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(74, 42, 20, .06);
}
.take[hidden] { display: none; }
.take-qr { flex: none; width: 150px; height: 150px; }
.qr { display: block; width: 100%; height: 100%; }
.take-text b { display: block; font-size: 19px; line-height: 1.35; color: var(--green); }
.take-text span { display: block; margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }

/* 對話框 */
.modal {
  position: absolute;
  inset: 0;
  z-index: 22;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(40, 32, 24, .38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: 100%;
  border-radius: 24px;
  background: var(--cream);
  box-shadow: var(--shadow);
  animation: card-in .28s cubic-bezier(.2, .8, .2, 1);
}
.m-stamps .modal-box { width: min(640px, 100%); }
.modal-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 12px; background: #f1ebe1; font-size: 24px; line-height: 1; }
.modal-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 26px 24px 24px; -webkit-overflow-scrolling: touch; }
.m-head { padding-right: 44px; }
.m-title { margin: 6px 0; font-size: 24px; line-height: 1.3; color: var(--green); }
.m-lead { margin: 0; font-size: 15px; line-height: 1.7; color: #4d554f; }
.m-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.m-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 15px;
  font-weight: 800;
}
.m-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-btn.primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.m-btn[data-rs="opinion"] { border-color: #06c755; background: #06c755; color: #fff; }

.stp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.stp-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(74, 42, 20, .06);
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.stp-slot img { width: 96px; max-width: 100%; height: auto; aspect-ratio: 1; mix-blend-mode: multiply; }
.stp-slot i {
  display: grid;
  place-items: center;
  width: 96px;
  max-width: 100%;
  aspect-ratio: 1;
  border: 3px dashed #ddd3c4;
  border-radius: 50%;
  font-style: normal;
  font-size: 17px;
  font-weight: 900;
  color: #b0a596;
}
.stp-slot.got span { color: var(--c); }
.stp-progress { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.bar { flex: 1; height: 10px; border-radius: 999px; background: #efe7da; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #3ea063); transition: width .3s; }
.stp-progress b { font: italic 700 20px/1 Georgia, serif; color: var(--green); }
.m-poster-slot { display: grid; place-items: center; min-height: 140px; margin: 16px auto 0; border-radius: 16px; overflow: hidden; background: #fff; color: var(--muted); font-size: 13px; }
.m-poster-slot[hidden] { display: none; }
.m-stamps.done .m-poster-slot { width: min(100%, 340px); aspect-ratio: 4 / 5; box-shadow: 0 6px 24px rgba(60, 40, 20, .14); }
.m-poster { display: block; width: 100%; height: auto; }
.m-stamps.done .stp-grid, .m-stamps.done .stp-progress { display: none; }

.m-take { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.m-take .qr { flex: none; width: 170px; height: 170px; }
.m-take b { display: block; font-size: 19px; line-height: 1.35; color: var(--green); }
.m-take span { display: block; margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.m-qr { width: min(300px, 72vw); margin: 18px auto 4px; padding: 10px; border-radius: 18px; background: #fff; box-shadow: 0 4px 18px rgba(60, 40, 20, .12); }

.qz-start { text-align: center; }
.qz-start .m-acts { justify-content: center; }
.qz-start .m-btn { flex: 0 1 280px; }
.qz-fig { display: block; width: 116px; height: auto; margin: 0 auto 8px; mix-blend-mode: multiply; }
.qz-top { display: flex; align-items: center; gap: 12px; padding-right: 48px; font-size: 13px; font-weight: 800; color: var(--muted); }
.qz-top .bar i { background: var(--pink); }
.qz-q { margin: 18px 0 14px; font-size: 22px; line-height: 1.4; }
.qz-opts { display: grid; gap: 10px; }
.qz-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 16px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  font-size: 17px;
  font-weight: 800;
}
.qz-opt .e { width: 32px; font-size: 26px; line-height: 1; text-align: center; }
.qz-opt.on { border-color: var(--pink); background: #fff0f3; }
.qz-back, .qz-again { padding: 8px 4px; border: 0; background: none; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.qz-back { margin-top: 14px; }
.qz-again { display: block; margin: 12px auto 0; text-decoration: underline; }
.qz-res { position: relative; min-height: 200px; padding: 0 128px 0 0; }
.qz-pose { position: absolute; top: 40px; right: 4px; width: auto; max-width: 124px; height: 150px; object-fit: contain; mix-blend-mode: multiply; }
.qz-you { margin: 10px 0 0; font-size: 15px; font-weight: 800; color: var(--muted); }
.qz-type { margin: 2px 0 8px; font-size: 34px; line-height: 1.2; color: var(--c); }
.qz-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 3px 12px; border-radius: 999px; background: var(--t); color: var(--c); font-size: 13px; font-weight: 800; }
.qz-res .m-lead { margin-top: 10px; }
.qz-items .nm small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }

@media (hover: hover) {
  .quiz-entry:hover { border-color: var(--pink); }
  .act:hover { border-color: var(--c, var(--green)); }
  .act[data-act="opinion"]:hover { filter: brightness(1.06); }
  .m-btn:hover { border-color: var(--green); }
  .m-btn.primary:hover { background: var(--green); border-color: var(--green); }
  .stp-slot:hover { box-shadow: 0 0 0 2px var(--c) inset, 0 2px 8px rgba(74, 42, 20, .06); }
  .qz-opt:hover { border-color: var(--pink); }
}

/* 1100～1280px：前三顆收成圖示，集章、測驗保留文字 */
@media (max-width: 1280px) and (min-width: 1101px) {
  #btn-home span, #btn-list span, #btn-tour span { display: none; }
  #btn-home, #btn-list, #btn-tour { padding: 0; width: 44px; justify-content: center; }
}
@media (max-width: 800px) {
  .quiz-entry { display: none; }
  .zoom, body.side-closed .zoom { top: calc(10px + var(--safe-t) + 7 * 58px + 8px); }
  .modal { place-items: end center; padding: 10px 10px calc(10px + var(--safe-b)); }
  .modal-content { padding: 22px 16px 18px; }
  .m-title { font-size: 21px; }
  .stp-grid { gap: 6px; }
  .stp-slot { padding: 8px 2px 6px; font-size: 12px; }
  .qz-q { font-size: 20px; }
  .qz-opt { min-height: 56px; font-size: 16px; }
  .qz-res { padding-right: 96px; }
  .qz-pose { max-width: 92px; height: 112px; }
  .qz-type { font-size: 29px; }
  .m-take { flex-direction: column; text-align: center; }
  .c-stamp { top: 34px; right: -4px; width: 66px; height: 66px; }
}
@media (max-width: 800px) and (max-height: 700px) {
  .zoom { display: none; } /* 直排工具列變長，矮螢幕改用雙指縮放 */
}
@media (max-height: 500px) and (orientation: landscape) {
  .quiz-entry { display: none; }
  .modal { padding: 8px; }
  .modal-content { padding: 16px 16px 14px; }
  .qz-opts { grid-template-columns: 1fr 1fr; }
  .qz-opt { min-height: 48px; font-size: 15px; }
  .qz-q { margin: 10px 0 10px; font-size: 18px; }
  .stp-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .stp-slot { padding: 6px 2px; font-size: 11.5px; }
  .c-stamp { top: 34px; right: -4px; width: 66px; height: 66px; }
}

body.kiosk .tb-badge { top: -8px; right: -8px; min-width: 28px; height: 28px; font-size: 14px; line-height: 24px; }
body.kiosk .quiz-entry { grid-template-columns: 52px 1fr auto; padding: 8px 18px 8px 10px; border-radius: 16px; }
body.kiosk .quiz-entry img { width: 52px; height: 70px; }
body.kiosk .quiz-entry b { font-size: 18.5px; }
body.kiosk .quiz-entry small { font-size: 14px; }
body.kiosk .act { min-height: 50px; padding: 0 20px 0 16px; font-size: 16.5px; }
body.kiosk .act svg { width: 21px; height: 21px; }
body.kiosk .c-stamp { top: 40px; width: 100px; height: 100px; }
body.kiosk .t-stamp { width: 36px; height: 36px; }
body.kiosk .modal-box { width: min(760px, 100%); border-radius: 28px; }
body.kiosk .m-stamps .modal-box { width: min(860px, 100%); }
body.kiosk .modal-close { width: 56px; height: 56px; font-size: 30px; }
body.kiosk .modal-content { padding: 34px 36px 30px; }
body.kiosk .m-title { font-size: 31px; }
body.kiosk .m-lead { font-size: 18.5px; }
body.kiosk .m-btn { min-height: 64px; font-size: 18.5px; border-radius: 16px; }
body.kiosk .m-btn svg { width: 22px; height: 22px; }
body.kiosk .stp-slot { font-size: 16px; }
body.kiosk .stp-slot img, body.kiosk .stp-slot i { width: 140px; }
body.kiosk .stp-slot i { font-size: 22px; }
body.kiosk .m-stamps.done .m-poster-slot { width: min(100%, 380px); }
body.kiosk .m-take .qr { width: 190px; height: 190px; }
body.kiosk .m-take b { font-size: 22px; }
body.kiosk .m-take span { font-size: 16.5px; }
body.kiosk .m-qr { width: 360px; }
body.kiosk .qz-fig { width: 150px; }
body.kiosk .qz-top { font-size: 16px; }
body.kiosk .qz-q { font-size: 29px; }
body.kiosk .qz-opt { min-height: 80px; padding: 12px 22px; font-size: 22px; border-radius: 20px; }
body.kiosk .qz-opt .e { width: 42px; font-size: 34px; }
body.kiosk .qz-back, body.kiosk .qz-again { font-size: 16.5px; padding: 12px 8px; }
body.kiosk .qz-res { padding-right: 170px; }
body.kiosk .qz-pose { max-width: 160px; height: 196px; }
body.kiosk .qz-you { font-size: 18px; }
body.kiosk .qz-type { font-size: 44px; }
body.kiosk .qz-chip { min-height: 36px; font-size: 16px; }
body.kiosk .qz-items .nm small { font-size: 14px; }

/* ---------- island3：台南人的一天、問妃妃、我的角色、彩蛋、小遊戲 ---------- */
button.daybar { border: 0; color: inherit; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.day-more { font-size: 13px; color: var(--green); margin-left: -2px; }
.daybar .day-more::before { content: "看政策"; margin-right: 2px; font-size: 11.5px; }

.av-tag, .say-bubble {
  pointer-events: none;
  white-space: nowrap;
  transform: translateY(-50%);
  padding: 2px 10px;
  border: 1.5px solid #fff;
  border-radius: 999px;
  background: rgba(255, 253, 248, .95);
  box-shadow: 0 3px 10px rgba(40, 30, 20, .18);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--green);
}
.av-tag span { display: block; font-weight: 700; color: var(--ink); }
.av-tag.say { padding: 5px 12px; border-radius: 14px; border-color: var(--green); text-align: center; }
.say-bubble { padding: 6px 12px; border-radius: 14px; border-color: var(--pink); color: var(--ink); font-size: 13.5px; animation: card-in .25s ease-out; }

.av-row { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 800; color: var(--muted); }
.av-name { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; }
.av-swatches, .av-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.av-swatches .sw { width: 32px; height: 32px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 1px #d8cfc0; }
.av-swatches .sw.on { box-shadow: 0 0 0 3px var(--green); }
.av-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 800; color: var(--ink); }
.av-chip.on { border-color: var(--green); background: var(--green); color: #fff; }
.av-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.av-chips.go { margin-top: 2px; }
.c-nav .primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.av-remove { padding: 4px 0; border: 0; background: none; color: var(--muted); font-size: 12.5px; text-decoration: underline; }

.day-list { list-style: none; margin: 14px 0 0; padding: 0; }
.day-list li { margin: 0 0 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.day-list li.on { border-color: var(--green); box-shadow: 0 0 0 2px rgba(23, 107, 56, .15); }
.day-seg { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 6px 12px; border: 0; background: none; text-align: left; font-size: 14px; font-weight: 800; }
.day-seg b { font: italic 700 17px/1 Georgia, serif; color: var(--green); }
.day-seg small { font-size: 11.5px; color: var(--muted); }
.day-list li.on .day-seg { background: var(--yellow); }
.day-items { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 12px; }
.day-items .chip { cursor: pointer; }

.m-ask .modal-box { height: min(760px, 100%); }
.m-ask .modal-content { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 14px; }
.ask-head { display: flex; align-items: center; gap: 12px; padding-right: 48px; }
.ask-head img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(40, 30, 20, .15); }
.ask-head .m-title { margin: 0; }
.ask-head small { display: block; font-size: 12px; color: var(--muted); }
.ask-log { flex: 1 1 auto; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; margin: 14px -6px 0; padding: 4px 6px 8px; display: flex; flex-direction: column; gap: 10px; }
.bub { max-width: 88%; font-size: 14.5px; line-height: 1.65; }
.bub.me { align-self: flex-end; padding: 8px 14px; border-radius: 18px 18px 4px 18px; background: var(--green); color: #fff; font-weight: 700; }
.bub.ff { align-self: flex-start; display: flex; gap: 8px; align-items: flex-start; }
.bub.ff img { flex: none; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #fff; }
.bub.ff .txt { padding: 9px 14px; border-radius: 4px 18px 18px 18px; background: #fff; box-shadow: 0 2px 8px rgba(74, 42, 20, .07); }
.bub .txt p { margin: 0; }
.bub .txt ul { margin: 6px 0 0; padding-left: 1.2em; }
.bub .txt li { margin: 2px 0; }
.bub .txt .tag { margin-left: 2px; vertical-align: 1px; }
.typing .txt { display: flex; gap: 4px; padding: 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #c9bfb0; animation: dots 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.ask-gos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ask-go { min-height: 34px; padding: 0 12px; border: 1px solid var(--c, var(--line)); border-radius: 999px; background: #fff; color: var(--c, var(--ink)); font-size: 13px; font-weight: 800; }
.ask-go.act { border-color: var(--pink); color: var(--pink); }
.ask-qs { flex: none; display: flex; flex-wrap: wrap; gap: 6px; max-height: 38%; overflow-y: auto; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ask-q { min-height: 38px; padding: 0 14px; border: 1.5px solid #f2c9b3; border-radius: 999px; background: #fff7f0; font-size: 13.5px; font-weight: 800; color: var(--ink); }

.act.game { border-color: #f2c230; background: #fff7d6; }
.egg-line { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 14px; padding: 10px 14px; border: 1px dashed #e8c87a; border-radius: 14px; background: #fffaf0; font-size: 13.5px; font-weight: 800; color: #8a5a12; text-align: left; }
.egg-line span { font-size: 20px; }
body.kiosk .egg-line { font-size: 16.5px; padding: 14px 18px; }

.gm-stage { position: relative; width: min(100%, 380px, calc((100dvh - 240px) * .75)); aspect-ratio: 3 / 4; margin: 14px auto 0; }
.gm-stage canvas { display: block; width: 100%; height: 100%; border-radius: 18px; box-shadow: 0 4px 18px rgba(60, 40, 20, .14); touch-action: none; outline: none; }
.gm-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px; border-radius: 18px; background: rgba(255, 253, 248, .78); text-align: center; }
.gm-over[hidden] { display: none; }
.gm-over .m-btn { flex: 0 0 auto; min-width: 160px; }
.gm-over p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.gm-over .m-acts { justify-content: center; }
.gm-score { font: italic 700 54px/1 Georgia, serif; color: var(--green); }
.gm-title { font-size: 17px; font-weight: 900; color: var(--pink); }

.egg-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.egg-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.egg-row .e { flex: none; width: 40px; font-size: 28px; text-align: center; }
.egg-row > span:nth-child(2) { flex: 1; min-width: 0; }
.egg-row b { display: block; font-size: 15px; }
.egg-row small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.egg-row:not(.got) { background: #faf6ef; }
.egg-row:not(.got) .e { color: #b0a596; font-weight: 900; }
.egg-row .m-btn { flex: none; min-height: 40px; font-size: 13px; }

@media (hover: hover) {
  button.daybar:hover { background: var(--yellow); }
  .av-chip:hover, .ask-go:hover, .ask-q:hover { border-color: var(--green); }
  .day-seg:hover { background: #fbf5ea; }
}
@media (max-width: 800px) {
  .zoom, body.side-closed .zoom { top: calc(10px + var(--safe-t) + 8 * 58px + 8px); }
  .mascot span { display: block; font-size: 12px; }
  .mascot { padding: 4px 12px 4px 4px; }
  .mascot img { width: 34px; height: 34px; }
  .m-ask .modal-box { height: calc(100% - 4px); }
  .bub { font-size: 14px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .ask-qs { max-height: 30%; }
  .gm-stage { width: min(100%, calc((100dvh - 150px) * .75)); }
}

body.kiosk button.daybar { font-size: 16px; }
body.kiosk .av-tag, body.kiosk .say-bubble { font-size: 16px; }
body.kiosk .av-row { grid-template-columns: 64px 1fr; font-size: 15.5px; margin-top: 14px; }
body.kiosk .av-swatches .sw { width: 44px; height: 44px; }
body.kiosk .av-chip { min-height: 48px; padding: 0 18px; font-size: 16px; }
body.kiosk .day-seg { min-height: 62px; font-size: 17px; grid-template-columns: 70px 1fr auto; }
body.kiosk .day-seg b { font-size: 21px; }
body.kiosk .day-seg small { font-size: 14px; }
body.kiosk .m-ask .modal-box { width: min(860px, 100%); }
body.kiosk .ask-head img { width: 64px; height: 64px; }
body.kiosk .ask-head small { font-size: 15px; }
body.kiosk .bub { font-size: 18px; }
body.kiosk .bub.ff img { width: 44px; height: 44px; }
body.kiosk .ask-go { min-height: 46px; padding: 0 18px; font-size: 16px; }
body.kiosk .ask-q { min-height: 52px; padding: 0 20px; font-size: 17px; }
body.kiosk .gm-stage { width: min(100%, 520px, calc((100dvh - 300px) * .75)); }
body.kiosk .gm-over p { font-size: 16.5px; }
body.kiosk .gm-title { font-size: 21px; }
body.kiosk .egg-row b { font-size: 18px; }
body.kiosk .egg-row small { font-size: 15px; }

/* ---------- 來站計數器（早期網頁的「您是第 N 位訪客」）：電腦放清單底部，手機放妃妃上方 ---------- */
.visits { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--muted); }
.visits[hidden] { display: none; }
.visits small { flex-basis: 100%; text-align: center; font: 700 9px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 2px; color: #a39a8c; }
.odo { display: inline-flex; gap: 2px; padding: 3px; border-radius: 6px; background: #2b2723; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7), 0 1px 0 #fff; }
.odo i {
  position: relative;
  display: block;
  width: 14px;
  height: 20px;
  overflow: hidden;
  border-radius: 2px;
  background: linear-gradient(#0d0c0b, #3b3732 48%, #24211e 52%, #0d0c0b);
  font: 700 15px/20px ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-style: normal;
  color: #fff8e1;
  text-align: center;
}
.odo i:last-child { background: linear-gradient(#5c0f22, #b3304d 48%, #9c2742 52%, #5c0f22); }
.odo i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .5); }
.odo span { display: block; animation: odo-roll .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 80ms); }
@keyframes odo-roll { from { transform: translateY(-110%); } to { transform: none; } }
.visits-side { padding: 10px 16px 0; border-top: 1px solid var(--line); }
.visits-side:not([hidden]) + .side-foot { border-top: 0; }
.visits-float { display: none; }
@media (max-width: 800px), (max-height: 500px) and (orientation: landscape) {
  .visits-side { display: none !important; }
  .visits-float:not([hidden]) {
    position: absolute;
    left: calc(10px + var(--safe-l));
    bottom: calc(66px + var(--safe-b));
    z-index: 4;
    display: flex;
    padding: 5px 10px;
    border: 1px solid #fff;
    border-radius: 12px;
    background: rgba(255, 253, 248, .92);
    box-shadow: 0 3px 12px rgba(60, 40, 20, .12);
    font-size: 11px;
    transition: opacity .3s;
  }
  .visits-float small { display: none; }
  .visits-float .odo i { width: 12px; height: 17px; font-size: 13px; line-height: 17px; }
  body.has-card .visits-float, body.touring .visits-float, body.m-time .visits-float, body:not(.side-closed) .visits-float { opacity: 0; pointer-events: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .visits-float:not([hidden]) { left: calc(8px + var(--safe-l)); bottom: calc(8px + var(--safe-b)); }
}
body.kiosk .visits { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
