/* Shared presentation controls; keep the standard olive/gold identity. */
body.app-page:not(.admin-mode) .main-content{max-width:var(--content-limit,none);width:100%;min-width:0;justify-self:center}
@media(min-width:1100px){body.app-page:not(.admin-mode) .app-shell .main-content{padding-left:var(--page-space,32px)!important;padding-right:var(--page-space,32px)!important}}
body[data-button-style=pill] :is(.btn,.hw-hero-primary){border-radius:999px!important}
body[data-button-style=square] :is(.btn,.hw-hero-primary){border-radius:3px!important}
body[data-card-style=elevated]:not(.shadows-off) :is(.card,.tweet-card,.forum-topic-card,.course-subdivision-card){box-shadow:0 10px 28px #00000012}
body.login-character-off :is(.normal-login-commander,.normal-login-message){display:none!important}
body:not(.theme-halloween):not(.theme-christmas) :is(.tweet-card,.forum-topic-card,.course-subdivision-card){border-radius:14px;box-shadow:0 5px 18px #23302208}
body:not(.theme-halloween):not(.theme-christmas) .hw-destinations>button{transition:transform .18s,box-shadow .18s}
body:not(.theme-halloween):not(.theme-christmas) .hw-destinations>button:hover{transform:translateY(-3px);box-shadow:0 10px 25px #20302012}
:is(button,a,input,select,textarea):focus-visible{outline:3px solid var(--gold);outline-offset:3px}
/* Atmospheric details stay behind content and never intercept controls. */
body.theme-halloween[data-halloween-palette=ember]{--hw-bg:#1d191a;--hw-panel:#2b2424;--hw-chrome:#221d1e;--hw-lilac:#ffd4a2;--hw-coral:#ffb17d;--hw-border:#574340;--surface-raised:#3b2c2b;--surface-inset:#231e20}
body.theme-halloween[data-halloween-palette=plum]{--hw-bg:#1c1623;--hw-panel:#2c2336;--hw-chrome:#241b2d;--hw-lilac:#e4c5ff;--hw-coral:#ffb3a3;--hw-border:#5a456c;--surface-raised:#40304b;--surface-inset:#231c2b}
body.theme-halloween .hw-hero-moon{position:absolute;right:9%;top:8%;width:clamp(70px,9vw,138px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 35% 32%,#ffdfad,#d6a4c2);box-shadow:0 0 65px #ffcda527;opacity:.22;pointer-events:none;z-index:0}
body.theme-halloween .hw-hero-moon:after{content:'';position:absolute;inset:-5% 27% 15% -8%;border-radius:50%;background:#24212e}
body.theme-halloween[data-hw-moon=off] .hw-hero-moon{display:none}
body.theme-halloween[data-hw-pumpkins=on] :is(.hw-section-heading h2,.community-section-heading h2):before{content:'🎃';display:inline-block;font-size:.7em;vertical-align:middle;margin-right:10px;filter:saturate(.7)}
body.theme-halloween[data-hw-ribbons=on] :is(.hw-destinations>button,.profile-stat,.library-card){box-shadow:inset 0 2px #ffa17c38}
body.theme-halloween[data-hw-ribbons=on] :is(.card-title,.panel-section-head){border-bottom-color:#ffa17c35!important}
body.theme-halloween .hw-season-seal{display:inline-flex;align-items:center;gap:8px;position:absolute;right:24px;bottom:24px;padding:8px 12px;border-radius:999px;border:1px solid #ffa17c38;background:#241d2ed9;color:#ffdfbd;font-size:9px;letter-spacing:.08em;pointer-events:none}
body.theme-halloween .hw-season-seal:before{content:'✦';color:#ffa17c}
body.theme-halloween[data-hw-ribbons=off] .hw-season-seal{display:none}
@media(max-width:600px){body.theme-halloween .hw-hero-moon{top:auto;bottom:160px;right:10%}.hw-season-seal{display:none!important}}
@media(prefers-reduced-motion:reduce){body .hw-destinations>button{transition:none!important;transform:none!important}}
body.motion-off .hw-destinations>button{transition:none!important;transform:none!important}
@media(min-width:1100px){body.app-page:not(.admin-mode):not(.theme-halloween):not(.theme-christmas) .app-shell .main-content{padding-left:var(--page-space,32px)!important;padding-right:var(--page-space,32px)!important}}
.hw-ghost-toggle,.hw-ghost-face{pointer-events:none}
body.theme-halloween .hw-hero-moon{right:42%;top:7%;width:84px;opacity:.3;mask-image:radial-gradient(circle at 30% 30%,transparent 58%,#000 59%)}
body.theme-halloween .hw-hero-moon:after{display:none}
@media(max-width:600px){body.theme-halloween .hw-hero-moon{top:auto;bottom:190px;right:13%;width:65px}}
/* Uploads retain their proportions without stretching adjacent fields. */
body.app-page .app-shell .course-proof-grid{align-items:start;grid-template-columns:repeat(2,minmax(0,1fr))}
body.app-page .app-shell .course-proof-field{min-width:0;max-width:100%;overflow:hidden}
.course-gallery-thumbs{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr));gap:10px;width:100%;min-width:0}
.course-gallery-thumbs img{display:block;width:100%;max-width:100%;height:160px;object-fit:contain;border-radius:9px;background:var(--surface-inset,var(--card))}
body.app-page.theme-halloween{--q10-surface:var(--hw-panel);--q10-surface-alt:var(--surface-inset);--q10-text:var(--hw-text);--q10-text-muted:var(--hw-muted);--q10-line:var(--hw-border);--q10-surface-hover:var(--surface-raised);--q10-accent:var(--hw-lilac);--surface-soft:var(--surface-raised)}
body.app-page.theme-halloween .app-shell .course-application-form .course-proof-field{background:var(--hw-panel)!important;color:var(--hw-text)!important;border-color:var(--hw-border)!important}
body.app-page.theme-halloween .app-shell .course-application-form :is(.course-form-heading h2,.course-proof-field label){color:var(--hw-text)!important}
body.app-page.theme-halloween .app-shell .course-application-form :is(.course-form-heading p,.course-proof-field small){color:var(--hw-muted)!important}
body.app-page.theme-halloween .app-shell .course-form-heading>span{background:var(--surface-raised)!important;color:var(--hw-lilac)!important}
@media(max-width:650px){body.app-page .app-shell .course-proof-grid{grid-template-columns:minmax(0,1fr)}}


.gallery-edit-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:12px;min-width:0}
.gallery-edit-tile{position:relative;min-width:0;background:var(--surface-inset,var(--card));border:1px solid var(--line);border-radius:10px;overflow:hidden}
.gallery-edit-tile img{display:block;width:100%;height:170px;object-fit:contain}
.gallery-edit-tile>span{position:absolute;left:8px;bottom:8px;padding:4px 7px;border-radius:5px;background:#211a2ce6;color:#fff;font-size:10px}
.gallery-edit-tile>button{position:absolute;right:8px;top:8px;width:32px;height:32px;border:1px solid #ffffff55;border-radius:50%;background:#211a2ce6;color:#fff;font-size:22px;cursor:pointer}
/* More breathing room beside the desktop navigation; retain mobile gutters. */
@media(min-width:1100px){body.app-page:not(.admin-mode) .app-shell .layout-body #main-content.main-content{padding-left:calc(var(--page-space,32px) + 16px)!important}}
@media(min-width:851px) and (max-width:1099px){body.app-page:not(.admin-mode) .app-shell .layout-body #main-content.main-content{padding-left:32px!important}}

