/* Homebodies. The house fills the screen; everything else floats over it and
   stays at the edges. (City Builder's layout, recoloured:
   docs/homebodies-spec.md R14.) */
:root {
  /* R-C40: colours that were written out in rules, as tokens (theme-derive.py) */
  --kBg1: #22423a;
  --kBg10: rgba(14, 38, 32, .94);
  --kBg11: rgba(14, 38, 32, .8);
  --kBg12: rgba(255, 255, 255, .08);
  --kBg13: #ffffff;
  --kBg14: #2c5a4f;
  --kBg15: #3a7566;
  --kBg16: rgba(8, 24, 20, .72);
  --kBg17: rgba(0, 0, 0, .55);
  --kBg18: rgba(255, 255, 255, .1);
  --kBg19: rgba(255, 194, 74, .35);
  --kBg2: #35685b;
  --kBg20: #12302a;
  --kBg21: #f0c850;
  --kBg22: rgba(255, 255, 255, .8);
  --kBg3: #3f7a6b;
  --kBg4: #254a41;
  --kBg5: #1b3a33;
  --kBg6: #28524a;
  --kBg7: #9cc9dd;
  --kBg8: #16352e;
  --kBg9: rgba(255, 255, 255, .88);
  --kInk1: #10263a;
  --kInk2: #5a3a10;
  --kInk3: #0b2d18;
  --kLine1: #3d6f62;
  --kLine2: #ffd27a;

  --hotInk: #3a2204;
  --sky: #2b4d45;
  --ink: #f4f8fb;
  --dim: #c3d8cf;
  --card: #23443c;
  --line: #4d8a7a;
  --hot: #ffb338;
  --good: #57d68d;
  --bad: #ff6b5b;
  --glass: rgba(14, 38, 32, .86);
}

/* R-C40: the light look. This product's own is dark; the other is chosen with the switch beside Home. */
:root[data-theme="light"] {
  --kBg1: #94a9a3;
  --kBg10: rgba(175, 192, 187, .94);
  --kBg11: rgba(175, 192, 187, .8);
  --kBg12: rgba(31, 31, 31, .08);
  --kBg13: #1f1f1f;
  --kBg14: #7d9891;
  --kBg15: #66877d;
  --kBg16: rgba(191, 203, 200, .72);
  --kBg17: rgba(247, 247, 247, .55);
  --kBg18: rgba(31, 31, 31, .1);
  --kBg19: rgba(101, 70, 0, .35);
  --kBg2: #718f86;
  --kBg20: #a5b8b3;
  --kBg21: #5f4900;
  --kBg22: rgba(31, 31, 31, .8);
  --kBg3: #628379;
  --kBg4: #8ca39d;
  --kBg5: #9bafaa;
  --kBg6: #849e98;
  --kBg7: #2f4650;
  --kBg8: #a0b4ae;
  --kBg9: rgba(31, 31, 31, .88);
  --kInk1: #94aec7;
  --kInk2: #84623a;
  --kInk3: #01230e;
  --kLine1: #6c8981;
  --kLine2: #453000;

  --hotInk: #ffffff;
  --sky: #d9f0e9;
  --ink: #1e1f21;
  --dim: #39443f;
  --card: #e6fdf6;
  --line: #85a89e;
  --hot: #a26a00;
  --good: #009954;
  --bad: #e45648;
  --glass: rgba(232, 250, 244, .86);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--sky); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none; overflow: hidden;
  -webkit-text-size-adjust: 100%;
}
#app { display: flex; flex-direction: column; height: 100%; }

#hdr {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 8px 6px;
  background: var(--kBg1); border-bottom: 1px solid var(--kLine1);
}
/* flex-basis 0: the title takes only what the pills leave */
#hdrTitle { flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
            font-weight: 700; font-size: 15px; }
@media (max-width: 380px) { #hdrTitle { visibility: hidden; } }
/* R-C26: [hidden] loses to any display of our own */
#hdrPause[hidden], #btnResume[hidden], #placeBar[hidden], #sheet[hidden], #nextChip[hidden], #glFail[hidden], #btnPlace[hidden], #btnRotate[hidden], #saveNote[hidden], #live[hidden] { display: none; }
.pill {
  min-width: 44px; min-height: 44px; border: 0; border-radius: 12px;
  background: var(--kBg2); color: var(--ink); font-size: 18px; cursor: pointer;
}
.pill:active { background: var(--kBg3); }

.scr { display: none; flex: 1; overflow-y: auto; padding: 12px; }
.scr.on { display: block; }
#scr-play.on { display: flex; padding: 0; }

h1 { font-size: 28px; margin: 8px 0 4px; }
.sub { color: var(--dim); font-size: 14px; line-height: 1.45; margin-bottom: 12px; }
.stat { color: var(--dim); font-size: 13px; }
.goal { color: var(--ink); font-size: 14px; line-height: 1.45; margin: 4px 2px 8px; min-height: 20px; }

.big {
  display: block; width: 100%; min-height: 52px; margin: 8px 0;
  border: 1px solid var(--line); border-radius: 14px; background: var(--kBg2);
  color: var(--ink); font-size: 17px; font-weight: 600; cursor: pointer;
}
.big.primary { background: var(--hot); border-color: var(--kLine2); color: var(--hotInk); }

details { margin: 10px 0; border: 1px solid var(--kLine1); border-radius: 14px; background: var(--kBg4); }
#custom { margin: 10px 0; border: 1px solid var(--kLine1); border-radius: 14px; background: var(--kBg4); }
#custom > summary { list-style: none; }
#custom > summary::-webkit-details-marker { display: none; }
#custom > summary::after { content: "▾"; margin-left: auto; color: var(--dim); }
#custom[open] > summary::after { content: "▴"; }
summary { min-height: 48px; display: flex; align-items: center; padding: 0 12px; cursor: pointer; font-weight: 600; }
.setBody { padding: 10px 12px 14px; }
.setRow { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.setLbl { flex: 1 1 120px; font-size: 14px; }
.setNote { color: var(--dim); font-size: 12px; line-height: 1.4; }
/* a row of choices wraps inside the screen: five sizes are 356 px wide, and a 320 px phone cut the last one off */
.knob { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.knobBtn {
  min-height: 44px; min-width: 56px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--kBg5); color: var(--dim);
  font-size: 13px; cursor: pointer;
}
.knobBtn.on { background: var(--hot); color: var(--hotInk); border-color: var(--kLine2); font-weight: 700; }

/* R-C12b: the parks, as a segmented row that wraps to two by two */
.pickRow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin: 6px 0 4px; }
@media (min-width: 560px) { .pickRow { grid-template-columns: repeat(4, 1fr); } }
.pick {
  min-width: 0; min-height: 72px;
  background: var(--kBg2); color: var(--ink); border: 2px solid transparent;
  border-radius: 14px; padding: 8px 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
}
.pick .te { font-size: 24px; }
.pick b { font-size: 14px; }
.pick small { color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.pick.sel { border-color: var(--hot); background: var(--kBg6); }

/* ---- the park -------------------------------------------------------------- */
#stage { position: relative; flex: 1; width: 100%; overflow: hidden; touch-action: none; background: var(--kBg7); }
#cvs { display: block; width: 100%; height: 100%; touch-action: none; }
#glFail {
  position: absolute; inset: 20% 12% auto; padding: 14px; border-radius: 12px;
  background: var(--kBg8); color: var(--ink); font-size: 14px; line-height: 1.5;
}
#signs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sign {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%);
  font-size: 22px; line-height: 1; padding: 3px 5px; border-radius: 10px;
  background: var(--kBg9); box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  white-space: nowrap; will-change: transform;
}
.sign.small { font-size: 16px; padding: 2px 4px; }

#hud {
  position: absolute; top: 6px; left: 6px; right: 6px; pointer-events: none;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; justify-content: space-between;
}
/* R14.6: the top row holds its shape. Two chips of fixed share and the four
   speed buttons; nothing in it grows with its text, so nothing under it moves. */
#hudRow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto; gap: 4px; width: 100%; max-width: 440px; pointer-events: auto; }
#hudRow .chip { min-width: 0; overflow: hidden; justify-content: center; padding-left: 4px; padding-right: 4px; }
.chip { position: relative; min-width: 0; overflow: hidden; justify-content: center; padding-left: 4px; padding-right: 4px; }
.chip {
  background: var(--glass); border-radius: 10px; padding: 6px 8px; font-size: 13px;
  white-space: nowrap; font-variant-numeric: tabular-nums; min-height: 44px; display: inline-flex; align-items: center; gap: 3px;
}
.chip b { font-weight: 700; }
.chip.low b { color: var(--bad); }
/* R12.2a: the speed is one button; its list opens under it, over the picture, and moves nothing */
#speedRow { position: relative; pointer-events: auto; background: var(--glass); border-radius: 12px; padding: 2px; }
.spdNow { display: block; min-width: 48px; min-height: 44px; border: 0; border-radius: 10px; background: var(--hot); color: var(--hotInk); font-size: 15px; font-weight: 700; cursor: pointer; padding: 0 6px; }
.spdNow[data-speed="0"] { font-size: 18px; font-weight: 400; }
#speedList { position: absolute; right: 0; top: calc(100% + 4px); z-index: 6; display: flex; flex-direction: column; gap: 3px; background: var(--glass); border-radius: 12px; padding: 2px; }
#speedRow.closed #speedList { display: none; }
#speedRow:not(.closed) .spdNow { background: transparent; opacity: 0.8; }
.spd { min-width: 56px; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font-size: 15px; font-weight: 700; cursor: pointer; padding: 0 4px; }
.spd[data-speed="0"] { font-size: 18px; font-weight: 400; }
/* text on the amber is the dark ink, as on Play: the pale ink was 1.7:1 on it (the game-ui-colour standard asks 4.5) */
.spd.on { background: var(--hot); color: var(--hotInk); }
#nextChip {
  flex-basis: 100%; pointer-events: auto; text-align: left; min-height: 44px;
  background: var(--glass); color: var(--ink); border: 0; border-radius: 10px; padding: 6px 10px;
  font-size: 12px; cursor: pointer; max-width: 360px;
}

#viewBtns { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
/* On a phone the view buttons are a row above the household's panel. */
@media (max-width: 560px), (max-height: 480px) {
  #viewBtns { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + var(--live, 190px)); transform: none; flex-direction: row; }
}
.vb { width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--glass); color: var(--ink); font-size: 18px; cursor: pointer; }

#tools {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 3px; overflow-x: auto; padding: 6px 6px calc(env(safe-area-inset-bottom, 0px) + 6px);
  background: linear-gradient(to top, var(--kBg10), var(--kBg11));
  scrollbar-width: none;
}
#tools::-webkit-scrollbar { display: none; }
.tool {
  flex: 1 0 44px; min-width: 44px; min-height: 56px; border: 0; border-radius: 12px;
  background: var(--kBg12); color: var(--ink); font-size: 11px; font-weight: 600; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 2px;
}
.tool span { font-size: 22px; line-height: 1; }
.tool.on { background: var(--hot); color: var(--hotInk); }
.nameIn {
  flex: 1 1 140px; min-height: 44px; min-width: 0; border: 0; border-radius: 10px; padding: 0 10px;
  font: inherit; font-size: 16px; background: var(--kBg13); color: var(--kInk1);
}

#toast {
  flex-basis: 100%; max-width: 420px; background: var(--glass); border-radius: 12px; padding: 8px 12px;
  font-size: 14px; line-height: 1.35; pointer-events: none; text-align: center;
}
#toast:not(.on) { display: none; }
/* R21.2: where a message leads, as a button inside it */
.toastGo { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 9px; background: var(--hot); color: var(--hotInk); font-weight: 700; white-space: nowrap; }
.pb.wide.fix { min-height: 44px; margin-top: -4px; background: var(--hot); color: var(--hotInk); }
.pb.wide.fix small { color: var(--kInk2); }
.nameIn.find { width: 100%; min-height: 44px; margin-bottom: 6px; }
#toast.on { pointer-events: auto; cursor: pointer; }

#placeBar {
  position: absolute; left: 6px; right: 6px; bottom: calc(env(safe-area-inset-bottom, 0px) + 74px); z-index: 2;
  background: var(--glass); border-radius: 14px; padding: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
#placeWhat { font-weight: 700; font-size: 14px; flex: 1 1 140px; }
#placeWhy { flex-basis: 100%; font-size: 13px; color: var(--hot); min-height: 0; order: 3; }
#placeWhy:empty { display: none; }
#placeBtns { display: flex; gap: 6px; }
.pb {
  min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: var(--kBg2); color: var(--ink);
  font-size: 15px; font-weight: 600; cursor: pointer; padding: 0 12px;
}
.pb.go { background: var(--good); color: var(--kInk3); }
.pb.on { background: var(--hot); color: var(--hotInk); }
.pb:disabled { opacity: .4; }

#sheet { display: none; }

#sheet {
  position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 68px);
  max-height: 58%; display: flex; flex-direction: column; z-index: 3;   /* over the map's key */
  background: rgba(18, 44, 38, .96); border-radius: 16px 16px 0 0; box-shadow: 0 -4px 16px rgba(0, 0, 0, .3);
}
#sheetHead { display: flex; align-items: center; gap: 8px; padding: 8px 8px 4px 12px; }
#sheetTitle { flex: 1; font-weight: 700; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sheetBody { overflow-y: auto; padding: 4px 10px 12px; overscroll-behavior: contain; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.card2 {
  min-height: 84px; border: 1px solid var(--line); border-radius: 12px; background: var(--kBg14); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px;
  cursor: pointer; font-size: 12px; text-align: center;
}
.card2 .em { font-size: 28px; line-height: 1.1; }
.card2 .cost { color: var(--hot); font-weight: 700; font-variant-numeric: tabular-nums; }
.card2.locked { opacity: .45; }
.card2.sel { border-color: var(--hot); background: var(--kBg15); }
.row { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.row .lbl { flex: 1 1 120px; font-size: 14px; }
.meter { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 5px 0; }
.meter .name { width: 88px; color: var(--dim); }
.thought { font-size: 14px; margin: 4px 0; }
.small { font-size: 12px; color: var(--dim); line-height: 1.4; }
.pillrow { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.news { font-size: 13px; margin: 6px 0; line-height: 1.35; cursor: pointer; }


/* R-C15a: an overlay is a SCROLL REGION, not a centring box */
.ovl {
  position: absolute; inset: 0; display: none;
  align-items: flex-start; justify-content: center; overflow-y: auto;
  background: var(--kBg16); padding: 16px; overscroll-behavior: contain; z-index: 5;
}
.ovl.on { display: flex; }
.ovlCard {
  width: 100%; max-width: 340px; margin: auto; background: var(--kBg6);
  border: 1px solid var(--line); border-radius: 16px; padding: 16px; text-align: center;
}
.ovlCard h2 { margin: 4px 0 8px; font-size: 20px; }
.ovlCard p { color: var(--dim); font-size: 14px; line-height: 1.45; }

.card {
  background: var(--kBg4); border: 1px solid var(--kLine1); border-radius: 14px;
  padding: 12px; margin-bottom: 10px; font-size: 14px; line-height: 1.5; color: var(--dim);
}
.card h2 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }

footer { padding: 6px 10px calc(env(safe-area-inset-bottom, 0px) + 6px); text-align: center; }
.toast-host { position: fixed; left: 0; right: 0; bottom: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }

/* ---- Homebodies' own ------------------------------------------------------------ */
.h2 { font-size: 17px; margin: 18px 0 6px; }
.pickRow.two { grid-template-columns: 1fr 1fr; }
#homeList { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.homeCard {
  display: flex; align-items: center; gap: 8px; min-height: 56px; border: 2px solid transparent; border-radius: 14px;
  background: var(--kBg2); color: var(--ink); padding: 6px 10px; cursor: pointer; text-align: left; font-size: 14px;
}
.homeCard.sel { border-color: var(--hot); }
.homeCard .em { font-size: 26px; }
.homeCard .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.homeCard .txt small { color: var(--dim); font-size: 12px; }
.homeCard .del { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--dim); font-size: 18px; cursor: pointer; }
button.chip { border: 0; color: var(--ink); font-family: inherit; cursor: pointer; }
.introLine { text-align: left; color: var(--ink); font-size: 15px; margin: 8px 0; }
.vb[aria-pressed="true"] { background: var(--hot); color: var(--hotInk); }
.pb.wide { width: 100%; margin: 6px 0; text-align: left; min-height: 48px; }
.pb.wide small { display: block; font-weight: 400; font-size: 12px; color: var(--dim); }
.pb.wide:disabled small { color: var(--ink); }
.step { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: var(--kBg2); color: var(--ink); font-size: 18px; cursor: pointer; }
.num { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }

/* the household's panel: faces, what the chosen one is doing, and the eight needs (R14.3) */
#live {
  position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 68px);
  background: linear-gradient(to top, var(--kBg10), var(--kBg11)); padding: 4px 6px 2px;
}
#liveTop { display: flex; align-items: center; gap: 6px; height: 50px; }
#faces { display: flex; gap: 4px; flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; max-width: 62%; }
#faces::-webkit-scrollbar { display: none; }
.faceBtn {
  position: relative; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px; border: 3px solid transparent; padding: 0;
  background: var(--kBg2); color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; overflow: hidden;
}
.faceBtn canvas { display: block; width: 40px; height: 40px; }
.faceBtn.sel { border-color: var(--hot); }
.faceBtn i { position: absolute; right: 0; bottom: 0; font-style: normal; font-size: 13px; line-height: 1; background: var(--kBg17); border-radius: 6px 0 0 0; padding: 1px 2px; }
.faceBtn u { position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 0 0 6px 0; text-decoration: none; }
#queue { display: flex; gap: 3px; flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; justify-content: flex-end; }
#queue::-webkit-scrollbar { display: none; }
.qBtn { flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--kBg18); font-size: 20px; cursor: pointer; padding: 0; }
.qBtn.now { background: var(--kBg19); }
#needs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px 6px; padding: 2px 0 4px; }
.need { display: flex; align-items: center; gap: 3px; font-size: 13px; height: 20px; min-width: 0; }
.need span { flex: 0 0 18px; text-align: center; }
.need i { flex: 1 1 0; min-width: 0; height: 10px; border-radius: 5px; background: var(--kBg20); overflow: hidden; display: block; }
.need i s { display: block; height: 100%; width: 50%; border-radius: 5px; background: var(--good); text-decoration: none; }
.need i s.mid { background: var(--kBg21); } .need i s.low { background: var(--bad); }
@media (min-width: 700px) { #live { left: auto; right: 6px; width: 420px; border-radius: 14px 14px 0 0; } #needs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .need { height: 22px; } }

/* what people say and think, over their heads (R13.6) */
.sign.say { border-radius: 12px 12px 12px 2px; }
.sign.think { border-radius: 50%; background: var(--kBg22); }
.sign.float { background: transparent; box-shadow: none; font-weight: 800; font-size: 20px; transition: transform 1.2s ease-out, opacity 1.2s; }

/* a sheet's rows: a bar with a name, and people */
.bar { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 6px 0; }
.bar .name { flex: 0 0 104px; }
.bar i { flex: 1 1 0; height: 12px; border-radius: 6px; background: var(--kBg20); overflow: hidden; display: block; }
.bar i s { display: block; height: 100%; background: var(--good); text-decoration: none; }
.bar i s.neg { background: var(--bad); }
.bar b { flex: 0 0 34px; text-align: right; font-variant-numeric: tabular-nums; }
.swatch { width: 100%; height: 34px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .3); }
.hintLine { font-size: 13px; color: var(--dim); margin: 2px 0 8px; line-height: 1.4; }

/* making a household */
.makeCard { background: var(--kBg4); border: 1px solid var(--kLine1); border-radius: 14px; padding: 10px; margin: 8px 0; }
.makeTop { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.makeTop canvas { flex: 0 0 72px; width: 72px; height: 96px; border-radius: 10px; background: var(--kBg7); }
.makeTop .col { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lookRow { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.lookRow .lbl { flex: 1 1 90px; font-size: 13px; }
.lookRow .dot { flex: 0 0 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); }
.trait { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-size: 13px; }
.trait .lbl { flex: 0 0 92px; }
.trait .pips { flex: 1 1 0; display: flex; gap: 2px; }
.trait .pips i { flex: 1 1 0; height: 10px; border-radius: 3px; background: var(--kBg20); }
.trait .pips i.on { background: var(--hot); }
.legendRow { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.legendRow .em { flex: 0 0 34px; font-size: 22px; text-align: center; }
/* the shop and the builder's tools are many: each keeps a readable width and the row scrolls */
#tools[data-mode="buy"] .tool, #tools[data-mode="build"] .tool { flex: 0 0 66px; }
.card2 .thumb { width: 88px; height: 69px; display: block; }
.makeTop .nameIn { flex: 0 0 44px; height: 44px; width: 100%; }
/* a short screen: the note under the top row is one line, so the house is not behind it */
@media (max-height: 640px) { #nextChip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; } }
/* the weather: a small picture in the corner of the clock, out of the flow (R14.6) */
#chipClock { position: relative; }
#hudWeather { position: absolute; right: 3px; top: 2px; font-style: normal; font-size: 12px; line-height: 1; pointer-events: none; }
.faceBtn.pet { font-size: 24px; }
