:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #1f2d3d;
  --muted: #63768d;
  --accent: #1e73e8;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

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

header {
  background: linear-gradient(120deg, #123e7f, #1e73e8);
  color: #fff;
  padding: 1rem 1.5rem;
}

header nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

header a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 5px 20px rgba(17, 31, 68, 0.08);
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.slideshow {
  position: relative;
  overflow: hidden;
}

.slideshow .slide {
  display: none;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.slideshow .slide.active {
  display: block;
}

.card .content {
  padding: 0.85rem;
}

.muted {
  color: var(--muted);
}

.detail {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.detail img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
}

.detail .slideshow .slide {
  max-height: 420px;
  height: auto;
  border-radius: var(--radius);
}

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 5px 20px rgba(17, 31, 68, 0.08);
  padding: 1rem;
}

form {
  display: grid;
  gap: 0.7rem;
}

input,
textarea,
select,
button {
  font: inherit;
  border-radius: 10px;
  border: 1px solid #d5dfef;
  padding: 0.6rem;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
}

.danger {
  background: #c92a2a;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(17, 31, 68, 0.75);
  color: #fff;
  border: none;
  line-height: 1;
  cursor: pointer;
}

.slide-btn.prev {
  left: 0.5rem;
}

.slide-btn.next {
  right: 0.5rem;
}

.comment {
  border-top: 1px solid #ecf0f6;
  padding: 0.7rem 0;
}
