/* ===== 議題共創基地 v2：正式議題卡＋卡桌＋工作室 ===== */
.btn--s { height: 46px; padding: 0 16px 0 20px; font-size: 14px; }
.btn--block { width: 100%; justify-content: space-between; }
.paper.reference { user-select: none; -webkit-user-select: none; }
.paper.reference a { pointer-events: auto; }

/* HERO */
.tbh { position: relative; overflow-x: clip; min-height: 100vh; min-height: 100svh; padding: calc(var(--bar-h) + 5vh) var(--gutter) 9vh; display: grid; grid-template-rows: auto 1fr; }
.tbh__grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 4vw; align-items: center; }
.tbh__copy { position: relative; z-index: 3; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; max-width: 620px; }
.mode { position: relative; display: grid; gap: 6px; padding: 22px 24px; border-radius: 22px; border: 1px solid var(--bone-faint); background: rgba(10,10,13,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; isolation: isolate; transition: border-color .4s; }
.mode::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 120% at 0% 100%, rgba(255,45,31,.28), transparent 60%); opacity: 0; transition: opacity .5s; }
.mode:hover { border-color: var(--red); } .mode:hover::before { opacity: 1; }
.mode span { color: var(--red); }
.mode b { font-family: var(--serif); font-weight: 900; font-size: clamp(24px, 2.2vw, 34px); }
.mode small { color: var(--bone-dim); font-size: 13px; }
.mode--red { background: linear-gradient(140deg, rgba(255,45,31,.9), rgba(163,13,6,.9)); border-color: transparent; }
.mode--red span, .mode--red small { color: rgba(255,255,255,.85); }
.altar { position: relative; height: min(64vh, 620px); perspective: 1800px; transform-style: preserve-3d; cursor: pointer; --gx: 50%; --gy: 30%; }
.altar__stack { position: absolute; inset: 0; transform-style: preserve-3d; }
.altar__card { position: absolute; left: 4%; top: 18%; width: 88%; transform-style: preserve-3d; will-change: transform; }
.altar__card .paper { box-shadow: 0 50px 100px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.08) !important; }
.altar__glare { position: absolute; inset: 10% 0; z-index: 20; pointer-events: none; mix-blend-mode: soft-light; background: radial-gradient(40% 50% at var(--gx) var(--gy), rgba(255,255,255,.55), transparent 70%); border-radius: 8px; }

/* 議題思辨：卡桌 */
.think { padding: 16vh 0 12vh; overflow: hidden; }
.think__head, .think > .chips, .stage__bar, .catedit, .discuss { margin-left: var(--gutter); margin-right: var(--gutter); }
.think__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 3vh; }
.think__tools { display: flex; gap: 12px; align-items: center; }
.think > .chips { margin-bottom: 4vh; }
.search { position: relative; }
.search input { width: min(320px, 70vw); height: 46px; border-radius: 999px; border: 1px solid var(--bone-faint); background: rgba(10,10,13,.6); color: var(--bone); padding: 0 44px 0 20px; font: inherit; }
.search input:focus { outline: none; border-color: var(--red); }
.search i { position: absolute; right: 18px; top: 50%; translate: 0 -50%; font-style: normal; color: var(--bone-dim); }
.stage { position: relative; height: min(72vw * .707, 720px); height: clamp(320px, calc(min(66vw, 1000px) * .707 + 60px), 760px); perspective: 2000px; outline: none; touch-action: pan-y pinch-zoom; }
.deck { position: absolute; inset: 0; transform-style: preserve-3d; }
.slide { position: absolute; left: 50%; top: 30px; translate: -50% 0; transform-style: preserve-3d; cursor: pointer; will-change: transform, opacity; }
.slide .paper { box-shadow: 0 40px 90px -30px rgba(0,0,0,.9) !important; transition: filter .6s; }
.slide:not(.is-active) .paper { filter: saturate(.6) brightness(.8); }
.slide.is-active { cursor: default; }
.barrage { position: absolute; inset: 0 0 auto; height: 34%; z-index: 80; overflow: hidden; pointer-events: none; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.bullet { position: absolute; left: 0; white-space: nowrap; padding: 7px 16px; border-radius: 999px; font-size: 14px; color: #fff; background: rgba(6,6,7,.62); border: 1px solid rgba(243,238,230,.15); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); will-change: transform; box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.bullet--mine { background: var(--red); border-color: transparent; font-weight: 700; box-shadow: 0 10px 30px rgba(255,45,31,.6); }
.stage__stamp { position: absolute; z-index: 90; right: calc(50% - min(33vw, 500px) + 3%); bottom: 6%; width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--red); color: var(--red); display: grid; place-content: center; text-align: center; font-family: var(--serif); font-weight: 900; font-size: 22px; line-height: 1.1; transform: rotate(-12deg); opacity: 0; pointer-events: none; mix-blend-mode: multiply; background: rgba(255,45,31,.06); }
.stage__stamp small { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; font-weight: 400; }
.stage__stamp::before { content: ""; position: absolute; inset: 7px; border: 1px solid var(--red); border-radius: 50%; }
.stage__stamp.is-on { opacity: 1; }
.stage__empty { position: absolute; inset: 0; display: grid; place-content: center; color: var(--bone-dim); text-align: center; }
.stage__empty a { color: var(--red); }
.stage__empty .text-link { justify-self: center; margin-top: 12px; }
.stage__bar { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 2vh; flex-wrap: wrap; }
.stage__count { color: var(--bone-dim); margin: 0; }
.stage__count b { color: var(--bone); font-weight: 500; }
.catedit { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 12px; }
.catedit select { height: 38px; border-radius: 10px; background: #141418; color: var(--bone); border: 1px solid var(--bone-faint); padding: 0 10px; }

/* 對話現場 */
.discuss { display: grid; grid-template-columns: .9fr 1.1fr; gap: 18px; margin-top: 6vh; align-items: start; }
.speak, .crowd { border-radius: 28px; padding: clamp(22px, 2.6vw, 36px); }
.speak { position: sticky; top: calc(var(--bar-h) + 16px); background: linear-gradient(160deg, #1b0907, #0d0606 70%); border: 1px solid rgba(255,45,31,.4); display: grid; gap: 12px; }
.speak__tag { color: var(--red); margin: 0; }
.speak h3, .crowd h3 { font-family: var(--serif); font-weight: 900; font-size: clamp(28px, 2.6vw, 40px); margin: 0; line-height: 1.2; }
.speak__lead { margin: 0; color: var(--bone-dim); }
.speak__box { position: relative; }
.speak__box textarea { width: 100%; border-radius: 18px; border: 1px solid rgba(243,238,230,.16); background: rgba(255,255,255,.035); color: var(--bone); padding: 16px 64px 30px 18px; font: inherit; font-size: 17px; line-height: 1.7; resize: none; transition: border-color .3s, box-shadow .4s; }
.speak__box textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 6px rgba(255,45,31,.12); }
.ring { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: rgba(243,238,230,.12); stroke-width: 3; }
.ring .ring__fill { stroke: var(--red); stroke-linecap: round; transition: stroke-dashoffset .3s var(--ease), stroke .3s; }
.ring .ring__fill.is-near { stroke: var(--ember); }
.speak__count { position: absolute; right: 16px; bottom: 12px; color: var(--bone-dim); font-size: 10px; }
.speak__row { display: flex; gap: 12px; align-items: center; }
.speak__name { flex: 1; }
.speak__name input { width: 100%; height: 48px; border-radius: 14px; border: 1px solid var(--bone-faint); background: rgba(255,255,255,.03); color: var(--bone); padding: 0 14px; font: inherit; }
.speak__name input:disabled { opacity: .6; }
.speak__name input:focus { outline: none; border-color: var(--red); }
.toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--bone-dim); }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle i { width: 42px; height: 24px; border-radius: 999px; background: rgba(243,238,230,.16); position: relative; transition: background .3s; }
.toggle i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .4s var(--ease); }
.toggle input:checked + i { background: var(--red); }
.toggle input:checked + i::after { transform: translateX(18px); }
.toggle input:focus-visible + i { outline: 2px solid var(--red); outline-offset: 3px; }
.speak__note { margin: 0; font-size: 12px; color: var(--bone-dim); }
.speak__status { margin: 0; min-height: 1.4em; font-size: 14px; font-weight: 700; color: var(--bone); }
.crowd { background: rgba(14,14,18,.8); border: 1px solid rgba(243,238,230,.1); display: grid; gap: 16px; }
.crowd h3 b { font-family: var(--latin); font-weight: 400; font-size: 1.5em; color: var(--red); display: inline-block; margin-left: 6px; }
.voices { display: grid; gap: 12px; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.voices__empty { color: var(--bone-dim); margin: 0; padding: 30px 0; text-align: center; }
.voice { padding: 18px 20px; border-radius: 18px; background: rgba(243,238,230,.04); border: 1px solid var(--bone-faint); }
.voice.is-fresh { border-color: var(--red); background: rgba(255,45,31,.1); box-shadow: 0 0 40px rgba(255,45,31,.18); }
.voice__who { font-size: 13px; color: var(--red); }
.voice p { margin: 6px 0 10px; line-height: 1.75; font-size: 16px; }
.voice__acts { display: flex; gap: 18px; font-size: 13px; color: var(--bone-dim); }
.voice__acts button:hover { color: var(--bone); }
.like[aria-pressed="true"] { color: var(--red); }
.like__h { display: inline-block; font-size: 16px; }
.voice__replies .reply { margin-top: 10px; padding: 10px 14px; border-left: 2px solid var(--red); background: rgba(6,6,7,.4); border-radius: 0 12px 12px 0; }
.reply strong { font-size: 12px; color: var(--bone-dim); }
.reply p { margin: 4px 0 0; font-size: 14px; }
.voice__edited { margin-left: 8px; font-size: 11px; font-style: normal; font-weight: 400; color: var(--bone-dim); opacity: .8; }
.reply__edit { margin-top: 4px; font-size: 12px; color: var(--bone-dim); }
.reply__edit:hover { color: var(--bone); }
.rform { display: grid; gap: 8px; margin-top: 10px; }
.rform textarea { width: 100%; border-radius: 14px; border: 1px solid var(--bone-faint); background: rgba(255,255,255,.03); color: var(--bone); padding: 12px 14px; font: inherit; resize: vertical; }
.rform textarea:focus { outline: none; border-color: var(--red); }
.rform > div { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.crowd__cta { justify-self: start; font-weight: 700; color: var(--red); }

/* 議題工作室 */
.studio { padding: 18vh var(--gutter) 14vh; }
.studio__head { display: grid; gap: 20px; margin-bottom: 6vh; }
.studio__head .lead { margin: 0; }
.mine { margin-bottom: 5vh; }
.mine > p { color: var(--bone-dim); margin: 0 0 12px; }
.mine__row { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 14px; scrollbar-width: thin; }
.mine__login { height: 52px; padding: 0 22px; border-radius: 999px; border: 1px dashed rgba(255,45,31,.6); color: var(--bone); font-weight: 700; }
.mine__login:hover { background: rgba(255,45,31,.1); }
.mine__new { flex: 0 0 auto; width: 160px; aspect-ratio: 297/210; border-radius: 10px; border: 1px dashed rgba(255,45,31,.6); display: grid; place-content: center; justify-items: center; color: var(--red); font-size: 34px; line-height: 1; }
.mine__new span { font-size: 13px; color: var(--bone); margin-top: 6px; }
.mine__card { flex: 0 0 auto; width: 220px; border-radius: 6px; transition: transform .5s var(--ease), box-shadow .4s; outline-offset: 4px; }
.mine__card .paper { pointer-events: none; }
.mine__card:hover { transform: translateY(-6px); }
.mine__card.is-on { box-shadow: 0 0 0 2px var(--red), 0 20px 40px -10px rgba(255,45,31,.6); }
.studio__grid { display: grid; grid-template-columns: minmax(340px, .8fr) 1.2fr; gap: 4vw; align-items: start; }
.editor { display: grid; gap: 18px; }
.editor__top { display: flex; justify-content: space-between; color: var(--bone-dim); }
.editor__mode { color: var(--red); margin: 0; }
.editor h3 { font-family: var(--serif); font-weight: 900; font-size: clamp(26px, 2.4vw, 36px); margin: 0 0 6px; }
.efield { position: relative; display: grid; gap: 8px; padding: 16px 18px; border-radius: 18px; border: 1px solid transparent; background: rgba(255,255,255,.025); transition: border-color .4s, background .4s; }
.efield.is-focus { border-color: rgba(255,45,31,.55); background: rgba(255,45,31,.06); }
.efield > span { font-weight: 700; font-size: 14px; }
.efield em { font-style: normal; font-size: 11px; color: var(--red); margin-left: 6px; font-weight: 500; }
.efield em.opt { color: var(--bone-dim); }
.efield textarea, .efield input { width: 100%; border: 0; border-bottom: 1px solid var(--bone-faint); background: transparent; color: var(--bone); padding: 8px 0; font: inherit; font-size: 17px; line-height: 1.7; resize: vertical; }
.efield[data-field="title"] textarea { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.efield textarea:focus, .efield input:focus { outline: none; border-bottom-color: var(--red); }
.efield small { justify-self: end; color: var(--bone-dim); font-size: 10px; }
.efield__status { margin: 0; color: var(--bone-dim); min-height: 1.2em; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--bone-faint); font-size: 13px; transition: .3s var(--ease); }
.pills button:hover { border-color: var(--red); }
.pills button[aria-checked="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.efield .text-link { justify-self: start; font-size: 13px; }
.newcat { display: flex; gap: 10px; align-items: center; }
.newcat input { flex: 1; }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.meter__bar { height: 6px; border-radius: 999px; background: rgba(243,238,230,.1); overflow: hidden; }
.meter__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--ember)); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px var(--red); }
.meter span { color: var(--bone-dim); font-size: 11px; }
.editor__actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.editor__note { margin: 0; font-size: 13px; color: var(--bone-dim); }
.desk { position: sticky; top: calc(var(--bar-h) + 20px); display: grid; gap: 14px; }
.desk__head, .desk__foot { display: flex; justify-content: space-between; color: var(--bone-dim); }
.desk__head span:last-child { display: flex; align-items: center; gap: 8px; color: var(--red); }
.desk__stage { position: relative; padding: clamp(24px, 3.4vw, 56px); border-radius: 30px; perspective: 1600px; transform-style: preserve-3d; isolation: isolate; --gx: 50%; --gy: 20%;
  background: radial-gradient(70% 90% at 50% 0%, rgba(255,230,200,.16), transparent 60%), linear-gradient(170deg, #1d1611, #0c0a09 80%); border: 1px solid rgba(243,238,230,.08); box-shadow: inset 0 -40px 80px rgba(0,0,0,.5); }
.desk__light { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(38% 46% at var(--gx) var(--gy), rgba(255,240,220,.18), transparent 70%); pointer-events: none; }
.desk__stage .paper { box-shadow: 0 50px 90px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.1) !important; transform: translateZ(30px); }
.paper.is-blank h3 { color: #b4ad9c !important; }
.paper .is-lit { outline: 2px solid rgba(255,45,31,.75); outline-offset: .6cqw; border-radius: .4cqw; background: rgba(255,45,31,.07); box-shadow: 0 0 0 .4cqw rgba(255,45,31,.1); transition: outline-color .3s; }
.desk__hint { margin: 0; color: var(--bone-dim); font-size: 14px; }

/* 總覽 */
.overview { position: fixed; inset: 0; z-index: 170; background: rgba(6,6,7,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: grid; grid-template-rows: auto 1fr; }
.overview__bar { display: flex; justify-content: space-between; align-items: center; padding: 18px var(--gutter); }
.overview__bar h2 { font-family: var(--serif); font-weight: 900; font-size: 26px; margin: 0; }
.overview__bar h2 span { color: var(--red); font-size: 12px; margin-left: 10px; }
.overview__grid { overflow-y: auto; overscroll-behavior: contain; padding: 10px var(--gutter) 6vh; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; align-content: start; }
.ov__item { position: relative; border-radius: 4px; transition: transform .5s var(--ease); }
.ov__item .paper { pointer-events: none; }
.ov__item:hover { transform: translateY(-8px) rotate(-.6deg); }
.ov__badge { position: absolute; top: -10px; right: -8px; padding: 5px 10px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; box-shadow: 0 6px 16px rgba(255,45,31,.5); }

/* 確認框、提示、碎片 */
.confirm { width: min(460px, calc(100vw - 32px)); border: 1px solid rgba(255,45,31,.4); border-radius: 24px; padding: 32px; background: #111114; color: var(--bone); }
.confirm::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(6px); }
.confirm p.mono { color: var(--red); margin: 0 0 8px; }
.confirm h3 { font-family: var(--serif); font-size: 26px; margin: 0 0 10px; }
.confirm > p:not(.mono) { color: var(--bone-dim); }
.confirm div { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.confirm .btn { height: 48px; padding: 0 20px; }
/* 刪除議題：確認視窗與按鈕（2026-11-10） */
.editor__delete { margin-left: auto; color: #ff8f86; opacity: .85; }
.editor__delete:hover, .editor__delete:focus-visible { opacity: 1; text-decoration: underline; }
.confirm__quote { font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--bone) !important; padding: 12px 16px; border-left: 2px solid var(--red); background: rgba(255,45,31,.06); border-radius: 0 12px 12px 0; margin: 4px 0 12px; }
.confirm__impact { margin: 0; padding-left: 20px; color: var(--bone-dim); font-size: 14px; line-height: 1.8; }
.confirm__impact b { color: var(--bone); }
.save-undo { margin-left: 10px; font: inherit; color: var(--red); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 6px 2px; }
@media (max-width: 600px) { .confirm div { flex-direction: column-reverse; } .confirm .btn { width: 100%; justify-content: center; } }
.toast { position: fixed; z-index: 260; left: 50%; bottom: 32px; translate: -50% 0; padding: 14px 24px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700; box-shadow: 0 20px 50px rgba(255,45,31,.5); opacity: 0; pointer-events: none; white-space: nowrap; }
.spark { position: fixed; left: 0; top: 0; z-index: 300; width: 9px; height: 9px; margin: -4px 0 0 -4px; background: var(--red); border-radius: 2px; pointer-events: none; }
.spark:nth-child(3n) { background: var(--ember); }
.spark:nth-child(4n) { background: var(--bone); width: 6px; height: 6px; }
.spark--q { width: auto; height: auto; background: none !important; color: var(--red); font-family: var(--serif); font-weight: 900; font-size: 22px; font-style: normal; }

@media (max-width: 1100px) {
  .tbh__grid { grid-template-columns: 1fr; }
  .altar { height: 46vh; margin-top: 4vh; }
  .discuss, .studio__grid { grid-template-columns: 1fr; }
  .speak, .desk { position: relative; top: 0; }
  .desk { order: -1; }
}
@media (max-width: 760px) {
  .tbh .phero__title { font-size: 11.6vw; }
  .modes { grid-template-columns: 1fr; }
  .altar { height: 34vh; }
  .altar__card { left: 2%; width: 92%; top: 10%; }
  .stage { height: calc(90vw * .707 + 50px); }
  .stage__stamp { width: 84px; height: 84px; font-size: 16px; right: 8%; bottom: 2%; }
  .bullet { font-size: 12px; padding: 5px 12px; }
  .think__tools { width: 100%; }
  .search input { width: 100%; }
  .search { flex: 1; }
  .desk__stage { padding: 14px; border-radius: 20px; }
  .overview__grid { grid-template-columns: 1fr; }
  .toast { white-space: normal; width: calc(100vw - 32px); text-align: center; }
}
.tbh .phero__title { font-size: clamp(44px, 6vw, 104px); }
@media (max-width: 1100px) {
  /* 手機與平板：編輯時預覽卡固定在上方，一邊寫一邊看 */
  .desk { position: sticky; top: 8px; z-index: 6; padding: 8px; margin: 0 -8px; border-radius: 22px; background: rgba(6,6,7,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .desk__foot, .desk__hint { display: none; }
  .desk__stage { padding: 10px; }
}

/* ===== 對話現場 v2：點 QR Code，卡片浮起佔左 2/3，右側留言分頁 ===== */
.slide.is-active .qr { cursor: pointer; }
.slide.is-active .qr svg { animation: qrPulse 2.2s ease-in-out infinite; }
@keyframes qrPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,45,31,0); } 50% { box-shadow: 0 0 0 .9cqw rgba(255,45,31,.28); } }
.slide.is-active .qr::after { content: "點我留言 ↗"; position: absolute; left: 50%; top: -3.4cqw; translate: -50% 0; white-space: nowrap; padding: .5cqw 1.2cqw; border-radius: 999px; background: #ff2d1f; color: #fff; font-size: 1.35cqw; font-weight: 700; letter-spacing: .04em; box-shadow: 0 .6cqw 1.6cqw rgba(255,45,31,.45); animation: qrHint 2.2s ease-in-out infinite; }
@keyframes qrHint { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.5cqw); } }
.reduce-motion .slide.is-active .qr svg, .reduce-motion .slide.is-active .qr::after { animation: none; }

.invite { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; margin: 4vh var(--gutter) 0; }
.invite__btn { display: inline-flex; align-items: center; gap: 16px; padding: 14px 18px 14px 22px; border-radius: 999px; background: linear-gradient(135deg, #ff2d1f, #b8140b); color: #fff; text-align: left; box-shadow: 0 20px 50px -18px rgba(255,45,31,.9); transition: transform .5s var(--ease); }
.invite__btn span:not(.invite__dot) { display: grid; }
.invite__btn b { font-size: 17px; }
.invite__btn small { font-size: 12px; opacity: .85; }
.invite__btn i { font-style: normal; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); }
.invite__dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: pulse 1.8s infinite; }
.invite__count { color: var(--bone-dim); margin: 0; }
.invite__count b { color: var(--red); font-family: var(--latin); font-size: 26px; font-weight: 400; margin-right: 4px; }

.focus { position: fixed; inset: 0; z-index: 168; display: grid; grid-template-columns: 2fr 1fr; }
.focus__bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 33% 50%, rgba(60,30,20,.55), rgba(6,6,7,.96) 70%), rgba(6,6,7,.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.focus__left { position: relative; display: grid; grid-template-rows: auto 1fr auto; padding: 22px clamp(20px, 3vw, 56px); min-width: 0; perspective: 2000px; }
.focus__top { display: flex; justify-content: space-between; align-items: center; color: var(--red); }
.focus__nav { display: flex; align-items: center; gap: 12px; color: var(--bone-dim); }
.focus__nav .arrow { width: 46px; height: 46px; }
.focus__card { position: relative; align-self: center; width: min(100%, calc((100vh - 170px) * 1.414)); justify-self: center; }
.focus__card .paper { box-shadow: 0 60px 120px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(0,0,0,.1) !important; will-change: transform; }
.focus__card .qr { cursor: pointer; }
.barrage--focus { position: absolute; left: 0; right: 0; top: -8%; height: 40%; z-index: 5; }
.focus__stamp { right: 4%; bottom: -6%; }
.focus__hint { color: var(--bone-dim); text-align: center; margin: 0; }
.focus__panel { position: relative; display: grid; grid-template-rows: auto auto 1fr; min-width: 0; height: 100vh; height: 100dvh; background: linear-gradient(180deg, #160807, #0b0b0e 40%); border-left: 1px solid rgba(255,45,31,.35); box-shadow: -40px 0 80px rgba(0,0,0,.5); }
.focus__head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px 10px; }
.focus__head p { color: var(--red); margin: 0; }
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin: 6px 24px 0; border-bottom: 1px solid var(--bone-faint); }
.tabs button { height: 54px; font-weight: 700; font-size: 16px; color: var(--bone-dim); transition: color .3s; }
.tabs button[aria-selected="true"] { color: var(--bone); }
.tabs button b { font-family: var(--latin); font-weight: 400; font-size: 22px; color: var(--red); margin-left: 4px; }
.tabs__ink { position: absolute; left: 0; bottom: -1px; height: 3px; width: 50%; border-radius: 2px; background: var(--red); box-shadow: 0 0 12px var(--red); }
.panes { position: relative; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px 28px; }
.pane[hidden] { display: none !important; }
.pane .speak { position: static; padding: 0; border: 0; background: none; border-radius: 0; }
.pane .speak h3 { font-size: clamp(26px, 2.2vw, 34px); }
.pane .voices { max-height: none; overflow: visible; }
.pane .crowd__cta { display: inline-block; margin-top: 18px; }

@media (max-width: 1100px) {
  .focus { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .focus__left { padding: 14px 16px 6px; grid-template-rows: auto auto; gap: 10px; }
  .focus__card { width: 100%; }
  .focus__hint { display: none; }
  .focus__panel { height: auto; min-height: 0; border-left: 0; border-top: 1px solid rgba(255,45,31,.35); border-radius: 24px 24px 0 0; overflow: hidden; }
  .focus__head { padding: 14px 18px 4px; }
  .tabs { margin: 0 18px; }
  .panes { padding: 16px 18px 22px; }
  .focus__stamp { width: 70px; height: 70px; font-size: 13px; bottom: -4%; }
  /* 窄螢幕整個對話現場一起捲：卡片捲上去後，輸入區與觀點列表完整可見 */
  .focus { grid-template-rows: auto auto; overflow-y: auto; overscroll-behavior: contain; }
  .focus__bg { position: fixed; }
  .focus__panel, .panes { overflow: visible; }
  .panes { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .forge__scroll { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
}
@media (max-width: 1100px) and (min-width: 761px) { .focus__card { width: min(100%, calc(46vh * 1.414)); } }

/* ===== 議題卡解剖：大卡＋位置標註 ===== */
.anat { position: relative; display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2.6fr) minmax(200px, 1fr); gap: clamp(20px, 3vw, 56px); align-items: stretch; margin-top: 2vh; }
.anat__col { list-style: none; margin: 0; padding: 4% 0; display: flex; flex-direction: column; justify-content: space-around; gap: 18px; }
.anat__note { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; align-items: start; cursor: default; transition: transform .5s var(--ease); }
.anat__note--R { grid-template-columns: 1fr 34px; text-align: right; }
.anat__note--R .anat__num { grid-column: 2; grid-row: 1 / span 2; }
.anat__note--R b, .anat__note--R small { grid-column: 1; }
.anat__num { grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,45,31,.6); color: var(--red); font-size: 11px; transition: background .3s, color .3s, box-shadow .3s; }
.anat__note b { font-family: var(--serif); font-weight: 900; font-size: clamp(17px, 1.35vw, 21px); line-height: 1.35; }
.anat__note small { color: var(--bone-dim); font-size: 13px; line-height: 1.6; }
.anat__note.is-on .anat__num { background: var(--red); color: #fff; box-shadow: 0 0 20px rgba(255,45,31,.7); }
.anat__note.is-on { transform: translateX(6px); }
.anat__note--R.is-on { transform: translateX(-6px); }
.anat__stage { position: relative; align-self: center; perspective: 1600px; }
.anat__card { position: relative; z-index: 1; }
.anat__card .paper { box-shadow: 0 60px 120px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(0,0,0,.1) !important; }
.anat__card .paper a { pointer-events: none; }
.anat__lines { position: absolute; left: 0; top: 0; z-index: 2; overflow: visible; pointer-events: none; }
.anat__lines path { fill: none; stroke: rgba(255,45,31,.55); stroke-width: 1; transition: stroke .3s, stroke-width .3s; }
.anat__lines path.is-on { stroke: var(--red); stroke-width: 2; filter: drop-shadow(0 0 4px rgba(255,45,31,.8)); }
.anat__pin { position: absolute; z-index: 3; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 10px; box-shadow: 0 0 0 4px rgba(255,45,31,.18), 0 6px 14px rgba(0,0,0,.4); cursor: default; transition: transform .4s var(--ease); }
.anat__pin::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(255,45,31,.6); animation: pinRing 2.4s ease-out infinite; }
@keyframes pinRing { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.anat__pin.is-on { transform: scale(1.3); }
.reduce-motion .anat__pin::after { animation: none; }
.anat__cta { display: flex; justify-content: center; margin: 7vh 0 8vh; }
.forge-btn { position: relative; display: inline-flex; align-items: center; gap: 18px; padding: 18px 20px 18px 30px; border-radius: 999px; color: #fff; text-align: left; background: linear-gradient(135deg, #ff2d1f, #a30d06); box-shadow: 0 30px 70px -20px rgba(255,45,31,.9), inset 0 1px 0 rgba(255,255,255,.25); isolation: isolate; }
.forge-btn span:not(.forge-btn__ring) { display: grid; }
.forge-btn b { font-family: var(--serif); font-weight: 900; font-size: clamp(22px, 2vw, 30px); }
.forge-btn small { opacity: .85; font-size: 13px; }
.forge-btn i { font-style: normal; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); font-size: 22px; transition: transform .6s var(--ease); }
.forge-btn:hover i { transform: rotate(-20deg) scale(1.1); }
.forge-btn__ring { position: absolute; inset: -8px; z-index: -1; border-radius: inherit; border: 1px solid rgba(255,45,31,.6); animation: forgeRing 2.4s ease-out infinite; }
@keyframes forgeRing { from { transform: scale(.96); opacity: 1; } to { transform: scale(1.12); opacity: 0; } }

/* ===== 議題工作台：左側輸入、議題卡在右側 2/3 ===== */
.forge { position: fixed; inset: 0; z-index: 168; display: grid; grid-template-columns: 1fr 2fr; }
.forge__bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 66% 50%, rgba(70,45,25,.5), rgba(6,6,7,.96) 70%), rgba(6,6,7,.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.forge__panel { position: relative; z-index: 2; display: grid; grid-template-rows: auto 1fr; height: 100vh; height: 100dvh; min-width: 0; background: linear-gradient(180deg, #160807, #0b0b0e 40%); border-right: 1px solid rgba(255,45,31,.35); box-shadow: 40px 0 80px rgba(0,0,0,.5); }
.forge__head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px 8px; }
.forge__head p { color: var(--red); margin: 0; }
.forge__scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 24px 32px; }
.forge__scroll .editor { gap: 14px; }
.forge__scroll .editor h3 { font-size: clamp(24px, 2vw, 30px); }
.forge__right { position: relative; display: grid; align-content: center; padding: 30px clamp(20px, 3vw, 60px); min-width: 0; }
.forge__right .desk { position: static; width: min(100%, calc((100vh - 200px) * 1.414 + 80px)); justify-self: center; margin: 0; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.forge__right .desk__hint { display: block; }

@media (max-width: 1100px) {
  .anat { grid-template-columns: 1fr; gap: 24px; }
  .anat__stage { order: -1; }
  .anat__col { padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
  .anat__note--R { grid-template-columns: 34px 1fr; text-align: left; }
  .anat__note--R .anat__num { grid-column: 1; }
  .anat__note--R b, .anat__note--R small { grid-column: 2; }
  .anat__lines { display: none; }
  .forge { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .forge__right { order: -1; padding: 12px 14px 6px; }
  .forge__right .desk { width: 100%; position: static; }
  .forge__right .desk__hint, .forge__right .desk__head { display: none; }
  .forge__right .desk__stage { padding: 8px; border-radius: 16px; }
  .forge__panel { height: auto; min-height: 0; border-right: 0; border-top: 1px solid rgba(255,45,31,.35); border-radius: 24px 24px 0 0; overflow: hidden; }
}
@media (max-width: 760px) {
  .anat__col { grid-template-columns: 1fr; }
  .anat__pin { width: 20px; height: 20px; margin: -10px 0 0 -10px; font-size: 8px; }
  .forge-btn { padding: 14px 14px 14px 22px; }
}

/* ===== 分類泡泡選單 ===== */
.catpick { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px 12px 12px; border-radius: 999px; border: 1px solid rgba(243,238,230,.16); background: rgba(255,255,255,.035); text-align: left; transition: border-color .4s, background .4s, transform .5s var(--ease); }
.catpick:hover, .catpick[aria-expanded="true"] { border-color: var(--red); background: rgba(255,45,31,.08); }
.catpick__orb { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff, #ff6a4d 30%, #a30d06 75%); box-shadow: 0 0 22px rgba(255,45,31,.6), inset -4px -6px 10px rgba(0,0,0,.35); animation: orbBreath 2.6s ease-in-out infinite; }
.catpick[data-family="field"] .catpick__orb { background: radial-gradient(circle at 32% 28%, #fff, #efe6d6 35%, #9d9180 80%); box-shadow: 0 0 22px rgba(243,238,230,.35), inset -4px -6px 10px rgba(0,0,0,.3); }
.catpick[data-family="other"] .catpick__orb, .catpick[data-family="custom"] .catpick__orb { background: radial-gradient(circle at 32% 28%, #fff, #9b9ca6 40%, #3a3a44 85%); box-shadow: 0 0 18px rgba(155,156,166,.4), inset -4px -6px 10px rgba(0,0,0,.35); }
@keyframes orbBreath { 50% { transform: scale(1.08); } }
.catpick__txt { display: grid; flex: 1; }
.catpick__txt b { font-family: var(--serif); font-weight: 900; font-size: 20px; }
.catpick__txt small { font-size: 12px; color: var(--bone-dim); }
.catpick i { font-style: normal; color: var(--red); font-size: 18px; transition: transform .6s var(--ease); }
.catpick:hover i { transform: rotate(90deg) scale(1.2); }

.bubbles { position: fixed; inset: 0; z-index: 190; display: grid; place-items: center; padding: 6vh var(--gutter); overflow-y: auto; }
.bubbles__bg { position: fixed; inset: 0; background: radial-gradient(60% 60% at 50% 50%, rgba(40,10,8,.75), rgba(4,4,5,.94)); backdrop-filter: blur(14px) saturate(.8); -webkit-backdrop-filter: blur(14px) saturate(.8); }
.bubbles__wrap { position: relative; display: grid; gap: 4vh; justify-items: center; max-width: 980px; width: 100%; }
.bgroup { display: grid; justify-items: center; gap: 16px; }
.bgroup__title { margin: 0; display: flex; align-items: baseline; gap: 12px; }
.bgroup__title b { font-family: var(--serif); font-weight: 900; font-size: 20px; }
.bgroup__title span { color: var(--red); font-size: 10px; }
.bgroup__cells { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: 760px; }
.bubble { position: relative; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 900; font-size: 19px; color: #fff; will-change: transform;
  background: radial-gradient(circle at 30% 26%, rgba(255,255,255,.55), rgba(255,255,255,0) 32%), radial-gradient(circle at 50% 60%, #ff4a35, #a30d06 78%);
  box-shadow: 0 14px 30px -10px rgba(255,45,31,.7), inset -6px -10px 18px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.15); transition: box-shadow .4s, filter .4s; }
.bubble span { display: block; animation: bob 3s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes bob { 50% { transform: translateY(-5px); } }
.bgroup--field .bubble { color: #2a2118; background: radial-gradient(circle at 30% 26%, rgba(255,255,255,.9), rgba(255,255,255,0) 34%), radial-gradient(circle at 50% 60%, #f2ebdf, #b9ad98 82%); box-shadow: 0 14px 30px -10px rgba(243,238,230,.35), inset -6px -10px 18px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.4); }
.bgroup--custom .bubble, .bgroup--other .bubble { background: radial-gradient(circle at 30% 26%, rgba(255,255,255,.5), rgba(255,255,255,0) 32%), radial-gradient(circle at 50% 60%, #6c6d78, #26262c 80%); box-shadow: 0 14px 30px -10px rgba(0,0,0,.6), inset -6px -10px 18px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.12); }
.bubble--add { background: rgba(255,45,31,.08) !important; border: 1.5px dashed rgba(255,45,31,.7); color: var(--red) !important; font-size: 15px; box-shadow: none !important; }
.bubble:hover, .bubble:focus-visible { filter: brightness(1.15); box-shadow: 0 0 0 4px rgba(255,45,31,.3), 0 18px 40px -10px rgba(255,45,31,.9); outline: none; }
.bubble[aria-pressed="true"]::after { content: "✓"; position: absolute; top: -2px; right: -2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--red); font-family: var(--sans); font-size: 14px; box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.bubbles__hint { position: relative; margin: 0; color: var(--bone-dim); text-align: center; }
.reduce-motion .bubble span, .reduce-motion .catpick__orb { animation: none; }
@media (max-width: 760px) {
  .bubble { width: 72px; height: 72px; font-size: 16px; }
  .bgroup__cells { gap: 10px; }
  .bubbles__wrap { gap: 3vh; }
}

/* ===== 工作台左側排版優化：分類鈕不再溢出、整體更緊湊 ===== */
.forge { grid-template-columns: minmax(380px, 1fr) 2fr; }
.forge__head { padding: 18px 24px 4px; }
.forge__scroll { padding: 4px 22px 28px; scrollbar-width: thin; scrollbar-color: rgba(255,45,31,.4) transparent; }
.forge__scroll .editor { gap: 12px; }
.forge__scroll .editor__top { font-size: 10px; }
.forge__scroll .editor h3 { font-size: clamp(22px, 1.7vw, 26px); margin: 0 0 4px; }
.forge__scroll .efield { padding: 12px 16px; gap: 6px; border-radius: 16px; }
.forge__scroll .efield > span { font-size: 13px; }
.forge__scroll .efield textarea, .forge__scroll .efield input { font-size: 16px; padding: 6px 0; }
.forge__scroll .efield[data-field="title"] textarea { font-size: 20px; line-height: 1.55; }
.forge__scroll .efield small { margin-top: -2px; }
.catpick { border-radius: 16px; padding: 10px 12px; gap: 12px; min-width: 0; }
.catpick__orb { width: 32px; height: 32px; }
.catpick__txt { min-width: 0; gap: 1px; }
.catpick__txt b { font-size: 18px; line-height: 1.3; }
.catpick__txt b::before { content: "AI x "; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .08em; color: var(--red); margin-right: 4px; vertical-align: 2px; }
.catpick__txt small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catpick i { flex: 0 0 auto; font-size: 15px; }
.forge__scroll .efield .text-link { font-size: 12px; margin-top: 2px; }
.forge__scroll .meter { margin-top: 2px; }
.forge__scroll .editor__actions { gap: 16px; }
.forge__scroll .editor__note { font-size: 12px; }
@media (max-width: 1100px) { .forge { grid-template-columns: 1fr; } }
/* 工作台：860px 以上維持左右並排；窄螢幕卡片限高，輸入區一定看得到 */
@media (max-width: 1100px) and (min-width: 861px) {
  .forge { grid-template-columns: minmax(340px, 1fr) 1.5fr; grid-template-rows: none; }
  .forge__right { order: 0; padding: 20px; }
  .forge__right .desk { width: 100%; }
  .forge__right .desk__head { display: flex; }
  .forge__panel { height: 100vh; height: 100dvh; border-top: 0; border-right: 1px solid rgba(255,45,31,.35); border-radius: 0; }
}
@media (max-width: 860px) {
  .forge { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: 100dvh; }
  .forge__right .desk { width: min(100%, calc(36vh * 1.414)); justify-self: center; }
  .forge__panel { min-height: 0; }
}

/* ===== 即時聲量：導覽列倒數旁的「活動日當天觀點與回覆」（只在議題共創基地） ===== */
.bar__count:has(+ .bar__live) { margin: 0 10px 0 auto; }
.bar__live { margin: 0 auto 0 0; display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,45,31,.45); font-size: 13px; background: rgba(6,6,7,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; }
.bar__live b { display: inline-block; min-width: 1.2em; text-align: center; font-family: var(--mono); font-weight: 500; font-size: 14px; color: var(--red); font-variant-numeric: tabular-nums; }
.bar__live-s { display: none; }
.phero__stats { flex-wrap: wrap; row-gap: 22px; }
.phero__stats .phero__stats-break { flex-basis: 100%; height: 0; margin: 0; padding: 0; }
.bar__live-dot { font-style: normal; color: var(--bone-dim); margin: 0 2px; }
.phero__stats .phero__stat-day b { color: var(--red); }
@media (max-width: 1280px) { .bar__live-t { display: none; } .bar__live-s { display: inline; } }
@media (max-width: 760px) { .bar__live { display: none; } }

/* 手機回應：保留原生縮放，減少透明／3D 合成層；鍵盤只調整可捲動高度。 */
.focus { height: var(--focus-height, 100dvh); bottom: auto; }
.focus__panel { height: 100%; }
html.focus-open .page-topics > main { visibility: hidden; }
html.focus-open .page-topics > :is(.field, .grain, .vignette) { visibility: hidden; }
@media (max-width: 1100px), (pointer: coarse) {
  .focus { display: block; overflow-y: auto; overscroll-behavior: contain; background: #0b0b0e; }
  .focus__bg { display: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .focus__left, .stage { perspective: none; }
  .deck, .slide { transform-style: flat; }
  .slide { will-change: auto; }
  .slide .paper { filter: none !important; box-shadow: none !important; }
  .focus__card .paper { will-change: auto; box-shadow: none !important; }
  .focus__panel { height: auto; min-height: 0; overflow: visible; box-shadow: none; }
  .focus .panes { overflow: visible; }
  .focus input, .focus textarea { font-size: max(16px, 1em); scroll-margin-block: 16px; }
  .focus .speak__box textarea { font-size: 17px; }
}
