/* Ironkeep: Siege Bastion — Inked Parchment Roguelite PC 16:9 Stylesheet */
/* Offline MSIX: ZERO external Google Fonts imports, ZERO backdrop-filter: blur() */

:root {
  --font-display: 'Cinzel', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --bg-obsidian: #0F111C;
  --surface-dark: #1C1917;
  --parchment-bg: #EBD5AC;
  --parchment-light: #EFE5CE;
  --ink-dark: #1C1714;
  --ink-light: #EFE5CE;
  --gold-main: #D9A441;
  --gold-bright: #FDE68A;
  --crimson: #B83834;
  --arcane-teal: #2E857D;
  --arcane-cyan: #58E4FF;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-obsidian);
  color: var(--ink-light);
  font-family: var(--font-body);
  user-select: none;
  -webkit-user-select: none;
}

button:focus:not(:focus-visible) {
  outline: none;
}
button:focus-visible {
  outline: 2px solid #FDE68A;
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

/* ==================== BOOT LOADER (0-100%) ==================== */
.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 42%, #241D21 0%, #0F111C 72%);
  transition: opacity 0.28s ease;
}
.boot-emblem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(440px, 86vw);
}
.boot-portrait {
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.7));
}
.boot-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  text-shadow: 0 3px 0 #120E14;
  text-align: center;
}
.boot-bar-track {
  width: 100%;
  height: 28px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  border-width: 7px 14px 7px 14px !important;
  cursor: default;
}
.boot-bar-fill {
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, #B83834 0%, #E8A83E 65%, #FDE68A 100%);
  transition: width 0.14s ease-out;
}
.boot-pct-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--parchment-light);
  font-variant-numeric: tabular-nums;
}

/* ==================== HEROIC NO-BOX TITLE SCREEN ==================== */
.title-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 24px 36px;
}
.title-bg-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.title-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(15, 17, 28, 0.12) 0%, rgba(12, 10, 16, 0.68) 88%),
    linear-gradient(180deg, rgba(10, 11, 18, 0.66) 0%, rgba(10, 11, 18, 0.0) 28%, rgba(10, 11, 18, 0.0) 64%, rgba(10, 11, 18, 0.78) 100%);
}
.title-top-actions {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.title-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 44px;
  padding: 0 10px;
  border-width: 8px 14px 8px 14px !important;
  border-image-width: 1 !important;
  color: var(--parchment-light);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.title-icon-btn .btn-ico-sm {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ZERO card/box background or border around h1! */
.hero-title-h1 {
  position: relative;
  z-index: 6;
  margin: 18px 0 0;
  padding: 0;
  background: transparent;
  border: none;
  font-family: var(--font-display);
  font-size: clamp(38px, 4.6vw, 68px);
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1.08;
  color: #FDE68A;
  text-align: center;
  text-shadow:
    0 4px 0 #1A1014,
    0 -2px 0 #1A1014,
    3px 0 0 #1A1014,
    -3px 0 0 #1A1014,
    0 10px 26px rgba(0, 0, 0, 0.85);
}
.hero-title-sub {
  position: relative;
  z-index: 6;
  margin: 4px 0 0;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--parchment-light);
  text-shadow: 0 2px 6px #09080C, 0 0 2px #09080C;
  text-align: center;
}

.title-hero-stage {
  position: relative;
  z-index: 5;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(440px, 44vw);
  max-height: 48vh;
  pointer-events: none;
}
.title-hero-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.72));
}

.title-cta-cluster {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.title-mode-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border-width: 8px 14px 8px 14px !important;
  border-image-width: 1 !important;
  color: var(--parchment-light);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0.84;
  transition: transform 0.14s ease, opacity 0.14s ease, filter 0.14s ease;
}
.mode-pill.is-active {
  opacity: 1;
  color: #FDE68A;
  filter: drop-shadow(0 0 8px rgba(232, 168, 62, 0.55));
  transform: translateY(-1px);
}
.mode-ico {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.title-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
}
.title-play-cta {
  min-width: 256px;
  height: 68px;
  padding: 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 18px 20px 16px 20px !important;
  border-image-width: 1 !important;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #FFFDF5;
  text-shadow: 0 2px 3px rgba(24, 12, 6, 0.9);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
  white-space: nowrap;
}
.title-play-cta:disabled {
  opacity: 0.55;
  cursor: wait;
}
.title-new-cta {
  min-width: 144px;
  height: 54px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 12px 16px 12px 16px !important;
  border-image-width: 1 !important;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #FFF8EB;
  text-shadow: 0 2px 3px rgba(18, 12, 8, 0.85);
  white-space: nowrap;
}

/* ==================== FULL-BLEED GAMEPLAY SCREEN ==================== */
.game-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-obsidian);
}
.game-canvas {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
}
.fx-overlay-canvas {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 8;
}
.cutin-layer {
  z-index: 42;
}
.uimotion-layer {
  z-index: 46;
}

/* ==================== FLOATING TOP HUD (flex-wrap: nowrap) ==================== */
.hud-top {
  position: fixed;
  top: 8px;
  left: 12px;
  right: 12px;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  pointer-events: none;
}
.hud-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  pointer-events: none;
}
.hud-pill, .hud-hp-wrap, .hud-obj-pill, .hud-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 44px;
  padding: 0 10px;
  border-width: 7px 12px 7px 12px !important;
  border-image-width: 1 !important;
  color: var(--parchment-light);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: visible !important;
  position: relative;
}
.hud-val {
  color: #FFF8EB;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.9);
  font-size: 13.5px;
  font-weight: 800;
}
.hud-num {
  font-variant-numeric: tabular-nums;
}
.hud-ico {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
  pointer-events: none;
}
.hud-hp-wrap {
  gap: 8px;
  padding: 0 10px;
}
.hud-hp-track {
  width: clamp(68px, 7.5vw, 118px);
  height: 12px;
  background: #141112;
  border: 1px solid #6E5942;
  border-radius: 3px;
  overflow: hidden;
}
.hud-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #B83834, #E56A3E);
  transition: width 0.16s ease-out;
}
.hud-obj-pill {
  flex-direction: column;
  gap: 3px;
  min-width: 130px;
  max-width: 240px;
  padding: 0 12px;
}
.hud-obj-txt {
  font-size: 13px;
  font-weight: 800;
  color: #FDE68A;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}
.hud-boss-bar-wrap {
  width: 150px;
  height: 8px;
  background: #140D12;
  border: 1px solid #8D5564;
  border-radius: 2px;
  overflow: hidden;
}
.hud-boss-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4AD8FF, #847BFF);
}
.hud-nav-btn {
  padding: 0 8px;
  gap: 5px;
}
.hud-btn-lbl {
  font-size: 13px;
  font-weight: 800;
  color: #FFF8EB;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}
.hud-icon-only {
  width: 44px;
  min-width: 44px;
  padding: 0;
}
.hud-speed-btn {
  min-width: 44px;
  padding: 0 8px;
  color: #FDE68A;
}
.hud-glyph, .glyph-x {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 900;
  color: #FFF8EB;
}
.notify-badge {
  position: static;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  margin-left: 1px;
  border-radius: 9px;
  background: #D9342F;
  border: 1.5px solid #FFF3D1;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  pointer-events: none;
}

/* Prominent Top-Center Boss HP HUD Banner (Clear of Top HUD & Arena Center!) */
.boss-hud-banner {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  width: min(460px, 46vw);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: linear-gradient(180deg, rgba(36, 14, 18, 0.94) 0%, rgba(18, 10, 14, 0.94) 100%);
  border: 2px solid #D9433E;
  box-shadow: 0 0 0 1px #FDE68A inset, 0 6px 18px rgba(0, 0, 0, 0.72);
  border-radius: 8px;
  pointer-events: none;
}
.boss-hud-banner.is-enraged {
  border-color: #FF7832;
  box-shadow: 0 0 0 1px #FFB066 inset, 0 0 18px rgba(255, 107, 43, 0.55);
}
.boss-hud-portrait {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 6px;
  border: 1.5px solid #FDE68A;
  background: rgba(14, 11, 16, 0.85);
  flex: 0 0 auto;
}
.boss-hud-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.boss-hud-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.boss-hud-badge {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 3px;
  background: #B83834;
  border: 1px solid #FDE68A;
  color: #FFFDF5;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
}
.boss-hud-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #FDE68A;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.boss-hud-phase {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(253, 230, 138, 0.16);
  border: 1px solid #D9A441;
  color: #FDE68A;
  font-size: 11px;
  font-weight: 900;
}
.boss-hud-hp-txt {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 800;
  color: #FFF8EB;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.boss-hud-track {
  width: 100%;
  height: 12px;
  background: #140B0E;
  border: 1.5px solid #96524C;
  border-radius: 4px;
  overflow: hidden;
}
.boss-hud-fill {
  height: 100%;
  background: linear-gradient(90deg, #B83834 0%, #E55B34 60%, #FDE68A 100%);
  transition: width 0.14s ease-out;
}

.hud-paused-pill {
  position: fixed;
  top: 56px;
  right: 16px;
  z-index: 28;
  padding: 4px 12px;
  background: rgba(24, 16, 16, 0.94);
  border: 1.5px solid #FDE68A;
  border-radius: 5px;
  color: #FDE68A;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  pointer-events: none;
}

/* ==================== FLOATING BOTTOM DOCK (Round 5 Ratios) ==================== */
.hud-bottom {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  flex-wrap: nowrap;
  pointer-events: none;
}
.dock-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(20, 17, 16, 0.76);
  border: 2px solid #7C6447;
  border-radius: 6px;
  pointer-events: auto;
  overflow: visible;
}
.tool-btn {
  position: relative;
  width: 70px;
  height: 76px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible !important;
  border-width: 8px 8px 8px 8px !important;
  border-image-width: 1 !important;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.tool-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
}
.tool-btn.is-selected {
  transform: translateY(-6px);
  filter: drop-shadow(0 0 10px rgba(253, 230, 138, 0.85));
}
.tool-btn.is-disabled {
  opacity: 0.56;
}
.tool-ico {
  width: 52px;
  height: 52px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}
.hotkey-tag {
  position: absolute;
  top: -8px;
  left: -6px;
  z-index: 10;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  background: #1C1714;
  border: 1.5px solid #D9A441;
  border-radius: 4px;
  color: #FDE68A;
  font-size: 12px;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  pointer-events: none;
}
.tool-count {
  position: absolute;
  bottom: -8px;
  right: -6px;
  z-index: 10;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  background: #231B16;
  border: 1.5px solid #C98A32;
  border-radius: 4px;
  color: #FFF8E6;
  font-size: 12px;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.ult-btn.is-ready .tool-count {
  background: #9E2E2E;
  border-color: #FDE68A;
  color: #FDE68A;
}

/* ==================== FTUE VISUAL SPOTLIGHT (pointer-events: none) ==================== */
.ftue-layer {
  position: fixed;
  inset: 0;
  z-index: 36;
  pointer-events: none;
}
.tut-spotlight {
  position: fixed;
  border-radius: 10px;
  border: 3px solid #FDE68A;
  box-shadow: 0 0 0 2px rgba(28, 23, 20, 0.8), 0 0 18px rgba(253, 230, 138, 0.7);
  pointer-events: none;
  animation: tutPulse 1.1s ease-in-out infinite;
}
.tut-hand {
  position: fixed;
  pointer-events: none;
  animation: tutBob 0.85s ease-in-out infinite;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.65));
}
.tut-pill {
  position: fixed;
  pointer-events: none;
  padding: 8px 16px;
  height: auto;
  min-height: 40px;
  color: #FDE68A;
  font-size: 14px;
  font-weight: 800;
}
.tut-skip-btn {
  position: fixed;
  top: 62px;
  right: 16px;
  pointer-events: auto;
  height: 40px;
  padding: 0 16px;
  border-width: 10px 14px 10px 14px !important;
  color: #FFF8EB;
  font-size: 13px;
  font-weight: 800;
}
@keyframes tutPulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.05); opacity: 1; }
}
@keyframes tutBob {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-4px, 7px); }
}

.toast-banner {
  position: fixed;
  top: 56px;
  left: 16px;
  z-index: 44;
  padding: 6px 16px;
  background: rgba(24, 18, 16, 0.92);
  border: 2px solid #D9A441;
  border-radius: 6px;
  color: #FDE68A;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  pointer-events: none;
  max-width: min(360px, 34vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== UNIFIED FLEX-SCROLL MODALS (ANTI-SAAS 60/25/15) ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 9, 14, 0.78);
}
.modal-backdrop.hidden {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
.modal-backdrop.is-closing {
  pointer-events: none !important;
}
.modal-backdrop.is-result {
  align-items: flex-start;
  padding-top: 62px;
  background: rgba(10, 9, 14, 0.36);
}
.modal-card {
  position: relative;
  z-index: 321;
  display: flex;
  flex-direction: column;
  width: min(940px, 94vw);
  max-height: 92vh;
  overflow: hidden;
  border-width: 16px 16px 20px 16px !important;
  border-image-width: 1 !important;
  background-color: #1B1816;
  color: var(--parchment-light);
  cursor: default;
}
.modal-card.modal-compact {
  width: min(640px, 94vw);
}
.modal-card.modal-result {
  width: min(680px, 94vw);
  max-height: 292px;
  border-width: 12px 14px 14px 14px !important;
}
.modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 8px 8px;
}
.modal-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.modal-pause-badge {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(184, 56, 52, 0.28);
  border: 1.5px solid #FDE68A;
  color: #FDE68A;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.modal-title-ribbon {
  display: inline-flex;
  align-items: center;
  padding: 4px 24px;
  border-width: 10px 28px 10px 24px !important;
  border-image-width: 1 !important;
  cursor: default;
}
.modal-title-txt {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 800;
  color: #FDE68A;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.85);
}
.modal-close-x {
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  flex: 0 0 auto;
}
.modal-close-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.modal-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 10px;
  flex-wrap: nowrap;
}
.modal-tab-btn {
  height: 40px;
  padding: 0 16px;
  border-width: 8px 12px 6px 12px !important;
  border-image-width: 1 !important;
  color: var(--parchment-light);
  font-size: 14px;
  font-weight: 800;
  opacity: 0.78;
  white-space: nowrap;
}
.modal-tab-btn.is-active {
  opacity: 1;
  color: #FDE68A;
}
.modal-tab-btn.is-locked {
  opacity: 0.45;
  filter: grayscale(0.55);
}
.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 8px 12px;
}
.modal-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 8px 10px 4px;
  border-top: 1px solid rgba(163, 139, 103, 0.35);
}

/* Anti-SaaS 4/5-Column Visual-First Card Grids (60/25/15, ZERO empty grid voids) */
.vf-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.vf-grid-5 .vf-card-portrait {
  min-height: 204px;
  padding: 6px 6px 8px;
  border-width: 10px 11px 10px 11px !important;
}
.vf-grid-5 .vf-art-box {
  height: 112px;
}
.vf-grid-5 .vf-art-img {
  height: 110px;
}
.vf-grid-5 .vf-title {
  font-size: 13px;
}
.vf-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.vf-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.vf-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.vf-grid-5 > *, .vf-grid-4 > *, .vf-grid-3 > *, .vf-grid-2 > * {
  min-width: 0;
  max-width: 100%;
}

.vf-card-portrait {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 8px 10px;
  min-height: 214px;
  border-width: 12px 14px 12px 14px !important;
  color: var(--ink-dark);
  text-align: center;
  overflow: visible;
}
.vf-badge {
  position: absolute;
  top: -8px;
  right: 8px;
  z-index: 6;
  padding: 2px 8px;
  border-radius: 4px;
  background: #9E2E2E;
  border: 1.5px solid #FDE68A;
  color: #FFF8E6;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.vf-art-box {
  width: 100%;
  height: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vf-art-img {
  width: 92%;
  height: 122px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(24, 16, 12, 0.35));
}
.season-card {
  min-height: 196px;
  padding: 4px 6px 6px;
  gap: 4px;
}
.sh-art-box {
  width: 100%;
  height: 134px;
}
.sh-art-img {
  width: 96%;
  height: 132px;
  object-fit: contain;
}
.vf-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  color: #1C1714;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vf-chip-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(28, 23, 20, 0.14);
  color: #1C1714;
  font-size: 13.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.vf-chip-ico, .cur-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
}
.vf-cta {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-width: 10px 12px 10px 12px !important;
  border-image-width: 1 !important;
  color: #FFFDF5;
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
}

/* Seasons Hub Banner & Controls (Anti-SaaS 60/25/15) */
.sh-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  margin-bottom: 12px;
  border-width: 10px 16px 10px 16px !important;
}
.sh-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.sh-banner-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
}
.sh-banner-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sh-banner-tag {
  font-size: 12px;
  font-weight: 800;
  color: var(--parchment-bg);
  letter-spacing: 0.04em;
}
.sh-banner-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #FDE68A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.sh-help-btn {
  min-width: 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 8px 10px 8px 10px !important;
  color: #FDE68A;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}
.sh-bal-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(20, 16, 14, 0.72);
  border: 1.5px solid #9E7E52;
  border-radius: 5px;
  color: #FFF8EB;
  font-size: 13.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ver-badge-txt {
  margin-right: auto;
  font-size: 12.5px;
  font-weight: 800;
  color: #B8A68A;
  padding-left: 6px;
}
.draft-footer-ticket {
  margin-right: auto;
}

/* 7-Day Looping Citadel Attendance Strip (Anti-SaaS compact bar) */
.sh-attend-strip {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 10px;
  border-width: 8px 12px 8px 12px !important;
  flex-wrap: nowrap;
}
.sh-att-hdr {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #FDE68A;
  white-space: nowrap;
}
.sh-att-pips {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.sh-att-pip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px 2px;
  background: rgba(20, 16, 14, 0.72);
  border: 1.5px solid #6E5942;
  border-radius: 5px;
  min-width: 0;
}
.sh-att-pip.is-done {
  opacity: 0.62;
  border-color: #4A7A58;
}
.sh-att-pip.is-today {
  border-color: #FDE68A;
  background: rgba(94, 58, 22, 0.55);
}
.sh-att-day {
  font-size: 12px;
  font-weight: 800;
  color: var(--parchment-bg);
  line-height: 1.05;
}
.sh-att-ico {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.sh-att-amt {
  font-size: 12px;
  font-weight: 800;
  color: #FFF8EB;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  white-space: nowrap;
}
.sh-att-cta {
  flex: 0 0 auto;
  min-width: 86px;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 8px 12px 8px 12px !important;
  border-image-width: 1 !important;
  color: #FFFDF5;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

/* Daily Contracts Compact Strip (4 quests inside Pass tab, 0 overflow at 720p) */
.sh-contracts-wrap {
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(24, 19, 17, 0.88);
  border: 1.5px solid #7C6447;
  border-radius: 6px;
}
.sh-contracts-hdr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: #FDE68A;
}
.sh-contracts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.sh-ct-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  background: #EBD5AC;
  border: 2px solid #96774B;
  border-radius: 5px;
  color: var(--ink-dark);
  min-width: 0;
}
.sh-ct-top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.sh-ct-ico {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
}
.sh-ct-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sh-ct-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #1C1714;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-ct-rew {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 800;
  color: #3D2B1A;
  font-variant-numeric: tabular-nums;
}
.sh-ct-btn {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 7px 10px 7px 10px !important;
  border-image-width: 1 !important;
  color: #FFFDF5;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}

/* Season Pass Above-the-Fold Compact Density (All 6 Tier/Bounty/Bonus Cards visible at 720p/784p/1080p!) */
.pass-banner {
  padding: 4px 12px;
  margin-bottom: 6px;
}
.pass-banner .sh-banner-img {
  width: 40px;
  height: 40px;
}
.pass-banner .sh-banner-title {
  font-size: 16px;
}
.pass-banner .action-btn-lg {
  height: 36px;
  min-width: 108px;
  padding: 0 12px;
  font-size: 13.5px;
  border-width: 9px 12px 9px 12px !important;
}
.pass-banner .sh-help-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
}
.pass-attend {
  padding: 4px 8px;
  margin-bottom: 6px;
}
.pass-attend .sh-att-pip {
  padding: 2px 2px;
  gap: 0;
}
.pass-attend .sh-att-day {
  font-size: 11px;
}
.pass-attend .sh-att-ico {
  width: 18px;
  height: 18px;
}
.pass-attend .sh-att-amt {
  font-size: 11px;
}
.pass-attend .sh-att-cta {
  height: 32px;
  min-width: 78px;
  font-size: 12.5px;
}
.pass-grid {
  gap: 7px;
}
.pass-card {
  min-height: 146px;
  padding: 3px 6px 5px;
  gap: 2px;
  border-width: 9px 11px 9px 11px !important;
}
.pass-card .sh-art-box {
  height: 68px;
}
.pass-card .sh-art-img {
  width: 92%;
  height: 66px;
}
.pass-card .vf-title {
  font-size: 13px;
}
.pass-card .vf-chip-bar {
  padding: 1px 7px;
  font-size: 12.5px;
}
.pass-card .vf-cta {
  height: 31px;
  font-size: 12.5px;
  border-width: 7px 10px 7px 10px !important;
}
.pass-contracts {
  margin-top: 6px;
  padding: 5px 8px;
}
.pass-contracts .sh-contracts-hdr {
  margin-bottom: 4px;
  font-size: 12.5px;
}
.pass-contracts .sh-ct-box {
  padding: 4px 6px;
  gap: 4px;
}
.pass-contracts .sh-ct-ico {
  width: 24px;
  height: 24px;
}
.pass-contracts .sh-ct-btn {
  height: 28px;
  font-size: 12px;
}

.result-realm-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 14px;
  margin-top: 2px;
  background: rgba(30, 24, 20, 0.92);
  border: 1.5px solid #D9A441;
  border-radius: 6px;
  color: #FDE68A;
  font-size: 13.5px;
  font-weight: 800;
}

/* Settings & Pause Controls */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(34, 29, 26, 0.92);
  border: 1.5px solid #6E5840;
  border-radius: 6px;
}
.setting-lbl {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--parchment-light);
}
.setting-ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
}
.setting-slider {
  width: 140px;
  accent-color: #D9A441;
}
.setting-toggle-btn {
  min-width: 64px;
  height: 34px;
  padding: 0 12px;
  border: 1.5px solid #C98A32;
  border-radius: 4px;
  background: #2C241E;
  color: #FDE68A;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.setting-toggle-btn.is-off {
  border-color: #6B6259;
  color: #B4A899;
}
.lang-select {
  height: 36px;
  padding: 0 10px;
  background: #1B1714;
  border: 1.5px solid #C98A32;
  border-radius: 4px;
  color: #FDE68A;
  font-size: 14px;
  font-weight: 700;
}

/* Celebration Result & Exit Retention Cards */
.result-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  text-align: center;
}
.result-top-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.result-stars {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.result-star-ico {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.result-loot-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.result-loot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #EBD5AC;
  border: 2px solid #96774B;
  border-radius: 6px;
  color: #1C1714;
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.result-loot-chip img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.action-btn-lg {
  min-width: 120px;
  height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-width: 10px 14px 10px 14px !important;
  border-image-width: 1 !important;
  color: #FFFDF5;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
}
.modal-footer .action-btn-lg {
  flex: 1 1 0;
  min-width: 0;
  max-width: 210px;
}
.action-btn-lg > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Preview-Only [DEV F2] Pill & Panel */
.dev-f2-pill {
  position: fixed;
  bottom: 12px;
  left: 12px;
  z-index: 60;
  height: 34px;
  padding: 0 10px;
  background: rgba(24, 18, 22, 0.88);
  border: 1.5px solid #D9A441;
  border-radius: 4px;
  color: #FDE68A;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.debug-panel {
  position: fixed;
  bottom: 52px;
  left: 12px;
  z-index: 160;
  width: 260px;
  padding: 10px;
  background: rgba(18, 15, 18, 0.96);
  border: 2px solid #D9A441;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.debug-panel button {
  height: 32px;
  background: #2C2320;
  border: 1px solid #9E7E52;
  border-radius: 4px;
  color: #EFE5CE;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

/* Compact 1280x720 Responsive Protection */
@media (max-width: 1360px) {
  .hud-top {
    left: 8px;
    right: 8px;
    gap: 5px;
  }
  .hud-cluster {
    gap: 4px;
  }
  .hud-pill, .hud-hp-wrap, .hud-obj-pill, .hud-btn {
    height: 38px;
    padding: 0 6px;
    gap: 4px;
    font-size: 12.5px;
    border-width: 6px 9px 6px 9px !important;
    border-image-width: 1 !important;
  }
  .hud-val, .hud-btn-lbl, .hud-obj-txt {
    font-size: 12.5px;
  }
  .hud-icon-only {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }
  .hud-speed-btn {
    min-width: 38px;
    padding: 0 6px;
  }
  .hud-ico {
    width: 19px;
    height: 19px;
  }
  .hud-hp-track {
    width: 54px;
  }
  .hud-obj-pill {
    min-width: 108px;
    max-width: 180px;
    padding: 0 8px;
  }
  .boss-hud-banner {
    top: 50px;
    width: min(410px, 44vw);
    padding: 5px 10px;
  }
  .boss-hud-portrait {
    width: 36px;
    height: 36px;
  }
  .hud-bottom {
    gap: 10px;
  }
  .tool-btn {
    width: 62px;
    height: 68px;
  }
  .tool-ico {
    width: 42px;
    height: 42px;
  }
  .sh-att-hdr span {
    font-size: 12px;
  }
  .sh-att-ico {
    width: 20px;
    height: 20px;
  }
  .sh-ct-ico {
    width: 28px;
    height: 28px;
  }
}
@media (max-width: 820px) {
  .vf-grid-5, .vf-grid-4, .vf-grid-3, .sh-contracts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
