/* ================================================================
   偽文豪 · 香港文學分享平台 — 樣式 (styles.css)
   復古報紙美學 + 現代功能 UI
   ================================================================ */

/* ----- 變數 ----- */
:root {
  --paper: #f4f1ea;
  --ink: #1d1d1d;
  --rust: #8b0000;
  --line: rgba(139, 0, 0, 0.18);
  --shadow: rgba(27, 24, 18, 0.14);
  --gold: #b8860b;
  --muted-bg: rgba(255, 255, 245, 0.85);
  --radius: 0.75rem;
}

/* ----- Reset ----- */
*,*::before,*::after{box-sizing:border-box}
body {
  margin: 0;
  font-family: "Noto Serif TC","Songti TC","Microsoft JhengHei",serif;
  background: var(--paper); color: var(--ink);
  min-height: 100vh; overflow-x: hidden;
}

/* ----- 無障礙跳過連結 ----- */
.skip-link {
  position: absolute; top: -100px; left: 1rem;
  padding: .5rem 1rem; background: var(--rust); color: #fff;
  border-radius: 0 0 .5rem .5rem; z-index: 100;
  text-decoration: none; font-size: .88rem; font-weight: 600;
}
.skip-link:focus {
  top: 0; outline: 2px solid var(--rust); outline-offset: 2px;
}

/* ----- 背景網格 ----- */
body::before {
  content:""; position:fixed; inset:0; pointer-events:none; opacity:.4; z-index:0;
  background-image:linear-gradient(rgba(0,0,0,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(0,0,0,.035) 1px,transparent 1px);
  background-size:18px 18px;
}

/* ================================================================
   導航欄
   ================================================================ */
.main-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,241,234,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: .55rem 1rem; gap: .8rem;
}
.nav-brand {
  font-size: 1.15rem; font-weight: 700; letter-spacing: .06em;
  color: var(--rust); text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; gap: .15rem; }
.nav-link {
  padding: .35rem .7rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: .9rem;
  transition: background .15s;
}
.nav-link:hover { background: rgba(139,0,0,.07); }
.nav-link.active { background: var(--rust); color: #fff; }
.nav-auth { display: flex; align-items: center; gap: .5rem; }
.nav-user-menu { position: relative; }
.nav-user-btn {
  display: flex; align-items: center; gap: .25rem;
  padding: .35rem .7rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--muted-bg);
  cursor: pointer; font-family: inherit; font-size: .88rem; color: var(--ink);
}
.nav-chevron { font-size: .7rem; }
.nav-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 140px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 8px 24px var(--shadow);
  padding: .35rem 0; z-index: 55;
}
.nav-dropdown a {
  display: block; padding: .45rem 1rem; font-size: .88rem;
  color: var(--ink); text-decoration: none;
}
.nav-dropdown a:hover { background: rgba(139,0,0,.06); }
.nav-dropdown hr { margin: .25rem 0; border: none; border-top: 1px solid var(--line); }
.nav-dropdown.hidden, .hidden { display: none !important; }

/* ================================================================
   紙張容器
   ================================================================ */
.paper-shell {
  position: relative; z-index: 1;
  min-height: 100vh;
  padding: 1rem 1rem 3rem;
  max-width: 960px; margin: 0 auto;
  background: linear-gradient(180deg,rgba(255,255,255,.15),transparent 35%),var(--paper);
}
.masthead {
  padding: 1rem 0 1.2rem; border-bottom: 1px solid var(--line);
}
.eyebrow { margin: 0 0 .3rem; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--rust); }
.masthead h1 { margin: 0; font-size: 2rem; letter-spacing: .08em; }
.subline { margin: .3rem 0 0; color: rgba(29,29,29,.75); font-size: .95rem; }

/* ----- 通用視圖容器 ----- */
.view-container { padding-top: .8rem; }
.view-container.hidden { display: none; }

/* ================================================================
   首頁 Feed
   ================================================================ */
.intro-card {
  padding: .8rem .9rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: rgba(255,255,255,.25);
  margin-bottom: 1rem; box-shadow: 0 6px 18px var(--shadow);
}

/* ----- 搜尋欄 ----- */
.search-bar {
  display: flex; align-items: center; gap: .35rem;
  margin-bottom: .8rem; position: relative;
}
.search-input {
  width: 100%; padding: .6rem 1rem; border: 1px solid var(--line);
  border-radius: 999px; background: rgba(255,255,255,.7);
  font-family: inherit; font-size: .88rem; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus {
  outline: none; border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(139,0,0,.08);
}
.search-input::placeholder { color: rgba(29,29,29,.4); }
.search-clear-btn {
  position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
  padding: .2rem .45rem; border: none; border-radius: 50%;
  background: rgba(0,0,0,.08); color: rgba(29,29,29,.6);
  cursor: pointer; font-size: .8rem; line-height: 1.2;
}
.search-clear-btn:hover { background: rgba(0,0,0,.15); }
.search-clear-btn.hidden { display: none; }

/* ----- 篩選列 ----- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem;
}
.filter-chip {
  padding: .35rem .65rem; border: 1px solid var(--line);
  border-radius: 999px; background: rgba(255,255,255,.55);
  font-family: inherit; font-size: .82rem; color: var(--ink); cursor: pointer;
  transition: all .15s;
}
.filter-chip:hover { border-color: var(--rust); }
.filter-chip.active { background: var(--rust); color: #fff; border-color: var(--rust); }
.feed-scroll {
  display: flex; gap: .9rem; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: .5rem;
  scrollbar-width: none;
}
.feed-scroll::-webkit-scrollbar { display: none; }
.feed-loading { padding: 2rem; text-align: center; color: rgba(29,29,29,.5); font-size: .95rem; }

/* ----- 載入更多 ----- */
.load-more-container {
  text-align: center; padding: 1.2rem 0;
}
.load-more-container.hidden { display: none; }
.load-more-btn {
  padding: .6rem 1.8rem; border: 1px solid var(--rust);
  border-radius: 999px; background: transparent; color: var(--rust);
  font-family: inherit; font-size: .9rem; cursor: pointer;
  transition: background .15s, color .15s;
}
.load-more-btn:hover { background: var(--rust); color: #fff; }
.load-more-btn:disabled { opacity: .4; cursor: not-allowed; }
.feed-end-message {
  color: rgba(29,29,29,.35); font-size: .85rem; margin: .5rem 0 0;
}
.feed-end-message.hidden { display: none; }

/* ----- 文章卡片 ----- */
.post-card {
  min-width: 84vw; max-width: 84vw; min-height: 70vh;
  padding: 1rem; border: 1px solid var(--line); border-radius: 1rem;
  background: rgba(255,252,245,.95); box-shadow: 0 12px 32px var(--shadow);
  scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: space-between; gap: .8rem;
  cursor: pointer; transition: box-shadow .2s;
}
.post-card:hover { box-shadow: 0 16px 40px rgba(27,24,18,.22); }
.post-type-badge {
  display: inline-block; padding: .15rem .55rem;
  border: 1px solid var(--rust); border-radius: 999px;
  font-size: .7rem; color: var(--rust); align-self: flex-start;
  letter-spacing: .04em;
}
.post-type-badge.small { font-size: .65rem; padding: .1rem .4rem; }
.post-card .quote {
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: clamp(1rem,3.6vw,1.45rem); line-height: 1.75;
  letter-spacing: .15em; text-align: center;
  margin: 0 auto; flex: 1; overflow: hidden;
  text-overflow: ellipsis; max-height: 100%;
}
.post-meta {
  display: flex; justify-content: space-between; align-items: center;
  gap: .5rem; font-size: .82rem; color: rgba(29,29,29,.7);
}
.card-actions {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
}
.card-actions-right { display: flex; align-items: center; gap: .5rem; }
.comment-indicator { font-size: .78rem; color: rgba(29,29,29,.5); text-decoration: none; cursor: pointer; transition: color .15s; }
.comment-indicator:hover { color: var(--rust); }
.preview-hint { font-size: .75rem; color: rgba(29,29,29,.4); }

/* ----- 讚好按鈕 ----- */
.like-btn {
  padding: .3rem .6rem; border: 1px solid var(--line);
  border-radius: 999px; background: transparent;
  font-family: inherit; font-size: .88rem; color: var(--ink); cursor: pointer;
  transition: all .2s;
}
.like-btn:hover { border-color: var(--rust); color: var(--rust); }
.like-btn.liked { border-color: var(--rust); color: var(--rust); background: rgba(139,0,0,.07); animation: likePop .3s ease; }
@keyframes likePop {
  0% { transform: scale(1); } 50% { transform: scale(1.25); } 100% { transform: scale(1); }
}

/* ----- 檢舉按鈕 ----- */
.report-btn {
  background: transparent; color: var(--rust); padding: .3rem .5rem;
  border-radius: 999px; border: none; cursor: pointer; font-family: inherit; font-size: .78rem;
}

/* ================================================================
   投稿頁面
   ================================================================ */
.write-section { max-width: 640px; margin: 0 auto; }
.section-title { margin: 0 0 .3rem; font-size: 1.2rem; color: var(--rust); }
.section-sub { margin: 0 0 1rem; color: rgba(29,29,29,.7); font-size: .9rem; }

.post-type-selector { display: flex; gap: .5rem; flex-wrap: wrap; }
.post-type-option {
  flex: 1; min-width: 90px; padding: .5rem .6rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.55); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  transition: all .15s;
}
.post-type-option input { display: none; }
.post-type-option.selected { border-color: var(--rust); background: rgba(139,0,0,.06); }
.type-icon { font-size: 1.1rem; }
.type-label { font-size: .88rem; font-weight: 600; }
.type-hint { font-size: .72rem; color: rgba(29,29,29,.5); }

.char-count {
  display: block; text-align: right; font-size: .78rem;
  color: rgba(29,29,29,.5); margin-top: .15rem;
}
.submit-hint { font-size: .85rem; color: rgba(29,29,29,.6); text-align: center; margin: .5rem 0 0; }
.submit-hint a { color: var(--rust); }
.submit-hint.hidden { display: none; }
.submission-form {
  display: grid; gap: .85rem;
}
.field-label { font-size: .95rem; color: rgba(29,29,29,.82); }
textarea, input[type='text'], input[type='email'], input[type='password'], input[type='search'] {
  width: 100%; border: 1px solid var(--line); border-radius: .7rem;
  padding: .75rem .8rem; font: inherit; background: rgba(255,255,255,.7);
}
textarea { min-height: 100px; resize: vertical; }
.option-block { display: grid; gap: .45rem; }
.option-row, .tag-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-grid label, .option-row label {
  padding: .45rem .6rem; border: 1px solid var(--line);
  border-radius: 999px; background: rgba(255,255,255,.55); font-size: .92rem; cursor: pointer;
}

/* ================================================================
   文章詳情
   ================================================================ */
.post-detail-card {
  padding: 1.2rem; border: 1px solid var(--line); border-radius: 1rem;
  background: rgba(255,252,245,.95); box-shadow: 0 8px 24px var(--shadow);
  display: flex; flex-direction: column; gap: .8rem;
}
.back-link { color: var(--rust); text-decoration: none; font-size: .9rem; margin-bottom: .3rem; }
.post-detail-quote {
  font-size: clamp(1.05rem,2.2vw,1.25rem); line-height: 2.0;
  letter-spacing: .08em; text-align: justify;
  margin: 0 auto; padding: 1rem 0;
  white-space: pre-wrap; word-break: break-word;
  max-width: 100%; overflow-wrap: break-word;
}
.post-detail-word-count {
  font-size: .78rem; color: rgba(29,29,29,.5);
  text-align: right; margin-top: .3rem;
}
.post-detail-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .88rem; color: rgba(29,29,29,.7);
}
.post-detail-footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: .5rem; padding-top: .6rem; border-top: 1px solid var(--line);
  font-size: .82rem; color: rgba(29,29,29,.6);
}

/* 留言 */
.comments-section { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.comments-section h3 { margin: 0 0 .8rem; font-size: 1rem; color: var(--rust); }
.comment-item {
  padding: .65rem .8rem; border-bottom: 1px solid rgba(0,0,0,.06);
  margin-bottom: .4rem;
}
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .25rem; }
.comment-header strong { font-size: .88rem; }
.comment-time { font-size: .75rem; color: rgba(29,29,29,.45); }
.comment-text { margin: 0; font-size: .9rem; line-height: 1.55; }
.comment-form { display: flex; gap: .5rem; margin-top: .8rem; }
.comment-form textarea { flex: 1; min-height: 50px; }
.comment-submit-btn { padding: .55rem 1rem; white-space: nowrap; }
.empty-state { text-align: center; color: rgba(29,29,29,.5); padding: 1.5rem 0; font-size: .9rem; }
.empty-state a { color: var(--rust); }

/* ================================================================
   個人主頁
   ================================================================ */
.profile-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem; border: 1px solid var(--line); border-radius: 1rem;
  background: rgba(255,252,245,.85); margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--rust); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700; flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.profile-info h2 { margin: 0 0 .15rem; font-size: 1.15rem; }
.profile-info p { margin: 0; font-size: .88rem; color: rgba(29,29,29,.7); }
.profile-stats { font-size: .82rem; margin-top: .2rem !important; color: var(--rust) !important; }
.edit-profile-btn { padding: .35rem .8rem; font-size: .82rem; border-radius: 999px; }
.profile-posts h3 { font-size: 1rem; color: var(--rust); margin: 0 0 .6rem; }
.profile-post-item {
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,252,245,.8); margin-bottom: .5rem; cursor: pointer;
  transition: box-shadow .15s;
}
.profile-post-item:hover { box-shadow: 0 4px 12px var(--shadow); }
.profile-post-content { display: flex; align-items: flex-start; gap: .5rem; margin-bottom: .3rem; }
.profile-post-content p { margin: 0; font-size: .9rem; flex: 1; }
.profile-post-meta { display: flex; gap: .8rem; font-size: .78rem; color: rgba(29,29,29,.55); }

/* ================================================================
   登入 / 註冊
   ================================================================ */
.auth-section { max-width: 420px; margin: 2rem auto 0; }
.auth-card {
  padding: 1.5rem; border: 1px solid var(--line); border-radius: 1rem;
  background: rgba(255,252,245,.95); box-shadow: 0 8px 24px var(--shadow);
}
.auth-card h2 { margin: 0 0 .25rem; font-size: 1.2rem; text-align: center; color: var(--rust); }
.auth-sub { margin: 0 0 1rem; text-align: center; font-size: .88rem; color: rgba(29,29,29,.65); }
.auth-google-btn {
  width: 100%; padding: .65rem; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; font-family: inherit; font-size: .92rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .5rem;
  transition: box-shadow .15s;
}
.auth-google-btn:hover { box-shadow: 0 4px 12px var(--shadow); }
.google-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: #4285f4; color: #fff; font-size: .8rem; font-weight: 700;
}
.auth-divider {
  display: flex; align-items: center; gap: .8rem; margin: 1rem 0;
  color: rgba(29,29,29,.4); font-size: .82rem;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; border-top: 1px solid var(--line);
}
.auth-form { display: grid; gap: .7rem; }
.form-group { display: grid; gap: .2rem; }
.form-group label { font-size: .85rem; color: rgba(29,29,29,.8); }
.auth-submit-btn { width: 100%; }
.auth-toggle { text-align: center; font-size: .85rem; color: rgba(29,29,29,.6); margin: .8rem 0 0; }
.auth-toggle a { color: var(--rust); cursor: pointer; }
.auth-error {
  margin-top: .6rem; padding: .5rem .7rem; border-radius: var(--radius);
  background: rgba(200,0,0,.08); color: #a00; font-size: .85rem; text-align: center;
}
.auth-error.hidden { display: none; }

/* ================================================================
   關於頁面
   ================================================================ */
.about-section { max-width: 600px; margin: 0 auto; padding: 1rem 0; }
.about-section h2 { color: var(--rust); margin: 0 0 .5rem; }
.about-section h3 { color: var(--rust); margin: 1rem 0 .4rem; }
.about-section p, .about-section li { line-height: 1.7; font-size: .92rem; color: rgba(29,29,29,.85); }
.about-quote { font-style: italic; color: var(--rust) !important; font-size: 1rem !important; text-align: center; }
.about-section hr { border: none; border-top: 1px solid var(--line); margin: 1rem 0; }
.about-section ul { padding-left: 1.2rem; }
.about-tech { font-size: .82rem !important; color: rgba(29,29,29,.5) !important; text-align: center; }

/* ================================================================
   Modal（彈窗）
   ================================================================ */
.modal {
  position: fixed; inset: 0; background: rgba(17,14,10,.58);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; z-index: 60;
}
.modal.hidden { display: none; }
.modal-card {
  width: min(92vw,680px); background: var(--paper);
  border: 1px solid var(--line); border-radius: 1rem;
  padding: 1rem; box-shadow: 0 20px 48px rgba(0,0,0,.2);
}
.preview-card { width: min(94vw,780px); }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-bottom: .8rem;
}
.modal-header h2 { margin: 0; font-size: 1.05rem; }

/* ================================================================
   Toast 通知
   ================================================================ */
.toast-container {
  position: fixed; top: 70px; right: 1rem; z-index: 70;
  display: flex; flex-direction: column; gap: .5rem;
  pointer-events: none;
}
.toast {
  padding: .6rem .9rem; border-radius: 999px;
  font-size: .85rem; font-family: inherit;
  box-shadow: 0 6px 18px var(--shadow);
  opacity: 0; transform: translateX(20px); transition: all .3s ease;
  pointer-events: auto; max-width: 280px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-info { background: rgba(29,29,29,.9); color: #fff; }
.toast-success { background: rgba(34,139,34,.9); color: #fff; }
.toast-warning { background: rgba(184,134,11,.9); color: #fff; }
.toast-error { background: rgba(200,0,0,.85); color: #fff; }

/* ================================================================
   共用按鈕
   ================================================================ */
.submit-btn {
  padding: .8rem 1rem; background: var(--rust); color: #fff;
  border: none; border-radius: 999px; cursor: pointer; font-family: inherit;
  font-size: .95rem; transition: opacity .15s;
}
.submit-btn:hover { opacity: .9; }
.submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.ghost-btn {
  font-size: 1.3rem; background: transparent; color: var(--ink);
  border: none; cursor: pointer; font-family: inherit; padding: .2rem .4rem;
}

/* ================================================================
   歡迎橫幅
   ================================================================ */
.welcome-banner {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  z-index: 65; background: rgba(12,10,8,.5);
}
.welcome-banner.hidden { display: none; }
.welcome-card {
  width: min(92vw,520px); background: rgba(244,241,234,.98);
  border: 1px solid var(--line); padding: 1.1rem;
  border-radius: 12px; text-align: center;
  box-shadow: 0 18px 44px rgba(0,0,0,.32);
}
.welcome-card h2 { margin: 0 0 .6rem; font-size: 1.25rem; color: var(--rust); }
.welcome-card p { margin: 0 0 1rem; color: rgba(29,29,29,.8); }
.welcome-actions { display: flex; justify-content: center; }

/* ================================================================
   新手教學
   ================================================================ */
.onboarding-overlay {
  position: fixed; inset: 0; z-index: 66; pointer-events: none;
}
.onboarding-overlay.hidden { display: none; }
.onboarding-backdrop {
  position: absolute; inset: 0; background: rgba(12,10,8,.62); backdrop-filter: blur(2px);
}
.onboarding-highlight {
  position: fixed; z-index: 67; border-radius: 1rem;
  border: 2px solid rgba(255,255,255,.94);
  box-shadow: 0 0 0 9999px rgba(12,10,8,.62);
  animation: obPulse 1.2s ease-in-out infinite; pointer-events: none;
}
.onboarding-tooltip {
  position: fixed; z-index: 68; width: min(82vw,300px);
  background: rgba(255,247,233,.98);
  border: 1px solid var(--line); border-radius: .9rem;
  padding: .8rem; box-shadow: 0 14px 30px rgba(0,0,0,.2);
  pointer-events: auto; animation: obFadeIn .25s ease-out;
}
.onboarding-tooltip[data-direction="bottom"] .onboarding-arrow { top: -8px; }
.onboarding-tooltip[data-direction="top"] .onboarding-arrow { bottom: -8px; }
.onboarding-arrow {
  position: absolute; width: 14px; height: 14px;
  background: rgba(255,247,233,.98);
  border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: rotate(45deg); left: 50%; margin-left: -7px;
}
.onboarding-content h3 { margin: 0 0 .3rem; font-size: .95rem; }
.onboarding-content p { margin: 0 0 .6rem; font-size: .9rem; line-height: 1.55; }
.onboarding-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.onboarding-actions button {
  padding: .4rem .7rem; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-family: inherit; cursor: pointer;
}
.onboarding-actions .ob-next { background: var(--rust); border-color: var(--rust); color: #fff; }
@keyframes obPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.02)} }
@keyframes obFadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }

/* ================================================================
   圖片預覽
   ================================================================ */
#canvasPreview {
  width: 100%; border-radius: .8rem; border: 1px solid var(--line); background: var(--paper);
}
.preview-note { margin: .75rem 0 0; color: rgba(29,29,29,.72); font-size: .9rem; }

/* ================================================================
   列印樣式
   ================================================================ */
@media print {
  .main-nav, .filter-bar, .card-actions, .comment-form,
  #toastContainer, .modal, .welcome-banner, .search-bar,
  .load-more-container { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .paper-shell { box-shadow: none; border: none; max-width: 100%; }
  .post-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

/* ================================================================
   RWD
   ================================================================ */
@media (max-width: 699px) {
  /* 導航：隱藏部分連結，保留品牌 + 登入 */
  .nav-links { gap: 0; }
  .nav-link { padding: .3rem .45rem; font-size: .78rem; }
  .nav-brand { font-size: 1rem; }
  .nav-inner { padding: .45rem .6rem; gap: .4rem; }

  /* Masthead 縮小 */
  .masthead h1 { font-size: 1.4rem; }
  .masthead { padding: .6rem 0 .8rem; }
  .subline { font-size: .82rem; }

  /* 容器內邊距減少 */
  .paper-shell { padding: .5rem .6rem 2rem; }

  /* Feed 卡片全寬 */
  .post-card { min-width: 90vw; max-width: 90vw; min-height: 60vh; }
  .feed-scroll { gap: .6rem; padding-bottom: .3rem; }

  /* 文章詳情 */
  .post-detail-card { padding: .8rem; }
  .post-detail-quote { font-size: 1rem; line-height: 1.85; padding: .5rem 0; }

  /* 投稿頁 */
  .write-section { padding: 0 .2rem; }
  .post-type-option { min-width: 75px; padding: .4rem .4rem; }
  .type-label { font-size: .8rem; }

  /* 個人主頁 */
  .profile-header { padding: .7rem; gap: .6rem; }
  .profile-avatar { width: 44px; height: 44px; font-size: 1.1rem; }
  .profile-info h2 { font-size: 1rem; }

  /* 留言區 */
  .comment-form { flex-direction: column; }
  .comment-submit-btn { width: 100%; }

  /* Modal 全屏 */
  .modal-content { max-width: 95vw; padding: 1rem; }

  /* 教學導覽 */
  .onboarding-tooltip { max-width: 90vw !important; left: 5vw !important; }

  /* 歡迎橫幅 */
  .welcome-banner { padding: .6rem .8rem; }
  .welcome-banner h2 { font-size: 1rem; }
}
@media (min-width: 700px) {
  .paper-shell { padding: 1.5rem 1.5rem 3rem; }
  .post-card { min-width: 44vw; max-width: 44vw; min-height: 72vh; }
  .nav-inner { padding: .55rem 1.5rem; }
  .tag-grid { gap: .6rem; }
}
@media (min-width: 960px) {
  .post-card { min-width: 280px; max-width: 320px; min-height: 420px; }
  .feed-scroll { flex-wrap: wrap; overflow-x: visible; justify-content: center; }
  .post-card .quote { font-size: 1.2rem; }
}
