:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-light: #2997ff;
  --line: rgba(0, 0, 0, 0.08);
  --line-soft: rgba(0, 0, 0, 0.05);
  --radius: 20px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 17px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Noto Sans TC", "Noto Sans JP",
    "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 {
  font-weight: 600; line-height: 1.1; margin: 0 0 .5em; color: var(--ink); letter-spacing: -0.015em;
}
p { margin: 0 0 1em; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 28px; } }
.muted { color: var(--ink-2); }

/* ---------- Header (frosted glass, Apple-style) ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 52px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 52px; }
.brand { display: flex; align-items: center; margin-right: auto; }
.brand-logo { height: 30px; width: auto; display: block; }
.main-nav { display: flex; gap: 28px; }
.main-nav a {
  font-size: .82rem; font-weight: 400; color: var(--ink); opacity: .8;
  transition: opacity .25s ease, color .4s var(--ease); white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { opacity: 1; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; gap: 2px; font-size: .74rem; }
.lang-switch a { padding: 4px 8px; border-radius: 999px; color: var(--ink-2); transition: color .4s var(--ease), background .25s; }
.lang-switch a.active { background: var(--bg-alt); color: var(--ink); font-weight: 600; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--ink); }

/* Home page: nav starts transparent over the dark hero, then frosts on scroll */
body.has-dark-hero .site-header { background: transparent; border-bottom-color: transparent; }
body.has-dark-hero .site-header .brand,
body.has-dark-hero .site-header .main-nav a,
body.has-dark-hero .site-header .lang-switch a,
body.has-dark-hero .site-header .nav-toggle { color: #fff; }
body.has-dark-hero .site-header .lang-switch a.active { background: rgba(255,255,255,.18); color: #fff; }
body.has-dark-hero .site-header.scrolled { background: rgba(255,255,255,.72); border-bottom-color: var(--line-soft); }
body.has-dark-hero .site-header.scrolled .brand,
body.has-dark-hero .site-header.scrolled .main-nav a,
body.has-dark-hero .site-header.scrolled .lang-switch a,
body.has-dark-hero .site-header.scrolled .nav-toggle { color: var(--ink); }
body.has-dark-hero .site-header.scrolled .lang-switch a.active { background: var(--bg-alt); color: var(--ink); }

@media (max-width: 900px) {
  .main-nav {
    position: absolute; top: 52px; left: 0; right: 0; background: rgba(255,255,255,.96);
    backdrop-filter: blur(20px);
    flex-direction: column; gap: 4px; padding: 10px 28px 20px; border-bottom: 1px solid var(--line);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { color: var(--ink) !important; opacity: 1; padding: 10px 0; }
  .nav-toggle { display: block; }
}

/* ---------- Buttons & links ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 980px; font-weight: 500; border: none; cursor: pointer; font-size: .95rem; transition: background .25s ease, transform .15s ease; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-outline { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--bg-alt); }
.btn-gold { background: var(--ink); color: #fff; }

.btn-link { color: var(--blue); font-weight: 400; font-size: 1.02rem; display: inline-flex; align-items: center; gap: 3px; transition: color .2s; }
.btn-link:hover { color: var(--blue-hover); }
.chev { display: inline-block; transition: transform .25s var(--ease); }
.btn-link:hover .chev { transform: translateX(3px); }
.hero .btn-link, .hero-inner .btn-link { color: var(--blue-light); }
.hero .btn-link:hover, .hero-inner .btn-link:hover { color: #fff; }

/* ---------- Hero (fluid gradient glow) ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 86vh; display: flex; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(185deg, #030f18 0%, #06283f 45%, #0b4a68 78%, #0f6a8c 100%);
  color: #fff;
}
.hero-glow {
  position: absolute; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 42% at 22% 26%, rgba(0, 180, 216, 0.5), transparent 70%),
    radial-gradient(34% 38% at 78% 20%, rgba(72, 202, 228, 0.32), transparent 70%),
    radial-gradient(45% 50% at 50% 90%, rgba(2, 62, 91, 0.55), transparent 70%);
  filter: blur(90px) saturate(140%);
  animation: driftGlow 22s ease-in-out infinite alternate;
}
@keyframes driftGlow {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -3%, 0) scale(1.08); }
  100% { transform: translate3d(-3%, 2%, 0) scale(1); }
}
.hero-inner { position: relative; z-index: 2; padding: 40px 0; }
.hero .eyebrow-light { color: rgba(255,255,255,.62); margin-bottom: 18px; }
.hero h1 {
  color: #fff; font-size: clamp(2.4rem, 5.4vw, 4.4rem); font-weight: 600; letter-spacing: -0.03em;
  max-width: 880px; margin: 0 auto .4em; line-height: 1.08;
}
.hero p { color: rgba(255,255,255,.72); font-size: clamp(1.05rem, 1.8vw, 1.3rem); max-width: 620px; margin: 0 auto 2.2rem; font-weight: 400; }
.hero .btn-row { display: flex; gap: 32px; justify-content: center; margin-top: 4px; flex-wrap: wrap; }

/* Rising bubbles */
.ocean-bubbles { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.bubble {
  position: absolute; bottom: -40px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.85), rgba(255,255,255,.08) 60%, transparent 72%);
  opacity: 0; animation: bubbleRise linear infinite;
}
@keyframes bubbleRise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: .55; }
  90% { opacity: .35; }
  100% { transform: translateY(-100vh) translateX(var(--drift, 20px)); opacity: 0; }
}
.bubble.b1 { left: 6%; width: 18px; height: 18px; animation-duration: 14s; animation-delay: 0s; --drift: 34px; }
.bubble.b2 { left: 16%; width: 11px; height: 11px; animation-duration: 10s; animation-delay: 2s; --drift: -24px; }
.bubble.b3 { left: 28%; width: 25px; height: 25px; animation-duration: 18s; animation-delay: 1s; --drift: 42px; }
.bubble.b4 { left: 40%; width: 14px; height: 14px; animation-duration: 12s; animation-delay: 5s; --drift: -30px; }
.bubble.b5 { left: 52%; width: 9px; height: 9px; animation-duration: 9s; animation-delay: 3s; --drift: 20px; }
.bubble.b6 { left: 63%; width: 21px; height: 21px; animation-duration: 16s; animation-delay: 6s; --drift: -36px; }
.bubble.b7 { left: 74%; width: 12px; height: 12px; animation-duration: 11s; animation-delay: 0.5s; --drift: 26px; }
.bubble.b8 { left: 83%; width: 27px; height: 27px; animation-duration: 20s; animation-delay: 4s; --drift: -44px; }
.bubble.b9 { left: 91%; width: 10px; height: 10px; animation-duration: 13s; animation-delay: 7s; --drift: 18px; }
.bubble.b10 { left: 48%; width: 16px; height: 16px; animation-duration: 15s; animation-delay: 8.5s; --drift: -20px; }

/* Flowing ocean waves along the bottom edge of the hero */
.ocean-waves {
  position: absolute; left: 0; right: 0; bottom: -2px; height: 34vh; min-height: 260px; max-height: 420px; z-index: 1;
  overflow: hidden; pointer-events: none;
}
.wave { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; }
.wave path { fill: currentColor; }
.wave-back { color: rgba(15, 106, 140, 0.65); animation: waveScroll 16s linear infinite; }
.wave-front { color: rgba(6, 40, 63, 0.92); bottom: -10px; animation: waveScroll 10s linear infinite reverse; }
@keyframes waveScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-glow, .wave, .bubble { animation: none; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.eyebrow { color: var(--ink-2); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .72rem; margin-bottom: 8px; }

/* ---------- Grids & Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  border: 1px solid var(--line-soft); display: flex; flex-direction: column;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -20px rgba(0,0,0,.18); }
.card-media { aspect-ratio: 4/3; background: var(--bg-alt) url('/img/placeholder.svg') center/34% no-repeat; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.045); }
.card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; }
.card-tag { display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-2); background: var(--bg-alt); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; width: fit-content; }
.card-body .spacer { flex: 1; }
.card-link { margin-top: 12px; font-weight: 500; color: var(--blue); }

/* Category chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chip { padding: 9px 18px; border-radius: 999px; border: none; background: var(--bg-alt); font-weight: 500; font-size: .88rem; color: var(--ink); transition: background .2s, color .2s; }
.chip:hover { background: #e8e8ed; }
.chip.active { background: var(--ink); color: #fff; }

/* Product detail */
.product-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 130px 0 56px; }
@media (max-width: 860px) { .product-hero { grid-template-columns: 1fr; padding-top: 90px; } }
.product-gallery-main { border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-alt); aspect-ratio: 1/1; }
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumb-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.thumb-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; opacity: .7; transition: opacity .2s, border-color .2s; }
.thumb-row img:hover { opacity: 1; }
.thumb-row img.active { border-color: var(--blue); opacity: 1; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tag { background: var(--bg-alt); color: var(--ink-2); font-size: .8rem; padding: 5px 12px; border-radius: 999px; font-weight: 500; }
.spec-box { background: var(--bg-alt); border-radius: var(--radius); padding: 22px 26px; white-space: pre-wrap; font-size: .95rem; margin: 18px 0; color: var(--ink-2); }
.dish-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
@media (max-width: 700px) { .dish-grid { grid-template-columns: repeat(2, 1fr); } }
.dish-grid figure { margin: 0; }
.dish-grid img { border-radius: 14px; aspect-ratio: 1/1; object-fit: cover; }
.dish-grid figcaption { text-align: center; font-size: .8rem; margin-top: 6px; color: var(--ink-2); }

/* Article / recipe */
.article-body { max-width: 760px; margin: 0 auto; }
.article-body img { border-radius: var(--radius); margin: 20px 0; }
.article-meta { color: var(--ink-2); font-size: .9rem; margin-bottom: 24px; }
.ingredient-list, .steps-list { padding-left: 1.2em; }
.steps-list li { margin-bottom: 10px; }

/* Non-article top padding for pages that open straight into .section */
.section:first-of-type { padding-top: 130px; }

/* ---------- Company history timeline ---------- */
.timeline { position: relative; max-width: 900px; margin: 64px auto 0; }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 6px; bottom: 6px; width: 2px;
  background: var(--line); transform: translateX(-50%);
}
.timeline-item { position: relative; width: 50%; padding: 0 48px 52px; left: 0; text-align: right; }
.timeline-item.alt { left: 50%; text-align: left; }
.timeline-dot {
  position: absolute; top: 4px; right: -7px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line);
}
.timeline-item.alt .timeline-dot { right: auto; left: -7px; }
.timeline-card {
  display: inline-block; text-align: left; max-width: 380px; background: #fff;
  border-radius: var(--radius); padding: 22px 26px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
  border: 1px solid var(--line-soft);
}
.timeline-date { font-size: .76rem; font-weight: 700; color: var(--blue); letter-spacing: .04em; margin-bottom: 6px; }
.timeline-card h3 { font-size: 1.04rem; margin-bottom: 6px; }
.timeline-card p { color: var(--ink-2); font-size: .92rem; margin: 0; }

@media (max-width: 780px) {
  .timeline::before { left: 18px; }
  .timeline-item, .timeline-item.alt { width: 100%; left: 0; text-align: left; padding: 0 0 40px 46px; }
  .timeline-dot, .timeline-item.alt .timeline-dot { left: 12px; right: auto; }
  .timeline-card { max-width: none; display: block; }
}

.exhibit-years { display: flex; flex-direction: column; gap: 0; }
.exhibit-year-row { display: flex; gap: 24px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.exhibit-year { flex: 0 0 72px; font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.exhibit-tags { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-q { font-weight: 500; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--ink); font-size: 1.05rem; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); color: var(--ink-2); }
.faq-item.open .faq-a { max-height: 600px; padding-top: 12px; }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.plus { transition: transform .3s var(--ease); font-size: 1.3rem; color: var(--blue); font-weight: 300; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: .88rem; color: var(--ink-2); }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); font: inherit; background: var(--bg-alt);
  transition: border-color .2s, background .2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.form-group textarea { min-height: 130px; resize: vertical; }
.info-card { background: #1d1d1f; color: #fff; border-radius: var(--radius-lg); padding: 34px; }
.info-card h4 { color: var(--blue-light); margin-bottom: 4px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.info-card .row { margin-bottom: 18px; color: rgba(255,255,255,.85); }
.info-card iframe { width: 100%; border: 0; border-radius: 14px; margin-top: 16px; filter: grayscale(.2); }
.form-success { background: #e8f5ea; color: #1d6b34; padding: 16px 20px; border-radius: 12px; font-weight: 500; }
.form-error { background: #fdeaea; color: #a4302f; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; }

/* ---------- Footer (light, Apple-style) ---------- */
.site-footer { background: var(--bg-alt); color: var(--ink-2); margin-top: 40px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 56px 0 30px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { color: var(--ink); margin-bottom: 12px; }
.footer-brand .brand-logo { height: 34px; }
.site-footer h4 { color: var(--ink); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; color: var(--ink-2); }
.footer-list a:hover { color: var(--ink); }
.footer-bottom { border-top: 1px solid var(--line); padding: 16px 0; font-size: .76rem; color: var(--ink-2); }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 36px; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 10px; color: var(--ink-2); }
.pagination a:hover { background: var(--bg-alt); color: var(--ink); }
.pagination a.active { background: var(--ink); color: #fff; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-2); }

/* ---------- Fluid scroll-reveal ---------- */
.reveal-init { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal-init.is-visible { opacity: 1; transform: none; }

/* --------- Admin --------- */
body.admin { background: #f4f6f5; font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", sans-serif; padding-top: 0; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 230px; background: #1d1d1f; color: #d1d1d6; padding: 24px 16px; flex-shrink: 0; }
.admin-sidebar h1 { color: #fff; font-size: 1.05rem; margin-bottom: 24px; font-weight: 600; }
.admin-sidebar a { display: block; padding: 10px 14px; border-radius: 8px; margin-bottom: 4px; color: #c7c7cc; font-weight: 400; font-size: .92rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-main { flex: 1; padding: 32px 40px; max-width: 1100px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-card { background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 24px; }
table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee; font-size: .92rem; vertical-align: top; }
table.admin-table th { color: #667; font-weight: 600; font-size: .78rem; text-transform: uppercase; }
.badge { padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: #e6f4ea; color: #1d6b34; }
.badge.draft { background: #fdf3e3; color: #96690a; }
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #1d1d1f; }
.login-box { background: #fff; padding: 40px; border-radius: 18px; width: 340px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); }
.admin-nav-link-group { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.btn-sm { padding: 6px 14px; font-size: .8rem; border-radius: 8px; }
.btn-danger { background: #d9534f; color: #fff; border: none; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.field-hint { font-size: .78rem; color: #888; margin-top: 4px; }
.upload-row { display: flex; gap: 8px; align-items: flex-start; }
.upload-row [data-upload-target] { flex: 1; }
.upload-btn { display: inline-flex; align-items: center; white-space: nowrap; cursor: pointer; }
.upload-preview { display: none; margin-top: 10px; max-width: 160px; border-radius: 8px; border: 1px solid #eee; }
.rich-editor-wrap .rich-editor { background: #fff; min-height: 220px; }
.rich-editor-wrap .ql-toolbar { border-radius: 8px 8px 0 0; }
.rich-editor-wrap .ql-container { border-radius: 0 0 8px 8px; font-size: 15px; }
.ql-media-library-btn {
  border: 1px solid #ccc; border-radius: 6px; background: #fff; font-size: .78rem;
  padding: 2px 10px; margin-left: 8px; cursor: pointer; vertical-align: middle;
}
.ql-media-library-btn:hover { background: #f0f0f0; }

/* Admin list toolbar: search box + bulk-action bar */
.list-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.list-toolbar input[type="search"] { flex: 1; min-width: 200px; padding: 10px 14px; border-radius: 10px; border: 1px solid #ddd; font: inherit; }
.bulk-bar { display: none; align-items: center; gap: 10px; background: #fff3f0; border: 1px solid #f3c4b8; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.bulk-bar.active { display: flex; }
.row-check { width: 34px; }

/* Media library */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin-top: 16px; }
.media-item { border: 1px solid #eee; border-radius: 10px; overflow: hidden; background: #fafafa; position: relative; }
.media-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; cursor: pointer; }
.media-copied {
  position: absolute; top: 8px; left: 8px; right: 8px; text-align: center; background: rgba(29,29,31,.85); color: #fff;
  font-size: .72rem; padding: 4px 0; border-radius: 999px; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.media-meta { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 4px; font-size: .76rem; gap: 6px; }
.media-item form { padding: 0 10px 10px; }

/* Media picker modal (used from content-editing upload widgets) */
.media-picker-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000;
  align-items: center; justify-content: center; padding: 24px;
}
.media-picker-overlay.open { display: flex; }
.media-picker-box { background: #fff; border-radius: 14px; width: min(760px, 100%); max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; }
.media-picker-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #eee; }
.media-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; padding: 16px 20px; overflow-y: auto; }
.media-picker-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.media-picker-grid img:hover { border-color: var(--blue, #0071e3); }

/* Sort arrows */
.sort-arrows { display: inline-flex; flex-direction: column; gap: 2px; }
.sort-arrows button { border: none; background: #f0f0f0; border-radius: 4px; width: 22px; height: 18px; cursor: pointer; font-size: .7rem; line-height: 1; }
.sort-arrows button:hover { background: #e2e2e2; }
