/* ==========================================================
   研討會網站 — 全站樣式
   配色與版型參考中信金融管理學院網站（www.ctbc.edu.tw）：
   青綠色主色、紅色強調、白色頁首 + 青綠色導覽列、淺灰區塊、青綠色頁尾。
   ========================================================== */

:root {
  --brand: #007d7d;        /* 主色：青綠（學校導覽列、標題） */
  --brand-600: #006a6a;    /* 主色 hover */
  --brand-900: #035555;    /* 深青綠 */
  --brand-50: #e6f2f2;     /* 淺青綠底 */
  --brand-light: #30bebe;  /* 亮青綠 */
  --accent: #e60012;       /* 強調色：學校標誌紅 */
  --accent-hover: #c4000f;
  --accent-ink: #ffffff;
  --footer: #247d7e;
  --footer-dark: #1d6a6b;
  --ink: #222222;
  --muted: #5f6b6b;
  --line: #dde5e5;
  --input-line: #c5d1d1;
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  --danger: #c0392b;
  --danger-bg: #fdecea;
  --success: #1e7e4f;
  --success-bg: #e8f6ee;
  --warn-bg: #fff6e0;
  --warn-line: #f3d48a;
  --warn-ink: #7a5300;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0, 40, 40, .06), 0 4px 12px rgba(0, 40, 40, .06);
  --focus: 0 0 0 3px rgba(0, 125, 125, .2);
  --container: 1140px;
  --header-h: 76px;  /* 白色標誌列 */
  --nav-h: 54px;     /* 青綠色導覽列 */
  --font: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", "Heiti TC", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
/* 英文版：main.js 把文字換成英文前先不顯示頁面（避免閃過中文），換完會移除 lang-pending */
.lang-pending body { visibility: hidden; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--brand); }
a:hover { color: var(--brand-900); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 860px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 8px 16px; background: var(--brand); color: #fff; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 頁首：白色標誌列 + 青綠色導覽列（捲動時只留導覽列） ---------- */
.site-header {
  position: sticky; top: calc(-1 * var(--header-h)); z-index: 50;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 40, 40, .12);
}
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 16px; }
.brand {
  /* max-width 留位置給右邊的中文／English 按鈕，避免按鈕被擠到下一行 */
  display: flex; align-items: center; gap: 12px; min-width: 0; max-width: calc(100% - 140px); height: var(--header-h);
  text-decoration: none; color: var(--brand-900); font-weight: 700; font-size: 1.25rem; letter-spacing: .02em;
}
.brand:hover { color: var(--brand-900); }
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: 1.15rem;
}
.brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 中文／English 切換鈕 */
.lang-switch {
  flex: none; margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--brand); border-radius: 999px; background: #fff;
  font: inherit; font-size: .9rem; font-weight: 700; line-height: 1; color: var(--brand);
  cursor: pointer; transition: background-color .15s, color .15s;
}
.lang-switch::before {
  content: ""; flex: none; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.lang-switch:hover { background: var(--brand); color: #fff; }
.lang-switch:focus-visible { outline: none; box-shadow: var(--focus); }

.site-nav {
  flex: 1 0 100%; display: flex; align-items: stretch; height: var(--nav-h);
  background: var(--brand);
  /* 讓青綠色底延伸到整個視窗寬度 */
  box-shadow: 0 0 0 100vmax var(--brand); clip-path: inset(0 -100vmax);
}
.site-nav a {
  display: flex; align-items: center; padding: 0 22px;
  color: #fff; font-size: 1.05rem; text-decoration: none;
  transition: background-color .15s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--brand-900); color: #fff; }

.nav-toggle {
  display: none; flex: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 11px;
  border: 0; border-radius: 6px; background: var(--brand); cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 1px; }

@media (max-width: 800px) {
  .site-header { top: 0; }
  .header-inner { flex-wrap: nowrap; column-gap: 10px; }
  .brand { height: 64px; max-width: none; font-size: 1.05rem; }
  .brand-mark { width: 36px; height: 36px; font-size: 1rem; }
  /* 手機版名稱太長時換成兩行，不要被切掉 */
  .brand-text {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    white-space: normal; line-height: 1.3; text-wrap: balance;
  }
  .lang-switch { height: 32px; padding: 0 12px; font-size: .85rem; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; height: auto;
    flex-direction: column; padding: 8px 16px 16px;
    box-shadow: 0 6px 12px rgba(0, 40, 40, .2); clip-path: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 14px; border-radius: 6px; }
  [id] { scroll-margin-top: 80px; }
}
@media (max-width: 420px) {
  .brand { font-size: .85rem; gap: 10px; }
  .lang-switch { padding: 0 10px; }
  .lang-switch::before { display: none; }
}
@media (max-width: 380px) {
  .brand-mark { display: none; }
}

/* ---------- 英文版（<html lang="en">）：英文字型、較長的名稱與選單 ---------- */
html[lang="en"] {
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
}
html[lang="en"] .brand { font-size: 1.05rem; letter-spacing: 0; }
html[lang="en"] .brand-text {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  white-space: normal; line-height: 1.3; text-wrap: balance;
}
html[lang="en"] .hero h1 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); letter-spacing: 0; }
@media (min-width: 801px) and (max-width: 1000px) {
  html[lang="en"] .site-nav a { padding: 0 14px; }
}
@media (max-width: 800px) {
  html[lang="en"] .brand { font-size: .9rem; }
  html[lang="en"] .brand-text { -webkit-line-clamp: 3; line-height: 1.25; }
}
@media (max-width: 420px) {
  html[lang="en"] .brand { font-size: .78rem; }
  html[lang="en"] .brand-mark { display: none; }
}
@media (max-width: 360px) {
  html[lang="en"] .brand { font-size: .72rem; }
  html[lang="en"] .brand-text { -webkit-line-clamp: 4; line-height: 1.2; }
}
/* 英文版手機：匯款資訊的英文欄名較長，改成上下排列，帳號才不會被折斷 */
@media (max-width: 480px) {
  html[lang="en"] .bank-info { grid-template-columns: 1fr; row-gap: 0; }
  html[lang="en"] .bank-info dt { font-size: .85rem; }
  html[lang="en"] .bank-info dd { margin-bottom: 8px; }
  html[lang="en"] .bank-info dd:last-child { margin-bottom: 0; }
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border: 1px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.btn-lg { padding: 13px 30px; font-size: 1.05rem; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not([disabled]) { background: var(--brand-900); color: #fff; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--brand-900); }
.btn-outline { border-color: #bfcaca; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 500; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 首頁主視覺 ---------- */
.hero {
  padding: 80px 0 88px; color: #fff;
  background:
    radial-gradient(900px 420px at 88% 0%, rgba(48, 190, 190, .45), transparent 65%),
    linear-gradient(120deg, var(--brand-900) 0%, var(--brand) 60%, #0a8f8f 100%);
}
.hero-eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 4px 14px;
  border-left: 4px solid var(--accent); background: rgba(255, 255, 255, .12);
  font-size: .9rem; color: #fff;
}
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); margin: 0 0 8px; letter-spacing: .03em; }
.hero-en { max-width: 760px; margin: 0 0 16px; font-size: 1.05rem; color: rgba(255, 255, 255, .85); }
.hero-theme { margin: 0 0 24px; font-size: 1.15rem; }
.hero-meta { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; color: #fff; }
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 20px; height: 20px; flex: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.countdown {
  display: inline-flex; align-items: baseline; gap: 6px; margin-top: 28px; padding: 10px 18px;
  border-radius: var(--radius); background: rgba(0, 0, 0, .18);
}
.countdown strong { font-size: 1.7rem; color: #fff; font-variant-numeric: tabular-nums; }

/* ---------- 內頁標題 ---------- */
.page-hero { padding: 44px 0; color: #fff; background: linear-gradient(120deg, var(--brand-900), var(--brand) 70%, #0a8f8f); }
.page-hero h1 { font-size: clamp(1.75rem, 4vw, 2.3rem); margin-bottom: 6px; }
.page-hero p { margin: 0; color: rgba(255, 255, 255, .88); }

/* ---------- 區塊 ---------- */
.section { padding: 68px 0; }
.section-soft { background: var(--bg-soft); }
/* 標題兩側短線：—— 標題 —— */
.section-title {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-bottom: 32px; font-size: 1.6rem; color: var(--brand); text-align: center;
}
.section-title::before, .section-title::after { content: ""; flex: none; width: 32px; height: 2px; background: var(--brand); }
.section-lead { margin: -16px auto 28px; max-width: 720px; color: var(--muted); text-align: center; }

.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.about-grid .prose p:first-child { margin-top: 0; }
.facts { list-style: none; margin: 0; padding: 8px 24px; border-top: 4px solid var(--brand); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.facts li { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.facts li:last-child { border-bottom: 0; }
.facts-label { font-size: .85rem; color: var(--brand); font-weight: 700; }
.facts-sub { font-size: .9rem; color: var(--muted); }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

/* 重要日期 */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .timeline { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .timeline { grid-template-columns: 1fr; } }
.timeline-item {
  display: flex; flex-direction: column; gap: 2px; padding: 20px;
  border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); background: #fff;
}
.timeline-label { font-weight: 700; color: var(--brand-900); }
.timeline-date { font-size: .95rem; color: var(--muted); }
.timeline-item.is-key { border-top-color: var(--accent); }
.timeline-item.is-key .timeline-label { color: var(--accent); }
.timeline-item.is-past { opacity: .55; }
.timeline-item.is-past { border-top-color: var(--input-line); }

/* 徵稿主題 */
.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; }
.topic-grid li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); background: #fff; font-weight: 500; }
.topic-no { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }

/* 行動呼籲 */
.cta-band { padding: 44px 0; background: var(--brand-50); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.cta-inner h2 { margin-bottom: 4px; color: var(--brand-900); }
.cta-inner p { margin: 0; color: var(--muted); }

/* ---------- 徵稿須知（文件版面） ---------- */
.doc-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; padding-top: 56px; padding-bottom: 72px; }
.toc { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; font-size: .95rem; }
.toc p { margin: 0 0 8px; font-size: .85rem; font-weight: 700; letter-spacing: .08em; color: var(--brand); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; margin-left: -2px; padding: 6px 14px; border-left: 2px solid transparent; color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--brand); border-left-color: var(--brand); }
@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; padding-top: 32px; }
  .toc { display: none; }
}

.prose h2 { margin: 48px 0 16px; padding-left: 14px; border-left: 4px solid var(--brand); font-size: 1.4rem; color: var(--brand); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 28px 0 12px; font-size: 1.1rem; color: var(--brand-900); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 6px 0; }
.placeholder { color: var(--muted); font-style: normal; background: var(--warn-bg); padding: 0 4px; border-radius: 4px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.prose .steps, .prose .topic-grid { padding-left: 0; }
.prose .topic-grid li { margin: 0; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start;
  margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700;
}
.steps strong { display: block; color: var(--brand-900); }
.steps span { font-size: .95rem; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { padding: 20px; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); background: #fff; }
.card h3 { font-size: 1.1rem; color: var(--brand); }
.card p { margin: 0; color: var(--muted); }

.doc-cta { margin-top: 48px; padding: 24px; border-radius: var(--radius); background: var(--brand-50); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.doc-cta p { margin: 0; font-weight: 700; color: var(--brand-900); }

/* 格式範例下載 */
.downloads, .prose .downloads { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.downloads li, .prose .downloads li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.downloads-label { flex: 1 0 9em; font-weight: 700; color: var(--brand-900); }
.downloads a { padding: 4px 14px; border: 1px solid var(--brand); border-radius: 999px; font-size: .9rem; font-weight: 500; text-decoration: none; }
.downloads a:hover { background: var(--brand); color: #fff; }

/* 匯款資訊 */
.bank-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 12px 0 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); }
.bank-info dt { color: var(--muted); }
.bank-info dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ---------- 提示框 ---------- */
.notice { margin: 0 0 20px; padding: 14px 18px; border: 1px solid; border-radius: var(--radius); font-size: .95rem; }
.notice strong { display: block; margin-bottom: 2px; }
.notice-text { margin: 0; }
.notice-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.notice-info { background: var(--brand-50); border-color: #b9d9d9; border-left: 4px solid var(--brand); color: var(--brand-900); }
.notice-error { background: var(--danger-bg); border-color: #f2b8b1; color: var(--danger); }

/* ---------- 投稿表單 ---------- */
.submit-wrap { padding-top: 40px; padding-bottom: 72px; }

.form-section {
  margin: 0 0 24px; padding: 24px 24px 4px;
  border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
  min-width: 0;
}
.form-section legend {
  float: left; width: 100%; margin: 0 0 18px; padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: 1.15rem; font-weight: 700; color: var(--brand);
}
.form-section legend + * { clear: both; }
.legend-no {
  display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 10px;
  border-radius: 50%; background: var(--brand); color: #fff; font-size: .9rem; vertical-align: 1px;
}

.field { margin-bottom: 20px; }
.field-label, .field > label { display: block; margin-bottom: 6px; font-weight: 700; }
.req { margin-left: 2px; color: var(--accent); }
.optional { margin-left: 4px; font-size: .85rem; font-weight: 400; color: var(--muted); }
.hint { margin: 4px 0 0; font-size: .875rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .form-section { padding: 20px 16px 4px; }
}

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--input-line); border-radius: 6px;
  font: inherit; color: inherit; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23007d7d'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E") no-repeat right 10px center / 18px; }
textarea { min-height: 180px; resize: vertical; line-height: 1.7; }
#submissionId::placeholder { text-transform: none; } /* 投稿編號輸入時自動大寫，但提示文字（e.g.）維持原樣 */
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { background: var(--bg-soft); }

.field-error { margin: 4px 0 0; font-size: .875rem; color: var(--danger); }
.field-error:empty { display: none; }
.has-error input[type="text"], .has-error input[type="email"], .has-error input[type="tel"],
.has-error select, .has-error textarea { border-color: var(--danger); }
.has-error .dropzone, .has-error .choice { border-color: var(--danger); }

.counter { margin: 4px 0 0; text-align: right; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--danger); font-weight: 700; }

.choice-group { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--input-line); border-radius: 6px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--brand-900); font-weight: 700; }
.choice-note { font-size: .875rem; font-weight: 400; color: var(--muted); }
.choice input, .check input { width: 18px; height: 18px; accent-color: var(--brand); }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 400 !important; }
.check input { flex: none; margin-top: 5px; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 32px 20px; border: 2px dashed #a9c4c4; border-radius: var(--radius);
  background: var(--bg-soft); text-align: center; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--brand); background: var(--brand-50); }
.dropzone:focus-within { border-color: var(--brand); box-shadow: var(--focus); }
.dropzone svg { width: 40px; height: 40px; margin-bottom: 6px; color: var(--brand); }
.dropzone-title { font-weight: 700; color: var(--brand); }
.dropzone-sub { font-size: .875rem; color: var(--muted); }

.file-info { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.file-info svg { width: 24px; height: 24px; flex: none; color: var(--brand); }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-size { font-size: .875rem; color: var(--muted); }
.file-remove { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; font-size: .85rem; color: var(--muted); cursor: pointer; }
.file-remove:hover { color: var(--danger); border-color: var(--danger); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.form-status { margin: 0; font-size: .95rem; }
.form-status.is-error { padding: 12px 16px; border: 1px solid #f2b8b1; border-radius: 6px; background: var(--danger-bg); color: var(--danger); }
.form-status.is-busy { color: var(--brand); }

.spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 投稿成功 */
.success { margin: 0; padding: 40px 32px; border: 1px solid #bfe3cf; border-radius: var(--radius); background: var(--success-bg); text-align: center; outline: none; }
.success-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--success); color: #fff; }
.success-icon svg { width: 34px; height: 34px; }
.success h2 { color: var(--success); }
.success-id { display: inline-block; margin: 8px 0 20px; padding: 6px 18px; border: 1px solid #bfe3cf; border-radius: 6px; background: #fff; font-size: 1.6rem; font-weight: 700; letter-spacing: .04em; }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; max-width: 520px; margin: 0 auto 24px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: left; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- 頁尾（學校網站的青綠色頁尾） ---------- */
.site-footer { padding-top: 40px; background: var(--footer); color: rgba(255, 255, 255, .9); font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; text-decoration-thickness: 2px; }
.site-footer p { margin: 0 0 4px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding-bottom: 28px; }
.footer-title { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; color: #fff; }
.footer-bottom { max-width: none; padding-top: 14px; padding-bottom: 14px; background: var(--footer-dark); text-align: center; font-size: .85rem; color: rgba(255, 255, 255, .75); }
.site-footer .footer-admin { margin-left: 12px; color: rgba(255, 255, 255, .75); }
.site-footer .footer-admin:hover { color: #fff; }

/* ---------- 管理後台登入頁（admin.html） ---------- */
.login {
  min-height: 100vh; display: grid; place-items: center; padding: 40px 16px;
  background:
    radial-gradient(900px 420px at 88% 0%, rgba(48, 190, 190, .45), transparent 65%),
    linear-gradient(120deg, var(--brand-900) 0%, var(--brand) 60%, #0a8f8f 100%);
}
.login-card {
  width: 100%; max-width: 460px; padding: 32px 28px;
  border-top: 4px solid var(--accent); border-radius: var(--radius); background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--brand-900); font-weight: 700; line-height: 1.4; text-decoration: none; }
.login-brand .brand-mark { width: 36px; height: 36px; font-size: 1rem; }
.login-card h1 { margin: 0 0 6px; font-size: 1.6rem; color: var(--brand); }
.login-lead { margin: 0 0 20px; color: var(--muted); }
.login-btn { width: 100%; }
.login-card .notice { margin: 0; }
.login-notes { margin: 22px 0 0; padding: 16px 0 0 1.2em; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.login-notes li { margin: 4px 0; }
.login-back { display: inline-block; margin-top: 14px; font-size: .9rem; }
