:root {
  --ink: #2b221b;
  --muted: #6e6054;
  --cream: #f2eae0;
  --card: #faf5ed;
  --line: #ded3c4;
  --green: #1e4d38;
  --green-hover: #153828;
  --green-soft: #ebf3ee;
  --shadow: 0 4px 16px rgba(43, 34, 27, 0.05);
  --shadow-hover: 0 8px 24px rgba(30, 77, 56, 0.12);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.hero {
  padding: 12px 16px 10px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.hero-row {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .9fr);
  gap: 14px;
  align-items: stretch;
}

.intro {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.mascot {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--card);
  flex-shrink: 0;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  border: 1px solid rgba(30, 77, 56, .2);
  color: var(--green);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 4px;
  font-size: clamp(1.25rem, 1.05rem + 1.1vw, 1.7rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
  line-height: 1.2;
}

.hero .lead {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

.admin {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.admin strong {
  color: var(--green);
  font-weight: 800;
  font-size: 13.5px;
}

.admin a {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin .btn {
  margin-top: 8px;
  align-self: flex-start;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding-top: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  box-shadow: var(--shadow);
  transition: all 0.15s ease;
}

.card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eee5d7;
  color: #523a28;
}

.badge.hort {
  background: #eee5d7;
  color: var(--green);
}

.badge.privat {
  background: var(--green-soft);
  color: var(--green);
}

.card h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 800;
  color: var(--ink);
}

.card .meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  flex: 1;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding-top: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--green);
  color: #fff !important;
  font-weight: 700;
  font-size: 13px;
  border: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(30, 77, 56, .2);
}

.btn:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
}

.btn-pdf {
  background: var(--green);
}

/* Detail Hero & Panels for /k/<slug>/ */
.detail-hero {
  padding: 12px 16px 10px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.detail-top {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.mascot-sm {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  object-fit: cover;
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--card);
}

.detail-hero h1 {
  margin: 4px 0;
  font-size: clamp(1.2rem, 1.05rem + .9vw, 1.5rem);
  font-weight: 800;
  color: var(--ink);
}

.detail-hero .addr {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.back {
  display: inline-block;
  margin: 0 0 6px;
  color: var(--green);
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
}

.back:hover {
  text-decoration: underline;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--green);
}

.kv {
  display: grid;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}

.kv div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
}

.kv b {
  color: var(--muted);
  font-weight: 700;
}

.kv a {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.slot {
  border: 2px dashed var(--line);
  background: var(--card);
}

.slot strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 1rem;
}

.note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.45;
  font-weight: 500;
}

@media(max-width:820px){
  .hero-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .intro {
    justify-content: flex-start;
  }
}

@media(max-width:640px){
  .intro {
    flex-direction: row;
  }
  .mascot {
    width: 64px;
    height: 64px;
  }
  .kv div {
    grid-template-columns: 1fr;
  }
}
