/* Hafriyat: şantiye orta paneli doldurur; göstergeler yarı saydam, sade; sarı iş makinesi vurgusu */

.hafriyat { flex: 1; min-height: 0; display: flex; padding: 0 16px; }
.hf-stage {
  container-type: inline-size; position: relative; flex: 1; min-height: 0; overflow: hidden; outline: none;
  background: #9dc2de; border: 1px solid var(--line); border-radius: 10px;
}
.hf-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.hf-stage canvas:active { cursor: grabbing; }
.hf-stage:fullscreen { border: 0; border-radius: 0; }
/* tam ekran düğmesi (sağ alt) */
.hf-fs {
  position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 9px; background: rgb(14 16 20 / 0.55); color: #fff; cursor: pointer; pointer-events: auto; backdrop-filter: blur(6px);
}
.hf-fs:hover { background: rgb(14 16 20 / 0.75); }
.hf-fs svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hf-stage.loading::after {
  content: "şantiye hazırlanıyor…"; position: absolute; inset: 0; display: grid; place-items: center; color: rgb(30 40 50 / 0.7); font-size: 13px;
}
.hf-error { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; }

/* Sol şerit simgesi: kehribar */
.hf-tab { border-color: color-mix(in srgb, #f0b400 50%, var(--line)); background: color-mix(in srgb, #f0b400 10%, transparent); box-shadow: 0 0 14px -5px color-mix(in srgb, #f0b400 55%, transparent); }
.hf-tab:hover { border-color: #f0b400; box-shadow: 0 0 18px -3px color-mix(in srgb, #f0b400 70%, transparent); }
.hf-tab .nt-icon { width: 16px; height: 16px; }

.hf-hud { position: absolute; inset: 0; pointer-events: none; color: #fff; font-size: 12px; text-shadow: 0 1px 2px rgb(0 0 0 / 0.35); }
.hf-glass {
  background: rgb(14 16 20 / 0.55); border: 1px solid rgb(255 255 255 / 0.1); border-radius: 10px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-shadow: none;
}
.hf-info { position: absolute; left: 12px; top: 12px; display: grid; gap: 2px; padding: 8px 12px; }
.hf-info b { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
.hf-info small { color: rgb(255 255 255 / 0.7); font-size: 11px; }
/* Sağ üst: ortak kasa + görev listesi (faz 2) */
.hf-jobs { position: absolute; right: 12px; top: 12px; width: 244px; display: grid; overflow: hidden; }
.hf-jobs[hidden] { display: none; }
.hf-vault { display: flex; align-items: baseline; gap: 8px; padding: 9px 12px 8px; border-bottom: 1px solid rgb(255 255 255 / 0.08); }
.hf-vault small { color: rgb(255 255 255 / 0.6); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.hf-vault b { margin-left: auto; color: #ffd23a; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hf-gain { margin-left: auto; color: #6fe3a0; font-size: 11.5px; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; opacity: 0; }
.hf-gain + b { margin-left: 0; }
.hf-gain.on { animation: hf-gain 1.9s ease-out forwards; }
@keyframes hf-gain { 0% { opacity: 0; transform: translateY(4px); } 12% { opacity: 1; transform: none; } 70% { opacity: 1; } 100% { opacity: 0; } }
.hf-quests { margin: 0; padding: 2px 0; list-style: none; }
.hf-q { display: grid; gap: 4px; padding: 8px 12px 9px; }
.hf-q + .hf-q { border-top: 1px solid rgb(255 255 255 / 0.06); }
.hf-q-top { display: flex; align-items: center; gap: 6px; min-height: 14px; font-size: 10px; }
.hf-q-kind { color: #ffd23a; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.hf-q-dir { margin-left: auto; display: flex; align-items: center; gap: 4px; color: rgb(255 255 255 / 0.72); font-size: 11px; font-variant-numeric: tabular-nums; }
.hf-q-dir i { display: grid; width: 11px; height: 11px; }
.hf-q-dir svg { width: 11px; height: 11px; fill: currentColor; }
.hf-q-title { color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.hf-q-bar { height: 4px; border-radius: 2px; background: rgb(255 255 255 / 0.14); overflow: hidden; }
.hf-q-bar > i { display: block; width: 0; height: 100%; border-radius: 2px; background: #f0b400; transition: width 0.35s ease-out; }
.hf-q-sub { display: flex; justify-content: space-between; gap: 8px; color: rgb(255 255 255 / 0.68); font-size: 11px; font-variant-numeric: tabular-nums; }
.hf-q-sub span:last-child { color: rgb(255 255 255 / 0.85); white-space: nowrap; }
.hf-q.done .hf-q-kind, .hf-q.done .hf-q-sub span:last-child { color: #6fe3a0; }
.hf-q.done .hf-q-bar > i { background: #3ccf7f; }
.hf-q.done { background: rgb(60 207 127 / 0.08); }
.hf-shop-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0; padding: 7px 12px; border: 0; border-top: 1px solid rgb(255 255 255 / 0.08);
  background: transparent; color: rgb(255 255 255 / 0.78); font: inherit; font-size: 11.5px; cursor: pointer; pointer-events: auto;
}
.hf-shop-btn:hover { background: rgb(255 255 255 / 0.06); color: #fff; }
.hf-shop-btn kbd, .hf-shop kbd { padding: 0 5px; border-radius: 4px; background: rgb(255 255 255 / 0.16); border: 1px solid rgb(255 255 255 / 0.12); font: inherit; font-size: 10.5px; font-weight: 700; }

/* Olay bandı (görev bitti / satın alma / rekor) ve havada kalma sayacı */
.hf-banner {
  position: absolute; left: 50%; top: 14px; max-width: calc(100% - 560px); min-width: 0; transform: translate(-50%, -6px); opacity: 0; transition: opacity 0.25s, transform 0.25s;
  padding: 8px 14px 8px 12px; border-radius: 10px; background: rgb(14 16 20 / 0.8); border: 1px solid rgb(255 255 255 / 0.12); border-left: 3px solid #3ccf7f;
  font-size: 13px; font-weight: 600; text-shadow: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hf-banner.on { opacity: 1; transform: translate(-50%, 0); }
.hf-banner[data-kind="buy"] { border-left-color: #f0b400; }
.hf-banner[data-kind="record"] { border-left-color: #4aa8ff; }
.hf-air {
  position: absolute; left: 50%; top: 26%; display: grid; justify-items: center; transform: translate(-50%, 4px); opacity: 0; transition: opacity 0.15s, transform 0.15s;
  text-shadow: 0 2px 8px rgb(0 0 0 / 0.45);
}
.hf-air.on { opacity: 1; transform: translate(-50%, 0); }
.hf-air small { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
.hf-air b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hf-air.landed b { color: #ffd23a; }

/* Mağaza */
.hf-shop {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(540px, calc(100% - 32px)); max-height: calc(100% - 40px); overflow-y: auto;
  padding: 16px 18px 14px; border-radius: 14px; background: rgb(14 16 20 / 0.9); border: 1px solid rgb(255 255 255 / 0.12); pointer-events: auto; text-shadow: none;
}
.hf-shop-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hf-shop-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.hf-shop-vault { margin-left: auto; color: rgb(255 255 255 / 0.6); font-size: 11px; }
.hf-shop-vault b { color: #ffd23a; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hf-x { width: 28px; height: 28px; border: 0; border-radius: 7px; background: rgb(255 255 255 / 0.08); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.hf-x:hover { background: rgb(255 255 255 / 0.16); }
.hf-items { display: grid; gap: 6px; }
.hf-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 12px; border-radius: 9px; background: rgb(255 255 255 / 0.05); border: 1px solid rgb(255 255 255 / 0.06); }
.hf-item > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.hf-item b { font-size: 13px; font-weight: 600; }
.hf-item small { color: rgb(255 255 255 / 0.62); font-size: 11.5px; }
.hf-item em { color: rgb(255 255 255 / 0.42); font-size: 10.5px; font-style: normal; }
.hf-item button {
  flex: none; min-width: 92px; padding: 7px 12px; border: 0; border-radius: 8px; background: #f0b400; color: #1b1608; font: inherit; font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap;
}
.hf-item button:hover:not(:disabled) { background: #ffc61a; }
.hf-item button.confirm { background: #3ccf7f; color: #08200f; }
.hf-item button:disabled { background: rgb(255 255 255 / 0.1); color: rgb(255 255 255 / 0.5); cursor: default; }
.hf-item.owned { opacity: 0.6; }
.hf-item.owned button:disabled { background: transparent; color: #6fe3a0; }
.hf-shop-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; margin-top: 14px; }
.hf-shop h4 { margin: 0 0 6px; color: #ffd23a; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.hf-recs, .hf-log { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.hf-recs li { display: grid; grid-template-columns: 16px 1fr auto; gap: 6px; color: rgb(255 255 255 / 0.85); }
.hf-recs b { font-variant-numeric: tabular-nums; }
.hf-rank { color: rgb(255 255 255 / 0.45); font-variant-numeric: tabular-nums; }
.hf-log li { display: grid; grid-template-columns: 38px 1fr; gap: 6px; color: rgb(255 255 255 / 0.8); line-height: 1.35; }
.hf-log time { color: rgb(255 255 255 / 0.42); font-variant-numeric: tabular-nums; }
.hf-recs .hf-empty, .hf-log .hf-empty { display: block; color: rgb(255 255 255 / 0.45); }
.hf-shop-foot { margin: 12px 0 0; color: rgb(255 255 255 / 0.5); font-size: 11px; line-height: 1.45; }

/* Dar sahne: görev listesi sıkışır, bant aşağı iner */
@container (max-width: 760px) {
  .hf-jobs { width: 208px; }
  .hf-q { padding: 6px 10px 7px; }
  .hf-q-title { font-size: 12px; }
  .hf-banner { top: auto; bottom: 128px; max-width: calc(100% - 24px); }
  .hf-shop-cols { grid-template-columns: 1fr; }
}


/* mini harita: sağ altta, tam ekran düğmesinin üstünde */
.hf-map { position: absolute; right: 12px; bottom: 54px; width: 176px; aspect-ratio: 1; padding: 4px; }
.hf-map[hidden] { display: none; }
.hf-map canvas { display: block; width: 100%; height: 100%; border-radius: 7px; }
@container (max-width: 760px) { .hf-map { width: 132px; } }

.hf-gauge {
  position: absolute; left: 12px; bottom: 44px; display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 0 8px;
  min-width: 190px; padding: 10px 14px;
}
.hf-gname { grid-column: 1 / -1; margin-bottom: 4px; color: #ffd23a; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hf-speed { font-size: 32px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.hf-unit { padding-bottom: 4px; font-size: 11px; opacity: 0.7; }
.hf-load { grid-column: 1 / -1; display: grid; gap: 4px; margin-top: 8px; }
.hf-load > i { display: block; height: 6px; border-radius: 3px; background: rgb(255 255 255 / 0.16); overflow: hidden; }
.hf-load > i > i { display: block; height: 100%; width: 0; border-radius: 3px; background: #f0b400; transition: width 0.12s linear; }
.hf-load small { font-size: 11px; color: rgb(255 255 255 / 0.8); font-variant-numeric: tabular-nums; }

.hf-prompt {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); padding: 7px 16px; border-radius: 999px;
  background: rgb(240 180 0 / 0.95); color: #1b1608; font-size: 13px; font-weight: 700; text-shadow: none; white-space: nowrap;
}
.hf-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 6px 14px; border-radius: 8px;
  background: rgb(14 16 20 / 0.45); color: rgb(255 255 255 / 0.85); font-size: 11.5px; text-align: center; text-shadow: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hf-toast {
  position: absolute; left: 50%; top: 18%; transform: translate(-50%, 6px); padding: 8px 16px; border-radius: 10px; opacity: 0; transition: opacity 0.2s, transform 0.2s;
  background: rgb(14 16 20 / 0.7); font-size: 13px; text-shadow: none; white-space: nowrap;
}
.hf-toast.on { opacity: 1; transform: translate(-50%, 0); }

.hf-tags { position: absolute; inset: 0; overflow: hidden; }
.hf-tag {
  position: absolute; left: 0; top: 0; padding: 1px 8px; border-radius: 999px; background: rgb(14 16 20 / 0.6); color: #fff; font-size: 11px; font-weight: 600;
  white-space: nowrap; will-change: transform; text-shadow: none;
}

.hf-help {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100% - 32px)); max-height: calc(100% - 40px); overflow-y: auto;
  padding: 16px 20px; border-radius: 14px; background: rgb(14 16 20 / 0.86); border: 1px solid rgb(255 255 255 / 0.12); pointer-events: auto; text-shadow: none;
}
.hf-help h4 { margin: 12px 0 6px; color: #ffd23a; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.hf-help h4:first-child { margin-top: 0; }
.hf-help-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 3px 0; font-size: 12px; color: rgb(255 255 255 / 0.85); }
.hf-help-row > span:first-child { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.hf-help kbd { padding: 1px 6px; border-radius: 4px; background: rgb(255 255 255 / 0.16); border: 1px solid rgb(255 255 255 / 0.12); font: inherit; font-size: 11px; font-weight: 700; color: #fff; }
.hf-help-foot { margin: 12px 0 0; font-size: 11px; color: rgb(255 255 255 / 0.55); }

.hf-loading { position: absolute; inset: 0; display: grid; place-items: center; background: #9dc2de; color: rgb(30 40 50 / 0.75); font-size: 13px; }

@media (max-width: 760px) {
  .hafriyat { padding: 0; }
  .hf-stage { border-radius: 0; border-width: 0; }
  .hf-gauge { min-width: 0; padding: 8px 10px; bottom: 48px; }
  .hf-speed { font-size: 24px; }
  .hf-help-row { grid-template-columns: 1fr; gap: 2px; }
  .hf-hint { white-space: normal; }
}
