.ck-player-camp {
  box-sizing: border-box;
  position: absolute;
  z-index: 24;
  right: max(12px, env(safe-area-inset-right));
  top: max(12px, env(safe-area-inset-top));
  width: min(325px, calc(100vw - 24px));
  max-height: 45vh;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid #8d6944;
  border-radius: 6px;
  color: #f1ddba;
  background: #251b15f2;
  font: 13px/1.45 system-ui, sans-serif;
  box-shadow: 0 2px 9px #0008;
  overflow-wrap: anywhere;
}
.ck-player-camp .ck-camp-heading { color: #ffdda0; font-weight: 700; }
.ck-player-camp button {
  border: 1px solid #96754d;
  background: #483320;
  color: #ffebc5;
  font: inherit;
  padding: 4px 8px;
  margin: 4px 4px 0 0;
  border-radius: 4px;
  cursor: pointer;
}
.ck-player-camp button:hover, .ck-player-camp button:focus-visible { background: #61452a; }
.ck-camp-storage { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: 80vh; }
.ck-camp-storage h2 { margin: 0; font-size: 16px; }

/* Food sources (js/castle-food.js): fishing minigame, food counter, fruit tree cards */
.ck-fishing, .ck-food-counter {
  width: min(360px, calc(100vw - 32px)); margin: auto; padding: 14px 16px;
  background: #2b2014; color: #ffebc5; border: 1px solid #96754d; border-radius: 8px;
  font: 14px/1.45 system-ui, sans-serif; box-shadow: 0 4px 18px #000a;
}
.ck-fishing::backdrop, .ck-food-counter::backdrop { background: #0006; }
.ck-fishing h2, .ck-food-counter h2 { margin: 0 0 8px; font-size: 17px; color: #ffdda0; }
.ck-fishing button, .ck-food-counter button {
  display: block; width: 100%; min-height: 44px; margin: 6px 0 0; padding: 8px 10px;
  border: 1px solid #96754d; border-radius: 6px; background: #483320; color: #ffebc5; font: inherit; cursor: pointer;
}
.ck-fishing button:hover, .ck-food-counter button:hover, .ck-fishing button:focus-visible, .ck-food-counter button:focus-visible { background: #61452a; }
.ck-fishing button:disabled, .ck-food-counter button:disabled { opacity: .6; cursor: default; }
.ck-fishing .ck-fishing-action { min-height: 64px; font-size: 18px; font-weight: 700; }
.ck-fishing[data-phase="bite"] .ck-fishing-action { background: #8a4b17; border-color: #ffbf6b; }
.ck-fishing-water {
  position: relative; height: 70px; border-radius: 6px; overflow: hidden;
  background: linear-gradient(#3c6d86, #24485c);
}
.ck-fishing-bobber {
  position: absolute; left: calc(50% - 7px); top: 26px; width: 14px; height: 18px; border-radius: 50% 50% 45% 45%;
  background: linear-gradient(#e8402f 55%, #f4efe2 55%); box-shadow: 0 6px 0 -3px #fff4;
}
.ck-fishing[data-phase="waiting"] .ck-fishing-bobber { animation: ck-bob 1.6s ease-in-out infinite; }
.ck-fishing[data-phase="bite"] .ck-fishing-bobber { top: 40px; animation: ck-bite .25s ease-in-out infinite alternate; }
/* Phones in landscape: keep Cast and Done on screen without scrolling. */
@media (max-height: 500px) {
  .ck-fishing { max-height: calc(100dvh - 16px); overflow: auto; padding: 8px 12px; }
  .ck-fishing h2 { margin-bottom: 4px; }
  .ck-fishing-water { height: 40px; }
  .ck-fishing-bobber { top: 12px; }
  .ck-fishing[data-phase="bite"] .ck-fishing-bobber { top: 20px; }
  .ck-fishing .ck-fishing-status { margin: 4px 0; }
  .ck-fishing .ck-fishing-action { min-height: 48px; }
}
@keyframes ck-bob { 50% { transform: translateY(3px); } }
@keyframes ck-bite { to { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) {
  .ck-fishing .ck-fishing-bobber { animation: none !important; }
}
.ck-fishing-tips summary, .ck-food-counter summary, .ck-fruit-tree summary { cursor: pointer; color: #ffdda0; }
.ck-fishing-tips p, .ck-food-counter details p { margin: 4px 0; font-size: 13px; }
.ck-food-counter button { text-align: left; padding-left: 40px; background-image: var(--ck-food-icon); background-repeat: no-repeat;
  background-position: 9px center; background-size: 22px; background-color: #483320; }
.ck-fruit-tree { margin-top: 4px; }
.ck-fruit-tree p { margin: 2px 0; font-size: 12px; }
.ck-item-spoiled { filter: sepia(.8) saturate(.5); }
.ck-plan-tree { display: block; opacity: .85; }
.ck-player-camp button.ck-camp-minor { font-size: 12px; padding: 3px 7px; }
.ck-food-counter .ck-food-limits { margin: 0 0 8px; min-height: 2.6em; font-size: 13px; color: #e8d3a8; overflow-wrap: anywhere; }
.ck-food-counter button.ck-food-sold-out { opacity: .45; text-decoration: line-through; }
