/* Kamp Ateşi hub (built by js/screens.js). Every rule is scoped under #campScreen (§14.2).
   One-handed: all controls live in #campPanel at the bottom; every control is at least 44 px. */

/* ---------- HUD chips ---------- */
#campScreen #campHud {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;   /* lives · gold · Yakut · SV (no energy chip, §0) */
  gap: 6px;
}
#campScreen .meta-chip {
  height: 36px;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 4px;
  align-items: center;
  padding: 1px 6px;
  background: var(--stone);
  border: 1px solid var(--stone-hi);
  font-family: var(--font-display);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  overflow: hidden;
}
#campScreen .meta-chip .chip-ico { grid-row: 1 / 3; width: 20px; height: 20px; image-rendering: pixelated; }
#campScreen .meta-chip .chip-val { font-size: 19px; color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: clip; }
#campScreen .meta-chip .chip-sub { font-size: 14px; color: var(--dim); white-space: nowrap; }
#campScreen #goldChip .chip-val { color: var(--gold); grid-row: 1 / 3; }
#campScreen #goldChip .chip-sub { display: none; }
#campScreen #yakutChip { cursor: pointer; }
#campScreen #yakutChip .chip-val { color: var(--ruby, #ff5a8a); grid-row: 1 / 3; }
#campScreen #yakutChip .chip-sub { display: none; }
#campScreen #heroChip { grid-template-columns: 1fr; }
#campScreen #heroChip .chip-val { grid-row: 1; text-align: center; color: var(--gold); }
#campScreen #heroChip .chip-sub { display: none; }
#campScreen .chip-bar { grid-row: 2; align-self: center; height: 4px; background: var(--stone-lo); border: 1px solid var(--stone-hi); }
#campScreen .chip-bar-fill { display: block; height: 100%; width: 0; background: var(--gold); }

/* ---------- View: campfire scene / saga map ---------- */
#campScreen #campViewWrap {
  flex: 1 1 auto;
  min-height: 120px;
  position: relative;
  overflow: hidden;
  background: var(--stone-lo);
  border: 2px solid;
  border-color: var(--stone-hi) var(--stone-lo) var(--stone-lo) var(--stone-hi);
  line-height: 0;
}
#campScreen #campCanvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
}
#campScreen .map-label {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-family: var(--font-display);
  text-shadow: 1px 1px 0 var(--stone-lo), -1px 0 0 var(--stone-lo);
}
#campScreen .map-label .ml-num { font-size: 14px; letter-spacing: 0.12em; }
#campScreen .map-label .ml-name { font-size: 16px; color: var(--bone); white-space: nowrap; }

/* ---------- Bottom panel ---------- */
#campScreen #campPanel {
  flex: none;
  height: min(56vh, 440px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
#campScreen .tabs {
  flex: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
#campScreen .tab {
  min-height: 44px;
  min-width: 0;
  padding: 0 2px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--dim);
  background: var(--stone);
  border: 2px solid;
  border-color: var(--stone-hi) var(--stone-lo) var(--stone-lo) var(--stone-hi);
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}
#campScreen .tab[aria-selected="true"] {
  color: var(--gold);
  background: var(--stone-lo);
  border-color: var(--stone-lo) var(--stone-hi) var(--stone-hi) var(--stone-lo);
}
#campScreen .tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

#campScreen .camp-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y;
  overscroll-behavior: contain;
  padding: 2px 2px 6px;
  font-size: 18px;
  line-height: 1.1;
}

/* ---------- Footer ---------- */
#campScreen .camp-footer {
  flex: none;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 6px;
}
#campScreen .btn-step { min-height: 60px; min-width: 48px; padding: 0; font-size: 24px; touch-action: none; }
#campScreen .btn-step:disabled { opacity: 0.4; }
#campScreen #btnGo {
  min-height: 60px;
  padding: 2px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 2px;
}
#campScreen #btnGo .go-main { font-size: 24px; white-space: nowrap; }
#campScreen #btnGo .go-sub { font-size: 19px; white-space: nowrap; }
#campScreen #btnGo .go-sub:empty { display: none; }
#campScreen #btnGo.short .go-sub { color: #7a1a22; }
#campScreen #btnGo.pulse { animation: hub-pulse 1s steps(2) infinite; }
@keyframes hub-pulse { 50% { filter: brightness(1.35); box-shadow: 0 0 0 2px var(--gold); } }

/* ---------- Generic body pieces ---------- */
#campScreen .camp-line { margin: 0 0 4px; font-size: 18px; color: var(--bone); }
#campScreen .camp-line b { font-weight: 400; color: var(--bone); }
#campScreen .camp-line.sub { font-size: 16px; color: var(--dim); }
#campScreen .camp-line.rest { color: var(--gold); }
#campScreen .camp-line.courage { color: var(--life, #e04a5a); font-size: 16px; }
#campScreen .hint.small { font-size: 15px; margin: 6px 0; color: var(--dim); text-align: center; }
#campScreen .sec-title {
  margin: 10px 0 4px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.18em;
  color: var(--gold);
}
#campScreen .dim { color: var(--dim); }
#campScreen .btn-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 10px; }
#campScreen .btn-row .btn { min-height: 48px; font-size: 18px; padding: 4px; }
#campScreen .btn-row .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* rows: icon | text | controls */
#campScreen .row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 56px;
  padding: 4px 2px;
  border-bottom: 1px solid var(--stone-hi);
}
#campScreen .row.sold { opacity: 0.5; }
#campScreen .row.off-cls { opacity: 0.55; }
#campScreen .row-ico { width: 48px; display: grid; place-items: center; }
#campScreen .row-ico .card { margin: 0; }
#campScreen .ico36 { width: 36px; height: 36px; image-rendering: pixelated; }
#campScreen .row-main { min-width: 0; }
#campScreen .row-title { font-size: 19px; line-height: 1; color: var(--bone); overflow-wrap: anywhere; }
#campScreen .row-sub { margin-top: 2px; font-size: 15px; line-height: 1; color: var(--dim); }
#campScreen .row-sub b { font-weight: 400; color: var(--bone); }
#campScreen .row-sub b.boost { color: var(--gold); }
#campScreen .row-up { margin-top: 4px; }
#campScreen .row-ctrl { display: flex; align-items: center; }
#campScreen .ctrl-stack { display: flex; flex-direction: column; gap: 4px; }
#campScreen .lv { color: var(--gold); }
#campScreen .rank { color: var(--dim); font-size: 16px; }
#campScreen .row-title .badge-new {
  position: static;
  display: inline-block;
  padding: 0 4px;
  font-size: 14px;
  line-height: 1.1;
  color: var(--ink);
  background: var(--gold);
  vertical-align: middle;
}
#campScreen .btn-buy {
  min-height: 44px;
  min-width: 44px;
  padding: 4px 8px;
  font-size: 18px;
  white-space: nowrap;
}
#campScreen .btn-up { font-size: 17px; }

#campScreen .rarity-common { color: var(--bone); }
#campScreen .rarity-uncommon { color: var(--uncommon, #7ac04a); }
#campScreen .rarity-rare { color: var(--rare, #5aa8e0); }
#campScreen .rarity-epic { color: var(--epic, #c05ad8); }
#campScreen img.yk { width: 14px; height: 14px; image-rendering: pixelated; vertical-align: -2px; margin: 0 1px; }
#campScreen .yakut-bal { font-size: 20px; }
#campScreen .yakut-bal img.yk { width: 18px; height: 18px; }
#campScreen .set-on { color: var(--epic, #c05ad8); }
#campScreen .row.set-piece { padding-left: 16px; opacity: 0.9; }

/* deck stepper */
#campScreen .stepper { display: flex; align-items: center; gap: 4px; }
#campScreen .stepper .btn { width: 44px; min-width: 44px; min-height: 44px; height: 44px; padding: 0; font-size: 24px; }
#campScreen .stepper-val { min-width: 22px; text-align: center; font-size: 22px; font-family: var(--font-display); }
#campScreen .deck-head.bad b { color: var(--life, #e04a5a); }
#campScreen .rune-counts { margin: 0 0 6px; font-size: 16px; color: var(--dim); }

/* chip rows (Bölüm, filters) */
#campScreen .chips {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x pan-y; /* vertical drags still scroll .camp-body */
  padding: 2px 0 6px;
  scrollbar-width: thin;
}
#campScreen .chips-lead { flex: none; color: var(--dim); font-size: 17px; }
#campScreen .chip {
  flex: none;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--bone);
  background: var(--stone);
  border: 2px solid;
  border-color: var(--stone-hi) var(--stone-lo) var(--stone-lo) var(--stone-hi);
  cursor: pointer;
  touch-action: manipulation;
}
#campScreen .chip.on {
  color: var(--gold);
  background: var(--stone-lo);
  border-color: var(--stone-lo) var(--stone-hi) var(--stone-hi) var(--stone-lo);
}
#campScreen .map-info { margin-top: 4px; }

/* Kuşam: hands, bag, stash */
#campScreen .hands { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#campScreen .hand-slot {
  min-height: 64px;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 4px;
  font-family: var(--font-display);
  color: var(--bone);
  background: var(--stone);
  border: 2px solid;
  border-color: var(--stone-hi) var(--stone-lo) var(--stone-lo) var(--stone-hi);
  cursor: pointer;
  touch-action: manipulation;
}
#campScreen .hand-slot.on { outline: 2px solid var(--gold); outline-offset: -2px; }
#campScreen .hand-label { font-size: 14px; letter-spacing: 0.15em; color: var(--dim); }
#campScreen .hand-name { font-size: 16px; line-height: 1; text-align: center; }
#campScreen .slot-lg {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--stone-lo);
  border: 2px solid;
  border-color: var(--stone-lo) var(--stone-hi) var(--stone-hi) var(--stone-lo);
  box-sizing: border-box;
}
#campScreen .slot-lg .slot-img { width: 48px; height: 48px; image-rendering: pixelated; }
#campScreen .bag { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
#campScreen .bag-slot {
  position: relative;
  min-height: 52px;
  min-width: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--stone-lo);
  border: 2px solid;
  border-color: var(--stone-lo) var(--stone-hi) var(--stone-hi) var(--stone-lo);
  cursor: pointer;
  touch-action: manipulation;
}
#campScreen .bag-slot .slot-img { width: 32px; height: 32px; image-rendering: pixelated; }
#campScreen .bag-slot.empty { opacity: 0.5; }
#campScreen .bag-slot.armed { outline: 2px solid var(--gold); outline-offset: -2px; }
#campScreen .bag-slot .slot-count {
  position: absolute;
  right: 3px;
  bottom: 1px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--bone);
  text-shadow: 1px 1px 0 var(--stone-lo);
}
#campScreen .row.bag-detail { background: var(--stone); }
#campScreen .row.worn .row-ico { outline: 1px solid var(--gold); }

@media (prefers-reduced-motion: reduce) {
  #campScreen #btnGo.pulse { animation: none; box-shadow: 0 0 0 2px var(--gold); }
}
/* E-posta ile giriş: two inputs in the sheet body */
.hub-sheet.form { display: flex; flex-direction: column; gap: 8px; }
.hub-sheet.form .field {
  font-family: var(--font-body); font-size: 20px; padding: 8px; color: var(--bone);
  background: var(--stone-lo); border: 2px solid var(--stone-hi); border-radius: 0; width: 100%; box-sizing: border-box;
}
