:root {
  --ink: #2e382f;
  --muted: #718071;
  --cream: #fbf7e9;
  --paper: #fffdf5;
  --leaf: #52735a;
  --leaf-dark: #345443;
  --leaf-soft: #dce8d4;
  --clover: #8fac78;
  --soil: #75563e;
  --soil-dark: #493429;
  --soil-soft: #ead8c5;
  --gold: #e2b95d;
  --pink: #df9eb2;
  --purple: #8c7295;
  --shadow: 0 18px 55px rgba(20, 31, 25, .24);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior: none;
}

body {
  min-height: 100svh;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 15%, rgba(135, 165, 122, .17), transparent 28rem),
    radial-gradient(circle at 85% 88%, rgba(188, 145, 103, .14), transparent 30rem),
    #213129;
  font-family: Inter, ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { touch-action: manipulation; }
.hidden { display: none !important; }

.game-shell {
  width: min(1100px, calc(100vw - 20px));
  height: 100svh;
  margin: 0 auto;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ---------- shared game chrome ---------- */
.topbar,
.rolebar {
  width: 100%;
  flex: 0 0 auto;
  background: rgba(255, 253, 245, .98);
  border: 1px solid rgba(255, 255, 255, .35);
}

.topbar {
  min-height: 60px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 6px 30px rgba(14, 24, 18, .18);
  border-bottom-color: #e9e2d1;
}

.mini-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--leaf-dark);
  letter-spacing: -.03em;
  white-space: nowrap;
}

.mini-brand > span:last-child { display: flex; align-items: baseline; gap: 3px; }
.mini-brand i { color: #aa8e67; font-family: Georgia, serif; font-weight: 400; }
.brand-sprout { font-size: 27px; line-height: 1; transform: rotate(-20deg); }

.season-clock {
  min-width: 150px;
  display: grid;
  gap: 5px;
}

#seasonPill {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #41513f;
}

#seasonBar,
.growth-track {
  height: 6px;
  border-radius: 99px;
  background: #e7e3d7;
  overflow: hidden;
}

#seasonFill,
#growthFill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--clover);
  transition: width .35s ease, background-color .5s ease;
}

.colony-readout {
  min-width: 100px;
  display: grid;
  gap: 5px;
}

#antInfo { font-size: 13px; font-weight: 800; white-space: nowrap; }
#growthFill { background: linear-gradient(90deg, var(--gold), #edcf7d); }

.soft-pill,
.score-pill,
#roleInfo {
  padding: 7px 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.soft-pill {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #677462;
  background: #eff2e6;
}

.score-pill { color: #8a6828; background: #fff2c9; }
#roleInfo { color: #6a705f; background: #f3efe4; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }

button {
  border: 0;
  border-radius: 11px;
  color: white;
  background: var(--leaf);
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease, opacity .15s ease;
}

button:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(1px) scale(.985); }
button:focus-visible { outline: 3px solid rgba(226, 185, 93, .65); outline-offset: 2px; }
button:disabled { opacity: .46; cursor: default; }

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #667264;
  background: #eeeade;
  font-weight: 800;
}

.icon-button.on { color: white; background: #a7774c; }

.rolebar {
  min-height: 76px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 0;
  border-bottom-color: rgba(54, 69, 56, .12);
}

.bloom-bar { background: #f3f7e9; }
.burrow-bar { background: #f6eee5; }

.role-title {
  min-width: 132px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.role-title > span:last-child { display: grid; }
.role-title b { color: var(--leaf-dark); font-size: 15px; }
.role-title small { color: var(--muted); font-size: 10px; }
.burrow-bar .role-title b { color: var(--soil-dark); }

.role-orb {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 21px;
}

.bloom-orb { color: #507757; background: #dcebd5; }
.burrow-orb { color: #76533e; background: #ead6c1; }

.task-card,
.meter-card {
  min-height: 48px;
  padding: 7px 11px;
  border: 1px solid rgba(80, 96, 77, .11);
  border-radius: 12px;
  background: rgba(255, 255, 255, .62);
  display: grid;
  align-content: center;
  gap: 1px;
  white-space: nowrap;
}

.task-card small,
.meter-card small { color: #7a8775; font-size: 10px; }
.task-card b,
.meter-card b { font-size: 13px; }

.primary-action,
.focus-action,
.room-tool {
  min-height: 49px;
  padding: 6px 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: left;
  font-weight: 750;
}

.primary-action > span:first-child,
.room-tool > span:first-child { font-size: 19px; }
.primary-action > span:last-child,
.room-tool > span:last-child { display: grid; }
.primary-action small,
.room-tool small { font-size: 9px; font-weight: 600; opacity: .75; }
.primary-action { background: #587b59; }
.primary-action.on { color: #433922; background: var(--gold); box-shadow: 0 0 0 3px rgba(226, 185, 93, .24); }

.focus-action {
  min-width: 94px;
  min-height: 49px;
  padding: 6px 11px;
  display: grid;
  align-content: center;
  border: 1px solid rgba(90, 66, 51, .12);
  color: #596749;
  background: #e6ecd4;
  text-align: left;
}
.focus-action span { color: #8a796a; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.focus-action b { display: grid; font-size: 11px; white-space: nowrap; }
.focus-action small { color: #887b6d; font-size: 8px; font-weight: 650; }
.focus-action.nursery-focus { color: #704c59; background: #f0d9df; }
.focus-action.pantry-focus { color: #725a2f; background: #efe0ba; }

.brood-action {
  min-width: 88px;
  min-height: 49px;
  padding: 6px 10px;
  display: grid;
  align-content: center;
  color: #704c59;
  background: #f0d9df;
  border: 1px solid rgba(112, 76, 89, .12);
  text-align: left;
}
.brood-action span { color: #94717d; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.brood-action b { font-size: 11px; white-space: nowrap; }
.brood-action.reserving { color: #5b5942; background: #ebe7c9; }

.room-tools { display: flex; gap: 7px; }
.room-tool { min-width: 104px; color: #5d4a3c; background: #e5d4c3; }
.room-tool.active { color: white; background: #765844; box-shadow: 0 0 0 3px rgba(117, 86, 62, .18); }

.pantry {
  min-height: 49px;
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(80, 62, 48, .11);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .62);
}

.pantry-item {
  min-width: 57px;
  padding: 5px 9px;
  display: grid;
  place-items: center;
  align-content: center;
  border-right: 1px solid rgba(80, 62, 48, .09);
}
.pantry-item:last-child { border-right: 0; }
.pantry-item b { font-size: 13px; }
.pantry-item small { color: #8a796a; font-size: 9px; }

.role-hint {
  max-width: 260px;
  margin: 0 0 0 auto;
  color: #748071;
  font-size: 11px;
  line-height: 1.4;
}
.role-hint b { color: #485947; }

.supplybar {
  width: min(1100px, 100%);
  min-height: 46px;
  margin: 0 auto;
  padding: 6px 14px;
  display: grid;
  grid-template-columns: .75fr 1.15fr 1.6fr;
  gap: 8px;
  border-bottom: 1px solid rgba(76, 91, 68, .13);
  background: #edf2e5;
}
.recipe-card,
.supply-card {
  min-width: 0;
  padding: 5px 9px;
  display: grid;
  align-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,.58);
  line-height: 1.15;
}
.recipe-card {
  padding-inline: 5px;
  background: transparent;
  opacity: .68;
}
.recipe-card small,
.supply-card small { color: #7b8874; font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.recipe-card small { font-size: 7px; }
.recipe-card b,
.supply-card b { overflow: hidden; color: #42513f; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.recipe-card b { font-size: 9px; font-weight: 650; }
.supply-card.near-full { background: #f2e3c8; }
.supply-card.near-full b { color: #795f35; }
.supply-card.shortage { background: #f1ded1; }
.supply-card.shortage b { color: #835a41; }
.pantry-item.full { color: #735b32; background: #f0dfbd; }

.wishbar {
  width: min(1100px, 100%);
  min-height: 54px;
  margin: 0 auto;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(105, 82, 43, .14);
  background: linear-gradient(90deg, #fff8d9, #f9ecd0);
  position: relative;
  z-index: 10;
  pointer-events: auto;
}
.wish-copy { min-width: 150px; display: grid; line-height: 1.15; }
.wish-copy small { color: #9b7b45; font-size: 9px; text-transform: uppercase; letter-spacing: .09em; }
.wish-copy b { color: #55472e; font-size: 12px; }
.wish-choices { flex: 1; display: flex; gap: 8px; }
.wish-choices button,
.wish-choices .wish-option {
  min-width: 0;
  flex: 1;
  padding: 5px 9px;
  display: grid;
  grid-template-columns: 23px 1fr;
  column-gap: 5px;
  color: #59492e;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(139,104,48,.16);
  text-align: left;
  pointer-events: auto;
}
.wish-choices .wish-option { opacity: .7; pointer-events: none; }
.wish-choices button > span,
.wish-choices .wish-option > span { grid-row: 1 / 3; align-self: center; font-size: 17px; }
.wish-choices button b,
.wish-choices .wish-option b { font-size: 11px; }
.wish-choices button small,
.wish-choices .wish-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; opacity: .72; }
.wish-progress { flex: 1; display: flex; align-items: center; gap: 8px; }
.wish-good { padding: 5px 9px; border-radius: 10px; color: #63533b; background: rgba(255,255,255,.62); font-size: 11px; font-weight: 750; }
.wish-good.done { color: #fff; background: #67805d; }
.wish-progress > small { color: #86734f; font-size: 10px; }
.wish-complete { color: #58724f; font-size: 12px; }

.stage {
  min-height: 0;
  flex: 1 1 auto;
  position: relative;
  display: grid;
  place-items: start center;
}

canvas {
  display: block;
  max-width: 100%;
  border-radius: 0 0 18px 18px;
  background: #9eb97c;
  box-shadow: var(--shadow);
  touch-action: none;
}

.canvas-prompt {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  max-width: min(430px, 84%);
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 99px;
  color: #fffdf3;
  background: rgba(44, 59, 47, .82);
  box-shadow: 0 7px 24px rgba(22, 32, 25, .25);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
  animation: prompt-in .35s ease-out;
}

@keyframes prompt-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
}

/* ---------- overlays & lobby ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(122, 157, 112, .2), transparent 32rem),
    radial-gradient(circle at 80% 90%, rgba(183, 131, 90, .18), transparent 28rem),
    rgba(29, 45, 36, .96);
  backdrop-filter: blur(8px);
}

.panel {
  width: min(780px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 27px;
  background:
    radial-gradient(circle at 0 0, rgba(143, 172, 120, .11), transparent 18rem),
    var(--cream);
  box-shadow: 0 26px 80px rgba(8, 20, 13, .38);
  text-align: center;
  animation: panel-in .45s cubic-bezier(.2, .75, .25, 1);
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
}

.eyebrow,
.card-kicker {
  color: #8a987e;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.lobby-mark {
  height: 42px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--leaf);
  font-size: 24px;
}
.lobby-mark span:nth-child(2) { font-size: 19px; }
.lobby-mark span:nth-child(3) { color: var(--soil); }

.panel h1 {
  margin: 2px 0 7px;
  color: #365343;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 500;
  letter-spacing: -.04em;
}
.panel h1 i { color: #aa845e; font-weight: 400; }
.panel .lede { margin: 0 auto 25px; color: #718071; font-size: 15px; }

.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; }
.rolecard {
  position: relative;
  min-height: 250px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(81, 105, 77, .12);
  border-radius: 21px;
  overflow: hidden;
}
.rolecard::after {
  content: '';
  position: absolute;
  right: -35px;
  bottom: -55px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  pointer-events: none;
}
.rolecard.bloom { background: linear-gradient(145deg, #e7efda, #dce8d0); }
.rolecard.burrow { background: linear-gradient(145deg, #efdfce, #e6cfb9); }
.card-icon {
  width: 45px;
  height: 45px;
  margin-bottom: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--leaf);
  background: rgba(255, 255, 255, .56);
  font-size: 23px;
}
.burrow .card-icon { color: var(--soil); }
.rolecard h2 { margin: 3px 0 7px; color: #3d5644; font-family: Georgia, serif; font-size: 23px; font-weight: 600; }
.rolecard.burrow h2 { color: #654936; }
.rolecard p { margin: 0 0 19px; color: #687467; font-size: 13px; line-height: 1.55; }
.rolecard button {
  width: 100%;
  margin-top: auto;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  background: #52735a;
  font-size: 13px;
  font-weight: 800;
}
.rolecard.burrow button { background: #76563f; }
.rolecard .taken { min-height: 0; margin: 8px 0 0; color: #9a594c; font-weight: 800; text-align: center; }

.cozy-note {
  max-width: 560px;
  margin: 18px auto 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 13px;
  color: #778174;
  background: rgba(255, 255, 255, .54);
  font-size: 12px;
}
.cozy-note > span:first-child { font-size: 18px; }
.chronicle { margin: 12px 0 0; color: #8c6b33; font-size: 12px; }

.waiting-panel,
.pause-panel { width: min(560px, 100%); }
.waiting-ants,
.rest-mark { margin-bottom: 6px; color: #69806e; font-size: 31px; letter-spacing: .12em; }
.rest-mark { font-family: Georgia, serif; font-size: 44px; }

.share-box {
  padding: 13px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  align-items: center;
  border: 1px solid #dfe3d5;
  border-radius: 15px;
  background: white;
  text-align: left;
}
.share-box small { grid-column: 1 / -1; color: #8a9483; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.share-box a { min-width: 0; overflow: hidden; color: #4f6e57; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.share-box button { padding: 8px 11px; font-size: 11px; }
.or { margin: 15px 0; display: flex; align-items: center; gap: 10px; color: #9a9f94; font-size: 11px; }
.or::before, .or::after { content: ''; height: 1px; flex: 1; background: #dddcd3; }
.bot-button,
/* Bloom spends one rare seed on three very different things, so the tools sit
   together and read as a single choice. */
.seed-tools { display: flex; align-items: center; gap: 6px; }
.seed-tool {
  min-width: 74px;
  padding: 6px 9px;
  display: grid;
  gap: 1px;
  color: #6b6152;
  background: #efe9dc;
  line-height: 1.15;
  text-align: center;
}
.seed-tool > span { font-size: 15px; }
.seed-tool > b { font-size: 11px; font-weight: 800; }
.seed-tool > small { color: #948a79; font-size: 9px; }
.seed-tool.on { color: #fffdf4; background: #8a6a3f; }
.seed-tool.on > small { color: rgba(255, 253, 244, .8); }
.seed-tool:disabled { opacity: .42; }
.seed-count { color: #8a9385; font-size: 11px; font-weight: 700; white-space: nowrap; }

.speed-row { margin: 4px 0 14px; }
.speed-row > small { display: block; margin-bottom: 7px; color: #8a9385; font-size: 11px; }
.speed-row #speedChoices { display: flex; justify-content: center; gap: 6px; }
.speed-row button {
  min-width: 52px;
  padding: 8px 12px;
  color: #667264;
  background: #eeeade;
  font-weight: 800;
}
.speed-row button.on { color: white; background: #765f83; }

.pause-panel > button { padding: 12px 20px; background: #765f83; font-weight: 800; }
.pause-panel > .restart-colony-button {
  margin-left: 8px;
  color: #765e52;
  background: #eadfd4;
}
.pause-panel > .restart-colony-button.armed { color: white; background: #a65f50; }
.microcopy { margin: 9px 0 0; color: #8a9385; font-size: 11px; }

/* ---------- feedback ---------- */
#toasts {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 43;
  width: min(510px, calc(100vw - 30px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 7px;
  pointer-events: none;
}
.toast {
  max-width: 100%;
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 99px;
  color: #fffdf5;
  background: rgba(54, 79, 61, .93);
  box-shadow: 0 7px 26px rgba(18, 27, 21, .25);
  font-size: 12px;
  text-align: center;
  animation: toast-in .28s ease-out;
}
.toast.bad { background: rgba(132, 78, 61, .95); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }

.coach {
  position: fixed;
  left: 50%;
  bottom: 72px;
  z-index: 42;
  width: min(520px, calc(100vw - 30px));
  padding: 10px 11px 10px 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(196, 168, 104, .65);
  border-radius: 15px;
  color: #4d4e3d;
  background: rgba(255, 252, 236, .97);
  box-shadow: 0 12px 38px rgba(21, 31, 24, .28);
  font-size: 12px;
  animation: prompt-in .35s ease-out;
}
.coach-ant { font-size: 19px; }
.coach b { color: #49674f; }
#coachText { flex: 1; line-height: 1.45; }
#coachSkip { padding: 1px 6px; color: #9c927d; background: transparent; font-size: 18px; }

.postcard {
  position: fixed;
  left: 50%;
  top: 18%;
  z-index: 45;
  min-width: min(390px, calc(100vw - 30px));
  padding: 22px 28px;
  transform: translateX(-50%) rotate(-1deg);
  border: 1px solid #e4d8ba;
  border-radius: 5px;
  color: #536250;
  background: #fffaf0;
  box-shadow: 0 18px 55px rgba(21, 28, 22, .34);
  text-align: center;
  pointer-events: none;
  animation: postcard-in .55s cubic-bezier(.15, .75, .2, 1);
}
.postcard::before { content: '❧'; position: absolute; top: 8px; left: 12px; color: #9caf8b; font-size: 24px; }
.postcard h2 { margin: 0 0 3px; color: #49644e; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.postcard p { margin: 4px 0; font-size: 12px; }
.postcard .pc-tier { color: #9a7a53; font-family: Georgia, serif; font-size: 14px; font-style: italic; }
.postcard .pc-score { margin-top: 9px; color: #9b762e; font-size: 16px; font-weight: 800; }
@keyframes postcard-in { from { opacity: 0; transform: translate(-50%, -15px) rotate(-3deg) scale(.95); } }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .game-shell { width: 100vw; padding-top: 0; }
  .topbar { min-height: 48px; gap: 8px; padding: 6px 8px; border-radius: 0; }
  .mini-brand { display: none; }
  .season-clock { min-width: 104px; }
  #seasonPill { font-size: 10px; }
  .colony-readout { min-width: 80px; }
  #antInfo { font-size: 11px; }
  .soft-pill { display: none; }
  .score-pill { padding: 5px 8px; font-size: 10px; }
  #roleInfo { display: none; }
  .icon-button { width: 30px; height: 30px; }

  .rolebar { min-height: 62px; gap: 7px; padding: 6px 8px; }
  .role-title { min-width: auto; }
  .role-title > span:last-child { display: none; }
  .role-orb { width: 34px; height: 34px; font-size: 18px; }
  .task-card, .meter-card { min-height: 42px; padding: 5px 8px; }
  .task-card small, .meter-card small { font-size: 8px; }
  .task-card b, .meter-card b { font-size: 11px; }
  .primary-action, .focus-action, .room-tool { min-height: 42px; padding: 5px 9px; font-size: 11px; }
  .primary-action > span:first-child, .room-tool > span:first-child { font-size: 16px; }
  .role-hint { display: none; }
  .pantry-item { min-width: 47px; padding: 4px 6px; }
  .focus-action { min-width: 82px; padding: 5px 8px; }
  .room-tool { min-width: 78px; }
  .room-tool small { font-size: 8px; }
  canvas { border-radius: 0; }
}

@media (max-width: 560px) {
  body[data-role="burrow"] .stage { background: #604332; }
  .overlay { align-items: flex-start; padding: 10px; }
  .panel { margin: auto 0; padding: 22px 15px; border-radius: 22px; }
  .panel h1 { font-size: 34px; }
  .panel .lede { margin-bottom: 17px; font-size: 13px; }
  .roles { grid-template-columns: 1fr; gap: 9px; }
  .rolecard { min-height: 0; padding: 15px; display: grid; grid-template-columns: 39px 1fr; gap: 4px 11px; }
  .rolecard .card-icon { grid-row: 1; width: 39px; height: 39px; margin: 0; font-size: 19px; }
  .rolecard > div:nth-child(2) { grid-column: 2; }
  .rolecard h2 { margin-top: 1px; font-size: 19px; }
  .rolecard p { margin-bottom: 8px; font-size: 11px; }
  .rolecard button, .rolecard .taken { grid-column: 1 / -1; }
  .cozy-note { margin-top: 11px; text-align: left; }
  .lobby-mark { display: none; }

  .season-clock { min-width: 88px; }
  #seasonBar { width: 88px; }
  .colony-readout { min-width: 68px; }
  .score-pill { display: none; }
  .top-actions { margin-left: auto; }
  .roomInfo { display: none; }
  .burrow-bar .meter-card { display: none; }
  .burrow-bar .role-orb { display: none; }
  .burrow-bar { justify-content: space-between; }
  .pantry { flex: 1; min-width: 96px; }
  .pantry { min-width: 108px; }
  .pantry-item { flex: 1; min-width: 34px; padding: 4px 2px; }
  .pantry-item b { font-size: 10px; }
  .pantry-item small { display: none; }
  .room-tools { flex: 0; }
  .focus-action { min-width: 60px; padding-inline: 5px; }
  .focus-action b { font-size: 9px; }
  .focus-action small { font-size: 7px; }
  .brood-action { min-width: 57px; padding-inline: 5px; }
  .brood-action span { font-size: 7px; }
  .brood-action b { font-size: 9px; }
  .room-tools { gap: 3px; }
  .room-tool { min-width: 34px; padding-inline: 4px; }
  .room-tool > span:last-child { display: none; }
  .bloom-bar .role-orb { display: none; }
  .bloom-bar .task-card { flex: 1; }
  .bloom-bar { gap: 4px; }
  .bloom-bar .task-card,
  .bloom-bar .meter-card { min-width: 70px; padding-inline: 5px; }
  .bloom-bar .task-card small,
  .bloom-bar .meter-card small { display: block; overflow: hidden; text-overflow: ellipsis; }
  .bloom-bar .meter-card b { text-align: center; }
  .bloom-bar .meter-card small { max-width: 88px; overflow: hidden; text-overflow: ellipsis; }
  .supplybar { min-height: 44px; padding: 4px 8px; grid-template-columns: .8fr 1fr 1.25fr; gap: 4px; }
  .recipe-card, .supply-card { padding: 3px 6px; }
  .recipe-card small, .supply-card small { font-size: 6px; }
  .recipe-card b, .supply-card b { font-size: 8px; }
  .recipe-card small { display: none; }
  .recipe-card b { font-size: 7px; white-space: normal; }
  .wishbar { min-height: 58px; padding: 5px 8px; gap: 6px; }
  .wish-copy { min-width: 82px; }
  .wish-copy small { font-size: 7px; }
  .wish-copy b { font-size: 9px; }
  .wish-choices { gap: 5px; }
  .wish-choices button, .wish-choices .wish-option { padding: 4px 5px; grid-template-columns: 18px 1fr; column-gap: 3px; }
  .wish-choices button > span, .wish-choices .wish-option > span { font-size: 14px; }
  .wish-choices button b, .wish-choices .wish-option b { font-size: 9px; }
  .wish-choices button small, .wish-choices .wish-option small { font-size: 7px; }
  .wish-progress { gap: 4px; }
  .wish-good { padding: 4px 6px; font-size: 9px; }
  .wish-progress > small { max-width: 88px; font-size: 8px; }
  .canvas-prompt { bottom: 12px; border-radius: 14px; }
  .coach { bottom: 58px; }
  #toasts { bottom: 10px; }
}

@media (max-height: 540px) {
  .overlay { align-items: flex-start; }
  .panel { margin: 8px 0; }
  .topbar { min-height: 42px; }
  .rolebar { min-height: 52px; }
  .role-orb { width: 30px; height: 30px; }
  .task-card, .meter-card, .primary-action, .focus-action, .room-tool, .pantry { min-height: 36px; }
  .coach { bottom: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
