:root {
  --fon: #F6F3EC; --list: #FFFFFF; --tekst: #24221F; --tih: #5E594F; --liniya: #E4DED2; --liniya2: #EFEAE0;
  --akcent: #4F5D2F; --akcent-t: #3B4622; --akcent-f: #E6EAD8;
  --ruchn: #6B4A10; --ruchn-f: #F6E7C8; --plokho: #8A2A17; --plokho-f: #FBEDEA; --chern-f: #ECE8E0;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fon); color: var(--tekst); font: 15px/1.5 Manrope, system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--akcent); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
.serif { font-family: Lora, Georgia, serif; }
.tih { color: var(--tih); }
.mal { font-size: 14px; }
.ochmal { font-size: 13px; }

header.shapka { background: var(--list); border-bottom: 1px solid var(--liniya); position: sticky; top: 0; z-index: 5; }
.shapka .vnutri { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.logo { font-family: Lora, Georgia, serif; font-size: 22px; font-weight: 600; text-decoration: none; color: var(--tekst); }
nav.menu { display: flex; flex-wrap: wrap; gap: 2px 18px; }
nav.menu a { color: var(--tih); text-decoration: none; padding: 6px 0; }
nav.menu a.tut { color: var(--tekst); font-weight: 700; border-bottom: 2px solid var(--akcent); }
.pochtalon { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 12px; border-radius: 999px; background: var(--akcent-f); color: var(--akcent-t); }
.pochtalon.net { background: var(--plokho-f); color: var(--plokho); }
.pochtalon i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.raspor { flex: 1 1 0; }

main { max-width: 1200px; margin: 0 auto; padding: 22px 16px 120px; display: flex; flex-direction: column; gap: 22px; }
.kartochka { background: var(--list); border: 1px solid var(--liniya); border-radius: 14px; padding: 16px 18px; }
.ryad { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stolbec { display: flex; flex-direction: column; gap: 10px; }

.knopka { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--akcent); background: var(--list); color: var(--akcent); font-weight: 600; text-decoration: none; cursor: pointer; }
.knopka.glav { background: var(--akcent); color: #fff; }
.knopka.tihaya { border-color: var(--liniya); color: var(--tekst); font-weight: 500; }
.knopka.opasno { border-color: var(--liniya); color: var(--plokho); }
.knopka:disabled { opacity: .5; cursor: default; }
.chip { display: inline-block; font-size: 13px; font-weight: 600; padding: 1px 10px; border-radius: 999px; background: var(--chern-f); color: #4A463F; }
.chip.gotovo { background: var(--akcent-f); color: var(--akcent-t); }
.chip.vyshel { background: var(--akcent); color: #fff; }
.chip.plokho { background: var(--plokho-f); color: var(--plokho); }

.nuzhno { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.nuzhno a { display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--liniya); background: #FFFDF8; border-radius: 12px; padding: 12px 14px; color: var(--tekst); text-decoration: none; }
.nuzhno a.plokho { background: var(--plokho-f); border-color: #F0C9C0; }
.nuzhno .metka { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--tih); }
.nuzhno .plokho .metka { color: var(--plokho); }

.nedelya-shapka { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nedelya-shapka h1 { font-family: Lora, Georgia, serif; font-size: 26px; font-weight: 600; }
.kv { width: 44px; height: 44px; border: 1px solid var(--liniya); background: var(--list); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--tekst); text-decoration: none; font-size: 18px; }
.den { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.den .data { flex: 0 0 80px; padding-top: 10px; }
.den .posty { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.den.segodnya .data b { color: var(--akcent); }
.post-k { display: flex; gap: 14px; background: var(--list); border: 1px solid var(--liniya); border-radius: 14px; padding: 12px; color: var(--tekst); text-decoration: none; }
.post-k.chernovik { border-style: dashed; border-color: #B9B3A7; }
.post-k .mini { width: 56px; height: 84px; flex: 0 0 56px; border-radius: 8px; object-fit: cover; background: var(--akcent-f); display: flex; align-items: center; justify-content: center; font-family: Lora, Georgia, serif; font-size: 20px; color: var(--akcent-t); }
.post-k .chto { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.post-k .zag { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.pusto { display: flex; justify-content: space-between; gap: 10px; border: 1px dashed #CFC8BA; border-radius: 14px; padding: 12px 14px; color: var(--tih); text-decoration: none; font-size: 14px; }
.pusto b { color: var(--akcent); }

.redaktor { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.redaktor .levo { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.redaktor .pravo { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
label.pole { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--tih); }
input[type=text], input[type=date], input[type=time], input[type=password], textarea { border: 1px solid #D9D2C4; border-radius: 10px; padding: 10px 12px; background: #FFFDF8; min-height: 44px; width: 100%; }
textarea.glavnyy { font-family: Lora, Georgia, serif; font-size: 16px; line-height: 1.55; min-height: 220px; resize: vertical; }
.media { display: flex; flex-wrap: wrap; gap: 10px; }
.media .shtuka { position: relative; width: 84px; }
.media .shtuka img, .media .shtuka video, .media .shtuka .zagl { width: 84px; height: 120px; object-fit: cover; border-radius: 8px; display: block; background: var(--chern-f); }
.media .shtuka .nomer { position: absolute; top: 4px; left: 4px; background: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.media .shtuka .upr { display: flex; justify-content: space-between; margin-top: 4px; }
.media .shtuka .upr button { width: 26px; height: 26px; border: 1px solid var(--liniya); background: #fff; border-radius: 6px; cursor: pointer; padding: 0; }
.dobavit { width: 84px; height: 120px; border: 1px dashed #8C877C; border-radius: 8px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; color: #4A463F; cursor: pointer; background: transparent; }
.vkladki { display: flex; flex-wrap: wrap; gap: 6px; }
.vkladki button { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--liniya); background: #fff; font-weight: 600; cursor: pointer; }
.vkladki button.tut { background: var(--tekst); color: #fff; border-color: var(--tekst); }
.prevyu { display: flex; flex-wrap: wrap; gap: 20px; }
.lenta { flex: 0 1 320px; min-width: 0; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.lenta.telegram { background: #EAF0F5; }
.lenta.max { background: #F2F0EB; }
.lenta img, .lenta video { width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; }
.lenta .t { white-space: pre-wrap; font-size: 14px; overflow-wrap: anywhere; }
.zamechanie { background: var(--plokho-f); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.niz { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--liniya); box-shadow: 0 -4px 16px rgba(36,34,31,.06); z-index: 6; padding-bottom: env(safe-area-inset-bottom); }
.niz .vnutri { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.niz .itogo { flex: 1 1 220px; min-width: 0; font-size: 14px; color: #4A463F; }

.zapis { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 16px; text-align: center; }
.mic { width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--akcent); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.mic.idet { background: var(--plokho); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(138,42,23,.15); } }
.taymer { font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 700; }
.ideya { display: flex; flex-direction: column; gap: 8px; }
.ideya textarea { min-height: 90px; font-family: Lora, Georgia, serif; }
audio { width: 100%; max-width: 360px; height: 40px; }
.oshibka-polosa { background: var(--plokho-f); color: var(--plokho); border-radius: 10px; padding: 10px 14px; }
.vhod { max-width: 360px; margin: 12vh auto 0; display: flex; flex-direction: column; gap: 14px; padding: 0 16px; }
.skryto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 600px) {
  header.shapka { position: static; }
  .shapka .vnutri { gap: 6px 14px; }
  .shapka .knopka { min-height: 40px; padding: 0 14px; }
  main { padding-top: 16px; }
}
