/* Hearthlands, stage 2b: the folk panel (F), the calendar (C), heart events, the festival's strokes
   (src/hearth-folk-ui.js). In the game's own panel style: dark ink ground, a wood inset, gold headings. */
#hfolk, #hcal, #hscene, #hfest {
  --pixel-font: 'Game UI', Georgia, serif; --logo-font: 'Game Display', 'Game UI', Georgia, serif; --body-font: 'Game UI', Georgia, serif;
  font-family: var(--body-font); color: var(--ink);
}
#hfolk.hidden, #hcal.hidden, #hscene.hidden, #hfest.hidden { display: none; }
#hfolk h4, #hcal h4 { margin: 10px 0 6px; color: var(--gold-3); font-family: var(--pixel-font); font-size: 14px; letter-spacing: 2px; text-transform: uppercase; }
#hfolk h4 small, #hcal h3 small { color: var(--dim); letter-spacing: 0; text-transform: none; font-size: 12px; }
#hfolk .note, #hcal .note { margin: 6px 0 0; font-size: 13px; color: var(--sand-1); }
#hfolk .dim { color: var(--dim); }
#hfolk .pbtn.on { border-color: var(--gold-3); color: var(--gold); }

/* The folk panel: a list on the left, the person on the right. */
#hfolk { position: fixed; left: 12px; top: 48px; z-index: 7; width: min(700px, calc(100vw - 24px)); max-height: calc(100vh - 290px); overflow-y: auto; padding: 10px 14px 14px; text-align: left; }
#hfolk .hf-tabs { display: flex; gap: 6px; align-items: center; }
#hfolk .hf-sp { flex: 1; }
#hfolk .hf-cols { display: grid; grid-template-columns: 230px 1fr; gap: 14px; margin-top: 6px; }
#hfolk .hf-list { max-height: calc(100vh - 380px); overflow-y: auto; padding-right: 4px; }
#hfolk .hf-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 3px 6px; margin-bottom: 3px; text-align: left; cursor: pointer; background: var(--ink-1); border: 2px solid var(--ink-0); color: var(--ink); }
#hfolk .hf-row:hover { filter: brightness(1.2); }
#hfolk .hf-row.sel { border-color: var(--gold-3); background: var(--umber-2); }
#hfolk .hf-row img.portrait, #hfolk .hf-row .portrait.none { width: 30px; height: 30px; flex: none; image-rendering: pixelated; border: 1px solid var(--ink-0); background: var(--ink-0); }
#hfolk .hf-row .hf-nm { flex: 1; min-width: 0; line-height: 1.1; }
#hfolk .hf-row .hf-nm b { display: block; font-size: 13px; color: var(--bone-1); }
#hfolk .hf-row .hf-nm small { font-size: 11px; color: var(--dim); }
#hfolk .hf-row .hf-h { font-family: var(--pixel-font); font-size: 12px; color: var(--blood-5); white-space: nowrap; }
#hfolk .hf-row .hf-h em { color: var(--gold-3); font-style: normal; font-weight: bold; }
#hfolk .hf-head { display: flex; gap: 12px; align-items: center; }
#hfolk .hf-head img.portrait, #hfolk .hf-head .portrait.none { width: 76px; height: 76px; flex: none; image-rendering: pixelated; border: 3px solid var(--ink-1); box-shadow: 0 0 0 2px var(--wood-2); background: var(--ink-1); }
#hfolk .hf-head h3 { margin: 0; font-family: var(--logo-font); font-size: 22px; color: var(--gold); text-shadow: 0 2px 0 var(--ink-0); }
#hfolk .hf-role { font-size: 13px; color: var(--sand-1); font-style: italic; }
.hf-hearts { font-size: 15px; letter-spacing: 1px; }
.hf-hearts i { font-style: normal; color: var(--ink-0); text-shadow: 0 0 1px var(--stone-3); }
.hf-hearts i.on { color: var(--blood-5); text-shadow: 0 1px 0 var(--ink-0); }
#hfolk .hf-court { color: var(--blood-5); font-family: var(--pixel-font); font-size: 13px; }
#hfolk .hf-line { margin: 8px 0 4px; font-size: 14px; line-height: 1.4; color: var(--bone-1); }
#hfolk .hf-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--sand-1); }
#hfolk .hf-facts b { color: var(--gold-3); }
#hfolk .hf-fav b { color: var(--gold-3); }
#hfolk .hf-tastes { display: flex; flex-wrap: wrap; gap: 6px; }
#hfolk .hf-good { display: inline-flex; flex-direction: column; align-items: center; width: 54px; padding: 2px; background: var(--ink-1); border: 2px solid var(--ink-0); }
#hfolk .hf-good img { width: 38px; height: 38px; image-rendering: pixelated; }
#hfolk .hf-good small { font-size: 10px; color: var(--sand-1); }
#hfolk .hf-good.love { border-color: var(--blood-4); } #hfolk .hf-good.love small { color: var(--blood-5); }
#hfolk .hf-good.like small { color: var(--leaf-6); }
#hfolk .hf-good.dislike small, #hfolk .hf-good.hate small { color: var(--ember-3); }
#hfolk .hf-cook { display: flex; flex-wrap: wrap; gap: 6px; }
#hfolk .hf-fest { margin: 8px 0 0; font-family: var(--logo-font); font-size: 22px; color: var(--gold); text-shadow: 0 2px 0 var(--ink-0); }
#hfolk .hf-fest small { font-family: var(--body-font); font-size: 13px; color: var(--sand-1); }
#hfolk .grid, #hpack .hf-grid { display: grid; grid-template-columns: repeat(8, 50px); gap: 6px; }
#hfolk .item-cell { position: relative; width: 50px; height: 50px; padding: 0; cursor: pointer; background: var(--stone-1); border: 2px solid var(--ink-0); box-shadow: inset 1px 1px 0 var(--stone-4); }
#hfolk .item-cell img { width: 42px; height: 42px; image-rendering: pixelated; }
#hfolk .item-cell .cnt { position: absolute; right: 2px; bottom: 0; font-family: var(--pixel-font); font-size: 12px; color: var(--bone-2); text-shadow: 0 1px 0 var(--ink-0), 1px 0 0 var(--ink-0); }
#hfolk .item-cell .price { position: absolute; left: 2px; top: 0; font-family: var(--pixel-font); font-size: 11px; color: var(--gold-3); text-shadow: 0 1px 0 var(--ink-0), 1px 0 0 var(--ink-0); }
#hpack .hf-who .hf-hearts { font-size: 13px; }
@media (max-width: 640px) { #hfolk .hf-cols { grid-template-columns: 1fr; } }

/* The calendar. */
#hcal { position: fixed; left: 50%; top: 60px; transform: translateX(-50%); z-index: 7; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 290px); overflow-y: auto; padding: 10px 16px 14px; text-align: left; }
#hcal .pack-head { display: flex; align-items: center; gap: 12px; }
#hcal .pack-head h3 { flex: 1; margin: 0; font-family: var(--logo-font); font-size: 22px; color: var(--gold); text-shadow: 0 2px 0 var(--ink-0); }
#hcal .hc-grid { width: 100%; border-collapse: separate; border-spacing: 4px; margin-top: 8px; table-layout: fixed; }
#hcal .hc-grid th { font-family: var(--pixel-font); font-size: 12px; color: var(--gold-3); letter-spacing: 1px; text-align: left; vertical-align: middle; }
#hcal .hc-grid tr th:first-child { width: 96px; }
#hcal .hc-grid td { height: 84px; vertical-align: top; padding: 4px 6px; background: var(--ink-1); border: 2px solid var(--ink-0); box-shadow: inset 1px 1px 0 var(--stone-3); font-size: 11px; }
#hcal .hc-grid td.past { opacity: 0.55; }
#hcal .hc-grid td.today { border-color: var(--gold-3); background: var(--umber-2); }
#hcal .hc-grid td b { display: block; font-family: var(--pixel-font); font-size: 14px; color: var(--bone-1); }
#hcal .hc-grid td span { display: block; margin-top: 2px; line-height: 1.2; }
#hcal .hc-fest { color: var(--gold); font-weight: bold; }
#hcal .hc-fest small { display: block; font-weight: normal; color: var(--sand-1); }
#hcal .hc-mk { color: var(--sky-7); }
#hcal .hc-rule { color: var(--ember-3); }
#hcal .hc-bd { color: var(--blood-5); }

/* A heart event: talking heads with a title, and a two-way answer. */
#hscene {
  position: fixed; left: 50%; bottom: 214px; transform: translateX(-50%); z-index: 9; width: min(660px, calc(100vw - 32px)); padding: 8px 14px 12px; cursor: pointer;
  background: color-mix(in srgb, var(--ink-2) 96%, transparent); border: 3px solid var(--ink-1);
  box-shadow: inset 0 0 0 2px var(--blood-3), 0 6px 24px color-mix(in srgb, var(--ink-0) 60%, transparent);
}
#hscene .hsc-title { font-family: var(--pixel-font); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--blood-5); margin-bottom: 6px; }
#hscene .hsc-title small { letter-spacing: 0; color: var(--dim); text-transform: none; }
#hscene .hsc-row { display: flex; gap: 12px; align-items: flex-start; }
#hscene img.portrait, #hscene .portrait.none { width: 76px; height: 76px; flex: none; image-rendering: pixelated; border: 3px solid var(--ink-1); box-shadow: 0 0 0 2px var(--wood-2); background: var(--ink-1); }
#hscene .talk-body { flex: 1; min-width: 0; }
#hscene .talk-who b { font-family: var(--logo-font); font-size: 20px; color: var(--gold); text-shadow: 0 2px 0 var(--ink-0); }
#hscene .talk-who small { margin-left: 8px; font-size: 13px; color: var(--sand-1); font-style: italic; }
#hscene .talk-text { margin-top: 4px; font-size: 16px; line-height: 1.4; }
#hscene .hsc-more { display: block; text-align: right; font-size: 12px; color: var(--dim); }
#hscene .hsc-q { margin: 8px 0 6px; font-size: 14px; color: var(--sand-1); font-style: italic; }
#hscene .hsc-a { display: flex; flex-direction: column; gap: 6px; }
#hscene .hsc-a .pbtn { text-align: left; font-size: 14px; }
#hscene .hsc-a .pbtn b { color: var(--gold-3); margin-right: 6px; }

/* The festival's three strokes (as the Elves' song). */
#hfest {
  position: fixed; left: 50%; top: 34%; transform: translateX(-50%); z-index: 8; width: 360px; padding: 10px 16px 12px; text-align: center;
  background: color-mix(in srgb, var(--ink-2) 95%, transparent); border: 3px solid var(--ink-1); box-shadow: inset 0 0 0 2px var(--gold-2), 0 6px 24px color-mix(in srgb, var(--ink-0) 60%, transparent);
}
#hfest .hs-title { font-family: var(--logo-font); font-size: 18px; color: var(--gold); text-shadow: 0 2px 0 var(--ink-0); }
#hfest .hs-bar { position: relative; height: 18px; margin: 10px 0 8px; background: var(--ink-1); border: 2px solid var(--ink-0); box-shadow: inset 0 0 0 1px var(--wood-2); }
#hfest .hs-zone { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--gold-3) 55%, transparent); }
#hfest .hs-mark { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: var(--bone-2); box-shadow: 0 0 6px var(--gold-3); }
#hfest .hs-beats { display: flex; justify-content: center; gap: 14px; font-size: 20px; color: var(--dim); }
#hfest .hs-beats .hit { color: var(--gold-3); }
#hfest .hs-beats .miss { color: var(--ember-3); }
#hfest .hs-hint { margin-top: 4px; font-size: 12px; color: var(--sand-1); }

/* hearth/finding: where they are now, their usual day, Track (hearth-find.js) */
#hfolk .hf-now { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 2px; padding: 6px 8px; font-size: 12px; color: var(--sand-1); background: rgba(0, 0, 0, 0.22); border-left: 2px solid var(--gold-3); }
#hfolk .hf-now b { color: var(--gold-3); }
#hfolk .hf-now .dim { flex-basis: 100%; order: 2; opacity: 0.8; }
#hfolk .hf-now button { margin-left: auto; }
#hfolk .hf-now > span:first-child { flex: 1; }
