:root {
  color-scheme: light;
  --ink: #132c27;
  --muted: #48625b;
  --paper: #f4f7f0;
  --line: #ccd8cd;
  --lime: #d9fb83;
  font: 16px/1.6 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; text-underline-offset: .24em; }
button, input { font: inherit; }
button { cursor: pointer; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .45rem .95rem; border: 1px solid var(--line);
  border-radius: .7rem; background: #fff; color: var(--ink); font-weight: 700;
}
.button { background: var(--lime); border-color: var(--lime); text-decoration: none; }
.button.secondary { background: var(--ink); color: white; border-color: var(--ink); }
:focus-visible { outline: 3px solid #56970b; outline-offset: 4px; }
.top, main, footer { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.top, footer, .section-heading, .gallery-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.top { padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-size: .95rem; font-weight: 850; text-decoration: none; }
.mark { background: var(--ink); color: var(--lime); padding: .25rem .65rem; border-radius: .5rem; }
nav, footer div { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.2rem; }
nav a { font-weight: 650; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem; align-items: center;
  padding: clamp(1.4rem, 5vw, 4rem); border-radius: 1.8rem; color: #fff;
  background: radial-gradient(ellipse at right top, #285b48, transparent 66%), #102b27;
}
.eyebrow { margin: 0 0 .3rem; font-weight: 800; color: var(--muted); }
.hero .eyebrow, .hero em { color: var(--lime); }
.hero h1 { margin: .35rem 0; font-size: clamp(2.4rem, 6vw, 5.2rem); line-height: 1.16; letter-spacing: -.035em; }
.hero em { font-style: normal; }
.hero p { max-width: 34rem; }
.hero figure { margin: 0; justify-self: center; text-align: center; }
.hero img { display: block; width: min(100%, 320px); height: auto; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid #aaccaf; border-radius: 1rem; }
.hero figcaption { margin-top: .6rem; }
main > section:not(.hero) { padding: 2.8rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
h2 { margin: 0; font-size: clamp(1.6rem, 3.5vw, 2.6rem); line-height: 1.2; }
.gallery { overflow: hidden; margin-top: 1rem; background: var(--ink); color: white; border-radius: 1.2rem; }
.gallery-frame { display: grid; place-items: center; min-height: 12rem; height: clamp(15rem, 52vw, 31rem); background: radial-gradient(ellipse, #36584b, #132c27); }
.gallery img { width: 100%; height: 100%; min-height: 0; object-fit: contain; animation: reveal .5s ease both; }
.gallery-bar { padding: .7rem 1rem; }
.gallery-bar p { margin: 0; }
.controls { display: flex; gap: .45rem; }
.controls button { min-width: 44px; }
@keyframes reveal { from { opacity: .25; transform: scale(.985); } to { opacity: 1; transform: scale(1); } }
label { display: grid; gap: .3rem; margin-bottom: .85rem; font-weight: 650; }
.search { max-width: 30rem; }
input { min-width: 0; width: 100%; border: 1px solid #8da49a; border-radius: .55rem; padding: .55rem; background: white; color: var(--ink); }
.directory-list, #items { list-style: none; padding: 0; }
.directory-list, .library { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; }
.directory-list li, details { background: white; border: 1px solid var(--line); border-radius: .85rem; padding: .9rem 1.1rem; overflow-wrap: anywhere; }
.directory-list small { display: block; font-size: .9rem; color: var(--muted); }
.library { margin: 1rem 0; align-items: start; }
summary { cursor: pointer; font-weight: 790; }
details p { margin-bottom: 0; }
footer { padding-block: 1.5rem 2rem; }
dialog { position: fixed; width: min(32rem, calc(100% - 2rem)); padding: 1.25rem; max-height: calc(100% - 2rem); border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); }
dialog::backdrop { background: #071e1bd1; }
dialog h2 { margin-bottom: 1rem; font-size: 1.5rem; }
.dialog-close { display: flex; justify-content: flex-end; }
.check { display: flex; align-items: start; }
.check input { width: auto; margin-top: .42rem; }
#items li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
@media (max-width: 650px) {
  .hero, .library, .directory-list { grid-template-columns: 1fr; }
  .hero img { max-height: 270px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery img { animation: none; }
}

:root { --ink:#142744; --muted:#405c54; --paper:#eef5f1; --lime:#d0ff80; }
body { background: radial-gradient(ellipse at 100% 0, #bde4cc, transparent 40rem), var(--paper); }
.brand img { object-fit:contain; }
.brand strong { color:#086440; }
.brand small { display:block; font-size:.875rem; font-weight:600; }
.hero { background: linear-gradient(125deg,#06392b 12%,#08764b 70%,#7bd9ab); }
.hero h1 { font-size:clamp(2.8rem,8vw,6rem); font-weight:900; font-style:italic; }
.hero img { object-position:center 35%; box-shadow:0 14px 30px #09241955; }
.quick { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.6rem; margin:1rem 0; }
.quick :is(a,button) { display:grid; place-content:center; min-height:85px; text-align:center; background:linear-gradient(#fff,#edf7f2); border:1px solid #d6e4dc; box-shadow:0 5px 14px #12382d14; border-radius:1rem; text-decoration:none; font-size:.875rem; font-weight:800; padding:.4rem; }
.quick span { color:#097247; font-size:1.65rem; line-height:1.2; }
.dashboard { display:grid; gap:1rem; align-items:start; }
.dashboard section { background:#fff; border:1px solid #d5e5dd; padding:clamp(.85rem,3vw,1.4rem); margin-bottom:1rem; border-radius:1.2rem; box-shadow:0 8px 24px #183a2e12; }
.dashboard h2 { font-size:clamp(1.2rem,3vw,1.7rem); }
.wall { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.38rem; padding-top:.65rem; }
.wall button { display:block; aspect-ratio:1.3; padding:0; overflow:hidden; }
.wall button:first-child { grid-column:span 2; aspect-ratio:2.6; }
.wall img { display:block; width:100%; height:100%; object-fit:cover; }
.wall [aria-current=true] { outline:2px solid #128351; outline-offset:1px; }
.featured { display:block; margin-top:.75rem; border-radius:.85rem; overflow:hidden; background:#eaf7ee; text-decoration:none; }
.featured img { display:block; width:100%; height:clamp(170px,29vw,235px); object-fit:cover; object-position:center 39%; }
.featured div { padding:.85rem; }
.tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.45rem; margin-top:.75rem; }
.tools a { background:#edf7f2; padding:.7rem; border-radius:.6rem; font-weight:700; }
.gallery-frame { height:clamp(12rem,38vw,25rem); }
#pending-items { padding:0; list-style:none; }
#pending-items img { display:block; max-width:100%; max-height:16rem; object-fit:contain; }
#pending-items li { padding:.75rem 0; border-bottom:1px solid var(--line); }
#pending-items button { margin-right:.35rem; }
@media(min-width:750px) {
  .quick { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .dashboard { grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); }
  .dashboard .library { grid-template-columns:1fr; }
}

@font-face { font-family:Inter; src:url('/hub/fonts/inter.woff2') format('woff2'); font-weight:100 900; font-display:swap; }
@font-face { font-family:'Noto Sans Thai Looped'; src:url('/hub/fonts/thai.woff2') format('woff2'); font-weight:100 900; font-display:swap; unicode-range:U+0E00-0E7F,U+200C-200D,U+25CC; }
:root { font-family:Inter,'Noto Sans Thai Looped',sans-serif; font-size:15px; --ink:#10213d; --paper:#f5faf7; }
body { background:linear-gradient(175deg,#fff 0,#fbfdfb 330px,#edf7f0 850px); }
.top { height:64px; padding:0; flex-wrap:nowrap; gap:.4rem; position:relative; z-index:2; }
.top .brand { font-size:clamp(.8rem,3.8vw,1.05rem); line-height:1.28; }
.brand img { width:36px;height:36px; }
.brand small { margin-top:.15rem; font-size:.8rem; }
.top-menu { padding:0; border:0; background:transparent; }
.top-menu summary { display:grid; place-items:center; width:44px;height:44px; border-radius:.7rem; color:#075434; font-size:1.35rem; }
.top-menu summary::-webkit-details-marker { display:none; }
.top-menu nav { position:absolute; right:0; top:56px; display:grid; min-width:180px; gap:0; padding:.4rem; background:white; box-shadow:0 10px 30px #10244230; border:1px solid var(--line); border-radius:.8rem; }
.top-menu a { padding:.6rem; text-decoration:none; }
.hero { position:relative; min-height:238px; height:238px; grid-template-columns:1.05fr .95fr; gap:0; align-items:stretch; overflow:hidden; padding:0; border-radius:1.15rem; background:linear-gradient(128deg,#042c21 3%,#086744 62%,#9cdec0); }
.hero-copy { align-self:center; position:relative; z-index:1; padding:.85rem .1rem 1.5rem 1rem; }
.hero h1 { margin:0; font-size:clamp(28px,8.1vw,36px); line-height:1.04; font-weight:800; }
.hero h1 em { font-size:1.23em; }
.hero p { margin:.4rem 0; font-size:.92rem; line-height:1.45; }
.hero .hero-date { font-size:.8rem; }
.hero-link { display:inline-flex; min-height:36px; align-items:center; padding:.25rem .6rem; background:#e5ffc4; color:#093b28; border-radius:.55rem; text-decoration:none; font-weight:650; }
.hero-media { min-width:0; position:relative; overflow:hidden; }
.hero-media img { width:100%; height:100%; max-height:none; display:block; border:0; border-radius:0; box-shadow:none; object-fit:cover; animation:reveal .4s ease both; }
.hero-placeholder { position:absolute; inset:0; background:linear-gradient(125deg,transparent 22%,#8becb748 22%,#8becb748 44%,transparent 44%), linear-gradient(154deg,transparent 56%,#e1ffd24f 56%,#e1ffd24f 65%,transparent 65%); }
.hero-controls { position:absolute; z-index:1; bottom:4px; right:8px; display:flex; align-items:center; gap:.3rem; }
#hero-dots { display:flex; }
.hero-controls button { min-height:30px; min-width:30px; border:0; background:transparent; padding:0; color:white; }
#hero-dots button::before { content:''; width:8px;height:8px;border-radius:50%; background:#ffffff83; }
#hero-dots [aria-current=true]::before { background:white; }
.quick { grid-template-columns:repeat(3,minmax(0,1fr)); }
.quick :is(a,button) { min-height:74px; font-size:.84rem; line-height:1.27; font-weight:650; }
.quick svg { display:block; margin:0 auto .25rem; width:25px;height:25px; fill:none; stroke:#087347; stroke-width:1.85; stroke-linecap:round; stroke-linejoin:round; }
.dashboard h2 { font-size:clamp(18px,4.5vw,22px); }
.dashboard .section-heading { gap:.45rem; }
.dashboard .section-heading button { background:#087347; color:white; }
.wall { display:block; columns:2; column-gap:.55rem; }
.wall button,.wall button:first-child { width:100%; margin:0 0 .5rem; aspect-ratio:auto; break-inside:avoid; border:0; }
.wall img { height:auto; min-height:70px; max-height:340px; object-fit:cover; }
.featured { background:#eef8ef; border:1px solid #d9e9dd; }
#highlights-photos img { width:100%; max-height:220px; object-fit:cover; border-radius:.75rem; }
#viewer { max-width:none; width:min(100% - 1rem,70rem); padding:.45rem; background:#101f1a; color:white; }
#viewer-image { display:block; width:100%; height:min(72dvh,650px); object-fit:contain; touch-action:pan-y; }
.viewer-controls { display:flex; align-items:center; gap:.5rem; justify-content:space-between; flex-wrap:wrap; }
.upload-previews { padding:0; list-style:none; display:grid; grid-template-columns:repeat(auto-fill,minmax(60px,1fr)); gap:.35rem; max-height:210px; overflow:auto; }
.upload-previews img { display:block; width:100%; aspect-ratio:1; object-fit:cover; border-radius:.4rem; }
#upload-progress { width:100%; accent-color:#087347; }
@media(min-width:750px) { .hero {height:258px;} .hero-copy {padding-inline:2rem;} .wall { columns:3; } }
@media(prefers-reduced-motion:reduce) { .hero-media img { animation:none; } }

.featured img { height:clamp(210px,65vw,350px); object-fit:contain; background:#f5fbf6; }
#highlights-photos { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.45rem; margin:.65rem 0; }
#highlights-photos button { display:block; padding:0; border:0; overflow:hidden; }
#highlights-photos button:first-child { grid-column:1/-1; }
#highlights-photos img { display:block; aspect-ratio:16/9; height:auto; }
.hero-media img { object-fit:contain; }

.community-link{display:block;padding:.75rem 1rem;margin:0 0 1rem;border:1px solid #badfcb;border-radius:.8rem;background:#eaf7ee;color:#075434;font-weight:700;text-decoration:none}
#community-form,.community-comment-form{display:grid;gap:.5rem;margin:.7rem 0}
#community input,#community textarea{width:100%;min-width:0;font:inherit;padding:.65rem;border:1px solid #c8ded0;border-radius:.6rem;background:white;color:var(--ink)}
#community textarea{resize:vertical}
#community small,.community-meta{color:var(--muted);font-size:.82rem}
.community-post{padding:1rem 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
.community-post p,.community-comment p{white-space:pre-wrap;margin:.5rem 0}
.community-post img{width:100%;max-height:380px;object-fit:contain;border-radius:.7rem;background:#f2f7f4}
.community-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin:.5rem 0}
.community-actions button{min-height:42px;padding:.4rem .8rem}
.community-actions [aria-pressed=true]{background:#087347;color:white}
.community-comments{padding:.5rem;background:#f2f8f4;border-radius:.6rem}
.community-comment{border-bottom:1px solid var(--line);padding:.45rem}
#community-admin-list article{border-bottom:1px solid var(--line);padding:.6rem 0;overflow-wrap:anywhere}

/* Balanced quick menu */
.quick{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:640px){.quick{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Participant photo cards */
.directory-join{margin:14px 0 20px}.directory-join>button{width:100%;min-height:48px}.directory-join form{background:#f3faf6;border:1px solid #c4e1d3;border-radius:14px;padding:14px;margin-top:10px}.directory-join form p{font-size:.9rem;margin:8px 0 12px}.directory-join form>button[type=submit]{width:100%;min-height:46px}.directory-join button:disabled{opacity:.5;cursor:not-allowed}#directory-preview{display:block;width:min(100%,360px);max-height:420px;object-fit:contain;margin:10px auto;border:1px solid #cee2d6;border-radius:12px;background:white}#directory-detected{background:#e4f4e9;border:1px solid #c3dfce;padding:10px;border-radius:10px;margin:10px 0}#directory-detected button{min-height:34px;font-size:.8rem;margin-left:6px}#directory-list.directory-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#directory-list li{padding:0;overflow:hidden;background:white;border-radius:12px;border:1px solid #d2e3d9}#directory-list .directory-photo{display:block;background:#f0f7f3;border-bottom:1px solid #dce9df}#directory-list .directory-photo img{display:block;width:100%;aspect-ratio:4/5;object-fit:contain}#directory-list .directory-card-caption{display:block;padding:10px 12px;overflow-wrap:anywhere}#directory-list .directory-card-caption strong{font-size:.95rem}#directory-list .directory-card-caption small{font-size:.8rem;color:#577064}@media(max-width:420px){#directory-list.directory-list{gap:8px}#directory-list .directory-card-caption{padding:8px}}

.directory-batch{margin-top:12px}.directory-batch form{margin-top:12px;padding:14px;border:1px solid #d2e5df;border-radius:12px}.directory-batch progress{width:100%;accent-color:#168453}.directory-batch-row{display:grid;grid-template-columns:92px minmax(0,1fr);gap:12px;padding:12px 0;border-bottom:1px solid #d2e5df}.directory-batch-row img{width:92px;height:118px;object-fit:contain;background:#f1f6f3;border-radius:8px}.directory-batch-row strong{overflow-wrap:anywhere}.directory-batch-row p{font-size:.86rem;margin:5px 0}.directory-batch-row input[type=text]{width:100%;min-width:0}.directory-batch-row .check{margin-top:8px}.directory-batch #directory-batch-publish{width:100%;margin-top:12px}

#directory{scroll-margin-top:24px}#directory .directory-join,#directory .directory-batch{margin:12px 0}#directory .directory-search-row{display:flex;align-items:end;gap:8px;flex-wrap:wrap}#directory .directory-search-row label{flex:1;min-width:150px;margin:0}#directory-clear-search{min-height:44px}#directory-edit-launch{margin:10px 0}#directory-list{margin-top:12px}#directory-edit-cards{display:grid;gap:12px}.directory-edit-card{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:start;gap:12px;border:1px solid #d2e3d9;background:#f4faf6;padding:12px;border-radius:12px}.directory-edit-card img{width:100%;height:auto;max-height:160px;object-fit:contain;border-radius:6px}.directory-edit-card form{min-width:0}.directory-edit-card form p{margin:6px 0;color:#14694a}.directory-edit-card form button{min-height:40px}#directory-edit-list{margin-top:12px}

/* Directory is its own screen; existing dialog and upload handlers remain intact. */
body:not(.directory-page) #directory{display:none}
body.directory-page .hero,body.directory-page .quick,body.directory-page .community-link,body.directory-page .resource-column,body.directory-page .event-column>section:not(#directory){display:none!important}
body.directory-page .dashboard{display:block;margin-top:0}
body.directory-page #directory{padding:clamp(16px,3vw,26px);margin:0 0 24px}
.directory-back-row{display:flex;justify-content:flex-start;margin:0 0 14px}
body.directory-page #directory-list.directory-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
body.directory-page #directory-list .directory-photo img{width:100%;aspect-ratio:4/5;object-fit:contain}
body.directory-page #directory-status{margin:12px 0;color:#195943;font-weight:700}
@media(max-width:1000px){body.directory-page #directory-list.directory-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){body.directory-page #directory-list.directory-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
