/* Görevler */
.gq {
  --navy: #07101c;
  --panel: #0a1528;
  --row: #122036;
  --gold: #f6c445;
  --cream: #f7f1e4;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 40% at 50% -5%, rgba(80, 120, 200, 0.14), transparent 55%),
    var(--navy);
  color: var(--cream);
  font-family: var(--font);
  user-select: none;
}
.gq button { -webkit-tap-highlight-color: transparent; }
.gq svg { display: block; flex-shrink: 0; }

.gq-top {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 6px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px;
  background: rgba(10, 21, 40, 0.94);
  border-bottom: 1px solid rgba(246, 196, 69, 0.18);
}
.gq-top h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(20px, 5.4vw, 24px);
  font-weight: 900;
  color: #fff;
}
.gq-pad { width: 40px; height: 40px; }
.gq-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.gq-icon-btn svg { width: 22px; height: 22px; }
.gq-icon-btn:active { transform: scale(0.95); }

.gq-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px 8px;
}
.gq-tab {
  min-height: 36px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 900;
  color: rgba(247, 241, 228, 0.75);
  background: #122036;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.gq-tab.on {
  color: #fff;
  background: linear-gradient(180deg, #ffb347 0%, #ff8a1a 55%, #e06a00 100%);
  border-color: rgba(255, 200, 120, 0.55);
  box-shadow:
    0 0 14px rgba(255, 140, 40, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.gq-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 12px calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gq-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background:
    linear-gradient(#152438, #0e1a2c) padding-box,
    linear-gradient(150deg, rgba(255, 220, 120, 0.35), rgba(80, 140, 200, 0.3)) border-box;
  border: 1.5px solid transparent;
}
.gq-row.is-ready {
  border-color: rgba(120, 220, 120, 0.45);
  box-shadow: 0 0 12px rgba(80, 200, 100, 0.2);
}
.gq-row.is-claimed { opacity: 0.55; }
.gq-ico {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, #2a4060, #0a1424 70%);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.gq-ico img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
}
.gq-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gq-row strong {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}
.gq-reward {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #9fe870;
}
.gq-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.gq-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2a6ad0, #5ec8ff 55%, #9fe870);
}
.gq-row.is-ready .gq-bar i,
.gq-row.is-claimed .gq-bar i {
  background: linear-gradient(90deg, #3a9a40, #9fe870);
}
.gq-bar span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 2px #000;
}

.gq-btn {
  min-width: 58px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 900;
  border: none;
}
.gq-btn.is-go {
  color: #e8f4ff;
  background: linear-gradient(180deg, #3a6aa8, #245088);
  box-shadow: 0 3px 0 #16365c;
}
.gq-btn.is-claim {
  color: #1a2a10;
  background: linear-gradient(180deg, #9fe870, #4caf50);
  box-shadow: 0 3px 0 #2e6a30;
}
.gq-btn.is-done {
  color: rgba(247, 241, 228, 0.45);
  background: #1a2838;
  box-shadow: none;
}
.gq-btn:active:not(:disabled) { transform: translateY(1px); }
.gq-btn:disabled { opacity: 0.7; }

/* Günlük ödül rayı — 3D sandık */
.gq-mile {
  margin-top: 6px;
  padding: 12px 8px 12px;
  border-radius: 18px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(246, 196, 69, 0.12), transparent 55%),
    linear-gradient(180deg, #152844 0%, #0c1828 100%);
  border: 1px solid rgba(246, 196, 69, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.gq-mile-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 4px 10px;
}
.gq-mile-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.02em;
}
.gq-mile-head em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: rgba(247, 241, 228, 0.5);
}
.gq-mile-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--mile-n, 5), minmax(0, 1fr));
  gap: 2px;
  align-items: start;
  padding: 4px 0 0;
}
.gq-mile-rail {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 36px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  z-index: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}
.gq-mile-rail i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c47d08, #f0a000 40%, #ffe56a);
  box-shadow: 0 0 10px rgba(246, 196, 69, 0.45);
  transition: width 0.45s ease;
}
.gq-mile-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 0 1px;
  background: transparent;
  border: none;
  color: rgba(247, 241, 228, 0.7);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
.gq-mile-glow {
  position: absolute;
  top: 8px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 80, 0.45), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.gq-mile-chest {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 70%, rgba(246, 196, 69, 0.18), transparent 65%),
    linear-gradient(180deg, rgba(30, 48, 72, 0.9), rgba(10, 18, 32, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}
.gq-mile-art,
.gq-mile-chest img.gq-mile-art {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  transition: filter 0.35s ease, transform 0.35s ease;
}
.gq-mile-badge {
  margin-top: 1px;
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: #f7f1e4;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.2;
}
.gq-mile-rew {
  display: flex;
  justify-content: center;
  min-height: 16px;
  max-width: 100%;
  overflow: hidden;
}
.gq-mile-rew .rw {
  gap: 4px;
  transform: scale(0.88);
  transform-origin: top center;
  color: #9fe870;
  font-size: 10px;
}
.gq-mile-rew .rw-ico,
.gq-mile-rew img.rw-ico {
  width: 12px;
  height: 12px;
}
.gq-mile-cta {
  margin-top: 1px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #3a2608;
  background: linear-gradient(180deg, #ffe56a, #f0a000);
  box-shadow: 0 2px 0 #c47d08;
}
.gq-mile-cta.is-done {
  color: #8dffb0;
  background: rgba(61, 220, 110, 0.16);
  border: 1px solid rgba(61, 220, 110, 0.35);
  box-shadow: none;
}

.gq-mile-node.is-locked .gq-mile-chest {
  opacity: 0.72;
}
.gq-mile-node.is-locked .gq-mile-art {
  filter: grayscale(0.35) brightness(0.78) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}
.gq-mile-node.is-locked .gq-mile-rew { opacity: 0.55; }

.gq-mile-node.is-ready .gq-mile-glow { opacity: 1; }
.gq-mile-node.is-ready .gq-mile-chest {
  border-color: rgba(255, 210, 80, 0.65);
  box-shadow:
    0 0 0 1px rgba(246, 196, 69, 0.25),
    0 0 16px rgba(246, 196, 69, 0.35),
    0 8px 14px rgba(0, 0, 0, 0.4);
  animation: gqMileBob 1.8s ease-in-out infinite;
}
.gq-mile-node.is-ready .gq-mile-art {
  filter: drop-shadow(0 0 8px rgba(255, 210, 80, 0.55));
}
.gq-mile-node.is-ready .gq-mile-badge {
  color: #3a2608;
  background: linear-gradient(180deg, #ffe56a, #f0a000);
  border-color: rgba(255, 255, 255, 0.25);
}

.gq-mile-node.is-claimed .gq-mile-chest {
  border-color: rgba(61, 220, 110, 0.4);
  box-shadow: 0 0 12px rgba(61, 220, 110, 0.2), 0 6px 12px rgba(0, 0, 0, 0.35);
}
.gq-mile-node.is-claimed .gq-mile-badge {
  color: #8dffb0;
  border-color: rgba(61, 220, 110, 0.35);
  background: rgba(61, 220, 110, 0.12);
}
.gq-mile-node.is-claimed .gq-mile-rew { opacity: 0.7; }

.gq-mile-node:not(:disabled):active .gq-mile-chest {
  transform: scale(0.94);
}

@keyframes gqMileBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .gq-mile-node.is-ready .gq-mile-chest { animation: none; }
  .gq-mile-rail i { transition: none; }
}

@media (max-height: 700px) {
  .gq-ico { width: 48px; height: 48px; }
  .gq-row { grid-template-columns: 48px 1fr auto; }
}
