/* Stránka /minecraft (a /en/minecraft): výjimka z grafického manuálu, viz DESIGN.md, sekce 12.
   Karty jsou bloky hlíny obrostlé trávou (pixelové textury z scripts/minecraft-textures.py).
   Okolí (pozadí, nadpis, patička) zůstává stejné jako na zbytku webu. Barvy uvnitř bloků
   jsou pevné, protože blok vypadá stejně ve světlém i tmavém režimu. */

.mc {
  --dirt: #5f3d24;
  --plate: rgba(26, 16, 9, 0.84);
  --plate-ink: #f4ede3;
  --plate-muted: #d2c4b2;
  --plate-line: rgba(255, 255, 255, 0.12);
  --plate-inset: rgba(255, 255, 255, 0.07);
  --grass-label: #c9d9a8;
  --grass-btn: #5ea637;
  --grass-btn-hover: #69b340;
  --grass-btn-ink: #0f1d07;
  --grass-btn-hi: #8ccd59;
  --grass-btn-lo: #2f5a1f;
}

.page-back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.page-back:hover { color: var(--ink); }
.page-head { padding: 8px 4px 0; }
.page-head h1 { margin: 0 0 6px; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.015em; }

/* ---------- Blok: hlína, tráva nahoře, stébla nad hranou ---------- */
.blk {
  position: relative;
  margin-top: 30px;
  padding: 66px 16px 16px;
  border-radius: 12px;
  background: var(--dirt) url("/img/minecraft/dirt.png") 0 0 / 144px 144px repeat;
  image-rendering: pixelated;
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.22),
    inset 0 -8px 0 rgba(0, 0, 0, 0.28),
    0 16px 28px -14px rgba(40, 24, 10, 0.6);
  scroll-margin-top: 40px;
}
.blk::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 72px;
  border-radius: 12px 12px 0 0;
  background: url("/img/minecraft/grass-top.png") 0 0 / 144px 72px repeat-x;
  image-rendering: pixelated;
  pointer-events: none;
}
.blk::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: -29px;
  height: 30px;
  background: url("/img/minecraft/grass-tuft.png") 0 0 / 144px 30px repeat-x;
  image-rendering: pixelated;
  pointer-events: none;
}
/* Každý blok má trávu posunutou jinak, ať se textura neopakuje stejně */
.blk:nth-of-type(2n)::before, .blk:nth-of-type(2n)::after { background-position-x: -60px; }
.blk:nth-of-type(3n) { background-position: -48px -90px; }
.blk:nth-of-type(3n)::before, .blk:nth-of-type(3n)::after { background-position-x: -102px; }

/* Tmavá deska s obsahem uprostřed hlíny */
.plate {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: var(--plate);
  color: var(--plate-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 2px 0 rgba(0, 0, 0, 0.25);
  image-rendering: auto;
}
.plate h2 { margin: 0; }
.plate .tech { color: var(--grass-label); }
.plate p { margin: 0; color: var(--plate-muted); font-size: 0.9rem; }
.plate a { color: var(--plate-ink); text-underline-offset: 3px; }
.plate code { font-family: var(--mono); color: var(--plate-ink); }
.plate-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plate-head > span { color: var(--plate-muted); text-align: right; }

.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--plate-inset);
}
.field strong { font-size: 1.2rem; font-weight: 600; overflow-wrap: anywhere; }
.field span { color: var(--plate-muted); font-size: 0.85rem; }

/* ---------- Tlačítka ---------- */
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--plate-ink);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.plate a.btn { color: var(--plate-ink); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-primary,
.plate a.btn-primary {
  background: var(--grass-btn);
  color: var(--grass-btn-ink);
  box-shadow: inset 0 3px 0 var(--grass-btn-hi), inset 0 -4px 0 var(--grass-btn-lo);
}
@media (hover: hover) {
  .btn:hover { background: rgba(255, 255, 255, 0.16); }
  .btn-primary:hover { background: var(--grass-btn-hover); }
}

/* ---------- Obsah desek ---------- */
.steps { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; color: var(--plate-muted); font-size: 0.9rem; }

.cmds { margin: 0; }
.cmds div { padding: 11px 0; border-top: 1px solid var(--plate-line); }
.cmds div:first-child { border-top: 0; padding-top: 0; }
.cmds dt { font-family: var(--mono); font-size: 0.875rem; overflow-wrap: anywhere; }
.cmds dt var { font-style: normal; color: var(--plate-muted); }
.cmds dd { margin: 2px 0 0; color: var(--plate-muted); font-size: 0.875rem; }

.more { border-radius: 10px; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35); }
.more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; color: var(--plate-muted); font-size: 1.15rem; }
.more[open] summary::after { content: "−"; }
.more .cmds { padding: 4px 16px 14px; }

.rules { margin: 0; padding: 0; list-style: none; counter-reset: rule; }
.rules li {
  counter-increment: rule;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  padding: 11px 0;
  border-top: 1px solid var(--plate-line);
  color: var(--plate-muted);
  font-size: 0.9rem;
}
.rules li:first-child { border-top: 0; padding-top: 0; }
.rules li::before { content: counter(rule, decimal-leading-zero); padding-top: 2px; color: var(--grass-label); font-family: var(--mono); font-size: 0.75rem; }
.rules strong { display: block; margin-bottom: 1px; color: var(--plate-ink); font-weight: 500; }

.plate .small { font-size: 0.8rem; }

.btn:focus-visible,
.page-back:focus-visible,
.more summary:focus-visible,
.plate a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
