:root {
    --green: #0d6b47;
    --green-700: #0a5739;
    --green-900: #06402a;
    --green-50: #e9f4ee;
    --green-100: #d2eadc;
    --amber: #f2b01e;
    --amber-50: #fff5dc;
    --amber-ink: #7a5300;
    --red: #c2392b;
    --red-50: #fdecea;
    --blue: #2a62c9;
    --blue-50: #e9f0fc;
    --violet: #6b4bc4;
    --violet-50: #f0ecfb;
    --khaki: #8a6a26;
    --khaki-50: #f6f0e1;
    --ink: #14211b;
    --ink-2: #4b5a53;
    --ink-3: #87948d;
    --line: #e5e9e7;
    --bg: #f1f4f2;
    --card: #fff;
    --shadow: 0 1px 2px rgba(20, 33, 27, .05), 0 6px 18px rgba(20, 33, 27, .06);
    --r-card: 12px;
    --r-ctl: 10px;
    --nav-h: 66px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Figtree", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-700); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; font-weight: 800; }
h2 { font-size: 1.12rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .9em; }
.icon { flex: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 18px; padding-bottom: 32px; min-height: 60vh; }

/* ---------- App bar ---------- */
.appbar { background: var(--green); color: #fff; }
.appbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { color: #fff; }
.brand img { height: 44px; width: auto; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; font-weight: 800; font-size: .74rem; letter-spacing: .03em; }
.brand strong { display: block; font-size: 1rem; font-weight: 700; line-height: 1.15; }
.brand small { display: block; font-size: .78rem; opacity: .8; }
.appbar-actions { display: flex; align-items: center; gap: 6px; }
.appbar-btn { display: inline-flex; align-items: center; gap: 6px; color: #fff; background: rgba(255, 255, 255, .12); border: 0; border-radius: var(--r-ctl); padding: 8px 12px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.appbar-btn:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.appbar-actions form { margin: 0; }

/* ---------- Bottom tab bar (top nav on wide screens) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; box-shadow: 0 -1px 0 var(--line), 0 -6px 20px rgba(20, 33, 27, .06); padding-bottom: env(safe-area-inset-bottom); }
.tabbar-inner { display: flex; justify-content: space-around; max-width: 640px; margin: 0 auto; height: var(--nav-h); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); font-size: .7rem; font-weight: 600; }
.tabbar a .tab-icon { display: grid; place-items: center; width: 44px; height: 28px; border-radius: 9px; }
.tabbar a.active { color: var(--green); }
.tabbar a.active .tab-icon { background: var(--green-50); }

.subnav { background: #fff; box-shadow: 0 1px 0 var(--line); }
.subnav .wrap { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 12px; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.subnav a.active { color: var(--green); box-shadow: inset 0 -3px 0 var(--green); }
.is-admin body, body.is-admin { padding-bottom: 0; }

@media (min-width: 900px) {
    body { padding-bottom: 0; font-size: 16px; }
    .tabbar { position: sticky; top: 0; bottom: auto; box-shadow: 0 1px 0 var(--line); }
    .tabbar-inner { max-width: 1080px; justify-content: flex-start; gap: 6px; height: 54px; padding: 0 16px; }
    .tabbar a { flex: none; flex-direction: row; gap: 8px; font-size: .92rem; padding: 0 10px; }
    .tabbar a .tab-icon { width: 34px; height: 34px; }
}

/* ---------- Hero (home) ---------- */
.hero { background: var(--green); color: #fff; padding: 6px 0 64px; border-radius: 0 0 22px 22px; }
.hero .greet { font-size: 1.65rem; font-weight: 800; margin: 4px 0 2px; letter-spacing: -.02em; }
.hero .sub { opacity: .85; font-size: .95rem; }
.hero-pull { margin-top: -48px; }

.now-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 16px; display: flex; gap: 14px; align-items: center; color: var(--ink); }
.now-card:hover { color: var(--ink); }
.now-card .badge-time { flex: none; width: 64px; height: 64px; border-radius: 12px; background: var(--green); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.now-card .badge-time b { font-size: 1.1rem; }
.now-card .badge-time span { font-size: .68rem; opacity: .85; text-transform: uppercase; letter-spacing: .04em; }
.now-card .label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--green); }
.now-card .title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.now-card .meta { color: var(--ink-2); font-size: .88rem; display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.now-card .go { margin-left: auto; color: var(--ink-3); }

/* ---------- Sections ---------- */
.section { margin-top: 26px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.section-head h2 { margin: 0; }
.section-head a { font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }

/* Service tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tiles .tile:last-child:nth-child(odd) { grid-column: span 2; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); padding: 14px; color: var(--ink); display: flex; flex-direction: column; gap: 10px; min-height: 120px; transition: transform .12s ease; }
.tile:hover { color: var(--ink); transform: translateY(-2px); }
.tile .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; }
.tile strong { display: block; font-size: .98rem; }
.tile span { display: block; color: var(--ink-2); font-size: .8rem; }
.t-green .ico { background: var(--green-50); color: var(--green); }
.t-amber .ico { background: var(--amber-50); color: #b07800; }
.t-blue .ico { background: var(--blue-50); color: var(--blue); }
.t-violet .ico { background: var(--violet-50); color: var(--violet); }
.t-khaki .ico { background: var(--khaki-50); color: var(--khaki); }

/* Horizontal scroller */
.scroller { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 16px 10px; margin: 0 -16px; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; flex: none; }

/* Cards & panels */
.card, .panel { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 16px; }
.panel { margin-bottom: 16px; }
.panel > :last-child, .card > :last-child { margin-bottom: 0; }
.stack { display: grid; gap: 10px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.eyebrow { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--green); margin-bottom: 4px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }

.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: .86rem; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.section-title a { font-size: .88rem; font-weight: 600; }

.grid { display: grid; gap: 16px; align-items: start; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Flash & notices */
.flash { display: flex; gap: 10px; align-items: flex-start; background: var(--green-50); color: var(--green-900); padding: 12px 14px; border-radius: var(--r-ctl); margin-bottom: 16px; font-weight: 600; }
.flash-error { background: var(--red-50); color: var(--red); }
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-50); color: #5c4100; padding: 12px 14px; border-radius: var(--r-ctl); margin-bottom: 16px; }
.notice > div > :last-child { margin-bottom: 0; }
.notice .icon { color: #b07800; margin-top: 1px; }
.notice-urgent { background: var(--red-50); color: #6b1c14; }
.notice-urgent .icon { color: var(--red); }
.notice a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* Tags */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #edf0ee; color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.tag-green { background: var(--green-50); color: var(--green-700); }
.tag-amber { background: var(--amber-50); color: var(--amber-ink); }
.tag-red { background: var(--red-50); color: var(--red); }
.tag-solid { background: var(--green); color: #fff; }
.tag-white { background: rgba(255, 255, 255, .92); color: var(--ink); }

/* Chips (filters, selectable options) */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 4px; margin: 0 -16px 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: var(--r-ctl); background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-weight: 600; font-size: .88rem; cursor: pointer; white-space: nowrap; margin: 0; }
.chip:hover { color: var(--ink); background: #f7f9f8; }
.chip.active, .chip-input:checked + .chip { background: var(--green); color: #fff; box-shadow: none; }
.chip-input:focus-visible + .chip { outline: 2px solid var(--green); outline-offset: 2px; }
.chip-input { position: absolute; opacity: 0; pointer-events: none; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-grid .chip { min-width: 54px; justify-content: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--green); color: #fff; border: 0; border-radius: var(--r-ctl); padding: 11px 18px; font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; text-align: center; }
.btn:hover { background: var(--green-700); color: #fff; }
.btn-light { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px #d6dcd9; }
.btn-light:hover { background: #f5f7f6; color: var(--ink); }
.btn-soft { background: var(--green-50); color: var(--green-700); }
.btn-soft:hover { background: var(--green-100); color: var(--green-900); }
.btn-danger { background: #fff; color: var(--red); box-shadow: inset 0 0 0 1px #efc9c4; }
.btn-danger:hover { background: var(--red-50); color: var(--red); }
.btn-small { padding: 6px 11px; font-size: .84rem; border-radius: 8px; }
.btn-block { display: flex; width: 100%; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--green); font-weight: 600; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }

/* Forms */
label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.field .hint, label .hint { font-weight: 500; color: var(--ink-3); font-size: .83rem; margin-top: 4px; }
.field .error { color: var(--red); font-size: .85rem; font-weight: 600; margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time],
input[type=number], input[type=search], input[type=datetime-local], input[type=file], select, textarea {
    width: 100%; font: inherit; font-size: 16px; padding: 12px 13px; border: 0; border-radius: var(--r-ctl);
    background: #f4f6f5; box-shadow: inset 0 0 0 1px #dfe4e1; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--green); }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.form-row { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row-3 { grid-template-columns: 1fr 1fr 1fr; } }
.form-section { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin: 4px 0 12px; }
.form-narrow { max-width: 640px; }

.searchbar { position: relative; margin-bottom: 12px; }
.searchbar .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.searchbar input { padding-left: 44px; background: #fff; box-shadow: var(--shadow); }
.searchbar input:focus { box-shadow: inset 0 0 0 2px var(--green); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters input[type=search], .filters input[type=date] { flex: 1 1 220px; width: auto; background: #fff; }
.filters select { width: auto; flex: 0 1 220px; background: #fff; }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: none; padding: 8px 14px; border-radius: var(--r-ctl); background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-weight: 600; font-size: .88rem; }
.tabs a.active { background: var(--green); color: #fff; box-shadow: none; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:first-child { padding-top: 0; }
.list > li:last-child { border-bottom: 0; padding-bottom: 0; }

.row-link { display: flex; align-items: center; gap: 12px; color: var(--ink); padding: 13px 0; }
.row-link:hover { color: var(--ink); }
.row-link .go { margin-left: auto; color: var(--ink-3); }
.row-link + .row-link { border-top: 1px solid var(--line); }
.row-link .txt { min-width: 0; }
.row-link .txt strong { display: block; line-height: 1.3; }
.row-link .txt > span { display: block; font-size: .82rem; color: var(--ink-3); margin-top: 2px; }

.avatar { flex: none; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; counter-increment: step; }
.steps li::before { content: counter(step); flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--green-50); color: var(--green-700); font-weight: 800; font-size: .85rem; display: grid; place-items: center; }

/* Programme */
.day-chips .chip { flex-direction: column; gap: 0; padding: 7px 14px; line-height: 1.25; }
.day-chips .chip small { font-size: .7rem; font-weight: 600; opacity: .75; }
.agenda { display: grid; gap: 10px; }
.agenda-item { display: flex; gap: 14px; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); padding: 14px; }
.agenda-item .when { flex: none; width: 62px; }
.agenda-item .when b { display: block; font-size: 1rem; }
.agenda-item .when span { display: block; font-size: .74rem; color: var(--ink-3); font-weight: 600; }
.agenda-item .what { flex: 1; min-width: 0; }
.agenda-item .title { font-weight: 700; line-height: 1.3; }
.agenda-item .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-2); font-size: .86rem; margin-top: 3px; }
.agenda-item .meta span { display: inline-flex; align-items: center; gap: 4px; }
.agenda-item .update { margin-top: 8px; font-size: .86rem; background: var(--amber-50); color: #5c4100; padding: 7px 10px; border-radius: 8px; }
.agenda-item .notes { margin-top: 6px; font-size: .86rem; color: var(--ink-2); }
.agenda-item.now { background: var(--green); color: #fff; }
.agenda-item.now .meta, .agenda-item.now .when span, .agenda-item.now .notes { color: rgba(255, 255, 255, .85); }
.agenda-item.done { opacity: .55; box-shadow: none; }
.agenda-item.cancelled .title { text-decoration: line-through; color: var(--ink-3); }
.agenda-item.cancelled .update { background: var(--red-50); color: #6b1c14; }

/* Found items */
.items { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .items { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .items { grid-template-columns: repeat(4, 1fr); } }
.item-card { background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; color: var(--ink); display: block; }
.item-card:hover { color: var(--ink); }
.item-card .media { position: relative; aspect-ratio: 1 / 1; background: #e9edeb; }
.item-card .media img { width: 100%; height: 100%; object-fit: cover; }
.item-card .media .tag { position: absolute; left: 8px; top: 8px; }
.item-card .body { padding: 10px 12px 12px; }
.item-card .body strong { display: block; font-size: .92rem; line-height: 1.3; }
.item-card .body span { display: block; color: var(--ink-3); font-size: .78rem; margin-top: 3px; }
.scroller .item-card { width: 152px; }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; }
.ph-0 { background: var(--blue-50); color: var(--blue); }
.ph-1 { background: var(--violet-50); color: var(--violet); }
.ph-2 { background: var(--khaki-50); color: var(--khaki); }
.ph-3 { background: var(--green-50); color: var(--green); }
.ph-4 { background: var(--amber-50); color: #b07800; }

.item-detail { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .item-detail { grid-template-columns: 1.1fr 1fr; } }
.item-detail .photo { border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: #e9edeb; box-shadow: var(--shadow); }
.item-detail .photo img { width: 100%; height: 100%; object-fit: cover; }
.ref { display: inline-block; font-weight: 800; letter-spacing: .03em; background: var(--green-50); color: var(--green-700); padding: 4px 10px; border-radius: 8px; }

.info-rows { display: grid; gap: 14px; }
.info-row { display: flex; gap: 12px; align-items: flex-start; }
.info-row > .icon { color: var(--ink-3); margin-top: 2px; }
.info-row small { display: block; color: var(--ink-3); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

dl.details { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 0; }
dl.details dt { color: var(--ink-3); font-weight: 600; font-size: .9rem; }
dl.details dd { margin: 0; }
@media (max-width: 520px) { dl.details { grid-template-columns: 1fr; gap: 2px; } dl.details dd { margin-bottom: 8px; } }

/* Kit exchange */
.swap { display: flex; align-items: center; gap: 8px; flex: none; }
.swap > .icon { color: var(--ink-3); }
.size { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 48px; height: 48px; padding: 0 8px; border-radius: 10px; font-weight: 800; font-size: 1rem; line-height: 1.1; }
.size small { font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.size-have { background: #edf0ee; color: var(--ink); }
.size-need { background: var(--green); color: #fff; }
.kit-card { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); padding: 12px 14px; }
.kit-card .info { flex: 1; min-width: 0; }
.kit-card .info strong { display: block; }
.kit-card .info span { display: block; font-size: .8rem; color: var(--ink-3); }
.item-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 640px) { .item-options { grid-template-columns: repeat(4, 1fr); } }
.item-options .chip { justify-content: flex-start; padding: 12px; white-space: normal; }

.match { background: var(--green); color: #fff; border-radius: var(--r-card); padding: 16px; margin: 12px 0; }
.match .list > li { border-color: rgba(255, 255, 255, .2); }

/* Menu (More page) */
.menu { background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); padding: 2px 16px; }

/* Honesty wall */
.finders { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 6px; margin: 0 -16px; }
.finder { flex: none; width: 104px; text-align: center; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); padding: 12px 8px; }
.finder .avatar { margin: 0 auto 8px; width: 48px; height: 48px; border-radius: 13px; font-size: .95rem; }
.finder b { display: block; font-size: .8rem; line-height: 1.25; }
.finder span { font-size: .72rem; color: var(--ink-3); }

/* Tables (officials) */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .72rem; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
td .thumb { width: 52px; height: 42px; object-fit: cover; border-radius: 7px; }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 18px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); padding: 14px; color: var(--ink); }
.stat:hover { color: var(--ink); }
.stat b { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.stat span { color: var(--ink-2); font-size: .84rem; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pagination a, .pagination span { padding: 7px 12px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: .88rem; font-weight: 600; color: var(--ink); }
.pagination .current { background: var(--green); color: #fff; box-shadow: none; }
.pagination .disabled { color: #b3bcb7; }

.empty { text-align: center; padding: 30px 16px; color: var(--ink-2); }
.empty .icon { color: var(--ink-3); margin: 0 auto 8px; }

.login-box { max-width: 400px; margin: 24px auto; }
.announcement-body { white-space: pre-line; }

.site-footer { color: var(--ink-3); font-size: .82rem; padding: 8px 0 24px; text-align: center; }
.site-footer a { font-weight: 600; }

@media (min-width: 900px) {
    .hero { border-radius: 0; }
    .scroller { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; }
    .scroller .item-card { width: auto; }
    .scroller .item-card:nth-child(n+7) { display: none; }
}

/* Photo gallery (officials' form) */
.photo-manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 12px; }
.photo-tile { display: block; background: #f4f6f5; border-radius: var(--r-ctl); overflow: hidden; font-weight: 500; margin: 0; }
.photo-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.photo-tile .check { padding: 8px; gap: 6px; }
.photo-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photo-preview img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; }

/* Photo gallery (item page) */
.gallery { position: relative; min-width: 0; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 14px; box-shadow: var(--shadow); background: #e9edeb; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 5; }
@media (min-width: 900px) { .gallery-slide { aspect-ratio: 1 / 1; } }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-count { position: absolute; right: 10px; top: 10px; background: rgba(20, 33, 27, .72); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 7px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.gallery-thumbs a { flex: none; width: 62px; height: 62px; border-radius: 9px; overflow: hidden; opacity: .55; }
.gallery-thumbs a.active { opacity: 1; box-shadow: 0 0 0 2px var(--green); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.item-card .media .photo-count { left: auto; right: 8px; }
