/* Afyonlum40 — three-palette mobile-first design system. No paid assets or fonts. */
:root {font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; -webkit-font-smoothing:antialiased}
html[data-theme="green"] {
 --p1:#051F20;--p2:#0B2B26;--p3:#163832;--p4:#235347;--p5:#8EB69B;--p6:#DAF1DE;
 --theme-page:#051F20;--theme-surface:#0B2B26;--theme-surface-raised:#163832;--theme-text:#DAF1DE;--theme-muted:#93b4a4;--theme-accent:#8EB69B;--theme-accent-soft:#235347;--theme-border:#315c50;--theme-shadow:0 22px 70px #0005;
}
html[data-theme="rose"] {
 --p1:#3E3239;--p2:#6B5560;--p3:#9E8189;--p4:#C7A9A3;--p5:#E8D2C4;--p6:#F7EFE7;
 --theme-page:#291f27;--theme-surface:#3E3239;--theme-surface-raised:#56444f;--theme-text:#F7EFE7;--theme-muted:#d2b7bb;--theme-accent:#E8D2C4;--theme-accent-soft:#6B5560;--theme-border:#806a74;--theme-shadow:0 22px 70px #0005;
}
html[data-theme="blue"] {
 --p1:#06141B;--p2:#11212D;--p3:#253745;--p4:#4A5C6A;--p5:#9BA8AB;--p6:#CCD0CF;
 --theme-page:#06141B;--theme-surface:#11212D;--theme-surface-raised:#253745;--theme-text:#E7EEED;--theme-muted:#a6b8be;--theme-accent:#CCD0CF;--theme-accent-soft:#344958;--theme-border:#425b69;--theme-shadow:0 22px 70px #0006;
}
html[data-theme] { --primary:var(--theme-accent);--primary-dark:var(--theme-surface);--text:var(--theme-text);--text-light:var(--theme-muted);--glass:var(--theme-surface);--glass-heavy:var(--theme-surface-raised);--shadow-sm:var(--theme-shadow); --shadow-md:var(--theme-shadow); --primary-light:var(--theme-accent-soft);color-scheme:dark; background:var(--theme-page) }
html[data-theme] body {color:var(--theme-text);background:var(--theme-page) !important;background-image:radial-gradient(ellipse 55% 25% at -8% -8%,color-mix(in srgb,var(--p5) 20%,transparent),transparent 90%),radial-gradient(ellipse 50% 32% at 110% 18%,color-mix(in srgb,var(--p4) 19%,transparent),transparent 93%) !important; background-attachment:fixed !important;animation:none !important; min-height:100dvh}
html[data-theme] body:before {opacity:0!important;pointer-events:none!important}
html[data-theme] body.has-ays-ui {padding-bottom:calc(108px + env(safe-area-inset-bottom)) !important; padding-top:max(75px,env(safe-area-inset-top)) !important;overflow-x:hidden!important;overflow-y:auto!important}
html[data-theme] :is(.portal-card,.month-card,.plan-item,.result-panel,.stat-item,.photo-card,.settings-panel,.card,.header-section) {background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:color-mix(in srgb,var(--theme-border) 55%,transparent)!important;box-shadow:var(--theme-shadow)!important}
html[data-theme] :is(.portal-card,.month-card,.plan-item,.result-panel,.stat-item,.photo-card,.settings-panel,.card,.header-section) {border-radius:22px!important}
html[data-theme] :is(input,textarea,select) {color:var(--theme-text)!important; background:var(--theme-surface-raised)!important;border:1px solid var(--theme-border)!important;border-radius:14px!important; color-scheme:dark}
html[data-theme] :is(input,textarea,select)::placeholder {color:var(--theme-muted)!important;opacity:.8}
html[data-theme] :is(a,button,input,textarea,select,summary):focus-visible {outline:2px solid var(--theme-accent)!important;outline-offset:3px!important}
html[data-theme] :is(.add-btn,.update-btn,.start-btn,.restart-btn,.btn-confirm,.back-btn,.back-button,.input-group button) {background:var(--theme-accent)!important;color:var(--p1)!important;border:0!important;box-shadow:none!important}
html[data-theme] :is(.add-btn,.update-btn,.start-btn,.restart-btn,.btn-confirm,.back-btn,.back-button,.input-group button):hover {filter:brightness(1.08)}
html[data-theme] :is(.header-section h2,.month-card h3,.portal-card h1,.header-area h1,.stat-value,.live-counter,.time-value) {color:var(--theme-text)!important}
html[data-theme] :is(.plan-item,.month-card,.header-section,.card,.stat-item) :is(p,span,label,small) {color:inherit}
html[data-theme] :is(.month-card,.plan-item,.header-section,.card) {border:1px solid var(--theme-border)!important}
html[data-theme] .plan-item,html[data-theme] .month-card {overflow-wrap:anywhere}
html[data-theme] .month-card:hover {background:var(--theme-surface-raised)!important}
html[data-theme] :is(.comment-section,.photo-card,.stat-box) {border-color:var(--theme-border)!important}
html[data-theme] .back-bar {background:var(--theme-surface-raised)!important;color:var(--theme-text)!important; border-color:var(--theme-border)!important}
html[data-theme] .confirm-box {background:var(--theme-surface)!important;color:var(--theme-text)!important}
html[data-theme] .modal-overlay {z-index:10003}
html[data-theme] .container {max-width:880px!important;margin-inline:auto!important;width:100%!important}
html[data-theme] .header-section {padding:24px!important}
html[data-theme] .card {max-width:min(100%,800px)}
html[data-theme] canvas {max-width:100%;touch-action:manipulation}
/* Fixed theme picker: visual palette swatches */
html[data-theme] .theme-switcher {position:fixed!important;z-index:10001!important;top:max(12px,env(safe-area-inset-top))!important;right:14px!important;left:auto!important;transform:none!important;display:flex!important;align-items:center;gap:10px;padding:8px 11px!important;border-radius:100px!important;background:color-mix(in srgb,var(--theme-surface) 92%,transparent)!important;border:1px solid var(--theme-border)!important;box-shadow:0 12px 32px #0004!important;backdrop-filter:blur(18px);width:auto!important}
.theme-switcher .theme-title {font-size:9px;font-weight:850;letter-spacing:.18em;color:var(--theme-muted)}
.theme-switcher .theme-options {display:flex;gap:6px;align-items:center}
.theme-switcher .theme-option {display:flex;align-items:center;justify-content:center;gap:5px;border:1px solid transparent;border-radius:100px;color:var(--theme-text);background:transparent;padding:5px 7px;min-width:32px;min-height:32px;cursor:pointer;font:650 10px/1 sans-serif}
.theme-switcher .theme-option[aria-pressed="true"] {border-color:var(--theme-border);background:var(--theme-accent-soft)}
.theme-switcher .theme-swatch {display:block;height:15px;width:15px;border-radius:50%;background:var(--swatch);box-shadow:0 0 0 2px #fff2 inset}
.theme-switcher .theme-option-name{display:none}
/* Thumb-friendly bottom navigation */
html[data-theme] .site-nav {position:fixed!important;left:50%!important;right:auto!important;top:auto!important;bottom:max(12px,env(safe-area-inset-bottom))!important;transform:translateX(-50%)!important;display:flex!important;align-items:stretch!important;justify-content:space-between!important;z-index:10000!important;gap:3px!important;width:min(calc(100% - 24px),490px)!important;padding:7px!important;border-radius:23px!important;background:color-mix(in srgb,var(--theme-surface) 94%,transparent)!important;border:1px solid var(--theme-border)!important;box-shadow:0 18px 54px #0007!important;backdrop-filter:blur(22px)}
html[data-theme] .site-nav a {flex:1;min-width:0;min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:7px 2px!important;border-radius:16px!important;background:transparent!important;color:var(--theme-muted)!important;font:700 10px/1.15 Inter,system-ui,sans-serif!important;text-decoration:none!important;white-space:nowrap}
html[data-theme] .site-nav a svg {width:20px;height:20px;flex-shrink:0}
html[data-theme] .site-nav a[aria-current="page"] {color:var(--p1)!important;background:var(--theme-accent)!important}
html[data-theme] .site-nav a:hover:not([aria-current="page"]) {color:var(--theme-text)!important;background:var(--theme-surface-raised)!important}
/* Hide management controls until the server confirms the signed admin session. */
html:not([data-admin="true"]) .input-group,
html:not([data-admin="true"]) .action-btns,
html:not([data-admin="true"]) .comment-actions,
html:not([data-admin="true"]) .edit-indicator {display:none!important}
.plan-admin-link {margin-left:auto;padding:8px 10px;border:1px solid var(--theme-border);border-radius:999px;color:var(--theme-text);background:var(--theme-surface);font:600 11px/1.2 system-ui,sans-serif;text-decoration:none;white-space:nowrap}
.plan-admin-link:focus-visible {outline:2px solid var(--theme-accent);outline-offset:3px}
@media(max-width:370px){.plan-admin-link{padding:7px 8px;font-size:10px}}
@media(min-width:780px){html[data-theme] body.has-ays-ui {padding-top:96px!important}.theme-switcher .theme-option-name{display:inline}.theme-switcher .theme-title{display:inline}}
@media(max-width:400px){html[data-theme] .site-nav a {font-size:9px!important} .theme-switcher .theme-title{display:none} html[data-theme] .header-section{padding:18px!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
