/* Decode edilmiş art — pending: koyu yer tutucu (flash/pop yok) */
img.art-img.is-pending {
  opacity: 1;
  background: rgba(8, 14, 24, 0.85);
  filter: brightness(0.15);
}
img.art-img.is-ready {
  opacity: 1;
  filter: none;
  background: transparent;
}

/* Ortak eşya +N / ×N rozeti — çanta ile aynı (her ekranda) */
.iq-lv,
.iq-qty,
.bg-lv,
.bg-qty {
  position: absolute;
  z-index: 2;
  bottom: 0;
  min-width: 1.2em;
  padding: 1px 4px;
  font-style: normal;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: none;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.iq-lv,
.bg-lv {
  left: 0;
  border-radius: 0 4px 0 0;
  border-left: none;
  color: #fff8dc;
  background: linear-gradient(180deg, rgba(60, 48, 18, 0.94), rgba(18, 14, 8, 0.96));
  border-color: rgba(246, 196, 69, 0.55);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
}
.iq-qty,
.bg-qty {
  right: 0;
  border-radius: 4px 0 0 0;
  border-right: none;
  color: #f4f8ff;
  background: linear-gradient(180deg, rgba(28, 40, 58, 0.94), rgba(10, 14, 22, 0.96));
  border-color: rgba(160, 190, 230, 0.45);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
}

:root {
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cream: #f7f1e4;
  --gold: #f6c445;
  --navy: #071426;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: var(--font);
  color: var(--cream);
  background: #070b08;
  touch-action: manipulation;
  position: fixed;
  inset: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Net yazı — sentetik bold / GPU blur yok */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  font-synthesis: none;
}
button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  background: none;
  touch-action: manipulation;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.app {
  contain: layout style;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  height: 100%;
  max-width: 520px;
  margin: 0 auto;
  position: absolute;
  inset: 0;
  /* transform ile ortalama yazıyı bulanıklaştırır — margin ile ortala */
  left: 0;
  right: 0;
  overflow: hidden;
  background: var(--navy);
  contain: layout style size;
}

/* Boot: asset decode bitene kadar tek renk — flash yok */
#boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100%;
  max-width: 520px;
  left: 0;
  right: 0;
  margin: 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #07101c;
  transition: opacity 0.45s ease, visibility 0.45s ease;
  pointer-events: none;
}
#boot.is-done {
  opacity: 0;
  visibility: hidden;
}
#boot .boot-slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* İlk slayt CSS bg — img gelmeden boş ekran yok */
  background: #07101c url('../assets/ui/splash/slides/1.jpg?v=1') center / cover no-repeat;
}
#boot .boot-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.1s ease;
  will-change: opacity;
  /* decode bitmeden görünmesin */
  visibility: hidden;
}
#boot.is-ready .boot-slide {
  visibility: visible;
}
#boot .boot-slide.is-on {
  opacity: 1;
  z-index: 1;
  animation: bootKen 9s ease-out forwards;
}
#boot .boot-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg,
      rgba(4, 10, 22, 0.28) 0%,
      rgba(4, 10, 22, 0.18) 32%,
      rgba(4, 10, 22, 0.5) 56%,
      rgba(4, 10, 22, 0.9) 78%,
      #040a16 100%);
  pointer-events: none;
}
#boot .boot-glow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 18%;
  z-index: 2;
  height: 28%;
  background: radial-gradient(ellipse at 50% 50%, rgba(246, 180, 40, 0.22), transparent 70%);
  pointer-events: none;
  animation: bootPulseGlow 2.4s ease-in-out infinite;
}
#boot .boot-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 22px calc(28px + env(safe-area-inset-bottom, 0px));
}
#boot .boot-logo {
  width: min(88%, 340px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.65));
  animation: bootBob 3s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.35s ease;
}
#boot.is-ready .boot-logo {
  opacity: 1;
}
#boot .boot-tag {
  margin: 0 0 6px;
  font-family: var(--font, 'Nunito', system-ui, sans-serif);
  font-size: clamp(11px, 3.2vw, 13px);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 230, 170, 0.88);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}
#boot .boot-load {
  width: min(100%, 320px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#boot .boot-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  padding: 2px;
  background:
    linear-gradient(#0c1830, #081220) padding-box,
    linear-gradient(90deg, #c9a227, #ffe56a, #c9a227) border-box;
  border: 2px solid transparent;
  box-shadow:
    0 0 16px rgba(246, 180, 40, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
#boot .boot-fill {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2458b0 0%, #5ec8ff 50%, #ffe56a 100%);
  box-shadow: 0 0 12px rgba(94, 200, 255, 0.55);
  transition: width 0.9s ease;
}
#boot .boot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 2px;
}
#boot .boot-pct {
  font-family: var(--font, 'Nunito', system-ui, sans-serif);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 4px #000;
}
#boot .boot-hint {
  font-family: var(--font, 'Nunito', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 800;
  color: rgba(247, 241, 228, 0.6);
  letter-spacing: 0.04em;
}
@keyframes bootKen {
  from { transform: scale(1.1); }
  to { transform: scale(1.0); }
}
@keyframes bootBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes bootPulseGlow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.hh-card-art img,
.hh-avatar img,
.hh-castle,
.kc-art {
  image-rendering: -webkit-optimize-contrast;
}

.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 520px;
  left: 0;
  right: 0;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.78);
  display: grid;
  place-items: end center;
  padding: 14px;
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 50;
  /* blur WebView’de pahalı — varsayılan kapalı */
  contain: layout style;
}
@supports (backdrop-filter: blur(1px)) {
  @media (pointer: fine) {
    .modal { backdrop-filter: blur(2px); background: rgba(0, 0, 0, 0.72); }
  }
}
.modal.hidden { display: none; }
.modal-card {
  width: 100%;
  border-radius: 18px;
  padding: 18px 16px 14px;
  background: linear-gradient(180deg, #1a2c3e, #0d1826);
  border: 1px solid rgba(246, 196, 69, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  color: var(--cream);
}
.modal-kicker {
  text-align: center;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.modal-notice h2 {
  margin: 8px 0 12px;
  text-align: center;
  font-size: clamp(1.05rem, 4.2vw, 1.28rem);
  font-weight: 900;
  line-height: 1.25;
}
.modal-card h2 {
  margin: 6px 0 10px;
  text-align: center;
  font-size: 1.25rem;
}

/* —— Kısa toast (soon / notice) —— altta, üst UI’yi kapatmasın */
.iq-toast {
  position: fixed;
  left: 0;
  right: 0;
  top: auto;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 88px);
  margin: 0 auto;
  width: min(100% - 28px, 420px);
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.iq-toast.is-show {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
}
.iq-toast-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(28, 44, 66, 0.96), rgba(10, 18, 30, 0.98));
  border: 1px solid rgba(246, 196, 69, 0.32);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  color: #f7f1e4;
  backdrop-filter: blur(8px);
}
.iq-toast-card.is-text p {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.iq-toast-card.is-buff {
  padding: 16px 18px 14px;
  display: grid;
  gap: 6px;
  justify-items: center;
}
.iq-toast-fx {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.iq-toast-fx strong {
  font-size: clamp(28px, 8vw, 34px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 0 18px currentColor;
}
.iq-toast-fx span {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.iq-toast-card.is-buff em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.8;
}
.iq-toast-card.is-atk {
  color: #f0c14a;
  border-color: rgba(240, 193, 74, 0.45);
  background: linear-gradient(165deg, rgba(52, 42, 18, 0.96), rgba(14, 18, 24, 0.98));
}
.iq-toast-card.is-def {
  color: #8ec0ff;
  border-color: rgba(110, 168, 255, 0.45);
  background: linear-gradient(165deg, rgba(22, 36, 58, 0.96), rgba(10, 16, 28, 0.98));
}
.iq-toast-card.is-crit {
  color: #ff9a78;
  border-color: rgba(255, 120, 90, 0.5);
  background: linear-gradient(165deg, rgba(52, 28, 24, 0.96), rgba(16, 12, 18, 0.98));
}
.modal-card .muted {
  margin: 0 0 14px;
  color: #aeb9c8;
  font-size: 0.92rem;
  line-height: 1.4;
}
.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
  text-align: left;
}
.modal-field > span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(246, 196, 69, 0.9);
}
.modal-field input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(246, 196, 69, 0.35);
  background: rgba(6, 12, 22, 0.9);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  outline: none;
}
.modal-field input:focus {
  border-color: rgba(246, 196, 69, 0.75);
  box-shadow: 0 0 0 3px rgba(246, 196, 69, 0.15);
}
.modal-body {
  margin: 0 0 14px;
  text-align: center;
}
.modal-body .muted {
  margin-bottom: 0;
}
.modal-need {
  display: flex;
  justify-content: center;
  margin: 4px 0 10px;
  color: #9fe870;
  font-size: 1.15rem;
  font-weight: 900;
}
.modal-need .rw-ico,
.modal-need .rw-bit img.rw-ico {
  width: 28px;
  height: 28px;
}
.btn {
  display: block;
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  font-weight: 800;
}
.btn-primary {
  background: linear-gradient(180deg, #ffe56a, #f0a000);
  color: #3a2608;
  box-shadow: 0 4px 0 #c47d08;
}

/* —— Ortak ödül ikon satırı —— */
.rw {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  vertical-align: middle;
}
.rw-bit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-style: normal;
}
.rw-ico,
.rw-bit img.rw-ico {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.rw-bit b {
  font-weight: 900;
  font-size: inherit;
  color: inherit;
  letter-spacing: 0.01em;
}
.rw-bit-txt i {
  font-style: normal;
  font-weight: 800;
  opacity: 0.85;
  margin-left: 2px;
}
.gq-reward .rw-ico,
.gq-reward .rw-bit img.rw-ico {
  width: 14px;
  height: 14px;
}
.sh-give .rw-ico,
.sh-give .rw-bit img.rw-ico {
  width: 15px;
  height: 15px;
}
.modal-card .rw {
  color: #9fe870;
  font-size: 15px;
}
.modal-card .rw-ico,
.modal-card .rw-bit img.rw-ico {
  width: 20px;
  height: 20px;
}
.vp-claim-txt .rw {
  color: #9fe870;
  font-size: 12px;
}

/* —— Eşya detay paneli (tüm eşyalar) —— */
.modal-card-sheet {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: min(86dvh, 720px);
  overflow: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 14px 14px;
  border-radius: 20px 20px 16px 16px;
  background: linear-gradient(180deg, #24364c 0%, #121e2e 42%, #0d1624 100%);
}
.isheet { position: relative; }
.isheet-close {
  position: absolute;
  top: -4px;
  right: -2px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: rgba(247, 241, 228, 0.7);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.isheet-close:active { transform: scale(0.94); }
.isheet-head {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  padding-right: 28px;
  margin-bottom: 14px;
}
.isheet-icon {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.05), transparent 58%),
    linear-gradient(165deg, #141c2a 0%, #070b12 100%);
  border: 2px solid rgba(246, 196, 69, 0.75);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.isheet-icon.rarity-common {
  border-color: #8fa0b8;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(140, 160, 190, 0.2),
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.isheet-icon.rarity-uncommon {
  border-color: #4eb8ff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(78, 184, 255, 0.3),
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(120, 200, 255, 0.16);
}
.isheet-icon.rarity-rare {
  border-color: #f6c445;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(246, 196, 69, 0.4),
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 230, 150, 0.2);
}
.isheet-icon.rarity-legendary {
  border-color: #e04040;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 16px rgba(220, 48, 48, 0.45),
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 160, 140, 0.2);
}
.isheet-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.isheet-icon.is-bg-frame {
  border-width: 2px;
  background: #05080e;
}
.isheet-icon.is-bg-frame img {
  width: 100%;
  height: 100%;
  filter: none;
}
.isheet-icon.is-bg-frame.rarity-common {
  border-color: #d8dee8;
  box-shadow:
    0 0 0 1px rgba(40, 48, 64, 0.45),
    0 0 10px rgba(220, 228, 240, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.isheet-meta h2 {
  margin: 2px 0 4px;
  text-align: left;
  font-size: clamp(17px, 4.6vw, 20px);
  font-weight: 900;
}
.isheet-meta p {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: rgba(247, 241, 228, 0.65);
}
.isheet-meta em {
  font-style: normal;
  color: #3ddc6e;
}
.isheet-rarity {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f6c445;
}
.isheet-rarity.rarity-common { color: #b0b8c6; }
.isheet-rarity.rarity-uncommon { color: #4eb8ff; }
.isheet-rarity.rarity-rare { color: #f6c445; }
.isheet-rarity.rarity-legendary { color: #ff6a6a; }

.isheet-block {
  padding: 10px 12px 8px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}
.isheet-block h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(246, 196, 69, 0.9);
}
.isheet-stats { display: flex; flex-direction: column; gap: 2px; }
.isheet-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 800;
}
.isheet-stat:last-child { border-bottom: 0; }
.isheet-stat strong { color: #fff; font-weight: 900; }
.isheet-stat-vals {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.isheet-stat-vals i {
  font-style: normal;
  color: #7CFF9A;
  font-weight: 900;
  text-shadow: 0 0 4px rgba(124, 255, 154, 0.45);
}
.isheet-stat-vals em {
  font-style: normal;
  font-weight: 900;
  color: #c5d4e8;
}
.isheet-delta {
  font-weight: 900;
  font-size: 12px;
  color: #3ddc6e;
  background: rgba(61, 220, 110, 0.14);
  border: 1px solid rgba(61, 220, 110, 0.35);
  border-radius: 999px;
  padding: 2px 7px;
  letter-spacing: 0.01em;
}
.isheet-power {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(246, 196, 69, 0.25);
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
}
.isheet-power strong { color: #3ddc6e; font-size: 16px; font-weight: 900; }

.isheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.isheet-actions .isheet-btn-up {
  grid-column: 1 / -1;
}
.isheet-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 15px;
}
.isheet-btn small {
  font-size: 11px;
  font-weight: 800;
  opacity: 0.95;
}
.isheet-cost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.isheet-cost-bit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.isheet-cost-bit svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.isheet-pay,
.isheet-cost-bit img.isheet-pay {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.isheet-cost-bit b {
  font-weight: 900;
  font-size: 12px;
  color: #3a2608;
}
.isheet-btn-on {
  background: linear-gradient(180deg, #5ee0a0, #2aad68);
  color: #062416;
  box-shadow: 0 3px 0 #1a7a48;
}
.isheet-btn-out {
  background: rgba(255, 255, 255, 0.08);
  color: #f7f1e4;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
}
.isheet-btn-up {
  background: linear-gradient(180deg, #ffe56a, #f0a000);
  color: #3a2608;
  box-shadow: 0 3px 0 #c47d08;
}
.isheet-btn.is-disabled,
.isheet-btn:disabled {
  opacity: 0.42;
  box-shadow: none;
  filter: grayscale(0.25);
  pointer-events: none;
}
.isheet-btn:active:not(:disabled) { transform: scale(0.97); }
.isheet-empty { text-align: center; padding: 8px 4px; }
.isheet-empty h2 { margin-bottom: 6px; }

.isheet-rate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.isheet-rate span {
  font-size: 13px;
  font-weight: 800;
  color: rgba(247, 241, 228, 0.7);
}
.isheet-rate strong {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}
.isheet-rate.rate-hi strong { color: #3ddc6e; }
.isheet-rate.rate-mid strong { color: #f6c445; }
.isheet-rate.rate-lo strong { color: #ff7a6a; }

.isheet-flash {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}
.isheet-flash.is-ok {
  background: rgba(61, 220, 110, 0.16);
  border: 1px solid rgba(61, 220, 110, 0.45);
  color: #8dffb0;
}
.isheet-flash.is-fail {
  background: rgba(255, 100, 90, 0.14);
  border: 1px solid rgba(255, 120, 100, 0.4);
  color: #ffb0a4;
}

/* —— Ana sayfa —— */
.home-hub {
  --hh-ink: #f7f1e4;
  --hh-gold: #f6c445;
  --hh-navy: #071426;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--hh-navy);
  color: var(--hh-ink);
  font-family: var(--font);
  user-select: none;
  -webkit-user-select: none;
}
.home-hub button:focus { outline: none; }
.home-hub button:focus-visible { outline: 2px solid var(--hh-gold); outline-offset: 2px; }
.home-hub svg { display: block; flex-shrink: 0; }

.hh-scene {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #071426;
}
/* Ana sayfa sahnesi: tek parça mobil dikey görsel (gökyüzü üstte, kale ortada, alt lacivert) */
.hh-castle {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 38%;
  pointer-events: none;
}
/* Canlı döngü video: statik görselin birebir üstünde (aynı kırpma), yükleyince fade-in */
.hh-vid-slot {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hh-bgvid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  opacity: 0;
  pointer-events: none;
  background: transparent;
}
.hh-bgvid.is-playing { opacity: 1; }
@media (min-aspect-ratio: 3/4) {
  .hh-bgvid { object-position: 50% 42%; }
}
/* Canlı efektler: bayraklar (görsel koordinatında) + kuşlar */
.hh-fx {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.hh-fx-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 720px;
  height: 1280px;
  transform-origin: 0 0;
  will-change: transform;
}
.hh-tree {
  position: absolute;
  background-repeat: no-repeat;
  background-size: 720px 1280px;
  transform-origin: 50% 100%;
  animation: hhTreeSway 4s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes hhTreeSway {
  from { transform: rotate(calc(var(--sw) * -1)) translateX(-0.4px); }
  to   { transform: rotate(var(--sw)) translateX(0.4px); }
}
.hh-flagwrap { position: absolute; width: 0; height: 0; }
.hh-pole {
  position: absolute;
  left: -1.3px;
  width: 2.6px;
  border-radius: 2px;
  background: linear-gradient(90deg, #8c6420, #f6d77a 45%, #b98a2c);
  box-shadow: 0 0 2px rgba(60, 30, 5, 0.5);
}
.hh-pole-ball {
  position: absolute;
  left: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3b8, #e0a92e 60%, #8c6420);
}
.hh-flag {
  position: absolute;
  overflow: visible;
  transform-origin: 0 50%;
  filter: drop-shadow(0 1.5px 2px rgba(40, 14, 10, 0.5));
  animation: hhFlagSway 3.2s ease-in-out infinite alternate;
}
@keyframes hhFlagSway {
  from { transform: skewY(-2.5deg) scaleX(0.97); }
  to   { transform: skewY(2.5deg) scaleX(1.03); }
}
.hh-birds { position: absolute; inset: 0; }
.hh-bird {
  position: absolute;
  left: 0;
  width: 100%;
  height: 24px;
  animation: hhBirdFly 40s linear infinite;
  will-change: transform;
}
.hh-bird.is-rev { animation-direction: reverse; }
.hh-bird-in {
  display: inline-block;
  animation: hhBirdBob 3.6s ease-in-out infinite alternate;
}
.hh-bird-in svg { display: block; }
@keyframes hhBirdFly {
  0%   { transform: translate3d(-14%, 0, 0); }
  50%  { transform: translate3d(50%, -16px, 0); }
  100% { transform: translate3d(112%, 8px, 0); }
}
@keyframes hhBirdBob {
  from { transform: translateY(-5px); }
  to   { transform: translateY(5px); }
}
/* Hafif altın toz (yalnız üst yarı) — videonun üstünde ince derinlik */
.hh-ambi {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 34%, transparent 56%);
  mask-image: linear-gradient(180deg, #000 0%, #000 34%, transparent 56%);
}
.hh-ambi > i {
  position: absolute;
  display: block;
  pointer-events: none;
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.hh-ambi-dust {
  left: 0;
  top: 0;
  width: 100%;
  height: 200%;
  opacity: 0.8;
  background:
    radial-gradient(circle 1.8px at 14% 22%, rgba(255, 226, 140, 0.95), transparent 100%),
    radial-gradient(circle 1.3px at 31% 64%, rgba(255, 240, 186, 0.85), transparent 100%),
    radial-gradient(circle 2.2px at 52% 38%, rgba(255, 216, 110, 0.9), transparent 100%),
    radial-gradient(circle 1.5px at 68% 78%, rgba(255, 240, 186, 0.8), transparent 100%),
    radial-gradient(circle 1.9px at 83% 30%, rgba(255, 226, 140, 0.95), transparent 100%),
    radial-gradient(circle 1.2px at 92% 58%, rgba(255, 248, 214, 0.75), transparent 100%);
  background-size: 100% 25%;
  background-repeat: repeat-y;
  animation: hhAmbiDust 40s linear infinite, hhAmbiTwinkle 4s ease-in-out infinite alternate;
}
@keyframes hhAmbiDust {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -25%, 0); }
}
@keyframes hhAmbiTwinkle {
  from { opacity: 0.5; }
  to   { opacity: 0.95; }
}
@media (max-width: 360px) {
  .hh-ambi-dust { display: none; }
}
/* Geniş / yatay ekranda kale kırpılmasın */
@media (min-aspect-ratio: 3/4) {
  .hh-castle { object-position: 50% 42%; }
}

.hh-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 14, 28, 0.38) 0%, rgba(5, 14, 28, 0.06) 12%, transparent 24%),
    linear-gradient(180deg, transparent 58%, rgba(7, 20, 38, 0.22) 78%, #071426 100%);
}

.hh-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.3vw, 6px);
  padding:
    calc(8px + env(safe-area-inset-top, 0px))
    clamp(6px, 2vw, 10px)
    8px;
  min-width: 0;
}
.hh-profile {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 3px;
  border-radius: 14px;
  background: rgba(8, 18, 36, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  text-align: left;
  overflow: hidden;
}
.hh-profile:active { transform: scale(0.98); }
.hh-avatar {
  width: clamp(34px, 10vw, 42px);
  height: clamp(34px, 10vw, 42px);
  border-radius: 11px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #f0c14a;
  background: #2a6cb5;
}
.hh-avatar img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 18%;
}
.hh-id {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.hh-id strong,
.hh-id em {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}
.hh-id strong {
  font-size: clamp(11px, 3.3vw, 14px);
  font-weight: 800;
}
.hh-id em {
  font-style: normal;
  font-size: clamp(10px, 2.8vw, 12px);
  font-weight: 800;
  color: var(--hh-gold);
}
.hh-xp {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 11px;
  margin-top: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(240, 193, 74, 0.45);
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}
.hh-xp-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #ffe56a 0%, #f0b429 55%, #c98410 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.hh-xp-txt {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 1px #000, 0 0 2px #000;
  pointer-events: none;
  letter-spacing: 0.02em;
}
.hh-curr {
  flex: 0 0 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: clamp(32px, 9vw, 38px);
  padding: 0 8px 0 5px;
  border-radius: 999px;
  background: rgba(8, 18, 36, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.hh-curr svg { width: 16px; height: 16px; }
.hh-curr-art,
.hh-curr img.hh-curr-art {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}
.hh-curr span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(10px, 2.9vw, 13px);
  font-weight: 800;
}
.hh-curr:active { transform: scale(0.97); }
.hh-tool {
  flex: 0 0 auto;
  width: clamp(36px, 10vw, 44px);
  height: clamp(38px, 11vw, 46px);
  border-radius: 12px;
  background: rgba(8, 18, 36, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--hh-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.hh-tool svg { width: 18px; height: 18px; }
.hh-vip-ico,
.hh-tool img.hh-vip-ico {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
.hh-gear {
  width: clamp(40px, 11vw, 48px);
  height: clamp(40px, 11vw, 48px);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.hh-gear-ico {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
}
.hh-tool span {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
}
.hh-tool:active { transform: scale(0.96); }

.hh-rail {
  position: absolute;
  z-index: 4;
  left: clamp(5px, 1.8vw, 8px);
  top: calc(env(safe-area-inset-top, 0px) + 62px);
  bottom: 92px;
  width: clamp(48px, 13vw, 60px);
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
}
.hh-rail-right {
  left: auto;
  right: clamp(5px, 1.8vw, 8px);
  top: calc(env(safe-area-inset-top, 0px) + 62px);
  bottom: auto;
  height: auto;
  max-height: none;
}
.hh-rail-btn {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  max-height: 64px;
  width: 100%;
  border-radius: 11px;
  background: rgba(8, 18, 36, 0.8);
  border: 1.5px solid rgba(232, 197, 107, 0.72);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 2px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
}
.hh-rail-btn svg { width: 30px; height: 30px; }
.hh-rail-quest,
.hh-rail-upgrade,
.hh-rail-event,
.hh-rail-rewards,
.hh-rail-forge,
.hh-rail-market {
  max-height: 72px;
  padding: 3px 2px 2px;
  gap: 0;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.25)),
    rgba(8, 18, 36, 0.88);
  border: 1.5px solid rgba(232, 197, 107, 0.78);
  box-shadow:
    0 3px 9px rgba(0, 0, 0, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.hh-rail-upgrade {
  background:
    linear-gradient(165deg, rgba(255, 160, 50, 0.18), rgba(0, 0, 0, 0.28)),
    rgba(8, 18, 36, 0.9);
  border-color: rgba(255, 180, 80, 0.85);
}
.hh-rail-forge {
  flex: 0 0 auto;
  min-height: 64px;
  max-height: 76px;
  background:
    linear-gradient(165deg, rgba(255, 90, 40, 0.22), rgba(0, 0, 0, 0.3)),
    rgba(8, 18, 36, 0.92);
  border-color: rgba(255, 140, 70, 0.9);
}
.hh-rail-market {
  flex: 0 0 auto;
  min-height: 64px;
  max-height: 76px;
  background:
    linear-gradient(165deg, rgba(246, 196, 69, 0.22), rgba(0, 0, 0, 0.3)),
    rgba(8, 18, 36, 0.92);
  border-color: rgba(246, 196, 69, 0.9);
}
.hh-rail-ico {
  width: clamp(34px, 9.5vw, 44px);
  height: clamp(34px, 9.5vw, 44px);
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.hh-rail-btn > span:not(.hh-badge) {
  max-width: 100%;
  overflow: visible;
  white-space: nowrap;
  font-size: clamp(9px, 2.4vw, 10px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.01em;
  padding: 0;
  color: #fff8e8;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.85),
    0 0 6px rgba(0, 0, 0, 0.55);
}
.hh-rail-btn:active { transform: scale(0.96); }
.hh-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: #e23d3d;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  display: grid;
  place-items: center;
  border: 1.5px solid #fff;
  line-height: 1;
}

/* Dünya sohbeti — kale yükseltmesinin hemen üstünde, açılır/kapanır */
.hh-wc {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 14px;
  background:
    linear-gradient(165deg, rgba(18, 36, 58, 0.96), rgba(8, 16, 30, 0.94));
  border: 1px solid rgba(154, 208, 255, 0.3);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  /* blur WebView’de kasma — sadece masaüstü */
  pointer-events: auto;
  overflow: hidden;
  contain: layout style;
}
@supports (backdrop-filter: blur(1px)) {
  @media (pointer: fine) {
    .hh-wc {
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
  }
}
.hh-wc-toggle {
  display: grid;
  grid-template-columns: 8px auto auto minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  text-align: left;
}
.hh-wc-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e4544a;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(8, 16, 30, 0.85);
}
.hh-wc-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ddc6e;
  box-shadow: 0 0 0 0 rgba(61, 220, 110, 0.7);
  animation: hhWcPulse 1.6s ease-out infinite;
}
@keyframes hhWcPulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 110, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(61, 220, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 110, 0); }
}
.hh-wc-toggle-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
}
.hh-wc-preview {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px;
  align-items: baseline;
  font-size: 12px;
  line-height: 1.3;
  opacity: 0.95;
}
.hh-wc-preview strong {
  font-weight: 900;
  color: #b8e0ff;
  white-space: nowrap;
}
.hh-wc-preview span {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hh-wc-chev {
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  color: #9ad0ff;
}
.hh-wc-body {
  display: none;
  flex-direction: column;
  gap: 7px;
  padding: 0 9px 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hh-wc.is-open .hh-wc-body { display: flex; }
.hh-wc.is-open .hh-wc-preview,
.hh-wc.is-open .hh-wc-badge { display: none; }
.hh-wc-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding-top: 7px;
}
.hh-wc-tabs-3 { grid-template-columns: 1fr 1fr 1fr; }
.hh-wc-tab {
  min-height: 30px;
  min-width: 0;
  padding: 0 4px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 12, 22, 0.55);
  color: rgba(247, 241, 228, 0.65);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hh-wc-tab.on {
  color: #fff;
  border-color: rgba(154, 208, 255, 0.45);
  background: rgba(60, 120, 190, 0.28);
}
.hh-wc-log,
.hh-wc-pmbox {
  max-height: 118px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hh-wc-log.hidden,
.hh-wc-pmbox.hidden,
.hh-wc-invbox.hidden,
.hh-wc-form.hidden { display: none !important; }
.hh-wc-invbox {
  max-height: 130px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: none;
}
.hh-wc-invbox::-webkit-scrollbar { display: none; }
.hh-wc-inv {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(90, 150, 255, 0.12);
  border: 1px solid rgba(154, 208, 255, 0.28);
}
.hh-wc-inv-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hh-wc-inv-copy strong {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
}
.hh-wc-inv-copy span {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.3;
}
.hh-wc-inv-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.hh-wc-inv-btn {
  min-height: 30px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  border: none;
}
.hh-wc-inv-btn.is-ok {
  color: #0a1628;
  background: linear-gradient(180deg, #9fe870, #3ddc6e);
}
.hh-wc-inv-btn.is-no {
  color: rgba(247, 241, 228, 0.85);
  background: rgba(8, 16, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.hh-wc-log::-webkit-scrollbar,
.hh-wc-pmbox::-webkit-scrollbar { display: none; }
.hh-wc-row,
.hh-wc-pm {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  font-size: 12px;
  line-height: 1.35;
}
.hh-wc-row strong,
.hh-wc-pm strong,
.hh-wc-user {
  font-weight: 900;
  color: #b8e0ff;
  white-space: nowrap;
  font-size: 12px;
}
.hh-wc-user {
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-decoration-color: rgba(154, 208, 255, 0.45);
  text-underline-offset: 2px;
  cursor: pointer;
}
.hh-wc-user:active { opacity: 0.75; }
.hh-wc-row span,
.hh-wc-pm span {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
  white-space: normal;
  word-break: break-word;
}
.hh-wc-row.is-self strong,
.hh-wc-row .is-you,
.hh-wc-pm.is-self strong { color: var(--hh-gold, #f6c445); }
.hh-wc-pm.is-new {
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(90, 150, 255, 0.12);
  border: 1px solid rgba(154, 208, 255, 0.2);
}
.hh-wc-empty {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(247, 241, 228, 0.45);
}
.hh-wc-form {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 6px;
}
.hh-wc-form input {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 12, 22, 0.9);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}
.hh-wc-form input::placeholder { color: rgba(247, 241, 228, 0.4); }
.hh-wc-form button {
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, #7eb8ff, #3f86d8);
  color: #041018;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 2px 0 #2a5f9e;
}
.hh-wc-form button:active { transform: translateY(1px); }

.hh-castle-ui {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  /* İki rayın arasında kalsın; sohbet şeridi Ödüller ikonuna binmesin */
  width: min(300px, calc(100% - 2 * (clamp(5px, 1.8vw, 8px) + clamp(48px, 13vw, 60px) + 12px)));
  /* Açılınca profilin (üst bar) üstüne çıkmasın */
  max-height: calc(100% - 76px - env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  overflow: hidden;
}
.hh-wc.is-open {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.hh-wc.is-open .hh-wc-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.hh-wc.is-open .hh-wc-log,
.hh-wc.is-open .hh-wc-pmbox,
.hh-wc.is-open .hh-wc-invbox {
  flex: 1 1 auto;
  min-height: 0;
}
.hh-kale {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 104px;
  padding: 3px 14px 4px;
  border-radius: 12px;
  background: rgba(8, 18, 36, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
  line-height: 1.05;
}
.hh-kale span {
  font-size: clamp(11px, 3vw, 13px);
  font-weight: 800;
}
.hh-kale strong {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: clamp(12px, 3.2vw, 15px);
  font-weight: 800;
}
.hh-kale svg {
  width: 15px;
  height: 15px;
  filter: drop-shadow(0 0 3px rgba(124, 255, 154, 0.55));
}
.hh-up {
  flex: 0 0 auto;
  pointer-events: auto;
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffe56a 0%, #ffc107 46%, #f0a000 100%);
  color: #fff;
  font-weight: 900;
  font-size: clamp(16px, 4.8vw, 22px);
  letter-spacing: 0.05em;
  text-shadow: 0 2px 0 rgba(176, 96, 0, 0.45);
  box-shadow:
    0 4px 0 #c47d08,
    0 8px 16px rgba(0, 0, 0, 0.32),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
}
.hh-up span { white-space: nowrap; }
.hh-up svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 0 rgba(90, 48, 0, 0.55));
}
.hh-up:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #c47d08, 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.7);
}

.hh-modes {
  flex: 0 0 auto;
  height: clamp(168px, 34dvh, 288px);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(8px, 2vw, 12px);
  padding: 0 clamp(10px, 2.6vw, 14px) clamp(8px, 1.8vw, 12px);
  background: #071426;
}
.hh-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  background:
    linear-gradient(#0d1a2c, #0d1a2c) padding-box,
    linear-gradient(160deg, #fff1b0 0%, #e8c056 28%, #a87818 55%, #f0d27a 78%, #8a5a10 100%) border-box;
  border: 3px solid transparent;
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}
.hh-card-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(3px, 1vw, 6px);
  padding-bottom: clamp(28px, 8vw, 36px);
  background: radial-gradient(ellipse at center, #1a2f4a 0%, #0a1524 72%);
}
.hh-card-art img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  pointer-events: none;
}
.hh-card-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: clamp(36px, 10vw, 46px);
  padding: 18px 6px 8px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.82) 100%);
}
.hh-card-label em {
  font-style: normal;
  font-family: var(--font);
  font-weight: 900;
  font-size: clamp(15px, 4.2vw, 20px);
  line-height: 1.1;
  letter-spacing: 0.03em;
  color: #fff;
  -webkit-text-stroke: 0.6px #1a1208;
  paint-order: stroke fill;
  text-shadow:
    -1.5px -1.5px 0 #000,
    1.5px -1.5px 0 #000,
    -1.5px 1.5px 0 #000,
    1.5px 1.5px 0 #000,
    0 2px 0 #000,
    0 3px 6px rgba(0, 0, 0, 0.75);
  white-space: nowrap;
  max-width: 100%;
}
.hh-card:active { transform: scale(0.985); }

.hh-nav {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
  min-height: calc(58px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, #12243c, #0a1628);
  border-top: 1px solid rgba(246, 196, 69, 0.28);
}
.hh-tab {
  min-width: 0;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #93a0b4;
  border-radius: 12px;
}
.hh-tab .hh-ico {
  width: 36px;
  height: 26px;
  display: grid;
  place-items: center;
  font-style: normal;
}
.hh-tab svg { width: 22px; height: 22px; }
.hh-tab .hh-ico-art {
  width: clamp(34px, 9.5vw, 42px);
  height: clamp(34px, 9.5vw, 42px);
  background: transparent !important;
  border-radius: 0;
}
.hh-tab .hh-ico-art img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.hh-tab-home.on .hh-ico-art img,
.hh-tab-char.on .hh-ico-art img,
.hh-tab-shop.on .hh-ico-art img,
.hh-tab-bag.on .hh-ico-art img {
  filter: drop-shadow(0 0 6px rgba(246, 196, 69, 0.55)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.hh-tab > span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(9px, 2.55vw, 11px);
  font-weight: 800;
  line-height: 1.1;
}
.hh-tab.on { color: var(--hh-gold); }
.hh-tab.on .hh-ico:not(.hh-ico-art) {
  background: linear-gradient(180deg, #ffe9a3, #f0b429);
  color: #4a3208;
  border-radius: 10px;
}
.hh-tab:active { transform: scale(0.96); }

@media (max-width: 360px) {
  .hh-tool span { display: none; }
  .hh-curr { padding: 0 6px 0 4px; }
  .hh-castle-ui { width: min(240px, calc(100% - 2 * (46px + 8px + 12px))); }
  .hh-rail { width: 46px; }
  .hh-rail-btn svg { width: 26px; height: 26px; }
  .hh-rail-ico { width: 34px; height: 34px; }
  .hh-rail-quest,
  .hh-rail-upgrade,
  .hh-rail-event,
  .hh-rail-rewards { max-height: 64px; }
  .hh-wc-toggle { grid-template-columns: 8px auto minmax(0, 1fr) auto; gap: 5px; padding: 6px 8px; }
  .hh-wc-toggle-title { font-size: 11px; }
  .hh-wc-tabs-3 .hh-wc-tab { font-size: 11px; }
  .hh-wc-form { gap: 6px; }
  .modal { padding: 10px; }
  .modal-card,
  .modal-card-sheet { padding: 14px 12px 12px; }
}
@media (max-height: 640px) {
  .hh-modes { height: clamp(148px, 32dvh, 196px); }
  .hh-up { min-height: 42px; font-size: 15px; }
  .hh-kale { padding: 2px 10px 3px; }
  .hh-rail { bottom: 76px; top: calc(env(safe-area-inset-top, 0px) + 56px); }
  .hh-wc.is-open .hh-wc-log,
  .hh-wc.is-open .hh-wc-pmbox { max-height: 96px; }
  .modal-card-sheet { max-height: min(82dvh, 640px); }
}
@media (max-height: 520px) {
  .hh-kale { display: none; }
  .hh-modes { height: 112px; }
  .hh-tab { min-height: 44px; }
  .hh-nav { min-height: calc(48px + env(safe-area-inset-bottom, 0px)); }
  .hh-wc.is-open .hh-wc-log,
  .hh-wc.is-open .hh-wc-pmbox,
  .hh-wc.is-open .hh-wc-invbox { max-height: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .hh-wc-live { animation: none; box-shadow: none; }
}
