/* ============================================
   16:9 ENCOUNTER LAYOUT (1920x1080 fixed)
   ============================================ */

/* Body styling when 16:9 is active */
body.mode-16x9 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  background: #000 !important;
  margin: 0;
  padding: 0 !important;
}

/* === GAME WRAPPER === */
.game-wrapper {
  width: 1920px;
  height: 1080px;
  position: relative;
  overflow: hidden;
  transform-origin: center center;
  background: #0a0c12;
  background-image: url("images/bg/forge.png");
  background-size: cover;
  background-position: center;
  font-family: 'Segoe UI', sans-serif;
  color: #ccc;
}

.game-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.game-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
  z-index: 1;
}

.game-wrapper > * { position: relative; z-index: 2; }

/* === FANTASY FONT === */
.fantasy { font-family: 'Cinzel', serif; }

/* === TOP BAR === */
.top-bar-16x9 {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50px;
  background: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  z-index: 10;
}

.top-bar-16x9 .floor-label { color: #e6e6e6; font-size: 20px; font-weight: 700; font-family: 'Cinzel', serif; }
.top-bar-16x9 .floor-label span { color: #c48a2e; }

.top-bar-16x9 .top-bar-right {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 20px;
  font-weight: 700;
}

.top-bar-16x9 .resource { display: flex; align-items: center; gap: 8px; }
.top-bar-16x9 .resource-energy { color: #c8a0f0; }
.top-bar-16x9 .resource-gold { color: #ffd84d; }

.top-energy-orb {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c8a0f0, #8050c0 40%, #503090 80%);
  border: 1.5px solid #4a2080;
  box-shadow: 0 0 4px rgba(128, 80, 192, 0.4);
  vertical-align: middle;
}

/* === TUTORIAL LEVEL BACKGROUND === */
.game-wrapper.level-mode {
  background-image: url("images/bg/forest.png");
}
.game-wrapper.level-mode::before {
  background: rgba(0, 0, 0, 0.5);
  background-image: none;
  opacity: 1;
}

/* === LEVEL CONTROLS (tutorial debug buttons) === */
.level-controls-16x9 {
  position: absolute;
  top: 56px;
  right: 36px;
  z-index: 15;
  display: flex;
  gap: 8px;
}
.level-controls-16x9 button {
  background: rgba(30, 30, 35, 0.7);
  border: 1px solid #555;
  color: #bbb;
  padding: 4px 12px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Segoe UI', sans-serif;
}
.level-controls-16x9 button:hover {
  background: rgba(60, 60, 70, 0.8);
  color: #e0e0e0;
  border-color: #888;
}

/* === RELIC BAR === */
.relic-bar-16x9 {
  position: absolute;
  top: 50px;
  left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 36px;
  z-index: 10;
}

.relic-bar-16x9 .relic-icon-16x9 {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  filter: drop-shadow(0 0 3px rgba(218, 168, 60, 0.6));
  transition: transform 0.15s;
  position: relative;
}

.relic-bar-16x9 .relic-icon-16x9 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.relic-bar-16x9 .relic-icon-16x9:hover { transform: scale(1.2); }

.relic-bar-16x9 .relic-icon-16x9 .relic-tooltip-16x9 {
  display: none;
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 22, 32, 0.95);
  border: 1px solid #c48a2e;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: #e6d5a8;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
}

.relic-bar-16x9 .relic-icon-16x9:hover .relic-tooltip-16x9 { display: block; }

/* === PANEL FRAME (shared) === */
.panel-frame-16x9 {
  background: linear-gradient(180deg, rgba(20,22,32,0.85), rgba(14,16,24,0.75));
  border: 2px solid #2a2c3a;
  border-radius: 12px;
  box-shadow:
    0 4px 20px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.04),
    inset 0 -1px 0 rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.panel-frame-16x9::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23t)' opacity='0.04'/%3E%3C/svg%3E");
  border-radius: 12px;
  pointer-events: none;
}

.panel-frame-16x9::after {
  content: "";
  position: absolute;
  top: 0; left: 10px; right: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,138,46,0.15), transparent);
  pointer-events: none;
}

/* === LEFT PANEL: WEAPON === */
.weapon-panel-16x9 {
  position: absolute;
  top: 106px;
  left: 0;
  width: 460px;
  bottom: 200px;
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.weapon-panel-inner-16x9 {
  margin: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(100% - 20px);
  flex: 1;
  min-height: 0;
}

.weapon-image-16x9 {
  width: 204px;
  height: 204px;
  border-radius: 50%;
  border: 3px solid #3a3a48;
  background: radial-gradient(circle, #1e1e2a 0%, #13131b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.4);
  overflow: hidden;
}

.weapon-image-16x9 img,
.weapon-image-16x9 #itemImage {
  width: 85%;
  height: 85%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  border-radius: 0;
}

.weapon-name-16x9 { font-family: 'Cinzel', serif; color: #e6d5a8; font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 8px; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.weapon-desc-16x9 { color: #888; font-size: 14px; text-align: center; margin-bottom: 18px; }

.weapon-stats-16x9 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  margin-bottom: 14px;
}

.stat-badge-16x9 {
  background: linear-gradient(180deg, rgba(14,16,24,0.8), rgba(20,22,32,0.6));
  border: 1px solid #2e3040;
  border-top-color: #22242e;
  border-bottom-color: #383a48;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 16px;
  color: #e0d8c8;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.03);
  text-shadow: 0 0 8px rgba(230, 213, 168, 0.3);
}

.stat-badge-16x9 .stat-val { color: #e6e6e6; font-weight: 700; }
.stat-badge-16x9 .stat-val.boosted { color: #5cdb5c; }

.see-mods-btn-16x9 {
  background: linear-gradient(135deg, #1e1e2a, #16182200);
  border: 1px solid #c48a2e;
  color: #c48a2e;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 8px rgba(196, 138, 46, 0.1);
}

.see-mods-btn-16x9:hover {
  background: rgba(196, 138, 46, 0.1);
  box-shadow: 0 0 15px rgba(196, 138, 46, 0.2);
}

/* === RIGHT PANEL: ENEMY === */
.enemy-panel-16x9 {
  position: absolute;
  top: 106px;
  right: 0;
  width: 460px;
  bottom: 200px;
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.enemy-panel-inner-16x9 {
  margin: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(100% - 20px);
  flex: 1;
  min-height: 0;
}

.enemy-frame-16x9 {
  width: 204px;
  height: 204px;
  min-height: 204px;
  border-radius: 50%;
  border: 3px solid #3a3a48;
  background: radial-gradient(circle, #1e1e2a 0%, #13131b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
  margin-bottom: 12px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.4);
  overflow: hidden;
  flex-shrink: 0;
}

.enemy-frame-16x9 img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 50%;
}

.enemy-name-16x9 { font-family: 'Cinzel', serif; color: #e6d5a8; font-size: 20px; font-weight: 700; margin-bottom: 8px; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }

/* Enemy talking animation */
.enemy-frame-16x9.enemy-talking {
  animation: enemy-talk-wiggle 0.15s ease-in-out infinite alternate;
}

@keyframes enemy-talk-wiggle {
  0%   { transform: rotate(-1.5deg) translateY(0px); }
  50%  { transform: rotate(0deg) translateY(-2px); }
  100% { transform: rotate(1.5deg) translateY(0px); }
}

/* Enemy dialogue */
.enemy-dialogue-16x9 {
  width: 100%;
  max-width: 360px;
  margin-top: 12px;
  margin-bottom: 16px;
}

.dialogue-bubble-16x9 {
  background: linear-gradient(135deg, rgba(22,24,34,0.9), rgba(18,20,28,0.8));
  border: 1px solid #3a3a48;
  border-radius: 12px;
  padding: 14px 18px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.dialogue-bubble-16x9::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #3a3a48;
}

.dialogue-bubble-16x9::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid rgba(22,24,34,0.9);
}

.dialogue-text-16x9 {
  color: #e0d8c8;
  font-size: 16px;
  font-style: italic;
  text-align: center;
  line-height: 1.4;
  min-height: 3.6em;
  text-shadow: 0 0 8px rgba(230, 213, 168, 0.3);
}

.dialogue-text-16x9 em {
  color: #e6d5a8;
  font-style: italic;
}

.enemy-modifiers-16x9 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  width: 100%;
  max-width: 360px;
  align-items: stretch;
  min-height: 108px;
  justify-content: flex-end;
}

.enemy-mod-tag-16x9 { font-size: 14px; padding: 8px 14px; border-radius: 6px; font-weight: 600; text-align: center; cursor: default; }
.enemy-mod-tag-16x9.resist { background: rgba(74, 158, 255, 0.12); color: #4a9eff; border: 1px solid rgba(74, 158, 255, 0.25); box-shadow: 0 0 8px rgba(74, 158, 255, 0.1); }
.enemy-mod-tag-16x9.boss { background: rgba(168, 85, 247, 0.12); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.25); box-shadow: 0 0 8px rgba(168, 85, 247, 0.1); }
.enemy-mod-tag-16x9.normal { background: rgba(100, 100, 120, 0.12); color: #888; border: 1px solid rgba(100, 100, 120, 0.25); }

.enemy-hp-section-16x9 { width: 100%; max-width: 360px; margin-top: auto; margin-bottom: 40px; }

.enemy-hp-label-16x9 {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 700;
  color: #e6e6e6;
  margin-bottom: 10px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.enemy-hp-bar-outer-16x9 {
  width: 100%;
  height: 42px;
  background: #12141c;
  border-radius: 8px;
  border: 1px solid #2a2a3a;
  overflow: visible;
  position: relative;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(255,255,255,0.015) 6px, rgba(255,255,255,0.015) 12px);
}

.enemy-hp-bar-outer-16x9::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent);
  border-radius: 8px 8px 0 0;
  pointer-events: none;
  z-index: 1;
}

.enemy-hp-fill-16x9 { position: absolute; top: 0; left: 0; bottom: 0; display: flex; border-radius: 8px; z-index: 2; }
.hp-segment-16x9 { height: 100%; position: relative; z-index: 2; }
.hp-segment-16x9.fire { background: linear-gradient(180deg, #e86050, #c04030); box-shadow: 0 0 12px rgba(224, 80, 64, 0.4), 0 0 4px rgba(224, 80, 64, 0.6); }
.hp-segment-16x9.cold { background: linear-gradient(180deg, #5aafff, #3a8eee); box-shadow: 0 0 12px rgba(74, 158, 255, 0.4), 0 0 4px rgba(74, 158, 255, 0.6); }
.hp-segment-16x9.lightning { background: linear-gradient(180deg, #f5e070, #d4b840); box-shadow: 0 0 12px rgba(240, 208, 96, 0.4), 0 0 4px rgba(240, 208, 96, 0.6); }
.hp-segment-16x9.physical { background: linear-gradient(180deg, #d0d0d0, #a0a0a0); box-shadow: 0 0 12px rgba(192, 192, 192, 0.3), 0 0 4px rgba(192, 192, 192, 0.5); }

.segment-tooltip-16x9 {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  background: #1a1a1c;
  border: 1px solid #c48a2e;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #e6e6e6;
  white-space: nowrap;
  z-index: 200;
  pointer-events: none;
}
.hp-segment-16x9:hover .segment-tooltip-16x9 { display: block; }
.segment-tooltip-16x9 .formula-line { font-size: 12px; font-weight: 400; color: #aaa; margin-bottom: 4px; display: block; }

.enemy-hp-text-16x9 { text-align: center; font-size: 16px; font-weight: 700; color: #e6e6e6; margin-top: 10px; }
.enemy-hp-text-16x9 span { color: #888; font-weight: 400; }

.hp-segment-16x9.goal-progress {
  background: linear-gradient(180deg, #6ac070, #3a8a40);
  box-shadow: 0 0 12px rgba(100, 192, 100, 0.4), 0 0 4px rgba(100, 192, 100, 0.6);
}

/* === CENTER PANEL: MODS + QUEUE === */
.center-panel-16x9 {
  position: absolute;
  top: 106px;
  left: 460px;
  right: 460px;
  bottom: 200px;
  display: flex;
  flex-direction: column;
  background: none;
  pointer-events: none;
}

.center-panel-16x9 > * { pointer-events: auto; }

.mods-frame-16x9 {
  margin: 4px auto 2px;
  width: 85%;
  padding: 4px 20px;
  border-radius: 12px;
  background: transparent;
  background-image: url("images/bg/paneliron.png");
  background-size: 125% 140%;
  background-position: center;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.mods-panel-16x9 {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 20px;
  min-height: 0;
}

.mods-section-16x9 { width: 100%; max-width: 600px; }

.mods-header-16x9 {
  font-family: 'Cinzel', serif;
  color: #8a8a9a;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2px;
  padding-left: 4px;
}

.mod-slots-16x9 { display: flex; flex-direction: column; gap: 4px; }

.mod-slot-16x9 {
  background: linear-gradient(180deg, rgba(10,12,18,0.7), rgba(16,18,26,0.5));
  border: 1px solid #22242e;
  border-top-color: #1a1c24;
  border-bottom-color: #30323e;
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.4),
    inset 0 -1px 0 rgba(255,255,255,0.03),
    0 1px 0 rgba(255,255,255,0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mod-slot-16x9.filled {
  border-color: #3a3c4c;
  border-top-color: #1e2030;
  border-bottom-color: #4a4c5c;
  background: linear-gradient(180deg, rgba(12,14,22,0.9), rgba(20,22,34,0.7), rgba(26,28,40,0.6));
  box-shadow:
    inset 0 3px 6px rgba(0,0,0,0.6),
    inset 0 1px 2px rgba(0,0,0,0.4),
    inset 0 -2px 4px rgba(255,255,255,0.02),
    0 1px 0 rgba(255,255,255,0.04),
    0 2px 4px rgba(0,0,0,0.3);
}

.mod-slot-16x9.filled:hover {
  border-color: #50526a;
  border-bottom-color: #5a5c70;
  box-shadow:
    inset 0 3px 6px rgba(0,0,0,0.6),
    inset 0 1px 2px rgba(0,0,0,0.4),
    inset 0 -2px 4px rgba(255,255,255,0.03),
    0 1px 0 rgba(255,255,255,0.06),
    0 0 14px rgba(196, 138, 46, 0.1);
}

.mod-slot-16x9.empty {
  border-style: dashed;
  border-color: rgba(255,255,255,0.06);
  background: rgba(4,6,10,0.5);
  box-shadow:
    inset 0 4px 8px rgba(0,0,0,0.7),
    inset 0 -1px 0 rgba(255,255,255,0.02);
}

.mod-slot-16x9.negative { border-color: rgba(200, 60, 60, 0.3); }
.mod-slot-16x9.negative .mod-value-16x9 { color: #c85050; }
.mod-slot-16x9.negative .mod-tier-16x9 { color: #c85050; }
.mod-slot-16x9.fractured { border-color: rgba(196, 138, 46, 0.3); }
.mod-slot-16x9.maxed { border-color: rgba(196, 138, 46, 0.4); }

/* Slot entrance + glow pulse on mod change */
.mod-slot-16x9.mod-glow-pulse {
  animation: mod-slot-enter 0.3s ease-out, mod-glow 0.6s ease-out;
}

@keyframes mod-slot-enter {
  0%   { opacity: 0; transform: scale(0.92); }
  60%  { opacity: 1; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes mod-glow {
  0%   { box-shadow: inset 0 3px 6px rgba(0,0,0,0.6), 0 0 0 rgba(196, 138, 46, 0); }
  30%  { box-shadow: inset 0 3px 6px rgba(0,0,0,0.6), 0 0 20px rgba(196, 138, 46, 0.5), 0 0 40px rgba(196, 138, 46, 0.2); }
  100% { box-shadow: inset 0 3px 6px rgba(0,0,0,0.6), 0 0 0 rgba(196, 138, 46, 0); }
}

.mod-info-16x9 { display: flex; align-items: center; gap: 12px; }
.mod-value-16x9 { color: #e0d8c8; font-size: 16px; font-weight: 600; text-shadow: 0 0 8px rgba(230, 213, 168, 0.3); }
.mod-tags-16x9 { display: flex; gap: 5px; }

.mod-tag-16x9 {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.2);
  background: rgba(100, 100, 110, 0.12);
  color: #aaa;
  border: 1px solid rgba(100, 100, 110, 0.25);
}
.mod-tag-16x9.fire { background: rgba(224, 80, 64, 0.15); color: #e86050; border: 1px solid rgba(224, 80, 64, 0.2); }
.mod-tag-16x9.cold { background: rgba(74, 158, 255, 0.15); color: #5aafff; border: 1px solid rgba(74, 158, 255, 0.2); }
.mod-tag-16x9.lightning { background: rgba(240, 208, 96, 0.15); color: #f5e070; border: 1px solid rgba(240, 208, 96, 0.2); }
.mod-tag-16x9.physical { background: rgba(192, 192, 192, 0.12); color: #d0d0d0; border: 1px solid rgba(192, 192, 192, 0.2); }
.mod-tag-16x9.spell { background: rgba(168, 85, 247, 0.12); color: #b070f0; border: 1px solid rgba(168, 85, 247, 0.2); }
.mod-tag-16x9.attack { background: rgba(239, 138, 50, 0.12); color: #f0a050; border: 1px solid rgba(239, 138, 50, 0.2); }

.mod-tier-16x9 { font-size: 13px; color: #888; font-weight: 600; }
.mod-tier-16x9.tier-1 { color: #daa840; font-weight: 700; }
.mod-tier-16x9.tier-2 { color: #b89838; }
.mod-tier-16x9.tier-3 { color: #9a9060; }
.mod-tier-16x9.max { color: #daa840; font-weight: 700; }

/* T1 mod slot breathing glow */
.mod-slot-16x9.filled.tier-1-slot {
  border-color: rgba(218, 180, 90, 0.5);
  box-shadow: none;
  animation: t1-breathe 3.5s ease-in-out infinite;
}

@keyframes t1-breathe {
  0%, 100% {
    box-shadow:
      inset 0 0 8px rgba(218, 180, 90, 0.08),
      0 0 6px rgba(218, 180, 90, 0.12),
      0 0 12px rgba(218, 180, 90, 0.05);
  }
  50% {
    box-shadow:
      inset 0 0 16px rgba(218, 180, 90, 0.3),
      0 0 22px rgba(218, 180, 90, 0.5),
      0 0 44px rgba(218, 180, 90, 0.2);
  }
}

/* Legendary mod slot — jackpot */
.mod-slot-16x9.filled.legendary-mod {
  background: linear-gradient(135deg, #2a2210 0%, #3d3218 25%, #4a3a18 50%, #3d3218 75%, #2a2210 100%);
  border: 2px solid #d4a840;
  border-radius: 8px;
  animation: legendary-mod-pulse 2.5s ease-in-out infinite;
  position: relative;
}

.mod-slot-16x9.filled.legendary-mod::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 7px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 215, 80, 0.06) 20%,
    rgba(255, 215, 80, 0.12) 50%,
    rgba(255, 215, 80, 0.06) 80%,
    transparent 100%
  );
  pointer-events: none;
}

.mod-slot-16x9.filled.legendary-mod::after {
  content: "";
  position: absolute;
  top: 0; left: -100%; right: 0; bottom: 0;
  border-radius: 7px;
  background: linear-gradient(90deg, transparent, rgba(255, 225, 100, 0.15), transparent);
  animation: legendary-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

.mod-slot-16x9.filled.legendary-mod .mod-value-16x9 {
  color: #ffe680;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 215, 80, 0.5), 0 0 24px rgba(255, 180, 40, 0.2);
}

.mod-slot-16x9.filled.legendary-mod .mod-tier-16x9 {
  color: #ffd040;
  font-weight: 800;
  font-size: 15px;
  text-shadow: 0 0 8px rgba(255, 200, 40, 0.6);
}

.mod-slot-16x9.filled.legendary-mod .mod-tag-16x9 {
  border-color: rgba(212, 168, 64, 0.4);
  color: #e6d090;
}

@keyframes legendary-mod-pulse {
  0%, 100% {
    box-shadow:
      inset 0 0 12px rgba(255, 200, 60, 0.15),
      0 0 8px rgba(255, 200, 60, 0.2),
      0 0 20px rgba(255, 180, 40, 0.1);
  }
  50% {
    box-shadow:
      inset 0 0 20px rgba(255, 200, 60, 0.3),
      0 0 16px rgba(255, 200, 60, 0.4),
      0 0 40px rgba(255, 180, 40, 0.2),
      0 0 60px rgba(255, 160, 20, 0.1);
  }
}

@keyframes legendary-shimmer {
  0%   { transform: translateX(-50%); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: translateX(150%); opacity: 0; }
}
.mod-badges-16x9 { display: flex; gap: 8px; align-items: center; }
.mod-max-badge-16x9 { background: linear-gradient(135deg, #c48a2e, #daa840); color: #1a1a2e; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 3px; box-shadow: 0 0 8px rgba(196, 138, 46, 0.3); }
.mod-lock-icon-16x9 { font-size: 16px; }
.mod-star-16x9 { color: #c48a2e; font-size: 14px; filter: drop-shadow(0 0 3px rgba(196, 138, 46, 0.4)); }
.empty-label-16x9 { color: #3a3a4a; font-size: 15px; font-style: italic; }

/* Ornamental divider */
.ornament-divider-16x9 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 2px 0;
  flex-shrink: 0;
}

.ornament-divider-16x9::before,
.ornament-divider-16x9::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,138,46,0.2), transparent);
}

.ornament-divider-16x9 span {
  color: rgba(196,138,46,0.3);
  font-size: 14px;
}

/* === QUEUE === */
.queue-section-16x9 {
  padding: 4px 20px 8px;
  margin-left: -50px;
  margin-right: -50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.queue-row-16x9 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.queue-cards-16x9 { display: flex; align-items: center; justify-content: space-evenly; width: 100%; min-height: 276px; }

.queue-card-16x9, .queue-slot-empty-16x9 { width: 170px; height: 240px; flex: 0 0 170px; border: 2px solid transparent; box-sizing: border-box; transform: scale(1.15); transform-origin: center center; }
.queue-arrow-16x9 { flex: 0 0 auto; }

.queue-arrow-16x9 { color: #555; font-size: 22px; flex-shrink: 0; }

/* === CARDS (shared card frame styles) === */
.queue-card-16x9, .hand-card-16x9 {
  width: 170px;
  height: 240px;
  border-radius: 12px;
  overflow: visible;
  position: relative;
  flex-shrink: 0;
}

.hand-card-16x9 {
  position: absolute;
  bottom: 10px;
  cursor: pointer;
  transform-origin: bottom center;
  user-select: none;
}

.queue-card-16x9 .card-frame-16x9,
.hand-card-16x9 .card-frame-16x9 {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 2px solid #8b7340;
  background-image: url("images/bg/card_parchment.png");
  background-size: 115% 110%;
  background-position: center;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.4);
  filter: brightness(0.45);
}

.queue-card-16x9 .card-frame-16x9::before,
.hand-card-16x9 .card-frame-16x9::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 9px;
  border: 1px solid rgba(196, 138, 46, 0.15);
  pointer-events: none;
}

/* Card art */
.queue-card-16x9 .card-art-16x9,
.hand-card-16x9 .card-art-16x9 {
  position: absolute;
  top: 32px; left: 14px; right: 14px;
  height: 90px;
  border-radius: 6px;
  border: 2px solid #4a3a24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

.queue-card-16x9 .card-art-16x9 img,
.hand-card-16x9 .card-art-16x9 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.queue-card-16x9.action .card-art-16x9, .hand-card-16x9.action .card-art-16x9 { background: linear-gradient(135deg, #2a1515, #3d1a1a, #1a0a0a); }
.queue-card-16x9.effect .card-art-16x9, .hand-card-16x9.effect .card-art-16x9 { background: linear-gradient(135deg, #151a2a, #1a2a3d, #0a0f1a); }
.queue-card-16x9.legendary .card-art-16x9, .hand-card-16x9.legendary .card-art-16x9 { background: linear-gradient(135deg, #251530, #2d1a3d, #150a1a); }

.queue-card-16x9.action .card-frame-16x9, .hand-card-16x9.action .card-frame-16x9 { border-color: #8b4040; }
.queue-card-16x9.effect .card-frame-16x9, .hand-card-16x9.effect .card-frame-16x9 { border-color: #40608b; }
.queue-card-16x9.legendary .card-frame-16x9, .hand-card-16x9.legendary .card-frame-16x9 { border-color: #7040a0; }

/* Name plate — top center */
.queue-card-16x9 .card-name-plate-16x9,
.hand-card-16x9 .card-name-plate-16x9 {
  position: absolute;
  top: 4px; left: 8px; right: 8px;
  text-align: center;
  padding: 4px 6px;
  z-index: 2;
}

.queue-card-16x9 .card-name-plate-16x9 span,
.hand-card-16x9 .card-name-plate-16x9 span {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #e6d5a8;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,0.6);
}

/* Desc area */
.queue-card-16x9 .card-desc-16x9,
.hand-card-16x9 .card-desc-16x9 {
  position: absolute;
  top: 155px; left: 12px; right: 12px; bottom: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  border: 1px solid rgba(139, 115, 64, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.queue-card-16x9 .card-desc-16x9 span,
.hand-card-16x9 .card-desc-16x9 span {
  font-size: 12px;
  color: #ccc;
  text-align: center;
  line-height: 1.3;
}

/* Cost gem */
.queue-card-16x9 .card-cost-16x9,
.hand-card-16x9 .card-cost-16x9 {
  position: absolute;
  top: -8px; left: -8px;
  width: 30px; height: 30px;
  background: radial-gradient(circle at 35% 35%, #c8a0f0, #8050c0 30%, #6038a0 60%, #3a1870 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #4a2080;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
  text-shadow: 0 0 4px rgba(180, 140, 255, 0.6), -1px -1px 0 rgba(0,0,0,0.4), 1px -1px 0 rgba(0,0,0,0.4), -1px 1px 0 rgba(0,0,0,0.4), 1px 1px 0 rgba(0,0,0,0.4);
  z-index: 3;
}

/* Type label — moved to old name plate position */
.queue-card-16x9 .card-type-16x9,
.hand-card-16x9 .card-type-16x9 {
  position: absolute;
  top: 128px; left: 10px; right: 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  z-index: 2;
  padding: 3px 0;
  background: linear-gradient(90deg, transparent, rgba(139, 115, 64, 0.2), transparent);
}

.queue-card-16x9.action .card-type-16x9, .hand-card-16x9.action .card-type-16x9 { color: #c46050; }
.queue-card-16x9.effect .card-type-16x9, .hand-card-16x9.effect .card-type-16x9 { color: #5090d0; }
.queue-card-16x9.legendary.card-action .card-type-16x9, .hand-card-16x9.legendary.card-action .card-type-16x9 { color: #c46050; }
.queue-card-16x9.legendary.card-effect .card-type-16x9, .hand-card-16x9.legendary.card-effect .card-type-16x9 { color: #5090d0; }

/* Corner ornaments */
.queue-card-16x9 .card-corner-16x9,
.hand-card-16x9 .card-corner-16x9 { position: absolute; width: 12px; height: 12px; border-color: rgba(139, 115, 64, 0.3); border-style: solid; z-index: 2; }
.card-corner-16x9.tl { top: 6px; left: 6px; border-width: 1px 0 0 1px; border-radius: 3px 0 0 0; }
.card-corner-16x9.bl { bottom: 6px; left: 6px; border-width: 0 0 1px 1px; border-radius: 0 0 0 3px; }

/* Card modifier ribbon (right-side tabs) */
.hand-card-16x9 .card-mod-ribbon-16x9,
.queue-card-16x9 .card-mod-ribbon-16x9 {
  position: absolute;
  top: 36px;
  right: -2px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 4;
}

.card-mod-tab {
  background: rgba(20, 18, 12, 0.9);
  border: 1px solid rgba(196, 138, 46, 0.4);
  border-right: none;
  border-radius: 4px 0 0 4px;
  padding: 3px 8px 3px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #e6d5a8;
  white-space: nowrap;
  box-shadow: -2px 1px 4px rgba(0,0,0,0.4);
}
.card-mod-tab-gameplay { border-color: rgba(196, 138, 46, 0.6); color: #f0d898; }
.card-mod-tab-stat { border-color: rgba(100, 180, 100, 0.5); color: #8cc88c; }
.card-mod-tab-single-use { border-color: rgba(200, 80, 60, 0.6); color: #e09080; }

/* Card hover glow */
.hand-card-16x9:hover { z-index: 100 !important; }
.hand-card-16x9.action:hover .card-frame-16x9 { border-color: #c06050; box-shadow: inset 0 0 20px rgba(224, 80, 64, 0.15), 0 0 30px rgba(224, 80, 64, 0.25), 0 8px 20px rgba(0,0,0,0.4); }
.hand-card-16x9.effect:hover .card-frame-16x9 { border-color: #5090d0; box-shadow: inset 0 0 20px rgba(74, 158, 255, 0.15), 0 0 30px rgba(74, 158, 255, 0.25), 0 8px 20px rgba(0,0,0,0.4); }
.hand-card-16x9.legendary,
.queue-card-16x9.legendary { filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.7)) drop-shadow(0 0 30px rgba(128, 50, 220, 0.4)); }
.hand-card-16x9.legendary:hover,
.queue-card-16x9.legendary:hover { filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.9)) drop-shadow(0 0 40px rgba(128, 50, 220, 0.5)); }

/* Modified card gold outer glow (not single-use-only) */
.hand-card-16x9.mod-glow,
.queue-card-16x9.mod-glow {
  filter: drop-shadow(0 0 8px rgba(196, 158, 46, 0.6)) drop-shadow(0 0 20px rgba(180, 130, 30, 0.35));
}

/* Modified card gold border + inner frame glow */
.hand-card-16x9.mod-glow .card-frame-16x9,
.queue-card-16x9.mod-glow .card-frame-16x9 {
  border-color: #c49a3e;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.4), 0 0 12px rgba(196, 138, 46, 0.4);
}

/* Modified card without glow (single-use-only) */
.hand-card-16x9.modified:not(.mod-glow) .card-frame-16x9,
.queue-card-16x9.modified:not(.mod-glow) .card-frame-16x9 {
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.4), 0 0 10px rgba(196, 138, 46, 0.3);
}

/* Queue empty slot */
.queue-slot-empty-16x9 {
  width: 170px;
  height: 240px;
  border-radius: 12px;
  border: 2px dashed rgba(255,255,255,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a3a4a;
  font-size: 38px;
  flex-shrink: 0;
  background: rgba(12,14,20,0.3);
}

/* === HAND AREA === */
.hand-area-16x9 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  overflow: visible;
}

.hand-area-16x9::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* === ENERGY ORB === */
.hand-energy-16x9 {
  position: absolute;
  bottom: 45px;
  left: 290px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 10;
}

.energy-orb-16x9 {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #b090d8, #7040a8 30%, #553088 60%, #351868 100%);
  border: 3px solid #402070;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.3),
    inset 0 -3px 6px rgba(20, 8, 50, 0.5),
    0 2px 6px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 6px rgba(180, 140, 255, 0.6), -1px -1px 0 rgba(0,0,0,0.4), 1px -1px 0 rgba(0,0,0,0.4), -1px 1px 0 rgba(0,0,0,0.4), 1px 1px 0 rgba(0,0,0,0.4);
}

.energy-label-16x9 { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }

/* === CRAFT BUTTON === */
.hand-craft-16x9 {
  position: absolute;
  bottom: 40px;
  right: 240px;
  z-index: 10;
}

.craft-btn-wrapper-16x9 {
  filter: drop-shadow(0 4px 0px #5a3a10) drop-shadow(0 6px 0px #3a2008) drop-shadow(0 0 15px rgba(196, 138, 46, 0.5)) drop-shadow(0 0 30px rgba(196, 138, 46, 0.25));
  transition: filter 0.15s, transform 0.1s;
  cursor: pointer;
}

.craft-btn-wrapper-16x9:hover {
  filter: drop-shadow(0 5px 0px #5a3a10) drop-shadow(0 7px 0px #3a2008) drop-shadow(0 0 20px rgba(196, 138, 46, 0.7)) drop-shadow(0 0 40px rgba(196, 138, 46, 0.35));
  transform: translateY(-2px);
}

.craft-btn-wrapper-16x9:active {
  filter: drop-shadow(0 1px 0px #5a3a10) drop-shadow(0 0 12px rgba(196, 138, 46, 0.4));
  transform: translateY(3px);
}

.craft-btn-16x9 {
  color: #e6d5a8;
  border: none;
  width: 140px;
  height: 121px;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-shadow: 0 0 8px rgba(196, 138, 46, 0.4);
  position: relative;
  background: linear-gradient(180deg, #d4982e, #a07020 50%, #8a6020);
}

.craft-btn-16x9::before {
  content: "";
  position: absolute;
  inset: 3px;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: linear-gradient(180deg, rgba(20, 22, 32, 0.92), rgba(12, 14, 22, 0.98));
  z-index: 0;
}

.craft-btn-16x9 > * { position: relative; z-index: 1; }

.craft-btn-16x9:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.craft-cost-16x9 {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #c8a0f0;
}

.craft-cost-orb-16x9 {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c8a0f0, #8050c0 40%, #503090 80%);
  border: 1.5px solid #4a2080;
}

/* === DRAW / DISCARD PILES === */
.pile-16x9 {
  position: absolute;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

.pile-left-16x9 { left: 36px; }
.pile-right-16x9 { right: 36px; }

.pile-stack-16x9 { width: 70px; height: 96px; position: relative; }

.pile-card-16x9 {
  position: absolute;
  width: 70px;
  height: 96px;
  border-radius: 8px;
  border: 2px solid #2a2a3a;
  background: linear-gradient(145deg, #1e2030, #161822);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.pile-card-16x9:nth-child(1) { top: 0; left: 0; }
.pile-card-16x9:nth-child(2) { top: -3px; left: 2px; }
.pile-card-16x9:nth-child(3) { top: -6px; left: 4px; }

.pile-card-face-16x9 {
  width: 100%; height: 100%; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; color: #3a3a4a;
}

.pile-label-16x9 { font-size: 14px; font-weight: 700; color: #666; }
.pile-label-16x9 span { color: #ccc; }

/* === LOG === */
.craft-log-16x9,
.craft-log-16x9 .log-toggle-16x9,
.craft-log-16x9 .log-lines-16x9,
.craft-log-16x9 .log-line-16x9 {
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
}

.craft-log-16x9 {
  position: absolute;
  bottom: 233px;
  left: 62px;
  width: 376px;
  z-index: 5;
}

.craft-log-16x9 .log-toggle-16x9 {
  font-size: 12px;
  font-weight: 700;
  color: #555;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  user-select: none;
  transition: color 0.2s;
}

.craft-log-16x9 .log-toggle-16x9:hover { color: #888; }
.craft-log-16x9 .log-toggle-icon-16x9 { display: inline-block; transition: transform 0.2s; }

.craft-log-16x9 .log-lines-16x9 {
  max-height: 215px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
  direction: rtl;
}
.craft-log-16x9 .log-lines-16x9 > * {
  direction: ltr;
  margin-left: 6px;
}
.craft-log-16x9 .log-lines-16x9::-webkit-scrollbar { width: 4px; }
.craft-log-16x9 .log-lines-16x9::-webkit-scrollbar-track { background: transparent; }
.craft-log-16x9 .log-lines-16x9::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
.craft-log-16x9.collapsed .log-lines-16x9 { display: none; }
.craft-log-16x9.collapsed .log-toggle-icon-16x9 { transform: rotate(-90deg); }

.craft-log-16x9 .log-line-16x9 { font-size: 12px; color: #555; margin-bottom: 3px; }
.craft-log-16x9 .log-line-16x9.recent { color: #999; }
.craft-log-16x9 .log-line-16x9.error { color: #c85050; }
.craft-log-16x9 .log-line-16x9.error.recent { color: #e06060; }

/* === TOAST (positioned for 16:9) === */
.game-wrapper .toast-container-16x9 {
  position: absolute;
  bottom: 265px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  text-align: center;
}

/* === SETTINGS === */
.settings-gear-16x9 {
  font-size: 20px;
  color: #888;
  cursor: pointer !important;
  transition: color 0.15s, transform 0.15s;
  user-select: none;
  line-height: 1;
  pointer-events: auto !important;
  display: inline-block;
}
.settings-gear-16x9:hover { color: #ccc; transform: rotate(30deg); cursor: pointer !important; }

.settings-overlay-16x9 {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-panel-16x9 {
  background: linear-gradient(180deg, rgba(20,22,32,0.97), rgba(14,16,24,0.97));
  border: 2px solid #2a2c3a;
  border-radius: 12px;
  padding: 24px 32px;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04);
  pointer-events: auto;
}

.settings-title-16x9 {
  font-family: 'Cinzel', serif;
  color: #c48a2e;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.settings-row-16x9 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
  color: #aaa;
}

.settings-toggle-16x9 {
  background: rgba(196, 138, 46, 0.15);
  border: 1px solid #c48a2e;
  color: #c48a2e;
  padding: 4px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.settings-toggle-16x9:hover { background: rgba(196, 138, 46, 0.25); }

.settings-slider-16x9 {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 6px;
  background: rgba(196, 138, 46, 0.2);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.settings-slider-16x9::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c48a2e;
  border: 2px solid #a07030;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  cursor: pointer;
}
.settings-slider-16x9::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c48a2e;
  border: 2px solid #a07030;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  cursor: pointer;
}

.settings-speed-btns-16x9 {
  display: flex;
  gap: 4px;
}

.settings-seed-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-seed-value {
  font-family: "Consolas", "Menlo", monospace;
  font-size: 12px;
  color: #e0d8c8;
  background: rgba(0,0,0,0.35);
  border: 1px solid #2a2c3a;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  user-select: all;
}

.settings-seed-row.hidden { display: none; }

.settings-speed-btn-16x9 {
  background: rgba(40, 42, 56, 0.8);
  border: 1px solid #2a2c3a;
  color: #888;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.settings-speed-btn-16x9:hover { border-color: #444; color: #bbb; }
.settings-speed-btn-16x9.active {
  background: rgba(196, 138, 46, 0.15);
  border-color: #c48a2e;
  color: #c48a2e;
}

/* === WARNING TEXT === */
.game-wrapper .queue-warning-16x9 {
  position: absolute;
  bottom: 200px;
  right: 240px;
  z-index: 10;
  font-size: 13px;
  color: #c48a2e;
  text-align: center;
  max-width: 200px;
}

/* ============================================
   16:9 PLANNING SCREEN (1920x1080 fixed)
   ============================================ */

.planning-content-16x9 {
  position: absolute;
  top: 106px;
  left: 0; right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 0 60px;
}

/* Weapon section (~30%) */
.planning-weapon-section-16x9 {
  flex: 0 0 270px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 16px 60px;
}

.planning-weapon-image-16x9 {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 3px solid #3a3a48;
  background: radial-gradient(circle, #1e1e2a 0%, #13131b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 25px rgba(0,0,0,0.4), 0 0 30px rgba(0,0,0,0.3);
  overflow: hidden;
  flex-shrink: 0;
}

.planning-weapon-image-16x9 img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(196, 138, 46, 0.25));
}

.planning-weapon-details-16x9 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 520px;
}

.planning-weapon-name-16x9 {
  font-family: 'Cinzel', serif;
  color: #e6d5a8;
  font-size: 26px;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  margin-bottom: 6px;
}

.planning-weapon-desc-16x9 {
  color: #888;
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.planning-weapon-stats-16x9 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.planning-stat-badge-16x9 {
  background: linear-gradient(180deg, rgba(14,16,24,0.8), rgba(20,22,32,0.6));
  border: 1px solid #2e3040;
  border-top-color: #22242e;
  border-bottom-color: #383a48;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 16px;
  font-weight: 600;
  color: #e0d8c8;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.03);
  white-space: nowrap;
}

.planning-stat-badge-16x9.boosted { color: #5cdb5c; border-color: rgba(92, 219, 92, 0.2); }
.planning-stat-badge-16x9.reduced { color: #e86050; border-color: rgba(232, 96, 80, 0.2); }

/* Section divider */
.planning-divider-16x9 {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 40px;
  flex-shrink: 0;
}

.planning-divider-16x9::before,
.planning-divider-16x9::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,138,46,0.25), transparent);
}

.planning-divider-label-16x9 {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  color: #c48a2e;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(196, 138, 46, 0.3);
  white-space: nowrap;
}

/* Encounters section (~70%) */
.planning-encounters-16x9 {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 28px;
  padding: 20px 40px 36px;
  min-height: 0;
}

/* Encounter card */
.planning-enc-card-16x9 {
  width: 370px;
  background: linear-gradient(180deg, rgba(20,22,32,0.85), rgba(14,16,24,0.75));
  border: 2px solid #2a2c3a;
  border-radius: 14px;
  box-shadow:
    0 4px 20px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.04),
    inset 0 -1px 0 rgba(0,0,0,0.3);
  padding: 24px 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.planning-enc-card-16x9::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23t)' opacity='0.04'/%3E%3C/svg%3E");
  border-radius: 14px;
  pointer-events: none;
}

.planning-enc-card-16x9::after {
  content: "";
  position: absolute;
  top: 0; left: 10px; right: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,138,46,0.15), transparent);
  pointer-events: none;
}

.planning-enc-card-16x9 > * { position: relative; z-index: 1; }

.planning-enc-card-16x9.current {
  border-color: #c48a2e;
  box-shadow:
    0 4px 20px rgba(0,0,0,0.5),
    0 0 20px rgba(196, 138, 46, 0.2),
    0 0 40px rgba(196, 138, 46, 0.1),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.planning-enc-card-16x9.completed {
  opacity: 0.45;
  border-color: #222;
}

.planning-enc-card-16x9.boss.current {
  border-color: #c48a2e;
  box-shadow:
    0 4px 20px rgba(0,0,0,0.5),
    0 0 20px rgba(196, 138, 46, 0.2),
    0 0 40px rgba(196, 138, 46, 0.1),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Tab label */
.planning-enc-tab-16x9 {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #2a2c3a, #1e2030);
  border: 1px solid #3a3c4a;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 2px 18px 5px;
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  z-index: 3;
  white-space: nowrap;
}

.planning-enc-card-16x9.current .planning-enc-tab-16x9 {
  background: linear-gradient(180deg, #3a3020, #2a2418);
  border-color: #c48a2e;
  color: #c48a2e;
}

.planning-enc-card-16x9.boss .planning-enc-tab-16x9 {
  background: linear-gradient(180deg, #2a1a3a, #201430);
  border-color: #8050c0;
  color: #a855f7;
}

/* Portrait */
.planning-enc-portrait-16x9 {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid #3a3a48;
  background: radial-gradient(circle, #1e1e2a 0%, #13131b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.4);
  overflow: hidden;
  flex-shrink: 0;
  margin-top: 12px;
  margin-bottom: 12px;
}

.planning-enc-portrait-16x9 img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 50%;
}

.planning-enc-card-16x9.current .planning-enc-portrait-16x9 { border-color: #6a5a3a; }
.planning-enc-card-16x9.boss .planning-enc-portrait-16x9 { border-color: #5a3a6a; }

.planning-enc-name-16x9 {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  color: #e6d5a8;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  text-align: center;
  margin-bottom: 4px;
}

.planning-enc-desc-16x9 {
  font-size: 14px;
  color: #777;
  font-style: italic;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 12px;
  padding: 0 12px;
}

.planning-enc-mods-16x9 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-content: flex-start;
  margin-top: 4px;
}

.planning-enc-mod-tag-16x9 {
  font-size: 14px;
  padding: 7px 18px;
  border-radius: 6px;
  font-weight: 600;
}

.planning-enc-mod-tag-16x9.resist {
  background: rgba(74, 158, 255, 0.12);
  color: #4a9eff;
  border: 1px solid rgba(74, 158, 255, 0.25);
  box-shadow: 0 0 8px rgba(74, 158, 255, 0.1);
}

.planning-enc-mod-tag-16x9.boss-mod {
  background: rgba(168, 85, 247, 0.14);
  color: #b070f0;
  border: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.12);
  font-size: 15px;
  padding: 8px 20px;
}

.planning-enc-mod-tag-16x9.no-resist {
  background: rgba(255,255,255,0.03);
  color: #4a4a4a;
  border: 1px solid rgba(255,255,255,0.06);
  font-style: italic;
}

/* Top/bottom split for vertical alignment */
.planning-enc-top-16x9 {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.planning-enc-bottom-16x9 {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.planning-enc-hp-section-16x9 {
  width: 100%;
  padding: 0 12px;
  margin-bottom: 12px;
}

.planning-enc-hp-label-16x9 {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 700;
  color: #e6e6e6;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  text-align: center;
  margin-bottom: 8px;
}

.planning-enc-hp-bar-16x9 {
  width: 100%;
  height: 42px;
  background: #12141c;
  border-radius: 6px;
  border: 1px solid #2a2a3a;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,0.015) 5px, rgba(255,255,255,0.015) 10px);
}

.planning-enc-hp-bar-16x9::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent);
  border-radius: 5px 5px 0 0;
  pointer-events: none;
}

.planning-enc-hp-bar-16x9 .hp-fill-16x9 {
  height: 100%;
  border-radius: 5px;
  display: flex;
}

.hp-seg-16x9 { height: 100%; }
.hp-seg-16x9.fire { background: linear-gradient(180deg, #e86050, #c04030); box-shadow: 0 0 8px rgba(224, 80, 64, 0.3); }
.hp-seg-16x9.cold { background: linear-gradient(180deg, #5aafff, #3a8eee); box-shadow: 0 0 8px rgba(74, 158, 255, 0.3); }
.hp-seg-16x9.lightning { background: linear-gradient(180deg, #f5e070, #d4b840); box-shadow: 0 0 8px rgba(240, 208, 96, 0.3); }
.hp-seg-16x9.physical { background: linear-gradient(180deg, #d0d0d0, #a0a0a0); box-shadow: 0 0 8px rgba(192, 192, 192, 0.2); }

.planning-enc-reward-16x9 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 700;
  color: #ffd84d;
  margin-bottom: 8px;
  text-shadow: 0 0 6px rgba(255, 216, 77, 0.2);
}

.planning-enc-footer-16x9 {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.planning-go-btn-16x9 {
  background: linear-gradient(180deg, rgba(20,22,32,0.92), rgba(12,14,22,0.98));
  border: 2px solid #c48a2e;
  color: #e6d5a8;
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 800;
  padding: 14px 60px;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(196, 138, 46, 0.4);
  box-shadow: 0 0 12px rgba(196, 138, 46, 0.15), 0 4px 8px rgba(0,0,0,0.4);
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.planning-go-btn-16x9:hover {
  background: rgba(196, 138, 46, 0.12);
  box-shadow: 0 0 20px rgba(196, 138, 46, 0.3), 0 4px 8px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.planning-go-btn-16x9:active {
  transform: translateY(1px);
  box-shadow: 0 0 8px rgba(196, 138, 46, 0.2), 0 2px 4px rgba(0,0,0,0.4);
}

.planning-go-btn-16x9:disabled {
  border-color: #3a3a4a;
  color: #555;
  cursor: default;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  text-shadow: none;
}

.planning-go-btn-16x9:disabled:hover {
  background: linear-gradient(180deg, rgba(20,22,32,0.92), rgba(12,14,22,0.98));
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transform: none;
}

.planning-enc-complete-16x9 {
  font-size: 36px;
  color: #5cdb5c;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(92, 219, 92, 0.4);
}

/* ============================================
   16:9 SHOP SCREEN (1920x1080 fixed)
   ============================================ */

/* Shop uses its own bg image */
#shopPage16x9 {
  background-image: url("images/bg/shop.png");
}

#shopPage16x9::after {
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.3) 100%),
    rgba(0, 0, 0, 0.55);
}

/* --- LEFT PANEL: WIZ KITTY (mirrors enemy panel, 460px) --- */
.shop-kitty-panel-16x9 {
  position: absolute;
  top: 106px;
  right: 0;
  width: 460px;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.shop-kitty-inner-16x9 {
  margin: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(100% - 20px);
  flex: 1;
  min-height: 0;
}

.shop-kitty-frame-16x9 {
  width: 204px;
  height: 204px;
  border-radius: 50%;
  border: 3px solid #5a4a2a;
  background: radial-gradient(circle, #1e1e2a 0%, #13131b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.4), 0 0 20px rgba(196, 138, 46, 0.15);
  overflow: hidden;
}

.shop-kitty-frame-16x9 img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 50%;
}

.shop-kitty-frame-16x9.kitty-talking {
  animation: enemy-talk-wiggle 0.15s ease-in-out infinite alternate;
}

.shop-kitty-name-16x9 {
  font-family: 'Cinzel', serif;
  color: #e6d5a8;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.shop-kitty-dialogue-16x9 {
  width: 100%;
  max-width: 360px;
  margin-top: 12px;
  margin-bottom: 24px;
}

.shop-kitty-actions-16x9 {
  margin-top: auto;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 360px;
}

.shop-continue-btn-16x9 {
  background: linear-gradient(180deg, rgba(20,22,32,0.92), rgba(12,14,22,0.98));
  border: 2px solid #c48a2e;
  color: #e6d5a8;
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 800;
  padding: 14px 60px;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(196, 138, 46, 0.4);
  box-shadow: 0 0 12px rgba(196, 138, 46, 0.15), 0 4px 8px rgba(0,0,0,0.4);
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.shop-continue-btn-16x9:hover {
  background: linear-gradient(180deg, rgba(30,28,22,0.98), rgba(18,16,12,0.98));
  box-shadow: 0 0 20px rgba(196, 138, 46, 0.3), 0 4px 8px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.shop-continue-btn-16x9:active {
  transform: translateY(1px);
  box-shadow: 0 0 8px rgba(196, 138, 46, 0.2), 0 2px 4px rgba(0,0,0,0.4);
}

/* --- RIGHT PANEL: SHOP MAIN AREA --- */
.shop-main-16x9 {
  position: absolute;
  top: 106px;
  left: 0;
  right: 460px;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.shop-main-inner-16x9 {
  margin: 10px;
  padding: 60px 40px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.shop-section-header-16x9 {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  color: #c48a2e;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(196, 138, 46, 0.3);
  margin-bottom: 20px;
  text-align: center;
}

/* Cards section */
.shop-cards-section-16x9 {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
}

.shop-cards-row-16x9 {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 44px;
  flex-wrap: nowrap;
  width: 100%;
}

/* Shop card wrapper (card + price) */
.shop-card-wrap-16x9 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 33px;
  cursor: pointer;
  transition: transform 0.15s;
  position: relative;
  padding-top: 10px;
}

.shop-card-wrap-16x9 .queue-card-16x9 {
  flex: none;
  width: 170px;
  height: 240px;
  border: none;
  box-sizing: content-box;
}

.shop-card-wrap-16x9:hover { transform: translateY(-6px); z-index: 10; }

.shop-card-wrap-16x9.sold { opacity: 0.2; pointer-events: none; }

/* Price tag */
.shop-card-price-16x9 {
  font-size: 18px;
  font-weight: 700;
  color: #ffd84d;
  text-shadow: 0 0 6px rgba(255, 216, 77, 0.3);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Tooltip */
.shop-card-tooltip-16x9 {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  background: rgba(14, 16, 24, 0.97);
  border: 1px solid #c48a2e;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: #ccc;
  width: 220px;
  z-index: 100;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  pointer-events: none;
}

.shop-card-wrap-16x9:hover .shop-card-tooltip-16x9 { display: block; }

.shop-tooltip-modifier-16x9 {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #333;
  color: #d4a940;
}

/* Card hover glow in shop */
.shop-card-wrap-16x9:hover .queue-card-16x9.action .card-frame-16x9 {
  border-color: #c06050;
  box-shadow: inset 0 0 20px rgba(224, 80, 64, 0.15), 0 0 30px rgba(224, 80, 64, 0.25), 0 8px 20px rgba(0,0,0,0.4);
}
.shop-card-wrap-16x9:hover .queue-card-16x9.effect .card-frame-16x9 {
  border-color: #5090d0;
  box-shadow: inset 0 0 20px rgba(74, 158, 255, 0.15), 0 0 30px rgba(74, 158, 255, 0.25), 0 8px 20px rgba(0,0,0,0.4);
}

/* Relics section */
.shop-relics-section-16x9 {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  margin-top: 50px;
}

.shop-relics-row-16x9 {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
}

/* Relic wrapper (card + price below) */
.shop-relic-wrap-16x9 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  transition: transform 0.15s;
}

.shop-relic-wrap-16x9:hover { transform: translateY(-3px); }

.shop-relic-card-16x9 {
  width: 220px;
  flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(30,26,18,0.85), rgba(22,18,12,0.75));
  border: 2px solid #4a3a20;
  border-radius: 12px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.shop-relic-card-16x9::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='sr'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23sr)' opacity='0.04'/%3E%3C/svg%3E");
  border-radius: 12px;
  pointer-events: none;
}

.shop-relic-wrap-16x9:hover .shop-relic-card-16x9 {
  border-color: #c48a2e;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 16px rgba(196, 138, 46, 0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}

.shop-relic-wrap-16x9.sold { opacity: 0.2; pointer-events: none; }

.shop-relic-name-16x9 { font-family: 'Cinzel', serif; font-size: 15px; font-weight: 700; color: #e6d5a8; text-shadow: 0 1px 4px rgba(0,0,0,0.5); letter-spacing: 1px; position: relative; z-index: 1; }

.shop-relic-icon-16x9 { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; font-size: 48px; flex-shrink: 0; filter: drop-shadow(0 0 4px rgba(218, 168, 60, 0.5)); position: relative; z-index: 1; }
.shop-relic-icon-16x9 img { width: 100%; height: 100%; object-fit: contain; }

.shop-relic-desc-16x9 { font-size: 14px; color: #e0d8c8; line-height: 1.4; text-shadow: 0 1px 4px rgba(0,0,0,0.4); position: relative; z-index: 1; min-height: calc(14px * 1.4 * 3); display: flex; align-items: center; }

.shop-relic-price-16x9 { font-size: 18px; font-weight: 700; color: #ffd84d; text-shadow: 0 0 6px rgba(255, 216, 77, 0.3); }

.shop-relics-sold-out-16x9 { font-size: 20px; font-weight: 700; color: #555; text-align: center; padding: 30px 0; font-family: 'Cinzel', serif; letter-spacing: 2px; }

/* Remove a card section */
.shop-remove-section-16x9 {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  margin-top: 50px;
  max-width: 400px;
  align-self: center;
  width: 100%;
}

.shop-remove-btn-16x9 {
  background: linear-gradient(180deg, rgba(30,26,18,0.85), rgba(22,18,12,0.75));
  border: 2px solid #4a3a20;
  color: #e6d5a8;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 36px;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.shop-remove-btn-16x9:hover {
  border-color: #c48a2e;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 16px rgba(196, 138, 46, 0.2), inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateY(-3px);
}

.shop-remove-btn-16x9:active { transform: translateY(1px); }

.shop-remove-price-16x9 { color: #ffd84d; font-family: 'Segoe UI', sans-serif; font-size: 16px; font-weight: 700; }

/* ============================================
   16:9 TOWER SCREEN (1920x1080 fixed)
   ============================================ */

#towerPage16x9.game-wrapper {
  background: #08090e url("images/bg/tower.png") no-repeat center center !important;
  background-size: cover !important;
}

#towerPage16x9.game-wrapper::before {
  display: none !important;
}

#towerPage16x9.game-wrapper::after {
  background: rgba(0, 0, 0, 0.45) !important;
}

.tower-content-16x9 {
  position: absolute;
  top: 106px;
  left: 0; right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 60px 24px;
}

.tower-column-16x9 {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-height: 0;
  justify-content: center;
  width: 100%;
  position: relative;
}

.tower-column-16x9::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, rgba(196,138,46,0.06), rgba(42,44,58,0.3) 15%, rgba(42,44,58,0.3) 85%, rgba(42,44,58,0.06));
  transform: translateX(-50%);
  z-index: 0;
}

/* Floor row — holds node, handles stagger */
.tower-floor-row-16x9 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 680px;
  position: relative;
  z-index: 1;
}

.tower-floor-row-16x9.stagger-left { padding-right: 40px; }
.tower-floor-row-16x9.stagger-right { padding-left: 40px; }

/* Floor node */
.tower-node-16x9 {
  width: 460px;
  background: linear-gradient(180deg, rgba(18,20,28,0.92), rgba(12,14,20,0.88));
  border: 2px solid #2a2c3a;
  border-radius: 12px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
  cursor: default;
}

.tower-node-16x9::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23t)' opacity='0.04'/%3E%3C/svg%3E");
  border-radius: 12px;
  pointer-events: none;
}

.tower-node-16x9 > * { position: relative; z-index: 1; }

/* Floor number label */
.tower-node-floor-num-16x9 {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}

/* Weapon/treasure circle */
.tower-node-icon-16x9 {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, #1a1c26 0%, #10121a 100%);
  border: 2px solid #3a3a48;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.5), 0 0 12px rgba(0,0,0,0.3);
  overflow: hidden;
  flex-shrink: 0;
}

.tower-node-icon-16x9 img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(196, 138, 46, 0.25));
}

.tower-node-icon-16x9 img.chest-icon {
  width: 110%;
  height: 110%;
  object-fit: cover;
}

.tower-node-icon-16x9 .tower-icon-mystery {
  font-size: 22px;
  color: #3a3a48;
  font-weight: 700;
}

/* Floor name */
.tower-node-name-16x9 {
  flex: 1;
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  color: #c0b898;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Checkmark */
.tower-node-check-16x9 {
  font-size: 22px;
  color: #5cdb5c;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(92, 219, 92, 0.4);
  flex-shrink: 0;
}

/* Connector */
.tower-connector-16x9 {
  width: 2px;
  height: 14px;
  background: #1e2030;
  flex-shrink: 0;
  z-index: 1;
  position: relative;
}

.tower-connector-16x9.glow {
  width: 3px;
  background: linear-gradient(180deg, rgba(196, 138, 46, 0.5), rgba(196, 138, 46, 0.15));
  box-shadow: 0 0 8px rgba(196, 138, 46, 0.25);
}

.tower-connector-16x9.completed {
  background: linear-gradient(180deg, #252530, #1a1a24);
}

/* === TOWER FLOOR STATES === */

/* Completed — solid bg, dimmed text */
.tower-node-16x9.completed {
  border-color: #1a1c24;
}
.tower-node-16x9.completed .tower-node-floor-num-16x9 { color: #444; }
.tower-node-16x9.completed .tower-node-name-16x9 { color: #555; }
.tower-node-16x9.completed .tower-node-icon-16x9 { border-color: #2a2a34; opacity: 0.5; }

/* Current — hero node */
.tower-node-16x9.current {
  border-color: #c48a2e;
  cursor: pointer;
  box-shadow:
    0 0 30px rgba(196, 138, 46, 0.15),
    0 0 60px rgba(196, 138, 46, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.06);
  animation: towerNodePulse 2.5s ease-in-out infinite;
  transform: scale(1.04);
}

.tower-node-16x9.current .tower-node-floor-num-16x9 { color: #c48a2e; }

.tower-node-16x9.current .tower-node-name-16x9 {
  color: #f0d080;
  font-size: 20px;
}

.tower-node-16x9.current .tower-node-icon-16x9 {
  border-color: #c48a2e;
  width: 74px;
  height: 74px;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.5), 0 0 16px rgba(196, 138, 46, 0.2);
}

.tower-node-16x9.current:hover {
  border-color: #e0a13c;
  transform: scale(1.06);
  box-shadow:
    0 0 40px rgba(196, 138, 46, 0.25),
    0 0 70px rgba(196, 138, 46, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

@keyframes towerNodePulse {
  0%, 100% { box-shadow: 0 0 30px rgba(196, 138, 46, 0.12), 0 0 60px rgba(196, 138, 46, 0.06); }
  50% { box-shadow: 0 0 40px rgba(196, 138, 46, 0.22), 0 0 70px rgba(196, 138, 46, 0.1); }
}

/* Future — fully visible */
.tower-node-16x9.future {
  opacity: 1;
  border-color: #2a2c3a;
}
.tower-node-16x9.future .tower-node-name-16x9 { color: #c0b898; }
.tower-node-16x9.future .tower-node-icon-16x9 { border-color: #3a3a48; }

/* Treasure accent */
.tower-node-16x9.treasure .tower-node-icon-16x9 {
  background: radial-gradient(circle, #1e1a14 0%, #14120e 100%);
  border-color: #4a3a20;
}
.tower-node-16x9.treasure .tower-node-name-16x9 { color: #d4a940; }
.tower-node-16x9.treasure.current .tower-node-name-16x9 { color: #f0d080; }
.tower-node-16x9.treasure.current .tower-node-icon-16x9 {
  border-color: #c48a2e;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.5), 0 0 16px rgba(196, 138, 46, 0.25);
}
.tower-node-16x9.treasure.future .tower-node-name-16x9 { color: #d4a940; }
.tower-node-16x9.treasure.completed .tower-node-name-16x9 { color: #555; }

/* === SETTINGS: QUIT RUN === */
.settings-quit-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #2a2c3a;
  display: flex;
  justify-content: center;
}

.settings-quit-btn {
  background: rgba(200, 60, 60, 0.15);
  border: 1px solid #8b3a3a;
  color: #c06050;
  padding: 6px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
}
.settings-quit-btn:hover { background: rgba(200, 60, 60, 0.25); }

.settings-quit-confirm {
  background: rgba(200, 60, 60, 0.3);
  border-color: #c06050;
  color: #e87060;
}
.settings-quit-confirm:hover { background: rgba(200, 60, 60, 0.45); }

/* Bonus Cards Modal - 16:9 */
.bonus-modal-content-16x9 {
  width: 1920px;
  height: 1080px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
}
.bonus-modal-inner-16x9 {
  background: linear-gradient(180deg, #1a1520 0%, #0d0a12 100%);
  border: 2px solid #8b7340;
  border-radius: 12px;
  padding: 40px 60px;
  width: 700px;
  text-align: center;
  box-shadow: 0 0 40px rgba(139, 115, 64, 0.3);
}
.bonus-title-16x9 {
  font-family: 'Cinzel', serif;
  font-size: 32px;
  color: #d4a84b;
  margin: 0 0 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.bonus-subtitle-16x9 {
  font-family: 'Segoe UI', sans-serif;
  font-size: 16px;
  color: #9a8b6e;
  margin: 0 0 32px;
}
.bonus-cards-row-16x9 {
  display: flex;
  justify-content: center;
  gap: 68px;
}
.bonus-card-slot-16x9 {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.bonus-card-slot-16x9 .queue-card-16x9 {
  flex: none;
  width: 170px;
  height: 240px;
  border: none;
  box-sizing: content-box;
}
.bonus-modal-actions-16x9 {
  margin-top: 36px;
}
.bonus-cta-16x9 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  padding: 12px 48px;
  background: linear-gradient(180deg, #8b7340 0%, #5a4a28 100%);
  color: #f0e6d0;
  border: 2px solid #a08850;
  border-radius: 6px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: background 0.15s;
}
.bonus-cta-16x9:hover {
  background: linear-gradient(180deg, #a08850 0%, #6b5a30 100%);
}

/* === TREASURE MODAL (16:9 overlay on tower) === */
.treasure-modal-16x9 {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.treasure-modal-16x9.hidden { display: none; }

.treasure-modal-scaler {
  width: 1920px;
  height: 1080px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
}

.treasure-modal-inner-16x9 {
  background: linear-gradient(180deg, #1a1520 0%, #0d0a12 100%);
  border: 2px solid #8b7340;
  border-radius: 12px;
  padding: 48px 72px;
  width: 780px;
  text-align: center;
  box-shadow: 0 0 40px rgba(139, 115, 64, 0.3), 0 0 120px rgba(0, 0, 0, 0.6);
}

.treasure-title-16x9 {
  font-family: 'Cinzel', serif;
  font-size: 36px;
  color: #d4a84b;
  margin: 0 0 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.treasure-subtitle-16x9 {
  font-family: 'Segoe UI', sans-serif;
  font-size: 16px;
  color: #9a8b6e;
  margin: 0 0 36px;
}

/* Relic step */
.treasure-relic-display-16x9 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.treasure-relic-frame-16x9 {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid #8b7340;
  background: radial-gradient(circle, #1e1a14 0%, #14120e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  box-shadow: 0 0 20px rgba(196, 138, 46, 0.3), inset 0 0 15px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 0 8px rgba(218, 168, 60, 0.4));
}

.treasure-relic-frame-16x9 img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(218, 168, 60, 0.5));
}

.treasure-relic-name-16x9 {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 700;
  color: #ffd84d;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.treasure-relic-desc-16x9 {
  font-size: 16px;
  color: #ccc;
  max-width: 400px;
}

/* Card step */
.treasure-cards-row-16x9 {
  display: flex;
  justify-content: center;
  gap: 71px;
  margin-bottom: 28px;
  padding-top: 10px;
}

.treasure-card-slot-16x9 {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.treasure-card-slot-16x9 .queue-card-16x9 {
  flex: none;
  width: 170px;
  height: 240px;
  border: none;
  box-sizing: content-box;
  transition: transform 0.15s;
}

.treasure-card-slot-16x9 .queue-card-16x9:hover {
  transform: translateY(-8px) scale(1.05);
}

/* Buttons */
.treasure-actions-16x9 {
  margin-top: 24px;
}

.treasure-cta-16x9 {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  padding: 14px 56px;
  background: linear-gradient(180deg, #8b7340 0%, #5a4a28 100%);
  color: #f0e6d0;
  border: 2px solid #a08850;
  border-radius: 6px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: background 0.15s;
}

.treasure-cta-16x9:hover {
  background: linear-gradient(180deg, #a08850 0%, #6b5a30 100%);
}

.treasure-footer-16x9 {
  margin-top: 60px;
  text-align: right;
  padding-right: 40px;
}

.treasure-skip-link {
  color: #5a5040;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}

.treasure-skip-link:hover {
  color: #9a8b6e;
  text-decoration: underline;
}

/* === TITLE SCREEN === */
#titleScreen {
  background: url("images/bg/title.png") center/cover no-repeat;
}
#titleScreen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
}
.title-container {
  position: absolute;
  top: 130px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 2;
}
.title-main {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 72px;
  color: #f0e6d0;
  text-shadow:
    0 0 40px rgba(200, 160, 80, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.8),
    0 0 80px rgba(180, 140, 60, 0.2);
  letter-spacing: 3px;
  line-height: 1.1;
}
.title-sub {
  font-family: 'Cinzel', serif;
  font-weight: 400;
  font-size: 32px;
  color: #c0a870;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(180, 140, 60, 0.15);
  letter-spacing: 2px;
  margin-top: 8px;
}
.title-path-sections {
  position: absolute;
  bottom: 160px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 0 220px;
}
.title-path-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.title-path-btn {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 28px;
  padding: 16px 64px;
  border: 2px solid;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.2s;
  position: relative;
}
.title-path-btn-forest {
  background: linear-gradient(180deg, rgba(100, 60, 160, 0.8) 0%, rgba(60, 30, 100, 0.9) 100%);
  border-color: rgba(180, 140, 220, 0.75);
  color: #e0d0f0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  box-shadow:
    0 0 20px rgba(140, 100, 200, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.title-path-btn-forest:hover {
  background: linear-gradient(180deg, rgba(120, 80, 180, 0.9) 0%, rgba(80, 40, 120, 0.95) 100%);
  box-shadow:
    0 0 30px rgba(160, 120, 220, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.title-path-btn-tower {
  background: linear-gradient(180deg, rgba(160, 100, 30, 0.8) 0%, rgba(100, 60, 15, 0.9) 100%);
  border-color: rgba(220, 170, 80, 0.75);
  color: #f0e6d0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  box-shadow:
    0 0 20px rgba(200, 150, 50, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.title-path-btn-tower:hover {
  background: linear-gradient(180deg, rgba(180, 120, 40, 0.9) 0%, rgba(120, 80, 20, 0.95) 100%);
  box-shadow:
    0 0 30px rgba(220, 170, 60, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.title-path-label {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  color: #e0d8c8;
  text-align: center;
  white-space: nowrap;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.title-debug-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 3;
  font-family: 'Segoe UI', sans-serif;
  font-size: 13px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.15s;
}
.title-debug-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
}

/* === INTRO MODAL 16:9 OVERRIDES === */
.intro-modal-16x9 {
  background: #12141a;
  border: 2px solid #3a3a48;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(196, 138, 46, 0.08);
  width: min(960px, 95vw);
}

.intro-modal-16x9 .mods-modal-header {
  border-bottom: 1px solid #2a2a35;
  padding: 18px 24px;
}

.intro-modal-16x9 .mods-modal-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  color: #e6d5a8;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.intro-modal-16x9 .intro-progress {
  color: #666;
  font-size: 14px;
}

.intro-modal-16x9 .mods-modal-body {
  padding: 16px 24px 20px;
}

.intro-modal-16x9 .intro-lore-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 25px;
  line-height: 1.6;
  color: #e0d8c8;
}

.intro-modal-16x9 .intro-lore-image {
  border: 2px solid #3a3a48;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.intro-modal-16x9 .intro-lore-bottom {
  border-top: 1px solid #2a2a35;
}

.intro-modal-16x9 .intro-lore-goal {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  color: #c48a2e;
}

.intro-modal-16x9 .intro-lore-instructions {
  color: #b0a890;
  font-size: 15px;
  line-height: 1.7;
}

.intro-modal-16x9 .intro-deck-title {
  font-family: 'Cinzel', serif;
  color: #e6d5a8;
  margin-bottom: 16px;
}

.intro-modal-16x9 .intro-howto {
  padding: 24px 20px 32px;
  text-align: center;
}

.intro-modal-16x9 .intro-howto-goal {
  font-family: 'Cinzel', serif;
  font-size: 32px;
  font-weight: 700;
  color: #c48a2e;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 36px;
  letter-spacing: 0.5px;
}

.intro-modal-16x9 .intro-howto-bullets {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.intro-modal-16x9 .intro-howto-bullets li {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 26px;
  line-height: 1.4;
  color: #e0d8c8;
  text-align: left;
}

.intro-modal-16x9 .intro-howto-icon {
  flex: none;
  width: 48px;
  font-size: 36px;
  text-align: center;
}

.intro-modal-16x9 .intro-howto-text {
  flex: 1;
}

.intro-deck-grid-16x9 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 45px 40px;
  padding: 10px 20px;
}

.intro-deck-card-16x9 {
  flex: none;
}

.removal-card-16x9 {
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}
.removal-card-16x9:hover {
  transform: translateY(-8px) scale(1.05);
  filter: drop-shadow(0 0 12px rgba(200, 60, 60, 0.5));
}

.intro-modal-16x9 .modal-actions {
  border-top: 1px solid #2a2a35;
  padding: 14px 24px;
  justify-content: center;
}

.intro-modal-16x9 .modal-actions button {
  background: linear-gradient(180deg, #2a2a35, #1e1e28);
  border: 2px solid #c48a2e;
  color: #e6d5a8;
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  padding: 10px 36px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.intro-modal-16x9 .modal-actions button:hover {
  background: linear-gradient(180deg, #35353f, #28282e);
  border-color: #e0a13c;
  color: #f2e4c6;
}

.intro-modal-16x9 .modal-actions button.modal-cta {
  background: linear-gradient(180deg, #d4982e, #a07020 50%, #8a6020);
  border-color: #e0a13c;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.intro-modal-16x9 .modal-actions button.modal-cta:hover {
  background: linear-gradient(180deg, #e0a840, #b08030 50%, #987028);
}

/* ============================================
   WIN OVERLAY (16:9)
   ============================================ */

.win-overlay-16x9 {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}
.win-overlay-16x9.hidden { display: none; }

/* Hide dead UI on win */
.game-wrapper.win-active .pile-16x9,
.game-wrapper.win-active .hand-craft-16x9,
.game-wrapper.win-active .hand-energy-16x9,
.game-wrapper.win-active .hand-area-16x9 {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease-out;
}

/* Dim layers — two states: black (fireworks) and dim (settled) */
.win-dim-left-16x9,
.win-dim-bottom-right-16x9,
.win-dim-top-right-16x9 {
  opacity: 0;
  transition: opacity 0.5s ease-out, background 0.8s ease-out;
  pointer-events: none;
}

.win-dim-left-16x9 {
  position: absolute;
  top: 0; left: 0;
  width: 1460px;
  height: 100%;
  z-index: 51;
}
.win-dim-bottom-right-16x9 {
  position: absolute;
  bottom: 0; right: 0;
  width: 460px;
  height: 260px;
  z-index: 51;
}
.win-dim-top-right-16x9 {
  position: absolute;
  top: 0; right: 0;
  width: 460px;
  height: 56px;
  z-index: 51;
}

/* Step 1: Fade to full black */
.win-overlay-16x9.step-black .win-dim-left-16x9 {
  opacity: 1;
  background: rgba(0, 0, 0, 0.92);
  pointer-events: all;
}
.win-overlay-16x9.step-black .win-dim-bottom-right-16x9 {
  opacity: 1;
  background: rgba(0, 0, 0, 0.85);
}
.win-overlay-16x9.step-black .win-dim-top-right-16x9 {
  opacity: 1;
  background: rgba(0, 0, 0, 0.7);
}

/* Step 2: Settle back to dim */
.win-overlay-16x9.step-dim .win-dim-left-16x9 {
  opacity: 1;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: all;
}
.win-overlay-16x9.step-dim .win-dim-bottom-right-16x9 {
  opacity: 1;
  background: rgba(0, 0, 0, 0.45);
}
.win-overlay-16x9.step-dim .win-dim-top-right-16x9 {
  opacity: 1;
  background: rgba(0, 0, 0, 0.45);
}

/* Fireworks canvas (left+center only) */
.win-fireworks-canvas-16x9 {
  position: absolute;
  top: 0;
  left: 0;
  width: 1460px;
  height: 1080px;
  z-index: 53;
  pointer-events: none;
}

/* Continue/collect button */
.win-continue-btn-16x9 {
  position: absolute;
  bottom: 130px;
  right: 50px;
  width: 360px;
  z-index: 54;
  padding: 18px 0;
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #d4982e 0%, #a87420 50%, #8a6018 100%);
  border: 2px solid #e0a83c;
  border-radius: 8px;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  box-shadow: 0 4px 0px #5a3a10, 0 6px 0px #3a2008, 0 0 24px rgba(196,138,46,0.35);
  transition: all 0.15s;
  letter-spacing: 1px;
  pointer-events: all;
  text-align: center;
  /* Hidden until step-button */
  opacity: 0;
  transform: translateY(20px);
}
.win-overlay-16x9.step-button .win-continue-btn-16x9 {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.win-continue-btn-16x9:hover {
  background: linear-gradient(180deg, #e0a83c 0%, #b8822a 50%, #9a6c20 100%);
  border-color: #f0c050;
  box-shadow: 0 4px 0px #5a3a10, 0 6px 0px #3a2008, 0 0 36px rgba(196,138,46,0.5);
  transform: translateY(-1px);
}
.win-continue-btn-16x9:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0px #5a3a10, 0 0 20px rgba(196,138,46,0.3);
}
