/* ===== 無人駕駛 · 深夜公路氛圍 ===== */

:root {
  --bg-black: #080b0d;
  --bg-panel: #10121c;
  --bg-panel-light: #171a29;
  --border: rgba(255,255,255,0.6);
  --border-soft: rgba(255,255,255,0.35);
  --text-main: #bbb;
  --text-dim: #666;
  --headlight: #fff6d8;
  --taillight: #ff3b4e;
  --accent: #5b6474;
  --accent-soft: rgba(255,207,107,0.15);
  --danger: #ab6376;
  --radius: 16px;
  
  
  --serif: "Noto Serif HK", serif;
    --sans:  "Noto Sans HK", sans-serif;
}

* { box-sizing: border-box; }

/* 確保 [hidden] 屬性永遠優先於其他 display 設定（避免按鈕/元素被誤顯示） */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-black);
  color: var(--text-main);
  font-family: "Noto Sans HK", sans-serif;
  min-height: 100vh;
  position: relative;
  /* 用 overflow-x: clip 而非 hidden:
     只設定 overflow-x(無論 overflow-y 有沒有明確寫 visible),瀏覽器都會依規範
     把另一軸強制轉成 auto,讓 body/html 變成捲動容器，導致 .layout-grid 內的
     position: sticky 失效。clip 不會觸發這個自動轉換,因此可以保留「禁止橫向
     捲動」的效果，同時不破壞 sticky。 */
  overflow-x: clip;
}

/* 內容範圍容器：從簡介區塊開始到頁尾為止,範圍內才會出現隨機光點(Hero 區塊排除在外)。
   設為 position: relative 讓內部 .stray-light-layer 用 absolute 定位鋪滿這個範圍,
   隨頁面內容一起捲動(而不是像 Hero 版本那樣固定在螢幕上),效果自然侵限在此範圍內。 */
.content-scope {
  position: relative;

}

.mobile-break {
	display: none;
}   

/* ---------- 背景：深夜公路動畫 ---------- */
.road-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(to bottom, #060714 0%, #0a0c1a 45%, #14121c 100%);
}

.sky {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(120,110,180,0.12), transparent 60%);
}

.stars {
  position: absolute;
  top: 0; left: 0; right: 0; height: 55%;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 30% 40%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 50% 15%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 85% 10%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 92% 45%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 15% 55%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 60% 60%, rgba(255,255,255,0.25), transparent);
  opacity: 0.8;
  transition: transform 0.15s linear;
  will-change: transform;
}

/* 隨機光點覆蓋層：獨立疊在所有內容最上層(z-index 極高),確保光點不會被
   Hero 圖片或不透明面板背景擋住;不接收滑鼠事件,不影響任何點擊/捲動操作。 */
.stray-light-layer {
  position: absolute;
  inset: 0;
  z-index: -5;
  overflow: hidden;
  pointer-events: none;
}

/* 隨機出現的背景光點(象徵遠處一輛擦身而過的車),路徑由 JS 動態產生(直線或曲線隨機),
   只出現在簡介區塊~頁尾範圍內(不會出現在 Hero 區塊),出現頻率低、速度慢、
   亮度暗,只作為畫面角落偶爾閃過的細節,不干擾閱讀。純光點,不帶拖尾。
   刻意選用偏冷的藍白色調(而非暖色),確保在深色面板背景上有足夠對比。 */
.stray-light {
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: radial-gradient(circle, #ffffff, rgba(180,220,255,0.9) 90%, transparent 78%);
  box-shadow: 0 0 6px 2px rgba(255,255,255,0.95), 0 0 24px 8px rgba(140,200,255,0.75);
  opacity: 0;
  pointer-events: none;
  will-change: opacity, offset-distance;
}
@keyframes stray-light-move {
  from { offset-distance: 0%; }
  to   { offset-distance: 100%; }
}
@keyframes stray-light-fade {
  0%   { opacity: 0; }
  10%  { opacity: 0.9; }
  85%  { opacity: 0.9; }
  100% { opacity: 0; }
}

.road {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 45%;
  background: linear-gradient(to bottom, #17171d, #050506);
  transform: perspective(300px) rotateX(2deg);
  transition: transform 0.15s linear;
  will-change: transform;
}

.lane-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 6px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,207,107,0.55) 0px,
    rgba(255,207,107,0.55) 26px,
    transparent 26px,
    transparent 55px
  );
  animation: lane-move 1.1s linear infinite;
  opacity: 0.55;
}
.lane-line-2 { left: 15%; opacity: 0.25; }

@keyframes lane-move {
  from { background-position-y: 0; }
  to { background-position-y: 81px; }
}

/* 車頭燈 / 車尾燈光束，由遠而近流動，營造車流感 */
.headlight-streak, .taillight-streak {
  position: absolute;
  width: 3px;
  height: 90px;
  border-radius: 3px;
  filter: blur(1px);
  opacity: 0;
}
.headlight-streak {
  background: linear-gradient(to bottom, rgba(255,246,216,0.95), rgba(255,246,216,0));
  box-shadow: 0 0 14px 3px rgba(255,246,216,0.5);
}
.taillight-streak {
  background: linear-gradient(to bottom, rgba(255,59,78,0.85), rgba(255,59,78,0));
  box-shadow: 0 0 12px 3px rgba(255,59,78,0.45);
}

.streak-1 { left: 22%; animation: streak-fall 3.2s linear infinite; animation-delay: 0s; }
.streak-2 { left: 38%; animation: streak-fall 4.1s linear infinite; animation-delay: 1.1s; }
.streak-3 { left: 68%; animation: streak-fall 3.6s linear infinite; animation-delay: 2s; }
.streak-4 { left: 82%; animation: streak-fall 4.6s linear infinite; animation-delay: 0.6s; }
.streak-5 { left: 46%; animation: streak-fall 3.9s linear infinite; animation-delay: 1.8s; }
.streak-6 { left: 58%; animation: streak-fall 4.4s linear infinite; animation-delay: 2.6s; }
.streak-7 { left: 12%; animation: streak-fall 5.2s linear infinite; animation-delay: 3.4s; }
.streak-8 { left: 74%; animation: streak-fall 3.4s linear infinite; animation-delay: 4s; }

@keyframes streak-fall {
  0%   { top: -10%; opacity: 0; }
  10%  { opacity: 0.9; }
  70%  { opacity: 0.7; }
  100% { top: 105%; opacity: 0; }
}

/* ---------- 全螢幕 Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 480px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3) 0%,
    rgba(0,0,0,0.3) 40%,
    rgba(0,0,0,0.3) 100%
  );
/*   background-image: url(../images/dot.gif);
	background-position: center;
	background-repeat: repeat; */
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  max-width: 800px;
  will-change: opacity, transform;
  transition: opacity 0.15s linear, transform 0.15s linear;
}
/* 預設（無動畫時）文字永遠完全顯示，避免捲動造成動畫被瀏覽器重置後文字消失 */
.hero-content .eyebrow {
  color: var(--accent);
  letter-spacing: 0.12em;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  margin: 0 0 18px;
  text-shadow: 0 0 16px rgba(255,207,107,0.6), 0 2px 6px rgba(0,0,0,0.8);
  opacity: 1;
  transform: none;
}
.hero-content .site-title {
  font-family: var(--serif);
    font-size: 3.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 2px;
  color: var(--text-main);
	text-shadow: 0 0 16px rgba(0,0,0,0.9);
  opacity: 1;
  transform: none;
}
.hero-content .site-subtitle {
  color: var(--text-main);
  font-family: var(--serif);
    font-size: clamp(1.5rem, 2.5vw, 1.5rem);
    font-weight: 400;
    margin-bottom: 0;
	text-shadow: 0 0 6px rgba(0,0,0,0.9);
  opacity: 1;
  transform: none;
}

/* 只有在頁面剛載入、JS 主動加上此 class 時才播放一次性進場動畫；
   動畫結束後 JS 會移除 class，讓文字回到上面「永遠完全顯示」的預設狀態，
   不受捲動造成的動畫暫停/重置影響 */
.hero-content.hero-animate .eyebrow {
  opacity: 0;
  animation: hero-fade-in 2.2s ease-out 0.2s forwards;
}
.hero-content.hero-animate .site-title {
  opacity: 0;
  animation: hero-fade-in 1s ease-out 0.5s forwards;
}
.hero-content.hero-animate .site-subtitle {
  opacity: 0;
  animation: hero-fade-in 1s ease-out 1s forwards;
}

@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-scroll-cue {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.75);
  font-size: 1.3rem;
  z-index: 2;
  animation: hero-cue-bounce 1.8s ease-in-out infinite;
}
@keyframes hero-cue-bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.5; }
  50% { transform: translate(-50%, 10px); opacity: 1; }
}

@media (max-width: 480px) {
  .hero { height: 100vh; }
}


ul {
  display: block;
  list-style-type: disc;
  list-style-type: '/   ';
  /* list-style-type: decimal; */ /* ol 預設值 */
  margin-before: 1em;
  margin-after: 1em;
  margin-start: 0;
  margin-end: 0;
  padding-left: 25px;
}
li {
  display: list-item;
  text-align: left;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 2;
  font-weight: 500;
  color: var(--text-main);
}

/* 簡介清單隨機單字閃爍效果：平常維持原本顏色，被 JS 隨機抽中時短暫
   變成白色並帶一點發光，模擬星星/霓虹燈偶爾閃一下的感覺。 */
.flicker-char {
  display: inline-block;
  color: inherit;
  text-shadow: none;
  transition: color 2.15s ease, text-shadow 2.15s ease;
}
.flicker-char.flicker-active {
  color: #FFF;
  text-shadow: 0 0 6px rgba(255,255,255,0.9), 0 0 14px rgba(180,220,255,0.6);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}



/* ---------- 兩欄排版容器：簡介(左) + 主內容(右) ----------
   桌面(>1024px)：grid 兩欄並排，整體寬度上限 1900px，左欄 sticky 固定在頂部，
   直到右欄內容捲完才隨之離開畫面。
   平板/手機(<=1024px)：改回單欄垂直排列，與原本行為一致。 */
.layout-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 50px 24px;
}

@media (min-width: 1025px) {
  .layout-grid {
    display: grid;
    grid-template-columns: auto auto;
    gap: 60px;
    align-items: start;
  }
  .layout-grid .intro-section {
    position: sticky;
    top: 40px;
    max-width: none;
    text-align: left;
    padding: 100px 0 40px;
    margin: 0;
  }
  .layout-grid .intro-line,
  .layout-grid .intro-line .intro-text {
    text-align: left;
  }
  .layout-grid main {
    max-width: none;
    margin: 0;
    padding: 100px 0 0px;
  }
}

/* ---------- Hero 下方：簡介區塊 ---------- */
.intro-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 0px 20px;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.intro-section.in-view {
  opacity: 1;
  transform: translateY(0);
}
.intro-line {
	font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 2;

    margin-bottom: 2rem;
    text-align: justify;

  color: var(--text-main);
  margin: 0 0 26px;
  display: flex;

  gap: 12px;
  font-weight: 500;
}
.intro-line i {
  color: var(--accent);
  margin-top: 6px;
  flex-shrink: 0;
}
.intro-line .intro-text {
  min-width: 0;

  text-align: justify;
}
.intro-credit {
  font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0rem;
	color: var(--accent);

}

@media (max-width: 480px) {
  .intro-section { padding: 44px 0px 10px; }
  .intro-line { text-align: left; }
}

/* ---------- 版面 ---------- */
.site-header {
  text-align: center;

  position: relative;
  opacity: 1;

}



.eyebrow {
  color: var(--accent);
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  margin: 0 0 10px;
  text-shadow: 0 0 12px rgba(255,207,107,0.5);
}
.site-title {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 900;
  margin: 0;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, #fff, #cfd3e6 60%, #8b8fa8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(255,255,255,0.08);
}
.site-subtitle {
  color: var(--text-dim);
  margin: 14px auto 0;
  max-width: 800px;
  font-size: 1rem;
  line-height: 1.7;
}
/* 深夜彩蛋：只有在深夜時段開站才會顯示的一行字 */
.late-night-line {
  margin: 18px auto 0;
  max-width: 460px;
  color: var(--accent);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  opacity: 0;
  text-shadow: 0 0 14px rgba(255,207,107,0.4);
  animation: late-night-fade-in 1.6s ease forwards;
  animation-delay: 0.6s;
}
@keyframes late-night-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.live-counter {
  margin-top: 22px;
  color: var(--accent);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,207,107,0.08);
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,207,107,0.25);
}
#live-count {
  display: inline-block;
  transition: transform 0.25s ease;
}
#live-count.bump { animation: btn-bump 0.35s ease; }

/* 深夜 DJ 語錄：低調的一句話,點擊可換一句 */
.dj-quote {
  margin: 54px 0 54px 0;
  max-width: 660px;
  color: var(--accent);
  font-size: 1rem;
  opacity: 0;
  cursor: pointer;
  transition: opacity 1.2s ease, color 0.2s ease;
  user-select: none;
}
.dj-quote.show { opacity: 0.85; }
.dj-quote:hover { color: var(--accent); }
.dj-quote i { margin-right: 6px; opacity: 0.7; }

#dj-quote-text {
  white-space: pre-line;
}

/* 平板/手機(<=1024px):歌詞與作者資訊分成兩行顯示,並隱藏中間的「—— 」分隔符號。
   桌面(>1024px)維持原本同一行顯示的效果，不受影響。 */
@media (max-width: 1024px) {
  .dj-quote-line,
  .dj-quote-attr {
    display: block;
  }
  .dj-quote-sep {
    display: none;
  }
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0px 0px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
}

.panel {
  background: rgba(24,32,47,0.4);
  backdrop-filter: blur(10px);
  border: 0px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  opacity: 1;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.panel.in-view {
  opacity: 1;
  transform: translateY(0);
}
.panel h2 {
  margin: 0 0 20px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}
.panel h2 i { color: var(--accent); }

.post-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,0.8);
  margin-left: auto;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
}

/* ---------- 留下心事：收合/展開 ---------- */
.post-panel.collapsed { padding-bottom: 28px; }
.post-panel-header {
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-main);
  text-align: left;
}
.post-panel-header h2 { margin: 0; }
.post-panel.collapsed .post-panel-header h2 { margin: 0; }
.post-toggle-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  
  border: 1px solid rgba(255,255,255,0.8);
  color: var(--text-main);
  font-size: 1rem;
  transition: transform 0.3s ease, background 0.2s;
}
.post-panel-header:hover .post-toggle-icon {
  background: rgba(255,255,255,0.15);
}
.post-panel-header:active {
  opacity: 0.85;
}
.post-panel:not(.collapsed) .post-toggle-icon {
  transform: rotate(135deg);
}
.post-form-wrapper {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.35s ease, margin-top 0.4s ease;
}
.post-form-wrapper.expanded {
  margin-top: 22px;
  max-height: 900px;
  opacity: 1;
}

/* ---------- 表單 ---------- */
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-main);
}
input[type="text"], textarea {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,207,107,0.15);
}
.char-count {
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
}
.form-hint {
  font-size: 0.9rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
}

.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.emoji-option {
  font-size: 1.4rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.emoji-option:hover { transform: translateY(-2px); }
.emoji-option:active { transform: scale(0.9); }
.emoji-option.selected {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 14px rgba(255,207,107,0.35);
  animation: emoji-pop 0.3s ease;
}
@keyframes emoji-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.btn-primary, .btn-secondary {
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn-primary {
  background: linear-gradient(135deg, #ee7f43, #ffd85f);
  color: #201400;
  
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: scale(0.95); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-secondary:active { transform: scale(0.95); }
.btn-small { padding: 9px 18px; font-size: 0.88rem; }

/* ---------- 浮動「+」按鈕：捲過「留低深事」區塊後出現 ---------- */
.post-fab-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ee7f43, #ffd85f);
  color: #201400;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
  z-index: 500;
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.post-fab-btn.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.post-fab-btn:hover { transform: scale(1.08); }
.post-fab-btn.show:active { transform: scale(0.92); }

@media (max-width: 480px) {
  .post-fab-btn {
    right: 18px;
    bottom: 18px;
    width: 50px;
    height: 50px;
    font-size: 1.15rem;
  }
}

/* ---------- 心事卡片 ---------- */
#messages-feed { display: flex; flex-direction: column; gap: 20px; }
.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 30px 0;
  font-size: 0.95rem;
}

.message-card {
  position: relative;
  background: rgba(255,255,255,0.00);
  border-top: 1px  dashed  var(--border);
  border-radius: 0px;
  padding: 20px 0;
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1), border-color 0.4s, box-shadow 0.3s ease, background 0.4s;
}

/* 香港車牌風格識別標籤：黃底黑字，置於卡片右上角，模擬深夜擦身而過的車輛車牌 */
.card-plate {
  position: absolute;
  top: 25px;
  right: 0px;
  background: #ccc;
  color: #111;
  font-family: 'Courier New', 'Noto Sans TC', monospace;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1.5px solid #111;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  line-height: 1.3;
  white-space: nowrap;
}
/* 回覆卡片的車牌只縮小字體/內距,錨點(top/right)維持與最上層心事一致,
   避免因錨點不同造成視覺上「兩層卡片車牌位置不對齊」的問題 */
.replies-slot .card-plate {
  
  
}
.card-plate-crown {
  display: none;
  margin-right: 3px;
  color: #7a4b00;
  font-size: 0.9em;
}

/* 稀有車牌高亮：豹子號/回文號/順子號/整數號 命中時,僅車牌標籤本身套用金色光曉效果(不套用於整張卡片邊框) */
.card-plate.rare {
  background: linear-gradient(135deg, #fff2b0, #ffd400 45%, #ffb800);
  box-shadow: 0 0 12px rgba(255,215,0,0.7), 0 5px 10px rgba(0,0,0,0.35);
  animation: plate-shine 2.2s ease-in-out infinite;
}
.card-plate.rare .card-plate-crown { display: inline-block; }
@keyframes plate-shine {
  0%, 100% { box-shadow: 0 0 6px rgba(255,215,0,0.5), 0 2px 6px rgba(0,0,0,0.35); }
  50% { box-shadow: 0 0 20px rgba(255,215,0,0.95), 0 4px 12px rgba(0,0,0,0.35); }
}
.message-card:hover {
  transform: translateY(-0px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.0);
  border-color: rgba(255,255,255,1);
}
/* 尚未進入可視範圍的卡片：初始隱藏，捲動到畫面時由 JS(IntersectionObserver)加上 .in-view 淡入；
   只在卡片「第一次」被畫出來時套用此 class,避免每次重繪整個清單時全部卡片重新閃爍一次 */
.message-card.card-reveal {
	
  opacity: 0;
  transform: translateY(50px);
}
.message-card.card-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* 新心事剛送出、捲動到畫面時的短暫高亮提示 */
.message-card.new-post-highlight {
  border-color: rgba(255,207,107,0);
  background: rgba(255,207,107,0);
  box-shadow: 0 0 0 0px rgba(255,207,107,0);
  animation: new-post-pulse 1.3s ease-in-out 2;
}
@keyframes new-post-pulse {
  0%, 100% { box-shadow: 0 0 10px 10px rgba(255,207,107,0); background: rgba(255,207,107,0);}
  50% { box-shadow: 0 0 10px 10px rgba(255,207,107,0.1); background: rgba(255,207,107,0.1);}
}

.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding-right: 78px; /* 預留右上角車牌標籤的空間，避免長假名被遮住 */
}
.replies-slot .card-top { padding-right: 64px; }
.card-emoji {
  font-size: 1.8rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255,207,107,0.3));
}

.replies-slot .message-card{
	border-top: 0px  dashed  var(--border-soft);
	
}


.card-meta { display: flex; flex-direction: column; }
.card-name { font-weight: 600; color: var(--accent); font-size: 1.15rem; }
.card-time { font-size: 0.75rem; color: var(--text-dim); }

.card-content {
  color: var(--text-main);
  line-height: 1.8;
  font-size: 1.05rem;
  margin: 0 0 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.action-btn {
  position: relative;
  overflow: visible;
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  transition: all 0.15s;
}
.action-btn:hover { border-color: var(--secondary); color: var(--secondary); }
.action-btn:active { transform: scale(0.92); }
.action-btn.active { border-color: var(--secondary); color: var(--secondary);  }
.report-btn:hover { border-color: var(--danger); color: var(--danger); }
.report-btn.active { border-color: var(--danger); color: var(--danger); background: rgba(255,92,108,0.12); }

/* 感同身受 +1 飄浮動畫 */
@keyframes float-up-fade {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.85); }
  15% { opacity: 1; transform: translate(-50%, -4px) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -28px) scale(1); }
}
.react-float {
  position: absolute;
  top: -4px;
  left: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  pointer-events: none;
  white-space: nowrap;
  animation: float-up-fade 0.9s ease forwards;
}
/* 按鈕彈跳(感同身受)/ 搖晃(檢舉)回饋動畫 */
@keyframes btn-bump {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.18); }
}
.action-btn.bump { animation: btn-bump 0.35s ease; }
@keyframes btn-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.action-btn.shake { animation: btn-shake 0.4s ease; }

.reply-form-slot { margin-top: 14px; }
.inline-reply-form {
  background: rgba(0,0,0,0.3);
  border: 0px solid var(--border-soft);
  border-radius: 12px;
  padding: 0 18px;
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease, margin-top 0.3s ease;
}
.inline-reply-form.open {
  padding: 18px;
  margin-top: 10px;
  max-height: 480px;
  opacity: 1;
}
.inline-reply-form .form-row { margin-bottom: 20px; }
.form-row-actions { display: flex; gap: 10px; margin-bottom: 0; }

.replies-slot {
  margin-top: 30px;
  padding-left: 30px;
  border-left: 1px dashed var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.replies-slot:empty { display: none; }
.replies-slot .message-card {
  padding: 14px 0px 0px 0px;
  background: rgba(255,255,255,0.0);
}
.replies-slot .replies-slot {
  margin-top: 30px;
  padding-left: 30px;
}
.replies-slot .card-emoji { font-size: 1.4rem; }
.replies-slot .card-content { font-size: 0.92rem; }

.hidden-notice {
  color: var(--danger);
  font-size: 0.85rem;
  font-style: italic;
  padding: 10px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
  padding: 30px 20px 50px;
  line-height: 1.9;
  position: relative;
}
.footer-credit { color: var(--accent); margin-top: 10px; letter-spacing: 0.05em; }

#load-more-btn { display: block; margin: 20px auto 0; }

@media (max-width: 480px) {
  .panel { padding: 22px 18px; }
  .site-header { padding: 48px 16px 26px; }
  
  .replies-slot .replies-slot {
	  padding-left: 15px;
	}
	.replies-slot {
	  padding-left: 15px;
	}
	.mobile-break {
		display: block; /* or display: inline; */
	}
}
