/* ============================================
   NTUDENTSA · About 頁面專屬樣式 (v2)
   - 共用既有 styles.css 設計 token
   - v2 加入：編輯模式 toggle / inline edit button / per-category editor chip
              / 跑馬燈 (carousel) / 線條圖示 (.icon)
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

main {
  padding: var(--space-xl) 0;
  min-height: 50vh;
}

.section-title {
  font-family: var(--font-zh-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: var(--space-lg) 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.btn-primary {
  display: inline-block;
  padding: 10px 24px;
  background: var(--primary);
  color: var(--surface);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-dark); }

.cta-band {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--bg-alt);
  border-top: 3px solid var(--accent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}
.cta-text {
  font-size: 16px;
  color: var(--text);
}

/* ─── 線條圖示（單色，stroke=currentColor） ──────────── */
.icon {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  display: inline-block;
  vertical-align: middle;
}
.icon-sm {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  display: inline-block;
  vertical-align: -2px;
}

/* ─── 編輯模式 toggle 列 ─────────────────────────────── */
.edit-mode-bar {
  background: var(--primary-soft);
  border-bottom: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  font-size: 13px;
  padding: 8px 0;
}
body:not(.editing-mode) .edit-mode-bar { display: none; }
body[data-as="member"] .edit-mode-bar { display: none; }
body[data-as="guest"] .edit-mode-bar { display: none; }

.edit-mode-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.edit-mode-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 500;
}
.edit-mode-label strong {
  color: var(--text);
  font-weight: 600;
}
.edit-mode-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.edit-mode-switch {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}
.switch-label {
  font-size: 12px;
  color: var(--text-muted);
}
.edit-mode-switch input { display: none; }
.switch-slider {
  width: 36px;
  height: 18px;
  background: var(--accent);
  position: relative;
  display: inline-block;
  transition: background 0.2s;
}
.switch-slider::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--surface);
  top: 2px;
  right: 2px;
  transition: 0.2s;
}
.edit-mode-switch input:not(:checked) + .switch-slider {
  background: var(--text-faded);
}
.edit-mode-switch input:not(:checked) + .switch-slider::after {
  right: auto;
  left: 2px;
}

/* ─── 可編輯區塊（hover 出編輯按鈕） ──────────────────── */
.editable {
  position: relative;
}
.edit-btn,
.edit-btn-inline,
.editable-toolbar,
.add-btn,
.add-btn-sm,
.upload-btn,
.page-toolbar,
.president-card-actions,
.category-card-actions,
.activity-event-actions,
.editor-scope-chip,
.carousel-edit-bar {
  display: none;
}

body.editing-mode .editable {
  outline: 1px dashed transparent;
  outline-offset: 6px;
  transition: outline-color 0.15s;
}
body.editing-mode .editable:hover {
  outline-color: var(--accent);
}

/* admin / super_admin sees admin-only stuff */
body.editing-mode[data-as="admin"] .edit-btn,
body.editing-mode[data-as="admin"] .edit-btn-inline,
body.editing-mode[data-as="admin"] .editable-toolbar,
body.editing-mode[data-as="admin"] .add-btn,
body.editing-mode[data-as="admin"] .add-btn-sm,
body.editing-mode[data-as="admin"] .upload-btn,
body.editing-mode[data-as="admin"] .page-toolbar,
body.editing-mode[data-as="admin"] .president-card-actions,
body.editing-mode[data-as="admin"] .category-card-actions,
body.editing-mode[data-as="admin"] .activity-event-actions,
body.editing-mode[data-as="admin"] .carousel-edit-bar,
body.editing-mode[data-as="super_admin"] .edit-btn,
body.editing-mode[data-as="super_admin"] .edit-btn-inline,
body.editing-mode[data-as="super_admin"] .editable-toolbar,
body.editing-mode[data-as="super_admin"] .add-btn,
body.editing-mode[data-as="super_admin"] .add-btn-sm,
body.editing-mode[data-as="super_admin"] .upload-btn,
body.editing-mode[data-as="super_admin"] .page-toolbar,
body.editing-mode[data-as="super_admin"] .president-card-actions,
body.editing-mode[data-as="super_admin"] .category-card-actions,
body.editing-mode[data-as="super_admin"] .activity-event-actions,
body.editing-mode[data-as="super_admin"] .carousel-edit-bar {
  display: inline-flex;
}

/* activity_editor sees only their scoped category's edit affordances */
body.editing-mode[data-as="activity_editor"] .scoped-editor .edit-btn,
body.editing-mode[data-as="activity_editor"] .scoped-editor .edit-btn-inline,
body.editing-mode[data-as="activity_editor"] .scoped-editor .activity-event-actions,
body.editing-mode[data-as="activity_editor"] .scoped-editor .carousel-edit-bar,
body.editing-mode[data-as="activity_editor"] .scoped-editor .editor-scope-chip,
body.editing-mode[data-as="activity_editor"] .scoped-editor .add-btn-sm {
  display: inline-flex;
}

/* the chip itself */
.editor-scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--surface);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}
body.editing-mode[data-as="admin"] .editor-scope-chip,
body.editing-mode[data-as="super_admin"] .editor-scope-chip {
  display: inline-flex;
}

/* edit buttons styling */
.edit-btn {
  display: none;
  align-items: center;
  gap: 4px;
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  z-index: 3;
  font-family: inherit;
}
.edit-btn:hover {
  background: var(--accent);
  color: var(--surface);
}

.edit-btn-inline {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}
.edit-btn-inline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.editable-toolbar {
  position: absolute;
  top: -32px;
  right: 0;
  display: none;
  gap: var(--space-xs);
  z-index: 3;
}
.editable-toolbar .edit-btn {
  position: static;
}

.add-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--primary);
  color: var(--surface);
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.add-btn:hover { background: var(--primary-dark); }

.add-btn-sm {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.add-btn-sm:hover {
  background: var(--primary);
  color: var(--surface);
}

.upload-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-alt);
  border: 1px dashed var(--accent);
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.upload-btn:hover {
  background: var(--accent);
  color: var(--surface);
}

.page-toolbar {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-md);
  border-bottom: 1px dashed var(--border);
}
.page-toolbar-info {
  font-size: 13px;
  color: var(--text-muted);
}

.president-card-actions,
.category-card-actions,
.activity-event-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: none;
  gap: 4px;
  z-index: 3;
}

/* ─── about-index grid menu ────────────────────────── */
.about-intro {
  max-width: 760px;
  margin: 0 auto var(--space-xl);
  text-align: center;
  padding: var(--space-md);
}
.about-intro-text {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.about-grid-section { position: relative; padding-top: var(--space-md); }
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}
.about-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
  min-height: 200px;
  position: relative;
}
.about-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.about-card-num {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
.about-card-title {
  font-family: var(--font-zh-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}
.about-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: var(--space-sm);
}
.about-card-cta {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

/* ─── about-bylaws ────────────────────────────────── */
.bylaws-toc {
  background: var(--bg-alt);
  padding: var(--space-md);
  margin-bottom: var(--space-xl);
  border-left: 3px solid var(--primary);
}
.bylaws-toc-title {
  font-family: var(--font-zh-serif);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text);
}
.bylaws-toc-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  /* row-gap 14、col-gap 24 — 之前 8 太小、Hello Elementor parent
     theme 對 li 有極小 line-height reset 導致兩排字垂直疊到 */
  gap: 14px 24px;
  padding: 0;
  margin: 0;
}
.bylaws-toc-list li {
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}
.bylaws-toc-list a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  padding: 4px 0;
}
.bylaws-toc-list a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.bylaws-content {
  max-width: 720px;
  margin: 0 auto;
}
.bylaws-chapter {
  margin-bottom: var(--space-xl);
  padding: var(--space-md) var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
}
.bylaws-chapter:last-child { border-bottom: none; }
.bylaws-chapter h2 {
  font-family: var(--font-zh-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-md);
}
.bylaws-chapter h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin: var(--space-md) 0 var(--space-xs);
}
.bylaws-chapter p, .bylaws-chapter ol, .bylaws-chapter ul {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  padding-left: 0;
}
.bylaws-chapter ol, .bylaws-chapter ul {
  padding-left: 24px;
}
.bylaws-chapter li { margin-bottom: 4px; }
.bylaws-departments li strong {
  color: var(--text);
  font-weight: 600;
}
.bylaws-aside {
  font-size: 13px;
  color: var(--text-faded);
  margin-top: var(--space-md);
  padding: var(--space-sm);
  border-left: 2px solid var(--accent);
  background: var(--bg-alt);
}
.bylaws-version {
  font-size: 12px;
  color: var(--text-faded);
  margin-top: var(--space-md);
  font-style: italic;
}

/* ─── about-member-rights ─────────────────────────── */
.rights-intro {
  max-width: 760px;
  margin: 0 auto var(--space-xl);
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  padding: var(--space-md);
}
.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}
.right-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-md);
  position: relative;
}
.right-card-icon {
  color: var(--accent);
  margin-bottom: var(--space-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}
.right-card-icon .icon {
  width: 32px !important;
  height: 32px !important;
}
.right-card h3 {
  font-family: var(--font-zh-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}
.right-card ul {
  list-style: none;
  padding: 0;
}
.right-card li {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
  border-bottom: 1px dashed var(--border);
}
.right-card li:last-child { border-bottom: none; }
.right-card li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ─── about-fees ───────────────────────────────────── */
.fees-summary {
  margin-bottom: var(--space-xl);
  text-align: center;
  padding: var(--space-md);
  position: relative;
}
.fees-amount-card {
  display: inline-flex;
  flex-direction: column;
  padding: var(--space-lg);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
}
.fees-amount-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-en);
  margin-bottom: 8px;
}
.fees-amount {
  font-family: var(--font-zh-serif);
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.fees-amount-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.fees-policy {
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}
.fees-policy p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.fees-transparency {
  padding: var(--space-md);
}
.fees-transparency p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}
.fees-uploads {
  background: var(--bg-alt);
  padding: var(--space-md);
  border: 1px solid var(--border);
}
.fees-uploads-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}
.fees-uploads-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.fees-reports {
  list-style: none;
  padding: 0;
  margin: 0;
}
.fees-report-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  gap: var(--space-md);
}
.fees-report-item:last-child { border-bottom: none; }
.fees-report-item strong {
  font-size: 14px;
  color: var(--text);
  display: block;
}
.fees-report-meta {
  font-size: 12px;
  color: var(--text-faded);
  display: block;
}
.fees-report-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.resource-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.resource-link:hover { text-decoration: underline; }
.fees-uploads-hint {
  font-size: 12px !important;
  color: var(--text-faded) !important;
  margin-top: var(--space-sm) !important;
  padding-top: var(--space-sm);
  border-top: 1px dashed var(--border);
}

/* ─── about-presidents ─────────────────────────────── */
.presidents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.president-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}
.president-photo {
  width: 100px;
  height: 130px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  cursor: pointer;
}
.president-photo-placeholder {
  font-size: 12px;
  color: var(--text-faded);
}
.president-tenure {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 4px;
}
.president-name {
  font-family: var(--font-zh-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-xs);
}
.president-cohort {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 8px;
}
.president-achievements {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-xs);
}
.president-quote {
  font-style: italic;
  font-size: 13px;
  color: var(--text-faded);
  padding-left: var(--space-sm);
  border-left: 2px solid var(--accent);
  margin-top: var(--space-xs);
}

/* ─── about-activities ─────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.category-card {
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  position: relative;
}
.category-card.scoped-editor {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(200,146,58,0.04) 0%, var(--surface) 100%);
}
.category-icon {
  color: var(--accent);
  margin-bottom: var(--space-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}
.category-icon .icon {
  width: 36px !important;
  height: 36px !important;
}
.category-card h3 {
  font-family: var(--font-zh-serif);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text);
}
.category-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}
.category-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.category-link:hover { text-decoration: underline; }

/* Detail / carousel demo */
.activities-detail-demo {
  background: var(--bg-alt);
  padding: var(--space-md);
  border: 1px solid var(--border);
  position: relative;
}
.activities-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}
.activities-detail-head .editor-scope-chip {
  position: static;
}

.carousel {
  margin-bottom: var(--space-lg);
}
.carousel-track {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-sm);
}
.carousel-slide {
  flex: 0 0 280px;
  height: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-faded);
  scroll-snap-align: start;
}
.carousel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-sm);
  font-size: 13px;
}
.carousel-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 4px 12px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
}
.carousel-btn:hover { border-color: var(--primary); }
.carousel-counter { color: var(--text-muted); font-family: var(--font-en); }
.carousel-edit-bar {
  display: none;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px dashed var(--border);
  align-items: center;
  gap: var(--space-md);
}
.carousel-hint {
  font-size: 11px;
  color: var(--text-faded);
}

.activity-events-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}
.activity-events-head h3 {
  font-family: var(--font-zh-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.activity-event {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-sm);
  position: relative;
}
.activity-date {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 4px;
}
.activity-event h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.activity-event p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── about-contact ───────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.contact-card {
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}
.contact-card--full {
  grid-column: 1 / -1;
}
.contact-card h2 {
  font-family: var(--font-zh-serif);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--accent);
}
.contact-info {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-sm) var(--space-md);
  font-size: 14px;
}
.contact-info dt {
  color: var(--text-faded);
  font-weight: 500;
  font-size: 12px;
}
.contact-info dd {
  color: var(--text);
  line-height: 1.5;
}
.contact-info a {
  color: var(--primary);
  text-decoration: none;
}
.contact-info a:hover { text-decoration: underline; }

.contact-social {
  list-style: none;
  padding: 0;
}
.contact-social li {
  display: grid;
  /* 加大 icon column 從 40 → 48；確保 logo 跟文字之間有夠距離 */
  grid-template-columns: 48px 1fr auto;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px dashed var(--border);
}
.contact-social li:last-child { border-bottom: none; }
.contact-social-icon {
  width: 48px;
  height: 48px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Hello Elementor parent theme 有 `img, svg { max-width: 100% }` 全域 reset、
   不鎖住 .icon 就會被撐到跟 column 等寬、跟文字重疊。!important 直接 lock 死 */
.contact-social-icon .icon {
  width: 32px !important;
  height: 32px !important;
}
/* v1.11.4 — 改用明確 class 與 grid 排版，避免被 parent theme 對
   <strong>/<span> 的 inline 樣式蓋掉導致兩個元素疊在同一行 */
.contact-social-text {
  display: grid;
  grid-template-rows: auto auto;
  gap: 2px;
  min-width: 0;
}
.contact-social-name {
  display: block !important;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  /* 防 parent theme 的 strong { font-weight, position, display: inline } */
}
.contact-social-desc {
  display: block !important;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  /* 長文字省略 */
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-social-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.contact-form-intro {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-actions {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-sm);
}
.form-note {
  font-size: 12px;
  color: var(--text-faded);
}

.contact-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}
.contact-card p a {
  color: var(--primary);
  text-decoration: none;
}
.contact-card p a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
  .president-card { grid-template-columns: 80px 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
  .edit-mode-inner { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* ─── Inline editor (textarea swap inside .editable block) ─────────── */
.inline-editor {
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-alt);
  border: 1px dashed var(--accent);
}
.inline-editor--card {
  /* When inside a right-card / category-card, take full width */
  margin-top: 0;
}
.inline-editor-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  font-family: var(--font-zh-sans);
  font-size: 14px;
  line-height: 1.6;
  background: var(--surface);
  color: var(--text);
  resize: vertical;
  min-height: 160px;
}
.inline-editor-textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.inline-editor-hint {
  font-size: 11px;
  color: var(--text-faded);
  margin-top: 6px;
  margin-bottom: var(--space-sm);
}
.inline-editor-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-sm);
}
.inline-editor-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.inline-editor-row input,
.inline-editor-row select,
.inline-editor-row textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
.inline-editor-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}
.inline-editor-cancel {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
.inline-editor-cancel:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.inline-editor-status {
  font-size: 13px;
  color: var(--text-muted);
}
.inline-editor-status--err {
  color: var(--danger, #c33);
}

/* ─── Modal (used for presidents / categories / events) ─────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--space-md);
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.modal h3 {
  font-family: var(--font-zh-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}
.modal label,
.modal .form-row {
  display: block;
  margin-bottom: var(--space-sm);
}
.modal .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}
.modal label > .form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.modal input,
.modal select,
.modal textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}
.modal input:focus,
.modal select:focus,
.modal textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.modal-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  margin-top: var(--space-md);
}
.modal-cancel {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
.modal-cancel:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.modal-status {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: auto;
}

/* ─── Drop-zone visual feedback on carousel ───────────────────────── */
.carousel.drop-active {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
  background: rgba(200, 146, 58, 0.06);
}
.carousel-slide {
  position: relative;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-slide .carousel-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.55);
  color: white;
  border: none;
  padding: 4px 6px;
  cursor: pointer;
}
.carousel-empty {
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 13px;
}

/* ─── Page toolbar admin actions ─────────────────────────────────── */
.fees-uploads-header { gap: var(--space-sm); }
.fees-report-empty {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  padding: var(--space-sm) 0;
}

/* ─── Empty states ─────────────────────────────────────────────── */
.presidents-empty,
.activity-events-empty {
  font-size: 14px;
  color: var(--text-muted);
  padding: var(--space-md);
  background: var(--bg-alt);
  text-align: center;
  margin: var(--space-md) 0;
}
