/* Layout adapters only. All visual tokens and controls come from legacy.css. */
:root { color-scheme: light; --safe-top: 0px; --safe-bottom: 0px; --safe-left: 0px; --safe-right: 0px; }
html { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { height: auto; min-height: var(--tg-viewport-stable-height, 100dvh); overflow: visible; }
button, input, textarea { font-family: "Montserrat", sans-serif; }
button, a { touch-action: manipulation; }
button { user-select: none; -webkit-user-select: none; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.app-shell { position: relative; z-index: 1; max-width: 440px; margin: auto; padding: calc(24px + max(env(safe-area-inset-top, 0px), var(--safe-top))) calc(20px + max(env(safe-area-inset-right, 0px), var(--safe-right))) calc(24px + max(env(safe-area-inset-bottom, 0px), var(--safe-bottom))) calc(20px + max(env(safe-area-inset-left, 0px), var(--safe-left))); }
main { min-width: 0; min-height: calc(var(--tg-viewport-stable-height, 100dvh) - 48px - var(--safe-top) - var(--safe-bottom)); display: flex; flex-direction: column; justify-content: center; outline: none !important; }
.checklist-menu { display: grid; gap: 18px; }
.menu-card { text-align: center; }
.menu-card .w-title { margin-bottom: 10px; }
.question-view { padding-top: 50px; padding-bottom: 100px; }
.question-view .card { margin-top: 12px; }
.prog-wrap { padding-top: max(env(safe-area-inset-top, 0px), var(--safe-top)); }
.prog-fill { width: 100%; transform-origin: left; transition: transform .24s var(--ease-out); }
.prog-fill::after { display: none; }
.back-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.back, .plain-button { border: 0; background: transparent; color: var(--text-2); font-size: 12px; font-weight: 500; min-height: 42px; padding: 10px 0; cursor: pointer; }
.back { display: inline-flex; align-items: center; gap: 6px; }
.back svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.save-status { font-size: 10px; color: var(--text-2); text-align: right; }
.q-title { margin-top: 0; }
.choices .chc-btn { font-family: "Montserrat", sans-serif; }
.txt-field { display: block; font-size: 16px; }
.photo-zone { font: inherit; color: var(--text-1); padding: 16px; }
.photo-zone.has-photo { padding: 0; }
.photo-zone img { object-fit: cover; }
.skip { width: 100%; padding: 14px 0 0; min-height: 44px; margin-top: 8px; border: 0; background: transparent; color: var(--text-2); font-size: 13px; cursor: pointer; }
.skip.selected { color: var(--ok); }
.helper { font-size: 11px; color: var(--text-2); line-height: 1.65; margin-top: 12px; }
.actions { margin-top: 18px; text-align: center; }
.actions > .plain-button { display: block; width: 100%; margin-top: 7px; }
.bottom { padding-bottom: calc(14px + max(env(safe-area-inset-bottom, 0px), var(--safe-bottom))); }
body.native-cta .bottom, body.native-cta .actions > .cta { display: none; }
body.native-cta .question-view { padding-bottom: 20px; }
body.native-cta .question-view .actions { margin-top: 0; }
.inline-error { border: 1px solid var(--err-border); border-radius: var(--r-sm); padding: 14px; background: var(--err-soft); font-size: 12px; line-height: 1.65; color: var(--text-1); margin-top: 14px; }
.completion-view { display: flex; flex-direction: column; align-items: center; text-align: center; }
.completion-view .actions { width: 100%; }
.d-title { line-height: 1.3; }
.d-desc { margin-top: 0; }
.d-meta { gap: 7px; }
.result-view { padding-top: 8px; }
.result-view .card { margin-top: 12px; }
.result-list { margin-top: 20px; }
.result-row { padding: 14px 0; border-bottom: 1px solid rgba(15,23,42,.06); }
.result-row dt { font-size: 12px; color: var(--text-2); line-height: 1.65; }
.result-row dd { font-size: 13px; margin-top: 5px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.result-row img { max-width: 100%; max-height: 260px; display: block; border-radius: var(--r-md); margin-top: 10px; }
.loading-state { font-size: 13px; color: var(--text-2); text-align: center; }
.notice { position: fixed; z-index: 110; left: 50%; bottom: calc(20px + max(env(safe-area-inset-bottom, 0px), var(--safe-bottom))); transform: translateX(-50%); width: min(88vw,400px); border-radius: var(--r-md); padding: 15px 18px; background: var(--glass-strong); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); border: 1px solid var(--glass-border); color: var(--text-2); font-size: 12px; line-height: 1.65; box-shadow: 0 4px 28px var(--glass-shadow); }
/* Preserve the original completion element; soften its entrance without changing its look. */
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } .prog-fill { transition: none; } }

/* Small details within the original Montserrat / glass / blue-and-green palette. */
.menu-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.menu-stage { display: inline-flex; align-items: center; gap: 6px; color: #065F46; font-size: 12px; font-weight: 600; }
.menu-stage svg { width: 16px; height: 16px; stroke: var(--ok); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: var(--r-sm); border: 1px solid var(--ok-border); color: #065F46; background: var(--ok-soft); font-size: 12px; font-weight: 500; white-space: nowrap; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.menu-meta { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--text-2); font-size: 12px; font-weight: 400; line-height: 1.6; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.meta-divider { color: var(--text-3); }
