:root { --bg: #0d0d0f; --ink: #f2ede4; --muted: #a39b8c; --gold: #c9a24a; --line: #2a2824; --card: #17161a; --red: #ff6b5b; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
button, select { font: inherit; color: inherit; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); padding: 0 14px; cursor: pointer; }
button:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.top { display: flex; gap: 8px; align-items: center; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top select { max-width: 34vw; }
.icon { width: 44px; padding: 0; }
main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.center { margin: auto; padding: 24px; text-align: center; color: var(--muted); max-width: 32em; }
.sites { display: grid; gap: 12px; padding: 16px; max-width: 560px; width: 100%; margin: 0 auto; }
.sites h1 { font-size: 1.4rem; margin: 8px 0; }
.sites button { text-align: left; padding: 16px; min-height: 64px; }
.sites small { display: block; color: var(--muted); }
.bar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.bar span { flex: 1; color: var(--muted); font-size: 15px; }
.primary { background: var(--gold); color: #111; border-color: var(--gold); font-weight: 700; }
.primary:disabled, .ghost:disabled { opacity: .45; cursor: default; }
.ghost { background: transparent; }
#toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(480px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 12px; background: #f2ede4; color: #111; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); z-index: 10; }
#toast.err { background: var(--red); }
#toast button { margin-top: 8px; background: #111; color: #fff; border: 0; }
/* Кабинет владельца */
body.owner { display: block; overflow: auto; }
.tabs { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.tabs button { flex: 1; }
.tabs button[aria-selected="true"] { background: var(--gold); color: #111; border-color: var(--gold); font-weight: 700; }
.owner-view { display: block; max-width: 760px; margin: 0 auto; padding: 12px 12px 96px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 0 0 12px; list-style: none; }
.card h2 { font-size: 1.1rem; margin: 0; }
.card p { margin: 6px 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; font: inherit; }
.btn.primary { background: var(--gold); color: #111; border-color: var(--gold); font-weight: 700; }
.badge { font-size: 13px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.ok { color: #7fd6a8; border-color: #2f6b4e; } .badge.wait { color: var(--gold); border-color: #6e5316; } .badge.bad { color: var(--red); border-color: #7a3029; }
.feed { padding: 0; margin: 12px 0 0; }
.changes { padding-left: 18px; margin: 8px 0; }
.changes li { margin: 0 0 10px; }
.diff { margin-top: 2px; overflow-wrap: anywhere; }
.diff del { color: #ff9d92; text-decoration: line-through; }
.diff ins { color: #7fd6a8; text-decoration: none; }
.pics { display: flex; gap: 8px; margin-top: 6px; }
.pics figure { margin: 0; width: 140px; }
.pics img, .nopic { width: 140px; height: 100px; object-fit: cover; border-radius: 10px; background: #222; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.pics figcaption { font-size: 13px; color: var(--muted); }
.owner-view select { width: 100%; }
