:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #111111;
  --muted: rgba(17, 17, 17, 0.62);
  --border: rgba(17, 17, 17, 0.12);
  --shadow: 0 10px 30px rgba(17, 17, 17, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 20px 42px;
  display: grid;
  gap: 26px;
}

.top {
  position: relative;
  padding: 0;
}

.brand {
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.adminLink {
  position: absolute;
  top: -6px;
  right: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  opacity: 0.38;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.adminLink:hover {
  opacity: 1;
  background: rgba(17, 17, 17, 0.06);
}

.hidden {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
  white-space: nowrap;
}

.btn:hover {
  background: rgba(17, 17, 17, 0.05);
}

.btn:active {
  transform: translateY(1px);
}

.btnGhost {
  background: transparent;
}

.btnGhost:hover {
  background: rgba(17, 17, 17, 0.05);
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.card {
  border: none;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: rgba(17, 17, 17, 0.04);
  border-radius: 6px;
  overflow: hidden;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.001);
  transition: transform 0.22s ease;
}

.card:hover .media img {
  transform: scale(1.03);
}

.body {
  padding: 10px 0 6px;
  display: grid;
  gap: 10px;
  text-align: right;
}

.descText {
  width: 100%;
  min-height: 44px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  color: rgba(17, 17, 17, 0.82);
  line-height: 1.35;
  white-space: pre-wrap;
  text-align: right;
}

.descText.isEmpty {
  opacity: 0.6;
  font-style: italic;
}

.desc {
  width: 100%;
  min-height: 60px;
  resize: vertical;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  color: var(--text);
  outline: none;
  line-height: 1.35;
  text-align: right;
}

.desc:focus {
  box-shadow: none;
}

.meta {
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.muted {
  color: var(--muted);
  font-size: 10px;
}

.iconBtn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
}

.iconBtn:hover {
  background: rgba(17, 17, 17, 0.05);
}

.footer {
  color: var(--muted);
  font-size: 12px;
  padding: 16px 0 0;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
