/* Chore Realms starter: warm wood and parchment, big touch targets. */
:root {
  --wood: #7a5233;
  --wood-dark: #4f3420;
  --wood-light: #a47548;
  --paper: #f6ecd6;
  --paper-edge: #e3d2ad;
  --ink: #3b2a1c;
  --muted: #7d6a55;
  --moss: #6f8f4e;
  --gold: #f5b81c; /* the logo's gold */
  --accent: #b86b3a;
}
body[data-kid="coz"] { --accent: #4f7f9c; }
body[data-kid="mimi"] { --accent: #b5647f; }
/* multi-family version: the accent follows the world (kid ids are each family's own) */
body[data-world="cozlandia"] { --accent: #4f7f9c; }
body[data-world="milandia"] { --accent: #b5647f; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 120px),
    linear-gradient(#d9c39a, #c9ad7f);
  font-size: 18px;
}
[hidden] { display: none !important; }
h1, h2, .brand { font-family: Georgia, "Times New Roman", serif; }

.sheet {
  background: var(--paper);
  border: 2px solid var(--paper-edge);
  border-radius: 14px;
  box-shadow: 0 6px 0 rgba(79,52,32,.25), 0 10px 24px rgba(0,0,0,.15);
}

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-sheet { width: min(380px, 100%); padding: 28px; text-align: center; }
.login-sheet h1 { margin: 0 0 6px; color: var(--wood-dark); }
.google-btn { display: block; text-decoration: none; margin-top: 14px; }
.login-or { margin: 12px 0 4px; opacity: .7; }
.email-form { display: grid; gap: 10px; }
.login-msg { color: var(--wood-dark); }
.login-sheet input {
  width: 100%; font-size: 22px; padding: 14px; margin: 14px 0;
  border: 2px solid var(--paper-edge); border-radius: 10px; background: #fffaf0; text-align: center;
}
.big-btn {
  width: 100%; font-size: 22px; padding: 14px; border: 0; border-radius: 12px; cursor: pointer;
  color: #fff8e8; background: var(--moss); box-shadow: 0 4px 0 #4d6735; font-weight: bold;
}
.big-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #4d6735; }
.error { color: #a23b2a; min-height: 1.2em; margin: 10px 0 0; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px;
  background: repeating-linear-gradient(0deg, var(--wood) 0 22px, var(--wood-dark) 22px 24px);
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}
.brand { color: #f3e2bf; font-size: 22px; font-weight: bold; }
.kid-tabs { display: flex; gap: 10px; flex: 1; justify-content: center; }
.kid-tab {
  font: inherit; font-size: 22px; font-weight: bold; padding: 12px 28px; min-width: 120px; cursor: pointer;
  border: 3px solid var(--wood-dark); border-radius: 14px; color: var(--ink);
  background: #e8d6b0; box-shadow: 0 4px 0 var(--wood-dark);
}
.kid-tab.active { background: var(--paper); border-color: var(--gold); outline: 3px solid var(--accent); }
.kid-tab:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--wood-dark); }
.coin-pill {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  background: var(--wood-dark); color: #ffe7a3; font-size: 24px; border: 2px solid var(--wood-light);
}
.coin {
  width: 24px; height: 24px; border-radius: 50%; display: inline-block;
  background: radial-gradient(circle at 35% 35%, #fff2b0, var(--gold) 55%, #a87b17);
  border: 2px solid #8a6312;
}
.coin.small { width: 16px; height: 16px; margin-left: 4px; vertical-align: -2px; }

/* world */
.world { max-width: 760px; margin: 0 auto; padding: 18px 16px 40px; }
.hello { font-size: 26px; font-weight: bold; color: var(--wood-dark); margin: 6px 0 14px; }
.window-label { font-size: 18px; font-weight: normal; color: var(--muted); }
h2 { color: var(--wood-dark); font-size: 22px; margin: 22px 0 10px; border-bottom: 3px dashed rgba(79,52,32,.25); padding-bottom: 6px; }
.chores { display: grid; gap: 12px; }
.chore {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  padding: 16px 18px; font: inherit; color: inherit;
  background: var(--paper); border: 2px solid var(--paper-edge); border-left: 8px solid var(--accent);
  border-radius: 14px; box-shadow: 0 4px 0 rgba(79,52,32,.22);
}
.chore:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(79,52,32,.22); }
.chore.done { background: #e9efd9; border-left-color: var(--moss); }
.chore.done .chore-title { text-decoration: line-through; color: var(--muted); }
.check {
  flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  border: 3px solid var(--wood-light); background: #fffaf0; font-size: 28px; color: var(--moss); font-weight: bold;
}
.chore.done .check { border-color: var(--moss); }
.chore-text { flex: 1; display: grid; gap: 2px; }
.chore-title { font-size: 22px; font-weight: bold; }
.chore-note { font-size: 15px; color: var(--muted); }
.chore-coins { flex: none; font-size: 20px; font-weight: bold; color: #8a6312; }
.empty { color: var(--muted); font-size: 20px; text-align: center; padding: 18px; }

.letter {
  background: #fff7e3; border: 2px solid var(--paper-edge); border-radius: 6px; padding: 14px 18px; margin-bottom: 10px;
  box-shadow: 0 3px 0 rgba(79,52,32,.18); transform: rotate(-0.4deg);
}
.letter-title { margin: 0; font-size: 21px; font-family: Georgia, serif; }
.letter-sign { margin: 6px 0 0; text-align: right; font-style: italic; color: var(--muted); }
.money { margin-top: 20px; color: var(--wood-dark); font-weight: bold; text-align: center; }

.footer { display: flex; gap: 10px; justify-content: center; padding: 0 0 28px; }
.small-btn {
  font: inherit; font-size: 15px; padding: 8px 14px; cursor: pointer; color: var(--wood-dark);
  background: rgba(246,236,214,.7); border: 2px solid var(--paper-edge); border-radius: 10px;
}
.loading { position: fixed; inset: 0; display: grid; place-items: center; font-size: 24px; color: var(--wood-dark); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10;
  background: var(--wood-dark); color: #ffe7a3; padding: 12px 20px; border-radius: 12px; font-size: 20px;
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
}

@media (max-width: 560px) {
  .topbar { justify-content: space-between; }
  .kid-tabs { order: 3; flex-basis: 100%; }
  .kid-tab { flex: 1; }
}

/* "2 more chores show up this afternoon" hint under Today's chores */
.later-list { margin-top: 6px; }
.later-head { margin: 14px 0 6px; font-size: 18px; color: var(--muted); }
.later { margin: 4px 0; text-align: center; color: var(--muted); font-size: 17px; font-style: italic; cursor: default; }

/* ---------- world travel (replaces the kid tabs) ---------- */
.kid-tabs { position: relative; }
.travel-btn {
  display: flex; align-items: center; gap: 10px; font: inherit; cursor: pointer; padding: 6px 18px 6px 10px;
  border: 3px solid var(--wood-dark); border-radius: 14px; color: var(--ink);
  background: #e8d6b0; box-shadow: 0 4px 0 var(--wood-dark); text-align: left;
}
.travel-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--wood-dark); }
.travel-text { display: flex; flex-direction: column; line-height: 1.1; }
.travel-text small { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.travel-text b { font-family: Georgia, serif; font-size: 22px; }
.travel-icon {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 35%, #9fd6e8 0 30%, #4f8fb8 60%, #2f5f86); border: 2px solid var(--wood-dark);
  box-shadow: inset -4px -3px 0 rgba(0,0,0,.18);
}
.travel-menu {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 30;
  display: grid; gap: 8px; padding: 10px; min-width: 260px;
  background: var(--paper); border: 2px solid var(--paper-edge); border-radius: 14px;
  box-shadow: 0 6px 0 rgba(79,52,32,.25), 0 12px 28px rgba(0,0,0,.25);
}
.travel-pick {
  display: flex; align-items: center; gap: 12px; font: inherit; text-align: left; cursor: pointer; padding: 12px 14px;
  border: 2px solid var(--paper-edge); border-radius: 12px; background: #fffaf0; color: var(--ink);
}
.travel-pick span:last-child { display: flex; flex-direction: column; }
.travel-pick b { font-size: 20px; font-family: Georgia, serif; }
.travel-pick small { color: var(--muted); font-size: 14px; }
.travel-pick.here { border-color: var(--accent); cursor: default; }
.travel-pick:not(.here):hover { background: #fff3dc; }
.travel-dot { width: 26px; height: 26px; border-radius: 50%; flex: none; border: 2px solid var(--wood-dark); background: #b9a27a; }
.travel-dot[data-world="cozlandia"] { background: radial-gradient(circle at 50% 38%, #e3263f 0 18%, #ffb9cc 20% 52%, #f9a8c4 54% 70%, #c58a4a 72%); }
.travel-dot[data-world="milandia"] { background: radial-gradient(circle at 50% 50%, #ffd84a 0 14%, #ec5f97 16% 58%, #4cc6b8 60%); }

/* ---------- 3D world: full screen scene ---------- */
.world3d { position: fixed; inset: 0; z-index: 0; background: #8fc3e6; }
.world3d-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.world3d-canvas[hidden] { display: none; }
.world-hud { position: fixed; left: 14px; bottom: 14px; z-index: 4; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.world-name {
  font-family: Georgia, serif; font-style: italic; font-size: 22px; color: #fff8ec; letter-spacing: .04em;
  text-shadow: 0 2px 0 rgba(79,52,32,.55), 0 0 12px rgba(0,0,0,.25); padding: 4px 6px;
}
.world-name { display: grid; line-height: 1.15; }
.world-theme { font-size: 16px; font-style: normal; letter-spacing: .02em; opacity: .95; }
.world-name.renamable { pointer-events: auto; cursor: pointer; border-radius: 10px; min-height: 44px; align-content: center; }
.world-name.renamable:hover, .world-name.renamable:focus-visible { background: rgba(0,0,0,.18); outline: 3px solid #fff8ec; outline-offset: 2px; }
.land-input { display: block; width: 100%; font: inherit; font-size: 20px; padding: 10px 12px; margin: 8px 0 12px; border: 2px solid var(--paper-edge); border-radius: 10px; background: #fffaf0; }
.travel-head { margin: 8px 10px 4px; font-size: 15px; font-weight: bold; color: var(--wood-dark); }
.world-views { display: flex; gap: 6px; pointer-events: auto; }
.view-btn {
  font: inherit; font-size: 15px; padding: 8px 12px; cursor: pointer; color: var(--wood-dark);
  background: rgba(246,236,214,.86); border: 2px solid var(--wood-dark); border-radius: 10px; box-shadow: 0 3px 0 var(--wood-dark);
}
.view-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--wood-dark); }
body.in-3d:not(.portal) { overflow: hidden; } /* the setup pages (the quest editor from parent mode) still scroll */
body.in-3d .topbar { position: fixed; left: 0; right: 0; top: 0; background: repeating-linear-gradient(0deg, rgba(122,82,51,.94) 0 22px, rgba(79,52,32,.94) 22px 24px); }
body.in-3d .footer { position: fixed; z-index: 4; left: 14px; top: 84px; padding: 0; }
body.in-3d .footer .small-btn { font-size: 13px; padding: 6px 10px; background: rgba(246,236,214,.86); }

/* ---------- the chore board: opens when the cabin or hotel is tapped ---------- */
.board-head { display: none; }
body.in-3d .world { display: none; }
body.in-3d.board-open .world {
  display: block; position: fixed; z-index: 20; right: 14px; top: 84px; bottom: 14px; width: 360px; max-width: none; margin: 0;
  padding: 50px 18px 20px; overflow-y: auto; font-size: 16px;
  /* a wooden frame around a parchment board */
  background: linear-gradient(rgba(246,236,214,.97), rgba(240,226,196,.97));
  border: 10px solid var(--wood); border-image: repeating-linear-gradient(90deg, #8a5d3a 0 18px, #7a5233 18px 20px) 10;
  box-shadow: 0 8px 0 rgba(79,52,32,.35), 0 14px 30px rgba(0,0,0,.3);
  animation: board-in .22s ease-out;
}
@keyframes board-in { from { opacity: 0; transform: translateY(14px); } }
body.in-3d .board-head { display: flex; justify-content: flex-end; align-items: center; gap: 8px; position: absolute; top: 8px; right: 8px; left: 12px; }
.board-room { margin-right: auto; }
.board-close {
  width: 38px; height: 38px; border-radius: 50%; font: inherit; font-size: 26px; line-height: 1; cursor: pointer;
  color: #fff8e8; background: var(--wood); border: 2px solid var(--wood-dark); box-shadow: 0 3px 0 var(--wood-dark);
}
.board-close:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--wood-dark); }
body.in-3d .world .hello { font-size: 22px; margin: 0 0 6px; }
body.in-3d .world h2 { font-size: 18px; margin: 14px 0 8px; }
body.in-3d .world .chore { padding: 10px 12px; gap: 10px; }
.chore:hover { background: #fff6e2; }
.chore.done:hover { background: #e2ebcf; }

/* ---------- popups: a chore, a decoration ---------- */
.pop-back { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(40,24,12,.28); }
.pop {
  width: min(400px, 100%); padding: 20px 22px 18px; text-align: center; color: var(--ink);
  background: var(--paper); border: 3px solid var(--wood); border-radius: 18px;
  box-shadow: 0 6px 0 var(--wood-dark), 0 18px 40px rgba(0,0,0,.35); animation: pop-in .18s ease-out;
}
@keyframes pop-in { from { opacity: 0; transform: scale(.92); } }
.pop-kind { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pop-title { margin: 4px 0 10px; font-family: Georgia, serif; font-size: 28px; color: var(--wood-dark); }
.pop-reward { margin: 0 0 6px; font-size: 20px; font-weight: bold; color: #8a6312; }
.pop-money { color: #3e7a3a; }
.pop-when { margin: 0 0 6px; color: var(--muted); font-size: 16px; }
.pop-when.late { color: #a24a2a; font-weight: bold; }
.pop-note { margin: 8px 0; padding: 8px 12px; background: #fff7e3; border: 2px dashed var(--paper-edge); border-radius: 10px; font-style: italic; }
.pop-done { margin: 6px 0; color: var(--moss); font-weight: bold; }
.pop-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.pop-btn {
  font: inherit; font-weight: bold; font-size: 18px; padding: 10px 18px; min-width: 110px; cursor: pointer;
  color: var(--wood-dark); background: #fffaf0; border: 2px solid var(--wood-dark); border-radius: 12px; box-shadow: 0 4px 0 var(--wood-dark);
}
.pop-btn.go { color: #fff8e8; background: var(--moss); border-color: #4d6735; box-shadow: 0 4px 0 #4d6735; }
.pop-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 var(--wood-dark); }
.pop-btn:disabled { opacity: .5; cursor: not-allowed; }
.pop { position: relative; }
.pop-x {
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; font: inherit; font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--wood-dark); background: transparent; border: 2px solid var(--paper-edge);
}
.pop-x:hover { background: #fff3dc; }
.pop-btn.work { color: #fff8e8; background: #d99a3a; border-color: #8a5d1a; box-shadow: 0 4px 0 #8a5d1a; }
.pop-btn.nope { color: var(--wood-dark); background: #f3e6e0; }
.pop-btn.on { outline: 3px solid var(--gold); outline-offset: 2px; }
.pop-mark { margin: 6px 0; font-weight: bold; }
.pop-mark.working { color: #a8701a; }
.pop-mark.notDone { color: #a24a2a; }
/* "In progress" / "Not done yet" tags on the chore board */
.chore-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: bold; vertical-align: 3px; white-space: nowrap; }
.chore-tag.working { background: #fde7b8; color: #8a5d1a; border: 1px solid #e0b25a; }
.chore-tag.notDone { background: #f6dcd4; color: #a24a2a; border: 1px solid #e3a796; }

/* ---------- the store ---------- */
.shop {
  width: min(760px, 100%); max-height: calc(100vh - 110px); overflow-y: auto; margin-top: 60px; padding: 16px 20px 22px;
  background: var(--paper); border: 10px solid var(--wood); border-image: repeating-linear-gradient(90deg, #8a5d3a 0 18px, #7a5233 18px 20px) 10;
  box-shadow: 0 8px 0 rgba(79,52,32,.35), 0 18px 40px rgba(0,0,0,.35); animation: pop-in .18s ease-out;
}
body[data-world="milandia"] .shop { background: linear-gradient(#fff4ea, #fde6ee); }
body[data-world="cozlandia"] .shop { background: linear-gradient(#fff4f8, #ffe4ee); }
.shop-head { display: flex; align-items: center; gap: 12px; position: sticky; top: -16px; padding: 4px 0 8px; background: inherit; z-index: 1; }
.shop-head h2 { margin: 0; border: 0; padding: 0; font-size: 28px; flex: 1; }
.shop-coins { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; background: var(--wood-dark); color: #ffe7a3; font-size: 20px; }
.shop-hint { margin: 0 0 6px; color: var(--muted); }
.shop h3 { margin: 16px 0 8px; font-family: Georgia, serif; color: var(--wood-dark); font-size: 20px; border-bottom: 2px dashed rgba(79,52,32,.2); padding-bottom: 4px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shop-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; text-align: center;
  background: #fffaf2; border: 2px solid var(--paper-edge); border-radius: 14px; box-shadow: 0 3px 0 rgba(79,52,32,.18);
}
.shop-item:hover { border-color: var(--accent); }
/* "New" in the store (2026-11-19): a tag on the card, a dot on its tab */
.shop-item.is-new { position: relative; }
.new-tag { position: absolute; top: -8px; left: -6px; z-index: 1; background: #f2c94a; color: #4a3210; font-weight: bold; font-size: 13px; padding: 2px 8px; border-radius: 10px; border: 2px solid #fffaf2; box-shadow: 0 2px 0 rgba(79,52,32,.25); transform: rotate(-6deg); }
.new-dot { display: inline-block; width: 9px; height: 9px; margin-left: 6px; border-radius: 50%; background: #e25b4f; vertical-align: middle; }
.shop-item.cant > :not(.new-tag) { opacity: .5; filter: saturate(.5); } /* the New tag stays bright */
.shop-item.cant:hover { border-color: var(--paper-edge); }
.shop-pic { width: 96px; height: 96px; object-fit: contain; }
.shop-name { font-weight: bold; font-size: 16px; min-height: 2.4em; display: grid; place-items: center; }
.shop-price { font-weight: bold; color: #8a6312; font-size: 18px; }
.shop-item .pop-btn { min-width: 0; width: 100%; padding: 8px 10px; font-size: 16px; }
.shop-bag .shop-item { border-color: var(--accent); }
/* multi-family version: the level 2 free bedroom piece (step 9) */
.room-gift { background: #fff3c8; border: 2px dashed #e0a82e; border-radius: 14px; padding: 10px 12px; margin: 6px 0 12px; }
.room-gift h3 { margin-top: 0; }
.room-gift .shop-item { border-color: #e0a82e; }

/* ---------- placing a decoration ---------- */
.place-bar {
  position: fixed; z-index: 30; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(560px, calc(100% - 24px));
  padding: 10px 14px 14px; text-align: center; background: rgba(246,236,214,.96); border: 3px solid var(--wood); border-radius: 16px;
  box-shadow: 0 5px 0 var(--wood-dark), 0 12px 26px rgba(0,0,0,.3);
}
.place-bar p { margin: 0 0 8px; font-weight: bold; color: var(--wood-dark); }
.place-bar.bad p::after { content: ' (not there: pick open ground)'; color: #a23b2a; font-weight: normal; }
.place-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
body.placing .world-hud, body.placing .footer { display: none; }
body.placing .world3d-canvas { cursor: crosshair; }
.tip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 300px;
  background: var(--wood); color: #fff3dc; border: 2px solid var(--wood-dark); border-radius: 8px;
  padding: 6px 11px; font-weight: bold; font-size: 15px; line-height: 1.3; text-shadow: 0 1px 0 rgba(0,0,0,.5);
  box-shadow: 0 6px 14px rgba(20,10,4,.35);
}
.coin-fly {
  position: fixed; left: -11px; top: -11px; width: 22px; height: 22px; border-radius: 50%; z-index: 60; pointer-events: none;
  background: radial-gradient(circle at 35% 35%, #fff3c4 0 18%, #f2c14e 20% 62%, #c98a1e 64%); box-shadow: 0 0 0 2px #7a4a12, 0 0 12px rgba(255,200,80,.7);
}
.coin-plus {
  position: fixed; z-index: 61; pointer-events: none; transform: translateX(-50%); font-weight: 900; font-size: 26px; color: #ffd23a;
  -webkit-text-stroke: 1.5px #5c3a20; paint-order: stroke fill; text-shadow: 0 3px 0 #5c3a20; animation: coin-plus 1.3s ease-out forwards;
}
@keyframes coin-plus { from { opacity: 0; translate: 0 10px; } 15% { opacity: 1; } to { opacity: 0; translate: 0 -40px; } }
.coin-pill.bump { animation: coin-bump .4s ease-out; }
@keyframes coin-bump { 40% { transform: scale(1.18); } }

/* Phones and small tablets: the chore board slides up from the bottom */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  body.in-3d.board-open .world { left: 8px; right: 8px; width: auto; top: auto; height: 62vh; bottom: 8px; }
  body.in-3d .footer { top: auto; bottom: 60px; }
  body.in-3d.board-open .world-hud, body.in-3d.board-open .footer { display: none; }
  .shop { margin-top: 70px; padding: 12px 12px 18px; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* rewards and money (backpack, screen time tickets, money jar) */
#pop-back { z-index: 45; } /* the "Use it?" popup sits over the backpack */
.toast { z-index: 55; }
.top-btn, .money-jar {
  font: inherit; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: var(--wood-dark); color: #ffe7a3; font-size: 20px; font-weight: bold; border: 2px solid var(--wood-light); position: relative;
}
.top-btn:hover, .money-jar:hover { border-color: #ffe7a3; }
.bp-icon {
  width: 22px; height: 24px; display: inline-block; border-radius: 8px 8px 5px 5px; position: relative;
  background: linear-gradient(#e0794f, #b9512e); border: 2px solid #6e2c14;
}
.bp-icon::before { content: ''; position: absolute; left: 4px; right: 4px; top: -7px; height: 8px; border: 2px solid #6e2c14; border-bottom: 0; border-radius: 6px 6px 0 0; }
.bp-icon::after { content: ''; position: absolute; left: 3px; right: 3px; bottom: 3px; height: 7px; border-radius: 3px; background: #f0a07a; border: 1px solid #6e2c14; }
.bp-count { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 14px; display: grid; place-items: center; padding: 0 5px; }
.jar {
  width: 20px; height: 24px; display: inline-block; position: relative; border-radius: 6px 6px 9px 9px;
  background: linear-gradient(transparent 40%, #6fbf73 40%, #3f9a4a); border: 2px solid #cfe9f5; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.jar::before { content: ''; position: absolute; left: 2px; right: 2px; top: -6px; height: 5px; border-radius: 2px; background: #c98f3c; border: 1px solid #6e4a18; }
.money-jar.empty .jar { background: linear-gradient(transparent 85%, #6fbf73 85%); }
.money-jar b { color: #c9f5c0; }
.shop-tabs { display: flex; gap: 8px; margin: 4px 0 6px; }
.shop-tab {
  font: inherit; font-size: 18px; font-weight: bold; padding: 8px 18px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--paper-edge); background: #fff8ee; color: var(--wood-dark);
}
.shop-tab.on { border-color: var(--accent); background: #fff; outline: 2px solid var(--accent); }
.ticket-pic {
  width: 100%; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px;
  background: radial-gradient(circle at 0 50%, transparent 10px, #ffd65a 11px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 10px, #ffd65a 11px) right / 51% 100% no-repeat;
  color: #8a4b0f; line-height: 1; border: 0;
}
.ticket-pic b { font-size: 38px; }
.ticket-pic small { font-size: 15px; font-weight: bold; text-transform: uppercase; }
.ticket-pic.gift { background: radial-gradient(circle at 0 50%, transparent 10px, #ffc2d6 11px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 10px, #ffc2d6 11px) right / 51% 100% no-repeat; }
.ticket-pic.gift b { font-size: 48px; }
.ticket.waiting .ticket-pic { filter: saturate(.7); }
.ticket.used { opacity: .55; }
.ticket.used .ticket-pic { filter: grayscale(1); }
.ticket-state { font-weight: bold; font-size: 15px; color: var(--muted); }
.ticket-state.bag { color: #3f8a3a; }
.ticket-state.waiting { color: #b06a00; }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-weight: bold; }
@media (max-width: 700px) { .top-btn-label { display: none; } }

/* ---------- reading and exercise minutes (the chore board) ---------- */
.minutes-hint { margin: -2px 0 10px; color: var(--muted); font-size: 16px; font-style: italic; }
.minutes-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.log-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.log-btn.reading { background: #e8eef8; }
.log-btn.exercise { background: #e6f1df; }
.log-btn:hover { filter: brightness(1.04); }
.log-icon { display: inline-block; flex: none; width: 22px; height: 18px; position: relative; }
/* an open book: two pages */
.log-icon.book { background: linear-gradient(90deg, #f9f3e3 0 46%, #8a5a3a 46% 54%, #f9f3e3 54%); border: 2px solid #6b4a2f; border-radius: 3px 3px 5px 5px; }
.log-icon.book::after { content: ''; position: absolute; left: 3px; right: 3px; top: 5px; height: 6px; background: repeating-linear-gradient(#b9a88a 0 1px, transparent 1px 3px); }
/* a little running shoe */
.log-icon.shoe { height: 14px; margin-top: 4px; background: #d9584a; border: 2px solid #7a2e25; border-radius: 3px 10px 4px 4px; box-shadow: inset 0 -4px 0 #fff3e0; }
.logs { display: grid; gap: 8px; margin-top: 10px; }
.log { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--paper); border: 2px dashed var(--paper-edge); border-radius: 12px; cursor: default; }
.log.paid { border-style: solid; background: #eef3e2; }
.log.declined { opacity: .7; }
.log-text { flex: 1; display: grid; font-weight: bold; font-size: 18px; }
.log-state { font-weight: bold; font-size: 15px; white-space: nowrap; }
.log-state.waiting { color: #b06a00; }
.log-state.paid { color: #8a6312; font-size: 18px; }
.log-state.declined { color: #a24a2a; }
.min-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 6px 0 2px; }
.min-chip {
  font: inherit; font-weight: bold; font-size: 20px; min-width: 52px; padding: 8px 10px; cursor: pointer;
  color: var(--wood-dark); background: #fffaf0; border: 2px solid var(--paper-edge); border-radius: 12px; box-shadow: 0 3px 0 var(--paper-edge);
}
.min-chip:hover { background: #fff3dc; }
.min-chip[aria-pressed="true"] { color: #fff8e8; background: var(--moss); border-color: #4d6735; box-shadow: 0 3px 0 #4d6735; }
.log-text { min-width: 0; }
.log-state.waiting, .log-state.declined { white-space: normal; text-align: right; max-width: 96px; font-size: 14px; line-height: 1.15; }

/* ---------- Cozlandia: the chore board inside Coz's room (tap the ice cream hotel) ---------- */
/* a strawberry frosted board with a sprinkle trim, to match the cherry and ice cream room */
body[data-world="cozlandia"].inside-room.board-open .world {
  background:
    radial-gradient(circle at 12px 12px, rgba(255,111,145,.18) 0 3px, transparent 4px) 0 0 / 46px 46px,
    linear-gradient(#fff7fa, #ffeef4);
  border: 10px solid #f58fb0;
  border-image: repeating-linear-gradient(90deg, #f58fb0 0 14px, #ffd25a 14px 17px, #f58fb0 17px 30px, #6fc3ff 30px 33px, #f58fb0 33px 46px, #9a7cf0 46px 49px) 10;
  box-shadow: 0 8px 0 rgba(160,60,100,.3), 0 14px 30px rgba(120,30,70,.25);
}
body[data-world="cozlandia"].inside-room .world h2 { color: #b4446e; border-color: #f4b7cb; }
body[data-world="cozlandia"].inside-room .world .chore { background: #fffafc; border-color: #f6cadb; }
body[data-world="cozlandia"].inside-room .world .chore:hover { background: #fff0f6; }
body[data-world="cozlandia"].inside-room .board-close { background: #e8789e; border-color: #b4446e; box-shadow: 0 3px 0 #b4446e; }
body[data-world="cozlandia"].inside-room .board-room { color: #fff8fb; background: #b4446e; border-color: #8e2f55; }

/* ---------- Milandia: the chore board inside Mimi's cabin (tap the cabin) ---------- */
/* a koa wood board with a bamboo edge, to match the Hawaiian room */
body[data-world="milandia"].inside-room.board-open .world {
  background:
    radial-gradient(circle at 14px 14px, rgba(240,96,154,.14) 0 4px, transparent 5px) 0 0 / 52px 52px,
    linear-gradient(#fffaf0, #f8ecd4);
  border: 10px solid #c9a45c;
  border-image: repeating-linear-gradient(90deg, #c9a45c 0 22px, #8a6a32 22px 25px, #d8b56a 25px 47px, #8a6a32 47px 50px) 10;
  box-shadow: 0 8px 0 rgba(90,58,34,.35), 0 14px 30px rgba(60,35,15,.3);
}
body[data-world="milandia"].inside-room .world h2 { color: #2e7f80; border-color: #d8c49a; }
body[data-world="milandia"].inside-room .world .chore { background: #fffdf6; border-color: #e2cfa4; }
body[data-world="milandia"].inside-room .world .chore:hover { background: #fff6e4; }
body[data-world="milandia"].inside-room .board-close { background: #e8789e; border-color: #a8456c; box-shadow: 0 3px 0 #a8456c; }
body[data-world="milandia"].inside-room .board-room { color: #fffaf0; background: #2e7f80; border-color: #1f5f60; }

/* ---------- saved up screen time (backpack) and the school website button (reading log) ---------- */
.screen-bank {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; padding: 10px 14px; font-size: 18px; color: var(--wood-dark);
  background: #fff7e3; border: 2px solid var(--paper-edge); border-radius: 12px; box-shadow: 0 3px 0 rgba(79,52,32,.15); cursor: default;
}
.screen-bank b { font-size: 22px; color: #8a6312; }
.bank-clock { width: 22px; height: 22px; flex: none; border-radius: 50%; background: #fffaf0; border: 3px solid var(--wood); position: relative; }
.bank-clock::before, .bank-clock::after { content: ''; position: absolute; left: 50%; bottom: 50%; width: 2px; background: var(--wood-dark); transform-origin: bottom; }
.bank-clock::before { height: 7px; }
.bank-clock::after { height: 5px; transform: rotate(90deg); }
.pop-links, .letter-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0 4px; }
.letter-links { justify-content: flex-start; }
.open-btn { display: inline-flex; align-items: center; gap: 8px; background: #e8eef8; }
.open-btn:hover { background: #dde6f5; }
.link-icon { position: relative; width: 16px; height: 16px; flex: none; border: 2px solid #3d5a8a; border-radius: 4px; }
.link-icon::after { content: ''; position: absolute; right: -4px; top: -4px; width: 7px; height: 7px; border-top: 2px solid #3d5a8a; border-right: 2px solid #3d5a8a; background: inherit; }
.book-input { display: block; width: 100%; box-sizing: border-box; margin: 12px 0 4px; padding: 12px 14px; font: inherit; font-size: 1.1rem; border: 2px solid #c9b48f; border-radius: 12px; background: #fffaf0; }
.book-input:focus { outline: 3px solid #f2b84b; outline-offset: 1px; }
.book-cheer, .book-done, .book-already { line-height: 1.3; }
.read-msg { font-style: normal; font-weight: bold; }
.read-msg.good { color: #3e7a3a; background: #eef8e6; border-color: #9cc68a; }

/* ---------- parent setup walkthrough (setup.js) ---------- */
.setup { min-height: 100vh; display: grid; place-items: start center; padding: 20px 14px 40px; }
.setup-sheet { width: min(640px, 100%); padding: 24px 22px; }
.setup-sheet h1 { margin: 0 0 8px; color: var(--wood-dark); font-size: 28px; }
.setup-sheet h2 { margin: 0 0 10px; color: var(--wood-dark); font-size: 21px; }
.setup-progress { margin: 0 0 4px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.setup-lead { margin: 0 0 14px; line-height: 1.45; }
.setup-hint { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.setup-how { margin: 0 0 18px; padding-left: 22px; line-height: 1.5; }
.setup-how li { margin-bottom: 6px; }
.setup-label { display: block; margin: 16px 0 6px; font-weight: bold; color: var(--wood-dark); }
.setup-label input, .setup-label textarea, .date-input {
  display: block; width: 100%; margin-top: 6px; font: inherit; padding: 12px; font-weight: normal;
  border: 2px solid var(--paper-edge); border-radius: 10px; background: #fffaf0; color: var(--ink);
}
.setup-label textarea { resize: vertical; min-height: 60px; }
.setup-label > select { display: block; margin-top: 6px; font: inherit; font-weight: normal; padding: 10px 12px; min-width: 180px; border: 2px solid var(--paper-edge); border-radius: 10px; background: #fffaf0; color: var(--ink); }
.date-input { width: auto; margin-top: 10px; }
.setup-nav { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 22px; }
.setup-nav .big-btn { width: auto; flex: 1; max-width: 320px; margin-left: auto; }
.setup-nav .big-btn:disabled { opacity: .6; cursor: default; }

.world-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.world-card {
  display: grid; gap: 6px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  padding: 14px; border-radius: 12px; border: 3px solid var(--paper-edge); background: #fffaf0;
}
.world-card.on { border-color: var(--moss); box-shadow: 0 0 0 3px rgba(111,143,78,.25); }
.world-card b { font-family: Georgia, serif; font-size: 20px; }
.world-card small { color: var(--muted); font-size: 15px; line-height: 1.35; }
.world-swatch { height: 54px; border-radius: 8px; }
.world-swatch[data-world="milandia"] { background: linear-gradient(160deg, #6fc3e8 0 45%, #f2d49b 45% 60%, #7cbf6a 60%); }
.world-swatch[data-world="cozlandia"] { background: linear-gradient(160deg, #9fd8f0 0 40%, #f7b6cf 40% 62%, #a8e0c4 62%); }

.copy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; font-size: 15px; color: var(--muted); }
.chip {
  font: inherit; font-size: 15px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--paper-edge); background: #fffaf0; color: var(--wood-dark);
}
.chip:hover { border-color: var(--wood-light); }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.idea.on, .pet-grow .chip.on { border-color: var(--moss); background: var(--moss); color: #fff8e8; font-weight: bold; }
.chip.idea.faded { opacity: .45; }
.chip.other { border-style: dashed; }
.set-times { display: grid; gap: 8px; margin-top: 10px; justify-items: start; }
.set-time { display: flex; gap: 8px; align-items: center; }
.set-time input { font: inherit; padding: 8px; border: 2px solid var(--paper-edge); border-radius: 8px; background: #fffaf0; }
.windows-edit select { font: inherit; padding: 6px; border: 2px solid var(--paper-edge); border-radius: 8px; background: #fffaf0; }
.windows-box { margin: 0 0 12px; padding: 12px; border-radius: 10px; background: #fffaf0; border: 2px solid var(--paper-edge); }
.windows-box .coin-edit { margin: 8px 0 6px; }
.family-wide { margin: 0; font-weight: bold; color: var(--wood-dark); }

.chore-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.chore-list li {
  display: flex; gap: 10px; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 10px; background: #fffaf0; border: 2px solid var(--paper-edge);
}
.chore-list li.editing { border-color: var(--moss); }
.chore-list li > div:first-child { display: grid; gap: 2px; min-width: 0; }
.chore-list small { color: var(--muted); font-size: 14px; }
.chore-list .chore-note { font-style: italic; overflow-wrap: anywhere; }
.chore-acts { display: flex; gap: 6px; flex-shrink: 0; }
.chore-acts .small-btn { font-size: 14px; padding: 6px 10px; }

.chore-form { margin-top: 8px; padding: 16px; border-radius: 12px; border: 2px dashed var(--paper-edge); background: rgba(255,250,240,.6); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-btn {
  flex: 1 1 auto; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  border: 2px solid var(--paper-edge); background: #fffaf0; color: var(--ink);
}
.seg-btn.on { border-color: var(--moss); background: #e8f0dc; font-weight: bold; }
.day-picks { display: flex; gap: 6px; margin-top: 10px; }
.day-btn {
  width: 42px; height: 42px; border-radius: 50%; font: inherit; font-weight: bold; cursor: pointer;
  border: 2px solid var(--paper-edge); background: #fffaf0; color: var(--ink);
}
.day-btn.on { border-color: var(--moss); background: var(--moss); color: #fff8e8; }
.coin-link { margin-left: 10px; font-size: 14px; }
.coin-edit { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.coin-edit label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.coin-edit input, .rate-input {
  width: 80px; font: inherit; padding: 8px; border: 2px solid var(--paper-edge); border-radius: 8px; background: #fffaf0;
}
.form-acts { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.form-acts .big-btn { width: auto; flex: 1; font-size: 19px; padding: 12px; }

.switch-row { display: flex; gap: 12px; align-items: center; margin: 10px 0; font-weight: bold; cursor: pointer; }
.switch-row input { width: 26px; height: 26px; accent-color: var(--moss); }
.rate { padding: 14px; border-radius: 12px; background: #fffaf0; border: 2px solid var(--paper-edge); }
.rate .setup-label { margin-top: 0; }
.rate-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 18px; }
.pin-input {
  display: block; width: 160px; margin-top: 6px; font-size: 28px; letter-spacing: .4em; text-align: center; padding: 10px;
  border: 2px solid var(--paper-edge); border-radius: 10px; background: #fffaf0;
}
.parent-menu { display: grid; gap: 12px; margin-top: 10px; }
@media (max-width: 480px) {
  .setup-sheet { padding: 18px 14px; }
  .setup-sheet h1 { font-size: 24px; }
  .day-btn { width: 38px; height: 38px; }
}

/* ---------- the parent pages (login, setup, Parents): one calm island theme, no wood ----------
   body.portal is set by main.js show() and on the server's login link page */
body.portal {
  --ink: #26384a; --muted: #5e7180; --wood-dark: #26384a; --wood-light: #7fb3c2;
  --paper: #fffcf5; --paper-edge: #d9e6ec; --moss: #0b8187; --accent: #0b8187; --logo-teal: #0b8187; --logo-gold: #f5b81c;
  background: #cfe8f2;
}
body.portal .sheet { box-shadow: 0 6px 0 rgba(38,56,74,.08), 0 10px 24px rgba(38,56,74,.12); }
/* the logo's colors: gold buttons with brown writing (the Done of Donemoor), teal for what is picked */
body.portal .big-btn { background: var(--logo-gold); box-shadow: 0 4px 0 #b9780a; color: #3c240c; }
body.portal .big-btn:active { box-shadow: 0 2px 0 #b9780a; }
body.portal .small-btn { color: var(--ink); background: #fff; }
body.portal .error { color: #b23a3a; }
body.portal .seg-btn.on { background: var(--moss); color: #fff; }
body.portal .world-card.on { box-shadow: 0 0 0 3px rgba(47,143,157,.25); }
body.portal .chore-form { background: rgba(255,255,255,.55); }
body.portal .setup-label input, body.portal .setup-label textarea, body.portal .date-input,
body.portal .login-sheet input, body.portal .chip, body.portal .seg-btn, body.portal .day-btn, body.portal .world-card,
body.portal .chore-list li, body.portal .rate, body.portal .windows-box, body.portal .pin-input,
body.portal .coin-edit input, body.portal .rate-input, body.portal .set-time input, body.portal .windows-edit select { background-color: #fff; }
body.portal .chip.idea.on, body.portal .day-btn.on { background: var(--moss); color: #fff; }
body.portal .chore-form h2 { border-bottom-color: var(--paper-edge); }
body.portal .add-chore { background: var(--moss); box-shadow: 0 4px 0 #1f6670; }
body.portal .add-chore:active { box-shadow: 0 2px 0 #1f6670; }
.setup-label .coin-link { display: block; margin: 4px 0 0; text-align: left; font-size: 14px; }

/* world pictures in setup (pictures from the game, public/img/worlds) */
.world-pick { display: grid; gap: 6px; }
.world-pic { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #d6eef5; }
.look-btn { justify-self: start; font-size: 15px; }
.look { position: fixed; inset: 0; z-index: 30; background: rgba(20,40,56,.55); display: grid; place-items: start center; overflow-y: auto; padding: 16px 12px 32px; }
.look-card { width: min(680px, 100%); background: var(--paper); border-radius: 14px; padding: 16px; display: grid; gap: 12px; }
.look-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.look-head h2 { margin: 0; border: 0; padding: 0; }
.look-shot { margin: 0; display: grid; gap: 4px; }
.look-shot img { width: 100%; height: auto; border-radius: 10px; display: block; }
.look-shot figcaption { font-size: 15px; color: var(--muted); }

/* ---------- "Who's using Chore Realms?" and parent mode (multi-family version) ---------- */
.who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0 18px; }
.who-btn {
  display: grid; gap: 8px; padding: 10px; font: inherit; cursor: pointer; text-align: center; color: var(--ink);
  border: 2px solid var(--paper-edge); border-radius: 14px; background: #fff; min-height: 44px;
}
.who-btn:focus-visible, .parent-tile:focus-visible { outline: 3px solid var(--moss); outline-offset: 2px; }
.who-btn b { font-family: Georgia, serif; font-size: 22px; }
.who-pic { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #d6eef5; }
.who-parent { margin-top: 4px; }
.realm-box { margin-top: 6px; }
.realm-box .seg { flex-wrap: wrap; }
.realm-extra { padding: 4px 0 0; }
.realm-extra select, .chore-form select, .coin-row select {
  display: block; width: 100%; min-height: 44px; margin-top: 6px; font: inherit; padding: 8px 10px;
  border: 2px solid var(--paper-edge); border-radius: 10px; background: #fff; color: var(--ink);
}
.parent-kids { display: grid; gap: 12px; }
.parent-kid { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; padding: 10px; border: 2px solid var(--paper-edge); border-radius: 12px; background: #fff; }
.parent-kid-pic { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.parent-kid-body b { font-size: 20px; }
.parent-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.parent-acts .small-btn, .add-kid { min-height: 44px; }
.add-kid { margin-top: 12px; }
.small-btn.danger { color: #b23a3a; }
body.portal .big-btn.danger-btn { background: #b23a3a; box-shadow: 0 4px 0 #7f2525; }
.parent-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.parent-tile {
  display: grid; gap: 4px; text-align: left; padding: 14px; font: inherit; cursor: pointer; color: var(--ink);
  border: 2px solid var(--paper-edge); border-radius: 12px; background: #fff; min-height: 44px;
}
.parent-tile b { font-size: 18px; }
.parent-tile small { color: var(--muted); font-size: 15px; }
.parent-box { margin: 14px 0; padding: 14px; border: 2px solid var(--paper-edge); border-radius: 12px; background: #fff; }
.parent-box h2 { margin-top: 0; }
.switch-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: bold; }
.switch-row input { width: 24px; height: 24px; accent-color: var(--moss); }
.job-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.job-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border: 2px solid var(--paper-edge); border-radius: 10px; background: #fff; }
.job-row small { display: block; color: var(--muted); font-size: 15px; }
.coin-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.coin-row .setup-label { margin-top: 0; }
@media (max-width: 420px) {
  .parent-kid { grid-template-columns: 1fr; }
}
.setup-sheet > h2 { margin-top: 22px; }
.parent-box .rate { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.parent-box .rate .rate-input { width: 90px; }
.parent-box .rate-eq { padding-bottom: 12px; font-weight: bold; }

/* ---------- progression (multi-family version): level pill, chest, unlock path ---------- */
.level-pill {
  font: inherit; display: grid; gap: 3px; justify-items: start; min-height: 44px; padding: 6px 14px; border-radius: 14px; cursor: pointer;
  background: var(--wood-dark); color: #ffe7a3; border: 2px solid var(--wood-light); text-align: left;
}
.level-pill:hover, .level-pill:focus-visible { border-color: #ffe7a3; }
.level-pill b { font-size: 17px; }
.level-pill small { font-size: 14px; color: #f3e2bf; }
.level-bar { display: block; width: 120px; height: 8px; border-radius: 4px; background: rgba(255,231,163,.25); overflow: hidden; }
#level-fill { display: block; height: 100%; width: 0; background: #ffd34d; border-radius: 4px; transition: width .4s; }
.chest-btn { background: #c98b1e; color: #fff8e8; border-color: #ffe7a3; animation: chest-glow 1.6s ease-in-out infinite; }
@keyframes chest-glow { 50% { box-shadow: 0 0 14px 2px rgba(255,211,77,.8); } }
@media (prefers-reduced-motion: reduce) { .chest-btn { animation: none; } #level-fill { transition: none; } }
.chest-pic { display: block; width: 72px; height: 56px; margin: 0 auto 8px; border-radius: 10px 10px 6px 6px; position: relative;
  background: linear-gradient(#b8742a 0 40%, #8a5219 40% 46%, #b8742a 46%); border: 3px solid #5c3410; }
.chest-pic::after { content: ''; position: absolute; left: 50%; top: 34%; width: 12px; height: 14px; margin-left: -6px; background: #ffd34d; border: 2px solid #5c3410; border-radius: 3px; }
.chest-pic.small { width: 24px; height: 20px; margin: 0; border-width: 2px; border-radius: 5px 5px 3px 3px; }
.chest-pic.small::after { width: 6px; height: 7px; margin-left: -3px; border-width: 1px; }
.chest-pic.open { box-shadow: 0 -10px 22px rgba(255,211,77,.9); }
.news-list { display: grid; gap: 8px; margin: 8px 0 12px; text-align: left; }
.news-item { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: #fff3d1; }
.news-item b { font-size: 18px; }
.path-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; text-align: left; max-height: 55vh; overflow-y: auto; }
.path-step { padding: 10px 12px; border-radius: 10px; border: 2px solid var(--paper-edge); background: #fffaf0; }
.path-head { display: flex; justify-content: space-between; gap: 8px; }
.path-head span { color: var(--muted); font-size: 15px; }
.path-rewards { margin: 4px 0 0; font-size: 16px; }
.path-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.path-pic { width: 48px; height: 48px; object-fit: contain; filter: brightness(0) opacity(.35); }
.shop-item.locked { opacity: .75; }
.shop-item.locked .shop-pic { filter: brightness(0) opacity(.35); }
.path-btn { margin-left: auto; margin-right: 8px; min-height: 44px; }

/* ---------- the character (multi-family version): look editor and wardrobe ---------- */
.look-editor { display: grid; gap: 14px; }
.look-stage { display: grid; place-items: center; border-radius: 14px; background: linear-gradient(#d6eef5, #eef7e6); }
.look-canvas { display: block; width: 220px; height: 250px; }
.look-rows { display: grid; gap: 10px; }
.look-row { display: grid; gap: 6px; }
.look-label { margin: 0; font-weight: bold; color: var(--wood-dark); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--paper-edge); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 3px var(--moss); }
.swatch:focus-visible { outline: 3px solid var(--moss); outline-offset: 3px; }
.look-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.look-chip { min-height: 44px; }
.look-chip.on { border-color: var(--moss); background: var(--moss); color: #fff; font-weight: bold; }
.shop .look-editor { margin: 8px 0 12px; }
.shop-item.wear .shop-pic { object-fit: contain; background: linear-gradient(#d6eef5, #eef7e6); border-radius: 8px; }
.shop-item.wear.locked .shop-pic { filter: brightness(0) opacity(.35); }
@media (min-width: 640px) { .look-editor { grid-template-columns: 240px 1fr; align-items: start; } }
body.portal .look-chip.on { background: var(--moss); color: #fff; border-color: var(--moss); }
.shop-item.wear.locked .shop-pic { background: none; }

/* ---------- chore styles and the full day (multi-family version) ---------- */
.style-list { display: grid; gap: 8px; margin-top: 10px; text-align: left; max-height: 60vh; overflow-y: auto; }
.style-pick { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 10px 12px; font: inherit; color: var(--ink); cursor: pointer;
  border: 2px solid var(--paper-edge); border-radius: 12px; background: #fffaf0; text-align: left; }
.style-pick.on { border-color: var(--moss); box-shadow: 0 0 0 2px rgba(111,143,78,.3); }
.style-pick.locked { opacity: .6; cursor: default; }
.style-pick:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.style-icon { font-size: 30px; width: 40px; text-align: center; }
.style-text { display: grid; gap: 2px; }
.style-text small { color: var(--muted); font-size: 15px; }
.full-day { position: fixed; left: 50%; top: 30%; z-index: 56; transform: translateX(-50%); display: grid; gap: 4px; text-align: center; pointer-events: none;
  padding: 18px 30px; border-radius: 20px; background: #ffd34d; color: #5a3a10; border: 4px solid #fff3c4; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.full-day b { font-size: 36px; white-space: nowrap; }
.full-day span { white-space: nowrap; }
.full-day span { font-size: 18px; font-weight: bold; }
.full-day.show { animation: full-day-pop 3.4s ease-out forwards; }
@keyframes full-day-pop { 0% { transform: translateX(-50%) scale(.4); opacity: 0; } 12% { transform: translateX(-50%) scale(1.08); opacity: 1; } 20% { transform: translateX(-50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .full-day.show { animation: none; } }

/* multi-family version: realm tasks and the guided calm walkthrough (step 10) */
.pop-realm { margin: 6px 0; font-weight: 600; color: #4a5a8a; }
.pop-realm.physical { color: #a85a1a; }
.pop-realm.musical { color: #7a3e9a; }
.pop-realm.spiritual { color: #3e7a5a; }
.pop-ask { margin: 6px 0; font-size: 16px; color: #8a4a2a; }
.calm { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(20, 26, 58, 0.82); padding: 16px; }
.calm-card { width: min(440px, 100%); background: #f4f1ff; border-radius: 22px; padding: 22px 20px; text-align: center; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); }
.calm-kind { margin: 0 0 8px; font: bold 22px Georgia, serif; color: #3a3a6a; }
.calm-tip, .calm-ask, .calm-say, .calm-time, .calm-done { font-size: 18px; margin: 10px 0; color: #34345a; }
.calm-ask { color: #8a4a2a; font-weight: 600; }
.calm-say { min-height: 52px; font-weight: 600; font-size: 20px; }
.calm-time { font-variant-numeric: tabular-nums; color: #5a5a8a; }
.calm-bubble-wrap { height: 220px; display: grid; place-items: center; }
.calm-bubble { width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffffff, #b8c8ff 45%, #8a9cf0); box-shadow: 0 0 40px #b8c8ff; transform: scale(0.5); }
.calm .pop-btn { min-height: 44px; margin: 6px; }
.places-wrap { position: relative; display: inline-block; }
.places-menu { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 30; min-width: 220px; background: #fff8ea; border: 2px solid var(--paper-edge, #c8a878); border-radius: 14px; padding: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.places-pick { display: block; width: 100%; text-align: left; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; font-size: 16px; cursor: pointer; }
.places-pick:hover, .places-pick:focus-visible { background: #f3e2c0; }
.places-pick b { display: block; }
.places-pick small { color: #6a5a4a; font-size: 14px; }
.star-book { text-align: left; margin: 8px 0; padding-left: 20px; font-size: 16px; line-height: 1.6; }
@media (max-width: 560px) { body.inside-room .world-name { display: none; } } /* phones: the room name sat on top of Refresh and Switch */
.gym-list { list-style: none; padding: 0; margin: 8px 0; max-height: 50vh; overflow: auto; text-align: left; }
.gym-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 4px; border-bottom: 1px dashed var(--paper-edge, #c8a878); font-size: 16px; }
.gym-item small { color: #6a5a4a; }
.gym-item .pop-btn { min-height: 44px; margin: 0; }
.gym-have { color: #3e7a3e; font-weight: 600; }
.songbook-staff { background: #fffaf0; border: 2px solid var(--paper-edge, #c8a878); border-radius: 12px; padding: 6px; margin: 8px 0; }
.songbook-guess, .songbook-done { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--paper-edge, #c8a878); font-size: 16px; }
.songbook-guess .pop-btn, .songbook-done .pop-btn { min-height: 44px; }
/* parent mode: acts of kindness to confirm (step 10e) */
.kind-box { background: #fff3e6; border: 2px solid #f0b88a; border-radius: 14px; padding: 10px 14px; margin: 12px 0; }
.kind-box h2 { margin-top: 4px; }
.kind-act { border-top: 1px dashed #f0b88a; padding: 8px 0; }
.kind-act p { margin: 4px 0; }
.kind-input { min-height: 80px; resize: vertical; }
.kind-warn { color: #a8341a; font-weight: 600; min-height: 1.2em; margin: 4px 0; }
/* pets (step 11a) */
.pet-picks { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.pet-pick { display: grid; justify-items: center; gap: 4px; width: 120px; min-height: 44px; padding: 8px; border: 3px solid var(--paper-edge, #c8a878); border-radius: 14px; background: #fffaf0; font-size: 16px; cursor: pointer; }
.pet-pick img { width: 96px; height: 96px; }
.pet-pick[aria-pressed="true"] { border-color: #5a9a3a; background: #eef8e0; }
/* the daily bonus game (step 11b) */
.bonus-card { background: #fff8ec; }
.bonus-field { position: relative; height: 260px; overflow: hidden; border-radius: 16px; background: linear-gradient(#bfe6ff, #7cc4ec); margin: 8px 0; }
.bonus-bubble { position: absolute; bottom: -70px; width: 64px; height: 64px; border-radius: 50%; border: 3px solid rgba(255,255,255,.9); background: radial-gradient(circle at 35% 30%, #fff, rgba(255,240,170,.85) 40%, rgba(255,200,90,.65)); color: #c8861a; font-size: 26px; cursor: pointer; animation: bubble-up linear forwards; }
.bonus-bubble[style*="top"] { bottom: auto; animation: none; }
@keyframes bubble-up { to { transform: translateY(-360px); } }
.bonus-meter { height: 14px; background: #e8dcc8; border-radius: 8px; overflow: hidden; }
.bonus-meter span { display: block; height: 100%; width: 0; background: #e8b84a; transition: width .3s; }
.bonus-wheel-wrap { position: relative; width: 240px; height: 240px; margin: 10px auto; }
.bonus-wheel { width: 240px; height: 240px; }
.bonus-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 24px solid #7a3e1a; z-index: 1; }
/* the mini games (step 11c) */
.mini-card { width: min(460px, 100%); }
.mini-canvas { width: 100%; height: auto; border-radius: 14px; touch-action: none; display: block; margin: 6px 0; cursor: pointer; }
.mini-btns { display: flex; justify-content: center; gap: 8px; }
.travel-pick.locked { opacity: .55; cursor: default; }
/* the home screen help (step 12) */
.install-steps { font-size: 18px; line-height: 1.6; padding-left: 24px; }
/* Less motion (step 12): no floating, sliding or spinning CSS */
body.less-motion *, body.less-motion *::before, body.less-motion *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }

/* ---------- accessibility pass (step 12, multi-family version): 44px tap targets, 16px text ---------- */
/* (scoped to body.family so the Notion family's screens stay exactly as they are) */
body.family .view-btn, body.family .small-btn, body.family .shop-tab, body.family .pop-btn { min-height: 44px; font-size: 16px; }
body.family .small-btn { padding-top: 8px; padding-bottom: 8px; }
body.family .board-close { min-width: 44px; min-height: 44px; }
body.family .link-btn { display: inline-block; min-height: 44px; line-height: 44px; font-size: 16px; }
body.family .travel-text small, body.family #level-line, body.family .chore-note { font-size: 16px; }
body.family :focus-visible { outline: 3px solid #2f6fd8; outline-offset: 2px; }
body.family.in-3d .footer .small-btn { font-size: 16px; padding: 8px 12px; min-height: 44px; }
@media (max-width: 560px) {
  /* phones: the view buttons stay on one line and scroll sideways; Refresh and Switch sit above the land's name */
  body.family .world-views { overflow-x: auto; flex-wrap: nowrap; max-width: calc(100vw - 28px); padding-bottom: 2px; }
  body.family .view-btn { white-space: nowrap; flex: none; }
  body.family.in-3d .footer { bottom: 124px; }
}
/* labels for screen readers only (the login form) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.login-sheet #login-switch { margin-top: 6px; }
.login-sheet .email-form input[hidden] { display: none; }
/* "Building your cove..." while a world is made (world-view.js building) */
.world-building { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 6px; background: linear-gradient(#bfe6f6, #f6efd8); color: #2a3f50; text-align: center; padding: 24px; }
.world-building[hidden] { display: none; }
.build-title { font: bold 26px/1.2 Georgia, serif; margin: 18px 0 0; }
.build-step { font-size: 17px; margin: 0; color: #4a6272; min-height: 1.4em; }
.build-blocks { display: flex; gap: 10px; height: 70px; align-items: flex-end; }
.build-blocks i { width: 30px; height: 30px; border-radius: 6px; background: #6fbf5a; box-shadow: inset 0 -8px 0 #4f9a3f; animation: build-hop 1.2s ease-in-out infinite; }
.build-blocks i:nth-child(2) { background: #e8b65a; box-shadow: inset 0 -8px 0 #c08e38; animation-delay: .15s; }
.build-blocks i:nth-child(3) { background: #5aa9e6; box-shadow: inset 0 -8px 0 #3a86c0; animation-delay: .3s; }
.build-blocks i:nth-child(4) { background: #b98a5a; box-shadow: inset 0 -8px 0 #8e6440; animation-delay: .45s; }
@keyframes build-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-36px) rotate(12deg); } 60% { transform: translateY(-36px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .build-blocks i { animation: none; } }
body.less-motion .build-blocks i { animation: none; }
/* parent mode: coins and rewards */
.reward-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.reward-row .land-input { flex: 1; min-width: 0; }
.coin-now { white-space: nowrap; }
/* chore form: every few days, weeks or months, and days of the month */
.every-box { display: grid; gap: 8px; margin: 6px 0; }
.every-row { display: flex; gap: 8px; align-items: center; font-weight: bold; }
.every-row select { width: auto; flex: 0 0 auto; font: inherit; padding: 6px 10px; border-radius: 10px; }
.week-turns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-weight: bold; }
.month-picks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 420px; margin: 6px 0; }
.month-picks .day-btn { width: auto; }
.later-box { background: #fff8ee; border: 2px solid var(--paper-edge); border-radius: 14px; padding: 10px 16px; margin: 12px 0; }
.later-box h2 { margin: 4px 0; }
.later-box ul { margin: 6px 0; padding-left: 20px; }
/* the welcome tour (tour.js) */
.tour { position: fixed; inset: 0; z-index: 60; pointer-events: auto; }
.tour.dim { background: rgba(20, 30, 40, .45); }
.tour-ring { position: absolute; border-radius: 16px; border: 4px solid #ffd65a; box-shadow: 0 0 0 9999px rgba(20, 30, 40, .45), 0 0 18px 4px rgba(255, 214, 90, .8); animation: tour-pulse 1.4s ease-in-out infinite; pointer-events: none; }
.tour-ring.round { border-radius: 50%; }
.tour-ring[hidden] { display: none; }
@keyframes tour-pulse { 50% { border-color: #fff3c4; } }
body.less-motion .tour-ring { animation: none; }
.tour-card {
  position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); width: min(460px, calc(100vw - 32px));
  background: #fff8ee; border: 3px solid var(--wood-dark); border-radius: 18px; padding: 16px 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  color: var(--wood-dark); text-align: center;
}
.tour.card-top .tour-card { bottom: auto; top: 110px; }
.tour-card h3 { margin: 2px 0 6px; font-size: 26px; }
.tour-card p { margin: 0 0 12px; font-size: 18px; line-height: 1.4; }
.tour-card .tour-count { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; }
.tour-btns { display: flex; gap: 10px; justify-content: center; }
/* chore form: take turns */
.turn-order { margin: 4px 0; padding-left: 22px; display: grid; gap: 6px; }
.turn-order li { display: flex; gap: 8px; align-items: center; }
.turn-order li span { min-width: 90px; font-weight: bold; }
.turn-plan { background: #eef7ee; border-radius: 10px; padding: 8px 12px; font-weight: bold; margin: 4px 0; }
.week-turns { display: block; }
/* coins and rewards: give or take first */
.coin-sides { display: flex; gap: 12px; margin: 8px 0 12px; }
.coin-sides .coin-side { flex: 1; opacity: .55; }
.coin-sides .coin-side.on { opacity: 1; outline: 3px solid var(--wood-dark); outline-offset: 2px; }
/* setup: who gets chores, and a kid still to set up */
.name-rows { display: grid; gap: 8px; margin: 8px 0; max-width: 460px; }
.name-row { display: flex; gap: 8px; align-items: center; }
.name-row input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 2px solid var(--paper-edge); border-radius: 10px; background: #fffaf0; }
.who-btn.pending { border-style: dashed; background: #fffaf0; display: grid; place-items: center; gap: 4px; min-height: 160px; }
.who-pending { font-size: 48px; line-height: 1; color: var(--muted); }
.also-box { margin: 8px 0; }
.danger-box { border-color: #d9645a; background: #fff1ef; }
.danger-box .big-btn { margin-top: 18px; }
.danger-box .big-btn:disabled { opacity: .45; cursor: not-allowed; }
/* the character stays in view while scrolling the choices (beta feedback, 2026-11-12) */
.look-stage { position: sticky; top: 8px; z-index: 2; box-shadow: 0 4px 12px rgba(40, 60, 70, .15); }
@media (max-width: 639px) { .look-stage .look-canvas { width: 158px !important; height: 180px !important; } }
/* quick add (quick-add.js): one card per chore, the picks beside each other when there is room */
.quick-add { display: grid; gap: 10px; }
.qa-packs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qa-packs .setup-label { margin: 0; }
.qa-paste-box { display: grid; gap: 8px; }
.qa-paste-box textarea { font: inherit; padding: 10px 12px; border: 2px solid var(--paper-edge); border-radius: 10px; background: #fffaf0; }
.qa-rows { display: grid; gap: 10px; }
.qa-row { display: grid; gap: 8px; padding: 10px 12px; border: 2px solid var(--paper-edge); border-radius: 12px; background: #fffaf0; }
.qa-title { font: inherit; font-weight: bold; padding: 10px 12px; border: 2px solid var(--paper-edge); border-radius: 10px; background: #fff; width: 100%; box-sizing: border-box; }
.qa-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .qa-picks { grid-template-columns: 1.3fr 1.3fr 1fr 1fr; } }
.qa-pick { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.qa-pick select { font: inherit; font-size: 15px; color: var(--ink); padding: 8px; border: 2px solid var(--paper-edge); border-radius: 10px; background: #fff; min-width: 0; }
.qa-who { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); }
.qa-who .look-chip { min-height: 36px; padding: 4px 12px; }
.qa-acts { display: flex; gap: 8px; justify-content: flex-end; }
.land-input.big { font-size: 22px; padding: 12px 14px; width: 100%; box-sizing: border-box; }
.land-ideas { margin: 10px 0; }
.parent-kid-body small { display: block; color: var(--muted); margin: 2px 0 4px; }
.travel-caret { margin-left: 6px; font-size: 14px; opacity: .7; }

/* The Quests of Donemoor logos: the stacked one where there is room (loading, login, welcome), the wide
   one where there is not (the top bar, who's playing). */
.app-logo { display: block; width: min(300px, 80%); height: auto; margin: 0 auto 8px; }
.app-logo-wide { width: min(240px, 70%); margin-bottom: 4px; }
.login-sheet .logo-h1 { margin: 0 0 6px; line-height: 0; }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.loading-logo { width: min(280px, 70vw); margin-bottom: 4px; }
.loading p { margin: 0; }
.brand-logo { display: block; height: 40px; width: auto; }

/* The quest board in each world's own colors (Isaac, 2026-11-16: it was pink in every world), with room under the
   button at the top. Milandia, Cozlandia and the wood board are above. */
body.in-3d.board-open .world { padding-top: 70px; }
body[data-world="homestead"].inside-room.board-open .world {
  background:
    repeating-linear-gradient(0deg, rgba(168,69,47,.07) 0 14px, transparent 14px 28px),
    repeating-linear-gradient(90deg, rgba(168,69,47,.07) 0 14px, transparent 14px 28px),
    linear-gradient(#fffaf0, #f6ebd4);
  border: 10px solid #a8452f;
  border-image: repeating-linear-gradient(90deg, #a8452f 0 20px, #f3e3c3 20px 23px, #8f3825 23px 43px, #f3e3c3 43px 46px) 10;
  box-shadow: 0 8px 0 rgba(90,40,25,.35), 0 14px 30px rgba(60,25,15,.3);
}
body[data-world="homestead"].inside-room .world h2 { color: #8f3825; border-color: #e6cfae; }
body[data-world="homestead"].inside-room .world .chore { background: #fffdf6; border-color: #e6cfae; }
body[data-world="homestead"].inside-room .world .chore:hover { background: #fdf1de; }
body[data-world="homestead"].inside-room .board-close { background: #a8452f; border-color: #6f2a1a; box-shadow: 0 3px 0 #6f2a1a; }
body[data-world="homestead"].inside-room .board-room { color: #fffaf0; background: #5f7f3e; border-color: #3f5a27; }
body[data-world="cove"].inside-room.board-open .world {
  background: linear-gradient(#f8f2e2, #ebe0c6);
  border: 10px solid #b99557;
  border-image: repeating-linear-gradient(90deg, #b99557 0 22px, #6f5530 22px 25px, #c9a96a 25px 47px, #1f4a6e 47px 50px) 10;
  box-shadow: 0 8px 0 rgba(31,58,84,.35), 0 14px 30px rgba(15,35,55,.3);
}
body[data-world="cove"].inside-room .world h2 { color: #1f4a6e; border-color: #d9c8a0; }
body[data-world="cove"].inside-room .world .chore { background: #fffcf2; border-color: #dccba3; }
body[data-world="cove"].inside-room .world .chore:hover { background: #f6ecd4; }
body[data-world="cove"].inside-room .board-close { background: #2b6a9a; border-color: #1f4a6e; box-shadow: 0 3px 0 #1f4a6e; }
body[data-world="cove"].inside-room .board-room { color: #fffaf0; background: #1f4a6e; border-color: #12304a; }

/* setup: what "Part of life" means */
.part-box { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: #fff8e1; border: 1px solid #f0d78a; }
.part-box h3 { margin: 0 0 6px; font-size: 1rem; }
.part-box ul { margin: 6px 0; padding-left: 20px; }
.part-box li { margin: 3px 0; }
.part-box p { margin: 6px 0 0; }

.pop-note { font-size: 15px; line-height: 1.4; margin: 6px 0; text-align: left; }
.star-head { margin: 10px 0 0; text-align: left; font-size: 15px; }
.star-book { max-height: 30vh; overflow-y: auto; }

.guide-list { text-align: left; max-height: 55vh; overflow-y: auto; }
.guide-item { margin: 8px 0; }
.guide-item p { margin: 2px 0 0; font-size: 15px; line-height: 1.4; }

/* kindness: the button stands out */
.kind-section { margin-top: 14px; }
.kind-btn { width: 100%; font-size: 1.15rem; padding: 14px 16px; background: #f5b81c; color: #3c240c; border-color: #b9780a; box-shadow: 0 3px 0 #b9780a; }
.minutes-btns #kind-book, .minutes-btns #kind-cabin { margin-top: 8px; }
.pop .world-pic { width: 100%; height: auto; border-radius: 10px; margin: 6px 0; }
.places-pick.locked { opacity: .55; cursor: default; }

.reset-btn { margin-left: auto; }
.reset-btn:disabled { opacity: .5; cursor: default; }

/* an X at the top corner of a screen that also has buttons at the bottom */
.setup-sheet { position: relative; }
.sheet-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--paper-edge); background: #fffaf0; color: var(--wood-dark); font-size: 26px; line-height: 1; cursor: pointer; z-index: 2; }
.sheet-x:hover { background: #f1e6c8; }
.setup-sheet > h1 { padding-right: 52px; }
/* pets grow up (2026-11-20): the bar to the next stage */
.pet-grow { margin: 8px 0; }
.pet-bar { height: 14px; border-radius: 8px; background: #eadfca; overflow: hidden; border: 2px solid var(--paper-edge); }
.pet-bar span { display: block; height: 100%; background: linear-gradient(90deg, #7cc46a, #4fa44a); }
.pet-bar-text { font-size: 16px; margin: 4px 0 0; color: #6a5236; }
/* earned clothes (2026-11-20) */
.shop-item.earned .earn-how { font-size: 15px; color: #6a5236; min-height: 2.4em; }
.shop-item.earned:not(.locked) { border-color: #e0b84a; background: #fff7df; }
/* the sticker book (2026-11-20) */
#pop:has(.sticker-page) { max-width: min(760px, 96vw); width: 100%; }
.sticker-tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0 12px; }
.sticker-tab { font: inherit; font-size: 16px; min-height: 44px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--paper-edge); background: #fffaf0; color: var(--wood-dark); cursor: pointer; }
.sticker-tab.on { background: var(--moss); border-color: var(--moss); color: #fff8e8; font-weight: bold; }
.sticker-tab small { font-size: 13px; opacity: .8; }
.sticker-page { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; max-height: 56vh; overflow-y: auto; padding: 12px; border-radius: 14px;
  background: repeating-linear-gradient(0deg, #fffdf6 0 26px, #f1e9d8 26px 27px); border: 2px solid var(--paper-edge); }
.sticker { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 6px 4px; }
.sticker b { font-size: 15px; color: var(--wood-dark); }
.sticker small { font-size: 13px; color: #7a6650; line-height: 1.2; }
.sticker.got svg { transform: rotate(-4deg); }
.sticker.got:nth-child(2n) svg { transform: rotate(5deg); }
.surprise-pic { display: flex; justify-content: center; margin: 4px 0; }
.surprise-pic svg { width: 112px; height: 112px; transform: rotate(-5deg); }

/* the Games list and the game box (2026-11-20, games/) */
#pop:has(.game-list) { max-width: min(720px, 96vw); width: 100%; }
.game-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 8px; }
.game-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 10px; text-align: center; background: #fffaf2; border: 2px solid var(--paper-edge); border-radius: 16px; box-shadow: 0 3px 0 rgba(79,52,32,.18); }
.game-tile b { font-size: 17px; color: var(--wood-dark); }
.game-tile small { font-size: 14px; color: #7a6650; min-height: 1.3em; }
.game-tile .pop-btn { width: 100%; min-width: 0; margin-top: 4px; }
.game-tile.off { opacity: .6; }
.game-pic svg { width: 76px; height: 76px; }
.gm { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 12px; background: rgba(40,30,20,.55); }
.gm-card { position: relative; width: min(680px, 100%); max-height: 96vh; overflow-y: auto; background: var(--paper, #fbf4e4); border: 4px solid #8a5a32; border-radius: 22px; padding: 14px 16px 18px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.gm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.gm-title { font: bold 24px Georgia, serif; color: var(--wood-dark); }
.gm-x { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--paper-edge); background: #fffaf0; font-size: 24px; cursor: pointer; color: var(--wood-dark); }
.gm-body { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gm-art svg { width: 120px; height: 120px; }
.gm-how { font-size: 18px; text-align: center; max-width: 460px; margin: 0; color: #4a3a28; }
.gm-best { margin: 0; font-weight: bold; color: #8a6312; }
.gm-go { font-size: 22px; padding: 12px 40px; }
.gm-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.gm-done { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 8px 0; overflow: hidden; width: 100%; }
.gm-done h3 { font: bold 26px Georgia, serif; color: var(--wood-dark); margin: 4px 0; }
.gm-lines p { margin: 2px 0; font-size: 18px; }
.gm-sticker svg { width: 90px; height: 90px; transform: rotate(-6deg); }
.gm-confetti { position: absolute; inset: 0; pointer-events: none; }
.gm-confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px; animation: gm-fall linear forwards; }
@keyframes gm-fall { to { top: 105%; transform: rotate(540deg); } }
/* Color By Number */
.cn-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; width: 100%; }
.cn-pic { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 14px; border: 2px solid var(--paper-edge); background: #fffaf0; cursor: pointer; font: inherit; font-size: 16px; color: var(--wood-dark); min-height: 44px; }
.cn-pic canvas { width: 84px; height: 84px; image-rendering: pixelated; border-radius: 6px; border: 2px solid #e2d8c4; }
.cn-pic.done { border-color: #e0b84a; background: #fff7df; }
.cn-pic small { font-size: 13px; color: #8a6312; }
.cn-canvas, .pz-canvas { width: min(100%, 520px, 62vh); height: auto; aspect-ratio: 1; touch-action: none; border-radius: 12px; border: 3px solid #8a5a32; background: #fbf7ee; cursor: pointer; }
.cn-done-pic { width: 160px; height: 160px; image-rendering: pixelated; border: 8px solid #6a4428; border-radius: 4px; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.cn-colors { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cn-color { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; padding: 4px; border-radius: 14px; border: 3px solid transparent; background: none; cursor: pointer; font: inherit; }
.cn-color.on { border-color: #8a5a32; background: #fff3cc; }
.cn-color.finished { opacity: .55; }
.cn-swatch { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c); font-weight: bold; font-size: 18px; border: 2px solid rgba(0,0,0,.15); }
.cn-color small { font-size: 13px; color: #7a6650; min-height: 1em; }
.cn-status { margin: 0; font-size: 16px; color: #6a5236; }
/* Pet Match */
.mt-grid { display: grid; gap: 10px; width: min(100%, 520px); grid-template-columns: repeat(4, 1fr); }
.mt-card { aspect-ratio: 3 / 4; border: none; padding: 0; background: none; cursor: pointer; perspective: 600px; min-height: 44px; }
.mt-inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .35s; transform-style: preserve-3d; }
.mt-card.still .mt-inner { transition: none; }
.mt-card.up .mt-inner { transform: rotateY(180deg); }
.mt-back, .mt-face { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; display: grid; place-items: center; border: 3px solid #8a5a32; }
.mt-back { background: repeating-linear-gradient(45deg, #5fae4a 0 10px, #6bbf59 10px 20px); }
.mt-back::after { content: '?'; font: bold 34px Georgia, serif; color: #fff8e8; }
.mt-face { background: #fffaf0; transform: rotateY(180deg); }
.mt-face svg { width: 80%; height: auto; }
.mt-card.found .mt-face { border-color: #e0b84a; background: #fff7df; box-shadow: 0 0 0 3px #f2cf4a; }
.mt-card:disabled { cursor: default; }
.gm-bounce svg { animation: gm-bounce .9s ease-out 2; }
@keyframes gm-bounce { 0%, 100% { transform: translateY(0) rotate(-4deg); } 40% { transform: translateY(-16px) rotate(4deg); } }
body.less-motion .gm-bounce svg, body.less-motion .gm-confetti { animation: none; display: none; }
