/* The home screen (js/ui/hoard-home.js): the menus in one band on top (the casino's tables, the feed and the way into
   Game modes), a hazard-striped rule, and the soundboard below it, in the workshop style (ART_STYLE.md section 9), with
   the casino's magenta for the tables that have goblins at them. At 1100px and under the casino takes the band's whole
   width; on a phone (720px and under) it all stacks, the tables become one strip ye swipe along and the feed shows its
   newest three. Guests get no soundboard, so the band's all they see. */
#hoardhome { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; width: min(1400px, calc(100vw - 32px)); margin: 18px auto 8px; text-align: left; }
#soundboard { display: none; min-width: 0; }
body.sbdock #soundboard { display: block; }
#soundboard .sbhead { max-width: none; }
#soundboard .stage { padding: 12px 0 30px; }
/* the menus on top, in one band: the casino, the feed and the way into everything else */
#hoardside { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, 0.9fr); gap: 16px; align-items: stretch; }
#hoardside:empty { display: none; }
/* then a clear break before the soundboard: a hazard-striped rule across the page */
body.sbdock #soundboard::before { content: ""; display: block; height: 12px; margin: 26px 0 22px; border: 3px solid var(--wk-ink); border-radius: 6px; background: var(--wk-hazard); box-shadow: 0 4px 0 var(--wk-ink); }
body:not(.sbdock) #hoardhome { max-width: 1100px; }
/* a window's open over the home screen: it all holds still */
body.covered #hoardhome, body.covered #hoardhome * { animation-play-state: paused !important; }

/* ---------- the plates ---------- */
.hh-card { position: relative; padding: 16px 14px 14px; border: 3px solid var(--wk-ink); border-radius: 10px; background: var(--wk-plate), var(--wk-iron);
  box-shadow: var(--wk-drop); color: var(--wk-paper); font-family: var(--f-ui); }
.hh-card::after { content: ""; position: absolute; top: 7px; left: 7px; right: 7px; height: 12px; pointer-events: none;
  background: var(--wk-rivet-dot) left center / 12px 12px no-repeat, var(--wk-rivet-dot) right center / 12px 12px no-repeat; }
#hoardside h3 { display: flex; align-items: center; gap: 8px; margin: 0; font: 400 22px/1.1 var(--f-head); color: var(--wk-brass); text-shadow: 2px 2px 0 var(--wk-ink); }
#hoardside h3 .gi { width: 26px; height: 26px; flex: none; }
.hh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 3px dashed var(--wk-ink); }
.hh-feed h3 { padding-bottom: 10px; border-bottom: 3px dashed var(--wk-ink); }

/* the primary button: hazard stripes with an iron label pill */
.hh-walk { flex: none; min-height: 44px; padding: 0 8px; border: 3px solid var(--wk-ink); border-radius: 8px; background: var(--wk-hazard); box-shadow: var(--wk-drop-sm);
  transform: rotate(-1deg); cursor: pointer; }
.hh-walk span { display: inline-block; padding: 5px 10px; border-radius: 6px; border: 2px solid var(--wk-ink); background: var(--wk-plate), var(--wk-iron); color: var(--wk-paper);
  font: 800 12px/1 var(--f-ui); letter-spacing: 1px; text-transform: uppercase; }
.hh-walk:hover, .hh-walk:focus-visible, .hh-walk.padfocus { transform: rotate(0deg) translateY(-1px); }

/* ---------- the casino's tables ---------- */
.hh-tables { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; }
.hh-table { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 48px; padding: 6px 8px; border: 3px solid var(--wk-ink); border-radius: 8px;
  background: rgba(10, 6, 18, 0.45); color: var(--wk-paper); font-family: var(--f-ui); text-align: left; cursor: pointer; box-shadow: var(--wk-drop-sm); }
.hh-table:hover, .hh-table:focus-visible, .hh-table.padfocus { border-color: var(--wk-brass); }
.hh-table.busy { background: linear-gradient(170deg, rgba(255, 58, 192, 0.18), rgba(10, 6, 18, 0.5)); box-shadow: 0 0 12px rgba(255, 58, 192, 0.35), var(--wk-drop-sm); }
.hh-ico { flex: none; display: grid; place-items: center; }
.hh-ico .gi { width: 28px; height: 28px; }
.hh-cap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hh-cap b { font-weight: 800; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hh-cap small { font-size: 11px; color: #9aa8b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hh-table.busy .hh-cap small { color: #ffb0e4; }
.hh-n { position: absolute; top: -9px; right: -6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; border: 2px solid var(--wk-ink);
  background: var(--wk-magenta); color: var(--wk-ink); font: 800 12px/18px var(--f-ui); text-align: center; }

/* ---------- the feed ---------- */
.hh-feed { display: flex; flex-direction: column; min-height: 0; }
.hh-list { list-style: none; margin: 4px 0 0; padding: 0; flex: 1; max-height: 150px; overflow-y: auto; }
.hh-list li { display: grid; gap: 3px; padding: 9px 2px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; line-height: 1.35; }
.hh-list li:first-child { border-top: 0; }
.hh-list small { color: #9aa8b8; font-size: 11px; }
.hh-list .hh-empty { color: #9aa8b8; }

/* ---------- the way into everything else ---------- */
/* it's a button, so it looks like the workshop's primary button: framed in hazard stripes, with an iron "Open" pill,
   lifting under the pointer and pressing in when pushed */
.hh-modes { display: flex; padding: 6px; border: 3px solid var(--wk-ink); border-radius: 12px; background: var(--wk-hazard); box-shadow: 0 7px 0 var(--wk-ink);
  color: var(--wk-paper); font-family: var(--f-ui); text-align: left; cursor: pointer; transform: rotate(0.6deg); transition: transform 0.12s, box-shadow 0.12s; }
.hh-in { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; border-radius: 6px; box-shadow: none; }
.hh-in > .gi { width: 48px; height: 48px; flex: none; }
.hh-go { display: inline-block; margin-top: 2px; padding: 7px 14px; border-radius: 6px; border: 2px solid var(--wk-ink); background: var(--wk-ink); color: var(--wk-brass);
  font: 800 13px/1 var(--f-ui); letter-spacing: 1px; text-transform: uppercase; box-shadow: inset 0 0 0 1px rgba(242, 182, 50, 0.4); }
.hh-modes:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--wk-ink); }
.hh-table:active, .hh-walk:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--wk-ink); }
.hh-modes .hh-cap b { font: 400 21px/1.1 var(--f-head); color: var(--wk-brass); text-shadow: 2px 2px 0 var(--wk-ink); white-space: normal; }
.hh-modes .hh-cap small { font-size: 12px; white-space: normal; }
.hh-modes:hover, .hh-modes:focus-visible, .hh-modes.padfocus { transform: rotate(0deg) translateY(-2px); box-shadow: 0 9px 0 var(--wk-ink), 0 0 22px rgba(242, 182, 50, 0.35); }
.hh-modes:hover .hh-go, .hh-modes:focus-visible .hh-go, .hh-modes.padfocus .hh-go { background: var(--wk-brass); color: var(--wk-ink); }

/* ---------- narrower: the casino gets the band's whole width, the feed and Game modes share the row under it ---------- */
@media (max-width: 1100px) {
  #hoardside { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
  .hh-casino { grid-column: 1 / -1; }
  .hh-in { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .hh-in .hh-cap { flex: 1; min-width: 160px; }
  .hh-in > .gi { width: 40px; height: 40px; }
}
@media (max-width: 720px) {
  #hoardhome { margin-top: 12px; }
  #hoardside { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hh-tables { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 10px 2px 8px; margin: -6px 0 0; }
  .hh-table { flex: 0 0 138px; scroll-snap-align: start; }
  .hh-list li:nth-child(n+4) { display: none; }
  body.sbdock #soundboard::before { margin: 20px 0 16px; height: 10px; }
}
