/* GZM sketch ring: the "we are extending the map" card, its minimap and toast (js/sketch/ui.js).
   Cloned from the egg card (css/eggs.css) so all bottom cards share one look. */
.sk-card {
  position: fixed; left: 16px; bottom: 30px; z-index: 22; width: 400px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 150px); overflow: auto;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  padding: 16px 16px 13px;
  transform: translateY(calc(100% + 60px)); visibility: hidden;
  transition: transform .4s steps(7), visibility 0s linear .4s;
}
.sk-card.show { transform: none; visibility: visible; transition: transform .4s steps(7), visibility 0s; }
/* the intro, the tour, the retro card and the zaduszki card own the screen while they are open */
body.intro-on .sk-card, body.touring .sk-card, body:has(#retroCard.show) .sk-card, body:has(.zad-card.show) .sk-card {
  visibility: hidden; transform: translateY(calc(100% + 60px));
}
.sk-card::before {             /* pencil-grey band along the top edge: a sketch, not a finished thing */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: repeating-linear-gradient(90deg, #8f8a80 0 6px, var(--paper) 6px 9px);
  border-bottom: 2px solid var(--ink);
}
.sk-tag { font-family: "Silkscreen", monospace; font-size: 11px; letter-spacing: .5px; color: #6a5734; text-transform: uppercase; padding-right: 28px; }
.sk-title { margin: 4px 0 6px; font-size: 21px; line-height: 1.15; font-weight: 600; padding-right: 20px; }
.sk-text { margin: 0 0 10px; font-family: system-ui, sans-serif; font-size: 14px; line-height: 1.45; color: #3b3342; }
/* minimap: 41 outlines, Piekary gold, ring-1 gminas hatched (the sketch), the rest plain paper */
.sk-map { position: relative; margin: 0 0 6px; border: 2px solid var(--ink); background: #ebe3d1; }
.sk-map svg { display: block; width: 100%; height: auto; }
.sk-map path { fill: #f7f0de; stroke: var(--ink); stroke-width: 1.2; cursor: pointer; outline: none; }
.sk-map path.ring1 { fill: url(#skHatch); }
.sk-map path.piekary { fill: var(--accent); cursor: default; }
.sk-map path:hover, .sk-map path:focus-visible { fill: #fbe39a; }
.sk-map path.ring1:hover, .sk-map path.ring1:focus-visible { fill: url(#skHatchHi); }
.sk-map path.piekary:hover, .sk-map path.piekary:focus-visible { fill: var(--accent); }
.sk-map path.hi { fill: #f6cf55 !important; stroke-width: 2.2; }
/* (SVG user units: the viewBox is 1000 wide, so 26 units = ~9 px on a 350 px card) */
.sk-map text { font-family: "Silkscreen", monospace; font-size: 26px; letter-spacing: 1px; fill: var(--ink); pointer-events: none; }
.sk-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 10px; font-family: "Silkscreen", monospace; font-size: 10px; letter-spacing: .3px; color: #6a5734; }
.sk-legend i { display: inline-block; width: 10px; height: 10px; margin: 0 5px -1px 0; border: 1px solid var(--ink); background: #f7f0de; }
.sk-legend i.gold { background: var(--accent); }
.sk-legend i.hatch { background: repeating-linear-gradient(135deg, #8f8a80 0 1px, #f7f0de 1px 3px); }
.sk-pick { margin: -4px 0 10px; font-size: 15px; color: #6a5734; }
.sk-pick b { color: var(--ink); font-weight: 600; }
.sk-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sk-ok, .sk-hide { font: inherit; font-size: 15px; cursor: pointer; color: var(--ink); border: 2px solid var(--ink); padding: 4px 14px 5px; }
.sk-ok { background: var(--accent); box-shadow: 3px 3px 0 var(--ink); }
.sk-ok:hover { background: #f1c94a; }
.sk-ok:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.sk-hide { background: #fff; padding: 3px 10px 4px; font-size: 14px; margin-left: auto; }
.sk-hide:hover { background: #ece3cf; }
.sk-x { position: absolute; right: 4px; top: 8px; width: 32px; height: 32px; padding: 0; display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; color: var(--ink); }
.sk-x svg { display: block; image-rendering: pixelated; }
.sk-x:hover { color: #8a5a00; }
.sk-ok:focus-visible, .sk-hide:focus-visible, .sk-x:focus-visible { outline: 2px dashed var(--ink); outline-offset: 2px; }

/* one-line toast ("<Gmina> - w przygotowaniu"), the egg toast look with a gold band */
.sk-toast {
  position: fixed; left: 50%; bottom: 14px; z-index: 23; max-width: calc(100vw - 32px); pointer-events: none;
  transform: translate(-50%, calc(100% + 30px)); visibility: hidden;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  padding: 7px 12px 8px; font-family: "Silkscreen", monospace; font-size: 12px; letter-spacing: .4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  transition: transform .3s steps(5), visibility 0s linear .3s;
}
.sk-toast::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); }
.sk-toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .3s steps(5), visibility 0s; }
/* the toast sits above an open card on a phone (the card is a bottom sheet there) */
@media (max-width: 600px) { body:has(.sk-card.show) .sk-toast { bottom: auto; top: 156px; transform: translate(-50%, -140%); }
  body:has(.sk-card.show) .sk-toast.show { transform: translate(-50%, 0); } }

/* phone: bottom sheet */
@media (max-width: 600px) {
  .sk-card { left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 72vh; border-width: 3px 0 0; box-shadow: none;
    padding: 14px 12px calc(10px + env(safe-area-inset-bottom)); }
  .sk-card::after { content: ""; position: absolute; left: 50%; top: 9px; width: 36px; height: 4px; margin-left: -18px; background: var(--ink); opacity: .35; }
  .sk-title { font-size: 18px; }
  .sk-text { font-size: 13.5px; margin-bottom: 8px; }
  .sk-map svg { max-height: 34vh; width: 100%; }
  .sk-x { right: 2px; top: 6px; width: 40px; height: 40px; }
  .sk-x svg { width: 16px; height: 16px; }
  body:has(.sk-card.show) #credits { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sk-card, .sk-card.show, .sk-toast, .sk-toast.show { transition: none; }
}
