/* ================================================================
   BattingCageLand — "ballpark signage" design system
   Palette:
     --dugout  #16261C  deep green-black (header/footer)
     --turf    #3F8552  field green (primary action)
     --turf-hi #5FB374  bright turf (hover/accents on dark)
     --chalk   #F7F5EE  warm off-white background
     --clay    #C0662E  infield clay (pinned / warnings, used sparingly)
     --ink     #212A24  text
     --line    #DFD9CB  hairlines
   Type: Barlow Condensed (display, uppercase signage) + Barlow (body)
   Signature: diamond netting-mesh overlay on dark bands, oversized
   project-photo thumbnails and galleries.
   ================================================================ */

:root {
  --dugout: #16261c;
  --turf: #3f8552;
  --turf-hi: #5fb374;
  --chalk: #f7f5ee;
  --clay: #c0662e;
  --ink: #212a24;
  --line: #dfd9cb;
  --card: #fffdf8;
  --danger: #b23a2f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:target { scroll-margin-top: 88px; }
[id] { scroll-margin-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

html { overflow-x: hidden; }
body {
  overflow-x: hidden;
  margin: 0;
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--chalk);
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: var(--turf); }
a:hover { color: var(--turf-hi); }
:focus-visible { outline: 3px solid var(--turf-hi); outline-offset: 2px; }

h1, h2, h3 {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0 0 0.4em;
}
.brand-text {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

.eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--turf);
  margin: 0 0 6px;
}
.muted { color: #6f7a70; font-size: 0.92em; }
.lede { font-size: 1.08rem; color: #46524a; max-width: 60ch; margin-top: 0; }
.inline { display: inline; }

/* ---------------- header / footer with netting-mesh signature -------- */
.site-header, .site-footer { position: relative; background: var(--dugout); color: #eef3ee; overflow: hidden; }
.site-header { position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(18, 32, 23, 0.18); }
.mesh {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cpath d='M18 0 36 18 18 36 0 18Z' fill='none' stroke='%235fb374' stroke-opacity='0.22' stroke-width='1'/%3E%3C/svg%3E");
}
.header-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-lockup { display: flex; flex-direction: column; line-height: 1.1; }
.brand-mark { color: var(--turf-hi); display: flex; }
.brand-text { font-size: 1.55rem; font-weight: 700; margin: 0; }
.brand-text em { font-style: normal; color: var(--turf-hi); }
.brand-tagline { font-size: 0.72rem; font-weight: 400; color: #9fb6a3; letter-spacing: 0.01em; margin-top: 1px; }
.site-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: #d8e4d8; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { color: #fff; }
.nav-admin { color: var(--turf-hi) !important; }
.nav-user { color: #9fb5a0; font-size: 0.9rem; }

/* header search */
.nav-search input {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 99px; color: #fff; font: inherit; font-size: 0.88rem;
  padding: 6px 14px; width: 170px; transition: width 0.2s, background 0.2s;
}
.nav-search input::placeholder { color: #9fb5a0; }
.nav-search input:focus { outline: none; background: rgba(255,255,255,0.16); width: 220px; border-color: var(--turf-hi); }

/* search results page */
.search-form { display: flex; gap: 10px; margin-top: 6px; }
.search-form input { flex: 1; max-width: 460px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 6px; font: inherit; }
.search-form input:focus { border-color: var(--turf); outline: none; }
.search-snippet { margin: 4px 0 0; font-size: 0.9rem; color: #4c574e; }
.search-snippet mark { background: #dff0e2; color: #1f5233; border-radius: 3px; padding: 0 2px; }

/* hamburger — hidden on desktop, takes over below 760px */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px 4px; margin-left: auto; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: #eef3ee; margin: 5px 0; border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 12px; border-top: 1px solid rgba(255,255,255,0.12); margin-top: 8px; }
  .site-nav.open { display: flex; }
  .site-nav a, .site-nav .nav-user { padding: 12px 4px; font-size: 1.05rem; }
  .site-nav form { padding: 8px 4px 0; }
  .nav-search { order: -1; width: 100%; }
  .nav-search input { width: 100%; }
  .nav-search input:focus { width: 100%; }
  .site-nav .btn-solid { text-align: center; margin-top: 4px; }
}

.site-footer { margin-top: 64px; }

/* sign-in announcement strip (logged-out visitors only) */
.announce { background: var(--turf); }
.announce a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #fff; text-decoration: none; font-weight: 600; font-size: 0.88rem;
  padding: 7px 0; text-align: center;
}
.announce a:hover { color: #eafbee; text-decoration: underline; }
.announce svg { flex: none; }
@media (max-width: 680px) {
  .announce a { font-size: 0.8rem; padding: 7px 4px; }
}
.footer-inner { position: relative; padding: 34px 20px 22px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 26px; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand .brand-mark { color: var(--turf-hi); flex: none; margin-top: 2px; }
.footer-name { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.25rem; margin: 0 0 4px; color: #fff; }
.footer-name em { font-style: normal; color: var(--turf-hi); }
.footer-brand .muted, .footer-copy { color: #93a795; font-size: 0.88rem; }
.footer-brand p { margin: 0 0 6px; }
.footer-brand a { color: var(--turf-hi); }
.footer-head { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; font-size: 0.85rem; color: #fff; margin: 0 0 8px; }
.footer-links { display: flex; flex-direction: column; gap: 7px; }
.footer-links a { color: #c9d8c9; text-decoration: none; font-size: 0.93rem; }
.footer-links a:hover { color: var(--turf-hi); }
.footer-copy { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.12); }

/* legal pages */
.legal { max-width: 760px; margin: 30px auto 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 34px 38px; }
.legal h2 { margin-top: 28px; font-size: 1.25rem; }
.legal h3 { margin-top: 14px; font-size: 1.02rem; }
.legal p { margin: 8px 0; }

/* social sign-in buttons */
.oauth-row { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 4px; }
.btn-oauth {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--line); color: var(--ink);
  text-transform: none; letter-spacing: 0; font-family: 'Barlow', sans-serif;
  font-weight: 600; font-size: 0.98rem; padding: 10px 16px;
}
.btn-oauth:hover { border-color: var(--turf); color: var(--ink); }
.or-divider { display: flex; align-items: center; gap: 12px; color: #6f7a70; font-size: 0.85rem; margin: 14px 0 0; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------------- buttons ------------------------------------------- */
.btn {
  display: inline-block; border: 2px solid transparent; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 700; font-size: 0.95rem;
  padding: 8px 18px; border-radius: 6px; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn-lg { font-size: 1.1rem; padding: 11px 26px; }
.btn-solid { background: var(--turf); color: #fff; }
.btn-solid:hover { background: var(--turf-hi); color: #fff; }
.btn-outline { border-color: var(--turf); color: var(--turf); background: transparent; }
.site-header .btn-outline, .site-header .btn-ghost { color: #d8e4d8; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--turf); color: var(--turf); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f2d24; color: #fff; }
.btn-link { background: none; border: none; padding: 0; color: var(--turf); cursor: pointer; font: inherit; font-size: 0.9rem; text-decoration: underline; }
.btn-link.danger { color: var(--danger); }

/* ---------------- flash --------------------------------------------- */
.flash { margin: 14px 0 0; padding: 10px 16px; border-radius: 6px; font-weight: 600; border-left: 4px solid; }
.flash-ok { background: #e7f2e8; border-color: var(--turf); color: #29563a; }
.flash-warn { background: #f8ecdd; border-color: var(--clay); color: #7c431e; }
.flash-error { background: #f7e4e2; border-color: var(--danger); color: #7c241d; }

/* ---------------- hero (photo, kept short so boards sit above the fold) */
.hero {
  position: relative;
  /* full-bleed: break out of the content column */
  margin: 0 calc(50% - 50vw) 4px;
  padding: 42px max(20px, calc(50vw - 550px)) 34px;
  background:
    linear-gradient(100deg, rgba(18, 32, 23, 0.93) 0%, rgba(18, 32, 23, 0.72) 55%, rgba(18, 32, 23, 0.45) 100%),
    url('/img/hero.jpg') center 58% / cover no-repeat;
  color: #eef3ee;
}
.hero .eyebrow { color: var(--turf-hi); }
.hero-title {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  color: var(--turf-hi);
  margin-bottom: 2px;
}
.hero-tagline {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: #fff;
  margin: 0 0 6px;
}
.hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); color: #fff; }
.hero-title { font-size: clamp(2rem, 4.6vw, 3.2rem); color: var(--turf-hi); }
.hero .lede { font-size: 1rem; margin: 2px 0 0; color: #dbe6db; max-width: 62ch; }
.hero .btn-outline { border-color: #eef3ee; color: #eef3ee; }
.hero .btn-outline:hover { border-color: var(--turf-hi); color: var(--turf-hi); }
.hero-actions { display: flex; gap: 12px; margin: 16px 0 2px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 26px; margin-top: 14px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: 'Barlow Condensed', sans-serif; font-size: 1.35rem; color: var(--turf); }
.hero-stats span { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.68rem; color: #6f7a70; }

.section-title { border-bottom: 3px solid var(--dugout); padding-bottom: 6px; margin: 26px 0 14px; }
.section-title .muted { text-transform: none; letter-spacing: 0; font-family: 'Barlow', sans-serif; font-weight: 400; }

/* slim hero variant: the feed is the star now */
.hero-slim { padding-top: 30px; padding-bottom: 26px; margin-bottom: 18px; }
.hero-slim .hero-actions { margin-top: 12px; }

/* ---------------- home layout: feed + sidebar ------------------------ */
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
  margin-top: 18px;
}
.feed { max-width: 720px; margin: 0 auto; width: 100%; }
.feed-narrow { max-width: 720px; margin: 18px auto 0; }

/* feed card */
.feed-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px 12px;
  margin-bottom: 16px;
}
.feed-card.is-pinned { border-left: 4px solid var(--clay); }
.feed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.feed-head .avatar {
  width: 38px; height: 38px; margin: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--dugout); color: var(--turf-hi);
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.05rem;
}
.feed-who { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.feed-user { font-weight: 600; color: var(--dugout); }
.feed-user a { color: inherit; text-decoration: none; }
.feed-user a:hover { text-decoration: underline; }
.feed-when { font-size: 0.8rem; color: #6f7a70; }
.cat-chip {
  display: inline; font-weight: 600; text-decoration: none;
}
.feed-body-link { display: block; text-decoration: none; color: var(--ink); }
.feed-title { font-size: 1.35rem; color: var(--dugout); margin: 0 0 6px; }
.feed-body-link:hover .feed-title { color: var(--turf); }
.feed-snippet { margin: 0 0 4px; color: #3d463f; }

/* feed photo gallery */
.feed-gallery { display: grid; gap: 6px; margin-top: 10px; border-radius: 8px; overflow: hidden; }
.fg-1 { grid-template-columns: 1fr; }
.fg-2 { grid-template-columns: repeat(2, 1fr); }
.fg-3 { grid-template-columns: repeat(2, 1fr); }
.fg-3 .feed-photo:first-child { grid-column: 1 / -1; }
.fg-4 { grid-template-columns: repeat(2, 1fr); }
.feed-photo { position: relative; display: block; }
.fg-1 .feed-photo img { max-height: 460px; }
.feed-photo img {
  width: 100%; height: 100%; max-height: 260px; object-fit: cover; display: block;
  transition: transform 0.2s;
}
.feed-gallery:hover img { transform: scale(1.01); }
.more-photos {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(18, 32, 23, 0.55); color: #fff;
  font-family: 'Barlow Condensed', sans-serif; font-size: 1.6rem; font-weight: 700;
}
.feed-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.feed-replies { text-decoration: none; color: #4c574e; font-weight: 600; }
.feed-join { text-decoration: none; font-weight: 600; }

/* infinite scroll */
.feed-sentinel { height: 1px; }
.feed-sentinel.is-loading { height: 44px; background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><circle cx="18" cy="18" r="14" fill="none" stroke="%233f8552" stroke-width="4" stroke-dasharray="66" stroke-dashoffset="30" stroke-linecap="round"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="0.8s" repeatCount="indefinite"/></circle></svg>') center / 36px no-repeat; }
.feed-more { display: block; width: max-content; margin: 6px auto 20px; }

/* ---------------- sidebar -------------------------------------------- */
.sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.btn-block { display: block; text-align: center; }
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.side-title { font-size: 1rem; color: var(--dugout); margin-bottom: 8px; }
.side-cats { list-style: none; margin: 0; padding: 0; }
.side-cats li + li { border-top: 1px solid var(--line); }
.side-cats a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 7px 2px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.92rem;
}
.side-cats a:hover span { color: var(--turf); }
.side-cats em {
  font-style: normal; font-size: 0.72rem; color: var(--turf); font-weight: 700;
  background: #e7f2e8; border-radius: 10px; padding: 1px 8px;
}
.side-stats { display: flex; justify-content: space-between; text-align: center; }
.side-stats div { display: flex; flex-direction: column; }
.side-stats strong { font-family: 'Barlow Condensed', sans-serif; font-size: 1.3rem; color: var(--turf); }
.side-stats span { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.64rem; color: #6f7a70; }

@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; order: 2; }
  .feed { order: 1; }
}

/* ---------------- thread list --------------------------------------- */
.thread-list { list-style: none; margin: 0; padding: 0; }
.thread-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 16px; margin-bottom: 10px;
}
.thread-row.is-pinned { border-left: 5px solid var(--clay); }
.thumb {
  width: 96px; height: 72px; flex: none; border-radius: 6px; overflow: hidden;
  background: #e6e2d5; display: flex; align-items: center; justify-content: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-empty span { font-size: 1.6rem; opacity: 0.45; }
.thread-main { flex: 1; min-width: 0; }
.thread-title { font-weight: 600; font-size: 1.07rem; text-decoration: none; color: var(--ink); display: block; }
.thread-title:hover { color: var(--turf); }
.thread-meta { margin: 3px 0 0; font-size: 0.85rem; color: #6f7a70; }
.thread-meta a { color: var(--turf); }
.thread-count { text-align: center; flex: none; min-width: 60px; }
.thread-count strong { font-family: 'Barlow Condensed', sans-serif; font-size: 1.4rem; color: var(--dugout); display: block; }
.thread-count span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: #6f7a70; }

.tag {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 2px 8px; border-radius: 99px; vertical-align: middle; margin-right: 6px;
}
.tag-pin { background: #f4e3d3; color: var(--clay); }
.tag-lock { background: #e6e2d5; color: #6f7a70; }
.tag-admin { background: var(--dugout); color: var(--turf-hi); }
.tag-flag { background: #f7e4e2; color: var(--danger); }

/* ---------------- crumbs / page head / pager ------------------------- */
.crumbs { margin: 20px 0 6px; font-size: 0.88rem; color: #6f7a70; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin: 8px 0 22px; flex-wrap: wrap; }
.thread-h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.move-category-form select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 0.85rem; background: var(--card); color: var(--ink); cursor: pointer;
}
.pager { display: flex; gap: 6px; margin: 20px 0; flex-wrap: wrap; }
.pager a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font-weight: 600; background: var(--card); }
.pager a.current { background: var(--dugout); color: #fff; border-color: var(--dugout); }

/* ---------------- posts ---------------------------------------------- */
.post-list { display: flex; flex-direction: column; gap: 14px; }
.post {
  display: flex; gap: 0; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.post.is-flagged { border-color: var(--danger); }
.post-author {
  flex: none; width: 150px; padding: 18px 14px; text-align: center;
  background: #efece1; border-right: 1px solid var(--line);
}
.avatar {
  width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%;
  background: var(--dugout); color: var(--turf-hi);
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
}
.author-name { font-weight: 700; margin: 0 0 4px; word-break: break-word; }
.author-name a { color: inherit; text-decoration: none; }
.author-name a:hover { text-decoration: underline; }
.author-meta { font-size: 0.78rem; color: #6f7a70; margin: 6px 0 0; }
.post-body { flex: 1; padding: 16px 20px; min-width: 0; }
.post-date { font-size: 0.8rem; color: #6f7a70; margin: 0 0 10px; }
.post-text { white-space: pre-wrap; word-wrap: break-word; }
.post-actions { margin-top: 14px; display: flex; gap: 16px; }

/* big, browsable image galleries — the whole point */
.gallery { display: grid; gap: 8px; margin-top: 14px; }
.gallery-1 { grid-template-columns: minmax(0, 640px); }
.gallery-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-3, .gallery-4 { grid-template-columns: repeat(2, 1fr); }
.gallery a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.gallery img { width: 100%; height: 100%; max-height: 440px; object-fit: cover; display: block; transition: transform 0.2s; }
.gallery a:hover img { transform: scale(1.02); }

/* ---------------- forms ---------------------------------------------- */
.form-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 28px 30px; margin: 30px 0; max-width: 760px;
}
.form-narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
label { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 6px;
  font: inherit; background: #fff; margin-top: 4px;
}
input:focus, textarea:focus, select:focus { border-color: var(--turf); outline: none; }
textarea { resize: vertical; }
.file-label { font-size: 0.92rem; display: block; margin-bottom: 4px; }
.file-label input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-size: 0.92rem;
  color: #4c574e;
}
/* The actual clickable button browsers draw for file inputs defaults to
   tiny text — restyle it as a large, obviously-tappable button so it's
   easy to hit on a phone screen. Two selectors needed: the modern
   standard one and the older WebKit-prefixed one Safari still uses. */
.file-label input[type="file"]::file-selector-button,
.file-label input[type="file"]::-webkit-file-upload-button {
  display: block;
  width: 100%;
  padding: 14px 18px;
  margin: 0 0 8px;
  border: 2px solid var(--turf);
  border-radius: 8px;
  background: var(--card);
  color: var(--turf);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.file-label input[type="file"]:hover::file-selector-button,
.file-label input[type="file"]:hover::-webkit-file-upload-button {
  background: var(--turf);
  color: #fff;
}
form .btn { margin-top: 18px; }
.reply-box { margin-top: 30px; }
.reply-box textarea { margin-bottom: 4px; }

/* ---------------- sharing + upload previews -------------------------- */
.share-bar { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.share-links { display: flex; gap: 14px; align-items: center; }
.preview-strip { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.preview-strip img {
  width: 84px; height: 84px; object-fit: cover;
  border-radius: 6px; border: 2px solid var(--turf);
}
.preview-warn { width: 100%; margin: 4px 0 0; font-size: 0.85rem; color: var(--clay); font-weight: 600; }

.empty {
  background: var(--card); border: 1px dashed var(--line); border-radius: 8px;
  padding: 26px; text-align: center; color: #6f7a70;
}

/* ---------------- admin ---------------------------------------------- */
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 20px; min-width: 110px;
}
.stat strong { font-family: 'Barlow Condensed', sans-serif; font-size: 1.7rem; display: block; color: var(--dugout); }
.stat span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em; color: #6f7a70; }
.stat-warn { border-color: var(--clay); }
.stat-warn strong { color: var(--clay); }

.mod-card { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--clay); border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; }
.mod-meta { font-size: 0.85rem; color: #6f7a70; margin: 0 0 6px; }
.mod-reason { font-weight: 700; color: var(--clay); margin: 0 0 8px; font-size: 0.92rem; }
.mod-body { white-space: pre-wrap; background: #f3f0e6; border-radius: 6px; padding: 10px 12px; font-size: 0.95rem; max-height: 180px; overflow: auto; }
.mod-actions { margin-top: 12px; display: flex; gap: 10px; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.user-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.user-table th {
  text-align: left; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 10px 14px; background: var(--dugout); color: #d8e4d8;
}
.user-table td { padding: 10px 14px; border-top: 1px solid var(--line); }
.row-banned td { color: #a5a095; text-decoration: line-through; }
.row-banned td.actions-cell { text-decoration: none; }
.actions-cell form { margin-right: 10px; }

/* ---------------- responsive ------------------------------------------ */
@media (max-width: 680px) {
  .hero { padding-top: 26px; padding-bottom: 24px; }
  .hero-title { font-size: 1.75rem; }
  .hero-tagline { font-size: 1rem; }
  .hero .lede { font-size: 0.9rem; }
  .section-title { margin: 18px 0 10px; font-size: 1.25rem; }
  .feed-card { padding: 12px 14px 10px; border-radius: 8px; }
  .feed-title { font-size: 1.15rem; }
  .feed-photo img { max-height: 200px; }
  .fg-1 .feed-photo img { max-height: 320px; }
  .post { flex-direction: column; }
  .post-author {
    width: auto; display: flex; align-items: center; gap: 10px; text-align: left;
    padding: 10px 14px; border-right: none; border-bottom: 1px solid var(--line);
  }
  .avatar { width: 36px; height: 36px; margin: 0; font-size: 0.95rem; }
  .author-meta { margin: 0 0 0 auto; }
  .thumb { width: 68px; height: 54px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .legal { padding: 22px 20px; }
  .gallery-2, .gallery-3, .gallery-4 { grid-template-columns: 1fr; }
}

/* admin export button sits inside the section heading */
.export-btn { float: right; font-size: 0.82rem; text-transform: none; letter-spacing: 0; font-family: 'Barlow', sans-serif; font-weight: 600; margin-top: -4px; }

/* small alternative-sign-in line under the hero button */
.hero-alt { margin: 10px 0 0; font-size: 0.9rem; color: #cfdccf; }
.hero-alt a { color: var(--turf-hi); font-weight: 600; }

/* hero social sign-in button: white with full-color logos so it pops on the dark hero */
.btn-hero-oauth {
  display: inline-flex; align-items: center; gap: 12px;
  background: #fff; color: #1f2a22; border: none;
  padding: 13px 22px; border-radius: 8px;
  font-weight: 700; font-size: 1.02rem; text-decoration: none;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-hero-oauth:hover { color: #1f2a22; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
.oauth-logos { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.oauth-logos svg { display: block; }
@media (max-width: 680px) {
  .btn-hero-oauth { font-size: 0.92rem; padding: 10px 14px; gap: 10px; }
  .btn-hero-oauth .oauth-logos svg { width: 30px; height: 30px; }
}

/* social sync */
.tag-source { background: #e8eefc; color: #2a4fa0; }
.integration-actions { display: flex; gap: 10px; margin: 16px 0; }
.sync-status { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.sync-status h3 { font-size: 0.95rem; margin-bottom: 4px; }
.status-ok { color: var(--turf); }
.status-err { color: #b3372f; }
.check-label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 10px 0; }
.check-label input { width: auto; }
.setup-help { margin-top: 18px; font-size: 0.92rem; }
.setup-help summary { cursor: pointer; font-weight: 600; color: var(--turf); }
.setup-help ol { margin: 10px 0 6px 20px; }
.setup-help li { margin-bottom: 6px; }

/* launch promo: free 3D renderings */
.tag-promo { background: #fdf0d5; color: #8a5a12; font-weight: 700; }
.promo-card { background: linear-gradient(155deg, #fff8ec, #fdf0d5); border-color: #ecd7a8; }
.promo-headline { font-weight: 700; color: #8a5a12; margin: 0 0 4px; font-size: 1.02rem; }
.promo-sub { margin: 0; font-size: 0.84rem; color: #5c4a28; }
.promo-banner {
  background: linear-gradient(155deg, #fff8ec, #fdf0d5); border: 1px solid #ecd7a8;
  border-radius: 10px; padding: 12px 16px; margin: 16px auto 0; max-width: 720px;
  font-size: 0.92rem; color: #5c4a28;
}
.promo-banner strong { color: #8a5a12; }
.promo-banner-home { max-width: 1020px; text-align: center; font-size: 0.98rem; padding: 14px 20px; }
.promo-admin { margin: 26px 0; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.promo-form { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.promo-form label { margin: 0; }
.promo-live-count { font-weight: 700; color: var(--turf); margin-left: auto; }

.field-hint { display: block; font-size: 0.78rem; color: #6f7a70; font-weight: 400; margin-top: 4px; }

/* community guidelines box on the new-topic page */
.post-rules {
  background: #f4f7f1; border: 1px solid #dbe6d5; border-radius: 8px;
  padding: 12px 16px 12px 14px; margin: 4px 0 18px; border-left: 4px solid var(--turf);
}
.post-rules-title { font-weight: 700; color: var(--dugout); margin: 0 0 4px; font-size: 0.92rem; }
.post-rules ol { margin: 0; padding-left: 20px; }
.post-rules li { font-size: 0.86rem; color: #3d463f; margin-bottom: 2px; }

/* email verification status in the admin member list */
.tag-verified { background: #e3f0e5; color: var(--turf); font-size: 0.7rem; margin-left: 6px; }
.tag-unverified { background: #f4e9e0; color: #a3684a; font-size: 0.7rem; margin-left: 6px; }

/* public member profile page */
.profile-head { display: flex; align-items: center; gap: 16px; margin: 20px 0 26px; }
.profile-avatar { width: 56px; height: 56px; font-size: 1.5rem; margin: 0; flex: none; }
.profile-name { margin: 0; font-size: 1.7rem; }
.profile-meta { margin: 2px 0 0; color: #6f7a70; font-size: 0.92rem; }

/* ---------------- materials calculator ------------------------------- */
.calc-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 26px; align-items: start; margin-top: 18px; }
.calc-inputs { position: sticky; top: 88px; }
.calc-h2 { font-size: 1.05rem; margin-bottom: 12px; }
.calc-headline {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px;
}
.calc-stat {
  background: var(--dugout); color: #eef3ee; border-radius: 10px;
  padding: 14px 12px; text-align: center;
}
.calc-stat strong {
  display: block; font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.9rem; line-height: 1.05; color: var(--turf-hi);
}
.calc-stat span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em; color: #9fb6a3; }
.calc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 14px;
}
.calc-card h3 { font-size: 1.08rem; color: var(--dugout); margin-bottom: 8px; }
.calc-list { list-style: none; margin: 0; padding: 0; }
.calc-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem;
}
.calc-list li:last-child { border-bottom: none; }
.calc-list em { font-style: normal; font-weight: 700; color: var(--dugout); white-space: nowrap; }
.calc-note { margin: 8px 0 0; font-size: 0.82rem; color: #6f7a70; }
.calc-warn { margin: 8px 0 0; font-size: 0.85rem; color: var(--clay); font-weight: 600; }
.calc-cta {
  background: linear-gradient(155deg, #f4f7f1, #e7f2e8); border: 1px solid #dbe6d5;
  border-left: 4px solid var(--turf); border-radius: 10px; padding: 18px 20px; margin-top: 18px;
}
.calc-cta-title { font-weight: 700; color: var(--dugout); margin: 0 0 4px; font-size: 1.05rem; }
.calc-cta-sub { margin: 0 0 12px; font-size: 0.9rem; color: #3d463f; }

@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-inputs { position: static; }
  .calc-headline { grid-template-columns: 1fr; gap: 8px; }
  .calc-stat { display: flex; align-items: baseline; justify-content: space-between; text-align: left; }
  .calc-stat strong { font-size: 1.5rem; }
}
.calc-promo { display: block; text-decoration: none; color: var(--ink); transition: border-color 0.15s; }
.calc-promo:hover { border-color: var(--turf); color: var(--ink); }
.calc-promo strong { display: block; color: var(--dugout); font-size: 0.98rem; margin-bottom: 3px; }
.calc-promo span { font-size: 0.82rem; color: #6f7a70; }

/* 3D cage viewer */
.calc-3d-wrap { margin: 26px 0 10px; }
.calc-3d-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.calc-3d-sub { margin: 2px 0 0; font-size: 0.86rem; color: #6f7a70; }
.calc-3d { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #eef1e9; }
.calc-3d canvas { display: block; width: 100%; height: auto; touch-action: pan-y; cursor: grab; }
.calc-3d canvas:active { cursor: grabbing; }
.calc-3d-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: #6f7a70; background: #eef1e9; z-index: 2; padding: 20px; text-align: center;
}
.calc-3d-scale { margin: 0; padding: 8px 12px; font-size: 0.78rem; color: #6f7a70; border-top: 1px solid var(--line); background: var(--card); }

/* cage plan image attached from the calculator */
.attached-plan { display: flex; gap: 14px; align-items: flex-start; background: #f4f7f1; border: 1px solid #dbe6d5; border-radius: 8px; padding: 12px; margin: 4px 0 14px; }
.attached-plan img { width: 132px; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.attached-plan strong { display: block; color: var(--dugout); font-size: 0.94rem; }
.attached-plan span { display: block; font-size: 0.82rem; color: #6f7a70; margin: 2px 0 6px; }

/* share row under the 3D view */
.calc-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.calc-share-label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: #6f7a70; font-weight: 700; margin-right: 2px; }
.calc-share .btn { font-size: 0.86rem; padding: 7px 12px; }
.calc-share-links { display: inline-flex; align-items: center; gap: 10px; font-size: 0.84rem; }
.calc-share-sep { color: #6f7a70; }
.calc-share-links a { color: var(--turf); font-weight: 600; }
