:root {
  --yc-blue: #0032A0;
  --yc-blue-dark: #00256e;
  --yc-gold: #c3a35b;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e2e4ec;
  --bg: #f5f6fa;
  --serif: Georgia, "Times New Roman", "Songti TC", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "PingFang TC", "PingFang SC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ===================== Admin ===================== */
body.admin { background: var(--bg); }
.admin-header { background: var(--yc-blue); color: #fff; padding: 20px 28px; }
.admin-header .header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-header .brand { display: flex; align-items: center; }
.admin-header .brand-logo { height: 42px; display: block; }
.admin-header .brand-text { color: #fff; font-size: 18px; font-weight: 700; margin-left: 14px; letter-spacing: .2px; }
.admin-header .user-bar { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.admin-header .user-info { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.admin-header h1 { font-size: 20px; }
.admin-header .muted { color: rgba(255,255,255,.75); }
.admin-header .back { color: #fff; text-decoration: none; font-size: 14px; margin-right: 12px; }
.admin-main { max-width: 860px; margin: 24px auto; padding: 0 20px 60px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 22px; margin-bottom: 22px; }
.panel h2 { font-size: 17px; margin-bottom: 16px; color: var(--yc-blue); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-head h2 { margin-bottom: 0; }

/* ===== Users table ===== */
.user-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.user-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.user-table td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.user-table tbody tr:hover { background: #fafbff; }
.user-table tbody tr:last-child td { border-bottom: none; }

.num-col { width: 50px; text-align: center; }
.device-tag, .browser-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}
.device-tag { background: #ecfeff; color: #155e75; }
.browser-tag { background: #fef3c7; color: #92400e; }

.you-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; background: #eef1f8; color: var(--yc-blue); border-radius: 10px; font-size: 11px; font-weight: 700; vertical-align: middle; }

.role-tag { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; white-space: nowrap; letter-spacing: .3px; }
.role-tag.role-admin  { background: #ede9fe; color: #5b21b6; }
.role-tag.role-editor { background: #dbeafe; color: #1e40af; }

.log-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.log-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.log-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.log-table tbody tr:hover { background: #fafbff; }
.log-table tbody tr:last-child td { border-bottom: none; }

.action-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; font-family: ui-monospace, "SF Mono", Menlo, monospace; background: #f3f4f6; color: #374151; }
.action-tag.action-create_album, .action-tag.action-create_activity, .action-tag.action-create_user { background: #dcfce7; color: #166534; }
.action-tag.action-update_album, .action-tag.action-update_activity, .action-tag.action-update_user, .action-tag.action-update_caption { background: #dbeafe; color: #1e40af; }
.action-tag.action-delete_album, .action-tag.action-delete_activity, .action-tag.action-delete_photo, .action-tag.action-delete_user { background: #fee2e2; color: #991b1b; }
.action-tag.action-toggle_album, .action-tag.action-toggle_activity, .action-tag.action-move_activity { background: #fef3c7; color: #92400e; }
.action-tag.action-login { background: #ede9fe; color: #5b21b6; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); gap: 5px; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input, .form-grid textarea, .form-grid select {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; font-family: inherit;
}
.form-grid textarea { resize: vertical; }
.form-grid select { background: #fff; cursor: pointer; }
.btn { display: inline-block; padding: 10px 18px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; text-decoration: none; font-family: inherit; }
.btn.primary { background: var(--yc-blue); color: #fff; }
.btn.primary:hover { background: var(--yc-blue-dark); }
.btn.ghost { background: #fff; border: 1px solid var(--border); color: #1a1a1a; }
.btn.danger { background: #fdecea; color: #c62828; border: 1px solid #f5c6c6; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.album-list { list-style: none; }
.album-list li { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.album-list li:last-child { border-bottom: none; }
.album-link { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); flex: 1; }
.album-link strong { font-size: 15px; }
.album-link span { font-size: 13px; color: var(--muted); }
.badge { background: #eef1f8; color: var(--yc-blue); padding: 2px 8px; border-radius: 12px; font-size: 12px; width: fit-content; margin-top: 2px; }
.act-item { border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 14px; }
.act-head { display: flex; align-items: center; gap: 12px; }
.act-order { background: var(--yc-blue); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.act-title { flex: 1; display: flex; flex-direction: column; }
.act-title strong { font-size: 14px; }
.act-title span { font-size: 13px; color: var(--muted); }
.act-actions { display: flex; gap: 6px; }
.inline { display: inline; }
.thumb-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.thumb-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.edit-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.edit-photo { display: flex; flex-direction: column; gap: 6px; }
.edit-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.caption-form { display: flex; flex-direction: column; gap: 4px; }
.caption-form input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 5px; font-size: 12px; font-family: inherit; }
.draft-tag { display: inline-block; background: #fce8e6; color: #c0392b; padding: 1px 8px; border-radius: 10px; font-size: 11px; margin-left: 6px; vertical-align: middle; }
.header-actions { display: flex; gap: 8px; margin-top: 10px; }
.act-draft { opacity: .6; }

/* ===================== 公開展示（雜誌） ===================== */
body.view { background: #fbfbf9; }

/* ===== Catch-all: ALL images in public view respect page width ===== */
body.view .magazine img,
body.view .masthead img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- 主題色（每個活動可揀）---- */
.theme-blue   { --accent: #0032A0; --accent-soft: #eef1f8; }
.theme-gold   { --accent: #a8852f; --accent-soft: #faf5e8; }
.theme-purple { --accent: #7030a0; --accent-soft: #f3ecf9; }
.theme-green  { --accent: #3a7c22; --accent-soft: #eef6e9; }
.theme-orange { --accent: #d96b2b; --accent-soft: #fdf0e8; }
.theme-pink   { --accent: #d6336c; --accent-soft: #fdeef4; }
.theme-teal   { --accent: #00857d; --accent-soft: #e6f5f4; }
.theme-red    { --accent: #c0392b; --accent-soft: #fdeeec; }

/* Masthead 封面 */
.masthead {
  background: linear-gradient(165deg, #00256e 0%, #0032A0 55%, #1a4bbd 100%);
  color: #fff;
  text-align: center;
  padding: 56px 24px 64px;
}
.masthead-inner { max-width: 900px; margin: 0 auto; }
.masthead-top { display: flex; flex-direction: column; gap: 2px; margin-bottom: 34px; }
.masthead-brand { letter-spacing: 5px; font-size: 12px; opacity: .9; }
.masthead-brand-tc { letter-spacing: 6px; font-size: 12px; opacity: .75; }
.masthead-rule { width: 56px; height: 3px; background: var(--yc-gold); margin: 34px auto; }
.masthead-title-en { font-family: var(--serif); font-size: 42px; font-weight: 700; line-height: 1.2; margin-bottom: 10px; }
.masthead-title-tc { font-size: 30px; font-weight: 600; letter-spacing: 2px; margin-bottom: 22px; }
.masthead-sub-en { font-size: 15px; opacity: .88; }
.masthead-sub-tc { font-size: 14px; opacity: .75; margin-top: 5px; }
.masthead-foot { margin-top: 42px; font-size: 12px; opacity: .7; letter-spacing: 1px; }
.masthead-foot .dot { margin: 0 8px; }
.masthead-desc { margin-top: 32px; }
.masthead-desc p { text-align: left; margin-bottom: 12px; line-height: 1.85; }
.masthead-desc .tc { font-size: 14px; opacity: .92; }

/* 雜誌主體 */
.magazine { max-width: 900px; margin: 0 auto; padding: 56px 24px 72px; overflow-x: hidden; }

/* ===== 精選大相（cover story）===== */
.feature-story { margin-bottom: 64px; }
.feature-hero { margin: 0 0 28px; }
.feature-hero img { width: 100%; display: block; border-radius: 4px; }
.feature-hero-cap { display: flex; flex-direction: column; padding: 12px 4px 0; border-bottom: 3px solid var(--accent); }
.feature-hero-cap strong { font-family: var(--serif); font-size: 22px; color: var(--accent); }
.feature-hero-cap span { font-size: 15px; color: var(--muted); }
.feature-body { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 24px; }
.feature-body p { font-size: 15px; line-height: 1.9; }
.feature-body .en { color: var(--ink); }
.feature-body .tc { color: #333; }
.photo-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.photo-strip img { width: 100%; height: 200px; object-fit: cover; border-radius: 4px; }

/* ===== 相片牆（gallery）===== */
.gallery-story { margin-bottom: 64px; }
.section-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.kicker-line { flex: 1; height: 2px; background: var(--accent); }
.kicker-text { font-size: 15px; letter-spacing: 2px; color: var(--accent); white-space: nowrap; }
.gallery-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 22px; }
.gallery-intro p { font-size: 14.5px; }
.photo-wall { column-count: 3; column-gap: 12px; }
.photo-wall img { width: 100%; margin-bottom: 12px; border-radius: 4px; display: block; break-inside: avoid; }
.photo-wall img.port { object-fit: cover; }

/* ===== 卡片式（card）===== */
.card-story { margin-bottom: 60px; }
.card-head { border-left: 4px solid var(--accent); padding-left: 16px; margin-bottom: 18px; }
.card-title-en { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--accent); line-height: 1.25; }
.card-title-tc { font-size: 18px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.card-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 22px; }
.card-intro p { font-size: 14.5px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card-cell {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.card-cell img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.card-cell figcaption { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; border-top: 2px solid var(--accent-soft); }
.card-cell .cap-en { color: var(--ink); }
.card-cell .cap-tc { color: var(--muted); }

/* ===== 引言式（quote）===== */
.quote-story { margin-bottom: 64px; text-align: center; }
.quote-box {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 40px 36px;
  margin: 0 0 16px;
  position: relative;
}
.quote-box::before {
  content: "\201C";
  position: absolute;
  top: -8px;
  left: 24px;
  font-size: 90px;
  color: var(--accent);
  font-family: var(--serif);
  line-height: 1;
  opacity: .3;
}
.quote-en { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--accent); line-height: 1.5; }
.quote-tc { font-size: 18px; color: #333; margin-top: 10px; line-height: 1.7; }
.quote-by { display: block; font-style: normal; font-size: 13px; letter-spacing: 2px; color: var(--accent); margin-bottom: 22px; }
.quote-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; max-width: 720px; margin: 0 auto; }
.quote-photos img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; border: 4px solid var(--accent-soft); }

/* ===== 文章式（default）===== */
.story { margin-bottom: 60px; }
.story-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.story-index { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--accent); }
.story-title-en { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1.25; }
.story-title-tc { font-size: 19px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.story-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 24px; }
.story-cols p { font-size: 14.5px; line-height: 1.9; }
.story-cols .en { color: var(--ink); }
.story-cols .tc { color: #333; }

/* 文章相片排版 */
.story-photos { display: grid; gap: 14px; grid-template-columns: 1fr; max-width: 100%; }
.story-photos.one { grid-template-columns: 1fr; }
.story-photos.two { grid-template-columns: 1fr 1fr; }
.story-photos.grid-land { grid-template-columns: 1fr 1fr; }
.story-photos.grid-mixed { grid-template-columns: 1fr 1fr 1fr; }
.story-photo { margin: 0; max-width: 100%; }
.story-photo img { width: 100%; height: auto; display: block; border-radius: 4px; }
.story-photo.land img { aspect-ratio: 4 / 3; object-fit: cover; }
.story-photo.port img { aspect-ratio: 3 / 4; object-fit: cover; }
.story-photos.one .story-photo { aspect-ratio: 16 / 9; }
.story-photo figcaption { display: flex; flex-direction: column; gap: 2px; padding: 7px 4px 0; font-size: 12.5px; }
.cap-en { color: var(--ink); }
.cap-tc { color: var(--muted); }

/* ===== 書本翻頁（book / flipbook）===== */
.book-story { margin-bottom: 64px; }
.book-head { text-align: center; margin-bottom: 22px; }
.book-title-en { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--accent); }
.book-title-tc { font-size: 18px; color: var(--ink); margin-top: 2px; }
.book-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.book-intro p { font-size: 14.5px; }

.flipbook {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  perspective: 2000px;
  aspect-ratio: 4 / 3;
}
.flip-page {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transform-origin: left center;
  transition: transform 0.8s cubic-bezier(.4,.2,.2,1);
  transform: rotateY(0deg);
  transform-style: preserve-3d;
}
.flip-page.flipped { transform: rotateY(-180deg); }
.flip-face {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.16);
  background: #fff;
}
.flip-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flip-back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #f2f2f2, #ddd);
}
.flip-back::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.06), transparent 30%);
}
.flip-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.68));
  color: #fff;
  display: flex; flex-direction: column;
}
.flip-caption .cap-en { color: #fff; font-size: 13px; }
.flip-caption .cap-tc { color: rgba(255,255,255,.85); font-size: 12px; }
.flip-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.92); color: var(--accent);
  font-size: 26px; line-height: 1; cursor: pointer; z-index: 30;
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.flip-btn:hover { background: #fff; }
.flip-btn.prev { left: -18px; }
.flip-btn.next { right: -18px; }
.flip-btn:disabled { opacity: .3; cursor: not-allowed; }
.flip-indicator {
  position: absolute; bottom: -34px; left: 50%; transform: translateX(-50%);
  font-size: 13px; color: var(--muted); letter-spacing: 1px; white-space: nowrap;
}

/* ===== 馬賽克拼貼（mosaic）===== */
.mosaic-story { margin-bottom: 64px; }
.mosaic-head { border-left: 4px solid var(--accent); padding-left: 16px; margin-bottom: 18px; }
.mosaic-title-en { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--accent); }
.mosaic-title-tc { font-size: 18px; color: var(--ink); }
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 140px;
  gap: 8px;
}
.mosaic-cell { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.mosaic-cell.big { grid-column: span 2; grid-row: span 2; }

/* ===== 時間線（timeline）===== */
.timeline-story { margin-bottom: 64px; }
.timeline-head { border-left: 4px solid var(--accent); padding-left: 16px; margin-bottom: 18px; }
.timeline-title-en { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--accent); }
.timeline-title-tc { font-size: 18px; color: var(--ink); }
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--accent-soft); }
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-dot {
  position: absolute; left: -32px; top: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-item img { width: 100%; max-width: 420px; border-radius: 6px; display: block; }
.timeline-cap { margin-top: 6px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }

/* ===== 幻燈片（slideshow）===== */
.slideshow-story { margin-bottom: 64px; }
.slideshow-head { border-left: 4px solid var(--accent); padding-left: 16px; margin-bottom: 18px; }
.slideshow-title-en { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--accent); }
.slideshow-title-tc { font-size: 18px; color: var(--ink); }
.slideshow { position: relative; max-width: 720px; margin: 0 auto; }
.slide { display: none; position: relative; }
.slide.active { display: block; }
.slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; }
.slide-cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.68));
  color: #fff; border-radius: 0 0 6px 6px;
  display: flex; flex-direction: column;
}
.slide-cap .cap-en { color: #fff; }
.slide-cap .cap-tc { color: rgba(255,255,255,.85); }
.slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.9); color: var(--accent);
  font-size: 22px; cursor: pointer; z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.slide-btn.prev { left: 12px; }
.slide-btn.next { right: 12px; }
.slide-dots { text-align: center; margin-top: 12px; }
.slide-dots .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ccc; margin: 0 4px; cursor: pointer; }
.slide-dots .dot.on { background: var(--accent); }

/* ===== 拍立得（polaroid）===== */
.polaroid-story { margin-bottom: 64px; }
.polaroid-head { border-left: 4px solid var(--accent); padding-left: 16px; margin-bottom: 18px; }
.polaroid-title-en { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--accent); }
.polaroid-title-tc { font-size: 18px; color: var(--ink); }
.polaroid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.polaroid-cell {
  background: #fff;
  padding: 10px 10px 16px;
  box-shadow: 0 3px 12px rgba(0,0,0,.12);
  border-radius: 2px;
  transform: rotate(var(--rot, 0deg));
  transition: transform .3s;
}
.polaroid-cell:hover { transform: rotate(0deg) scale(1.03); }
.polaroid-cell img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.polaroid-cell figcaption { padding: 8px 4px 0; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; }

/* 頁尾 */
.magazine-footer { background: var(--yc-blue); color: #fff; text-align: center; padding: 40px 20px 44px; }
.footer-rule { width: 46px; height: 2px; background: var(--yc-gold); margin: 0 auto 18px; }
.footer-brand { font-size: 13px; letter-spacing: 1px; }
.footer-sub { font-size: 12px; opacity: .7; margin-top: 6px; }

/* ===== 響應式：平板 ===== */
@media (max-width: 820px) {
  .admin-main { padding: 0 14px 60px; }
  .magazine { padding: 40px 16px 60px; }
  .masthead { padding: 40px 20px 48px; }
}

/* ===== 響應式：手機 ===== */
@media (max-width: 700px) {
  .masthead-title-en { font-size: 28px; }
  .masthead-title-tc { font-size: 22px; }
  .masthead-brand, .masthead-brand-tc { letter-spacing: 3px; }

  /* 雙語欄 → 單欄 (all description intro layouts) */
  .feature-body, .story-cols, .gallery-intro, .card-intro, .book-intro, .mosaic-intro, .timeline-intro, .slideshow-intro, .polaroid-intro, .quote-intro { grid-template-columns: 1fr; gap: 16px; }
  /* Scoped visual separator between .en and .tc (only inside description containers, NOT masthead) */
  .gallery-intro .tc, .card-intro .tc, .book-intro .tc, .mosaic-intro .tc, .timeline-intro .tc, .slideshow-intro .tc, .polaroid-intro .tc, .quote-intro .tc, .story-cols .tc, .feature-body .tc { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--accent-soft); }

  /* 相片牆 → 單欄 (mobile) */
  .photo-wall { column-count: 1; }

  /* 文章相片 grid → 單欄 (mobile) */
  .story-photos.two, .story-photos.grid-land, .story-photos.grid-mixed { grid-template-columns: 1fr; }
  .story-photos.one .story-photo { aspect-ratio: 4 / 3; }

  /* 卡片 grid → 單欄 */
  .card-grid { grid-template-columns: 1fr; }

  /* 引言式 */
  .quote-box { padding: 28px 22px; }
  .quote-en { font-size: 18px; }
  .quote-tc { font-size: 16px; }
  .quote-box::before { font-size: 60px; top: -4px; left: 16px; }
  /* Quote photos → 單欄 (mobile) */
  .quote-photos { grid-template-columns: 1fr; }

  /* 精選大相 strip */
  .photo-strip { grid-auto-columns: 80%; }

  /* admin 觸控優化 */
  .admin-header { padding: 16px 18px; }
  .admin-header h1 { font-size: 18px; }
  .panel { padding: 16px; border-radius: 8px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-grid input, .form-grid textarea, .form-grid select { padding: 12px; font-size: 16px; }
  .btn { padding: 12px 18px; font-size: 15px; min-height: 44px; }
  .btn.small { padding: 8px 12px; font-size: 13px; min-height: 36px; }
  .act-head { flex-wrap: wrap; }
  .act-actions { flex-wrap: wrap; }
}

/* ===== 響應式：細手機 ===== */
@media (max-width: 400px) {
  .photo-wall { column-count: 1; }
  .story-photos.two, .story-photos.grid-land, .story-photos.grid-mixed { grid-template-columns: 1fr; }
  .quote-photos { grid-template-columns: 1fr; }
  .edit-photos { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
