/* ============================================================
   投融社區 — 頁面專屬樣式
   依賴 style.css（代幣）與 club.css（.tag / .chip / .sub-head / .panel / 表單）
   兩欄版面：左頻道導航、中信息流
   ============================================================ */

:root {
  /* 會員等級識別環 */
  --lv-gold: #D2A06E;   /* 高級 */
  --lv-blue: #8CA9BF;   /* 中級 */
  --lv-silver: #9A938C; /* 基礎 */
}

/* ============ 1. 社區頁首 ============ */
.cm-head__row {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 20px 30px;
}
.cm-head__slogan {
  margin-top: 16px;
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 300;
  opacity: .7;
}
.cm-head__slogan b { color: var(--c-accent); font-weight: 500; font-family: var(--mono); }


/* 頁首與信息流之間留白收緊：頁首底部與信息流頂部原本各吃一個 --pad-lg */
.page-community .sub-head { padding-bottom: clamp(28px, 3.4vw, 48px); }
.page-community .cm { padding-top: clamp(16px, 2vw, 28px); }

/* ============ 2. 兩欄版面：左頻道導航 / 中信息流 ============ */
.cm-layout {
  display: grid;
  grid-template-columns: 198px minmax(0, 1fr);
  gap: clamp(20px, 2.2vw, 36px);
  align-items: start;
}
.cm-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 981px) { .cm-side--left { position: sticky; top: 76px; } }
@media (max-width: 980px) {
  .cm-layout { grid-template-columns: minmax(0, 1fr); }
  .cm-side--left { order: -1; }
}

/* ============ 3. 左欄：頻道導航 ============ */
.cm-block {
  display: flex; flex-direction: column; gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line-on-dark);
}
.cm-block:last-child { border-bottom: none; padding-bottom: 0; }
.cm-block__head {
  color: var(--c-accent);
  opacity: .75;
  font-size: 10px;
}

.cm-nav { display: flex; flex-direction: column; gap: 1px; }
.cm-navlink {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13.5px;
  opacity: .62;
  white-space: nowrap;
  transition: background-color .25s, color .25s, opacity .25s;
}
.cm-navlink:hover { opacity: 1; background: rgba(210, 160, 110, .08); }
.cm-navlink.is-on {
  opacity: 1;
  color: var(--c-accent);
  background: rgba(210, 160, 110, .12);
}
.cm-navlink__dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.cm-navlink__count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  opacity: .5;
}
.cm-navlink__new {
  margin-left: auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #D2A06E;
  flex: none;
}
.cm-block__foot { display: flex; flex-direction: column; gap: 7px; }
.cm-block__foot a { font-size: 12px; opacity: .45; transition: color .25s, opacity .25s; }
.cm-block__foot a:hover { opacity: 1; color: var(--c-accent); }

/* 窄螢幕：左欄攤成橫向捲動的 chip 列 */
@media (max-width: 980px) {
  .cm-side--left { gap: 14px; }
  .cm-block { padding-bottom: 14px; }
  .cm-nav, .cm-block__foot {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .cm-nav::-webkit-scrollbar, .cm-block__foot::-webkit-scrollbar { display: none; }
  .cm-navlink {
    flex: none;
    border: 1px dashed var(--line-on-dark);
    border-radius: 999px;
    padding: 7px 14px;
  }
  .cm-navlink.is-on { border-style: solid; border-color: rgba(210, 160, 110, .55); }
  .cm-navlink__count, .cm-navlink__new { margin-left: 2px; }
}

/* ============ 4. 中欄：Tab 與快捷發布 ============ */
.feedtabs {
  position: sticky;
  top: 56px;
  z-index: 12;
  margin-bottom: 18px;
  background: var(--c-bg);
  padding-top: 4px;
}
@media (max-width: 980px) { .feedtabs { position: static; } }

.composer {
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px 18px;
  margin-bottom: clamp(16px, 2vw, 22px);
  border: 1px dashed var(--line-on-dark);
  background: var(--c-surface);
  transition: border-color .3s;
}
.composer:focus-within { border-color: rgba(210, 160, 110, .5); }
.composer__row { display: flex; align-items: center; gap: 13px; }
.composer__input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px dashed var(--line-on-dark);
  border-radius: 999px;
  background: rgba(247, 247, 247, .03);
  color: var(--c-text);
  font-family: var(--sans);
  font-size: 13.5px;
  transition: border-color .25s, border-radius .25s;
}
.composer__input::placeholder { color: rgba(247, 247, 247, .35); }
.composer__input:focus { outline: none; border-color: rgba(210, 160, 110, .6); }
.composer.is-open .composer__input { border-radius: 6px; }

.composer__types { display: flex; flex-wrap: wrap; gap: 8px; }
.composer__type {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  border: 1px dashed var(--line-on-dark);
  border-radius: 999px;
  font-size: 12.5px;
  color: rgba(247, 247, 247, .7);
  transition: border-color .25s, color .25s, background-color .25s;
}
.composer__type:hover { border-color: rgba(210, 160, 110, .5); color: var(--c-text); }
.composer__type.is-locked { opacity: .45; cursor: not-allowed; }
.composer__type.is-locked:hover { border-color: var(--line-on-dark); color: rgba(247, 247, 247, .7); }
.composer__type .lock { width: 10px; height: 10px; }

.composer__panel { display: none; flex-direction: column; gap: 12px; }
.composer.is-open .composer__panel { display: flex; }
.composer__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-on-dark);
}
.composer__hint { font-size: 11.5px; opacity: .45; margin-right: auto; }

/* ============ 5. 帖子卡片 ============ */
.feed { display: flex; flex-direction: column; gap: clamp(14px, 1.8vw, 20px); }
.post[hidden], .fmod[hidden] { display: none; }

.post {
  position: relative;
  display: flex; flex-direction: column; gap: 13px;
  padding: 20px 20px 16px;
  border: 1px dashed var(--line-on-dark);
  background: var(--c-surface);
  transition: border-color .35s;
}
.post:hover { border-color: rgba(210, 160, 110, .45); }
.post:hover .handle { transform: scale(1.35); }

/* 5.1 卡片頭部 */
.post__head { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.ava {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
  flex: none;
}
.ava--gold {
  color: var(--c-accent);
  border: 1px solid rgba(210, 160, 110, .65);
  background: linear-gradient(150deg, rgba(210, 160, 110, .22), rgba(210, 160, 110, .05));
  box-shadow: 0 0 0 3px rgba(210, 160, 110, .08);
}
.ava--blue {
  color: #9DB8CB;
  border: 1px solid rgba(140, 169, 191, .6);
  background: linear-gradient(150deg, rgba(140, 169, 191, .2), rgba(140, 169, 191, .04));
}
.ava--silver {
  color: rgba(247, 247, 247, .7);
  border: 1px solid rgba(247, 247, 247, .25);
  background: linear-gradient(150deg, rgba(247, 247, 247, .12), rgba(247, 247, 247, .03));
}
.ava--sm { width: 30px; height: 30px; font-size: 10px; }

.post__id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.post__who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post__name { font-size: 14.5px; font-weight: 500; }
.cert {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
}
.cert svg { width: 9px; height: 9px; }
.cert--investor { background: rgba(157, 185, 140, .14); color: #A9C497; }
.cert--founder { background: rgba(172, 155, 194, .16); color: #BBA9D1; }
.cert--advisor { background: rgba(210, 160, 110, .14); color: var(--c-accent); }
.lvtag {
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  border: 1px solid;
}
.lvtag--gold { color: var(--lv-gold); border-color: rgba(210, 160, 110, .45); }
.lvtag--blue { color: var(--lv-blue); border-color: rgba(140, 169, 191, .45); }
.lvtag--silver { color: rgba(247, 247, 247, .5); border-color: var(--line-on-dark); }

.post__sub {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .03em;
  opacity: .45;
}
.post__sub b { color: var(--c-accent); font-weight: 500; opacity: .85; }

.post__more {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 4px;
  color: rgba(247, 247, 247, .4);
  transition: color .25s, background-color .25s;
}
.post__more:hover { color: var(--c-accent); background: rgba(210, 160, 110, .1); }
.post__more svg { width: 13px; height: 13px; }

/* 5.2 主體 */
.post__kind {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 3px;
  background: rgba(247, 247, 247, .06);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: rgba(247, 247, 247, .6);
}
.post__title {
  font-size: clamp(16px, 1.6vw, 18.5px);
  font-weight: 500;
  line-height: 1.5;
}
.post__title a:hover { color: var(--c-accent); }
.post__text { font-size: 14px; font-weight: 300; opacity: .68; line-height: 1.85; }
.post__read { font-family: var(--mono); font-size: 10.5px; opacity: .4; letter-spacing: .04em; }

.post__imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.post__img {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  border-radius: 4px;
  overflow: hidden;
}
.post__img svg { width: 56%; height: auto; opacity: .7; }
.post__img--a { background: linear-gradient(150deg, #241A14, #3A2614); }
.post__img--b { background: linear-gradient(150deg, #1B1514, #2A2320); }
.post__img--c { background: linear-gradient(150deg, #1E1A17, #332519); }

/* 長文封面 */
.post__cover {
  position: relative;
  aspect-ratio: 16 / 7;
  display: grid; place-items: center;
  border: 1px dashed var(--line-on-dark);
  border-radius: 4px;
  background: linear-gradient(135deg, #1B1514, #332519);
  overflow: hidden;
}
.post__cover svg { width: 42%; height: auto; opacity: .6; }
.post__cover--video { background: linear-gradient(140deg, #16120F, #3A2614); }
.post__play {
  position: absolute;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(210, 160, 110, .92);
  color: #16120F;
  transition: transform .35s var(--ease-power4);
}
.post__play svg { width: 24px; height: 24px; opacity: 1; }
.post:hover .post__play { transform: scale(1.1); }
.post__dur {
  position: absolute; right: 10px; bottom: 10px;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(20, 16, 16, .82);
  font-family: var(--mono);
  font-size: 10px;
}

/* 提問：懸賞與回答數 */
.post__qmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bounty {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 3px;
  background: rgba(210, 160, 110, .14);
  color: var(--c-accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}
.post__answers { font-size: 12.5px; opacity: .5; }
.post__answers b { color: var(--c-accent); font-weight: 500; }
.post__solved {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 3px;
  background: rgba(157, 185, 140, .14);
  color: #A9C497;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
}

/* 投資複盤：結構化欄位 */
.post__review {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px dashed var(--line-on-dark);
}
@media (max-width: 560px) { .post__review { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.post__review > div { padding: 12px 14px; border-right: 1px dashed var(--line-on-dark); }
.post__review > div:last-child { border-right: none; }
.post__review dt { font-size: 10.5px; opacity: .42; }
.post__review dd { margin-top: 5px; font-size: 13px; font-weight: 500; }
.post__review dd.is-mono { font-family: var(--mono); font-size: 12px; color: var(--c-accent); }

/* 嵌入的項目卡片 */
.embed {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px 16px;
  border: 1px dashed rgba(210, 160, 110, .4);
  border-radius: 4px;
  background: linear-gradient(145deg, rgba(27, 21, 20, .9), rgba(210, 160, 110, .07));
  transition: border-color .3s;
}
.embed:hover { border-color: rgba(210, 160, 110, .7); }
.embed__top { display: flex; align-items: center; gap: 11px; }
.embed__logo {
  width: 36px; height: 36px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(150deg, rgba(247, 247, 247, .1), rgba(247, 247, 247, .03));
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}
.embed__id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.embed__name { font-size: 14.5px; font-weight: 500; }
.embed__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.embed__prog { display: flex; flex-direction: column; gap: 7px; }
.embed__prog-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 12px;
  opacity: .6;
}
.embed__prog-row b { font-family: var(--mono); color: var(--c-accent); font-size: 13px; opacity: 1; }
.embed__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.embed__note { font-family: var(--mono); font-size: 10px; opacity: .4; }

/* 話題標籤 */
.post__topics { display: flex; flex-wrap: wrap; gap: 7px; }
.topic {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px dashed var(--line-on-dark);
  font-size: 11.5px;
  opacity: .6;
  transition: border-color .25s, color .25s, opacity .25s;
}
.topic:hover { opacity: 1; color: var(--c-accent); border-color: rgba(210, 160, 110, .5); }

/* 5.3 互動欄 */
.post__proof {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-left: 1px dashed rgba(210, 160, 110, .5);
  background: rgba(210, 160, 110, .05);
  font-size: 12px;
  opacity: .7;
}
.post__proof b { color: var(--c-accent); font-family: var(--mono); font-weight: 700; }

.post__bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px;
  padding-top: 13px;
  border-top: 1px dashed var(--line-on-dark);
}
.act {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px;
  border-radius: 4px;
  font-size: 12.5px;
  color: rgba(247, 247, 247, .5);
  transition: color .25s, background-color .25s;
}
.act svg { width: 14px; height: 14px; }
.act:hover { color: var(--c-text); background: rgba(247, 247, 247, .05); }
.act.is-on { color: var(--c-accent); }
.act.is-on svg { fill: currentColor; }
.act__n { font-family: var(--mono); font-size: 11px; }

.act--ack {
  margin-left: auto;
  border: 1px dashed rgba(210, 160, 110, .35);
  color: var(--c-accent);
}
.act--ack:hover { background: rgba(210, 160, 110, .1); color: var(--c-accent); }
.act--ack.is-locked { color: rgba(247, 247, 247, .35); border-color: var(--line-on-dark); cursor: not-allowed; }
.act--ack.is-locked:hover { background: none; color: rgba(247, 247, 247, .45); }
.act__hint {
  position: absolute; right: 16px; bottom: 54px;
  padding: 7px 12px;
  border: 1px dashed rgba(210, 160, 110, .5);
  border-radius: 4px;
  background: rgba(20, 16, 16, .97);
  font-size: 11.5px;
  color: var(--c-accent);
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 4;
}
.act__hint.is-show { opacity: 1; transform: translateY(0); }
@media (max-width: 560px) {
  .act--ack { margin-left: 0; }
  .act__hint { left: 16px; right: 16px; bottom: 70px; }
}

/* ============ 6. 信息流穿插模組 ============ */
.fmod {
  position: relative;
  display: flex; flex-direction: column; gap: 13px;
  padding: 20px 20px;
  border: 1px dashed rgba(210, 160, 110, .35);
  background: linear-gradient(150deg, rgba(27, 21, 20, .95), rgba(210, 160, 110, .06));
}
.fmod__kicker {
  display: flex; align-items: center; gap: 8px;
  color: var(--c-accent);
  font-size: 10px;
}
.fmod__kicker::before { content: ''; width: 14px; height: 1px; background: currentColor; }
.fmod__title { font-size: 16px; font-weight: 500; line-height: 1.5; }
.fmod__text { font-size: 13px; font-weight: 300; opacity: .62; line-height: 1.75; }
.fmod__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

/* 話題投票 */
.poll { display: flex; flex-direction: column; gap: 8px; }
.poll__opt {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 13px;
  border: 1px dashed var(--line-on-dark);
  border-radius: 4px;
  font-size: 13px;
  color: rgba(247, 247, 247, .75);
  overflow: hidden;
  transition: border-color .25s, color .25s;
}
.poll__opt:hover { border-color: rgba(210, 160, 110, .55); color: var(--c-text); }
.poll__fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  background: rgba(210, 160, 110, .16);
  transition: width .7s var(--ease-power4);
  z-index: 0;
}
.poll__opt > span { position: relative; z-index: 1; }
.poll__pct {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0;
  transition: opacity .4s;
}
.poll.is-voted .poll__pct { opacity: .7; }
.poll.is-voted .poll__opt { cursor: default; }
.poll.is-voted .poll__opt.is-mine { border-style: solid; border-color: rgba(210, 160, 110, .6); color: var(--c-accent); }
.poll__total { font-family: var(--mono); font-size: 10.5px; opacity: .4; }

/* 俱樂部門控預覽 */
.fmod--club .fmod__blur {
  position: relative;
  padding: 16px 16px;
  border: 1px dashed var(--line-on-dark);
  border-radius: 4px;
  background: rgba(247, 247, 247, .02);
}
.fmod__blur-body { filter: blur(3.5px); opacity: .5; user-select: none; }
.fmod__blur-body p { font-size: 13px; line-height: 1.8; }
.fmod__lock {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(180deg, rgba(20, 16, 16, .2), rgba(20, 16, 16, .86));
}
.fmod__lock span {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--c-accent);
}

/* ============ 7. 信息流狀態 ============ */
.feed__fresh {
  position: fixed;
  /* 落在吸頂 Tab 列下方，不壓到 Tab */
  top: 112px; left: 50%;
  transform: translate(-50%, -12px);
  z-index: 70;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 18px;
  border: 1px solid rgba(210, 160, 110, .6);
  border-radius: 999px;
  background: rgba(20, 16, 16, .96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--c-accent);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease-power4), transform .35s var(--ease-power4), visibility .35s;
}
.feed__fresh.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.feed__fresh svg { width: 12px; height: 12px; }

.feed__more { margin-top: clamp(20px, 2.4vw, 30px); display: flex; justify-content: center; }
.feed__end {
  margin-top: 20px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  opacity: .35;
}

/* 關注 Tab 的空狀態：推薦投資人 */
.sugbox { display: flex; flex-direction: column; gap: 16px; padding: 26px 22px; border: 1px dashed var(--line-on-dark); }
.sugbox__head { display: flex; flex-direction: column; gap: 6px; }
.sugbox__title { font-size: 16px; font-weight: 500; }
.sugbox__desc { font-size: 13px; font-weight: 300; opacity: .55; }
.suglist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 680px) { .suglist { grid-template-columns: minmax(0, 1fr); } }

.sug {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center; gap: 11px;
  padding: 11px 12px;
  border: 1px dashed var(--line-on-dark);
  border-radius: 4px;
}
.sug__id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sug__name { font-size: 13.5px; font-weight: 500; }
.sug__tags { font-family: var(--mono); font-size: 9.5px; opacity: .45; }
.followbtn {
  flex: none;
  padding: 6px 13px;
  border: 1px dashed rgba(210, 160, 110, .5);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--c-accent);
  transition: background-color .25s, color .25s, border-color .25s;
}
.followbtn:hover { background: rgba(210, 160, 110, .14); }
.followbtn.is-on {
  border-style: solid;
  border-color: var(--line-on-dark);
  color: rgba(247, 247, 247, .45);
  background: none;
}

/* ============ 9. AI 天使懸浮球與面板 ============ */
.aiball {
  position: fixed;
  right: clamp(16px, 2vw, 28px);
  /* 游客浮條出現時整組往上讓位（高度由 JS 量測寫入 --guestbar-h） */
  bottom: calc(clamp(16px, 2vw, 28px) + var(--guestbar-h, 0px));
  z-index: 75;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px 12px 14px;
  border: 1px solid rgba(210, 160, 110, .55);
  border-radius: 999px;
  background: rgba(20, 16, 16, .95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5), inset 0 0 26px rgba(210, 160, 110, .14);
  color: var(--c-accent);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: transform .3s var(--ease-power4), border-color .25s;
}
.aiball:hover { transform: translateY(-3px); border-color: rgba(210, 160, 110, .9); }
.aiball__mark {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  flex: none;
}
.aiball__mark svg { width: 18px; height: 18px; }
@media (max-width: 560px) { .aiball__label { display: none; } .aiball { padding: 13px; } }

.aipanel {
  position: fixed;
  right: clamp(16px, 2vw, 28px);
  bottom: calc(clamp(16px, 2vw, 28px) + 62px + var(--guestbar-h, 0px));
  z-index: 76;
  width: min(360px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 160px));
  display: flex; flex-direction: column;
  border: 1px dashed rgba(210, 160, 110, .5);
  background: rgba(20, 16, 16, .98);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s var(--ease-power4), transform .3s var(--ease-power4), visibility .3s;
}
.aipanel.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.aipanel__head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px dashed var(--line-on-dark);
}
.aipanel__title { font-size: 14px; font-weight: 500; }
.aipanel__close { margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center; color: rgba(247, 247, 247, .5); border-radius: 4px; transition: color .25s; }
.aipanel__close:hover { color: var(--c-accent); }
.aipanel__close svg { width: 12px; height: 12px; }
.aipanel__body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bubble { padding: 11px 13px; border-radius: 4px; font-size: 13px; line-height: 1.75; }
.bubble--ai { background: rgba(210, 160, 110, .08); border: 1px dashed rgba(210, 160, 110, .3); font-weight: 300; opacity: .9; }
.bubble--me { background: rgba(247, 247, 247, .05); border: 1px dashed var(--line-on-dark); align-self: flex-end; max-width: 86%; }
.bubble__tag { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .06em; color: var(--c-accent); opacity: .7; margin-bottom: 6px; }
.aipanel__quick { display: flex; flex-wrap: wrap; gap: 6px; }
.aipanel__quick button {
  padding: 6px 11px;
  border: 1px dashed var(--line-on-dark);
  border-radius: 999px;
  font-size: 11.5px;
  color: rgba(247, 247, 247, .65);
  transition: border-color .25s, color .25s;
}
.aipanel__quick button:hover { border-color: rgba(210, 160, 110, .5); color: var(--c-accent); }
.aipanel__foot { padding: 12px 14px; border-top: 1px dashed var(--line-on-dark); display: flex; flex-direction: column; gap: 8px; }
.aipanel__row { display: flex; gap: 8px; }
.aipanel__input {
  flex: 1; min-width: 0;
  padding: 10px 12px;
  border: 1px dashed var(--line-on-dark);
  border-radius: 4px;
  background: rgba(247, 247, 247, .03);
  color: var(--c-text);
  font-family: var(--sans);
  font-size: 13px;
}
.aipanel__input:focus { outline: none; border-color: rgba(210, 160, 110, .6); }
.aipanel__send {
  flex: none;
  width: 38px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: var(--c-accent);
  color: #16120F;
  transition: background-color .25s;
}
.aipanel__send:hover { background: #E0B384; }
.aipanel__send svg { width: 14px; height: 14px; }
.aipanel__quota { font-family: var(--mono); font-size: 9.5px; opacity: .4; letter-spacing: .04em; }

/* ============ 10. 游客門控浮條 ============ */
.guestbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 74;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  padding: 14px var(--pad);
  background: rgba(20, 16, 16, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px dashed var(--line-on-dark);
  transform: translateY(110%);
  transition: transform .45s var(--ease-power4);
}
.guestbar.is-show { transform: translateY(0); }
.guestbar__text { font-size: 13px; opacity: .7; }
.guestbar__text b { color: var(--c-accent); font-weight: 500; }
.guestbar .btn { margin-left: auto; }
.guestbar__close {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 4px;
  color: rgba(247, 247, 247, .45);
  transition: color .25s;
}
.guestbar__close:hover { color: var(--c-accent); }
.guestbar__close svg { width: 12px; height: 12px; }
@media (max-width: 620px) {
  .guestbar { padding-bottom: 16px; }
  .guestbar__text { flex-basis: 100%; font-size: 12.5px; }
  .guestbar .btn { margin-left: 0; }
}

/* ============ 11. 社區公約（亮區段） ============ */
.rules__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
}
@media (max-width: 920px) { .rules__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .rules__grid { grid-template-columns: minmax(0, 1fr); } }

.rule {
  position: relative;
  display: flex; flex-direction: column; gap: 11px;
  padding: 24px 22px;
  border: 1px dashed var(--line-on-light);
  background: #FFFFFF;
  transition: border-color .35s;
}
.rule:hover { border-color: rgba(169, 118, 74, .5); }
.rule:hover .handle { transform: scale(1.35); }
.rule__num { color: #A9764A; }
.rule__title { font-size: 17px; font-weight: 500; }
.rule__desc { font-size: 13.5px; font-weight: 300; opacity: .68; line-height: 1.8; }
.rules__foot {
  margin-top: clamp(28px, 3.5vw, 44px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 24px;
  text-align: center;
  font-size: 13px;
  opacity: .6;
}

@media (prefers-reduced-motion: reduce) {
  .post, .fmod, .rule, .embed, .aiball, .aipanel, .guestbar, .feed__fresh, .poll__fill { transition: none; }
}
