html[data-theme="light"]{color-scheme:light;--bg:#f8f6f2;--panel:#fff;--line:#e0dcd3;--text:#1c1d20;--muted:#57585d}
html[data-theme="dark"]{color-scheme:dark}
html[data-theme="light"] body header{background:#f8f6f2f5}
html[data-theme="light"] body input,html[data-theme="light"] body select,html[data-theme="light"] body textarea{color-scheme:light}
html[data-theme="light"] body dialog{background:var(--bg);color:var(--text)}
html[data-theme="light"] .event-list,html[data-theme="light"] .club-card,html[data-theme="light"] .demo{background:var(--panel);color:var(--text)}
html[data-theme="light"] .event-card:hover,html[data-theme="light"] .event-card.selected{background:#f1efe8}
html[data-theme="light"] .badge{color:#416647}
html[data-theme="light"] .badge.audience{color:#846019}
.theme-switch{flex:none;min-width:44px;min-height:44px;padding:8px;font-size:20px;line-height:1}
html[data-theme="light"] .club-callout{background:#eeeee7;border-color:var(--line);color:var(--text)}
html[data-theme="light"] .detail-banner{background:linear-gradient(130deg,#e7ede3,#f3f5ef);border-color:var(--line)}
html[data-theme="light"] .detail-meta{color:var(--muted)}

.site-notice{margin:16px auto;padding:16px 22px;max-width:1200px;width:calc(100% - 40px);box-sizing:border-box;border:1px solid var(--line,#777);border-left:4px solid var(--accent,#ff5b16);background:var(--panel,#202225);color:var(--text,#eee);overflow-wrap:anywhere}.site-notice p{margin:8px 0 0;white-space:pre-wrap;line-height:1.6}.site-notice[data-level=warning]{border-left-color:#d69216}

button.theme-switch{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border-radius:50%;color:var(--muted,var(--text));border:1px solid var(--line);background:var(--panel)}.theme-switch:hover{color:var(--text);border-color:var(--accent)}.theme-switch svg{width:17px;height:17px;flex:none}.theme-switch .icon-sun{display:none}html[data-theme=light] .theme-switch .icon-moon{display:none}html[data-theme=light] .theme-switch .icon-sun{display:block}

.garage-login-dialog{position:fixed;inset:0;margin:auto;width:min(480px,calc(100% - 32px));max-height:90dvh;overflow:auto;box-sizing:border-box;padding:32px;background:var(--panel,#202226);color:var(--text,#eee);border:1px solid var(--line,#555);border-radius:6px}.garage-login-dialog::backdrop{background:#000b;backdrop-filter:blur(4px)}.garage-login-dialog h2{margin:0 28px 18px 0;font-size:28px}.garage-login-dialog p{font-size:13px;line-height:1.6}.garage-login-dialog form{display:grid;gap:16px}.garage-login-dialog label{display:grid;gap:6px;font-size:12px;color:var(--muted,#aaa)}.garage-login-dialog input,.garage-login-dialog textarea{box-sizing:border-box;width:100%;padding:12px;background:var(--bg,#161719);border:1px solid var(--line,#555);border-radius:3px;color:var(--text,#eee);font:inherit}.garage-login-dialog .button{border:1px solid var(--line,#555);padding:10px 14px;background:var(--panel,#202226);color:var(--text,#eee);font:600 12px Inter,sans-serif;cursor:pointer}.garage-login-dialog .primary{background:var(--accent,#ff5a1f);color:#161719;border-color:var(--accent,#ff5a1f)}.garage-login-close{position:absolute;right:16px;top:12px;background:none;border:0;color:inherit;font-size:26px;cursor:pointer}.garage-login-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}

/* Keep editable controls readable without Safari's focus zoom. Pinch zoom remains available. */
@media(max-width:700px){
 html body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),html body select,html body textarea{font-size:16px!important;min-width:0;max-width:100%;box-sizing:border-box}
 html body dialog{box-sizing:border-box;max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
 html body :is(#editor,#home-form-editor,.garage-login-dialog){padding:20px}
 :is(#editor,#home-form-editor) :is(form,label,details,.photo-template,.photo-upload-grid){min-width:0;overflow-wrap:anywhere}
 :is(#fields,#home-form-fields){grid-template-columns:minmax(0,1fr)}
 :is(#editor,#home-form-editor) .editor-save-actions{position:sticky;bottom:-20px;z-index:2;background:var(--bg);border-top:1px solid var(--line);padding:12px 0 calc(12px + env(safe-area-inset-bottom,0px));margin-top:16px}
 :is(#editor,#home-form-editor) .editor-save-actions>.button{width:100%;min-height:44px;margin:0}
 html body .footer-links{min-width:0;flex-wrap:wrap}
}
