#river-panel {
  width: min(900px, calc(var(--app-authored-width) - 120px)) !important;
  min-height: 520px !important;
}

#river-panel > .panel-body.river-panel-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  padding: 18px !important;
  background:
    radial-gradient(circle at top center, rgba(79, 119, 160, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(14, 22, 35, 0.97), rgba(8, 13, 22, 0.988)) !important;
}

/* ============================================================
   River panel fit ownership
   ============================================================ */
#river-panel {
  display: flex;
  flex-direction: column;
}

#river-panel > .panel-body.river-panel-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Migrated ownership from 14-trail-a.css — family consolidation */
#chaoregon-map-panel {width: 1400px;
  height: 640px;
  display: flex;
  flex-direction: column;
  border: 2px solid #415a77;
  border-radius: 8px;
  overflow: hidden;
  background: #0d1b2a;}

/* ============================
   Trail Camp Overlay + Campfire visuals
   ============================ */
#trail-camp-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
  z-index: 50 !important;
  transition: opacity 0.4s ease;
  opacity: 1;
}

#trail-camp-overlay.fade-out {
  opacity: 0;
}

/* ============================
   River Crossing Panel
   ============================ */
#river-panel {
  text-align: center;
}
#river-panel h3 {
  font-size: 18px;
  color: #ffd60a;
  margin-bottom: 10px;
}
#river-panel p {
  margin: 8px 0 14px 0;
  font-size: 14px;
}
#river-panel button {
  display: block;
  width: 80%;
  margin: 6px auto;
  padding: 6px 12px;
  background: #415a77;
  border: 2px solid #ffd60a;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  transition: background 0.2s;
}
#river-panel button:hover {
  background: #5b63ff;
}

#paperdoll-chao-select {
  width: 100%;
  margin-bottom: 10px;
  padding: 4px;
  background: #415a77;
  border: none;
  border-radius: 6px;
  color: #fff;
  pointer-events: auto !important;
}

/* ============================
   Chao Preview
   ============================ */
#paperdoll-preview {
  width: 160px;
  height: 160px;
  margin: 0 auto 10px auto;
  border: 2px solid #415a77;
  border-radius: 8px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#paperdoll-preview canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

/* ============================
   Equip Slots
   ============================ */
#paperdoll-slots {
  display: flex;
  justify-content: space-around;
  margin-top: 10px;
}

/* Slot base */
.equip-slot {
  position: relative;
  width: 64px;
  height: 64px;
  border: 2px dashed #415a77;
  border-radius: 6px;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  image-rendering: pixelated;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: bold;
  color: #9fb3c8;
  text-align: center;
}

/* Empty state */
.equip-slot.empty {
  background: rgba(0,0,0,0.6);
  border: 2px dashed #415a77;
}

/* Drag highlight */
.equip-slot.dragover {
  border-color: #ffd60a;
  background: rgba(255, 214, 10, 0.2);
}

/* Slot label (STATIC — never removed) */
.slot-label {
  pointer-events: none;
  text-shadow: 1px 1px 0px #000;
  z-index: 1;
}

/* Equipped item icon — sprite-sheet safe */
.slot-icon {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: none;            /* ✅ do not scale sprite sheets */
  object-position: 0px 0px;    /* ✅ F-facing frame (row 0) */

  image-rendering: pixelated;
  display: none;
  pointer-events: none;
  z-index: 2;
}

/* Optional hover polish */
.equip-slot.hover {
  border-color: #8ecae6;
}

/* ============================
   Inventory Grid Container
   ============================ */
#paperdoll-inventory {
  margin-top: 10px;
}

#paperdoll-item-list.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 48px);
  gap: 6px;
  justify-content: center;
}

/* ============================
   Trail Shop Panel
   ============================ */
#trailshop-panel h3 {
  font-size: 18px;
  font-weight: bold;
  color: #ffd60a;
  text-shadow: 2px 2px 0px #000;
  margin: 0 0 10px 0;
  text-align: center;
}

#trailshop-rings {
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
  color: #ffd60a;
}

/* Tabs */
#trailshop-panel .tab-header {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}
.trailshop-tab {
  padding: 6px 12px;
  background: #415a77;
  border: 2px solid #ffd60a;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  transition: background 0.2s;
}
.trailshop-tab:hover {
  background: #5b63ff;
}
.trailshop-tab.active {
  background: #ffd60a;
  color: #000;
}

/* Inventory List */
#trailshop-inventory {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.trailshop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: rgba(0,0,0,0.4);
  border: 2px solid #415a77;
  border-radius: 6px;
}
.trailshop-item span {
  flex: 1;
}
.trailshop-item button {
  min-width: 60px;
  background: #ffd60a;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-weight: bold;
  transition: background 0.2s;
}
.trailshop-item button:hover {
  background: #ffea55;
}

/* Exit Button */
#trailshop-exit {
  display: block;
  margin: 12px auto 0 auto;
  padding: 6px 14px;
  background: #a02020;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  color: #fff;
  transition: background 0.2s;
}
#trailshop-exit:hover {
  background: #d03030;
}


#tree-shake-panel #treeGameZone{
  margin-top: 8px;
}

#toy-hunt-panel #bushGrid {
  margin-top: 12px;
}


#fishing-panel #fishing-scene {
  height: 320px;
}


#repair-panel #repair-zone {
  width: 100%;
}
#repair-panel .repair-summary {
  width: 100%;
  box-sizing: border-box;
}

#story-panel > .panel-body.story-panel-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  padding: 12px 14px 14px;
  text-shadow: 1px 1px 2px #000;
}


#chaoregon-setup-panel .shop-row + .shop-row {
  margin-top: 8px;
}

#trailshop-panel > .panel-body.trailshop-panel-body,
#river-panel > .panel-body.river-panel-body {
  gap: 8px;
}
#river-panel > .panel-body.river-panel-body {
  text-align: center;
}

#chaoregon-reward-list {
  width: 100%;
}

/* Chaoregon trail background ordering */


/* Legacy TrackMaker1 fully removed */
#trackmaker-panel { display: none !important; }

/* ============================
   Unified Chaoregon Trail Screen
   ============================ */


.trail-screen-top-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex: 0 0 auto;
}

.trail-embedded-map {
  flex: 0 0 470px;
  display: flex;
  flex-direction: column;
  border: 2px solid #415a77;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0,0,0,0.45);
}

.trail-embedded-map-header {
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #ffd60a;
  background: rgba(0,0,0,0.55);
  border-bottom: 2px solid #415a77;
}

.trail-map-area {
  flex: 1 1 auto;
  min-height: 320px;
  background: url("../assets/bgs/ChaoregonMap.png") no-repeat center center;
  background-size: contain;
  position: relative;
}

.trail-screen-main-view {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}


#chaoregon-map-panel {
  display: none !important;
}


/* ============================================================
   Display pass patch34 — remaining trail/rewards canonical layer
   Purpose: finish neutralizing the last raw size leftovers around
   Chaoregon setup/rewards/sidecards without touching gameplay CSS.
   ============================================================ */


