:root { --ink:#1b2a22; --muted:#55615a; --forest:#1f3d2f; --leaf:#2f6b4a; --iris:#5b4b8a; --iris-soft:#efecf6;
        --paper:#fbfaf7; --card:#fff; --line:#e3dfd6; --green:#1f6a43; --amber:#8a5a00; --red:#9b2c2c; }
[hidden] { display:none !important; }
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; font:18px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background:var(--paper); color:var(--ink);
       padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.wrap { max-width:960px; margin:0 auto; padding:0 20px; }
h1,h2,h3,.answer { font-family:ui-serif, Georgia, "Times New Roman", serif; font-weight:600; letter-spacing:-.01em; }
a { color:var(--iris); }
:focus-visible { outline:3px solid var(--iris); outline-offset:2px; }

.top { background:var(--paper); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
.bar { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:64px; }
.brand { display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--forest); font:600 1.2rem ui-serif, Georgia, serif; }
.langs { display:flex; border:1px solid var(--line); border-radius:999px; padding:3px; background:#fff; }
.langs button { border:0; background:none; color:var(--muted); font:600 .95rem system-ui; min-width:46px; min-height:42px; border-radius:999px; cursor:pointer; }
.langs button.on { background:var(--forest); color:#fff; }

main { padding-top:8px; padding-bottom:24px; }
.hero { display:grid; grid-template-columns:1.15fr 1fr; gap:40px; align-items:center; padding:48px 0 40px; }
.eyebrow { text-transform:uppercase; letter-spacing:.12em; font-size:.8rem; font-weight:700; color:var(--leaf); margin:0 0 12px; }
.hero h2 { font-size:clamp(2rem, 5vw, 3.2rem); line-height:1.1; margin:0 0 16px; color:var(--forest); }
.lead { font-size:1.15rem; color:var(--muted); margin:0; max-width:34em; }
.drop { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:28px 24px; text-align:center; box-shadow:0 1px 2px rgba(27,42,34,.05), 0 12px 32px rgba(27,42,34,.06); }

.camera-btn { display:flex; align-items:center; justify-content:center; gap:12px; padding:22px 12px; border-radius:12px; background:var(--forest); color:#fff;
              font-size:1.3rem; font-weight:600; cursor:pointer; transition:background .15s, transform .15s; }
.camera-btn:hover { background:#173025; }
.camera-btn:active, .primary:active, .secondary:active, .grid button:active { transform:scale(.98); }
.link { display:inline-block; padding:12px; color:var(--iris); font-weight:600; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.hint { color:var(--muted); font-size:.95rem; margin:4px 0 0; }

.panel { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:22px; margin:0 auto 14px; max-width:640px; }
#result, #thumbs, #loading, #error { max-width:640px; margin-left:auto; margin-right:auto; }
.center { text-align:center; }
.big { font-size:1.2rem; font-weight:600; margin:.1em 0 .5em; }
.how { background:var(--iris-soft); border-radius:10px; padding:14px 16px; margin:12px 0; }
.how:empty { display:none; }
.row { display:flex; gap:12px; }
.row > * { flex:1; }
button, .secondary, .primary { font:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.primary { display:block; width:100%; min-height:56px; padding:12px; border:0; border-radius:12px; background:var(--forest); color:#fff; font-size:1.1rem; font-weight:600; text-align:center; margin-bottom:14px; }
.primary:hover { background:#173025; }
.secondary { display:block; width:100%; min-height:56px; padding:12px; border:1.5px solid var(--forest); border-radius:12px; background:#fff; color:var(--forest);
             font-size:1.05rem; font-weight:600; text-align:center; }
.secondary:hover { background:var(--paper); }
.secondary.block { margin-bottom:14px; line-height:30px; }

.thumbs { display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; margin-bottom:14px; }
.thumbs:empty { display:none; }
.thumb { position:relative; }
.thumb img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:10px; display:block; border:1px solid var(--line); }
.thumb .remove { position:absolute; top:-8px; right:-8px; width:44px; height:44px; border-radius:50%; border:3px solid var(--paper); background:var(--forest); color:#fff; }

.answer { border-radius:14px; padding:24px 22px; margin-bottom:14px; font-size:1.7rem; line-height:1.2; border:1px solid var(--line); border-left-width:8px; background:#fff; animation:rise .35s ease both; }
.answer.yes { border-left-color:var(--green); color:var(--green); background:#f0f7f3; }
.answer.light { border-left-color:#c58a1b; color:var(--amber); background:#fbf5e8; }
.answer.no { border-left-color:var(--red); color:var(--red); background:#faeeee; }

.grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.grid button { min-height:64px; padding:10px; border:1.5px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); font-size:1rem; font-weight:600; line-height:1.25; }
.grid button:hover { border-color:var(--leaf); }
.grid button.on { border-color:var(--forest); background:var(--iris-soft); }
details summary { list-style:none; font-weight:600; color:var(--forest); cursor:pointer; min-height:44px; display:flex; align-items:center; }
details summary::after { content:"+"; margin-left:auto; font-size:1.4rem; } details[open] summary::after { content:"–"; }
#notes { padding-left:1.2em; } #notes li { margin:.5em 0; }
.error { color:var(--red); font-weight:600; }
.spinner { width:44px; height:44px; margin:10px auto; border:4px solid var(--line); border-top-color:var(--forest); border-radius:50%; animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
@keyframes rise { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

.band { border-top:1px solid var(--line); padding:40px 0; }
.band h3 { font-size:1.6rem; margin:0 0 20px; color:var(--forest); }
.steps { list-style:none; counter-reset:s; display:grid; grid-template-columns:repeat(3,1fr); gap:24px; padding:0; margin:0; }
.steps li { counter-increment:s; display:flex; flex-direction:column; gap:6px; color:var(--muted); }
.steps li::before { content:counter(s); width:34px; height:34px; border-radius:50%; background:var(--iris-soft); color:var(--iris); font-weight:700; display:grid; place-items:center; }
.steps b { color:var(--ink); font-size:1.1rem; }
.cols { display:grid; grid-template-columns:1fr 1fr; gap:32px; color:var(--muted); }
.cols p { margin:0; }

.foot { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; padding-top:20px; padding-bottom:28px; border-top:1px solid var(--line); color:var(--muted); font-size:.9rem; }

body.working .hero, body.working #about { display:none; }
body.working main { padding-top:20px; }

@media (max-width:720px) {
  body { font-size:19px; }
  .hero { grid-template-columns:1fr; gap:24px; padding:28px 0 24px; }
  .steps, .cols { grid-template-columns:1fr; }
  .band { padding:28px 0; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration:3s; } .answer, .panel { animation:none; } }

.nav { margin-left:auto; } .nav a { color:var(--forest); font-weight:600; text-decoration:none; padding:10px 6px; }
.brand img { display:block; }
@media (max-width:720px) { .nav { display:none; } .brand span { font-size:1.05rem; } }
.notice { border-left:6px solid #c58a1b; background:#fbf5e8; } .notice .row { flex-wrap:wrap; } .notice .primary { margin-bottom:0; display:flex; align-items:center; justify-content:center; cursor:pointer; }
