/*
 * assets/ui/hollows.css - HAPPY HOLLOWS (js/happy-hollows-room.js): the Town Hall's meter, the suburb's grid of buildings
 * and the builder's list, in a wide room dialog. Words follow the room's floor (var(--rui-min), lesson UI-5), every
 * button is 44 px or more, and the layout flows from a phone held sideways to a wide PC window (the adaptive layout
 * rule, 2026-11-11): the grid and the list side by side when there is room, stacked when not.
 */
.hh-room { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.hh-meter { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgb(255 244 214 / 8%); }
.hh-meter__score { margin: 0; font-weight: 700; font-size: 1.15em; color: #ffe6a8; }
.hh-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 14px; }
.hh-part { display: grid; gap: 3px; align-content: end; }
.hh-bar { display: block; height: 8px; border-radius: 4px; background: rgb(0 0 0 / 40%); overflow: hidden; }
.hh-bar__fill { display: block; height: 100%; background: linear-gradient(90deg, #7ce38b, #ffd36b); }
.hh-line, .hh-lack, .hh-why, .hh-status { margin: 0; font-size: var(--rui-min, 16px); }
.hh-lack, .hh-why { color: #ffb38a; }
.hh-status:empty { display: none; }
.hh-status { color: #ffe6a8; font-weight: 700; }
.hh-main { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.hh-grid { --hh-n: 4; flex: 1 1 340px; max-width: min(100%, 620px); aspect-ratio: 1; display: grid; gap: 4px; padding: 6px; border-radius: 12px;
  grid-template-columns: repeat(var(--hh-n), 1fr); grid-template-rows: repeat(var(--hh-n), 1fr);
  background: #4f7a34 url('../art/hollows/grass.webp') center / cover no-repeat; box-shadow: inset 0 0 0 2px rgb(255 255 255 / 10%), inset 0 0 40px rgb(0 0 0 / 35%); }
.hh-cell { min-width: 44px; min-height: 44px; border: 1px dashed rgb(255 255 255 / 30%); border-radius: 8px; background: transparent; cursor: pointer; }
.hh-cell.is-target { border-color: #ffd36b; background: rgb(255 211 107 / 18%); }
.hh-cell:focus-visible, .hh-bld:focus-visible { outline: 3px solid #ffd36b; outline-offset: 1px; }
.hh-bld { position: relative; min-width: 44px; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 4px;
  border: 0; border-radius: 10px; cursor: pointer; overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, rgb(40 30 15 / 30%), transparent 70%); }
.hh-bld.is-chosen { box-shadow: 0 0 0 3px #ffd36b, 0 0 18px rgb(255 211 107 / 55%); }
.hh-bld__pic { position: absolute; inset: 6% 6% 24% 6%; width: 88%; height: 70%; object-fit: contain; pointer-events: none; }
.hh-bld__name { position: relative; z-index: 1; font-size: var(--rui-min, 16px); line-height: 1.1; font-weight: 700; color: #fff7e6; text-shadow: 0 1px 2px #000; text-align: center; }
.hh-side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hh-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hh-acts:empty { display: none; }
.hh-palette { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hh-pal { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: rgb(255 255 255 / 6%); }
.hh-pal__pic, .hh-pal__swatch { width: 52px; height: 52px; border-radius: 8px; object-fit: contain; }
.hh-pal__text { display: grid; gap: 2px; min-width: 0; }
.hh-book summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.hh-book ul { margin: 0; padding-left: 18px; }
@media (max-width: 720px) { .hh-pal { grid-template-columns: 44px 1fr; } .hh-pal .rui-btn { grid-column: 1 / -1; } }
/* A phone held sideways: the meter shrinks to one row of bars so the suburb's grid shows without a scroll. */
@media (max-height: 500px) {
  .hh-room { gap: 8px; }
  .hh-meter { gap: 4px; padding: 6px 10px; }
  .hh-parts { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 4px 10px; }
  .hh-grid { flex-basis: 260px; max-width: min(100%, 72vh); }
  .hh-bld__name { font-size: 13px; overflow-wrap: anywhere; }
}
