:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#173e35;background:#f5f3ec;line-height:1.5;color-scheme:light}

*{box-sizing:border-box}
body{margin:0}
main{max-width:760px;margin:auto;padding:32px 20px 28px}
header{margin-bottom:28px}
.eyebrow{font-size:.75rem;letter-spacing:.14em;font-weight:700;color:#526b5b}
h1{font-size:clamp(1.9rem,6vw,2.65rem);line-height:1.12;margin:14px 0}
header>p{margin:14px 0}
.panel{border:1px solid #dedfd3;background:#fffef9;border-radius:16px;padding:22px;margin-bottom:18px}
h2{font-size:1.15rem;margin:0 0 18px;display:flex;gap:10px;align-items:center}
h2 span{display:inline-grid;place-items:center;flex-shrink:0;width:28px;height:28px;border-radius:50%;background:#e8eee5;font-size:.9rem}
.small{font-size:.85rem;color:#53665e}
.themes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
button{font:inherit;font-size:.88rem;color:inherit;background:#fff;border:1px solid #ccd5cc;border-radius:11px;padding:12px 10px;min-height:100px;cursor:pointer;display:flex;align-items:center;flex-direction:column;gap:10px}
button[aria-pressed=true]{border:2px solid #1b5947;background:#f0f5ed;padding:11px 9px}
button:disabled{opacity:.6;cursor:default}
.swatch{width:38px;height:26px;border:5px solid #234e3f;border-radius:3px;background:#f5e3b7}
.swatch.sochi{border-color:#247d88;background:#f3d69b}
.swatch.card{border-color:#ad573e;background:#f7efdd}
:focus-visible{outline:3px solid #b56620;outline-offset:4px}
#status{font-size:.9rem;min-height:1.5em;margin:18px 0 12px}
#error{background:#fff0ec;color:#8d291f;border-radius:8px;padding:12px}
.preview{background:#eceee6;border-radius:8px;min-height:160px;display:grid;place-items:center;overflow:hidden}
#placeholder{text-align:center;color:#6c7b70}
#result{display:block;max-width:100%;height:auto;max-height:70vh;object-fit:contain;-webkit-touch-callout:default}
#result[hidden],[hidden]{display:none!important}
.actions{display:flex;gap:12px;flex-wrap:wrap}
a.primary,a.secondary{border-radius:9px;padding:12px 16px;text-decoration:none;font-weight:600;min-height:48px}
a.primary{background:#174e3e;color:white}
a.secondary{border:1px solid #9aafa0;color:#174e3e}
@media(max-width:420px){main{padding:22px 12px}
.panel{padding:16px}
.themes{gap:6px}
button{font-size:.79rem;padding:10px 5px}
button[aria-pressed=true]{padding:9px 4px}
.actions{flex-direction:column;text-align:center}
}


.photo-button{display:inline-flex;justify-content:center;min-height:48px;padding:12px 20px;border:0;border-radius:9px;background:#174e3e;color:white;font:inherit;font-size:1rem;cursor:pointer}
