/* ====== Min Zoo – styles ====== */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  background: linear-gradient(180deg, #8fd3f4 0%, #b8e8c8 60%, #9ed98a 100%);
}

#app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  background: none;
}

.hidden { display: none !important; }

/* ====== HUD ====== */

#hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(6px + env(safe-area-inset-top)) 10px 6px;
  z-index: 30;
}

.hud-group { display: flex; gap: 8px; align-items: center; }

.hud-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.92);
  border: 3px solid #f5a623;
  border-radius: 999px;
  padding: 3px 14px 3px 8px;
  font-size: 19px;
  font-weight: 800;
  color: #6b4b16;
  box-shadow: 0 3px 0 rgba(0,0,0,.12);
  min-width: 86px;
}
#pill-diamonds { border-color: #58c9f0; color: #1b6e8d; }
.hud-pill .ico { font-size: 21px; }

.hud-level {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 280px;
}

.level-badge {
  width: 44px; height: 44px;
  background: radial-gradient(circle at 35% 30%, #ffe277, #f5a623);
  border: 3px solid #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 800; color: #6b4b16;
  box-shadow: 0 3px 0 rgba(0,0,0,.15);
  flex-shrink: 0;
}

.xp-bar {
  flex: 1;
  height: 16px;
  background: rgba(255,255,255,.85);
  border: 2px solid #d8930f;
  border-radius: 999px;
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffd35c, #f5a623);
  border-radius: 999px;
  transition: width .4s ease;
}

.hud-btn {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.92);
  border: 3px solid #b9b9b9;
  border-radius: 14px;
  font-size: 21px;
  box-shadow: 0 3px 0 rgba(0,0,0,.12);
}
.hud-btn:active { transform: translateY(2px); box-shadow: none; }

/* ====== Mission chip ====== */

#mission-chip {
  position: absolute;
  top: calc(60px + env(safe-area-inset-top));
  left: 10px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.94);
  border: 3px solid #8e6db8;
  border-radius: 16px;
  padding: 6px 12px;
  max-width: min(330px, 70vw);
  box-shadow: 0 3px 0 rgba(0,0,0,.12);
  text-align: left;
}
#mission-chip:active { transform: translateY(2px); box-shadow: none; }
#mission-chip .mc-ico { font-size: 24px; }
#mission-chip .mc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#mission-chip .mc-text {
  font-size: 14.5px;
  font-weight: 700;
  color: #4a3268;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#mission-chip .mc-bar {
  display: block;
  height: 8px;
  width: 100%;
  background: #e6def2;
  border-radius: 999px;
  overflow: hidden;
}
#mission-chip .mc-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b07ee8, #8e6db8);
  border-radius: 999px;
  transition: width .4s ease;
}
#mission-chip .mc-progress {
  font-size: 14px;
  font-weight: 800;
  color: #8e6db8;
  flex-shrink: 0;
}

/* ====== Board ====== */

#board-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#board {
  position: relative;
  flex-shrink: 0;
  transform-origin: center center;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18), inset 0 0 0 6px rgba(110,75,30,.45);
  background:
    repeating-conic-gradient(#8ecf5e 0% 25%, #84c655 0% 50%) 0 0 / 192px 192px;
  overflow: hidden;
}

#layer-zones, #layer-objects, #layer-visitors, #layer-ghost {
  position: absolute;
  inset: 0;
}
#layer-visitors { pointer-events: none; z-index: 6; }
#layer-ghost { pointer-events: none; z-index: 10; }

/* Locked zones */
.zone-locked {
  position: absolute;
  background:
    repeating-conic-gradient(#5d9c45 0% 25%, #569240 0% 50%) 0 0 / 192px 192px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 5;
  border-left: 5px dashed rgba(255,255,255,.5);
}
.zone-locked .trees {
  font-size: 44px;
  letter-spacing: -8px;
  opacity: .9;
  text-align: center;
  line-height: 1.25;
  pointer-events: none;
}
.zone-locked .lock-btn {
  background: rgba(255,255,255,.95);
  border: 3px solid #6b9a45;
  border-radius: 16px;
  padding: 8px 16px;
  font-size: 19px;
  font-weight: 800;
  color: #3d5c26;
  box-shadow: 0 3px 0 rgba(0,0,0,.2);
}

/* Objects */
.obj {
  position: absolute;
  z-index: 4;
}
.obj .tap-target {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Enclosure */
.obj.enclosure .tap-target {
  background: radial-gradient(circle at 50% 40%, #d9c389, #c8ab6b);
  border: 7px solid #8a5a2b;
  border-radius: 26px;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.25), 0 4px 0 rgba(0,0,0,.12);
}
.obj.enclosure .animals-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  border-radius: 26px;
}

/* Dyr der vandrer rundt */
.animal-sprite {
  position: absolute;
  font-size: 54px;
  line-height: 1;
  transition: left var(--walkdur, 2s) linear, top var(--walkdur, 2s) linear;
  pointer-events: none;
}
.animal-sprite.baby { font-size: 34px; }
.animal-sprite.hungry { filter: grayscale(.6); opacity: .85; }
.animal-sprite.flip { transform: scaleX(-1); }
.animal-sprite::after {
  content: "";
  position: absolute;
  left: 15%; right: 15%; bottom: -3px;
  height: 9px;
  background: radial-gradient(ellipse, rgba(0,0,0,.22), transparent 70%);
  border-radius: 50%;
  z-index: -1;
}
.animal-sprite .a-body { display: inline-block; }
.animal-sprite.walking .a-body { animation: walk-bob .45s ease-in-out infinite alternate; }
@keyframes walk-bob { from { transform: translateY(0); } to { transform: translateY(-7px); } }
.animal-sprite:not(.walking) .a-body { animation: idle-breathe 2.6s ease-in-out infinite alternate; }
@keyframes idle-breathe { from { transform: scale(1); } to { transform: scale(1.06); } }

/* Små følelses-bobler i anlæg */
.pen-emote {
  position: absolute;
  font-size: 24px;
  z-index: 5;
  pointer-events: none;
  animation: float-up 1.4s ease-out forwards;
}

/* Pynt der lever */
.decor-body { display: inline-block; }
.d-blomst .decor-body, .d-busk .decor-body, .d-palme .decor-body {
  animation: sway 3.5s ease-in-out infinite alternate;
  transform-origin: bottom center;
}
@keyframes sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
.d-springvand .decor-body { animation: fountain-pulse 2s ease-in-out infinite alternate; }
@keyframes fountain-pulse {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(1.07); filter: brightness(1.18); }
}
.d-pariserhjul .decor-body { animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.d-karrusel .decor-body, .d-legeplads .decor-body { animation: carousel-bob 1.7s ease-in-out infinite alternate; }
@keyframes carousel-bob {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-4px) rotate(2deg); }
}

/* Sommerfugle og fugle */
.flyer {
  position: absolute;
  font-size: 30px;
  z-index: 7;
  pointer-events: none;
  transition: left var(--flydur, 16s) linear, top var(--flydur, 16s) ease-in-out;
  filter: drop-shadow(0 3px 2px rgba(0,0,0,.15));
}
.flyer.flip { transform: scaleX(-1); }
.flyer .f-body { display: inline-block; animation: flutter .5s ease-in-out infinite alternate; }
@keyframes flutter { from { transform: translateY(0) rotate(-7deg); } to { transform: translateY(-9px) rotate(7deg); } }

/* Gæsternes følelses-bobler */
.v-emote {
  position: absolute;
  top: -24px;
  left: 4px;
  font-size: 21px;
  pointer-events: none;
  animation: float-up 1.4s ease-out forwards;
}

/* Stall */
.obj.stall .tap-target {
  background: radial-gradient(circle at 50% 30%, #ffe9e9, #ffc9c9);
  border: 5px solid #d96a6a;
  border-radius: 18px;
  box-shadow: 0 4px 0 rgba(0,0,0,.12);
  font-size: 50px;
}

/* Decor */
.obj.decor .tap-target { font-size: 62px; }
.obj.decor.small .tap-target { font-size: 48px; }

/* Path */
.obj.path { z-index: 2; }
.obj.path .tap-target {
  background: #e8d5ae;
  border-radius: 10px;
  box-shadow: inset 0 0 0 3px #d4ba85;
  inset: 6px;
  width: auto;
  height: auto;
}

/* Construction overlay */
.obj .build-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,236,179,.85);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  z-index: 3;
  font-weight: 800;
}
.obj .build-overlay .b-ico { font-size: 42px; }
.obj .build-overlay .b-time { font-size: 22px; color: #7a5410; }

/* Bubbles */
.bubble {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 18px;
  padding: 4px 12px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(0,0,0,.18);
  z-index: 8;
  animation: bubble-pop .35s ease, bubble-bob 1.6s ease-in-out .35s infinite alternate;
}
.bubble.coin { border: 3px solid #f5a623; color: #6b4b16; }
.bubble.feed { border: 3px solid #e06666; color: #913030; }
.bubble.timer { border: 3px solid #b07ee8; color: #5c3f80; font-size: 18px; }

@keyframes bubble-pop { from { transform: translateX(-50%) scale(0); } to { transform: translateX(-50%) scale(1); } }
@keyframes bubble-bob { from { margin-top: 0; } to { margin-top: -7px; } }

/* Ghost placement */
#ghost {
  position: absolute;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  border-radius: 22px;
  border: 5px dashed #2e8b2e;
  background: rgba(120, 220, 120, .45);
  transition: left .12s ease, top .12s ease;
}
#ghost.invalid {
  border-color: #c0392b;
  background: rgba(230, 100, 90, .45);
}
#ghost-actions {
  position: absolute;
  z-index: 12;
  display: flex;
  gap: 14px;
  pointer-events: auto;
}
#ghost-actions button {
  width: 72px; height: 72px;
  border-radius: 50%;
  font-size: 34px;
  border: 4px solid #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,.25);
  color: #fff;
}
#ghost-ok { background: #4caf50; }
#ghost-ok:disabled { background: #9e9e9e; }
#ghost-no { background: #e05c5c; }

/* Visitors */
.visitor {
  position: absolute;
  font-size: 34px;
  z-index: 6;
  transition: left 1.1s linear, top 1.1s linear;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,.2));
}

/* ====== Bottom bar ====== */

#bottombar {
  position: absolute;
  bottom: calc(10px + env(safe-area-inset-bottom));
  right: 14px;
  z-index: 30;
  display: flex;
  gap: 12px;
}

.big-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 84px; height: 84px;
  background: linear-gradient(180deg, #ffd35c, #f5a623);
  border: 4px solid #fff;
  border-radius: 24px;
  box-shadow: 0 5px 0 #c47d0a, 0 8px 14px rgba(0,0,0,.25);
}
.big-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #c47d0a; }
.big-btn .bb-ico { font-size: 36px; line-height: 1.1; }
.big-btn .bb-label { font-size: 15px; font-weight: 800; color: #6b4b16; }

.big-btn.pulse { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ====== Placement banner ====== */

#place-banner {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 31;
  background: rgba(46, 60, 38, .92);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px 10px 22px;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  white-space: nowrap;
}
#place-cancel {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #e05c5c;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  border: 3px solid #fff;
}

/* ====== Toasts ====== */

#toasts {
  position: absolute;
  top: calc(64px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: 92vw;
}
.toast {
  background: rgba(255,255,255,.97);
  border: 3px solid #f5a623;
  border-radius: 18px;
  padding: 10px 22px;
  font-size: 19px;
  font-weight: 800;
  color: #5b4310;
  box-shadow: 0 5px 16px rgba(0,0,0,.22);
  animation: toast-in .3s ease, toast-out .4s ease forwards;
  animation-delay: 0s, var(--ttl, 2.4s);
  text-align: center;
  max-width: 92vw;
}
.toast.big {
  font-size: 23px;
  border-color: #8e6db8;
  color: #4a3268;
  padding: 14px 28px;
}
@keyframes toast-in { from { transform: translateY(-20px) scale(.8); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(-14px); opacity: 0; } }

/* ====== FX ====== */

#fx { position: absolute; inset: 0; pointer-events: none; z-index: 55; }

.fly-coin {
  position: absolute;
  font-size: 26px;
  animation: fly .7s ease-in forwards;
}
@keyframes fly {
  to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: .2; }
}

.float-up {
  position: absolute;
  font-size: 24px;
  font-weight: 800;
  color: #2e7d32;
  text-shadow: 0 2px 0 #fff;
  animation: float-up 1.1s ease-out forwards;
}
@keyframes float-up {
  to { transform: translateY(-70px); opacity: 0; }
}

.confetti {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 3px;
  animation: confetti-fall var(--dur, 2s) ease-in forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: .6; }
}

/* ====== Modal ====== */

#modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 40, 25, .55);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

#modal {
  position: relative;
  background: linear-gradient(180deg, #fffdf5, #fdf3da);
  border: 5px solid #c8973f;
  border-radius: 26px;
  width: min(640px, 96vw);
  max-height: min(86vh, 86dvh);
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 50px rgba(0,0,0,.35);
  overflow: hidden;
}

#modal-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #e05c5c;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  border: 3px solid #fff;
  box-shadow: 0 3px 0 rgba(0,0,0,.2);
  z-index: 5;
}

#modal-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.modal-title {
  font-size: 25px;
  font-weight: 800;
  color: #6b4b16;
  text-align: center;
  margin-bottom: 10px;
  padding-right: 40px;
  padding-left: 40px;
}

/* Shop tabs */
.shop-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.shop-tab {
  padding: 8px 18px;
  border-radius: 999px;
  background: #f0e3c2;
  border: 3px solid #d9c08a;
  font-size: 17px;
  font-weight: 800;
  color: #7a5e26;
}
.shop-tab.active {
  background: #f5a623;
  border-color: #c47d0a;
  color: #fff;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.shop-card {
  position: relative;
  background: #fff;
  border: 3px solid #e3cf9e;
  border-radius: 18px;
  padding: 10px 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  box-shadow: 0 3px 0 rgba(0,0,0,.08);
}
.shop-card:active { transform: scale(.96); }
.shop-card .sc-emoji { font-size: 46px; line-height: 1.15; }
.shop-card .sc-name { font-size: 15.5px; font-weight: 800; color: #5b4310; text-align: center; }
.shop-card .sc-info { font-size: 13px; color: #8a7340; font-weight: 700; }
.shop-card .sc-price {
  font-size: 16px;
  font-weight: 800;
  color: #6b4b16;
  background: #ffeec2;
  border-radius: 999px;
  padding: 2px 12px;
  margin-top: 2px;
}
.shop-card.cant-afford .sc-price { background: #ffd5d5; color: #a33; }
.shop-card.locked { opacity: .92; }
.shop-card.locked .sc-emoji,
.shop-card.locked .sc-name,
.shop-card.locked .sc-info { filter: grayscale(1); opacity: .45; }
.shop-card .sc-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: #666;
  gap: 0;
}
.shop-card .sc-lock .l-ico { font-size: 30px; }

.shake { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

/* Enclosure / object panel */
.panel-animals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.panel-animal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 3px solid #e3cf9e;
  border-radius: 16px;
  padding: 7px 12px;
}
.panel-animal-row .pa-emoji { font-size: 36px; }
.panel-animal-row .pa-name { flex: 1; font-size: 17px; font-weight: 800; color: #5b4310; }
.panel-animal-row .pa-tag {
  font-size: 13.5px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 10px;
  background: #e8f4e0;
  color: #3f7032;
}
.panel-animal-row .pa-tag.baby { background: #fde7f1; color: #b14a7e; }

.panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 12px 8px;
  border-radius: 18px;
  border: 3px solid;
  font-size: 17px;
  font-weight: 800;
  min-height: 76px;
}
.action-btn:active { transform: scale(.96); }
.action-btn .ab-ico { font-size: 30px; }
.action-btn .ab-sub { font-size: 14px; font-weight: 700; opacity: .85; }
.action-btn.green { background: #e3f5d8; border-color: #6fa84f; color: #34601f; }
.action-btn.orange { background: #ffeec2; border-color: #f5a623; color: #6b4b16; }
.action-btn.pink { background: #fde7f1; border-color: #e58cb6; color: #99325f; }
.action-btn.blue { background: #def1fa; border-color: #58c9f0; color: #1b6e8d; }
.action-btn.red { background: #ffe0e0; border-color: #e05c5c; color: #8d2626; }
.action-btn:disabled { opacity: .45; }
.action-btn.wide { grid-column: 1 / -1; }

.panel-note {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #8a7340;
  margin: 8px 0;
}

/* Mission modal */
.mission-card {
  background: #fff;
  border: 3px solid #b07ee8;
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
}
.mission-card .m-title { font-size: 21px; font-weight: 800; color: #4a3268; margin-bottom: 8px; }
.mission-card .m-bar {
  height: 18px;
  background: #e6def2;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0;
}
.mission-card .m-fill {
  height: 100%;
  background: linear-gradient(90deg, #b07ee8, #8e6db8);
  border-radius: 999px;
}
.mission-card .m-progress { font-size: 17px; font-weight: 800; color: #8e6db8; }
.mission-card .m-reward {
  display: inline-block;
  margin-top: 8px;
  background: #f3ecfb;
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 17px;
  font-weight: 800;
  color: #5c3f80;
}

/* Settings */
.settings-list { display: flex; flex-direction: column; gap: 10px; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 3px solid #e3cf9e;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 18px;
  font-weight: 800;
  color: #5b4310;
}
.toggle-btn {
  font-size: 26px;
  background: #f0e3c2;
  border-radius: 12px;
  padding: 4px 14px;
  border: 3px solid #d9c08a;
}
.danger-btn {
  background: #ffe0e0;
  border: 3px solid #e05c5c;
  color: #8d2626;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 800;
}

/* Math gate */
.math-gate { text-align: center; }
.math-gate .mg-q { font-size: 30px; font-weight: 800; color: #5b4310; margin: 12px 0; }
.math-gate .mg-opts { display: flex; gap: 12px; justify-content: center; }
.math-gate .mg-opts button {
  width: 76px; height: 64px;
  font-size: 26px;
  font-weight: 800;
  background: #fff;
  border: 3px solid #c8973f;
  border-radius: 16px;
  color: #5b4310;
}

/* Welcome overlay */
.welcome { text-align: center; padding: 6px; }
.welcome .w-emoji { font-size: 64px; }
.welcome h2 { font-size: 26px; color: #6b4b16; margin: 8px 0; }
.welcome p { font-size: 18px; font-weight: 700; color: #8a7340; margin-bottom: 16px; line-height: 1.45; }
.welcome .start-btn {
  background: linear-gradient(180deg, #8fd45e, #5da832);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  border: 4px solid #fff;
  border-radius: 999px;
  padding: 12px 38px;
  box-shadow: 0 5px 0 #41761f;
}
.welcome .start-btn:active { transform: translateY(4px); box-shadow: none; }

/* Confirm dialog */
.confirm-box { text-align: center; padding: 4px; }
.confirm-box .c-text { font-size: 20px; font-weight: 800; color: #5b4310; margin: 10px 0 18px; line-height: 1.4; }
.confirm-box .c-btns { display: flex; gap: 12px; justify-content: center; }
.confirm-box .c-btns button {
  font-size: 19px;
  font-weight: 800;
  border-radius: 999px;
  padding: 11px 30px;
  border: 3px solid #fff;
  color: #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,.18);
}
.confirm-box .c-yes { background: #4caf50; }
.confirm-box .c-no { background: #9e9e9e; }

/* Rotate hint */
#rotate-hint {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 14px;
  z-index: 40;
  background: rgba(255,255,255,.95);
  border: 3px solid #58c9f0;
  border-radius: 16px;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 800;
  color: #1b6e8d;
  box-shadow: 0 3px 0 rgba(0,0,0,.12);
  pointer-events: none;
}

@media (max-width: 640px) {
  .hud-pill { font-size: 16px; min-width: 70px; }
  #mission-chip .mc-text { font-size: 13px; }
  .big-btn { width: 72px; height: 72px; }
}
