@charset "UTF-8";
/* ===== 前端新技術第二批（2026-11-03） ===== */

/* 1. 首頁網路拓樸橫幅（伺服器輸出固定高度，不會跳版） */
.tn-hero { position: relative; height: 132px; margin: 0 0 18px; border-radius: 16px; overflow: hidden; isolation: isolate;
  border: 1px solid rgba(60,173,110,.28); background: radial-gradient(120% 140% at 0% 0%, rgba(46,133,85,.22), transparent 55%), radial-gradient(90% 120% at 100% 100%, rgba(34,211,238,.10), transparent 60%), var(--color-bg-secondary, rgba(127,127,127,.06)); }
.tn-hero-net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.tn-hero-tx { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 26px; pointer-events: none; }
.tn-hero-k { font: 600 12px ui-monospace, Menlo, monospace; color: var(--color-primary-light, #3cad6e); letter-spacing: .02em; }
.tn-hero-tx b { font-size: 1.35rem; letter-spacing: .02em; }
.tn-hero-tx span:last-child { font-size: .9rem; opacity: .75; }
@media (max-width: 600px) { .tn-hero { height: 112px; } .tn-hero-tx { padding: 0 16px; } .tn-hero-tx b { font-size: 1.05rem; } .tn-hero-tx span:last-child { font-size: .8rem; } }

/* 2. 類型篩選列（固定高度先佔位） */
.tn-filter { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-height: 38px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.tn-filter::-webkit-scrollbar { display: none; }
.tn-filter-b { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--color-border); background: transparent; color: var(--color-text); font: 600 13px/1 inherit; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease; }
.tn-filter-b small { font: 600 11px ui-monospace, Menlo, monospace; opacity: .6; }
.tn-filter-b:hover { border-color: rgba(60,173,110,.7); transform: translateY(-1px); }
.tn-filter-b.is-on { background: linear-gradient(135deg, #2e8555, #3cad6e); color: #fff; border-color: transparent; box-shadow: 0 4px 14px -4px rgba(60,173,110,.7); }
.tn-filter-b.is-on small { opacity: .85; }
.tn-filter-more { flex: none; margin-left: 4px; font-size: 13px; color: var(--color-primary-light, #3cad6e) !important; white-space: nowrap; }
.post-card[hidden], .feed-ad-card[hidden] { display: none !important; }
::view-transition-group(*) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2,.8,.2,1); }

/* 3. 頂部章節定位列 */
.tn-secbar { position: fixed; z-index: 140; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 14px; box-sizing: border-box;
  background: color-mix(in srgb, var(--color-nav-bg, #1b1b1f) 82%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(60,173,110,.35); font-size: 13px; transform: translateY(-110%); opacity: 0; pointer-events: none; transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .2s ease; }
.tn-secbar.is-in { transform: none; opacity: 1; pointer-events: auto; }
.tn-secbar button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.tn-secbar-t { max-width: 38%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .7; }
.tn-secbar-t:hover { opacity: 1; color: var(--color-primary-light, #3cad6e); }
.tn-secbar-sep { opacity: .4; }
.tn-secbar-c { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-weight: 600; color: var(--color-primary-light, #3cad6e) !important; overflow: hidden; height: 36px; }
.tn-secbar-ci { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-secbar-c i { font-style: normal; font-size: 10px; opacity: .7; }
.tn-secbar-ci.roll-up { animation: tnRollUp .3s cubic-bezier(.2,.8,.2,1); } .tn-secbar-ci.roll-down { animation: tnRollDown .3s cubic-bezier(.2,.8,.2,1); }
@keyframes tnRollUp { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tnRollDown { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
.tn-secbar-list { position: absolute; top: 40px; left: 14px; max-width: min(520px, calc(100% - 28px)); max-height: 60vh; overflow: auto; padding: 6px; border-radius: 12px;
  background: var(--color-bg, #1b1f24); border: 1px solid var(--color-border); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.tn-secbar-list button { display: block; width: 100%; text-align: left; padding: 8px 10px !important; border-radius: 8px; line-height: 1.4; }
.tn-secbar-list button:hover { background: rgba(46,133,85,.15); color: var(--color-primary-light, #3cad6e); }

/* 4. 朗讀 */
.tn-tts-start { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--color-border); background: transparent; color: inherit; font-size: 12px; cursor: pointer; vertical-align: middle; transition: border-color .2s ease, color .2s ease; }
.tn-tts-start:hover { border-color: rgba(60,173,110,.7); color: var(--color-primary-light, #3cad6e); }
.tn-tts { position: fixed; left: 50%; bottom: 20px; z-index: 9100; display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 999px;
  background: rgba(20,24,28,.82); color: #e5e7eb; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(60,173,110,.45); box-shadow: 0 14px 36px rgba(0,0,0,.4);
  transform: translate(-50%, 140%); opacity: 0; transition: transform .35s cubic-bezier(.2,1.2,.3,1), opacity .2s ease; }
.tn-tts.is-in { transform: translate(-50%, 0); opacity: 1; }
.tn-tts button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 13px; }
.tn-tts button:hover { background: rgba(255,255,255,.1); }
.tn-tts .tn-tts-play { background: #2e8555; color: #fff; }
.tn-tts .tn-tts-rate { width: auto; padding: 0 10px; border-radius: 999px; font: 600 12px ui-monospace, Menlo, monospace; }
.tn-tts-pos { font: 600 12px ui-monospace, Menlo, monospace; opacity: .7; padding: 0 6px; min-width: 56px; text-align: center; }
.tn-tts-cur { background: rgba(46,133,85,.14); box-shadow: -4px 0 0 rgba(60,173,110,.8); border-radius: 4px; transition: background .25s ease; }

/* 5. 術語提示 */
abbr.tn-gl { text-decoration: none; border-bottom: 1px dotted rgba(60,173,110,.8); cursor: help; }
abbr.tn-gl:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.tn-gl-tip { position: fixed; inset: auto; margin: 0; max-width: 300px; padding: 9px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5;
  background: #111827; color: #e5e7eb; border: 1px solid rgba(60,173,110,.45); box-shadow: 0 12px 30px rgba(0,0,0,.35); pointer-events: none; overflow: visible; }
.tn-gl-tip b { display: block; color: #3cad6e; font: 700 12.5px ui-monospace, Menlo, monospace; margin-bottom: 2px; }
.tn-gl-tip:not([popover]) { display: none; } .tn-gl-tip:not([popover]).is-open { display: block; }
@supports (anchor-name: --a) {
  .tn-gl-tip { position-anchor: --tn-gl; top: anchor(bottom); left: anchor(center); translate: -50% 8px; position-try-fallbacks: flip-block, flip-inline; }
}
@media (prefers-reduced-motion: no-preference) {
  .tn-gl-tip[popover] { opacity: 0; transition: opacity .15s ease, display .15s allow-discrete, overlay .15s allow-discrete; }
  .tn-gl-tip[popover]:popover-open { opacity: 1; }
  @starting-style { .tn-gl-tip[popover]:popover-open { opacity: 0; } }
}

/* 圖片放大：小地圖 */
.tn-lb-mini { position: absolute; right: 16px; bottom: 44px; width: 150px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 24px rgba(0,0,0,.45); opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; background: #000; }
.tn-lb-mini.is-on { opacity: .95; transform: none; }
.tn-lb-mini img { display: block; width: 100%; height: auto; opacity: .55; }
.tn-lb-mini i { position: absolute; border: 2px solid #3cad6e; border-radius: 3px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
dialog.tn-lb.is-zoom .tn-lb-img { transition: none !important; }
@media (max-width: 600px) { .tn-lb-mini { width: 100px; bottom: 16px; right: 10px; } }
/* 朗讀：按鈕變「停止」狀態；控制列往上移，避開右下角的廣告浮動框 */
.tn-tts-start.is-on { background: #2e8555; border-color: #2e8555; color: #fff; }
.tn-tts-start.is-on:hover { background: #cf222e; border-color: #cf222e; color: #fff; }
.tn-tts { bottom: 96px; }
@media (max-width: 600px) { .tn-tts { bottom: 80px; } }
.tn-tts .tn-tts-x { background: rgba(207,34,46,.85); color: #fff; }

/* 閱讀紀錄 */
.post-card { position: relative; }
.tn-read-tag { display: inline-flex; align-items: center; margin-left: 10px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  color: var(--color-primary-light, #3cad6e); background: rgba(46,133,85,.12); border: 1px solid rgba(46,133,85,.3); }
.tn-read-tag.is-done { color: var(--color-text-secondary); background: rgba(127,127,127,.1); border-color: rgba(127,127,127,.25); }
.post-card.is-read .post-card-title a { opacity: .72; }
.tn-read-bar { position: absolute; left: 0; bottom: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #2e8555, #3cad6e); pointer-events: none; }
.tn-resume-lab { flex: none; margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--color-border); font-size: 12px; color: var(--color-text-secondary); white-space: nowrap; }
.tn-resume-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 240px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px dashed rgba(60,173,110,.6); color: var(--color-text) !important; text-decoration: none !important; font-size: 13px; transition: border-color .2s ease, background .2s ease; }
.tn-resume-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-resume-chip small { flex: none; font: 600 11px ui-monospace, Menlo, monospace; color: var(--color-primary-light, #3cad6e); }
.tn-resume-chip:hover { border-style: solid; background: rgba(46,133,85,.1); }
