/* Unified citizen template v50 */
:root{--bg:#100c09;--panel:#211a14;--panel2:#2b2118;--text:#efe2c9;--muted:#aa9b84;--gold:#c39a54;--line:#4a3a2a;--field:#17110d}
*{box-sizing:border-box}html,body{margin:0!important;max-width:100%;overflow-x:hidden}body{background:var(--bg)!important;color:var(--text)!important;font-family:Georgia,"Times New Roman",serif!important;padding-top:64px!important;padding-bottom:76px!important;min-height:100vh!important}a{color:inherit}img,video,iframe{max-width:100%;height:auto}input,select,textarea,button{box-sizing:border-box;max-width:100%}
.global-citizen-header{position:fixed;z-index:9000;left:0;right:0;top:0;height:64px;background:#100c09;border-bottom:1px solid #3d3024;display:flex;align-items:center;justify-content:space-between;padding:0 max(12px,calc((100vw - 1040px)/2 + 12px));color:#efe2c9}.gc-brand{display:flex;align-items:center;gap:8px;text-decoration:none!important;min-width:0}.gc-mark{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#1458b8;color:#fff;border:4px solid #d9c08c;box-shadow:0 0 0 1px #80683e;font:700 15px Arial}.gc-brand strong{display:block;color:#f2e5ce!important;font-size:15px;font-weight:600}.gc-brand small{display:block;color:#b99a61!important;font:8px Arial,sans-serif;margin-top:2px}.gc-tools{display:flex;gap:6px;align-items:center}.gc-tool{width:34px;height:34px;border-radius:50%;border:1px solid #4b3c2d;background:#211a14;color:#eadcc2!important;display:grid;place-items:center;text-decoration:none!important;font-size:15px;padding:0}.gc-tool.js-theme-toggle{cursor:pointer;font-size:15px}
.global-bottom-nav{position:fixed!important;z-index:9000!important;bottom:0!important;left:50%!important;transform:translateX(-50%)!important;width:min(100%,1040px)!important;height:64px!important;background:rgba(18,13,10,.98)!important;border-top:1px solid #4a3929!important;display:grid!important;grid-template-columns:repeat(5,1fr)!important;padding:0!important;margin:0!important}.global-bottom-nav a{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;text-decoration:none!important;color:#918574!important;font:8px Arial,sans-serif!important;background:transparent!important;border:0!important}.global-bottom-nav a>span{font-size:18px!important;color:#b4a182!important}.global-bottom-nav .gc-new>span{width:42px!important;height:42px!important;border-radius:50%!important;background:#b18b4e!important;color:#17110d!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:24px!important;margin-top:-22px!important;border:3px solid #17110d!important}
/* Force every legacy page into the same visual system */
body>.app,.app,.wrap,.container,.page,.content-wrap{background:transparent!important;color:var(--text)!important;box-shadow:none!important;max-width:1040px!important;margin-left:auto!important;margin-right:auto!important}
.hero,.page-hero,.top,.header,.section-hero{background:var(--panel)!important;background-image:none!important;color:var(--text)!important;border:1px solid var(--line)!important;border-radius:2px!important;box-shadow:none!important}.hero:before,.hero:after{box-shadow:none!important}.hero h1,.hero h2,.hero h3,.hero p,.hero .eyebrow,.hero .back{color:var(--text)!important}
.content,main{color:var(--text)}h1,h2,h3,h4,strong,label,.title,.section-title{color:var(--text)!important}p,small,.desc,.meta,.hint,.subtitle{color:var(--muted)!important}
.card,.quick a,.quick .wide,.settings,.notice,.join,.empty,.box,.panel,.item,.service,.service-card,.category,.request-card,.offer-card,.business-card,.form-card,.stat,.tile{background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--line)!important;box-shadow:none!important;border-radius:3px!important}
input:not([type=checkbox]):not([type=radio]),select,textarea{background:var(--field)!important;color:var(--text)!important;border:1px solid #5a4631!important;border-radius:6px!important;box-shadow:none!important}input::placeholder,textarea::placeholder{color:#8f816d!important}option{background:var(--field)!important;color:var(--text)!important}
button,.btn,.button,.primary,.search button,[type=submit]{background:#b18b4e!important;color:#17110d!important;border:1px solid #c6a46a!important;border-radius:6px!important;box-shadow:none!important}button.secondary,.btn.secondary{background:var(--panel2)!important;color:var(--text)!important;border-color:#5a4631!important}
.tabs,.filters,.chips{background:transparent!important}.tab,.chip,.filter{background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--line)!important}.tab.active,.chip.active,.filter.active{background:#b18b4e!important;color:#17110d!important}
hr{border-color:var(--line)!important}.saved,.success{background:#26351f!important;color:#dbe8ce!important;border-color:#536946!important}.error,.danger{background:#3a211d!important;color:#f0d2ca!important;border-color:#71443b!important}
/* Remove legacy bottom bars; common nav is injected */nav.bottom,.bottom-nav,.d4-bottom-nav{display:none!important}
/* LIGHT */
html.light-theme{--bg:#f5efe5;--panel:#fffaf1;--panel2:#f1e6d4;--text:#2b2118;--muted:#786a57;--gold:#9a7136;--line:#d8c6aa;--field:#fffdf8}html.light-theme body{background:var(--bg)!important;color:var(--text)!important}html.light-theme .global-citizen-header{background:#f5efe5!important;border-color:#d6c5aa!important}html.light-theme .gc-brand strong{color:#2b2118!important}html.light-theme .gc-brand small{color:#8a672f!important}html.light-theme .gc-tool{background:#fffaf1!important;border-color:#d4bea0!important;color:#5c4326!important}html.light-theme .global-bottom-nav{background:rgba(250,245,236,.98)!important;border-color:#d4bea0!important}html.light-theme .global-bottom-nav a{color:#756650!important}html.light-theme .global-bottom-nav a>span{color:#806a49!important}html.light-theme .global-bottom-nav .gc-new>span{border-color:#f5efe5!important}
@media(max-width:560px){body{padding-top:58px!important;padding-bottom:68px!important}.global-citizen-header{height:58px;padding:0 8px}.gc-mark{width:31px;height:31px}.gc-brand strong{font-size:12px}.gc-brand small{font-size:7px}.gc-tool{width:31px;height:31px}.global-bottom-nav{height:58px!important}.global-bottom-nav a{font-size:7px!important}.global-bottom-nav a>span{font-size:16px!important}.global-bottom-nav .gc-new>span{width:38px!important;height:38px!important;font-size:21px!important;margin-top:-19px!important}.app,.wrap,.container,.page{width:100%!important;max-width:100%!important}}
@media(max-width:760px){table{display:block;max-width:100%;overflow-x:auto}}

/* === Visual normalization only: legacy citizen pages -> unified municipal theme === */
/* Containers/cards that older pages painted white/blue */
.settings,.choice,.checks,.check,.row,.business,.offer,.event,.req,.result,.stepbox,.supportbox,.manualbox,.scanbox,.loginbox,.codebox,.info,.info-row,.summary,.timeline,.contact,.privacy,.help,.note,.message,.existing,.fallback,.action,.modebtn,.modegrid,.area,.areas,.menu,.footer,.body,.head,.subtop,.detail,.claim,.coupon,.stock,.points,.stats,.stat,.notification-head{
  background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important;box-shadow:none!important;
}
/* Repeating rows / selectable rows */
.choice,.check,.row,.info-row,.action,.modebtn,.area,.business,.offer,.event,.req,.stepbox{
  border:1px solid var(--line)!important;border-radius:10px!important;
}
/* Kill legacy blue fills without touching layout/functionality */
.quick>a,.quick>div,.wide,.featured,.primary,.btn-primary,.savebtn,.submit,.join-btn,.map-btn,.locbtn,.go{
  background:#b18b4e!important;color:#17110d!important;border-color:#c6a46a!important;
}
/* Media placeholders/cards */
.card-media,.detail-image,.photo,.map{background:var(--panel2)!important;border-color:var(--line)!important}
.card-body,.card-footer{background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important}
/* Text inherited from old pale/blue themes */
.title,.section-title,.field>label,.choice,.check,.business,.offer,.event,.req,.info,.info-row,.summary,.timeline,.contact,.action,.modebtn{color:var(--text)!important}
.muted,.small,.smallnote,.tip,.date,.distance,.location,.loc,.times,.resp,.code-label{color:var(--muted)!important}
/* Inputs and search controls everywhere */
.search,.field{background:transparent!important;color:var(--text)!important}
.search input,.search select,.field input:not([type=checkbox]):not([type=radio]),.field select,.field textarea{
  background:var(--field)!important;color:var(--text)!important;border-color:#5a4631!important;
}
/* Checkboxes/radios: keep native behavior, only accent */
input[type=checkbox],input[type=radio]{accent-color:#b18b4e!important}
/* Links/arrows/badges */
.arrow,.back{color:#c9a25e!important}.badge,.tag,.status,.count{border-color:var(--line)!important}
/* Light theme mirrors the exact same component structure */
html.light-theme .settings,html.light-theme .choice,html.light-theme .checks,html.light-theme .check,html.light-theme .row,
html.light-theme .business,html.light-theme .offer,html.light-theme .event,html.light-theme .req,html.light-theme .result,
html.light-theme .stepbox,html.light-theme .supportbox,html.light-theme .manualbox,html.light-theme .scanbox,
html.light-theme .loginbox,html.light-theme .codebox,html.light-theme .info,html.light-theme .info-row,
html.light-theme .summary,html.light-theme .timeline,html.light-theme .contact,html.light-theme .privacy,
html.light-theme .help,html.light-theme .note,html.light-theme .message,html.light-theme .action,html.light-theme .modebtn,
html.light-theme .area,html.light-theme .menu,html.light-theme .card-body,html.light-theme .card-footer{
  background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important;
}

/* ===== REFERENCE APP SHELL — SAME CURVES ON EVERY CITIZEN PAGE ===== */
:root{--ref-blue:#0b57d0;--ref-orange:#f5a23b;--ref-green:#39a75a;--ref-ink:#17355f;--ref-bg:#f5f7fb}
html,body{background:#dfe5eb!important;font-family:Arial,"Noto Sans",sans-serif!important;color:var(--ref-ink)!important}
body{width:min(100%,430px)!important;min-height:100vh!important;margin:0 auto!important;padding:196px 18px 100px!important;background:var(--ref-bg)!important;box-shadow:0 0 32px rgba(20,45,70,.18)!important;position:relative!important;overflow-x:hidden!important}
/* photographic app header */
body::before{content:"";position:absolute;z-index:0;left:0;right:0;top:0;height:230px;background:linear-gradient(180deg,rgba(5,30,70,.05),rgba(5,30,70,.10)),url("../megara-hero.webp") center 45%/cover no-repeat;pointer-events:none}
/* broad white wave rising over the photo */
body::after{content:"";position:absolute;z-index:1;left:-10%;top:158px;width:120%;height:118px;background:var(--ref-bg);border-radius:50% 50% 0 0 / 82% 82% 0 0;transform:rotate(-3.5deg);pointer-events:none}
.global-citizen-header{position:absolute!important;z-index:20!important;top:0!important;left:0!important;right:0!important;height:74px!important;padding:10px 18px!important;background:linear-gradient(180deg,rgba(0,0,0,.48),transparent)!important;border:0!important;color:white!important}.gc-mark{width:38px!important;height:38px!important;background:rgba(255,255,255,.94)!important;border:0!important;box-shadow:0 2px 8px rgba(0,0,0,.16)!important;font-size:20px!important}.gc-brand strong{font:800 18px/1 Arial,sans-serif!important;letter-spacing:1.7px;color:white!important;text-shadow:0 1px 5px #000}.gc-brand small{font:700 8px Arial,sans-serif!important;color:white!important;text-shadow:0 1px 4px #000}.gc-tools{gap:8px!important}.gc-tool{width:34px!important;height:34px!important;border:0!important;background:rgba(255,255,255,.92)!important;color:#17355f!important;box-shadow:0 2px 8px rgba(0,0,0,.16)!important}
body>*:not(.global-citizen-header):not(.global-bottom-nav){position:relative;z-index:3}
body>.app,.app,.wrap,.container,.page,.content-wrap,main{width:100%!important;max-width:100%!important;margin-left:auto!important;margin-right:auto!important;background:transparent!important;color:var(--ref-ink)!important}
.hero,.page-hero,.top,.header,.section-hero{background:transparent!important;border:0!important;box-shadow:none!important;color:var(--ref-ink)!important;padding-left:0!important;padding-right:0!important}.hero h1,.hero h2,.hero h3,.hero p,.hero .eyebrow,.hero .back,h1,h2,h3,h4,strong,label,.title,.section-title{color:var(--ref-ink)!important}.hero h1,h1{font-family:Arial,sans-serif!important;font-weight:900!important}.hero p,p,small,.desc,.meta,.hint,.subtitle{color:#718399!important}
.card,.quick a,.quick .wide,.settings,.notice,.join,.empty,.box,.panel,.item,.service,.service-card,.category,.request-card,.offer-card,.business-card,.form-card,.stat,.tile,.choice,.check,.row,.business,.offer,.event,.req,.result,.stepbox,.supportbox,.manualbox,.scanbox,.loginbox,.codebox,.info,.info-row,.summary,.timeline,.contact,.privacy,.help,.note,.message,.action,.modebtn,.area{background:white!important;color:var(--ref-ink)!important;border:0!important;border-radius:18px!important;box-shadow:0 5px 16px rgba(35,70,110,.09)!important}
input:not([type=checkbox]):not([type=radio]),select,textarea{background:white!important;color:#17355f!important;border:1px solid #dfe6ef!important;border-radius:14px!important;box-shadow:none!important}button,.btn,.button,.primary,.search button,[type=submit]{background:var(--ref-blue)!important;color:white!important;border:0!important;border-radius:14px!important;box-shadow:0 4px 10px rgba(11,87,208,.18)!important}.tab,.chip,.filter{background:white!important;color:#60748d!important;border:1px solid #dfe6ef!important;border-radius:16px!important}.tab.active,.chip.active,.filter.active{background:var(--ref-blue)!important;color:white!important;border-color:var(--ref-blue)!important}
/* Same two curved hills at bottom */
.global-bottom-nav{position:fixed!important;z-index:9000!important;left:50%!important;bottom:8px!important;transform:translateX(-50%)!important;width:min(calc(100% - 20px),410px)!important;height:78px!important;border:0!important;border-radius:0 0 28px 28px!important;background:transparent!important;overflow:visible!important;display:grid!important;grid-template-columns:repeat(5,1fr)!important;padding:0 8px!important;filter:drop-shadow(0 7px 12px rgba(26,61,90,.18))}.global-bottom-nav::before,.global-bottom-nav::after{content:"";position:absolute;z-index:-1;bottom:0;width:53%;height:72px}.global-bottom-nav::before{left:0;background:var(--ref-orange);border-radius:42% 62% 0 28px / 30px 38px 0 28px;transform:skewY(-2deg)}.global-bottom-nav::after{right:0;background:var(--ref-green);border-radius:62% 42% 28px 0 / 38px 30px 28px 0;transform:skewY(2deg)}.global-bottom-nav a{position:relative!important;z-index:2!important;color:white!important;font:700 9px Arial,sans-serif!important;gap:4px!important;padding-top:13px!important;background:transparent!important}.global-bottom-nav a>span{font-size:22px!important;color:white!important}.global-bottom-nav .gc-new{padding-top:0!important}.global-bottom-nav .gc-new>span{position:absolute!important;left:50%!important;top:-18px!important;transform:translateX(-50%)!important;width:58px!important;height:58px!important;margin:0!important;border-radius:50%!important;background:var(--ref-blue)!important;color:white!important;border:5px solid var(--ref-bg)!important;box-shadow:0 5px 13px rgba(11,87,208,.3)!important;font:300 35px/1 Arial,sans-serif!important}.global-bottom-nav .gc-new b{display:none!important}
html.light-theme,html.dark-theme{--bg:var(--ref-bg)!important;--panel:white!important;--panel2:#edf4ff!important;--text:var(--ref-ink)!important;--muted:#718399!important;--line:#dfe6ef!important;--field:white!important}html.light-theme body,html.dark-theme body{background:var(--ref-bg)!important;color:var(--ref-ink)!important}html.light-theme .global-citizen-header,html.dark-theme .global-citizen-header{background:linear-gradient(180deg,rgba(0,0,0,.48),transparent)!important;border:0!important}
@media(min-width:700px){body{margin-top:16px!important;margin-bottom:16px!important;border-radius:30px!important;min-height:calc(100vh - 32px)!important}body::before{border-radius:30px 30px 0 0}.global-citizen-header{border-radius:30px 30px 0 0!important}}

/* ===== MEGARA MAGAZINE TEMPLATE v100 ===== */
:root{--mag-cream:#f8f0e3;--mag-navy:#071f43;--mag-gold:#c99449;--mag-line:#e0cfb5}
html,body{background:#ddd4c7!important}body{font-family:Georgia,"Times New Roman",serif!important;color:var(--mag-navy)!important;padding-top:76px!important;padding-bottom:76px!important;max-width:600px!important;margin:0 auto!important;background:var(--mag-cream)!important;box-shadow:0 0 30px #0002!important}
.global-citizen-header{height:76px!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(100%,600px)!important;background:linear-gradient(180deg,rgba(4,18,36,.93),rgba(7,31,67,.93))!important;border:0!important;padding:0 16px!important}.gc-mark{background:transparent!important;border:1px solid #e8c890!important;color:#e8c890!important}.gc-brand strong{font-family:Georgia,serif!important;color:white!important;letter-spacing:1px}.gc-brand small{color:#e8c890!important}.gc-tool{background:transparent!important;border:1px solid rgba(255,255,255,.45)!important;color:white!important}
body>.app,.app,.wrap,.container,.page,.content-wrap{background:var(--mag-cream)!important;color:var(--mag-navy)!important;max-width:600px!important}.hero,.page-hero,.top,.header,.section-hero{position:relative!important;background:linear-gradient(rgba(5,24,49,.28),rgba(5,24,49,.78)),url('../assets/megara-hero.webp') center/cover!important;color:white!important;border:0!important;border-radius:0 0 42px 42px!important;padding:34px 22px!important;min-height:170px!important}.hero h1,.hero h2,.hero h3,.hero p,.hero a,.hero .back{color:white!important;text-shadow:0 1px 5px #0005}.content,main{padding:18px!important;color:var(--mag-navy)!important}h1,h2,h3,h4,strong,label,.title,.section-title{color:var(--mag-navy)!important}p,small,.desc,.meta,.hint,.subtitle{color:#6f665a!important}.card,.settings,.notice,.box,.panel,.item,.service,.service-card,.category,.request-card,.offer-card,.business-card,.form-card,.stat,.tile,.choice,.row,.business,.offer,.event,.req,.result,.stepbox,.supportbox,.info,.summary,.contact,.note,.message,.action,.area{background:#fffaf2!important;color:var(--mag-navy)!important;border:1px solid var(--mag-line)!important;border-radius:20px!important;box-shadow:0 5px 16px rgba(61,43,19,.08)!important}input:not([type=checkbox]):not([type=radio]),select,textarea{background:white!important;color:var(--mag-navy)!important;border:1px solid var(--mag-line)!important;border-radius:18px!important}button,.btn,.button,.primary,.search button,[type=submit]{background:linear-gradient(#dfb775,#c99449)!important;color:#20160b!important;border:0!important;border-radius:24px!important;font-weight:700!important}.global-bottom-nav{left:50%!important;transform:translateX(-50%)!important;width:min(100%,600px)!important;height:68px!important;background:rgba(250,245,237,.98)!important;border-top:1px solid var(--mag-line)!important}.global-bottom-nav a{color:#565049!important;font-family:Arial,sans-serif!important}.global-bottom-nav a>span{color:var(--mag-navy)!important}.global-bottom-nav .gc-new>span{background:var(--mag-gold)!important;color:white!important;border-color:var(--mag-cream)!important}
