:root {
  color-scheme: light;
  --ink: #2f241e;
  --muted: #6d5d50;
  --cream: #fff5e2;
  --paper: #fff9ed;
  --line: #d78852;
  --red: #d94d39;
  --red-dark: #a7352a;
  --orange: #f1a34e;
  --gold: #ffd76b;
  --grass: #77b95f;
  --grass-dark: #40783f;
  --blue: #6ec6dd;
  --purple: #7e61b4;
  --shadow: 0 18px 45px rgba(97, 61, 35, .18);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Trebuchet MS", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  letter-spacing: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 223, 132, .45), transparent 22%),
    radial-gradient(circle at 84% 20%, rgba(122, 190, 97, .34), transparent 26%),
    linear-gradient(180deg, #fffaf0 0%, #f9e2bc 48%, #eab575 100%);
  overflow-x: hidden;
}

button {
  font: inherit;
  letter-spacing: 0;
  border: 0;
  cursor: pointer;
}

.game-frame {
  width: min(1480px, calc(100vw - 28px));
  min-height: calc(100vh - 28px);
  margin: 14px auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
}

.black-logo-banner {
  position: relative;
  min-height: 128px;
  display: grid;
  grid-template-columns: 86px minmax(360px, 1fr) minmax(360px, 560px);
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  color: #fff7df;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 45%),
    linear-gradient(135deg, #171717, #2d2a25 62%, #101010);
  border: 5px solid #fff7df;
  border-radius: 28px;
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255,255,255,.08);
  overflow: hidden;
}

.black-logo-banner::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 8px;
  background: linear-gradient(90deg, transparent, #f2ad5c, #f9db8d, #f2ad5c, transparent);
  opacity: .75;
}

.brand-cat {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #fff4df;
  border: 4px solid #f6a35b;
  box-shadow: 0 10px 0 rgba(0,0,0,.18);
}

.brand-cat .ear {
  position: absolute;
  top: -10px;
  width: 25px;
  height: 28px;
  background: #f39b55;
  border: 4px solid #7a4830;
  border-radius: 7px 18px 5px 18px;
  transform: rotate(-26deg);
}

.brand-cat .ear-right {
  right: 7px;
  transform: rotate(26deg) scaleX(-1);
}

.brand-cat .ear-left {
  left: 7px;
}

.brand-cat .face::before,
.brand-cat .face::after {
  content: "";
  position: absolute;
  top: 31px;
  width: 7px;
  height: 9px;
  border-radius: 50%;
  background: #342720;
}

.brand-cat .face::before {
  left: 23px;
}

.brand-cat .face::after {
  right: 23px;
}

.brand-cat .face b {
  position: absolute;
  left: 32px;
  top: 43px;
  width: 10px;
  height: 7px;
  border-radius: 50%;
  background: #ef7d62;
}

.brand-copy p {
  margin: 0 0 4px;
  color: #f4b45d;
  font-size: .78rem;
  font-weight: 900;
}

.brand-copy h1 {
  margin: 0;
  font-size: 2.6rem;
  line-height: 1;
  text-shadow: 0 4px 0 rgba(0,0,0,.22);
}

.brand-copy strong {
  display: block;
  margin-top: 10px;
  font-size: 1.05rem;
  color: #fff0c4;
}

.banner-village-strip {
  height: 104px;
  align-self: stretch;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.02));
  overflow: hidden;
}

.banner-village-strip svg {
  width: 100%;
  height: 100%;
  display: block;
}

.resource-bar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.resource-pill {
  min-height: 58px;
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-areas: "icon num" "icon label";
  align-items: center;
  padding: 9px 10px;
  border: 3px solid #e2a05a;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff9e9, #ffe1a2);
  box-shadow: 0 7px 0 rgba(141, 86, 45, .16);
}

.resource-pill span {
  grid-area: icon;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f3bf58;
  border: 3px solid rgba(79, 52, 34, .75);
  box-shadow: inset 0 4px 0 rgba(255,255,255,.4);
}

.resource-pill b {
  grid-area: num;
  font-size: 1.15rem;
  line-height: 1;
}

.resource-pill small {
  grid-area: label;
  color: var(--muted);
  font-weight: 900;
}

.resource-pill.leaf span {
  background: #66b965;
  border-radius: 70% 18% 70% 18%;
  transform: rotate(-25deg);
}

.resource-pill.snack span {
  background: #d98b58;
  border-radius: 10px;
}

.resource-pill.toy span {
  background: conic-gradient(from 20deg, #ffcf66, #f16f5c, #7ec9df, #ffcf66);
}

.resource-pill.gift span {
  background: linear-gradient(90deg, #e75d4c 0 45%, #ffd56a 45% 55%, #e75d4c 55%);
  border-radius: 9px;
}

.resource-pill.heart span {
  background: #ef6b67;
  transform: rotate(45deg) scale(.82);
  border-radius: 8px 8px 4px 8px;
}

.resource-pill.save-state span {
  background: #84cbd8;
  border-radius: 8px;
}

.game-board {
  display: grid;
  grid-template-columns: 282px minmax(580px, 1fr) 282px;
  gap: 12px;
  min-height: 0;
}

.side-panel,
.center-stage {
  border: 3px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,250,235,.86)),
    var(--paper);
  box-shadow: var(--shadow);
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  min-width: 0;
}

.section-tab {
  width: max-content;
  max-width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 20px 20px 20px 6px;
  color: #fff7e6;
  background: linear-gradient(180deg, #ef644b, #c93e32);
  border: 3px solid #fff4dc;
  box-shadow: 0 6px 0 rgba(117, 48, 35, .18);
  font-size: 1.08rem;
  font-weight: 1000;
}

.section-tab b {
  font-size: 1.45rem;
  line-height: 1;
}

.section-tab.small {
  min-height: 36px;
  padding: 5px 12px;
  font-size: .95rem;
}

.section-tab.main-tab {
  transform: translateY(-3px);
}

.todo-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.todo-list li {
  min-height: 37px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 2px solid #edc18a;
  border-radius: 12px;
  background: #fff3d5;
}

.todo-list span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-weight: 1000;
}

.todo-list b {
  font-size: .88rem;
}

.task-card,
.visitor-box,
.festival-box,
.portal-box,
.log-box {
  border: 2px solid #e5b77d;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf0, #ffe8ba);
  box-shadow: 0 8px 0 rgba(131, 82, 47, .1);
}

.task-card {
  display: grid;
  grid-template-columns: 66px 1fr 72px;
  align-items: center;
  gap: 9px;
  padding: 10px;
}

.task-card h2,
.log-box h2 {
  margin: 0;
  font-size: 1rem;
}

.task-card p,
.visitor-box p,
.festival-box p,
.portal-box p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.task-art {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: #fff0c8;
  border: 2px solid #c89155;
  overflow: hidden;
}

.catnip-art {
  background: linear-gradient(135deg, #7dbb58 0 47%, #e9d191 47% 53%, #72ad54 53%);
}

.catnip-art i {
  position: absolute;
  width: 14px;
  height: 22px;
  border-radius: 90% 12% 90% 12%;
  background: #347c3d;
}

.catnip-art i:nth-child(1) { left: 11px; top: 20px; transform: rotate(-28deg); }
.catnip-art i:nth-child(2) { left: 25px; top: 12px; transform: rotate(18deg); }
.catnip-art i:nth-child(3) { left: 38px; top: 25px; transform: rotate(38deg); }
.catnip-art i:nth-child(4) { left: 19px; top: 36px; transform: rotate(-4deg); }

.snack-art::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 18px;
  width: 40px;
  height: 27px;
  border-radius: 8px;
  background: #c87a47;
  border: 3px solid #6e422a;
}

.snack-art i {
  position: absolute;
  left: 15px;
  top: 11px;
  width: 28px;
  height: 13px;
  border-radius: 14px 14px 0 0;
  background: #f7cf72;
}

.snack-art b {
  position: absolute;
  left: 22px;
  top: 28px;
  width: 15px;
  height: 10px;
  border-radius: 50%;
  background: #ffe6a2;
}

.care-art span,
.visitor-cat,
.map-cat {
  position: relative;
  display: block;
  width: 42px;
  height: 34px;
  border-radius: 48% 48% 42% 42%;
  background: var(--cat-color, #f4a25a);
  border: 3px solid #4b3528;
}

.care-art span {
  left: 8px;
  top: 13px;
}

.care-art span::before,
.care-art span::after,
.visitor-cat::before,
.visitor-cat::after,
.map-cat::before,
.map-cat::after {
  content: "";
  position: absolute;
  top: -10px;
  width: 15px;
  height: 18px;
  background: inherit;
  border: 3px solid #4b3528;
  border-bottom: 0;
  border-radius: 6px 14px 4px 14px;
}

.care-art span::before,
.visitor-cat::before,
.map-cat::before {
  left: 3px;
  transform: rotate(-18deg);
}

.care-art span::after,
.visitor-cat::after,
.map-cat::after {
  right: 3px;
  transform: rotate(18deg) scaleX(-1);
}

.action-btn {
  min-height: 40px;
  padding: 8px 9px;
  border-radius: 12px;
  color: #513523;
  background: linear-gradient(180deg, #ffe28a, #f3af4d);
  border: 2px solid #a86a37;
  box-shadow: 0 5px 0 #a86a37;
  font-size: .82rem;
  font-weight: 1000;
}

.action-btn.red {
  color: #fff8e8;
  background: linear-gradient(180deg, #f27356, #cf4435);
  border-color: #8f3129;
  box-shadow: 0 5px 0 #8f3129;
}

.action-btn:active,
.tile-button:active,
.nav-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(96, 55, 31, .35);
}

.mini-progress {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 2px solid #dfac73;
  border-radius: 16px;
  background: #fff6dd;
}

.mini-progress div {
  display: flex;
  justify-content: space-between;
  font-weight: 1000;
}

.mini-progress i {
  height: 13px;
  border-radius: 99px;
  background: #e3c287;
  overflow: hidden;
}

.mini-progress em {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: inherit;
  background: linear-gradient(90deg, #70b65a, #f2be53);
}

.center-stage {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 12px;
  min-width: 0;
  overflow: hidden;
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.stage-head p {
  margin: 0;
  padding: 9px 12px;
  border: 2px solid #e8b474;
  border-radius: 14px;
  background: #fff7df;
  color: var(--muted);
  font-weight: 1000;
}

.village-scene {
  position: relative;
  min-height: 590px;
  border-radius: 22px;
  border: 4px solid #cc8752;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 237, 173, .65), transparent 32%),
    linear-gradient(180deg, #a8d4e2 0 34%, #fbdf9e 34% 100%);
  overflow: hidden;
  box-shadow: inset 0 0 0 6px rgba(255,255,255,.35);
}

.village-scene::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 150px;
  background:
    radial-gradient(circle at 18% 70%, #f8fbdd 0 22px, transparent 23px),
    radial-gradient(circle at 62% 58%, #f8fbdd 0 18px, transparent 19px),
    linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0));
  opacity: .7;
}

.scene-illustration {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-label {
  font-family: inherit;
  font-size: 20px;
  font-weight: 1000;
  fill: #523725;
  paint-order: stroke;
  stroke: #fff3cf;
  stroke-width: 6px;
  stroke-linejoin: round;
}

.map-label.big {
  font-size: 30px;
}

.svg-object {
  transition: transform .25s ease, filter .25s ease, opacity .25s ease;
}

.svg-object.pulse-target {
  filter: drop-shadow(0 0 16px rgba(255, 232, 118, .95));
}

.room-stack {
  position: absolute;
  z-index: 3;
  left: 45.5%;
  top: 31%;
  width: 190px;
  transform: translateX(-50%);
  display: grid;
  gap: 7px;
  pointer-events: none;
}

.room-card {
  height: 38px;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border: 3px solid #73482f;
  border-radius: 12px;
  color: #4a3023;
  background: linear-gradient(180deg, #ffe3aa, #c98855);
  box-shadow: 0 5px 0 rgba(92, 55, 35, .28);
}

.room-card i {
  width: 28px;
  height: 24px;
  border-radius: 7px;
  background: #87c9d8;
  border: 2px solid #67422b;
}

.room-card span {
  font-size: .8rem;
  font-weight: 1000;
  white-space: nowrap;
}

.room-card.bed i {
  background: linear-gradient(180deg, #fff0d0 0 50%, #d06f5b 50%);
}

.room-card.plant i {
  background: radial-gradient(circle at 50% 80%, #9f7042 0 18%, transparent 19%), linear-gradient(135deg, #5fa85d 0 50%, #9bd16a 50%);
}

.room-card.shop i {
  background: repeating-linear-gradient(90deg, #5fb6c5 0 7px, #fff0d0 7px 14px);
}

.room-card.portal i {
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 25%, #75d6ec 27% 64%, #735bb2 66%);
}

.cat-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.map-cat {
  position: absolute;
  width: 38px;
  height: 30px;
  animation: catWiggle 3.6s ease-in-out infinite;
  animation-delay: var(--cat-delay);
  box-shadow: 0 7px 0 rgba(87, 55, 36, .18);
}

.map-cat i,
.visitor-cat i {
  position: absolute;
  left: 10px;
  top: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2c211b;
  box-shadow: 13px 0 0 #2c211b, 6px 8px 0 -1px #e66c5d;
}

.cat-0 { --cat-color: #f2a058; }
.cat-1 { --cat-color: #4b4640; }
.cat-2 { --cat-color: #fff0d2; }
.cat-3 { --cat-color: #85b7dc; }
.cat-4 { --cat-color: #d994a8; }
.cat-5 { --cat-color: #efc66a; }

.map-cat:nth-child(1) { left: 36%; top: 70%; }
.map-cat:nth-child(2) { left: 59%; top: 68%; }
.map-cat:nth-child(3) { left: 22%; top: 62%; }
.map-cat:nth-child(4) { left: 68%; top: 53%; }
.map-cat:nth-child(5) { left: 44%; top: 50%; }
.map-cat:nth-child(6) { left: 78%; top: 65%; }
.map-cat:nth-child(7) { left: 30%; top: 45%; }
.map-cat:nth-child(8) { left: 51%; top: 78%; }
.map-cat:nth-child(9) { left: 18%; top: 73%; }
.map-cat:nth-child(10) { left: 72%; top: 41%; }

@keyframes catWiggle {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}

.request-bubble {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 19px;
  transform: translateX(-50%);
  max-width: min(560px, 82%);
  padding: 11px 16px;
  border: 3px solid #8c5b38;
  border-radius: 18px;
  color: #442c21;
  background: #fff7dc;
  box-shadow: 0 9px 0 rgba(115, 71, 42, .16);
  font-weight: 1000;
  text-align: center;
}

.effect-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.effect-pop {
  position: absolute;
  left: var(--x);
  top: var(--y);
  padding: 8px 12px;
  border: 3px solid #fff7d8;
  border-radius: 99px;
  color: #fff;
  background: linear-gradient(180deg, #f27456, #c73c31);
  box-shadow: 0 9px 20px rgba(89, 44, 28, .28);
  font-weight: 1000;
  animation: popFloat 1.35s ease forwards;
}

@keyframes popFloat {
  0% { opacity: 0; transform: translateY(12px) scale(.9); }
  18% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-42px) scale(1.08); }
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.tile-button {
  min-height: 78px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 3px solid #d28c4e;
  border-radius: 16px;
  color: #523522;
  background: linear-gradient(180deg, #fff7df, #ffd783);
  box-shadow: 0 7px 0 rgba(129, 76, 42, .2);
  text-align: left;
}

.tile-button b {
  font-size: .9rem;
}

.tile-icon,
.nav-icon {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  border: 3px solid #6b432b;
  background: #f0b75c;
  box-shadow: inset 0 5px 0 rgba(255,255,255,.38);
}

.tile-icon.shop {
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, #5cb7c6 0 8px, #fff0d0 8px 16px);
}

.tile-icon.hammer {
  border-radius: 8px;
  background: linear-gradient(135deg, #8a6644 0 40%, #c7d4d8 41% 70%, #f0b75c 71%);
}

.tile-icon.bed {
  border-radius: 8px;
  background: linear-gradient(180deg, #fff2d4 0 45%, #d76858 46%);
}

.tile-icon.tower {
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #7f63b4 0 32%, #d99a61 33%);
}

.visitor-box,
.festival-box,
.portal-box,
.log-box {
  padding: 11px;
}

.visitor-line {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.visitor-cat {
  width: 38px;
  height: 31px;
  animation: catWiggle 3.2s ease-in-out infinite;
}

.visitor-cat:nth-child(2) { animation-delay: .2s; }
.visitor-cat:nth-child(3) { animation-delay: .4s; }
.visitor-cat:nth-child(4) { animation-delay: .6s; }
.visitor-cat:nth-child(5) { animation-delay: .8s; }

.festival-lights {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  border-radius: 14px;
  background: linear-gradient(180deg, #90c9df, #fff2c8);
  border: 2px solid #d19b5d;
}

.festival-lights i {
  width: 27px;
  height: 35px;
  border-radius: 13px 13px 5px 5px;
  background: #f3bf54;
  border: 3px solid #7b5032;
  box-shadow: 0 0 0 rgba(255,214,102,0);
}

.festival-on .festival-lights i {
  animation: lampGlow 1.2s ease-in-out infinite alternate;
}

.festival-lights i:nth-child(2) { background: #ef6b61; animation-delay: .15s; }
.festival-lights i:nth-child(3) { background: #7bc56a; animation-delay: .3s; }
.festival-lights i:nth-child(4) { background: #75c7dd; animation-delay: .45s; }
.festival-lights i:nth-child(5) { background: #bf88d6; animation-delay: .6s; }

@keyframes lampGlow {
  to { box-shadow: 0 0 18px rgba(255,214,102,.9); transform: translateY(-3px); }
}

.portal-box {
  background: linear-gradient(180deg, #f8f0ff, #d7f3ff);
}

.log-box {
  min-height: 162px;
  overflow: hidden;
}

.log-box ol {
  margin: 8px 0 0;
  padding-left: 18px;
}

.log-box li {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.28;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.nav-btn {
  min-height: 68px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 3px solid #c07d45;
  border-radius: 18px;
  color: #5a3a25;
  background: linear-gradient(180deg, #fff9e7, #ffd885);
  box-shadow: 0 7px 0 rgba(112, 68, 38, .22);
  font-weight: 1000;
}

.nav-btn.active {
  color: #fff8e8;
  background: linear-gradient(180deg, #e95f4a, #be3f34);
  border-color: #8f332b;
}

.nav-icon {
  width: 31px;
  height: 31px;
  border-width: 2px;
  border-radius: 8px;
}

.nav-icon.village { background: linear-gradient(135deg, #79bb62 0 50%, #f6d391 51%); }
.nav-icon.cat { border-radius: 50%; background: #f1a15a; }
.nav-icon.room { background: linear-gradient(180deg, #fff0d0 0 46%, #c95e55 47%); }
.nav-icon.portal { border-radius: 50%; background: radial-gradient(circle, #fff 0 26%, #75d6ec 28% 62%, #7c62b8 64%); }
.nav-icon.save { background: #7fcddd; }
.nav-icon.reset { background: #ef705d; }

.nav-btn.danger {
  background: linear-gradient(180deg, #ffe0da, #ff9c86);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 40;
  transform: translate(-50%, 24px);
  min-width: 220px;
  padding: 12px 18px;
  border: 3px solid #fff6d5;
  border-radius: 999px;
  color: #fff;
  background: rgba(41, 35, 31, .92);
  box-shadow: 0 14px 30px rgba(45, 28, 18, .32);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  font-weight: 1000;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pulse-target {
  animation: targetPulse .72s ease;
}

@keyframes targetPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

#catnipField[data-amount="0"] {
  opacity: .72;
}

#portalWindow[data-rewards="0"] {
  opacity: .92;
}

#isometricMap[data-festival="1"] {
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 226, 88, .62), transparent 21%),
    radial-gradient(circle at 80% 30%, rgba(255, 116, 91, .36), transparent 19%),
    linear-gradient(180deg, #9bd3e4 0 34%, #f7d782 34% 100%);
}

@media (max-width: 1180px) {
  .black-logo-banner {
    grid-template-columns: 78px 1fr;
  }

  .banner-village-strip {
    grid-column: 1 / -1;
  }

  .resource-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .game-board {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .side-panel .section-tab,
  .side-panel .todo-list,
  .side-panel .mini-progress,
  .right-panel .log-box {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .game-frame {
    width: min(100vw - 16px, 560px);
    margin: 8px auto;
    gap: 9px;
  }

  .black-logo-banner {
    grid-template-columns: 62px 1fr;
    min-height: auto;
    padding: 14px;
    border-radius: 20px;
  }

  .brand-cat {
    width: 58px;
    height: 58px;
  }

  .brand-copy h1 {
    font-size: 1.7rem;
  }

  .brand-copy strong {
    font-size: .86rem;
  }

  .resource-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-panel {
    grid-template-columns: 1fr;
  }

  .stage-head {
    align-items: stretch;
    flex-direction: column;
  }

  .village-scene {
    min-height: 540px;
  }

  .room-stack {
    left: 48%;
    top: 32%;
    width: 150px;
  }

  .room-card {
    height: 35px;
    grid-template-columns: 30px 1fr;
  }

  .room-card span {
    font-size: .68rem;
  }

  .quick-actions,
  .bottom-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tile-button,
  .nav-btn {
    min-height: 62px;
  }
}
