/* 塔羅社團網站 · 樣式
   顏色都取自海報：深棕、粉紙、玫瑰金、紫 */
:root {
  --ink: #5b3b37;        /* 資訊卡上的深棕字 */
  --ink-soft: #7a5650;
  --paper: #f5e5de;      /* 粉紙 */
  --paper-2: #ecd5cd;
  --line: #c39d8a;       /* 玫瑰金線 */
  --dark: #2a1b1a;       /* 按鈕的深棕 */
  --gold: #d9b78f;
  --cream: #f8ebdf;
  --violet: #8d6fc0;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", "MingLiU", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #1f1413;
  color: var(--cream);
  font-family: var(--serif);
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button { font: inherit; color: inherit; }
.sr-only { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- 3D 場景 ---------- */
.page { position: relative; }
.stage3d { position: fixed; inset: 0; background: radial-gradient(120% 90% at 60% 0, #2a2f5c, #10111f 70%); }
#gl { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; outline: none; opacity: 0; transition: opacity .8s; }
.gl-ready #gl { opacity: 1; }
#gl.dragging { cursor: grabbing; }
.no-webgl .stage3d { background: url("img/scene.webp") center/cover; }
.stage3d::after {   /* 四周壓暗一點，像海報 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 100% at 45% 45%, transparent 55%, rgba(8, 9, 24, .6));
}

/* 標題（從海報去背的字）＋招募緞帶 */
.titleblock { position: absolute; left: 3.2vw; top: 3.5vh; width: min(34vw, 62vh); pointer-events: none; z-index: 2; }
.titleblock img { display: block; width: 100%; height: auto; filter: drop-shadow(0 2px 10px rgba(40, 18, 16, .55)) drop-shadow(0 0 22px rgba(255, 220, 190, .25)); }
.ribbon { position: relative; width: 72%; margin: -1.5% 0 0 14%; rotate: -4deg; filter: drop-shadow(0 6px 10px rgba(30, 14, 12, .4)); }
.ribbon span {
  display: block; text-align: center; white-space: nowrap; color: var(--ink);
  font-size: clamp(13px, 1.55vw, 26px); font-weight: 700; letter-spacing: .16em; padding: .5em 0;
  background: linear-gradient(#f1cfc5, #dfb0a4);
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
}

/* 資訊卡、加入按鈕 */
.info { position: fixed; z-index: 3; right: 2.2vw; top: 64px; width: min(25vw, calc((100dvh - 96px) / 2.08)); display: grid; gap: 1.4vh; }
.mcard, .mjoin { position: relative; display: block; border: 0; padding: 0; background: none; cursor: pointer; width: 100%; border-radius: 5%; outline: none; transition: transform .25s cubic-bezier(.2, .8, .2, 1), filter .25s; }
.mcard img, .mjoin img { display: block; width: 100%; height: auto; border-radius: 4.5% / 6%; }
.mcard { filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .45)); animation: bob 7s ease-in-out infinite; }
.mcard-content { animation-delay: -3s; }
@keyframes bob { 0%, 100% { translate: 0 2px; } 50% { translate: 0 -3px; } }
.mcard:focus-visible, .mjoin:focus-visible { box-shadow: 0 0 0 3px rgba(255, 232, 190, .9); }
@media (hover: hover) {
  .mcard:hover { transform: scale(1.025); filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .45)) drop-shadow(0 0 14px rgba(255, 224, 180, .5)); }
  .mjoin:hover { transform: scale(1.04); }
}
.mcard:active, .mjoin:active { transform: scale(.985); }
.mcard-time .live { left: 8.9%; top: 29.2%; width: 83.6%; height: 65.6%; }
.mcard-content .live { left: 10.5%; top: 21.75%; width: 83.3%; height: 46%; }
.mjoin { width: 78%; margin: 0 auto; animation: joinPulse 3.6s ease-in-out infinite; }
.mjoin img { border-radius: 12% / 34%; }
@keyframes joinPulse { 0%, 100% { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .4)); } 50% { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .4)) drop-shadow(0 0 14px rgba(255, 220, 170, .6)); } }

.quote { position: fixed; z-index: 2; left: 3vw; bottom: 3.5vh; margin: 0; font-size: clamp(12px, 1.05vw, 17px); line-height: 2; letter-spacing: .16em; color: #f4e3d6; text-shadow: 0 1px 6px rgba(20, 10, 14, .95), 0 0 14px rgba(20, 10, 14, .9); pointer-events: none; padding: 14px 34px 12px 18px; margin: 0 0 -12px -18px; background: radial-gradient(closest-side, rgba(22, 12, 18, .62), rgba(22, 12, 18, 0)); }
.m-news { display: none; }

/* ---------- 資訊卡上的活字 ---------- */
.live { position: absolute; container-type: size; pointer-events: none; color: var(--ink); display: block; }
.live-in { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.live-time .live-in { align-items: center; text-align: center; gap: 2.2cqw; }
.t-label { font-size: 6.4cqw; letter-spacing: .14em; }
.t-date-row { display: flex; align-items: center; gap: 4cqw; }
.t-date { font-size: 19cqw; font-weight: 700; line-height: 1; letter-spacing: -.01em; }
.t-week { font-size: 6cqw; background: var(--ink); color: var(--paper); padding: .25em .55em; border-radius: .35em; letter-spacing: .08em; }
.t-line { font-size: 6.2cqw; letter-spacing: .08em; line-height: 1.35; }
.t-name { font-size: 5.6cqw; letter-spacing: .06em; line-height: 1.35; }
.live-content .live-in { gap: 5cqw; padding-left: 2cqw; }
.c-item { display: grid; grid-template-columns: 9cqw 1fr; column-gap: 2.5cqw; align-items: start; text-align: left; }
.c-item svg { width: 8cqw; height: 8cqw; fill: none; stroke: var(--ink-soft); stroke-width: 1.3; margin-top: .6cqw; }
.c-title { font-size: 6.6cqw; font-weight: 700; letter-spacing: .12em; line-height: 1.3; }
.c-desc { font-size: 4.9cqw; letter-spacing: .08em; line-height: 1.5; margin-top: .8cqw;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-more { font-size: 4.4cqw; color: var(--ink-soft); letter-spacing: .1em; text-align: center; padding-right: 2cqw; }

/* ---------- 右上角工具 ---------- */
.controls { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 5; display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 11px;
  background: rgba(42, 27, 26, .82); color: var(--cream);
  border: 1px solid var(--gold); border-radius: 12px; cursor: pointer;
  font-size: 14px; letter-spacing: .1em;
  box-shadow: inset 0 0 0 2px rgba(42, 27, 26, .9), inset 0 0 0 3px rgba(217, 183, 143, .35), 0 4px 14px rgba(0, 0, 0, .35);
  backdrop-filter: blur(6px);
  transition: background .2s, transform .15s;
}
.pill:hover { background: rgba(62, 40, 37, .92); }
.pill:active { transform: scale(.96); }
.pill:focus-visible { outline: 2px solid #ffe6bd; outline-offset: 2px; }
.pill svg { width: 20px; height: 20px; fill: var(--gold); }
.pill .ico-on { display: none; }
.pill[aria-pressed="true"] .ico-on { display: block; }
.pill[aria-pressed="true"] .ico-off { display: none; }
.pill[aria-pressed="true"] { background: rgba(91, 59, 55, .95); }

.hint {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); translate: -50% 0; z-index: 4; margin: 0;
  font-size: 13px; letter-spacing: .18em; color: #fbeedd; white-space: nowrap;
  padding: 6px 16px; border-radius: 99px; background: rgba(42, 27, 26, .55); backdrop-filter: blur(4px);
  transition: opacity .8s; pointer-events: none;
  animation: hintIn 1.2s ease-out 1s both;
}
.hint.gone { opacity: 0; animation: none; }
@keyframes hintIn { from { opacity: 0; translate: -50% 8px; } }

/* ---------- 粉紙（面板、公告共用） ---------- */
.paper {
  position: relative; color: var(--ink);
  background: radial-gradient(120% 90% at 50% 0, #f9ece6, var(--paper) 45%, var(--paper-2));
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(195, 157, 138, .7), 0 18px 50px rgba(0, 0, 0, .5);
}
.paper h2 { margin: 0 0 4px; text-align: center; font-size: 24px; letter-spacing: .22em; text-indent: .22em; font-weight: 700; }
.rule { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--line); font-size: 11px; margin: 0 auto 16px; }
.rule::before, .rule::after { content: ""; height: 1px; width: 72px; background: linear-gradient(90deg, transparent, var(--line)); }
.rule::after { transform: scaleX(-1); }
.paper p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.85; letter-spacing: .04em; }
.paper h3 { margin: 18px 0 8px; font-size: 16px; letter-spacing: .14em; display: flex; align-items: center; gap: 8px; }
.paper h3::before { content: "✦"; color: var(--line); font-size: 12px; }
.paper ul { margin: 0 0 12px; padding: 0; list-style: none; }
.paper li { font-size: 15.5px; line-height: 1.7; padding: 7px 0; border-bottom: 1px dashed rgba(195, 157, 138, .55); }
.paper li:last-child { border-bottom: 0; }
.paper li strong { display: block; letter-spacing: .1em; }
.paper li span { color: var(--ink-soft); font-size: 14.5px; }
.note { font-size: 13px !important; color: var(--ink-soft); }
.todo { font-size: 14px !important; color: #9a6f66; background: rgba(195, 157, 138, .18); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 10px; padding: 8px 16px;
  background: var(--dark); color: var(--cream); text-decoration: none; text-align: center;
  border: 1px solid var(--gold); border-radius: 12px; font-size: 15.5px; letter-spacing: .12em; line-height: 1.4;
  box-shadow: inset 0 0 0 2px var(--dark), inset 0 0 0 3px rgba(217, 183, 143, .4);
  transition: background .2s, transform .15s;
}
.btn:hover { background: #3e2825; }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: rgba(195, 157, 138, .2); }
.links { display: grid; gap: 0; }
.links a { color: var(--ink); text-decoration: none; padding: 10px 2px; border-bottom: 1px dashed rgba(195, 157, 138, .55); font-size: 15.5px; letter-spacing: .06em; display: flex; justify-content: space-between; gap: 10px; }
.links a::after { content: "→"; color: var(--line); }
.links a:hover { color: #3b2422; }

/* 牌的面板 */
.tarot-head { display: grid; grid-template-columns: 118px 1fr; gap: 18px; align-items: center; margin-bottom: 14px; }
.tarot-head img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 6px 18px rgba(60, 30, 25, .35); display: block; }
.tarot-no { font-size: 13px; letter-spacing: .3em; color: var(--ink-soft); }
.tarot-zh { font-size: 34px; font-weight: 700; letter-spacing: .2em; line-height: 1.2; }
.tarot-en { font-size: 13px; letter-spacing: .28em; color: var(--ink-soft); margin-bottom: 10px; }
.keys { display: flex; flex-wrap: wrap; gap: 6px; }
.keys span { font-size: 13px; letter-spacing: .1em; padding: 3px 10px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 255, 255, .35); }

/* 面板本體 */
.panel { border: 0; padding: 0; background: none; max-width: min(92vw, 480px); width: 100%; max-height: 88dvh; overflow: visible; color: inherit; }
.panel::backdrop { background: rgba(24, 14, 13, .62); backdrop-filter: blur(5px); }
.panel[open] { animation: panelIn .32s cubic-bezier(.2, .8, .2, 1); }
.panel[open]::backdrop { animation: fade .3s; }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.panel-paper { padding: 30px 26px 24px; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; }
.panel-close {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: none; color: var(--ink-soft); font-size: 26px; line-height: 1; cursor: pointer;
}
.panel-close:hover { background: rgba(195, 157, 138, .25); }
.panel-close:focus-visible { outline: 2px solid var(--violet); }

.toast {
  position: fixed; left: 50%; bottom: 64px; translate: -50% 10px; z-index: 20; max-width: 86vw;
  background: rgba(42, 27, 26, .94); color: var(--cream); border: 1px solid var(--gold); border-radius: 12px;
  padding: 10px 16px; font-size: 14px; letter-spacing: .06em; line-height: 1.6; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .3s, translate .3s;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- 手機直式：場景在上面，資訊卡、按鈕、公告往下排 ---------- */
@media (max-width: 820px), (max-aspect-ratio: 1/1) {
  body { overflow: auto; background: #20141a; }
  .page { max-width: 560px; margin: 0 auto; padding-bottom: 44px; }
  .stage3d { position: relative; inset: auto; height: 100svh; min-height: 560px;            /* 手機：3D 場景佔滿第一頁 */
    -webkit-mask-image: linear-gradient(#000 93%, transparent); mask-image: linear-gradient(#000 93%, transparent); }
  .titleblock { left: 7%; top: max(58px, 8svh); width: 80%; }
  .ribbon span { font-size: clamp(13px, 3.7vw, 20px); }
  .info { position: relative; right: auto; top: auto; width: auto; padding: 0 16px; gap: 14px; margin-top: 8px; }
  .mcard { animation: none; }
  .m-news { display: block; margin: 22px 16px 0; padding: 26px 20px 20px; }
  .quote { position: static; margin: 22px 0 0; text-align: center; font-size: 14.5px; }
  .controls { top: max(8px, env(safe-area-inset-top)); right: 8px; }
  .pill { height: 38px; font-size: 13px; padding: 0 12px 0 9px; }
  .hint { font-size: 12px; position: absolute; top: calc(100svh - 128px); bottom: auto; }
  .scroll-cue { display: flex; }
  .panel { max-width: 94vw; }
  .panel-paper { padding: 28px 20px 20px; }
  .tarot-head { grid-template-columns: 96px 1fr; gap: 14px; }
  .tarot-zh { font-size: 30px; }
}

/* 不想看動畫的人：全部停掉，功能照常（3D 場景也會停在原地） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 活動節目單（深色玻璃＋金線，配舞台燈的場景） ---------- */
.prog {
  --g: #e6c594; --g2: rgba(230, 197, 148, .45); --tx: #f7eadc; --mut: #cdb6aa;
  position: fixed; z-index: 3; right: 2.4vw; top: 68px; width: clamp(250px, 23.5vw, 330px); max-height: calc(100dvh - 92px);
  display: flex; flex-direction: column; gap: 0; padding: 30px 20px 18px; overflow: hidden auto; scrollbar-width: none;
  color: var(--tx); text-align: center;
  background: linear-gradient(180deg, rgba(74, 44, 46, .66), rgba(34, 19, 20, .82));
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid var(--g2); border-radius: 150px 150px 16px 16px / 86px 86px 16px 16px;   /* 上面是拱形，呼應牌後面的大拱 */
  box-shadow: inset 0 0 0 5px rgba(20, 11, 14, .35), inset 0 0 0 6px rgba(230, 197, 148, .2), 0 18px 50px rgba(0, 0, 0, .5), 0 0 60px rgba(255, 200, 140, .06);
}
.prog-top { color: var(--g); font-size: 15px; line-height: 1; margin-bottom: 8px; text-shadow: 0 0 12px rgba(255, 220, 170, .8); animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.prog-sec { display: block; width: 100%; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 10px 6px 12px; border-radius: 12px; outline: none; transition: background .25s; }
.prog-sec:focus-visible { box-shadow: 0 0 0 2px var(--g); }
@media (hover: hover) { .prog-sec:hover { background: rgba(230, 197, 148, .08); } }
.prog-label { display: block; font-size: 13px; letter-spacing: .5em; text-indent: .5em; color: var(--g); margin-bottom: 10px; }
.prog-body, .prog .live-in { display: block; width: auto; height: auto; }
.prog-rule { display: flex; align-items: center; gap: 10px; color: var(--g); font-size: 10px; margin: 4px 10px; }
.prog-rule i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--g2)); }
.prog-rule i:last-child { transform: scaleX(-1); }
/* 活動時間 */
.prog .t-label { display: block; font-size: 13px; letter-spacing: .28em; color: var(--mut); }
.prog .t-date-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 2px 0 4px; }
.prog .t-date { font-size: clamp(46px, 4.6vw, 62px); font-weight: 700; line-height: 1.1; letter-spacing: 0;
  background: linear-gradient(180deg, #fff3df 20%, #e6c594 70%, #c99e6a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 10px rgba(255, 210, 150, .25)); }
.prog .t-week { font-size: 13px; background: none; color: var(--g); border: 1px solid var(--g2); padding: .3em .6em; border-radius: 99px; letter-spacing: .12em; }
.prog .t-line, .prog .t-name { display: block; font-size: 14px; letter-spacing: .1em; line-height: 1.7; color: var(--tx); }
/* 活動內容 */
.prog .live-in:has(.c-item) { display: grid; gap: 10px; padding: 0; text-align: left; }
.prog .c-item { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; align-items: baseline; }
.prog .c-num { color: var(--g); font-size: 14px; text-align: center; }
.prog .c-title { display: block; font-size: 15px; font-weight: 700; letter-spacing: .12em; line-height: 1.5; color: var(--tx); }
.prog .c-desc { display: block; font-size: 12.5px; letter-spacing: .05em; line-height: 1.6; margin-top: 1px; color: var(--mut); -webkit-line-clamp: unset; overflow: visible; }
.prog .c-more { display: block; font-size: 12px; color: var(--g); text-align: center; padding: 0; }
/* 加入按鈕 */
.prog-join {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; margin-top: 12px; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .2em; color: #2a1a18;
  background: linear-gradient(180deg, #f6dfb8, #dcb480 60%, #c79a62); border: 0; border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 0 0 1px rgba(120, 80, 40, .35), 0 6px 18px rgba(0, 0, 0, .4), 0 0 22px rgba(255, 205, 140, .25);
  transition: transform .2s, box-shadow .25s, filter .25s; outline: none;
}
.prog-join span { font-size: 11px; opacity: .7; }
.prog-join:hover { filter: brightness(1.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 0 0 1px rgba(120, 80, 40, .35), 0 6px 18px rgba(0, 0, 0, .4), 0 0 34px rgba(255, 205, 140, .5); }
.prog-join:active { transform: scale(.97); }
.prog-join:focus-visible { box-shadow: 0 0 0 3px #fff3df; }
.prog-foot { margin: 12px 0 0; font-size: 11.5px; letter-spacing: .12em; line-height: 1.7; color: var(--mut); }
@media (max-height: 700px) and (min-width: 821px) { .prog-foot { display: none; } .prog { padding-top: 24px; } .prog-sec { padding: 6px 6px 8px; } }

@media (max-width: 820px), (max-aspect-ratio: 1/1) {
  .prog { position: relative; right: auto; top: auto; width: auto; max-height: none; margin: -4% 16px 0; padding: 34px 22px 22px; border-radius: 46vw 46vw 18px 18px / 26vw 26vw 18px 18px; }
  .prog .t-date { font-size: 60px; }
  .prog-label { font-size: 14px; }
  .prog .t-line, .prog .t-name { font-size: 15.5px; }
  .prog .c-title { font-size: 16.5px; } .prog .c-desc { font-size: 14px; }
  .prog-join { min-height: 54px; font-size: 17px; }
  .prog-foot { font-size: 13px; }
}

/* 「立即加入我們！」加強：暖光暈＋定時掃過的光＋兩顆閃爍的星 */
.mjoin { isolation: isolate; animation: none; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); }
.mjoin::before {                      /* 後面一團會呼吸的暖光 */
  content: ""; position: absolute; inset: -70% -26%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 222, 165, .95), rgba(255, 190, 120, .45) 45%, rgba(255, 170, 110, .12) 70%, transparent);
  animation: joinGlow 2.8s ease-in-out infinite;
}
@keyframes joinGlow { 0%, 100% { opacity: .7; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.08); } }
.mjoin::after {                       /* 每隔幾秒掃過一道光 */
  content: ""; position: absolute; inset: 6% 3%; border-radius: 12% / 34%; pointer-events: none; overflow: hidden;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 244, 220, .55) 48%, rgba(255, 255, 255, .8) 50%, rgba(255, 244, 220, .55) 52%, transparent 62%) no-repeat;
  background-size: 260% 100%; background-position: 130% 0; mix-blend-mode: screen;
  animation: joinSweep 3.6s ease-in-out infinite 1s;
}
@keyframes joinSweep { 0%, 55% { background-position: 130% 0; } 85%, 100% { background-position: -30% 0; } }
.mjoin img { box-shadow: 0 0 0 2px rgba(245, 212, 160, 1), 0 0 26px 4px rgba(255, 210, 150, .75); }
.join-spark { position: absolute; width: 14px; height: 14px; pointer-events: none; background: #fff3d6;
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  filter: drop-shadow(0 0 4px #ffd89a); animation: twinkle 2.4s ease-in-out infinite; }
.join-spark.s1 { top: -6px; right: 8%; } .join-spark.s2 { bottom: -4px; left: 6%; width: 10px; height: 10px; animation-delay: -1.2s; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@media (hover: hover) { .mjoin:hover { transform: scale(1.06); } .mjoin:hover::before { opacity: 1; } }

/* 手機：第一頁底部的「往下看」提示 */
.scroll-cue { display: none; position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); translate: -50% 0; z-index: 3;
  flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; color: #f6e5d4; font: inherit; font-size: 13px; letter-spacing: .2em; cursor: pointer;
  text-shadow: 0 1px 8px rgba(20, 10, 14, .9); }
.scroll-cue svg { width: 22px; height: 22px; fill: none; stroke: #e9c995; stroke-width: 1.6; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(6px); opacity: 1; } }
@media (max-width: 820px), (max-aspect-ratio: 1/1) { .scroll-cue { display: flex; } }
@media (max-width: 820px), (max-aspect-ratio: 1/1) { .hint { display: none; } .scroll-cue { font-size: 12.5px; } }
.first-quote { display: none; }
@media (max-width: 820px), (max-aspect-ratio: 1/1) {
  /* 手機第一頁：標題在上、牌在正中間、引言和「往下看」在下面 */
  .first-quote { display: block; position: absolute; left: 0; right: 0; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 52px); z-index: 3; margin: 0;
    text-align: center; font-size: 13.5px; line-height: 2; letter-spacing: .14em; color: #f4e3d6; text-shadow: 0 1px 8px rgba(20, 10, 14, .95); pointer-events: none; }
  .quote { display: none; }
  .titleblock { top: max(64px, 9svh); }
}

/* 右上角：簡約色塊圖示（不做成按鈕的樣子） */
.controls { gap: 10px; }
.ico {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(240, 214, 196, .9); color: #4a2f33;
  box-shadow: 0 4px 14px rgba(20, 10, 14, .35); transition: transform .15s, background .2s;
}
.ico svg { width: 20px; height: 20px; fill: currentColor; }
.ico svg .cut { fill: none; stroke: rgba(240, 214, 196, 1); stroke-width: 1.6; stroke-linecap: round; }
.ico .ico-on { display: none; }
.ico[aria-pressed="true"] { background: #e9c995; }
.ico[aria-pressed="true"] .ico-on { display: block; }
.ico[aria-pressed="true"] .ico-off { display: none; }
.ico:hover { background: #f6e3d4; }
.ico:active { transform: scale(.92); }
.ico:focus-visible { outline: 2px solid #fff3df; outline-offset: 2px; }
@media (max-width: 820px), (max-aspect-ratio: 1/1) { .ico { width: 38px; height: 38px; } }
