/*
Theme Name: Pikabu Clone Ultimate
Author: ChatGPT
Version: 1.4
*/

:root {
  --bg:#eef1f3;
  --card:#ffffff;
  --text:#000000;
}

body.dark {
  --bg:#121212;
  --card:#1e1e1e;
  --text:#e0e0e0;
}

body {
  margin:0;
  font-family:Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

header {
  background:#ff6600;
  color:#fff;
}

.wrap {
  max-width:1200px;
  margin:0 auto;
  padding:0 10px;
}

.topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.toggle {
  cursor:pointer;
  font-size:18px;
}

.grid {
  column-count:3;
  column-gap:15px;
}

@media(max-width:900px){ .grid{column-count:2} }
@media(max-width:600px){ .grid{column-count:1} }

.post-card {
  background:var(--card);
  margin:0 0 15px;
  border-radius:8px;
  overflow:hidden;
  break-inside:avoid;
  padding:12px;
}

.post-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.post-text {
  font-size:18px;
  line-height:1.7;
  word-wrap:break-word;
}
.post-card .image-wrap {
  width: 100%;
  aspect-ratio: 4 / 5; /* пикaбу-стиль */
  overflow: hidden;
  border-radius: 10px;
}

.post-text img {
  max-width: 100%;
  height: auto !important;
  object-fit: contain;
}

.post-card .image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media(max-width:600px){
  .post-text{
    font-size:17px;
    line-height:1.65;
  }
}