/* ═════════ «Семья» v4.1: оформление строго по макетам — тёмная тема всегда ═════════ */
:root, :root[data-x] {
  --bg: #15171c; --card: #1f2229; --text: #f1efe9; --hint: #9a9ca6; --line: #2c2f38;
  --accent: #5f84a0; --gold: #f6c933; --ok: #4cd471; --warn: #f0a05a; --pink: #c46a8a;
  --grad: linear-gradient(135deg, #1d3b5c 0%, #3b2a5e 55%, #6b3354 100%);
  --shadow: none; --r: 16px; --field: #262931;
}
html, body { background: #15171c; color-scheme: dark; }
body { font-family: Inter, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; color: var(--text); font-size: 14.5px; }
input, select, textarea { background: var(--field) !important; border: 1px solid transparent !important; color: var(--text); border-radius: 12px !important; }
input:focus, textarea:focus, select:focus { border-color: var(--accent) !important; }
input::placeholder, textarea::placeholder { color: var(--hint); }

/* шапки разделов: как в макете — крупный заголовок на тёмном фоне */
.hero { background: transparent !important; color: var(--text); padding: 18px 16px 4px; border-radius: 0; overflow: visible; }
.hero::after { display: none; }
.hero h1 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.hero .sub { color: var(--hint); font-size: 13.5px; }
.hero .back { color: var(--text); }
.pill { background: #22252c; color: var(--text); backdrop-filter: none; font-weight: 700; }
.wrap { margin-top: 12px; }

.card, .post { background: var(--card); border-radius: 14px; box-shadow: none; }
.post.event { background: #1d2420; }
.btn { background: var(--accent); border-radius: 12px; font-weight: 700; }
.btn.ghost { background: #2a2d35; color: var(--text); }
.btn.ok { background: #2c8a5a; }
.btn.coin-btn, .coin-btn { background: linear-gradient(#f8d454, #e0a91b) !important; color: #2b1d00 !important; }
.badge { background: #2a2d35; }
.b-done { background: #3a3324; color: #f6c933; } .b-approved { background: #213528; color: #9be29b; }
.row { border-bottom-color: var(--line); }
.chip, .lim { background: #2a2d35; }
.toast { background: #2a2d35; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.sheet { background: var(--card) !important; color: var(--text); }
.ava { background: linear-gradient(145deg, #5a8fc4, #3b5f86); }
.bar { background: linear-gradient(90deg, #5f84a0, #8fb8d8); }
.pod .pts { color: var(--gold); }

/* нижнее меню — как в макете: тёмная плашка, нарисованные иконки, активная вкладка золотая */
.tabs { background: #1c1e24; border-top: 1px solid #2a2d35; box-shadow: none; border-radius: 0; padding: 9px 4px calc(10px + var(--sab)); }
.tabs button { color: #9a9ca6; font-size: 11.5px; font-weight: 600; gap: 3px; }
.tabs button svg { width: 24px; height: 24px; }
.tabs button span { filter: none; opacity: 1; font-size: 0; display: inline-flex; }
.tabs button.on { color: #f6c933; font-weight: 700; }
.tabs button.on span { transform: none; }
.tabs .dot { border-color: #1c1e24; }

/* ── казино: как в макете ── */
.cas-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 16px 0; }
.cas-head h1 { margin: 0; font-size: 26px; font-weight: 800; }
.bal-pill { display: flex; align-items: center; gap: 6px; background: #22252c; border-radius: 999px; padding: 6px 12px; font-weight: 800; }
.coin-ic { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff0a8, #f6c933 45%, #c88a0c); flex: none; display: inline-block; }
.rl-card { margin: 14px 16px 0; border-radius: 18px; background: linear-gradient(150deg, #3a2a12, #23190b); padding: 16px; display: flex; gap: 14px; align-items: center;
  box-shadow: inset 0 0 0 1px #5a4520; position: relative; overflow: hidden; }
.rl-wheel { width: 108px; height: 108px; flex: none; position: relative; }
.rl-wheel .disc { position: absolute; inset: 0; border-radius: 50%; border: 4px solid #f6c933; transition: transform 5s cubic-bezier(.12,.75,.15,1); }
.rl-wheel .hub { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px; border-radius: 50%; background: #f6c933; box-shadow: 0 0 0 3px #23190b; }
.rl-wheel .pin { position: absolute; left: 50%; top: -6px; margin-left: -8px; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 14px solid #fff; z-index: 2; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.rl-body { flex: 1; min-width: 0; }
.rl-title { font-size: 18px; font-weight: 800; }
.rl-desc { color: #d9c9a8; font-size: 12px; margin-top: 4px; line-height: 1.35; }
.gold-btn { margin-top: 10px; width: 100%; height: 42px; border: 0; border-radius: 12px; background: linear-gradient(#f8d454, #e0a91b); color: #2b1d00; font: 800 15px Inter, sans-serif; }
.gold-btn:disabled { filter: grayscale(.8); opacity: .55; }
.rl-prize { position: absolute; inset: 0; background: rgba(20,14,4,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; animation: wkin .35s ease-out; }
.rl-prize b { font-size: 34px; color: #f6c933; } .rl-prize span { color: #d9c9a8; font-size: 13px; }
.rl-more { display: block; margin: 8px 16px 0; color: var(--hint); font-size: 12px; background: none; border: 0; padding: 4px 0; }
.sec-row { margin: 18px 16px 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sec-row b { font-size: 18px; font-weight: 800; } .sec-row span { color: var(--hint); font-size: 12px; }
.pk-card { margin: 0 16px 10px; border-radius: 18px; background: radial-gradient(ellipse at 50% 0%, #1f6b45, #0f3a26); padding: 14px; color: #fff; box-shadow: inset 0 0 0 1px #2c8a5a; }
.pk-card.wait { background: var(--card); box-shadow: none; }
.pk-card .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pk-card .nm { font-weight: 800; font-size: 16px; } .pk-card .bl { font-size: 12px; color: #b5e0c6; margin-top: 2px; }
.pk-card.wait .bl { color: var(--hint); }
.pk-card .state { background: rgba(0,0,0,.3); border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pk-card .seats { display: flex; gap: 6px; margin-top: 12px; }
.pk-card .seat { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; overflow: hidden; background: #3a6a52; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.pk-card .seat img { width: 100%; height: 100%; object-fit: cover; }
.pk-card .seat.free { border: 2px dashed #8fd1ab; background: transparent; }
.pk-card .go { margin-top: 12px; width: 100%; height: 42px; border: 0; border-radius: 12px; background: #f1efe9; color: #0f3a26; font: 800 15px Inter, sans-serif; }
.pk-card.wait .row2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pk-card.wait .sit { height: 38px; padding: 0 14px; border: 0; border-radius: 12px; background: #2c8a5a; color: #fff; font: 700 14px Inter, sans-serif; flex: none; }
.pk-card .watch { margin-top: 8px; width: 100%; height: 34px; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; font-weight: 700; font-size: 13px; }
.new-table { margin: 10px 16px 0; width: calc(100% - 32px); height: 44px; border: 1px dashed #4a4e59; border-radius: 14px; background: transparent; color: #c9c7c0; font: 700 14px Inter, sans-serif; }

/* ── профиль: как в макете ── */
.prof-cover { height: 150px; }
.cover-chip { position: absolute; right: 12px; top: 12px; z-index: 2; background: rgba(0,0,0,.35); border-radius: 10px; padding: 4px 9px; font-size: 11px; font-weight: 600; color: #fff; }
.prof-head { margin-top: -52px; align-items: flex-end; }
.prof-head .ava.xl { width: 100px; height: 100px; border: 4px solid #f6c933; box-shadow: 0 0 0 4px #15171c; }
.prof-head .frm .ava.xl { border-color: #15171c; }
.prof-side { padding-bottom: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.prof-side .pbadges { margin-top: 0; }
.prof-id { padding: 10px 16px 0; } .prof-id .nm-big { font-size: 24px; }
.prof-id .st { color: #c9c7c0; }
.pmeta { color: var(--hint); font-size: 12px; margin-top: 4px; }
.pcount { margin: 14px 16px 0; border-radius: 14px; background: #1f2229; }
.pact { margin: 10px 16px 14px; }
.pact .btn { height: 40px; border-radius: 12px; }
.pact .more { flex: 0 0 44px !important; background: #2a2d35; color: var(--text); }
.prof-page .card { margin: 0 16px 14px; border-radius: 14px; }
.pgrid { gap: 4px; border-radius: 0; } .pgrid img:first-child { border-radius: 10px 0 0 10px; } .pgrid img:nth-child(3) { border-radius: 0 10px 10px 0; }
.pgrid img:nth-child(n+4) { border-radius: 0; }
.gtile { width: 52px; height: 52px; border-radius: 14px; background: #2f2a3d; font-size: 28px; }
.gtile:nth-child(3n+2) { background: #3a3324; } .gtile:nth-child(3n) { background: #223238; }
.ach-mini span { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
  background: #3a3324; box-shadow: inset 0 0 0 2px #f6c933; }
.ach-mini span:nth-child(5n+2) { background: #2c3a2c; box-shadow: inset 0 0 0 2px #4cd471; }
.ach-mini span:nth-child(5n+3) { background: #2a3045; box-shadow: inset 0 0 0 2px #7a9cf0; }
.ach-mini span:nth-child(5n+4) { background: #3d2a2a; box-shadow: inset 0 0 0 2px #f07a7a; }
.ach-mini span:nth-child(5n) { background: #2f2a3d; box-shadow: inset 0 0 0 2px #c08bf0; }
.fam-plain { margin: 0 16px 14px; } .fam-plain .ttl { font-weight: 700; margin-bottom: 8px; }
.fam-plain .fam-row { justify-content: space-between; }
.wall-title { margin: 16px 16px 8px; font-weight: 700; }
.wall-in { margin: 0 16px 8px; background: #1f2229; border-radius: 14px; padding: 4px; display: flex; gap: 6px; }
.wall-in input { margin: 0 !important; background: transparent !important; }

/* ── покер: шапка как в макете ── */
.pk2 { background: radial-gradient(ellipse at 50% 35%, #1b2a24 0%, #0c1110 70%); }
.pk2-top .bal-pill { font-size: 13px; }
.pk2-wallet { display: none; }

/* ── Probox и папа Аджика ── */
.pbx { margin: 0 16px 14px; border-radius: 16px; padding: 14px; background: linear-gradient(135deg, #2a2d35, #1f2229); position: relative; overflow: hidden; cursor: pointer; }
.pbx .k { color: #f0a05a; font-size: 12px; font-weight: 800; }
.pbx .j { margin-top: 6px; font-size: 15px; line-height: 1.4; font-weight: 600; }
.pbx .n { margin-top: 8px; color: var(--hint); font-size: 12px; }
.pbx svg { position: absolute; right: -6px; bottom: -4px; opacity: .14; }
.ach-mini span.sub { width: auto; height: auto; border-radius: 0; background: none !important; box-shadow: none !important; font-size: 13px; display: inline; }

/* 4.1.1: поле стены и липкое меню профиля */
.wall-in { padding: 6px 6px 6px 14px; align-items: center; }
.wall-in .cm-form { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0; margin: 0; min-width: 0; }
.wall-in .cm-form input { flex: 1; min-width: 0; width: auto; padding: 10px 0 !important; border: 0 !important; }
.wall-in .cm-form .btn { flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border-radius: 12px; background: var(--gold); color: #1a1a1a; font-size: 16px; margin: 0; }
.cab-menu { top: 0; margin: 0 0 12px; padding: 8px 12px; border-radius: 0; background: var(--bg); box-shadow: 0 1px 0 var(--line); gap: 4px; }
.cab-menu button { background: var(--card); color: var(--hint); border-radius: 12px; padding: 8px 2px; }
.cab-menu button.on { background: #2b2f39; color: var(--gold); }

/* 4.1.2: итоги недели строго по макету */
.wk { background: radial-gradient(ellipse at 50% 20%, #4a2a6e 0%, #241538 55%, #120b1d 100%) !important; font-family: Inter, system-ui, sans-serif; }
.wk-date { position: relative; text-align: center; font-size: 12px; font-weight: 700; color: #cdb8ea; letter-spacing: .5px; margin-top: 10px; }
.wk-slide { justify-content: flex-start !important; padding-top: 44px; gap: 6px !important; }
.wk-kick.gold { color: #f6c933; font-size: 15px; }
.wk-h { font-size: 36px !important; line-height: 1.05 !important; margin-bottom: 10px; }
.wk-ava.big { width: 112px !important; height: 112px !important; margin-top: 14px; }
.wk-name { margin-top: 4px; }
.wk-val { font-size: 14px; }
.wk-prize { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px !important; margin-top: 4px; }
.wk-post { margin-top: 18px !important; padding: 14px !important; border-radius: 18px !important; max-width: none !important; }
.wk-post img { height: 150px; max-height: none !important; border-radius: 12px !important; margin-bottom: 0 !important; }
.wk-post .t { margin-top: 10px; font-size: 15px; line-height: 1.35; }
.wk-post .m { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; font-weight: 700; color: #cdb8ea; }
.wk-next { margin-top: auto; padding-top: 14px; font-size: 13px; color: #cdb8ea; text-wrap: balance; }

/* 4.2.1: фото на стене и компактный композер */
.wall-cam { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: #2b2f39; color: #c9c7c0; display: flex; align-items: center; justify-content: center; cursor: pointer; margin: 0 !important; }
.wall-prev { margin: 0 16px 10px; display: flex; align-items: center; gap: 10px; }
.wall-prev img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.composer .grow textarea { margin: 0; }
