@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Rajdhani:wght@400;500;600;700&display=swap");

:root {
  color: #eff8f2;
  background: #030706;
  font-family: "Rajdhani", "Avenir Next Condensed", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #eff8f2;
  --muted: #8ea39b;
  --dim: #53665f;
  --gold: #e8c872;
  --gold-strong: #ffe193;
  --teal: #5ec7b0;
  --red: #e5634d;
  --blue: #5bbcff;
  --panel: #0b1715;
  --panel-2: #10201d;
  --line: rgba(170, 207, 193, 0.18);
  /* Android lays out at logical CSS size, not AMOLED framebuffer resolution. */
  --thor-main-css-width: 960px;
  --thor-secondary-width-ratio: 64.583333%;
  --thor-top-bottom-overscan: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #030706;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(49, 83, 73, 0.19), transparent 31rem),
    repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 9px),
    #030706;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 2px solid var(--gold-strong);
  outline-offset: 2px;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  padding: 22px 24px 70px;
}

.app-header {
  width: min(var(--thor-main-css-width), 100%);
  margin: 0 auto 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.app-header div {
  display: grid;
}

.app-header span,
.app-header p {
  font-size: 11px;
  font-weight: 600;
  margin: 0;
}

.app-header strong {
  color: var(--ink);
  font-family: "Cinzel", Georgia, serif;
  font-size: 19px;
  letter-spacing: 0.05em;
}

.app-header p {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-header p i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
}

.device-frame {
  width: min(var(--thor-main-css-width), 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.surface-slot {
  width: 100%;
  display: contents;
}

.native-display-switch {
  display: none;
}

.screen-label {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 7px;
  color: #6e827b;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.screen-label small {
  font-size: 9px;
}

.screen-label.bottom-label {
  width: var(--thor-secondary-width-ratio);
  margin-top: 13px;
}

.display {
  position: relative;
  overflow: hidden;
  background: #07110f;
  border: 1px solid rgba(190, 216, 206, 0.18);
  box-shadow:
    0 0 0 5px #080d0c,
    0 0 0 6px rgba(152, 181, 171, 0.1),
    0 18px 60px rgba(0, 0, 0, 0.55);
}

.top-display {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}

.bottom-display {
  width: var(--thor-secondary-width-ratio);
  aspect-ratio: 31 / 27;
  container-name: lower-screen;
  container-type: inline-size;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 90% 0%, rgba(92, 176, 154, 0.08), transparent 40%),
    #081310;
}

.hinge {
  width: 100%;
  height: 30px;
  margin-top: 11px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #40504a;
  font-size: 8px;
  letter-spacing: 0.28em;
}

.hinge i {
  flex: 1;
  height: 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, #151d1b, #080d0c);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.hinge b {
  font-weight: 700;
}

/* Top display */

.top-display canvas {
  position: absolute !important;
  inset: 0;
}

.scene-loading {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, #17241f, #07110f 68%);
}

.top-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(1, 6, 5, 0.38), transparent 25%, transparent 70%, rgba(0, 3, 3, 0.6)),
    radial-gradient(ellipse at center, transparent 48%, rgba(0, 5, 4, 0.46) 100%);
}

.top-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.top-party {
  position: absolute;
  top: 4.3%;
  left: 2.3%;
  width: 19%;
  display: grid;
  gap: 5px;
  pointer-events: auto;
}

.top-party-member {
  position: relative;
  min-height: 42px;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 7px;
  padding: 4px 7px 7px 4px;
  overflow: hidden;
  border: 1px solid rgba(170, 204, 193, 0.17);
  border-left: 2px solid rgba(170, 204, 193, 0.32);
  border-radius: 3px;
  color: var(--ink);
  background: linear-gradient(90deg, rgba(5, 13, 11, 0.92), rgba(8, 17, 15, 0.68));
  backdrop-filter: blur(5px);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease;
}

.top-party-member:hover,
.top-party-member.is-selected {
  border-color: rgba(244, 211, 119, 0.65);
  transform: translateX(3px);
}

.portrait-dot {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  color: #07100e;
  font-family: "Cinzel", serif;
  font-weight: 700;
}

.top-party-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  line-height: 1;
}

.top-party-copy strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.top-party-copy small {
  color: #788c85;
  font-size: 8px;
  text-transform: uppercase;
}

.microbar {
  position: absolute;
  right: 7px;
  bottom: 4px;
  left: 41px;
  height: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.55);
}

.microbar.player-health-bar { bottom: 10px; }

.player-mana-bar {
  position: absolute;
  right: 7px;
  bottom: 4px;
  left: 41px;
  height: 4px;
  overflow: hidden;
  border-radius: 1px;
  background: #06131c;
}

.player-mana-bar > i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #326990, #73cfff);
  box-shadow: 0 0 5px rgba(91, 188, 255, 0.55);
  transition: width 160ms linear;
}

.microbar i {
  position: absolute;
  inset: 0 auto 0 0;
  background: #55b780;
}

.microbar b {
  position: absolute;
  inset: 0 0 0 auto;
  background: var(--blue);
  box-shadow: 0 0 6px var(--blue);
}

.top-effects {
  position: absolute;
  top: -3px;
  right: -3px;
  display: flex;
  gap: 2px;
}

.top-effects em {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.renew-pip { background: #5bd58e; color: #062012; }
.debuff-pip { background: #f05b41; color: white; box-shadow: 0 0 7px #d84b35; }
.barrier-pip { background: #f0ce61; color: #2e2508; box-shadow: 0 0 7px rgba(240, 206, 97, 0.75); }
.tank-aura-pip { background: #68bdf0; color: #062132; box-shadow: 0 0 7px rgba(104, 189, 240, 0.75); }
.knockdown-pip { background: #ffad4a; color: #241204; box-shadow: 0 0 7px #e37b2d; }

.boss-bar-wrap {
  position: absolute;
  top: 4.4%;
  left: 50%;
  width: 35%;
  transform: translateX(-50%);
}

.boss-bar-wrap.is-multi { top: 2.2%; width: 39%; display: grid; gap: 3px; }
.boss-bar-wrap.is-multi .boss-name strong { font-size: 10px; }
.boss-bar-wrap.is-multi .boss-name { font-size: 6px; }
.boss-bar-wrap.is-multi .boss-bar { height: 6px; margin-top: 2px; padding: 1px; }
.boss-bar-wrap.is-trio { top: 1.1%; width: 42%; gap: 2px; }
.boss-bar-wrap.is-trio .boss-name strong { font-size: 8px; }
.boss-bar-wrap.is-trio .boss-bar { height: 5px; margin-top: 1px; }

.boss-name {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px;
  color: #93a49f;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px #000;
}

.boss-name strong {
  color: #f4e8d9;
  font-family: "Cinzel", serif;
  font-size: 14px;
  letter-spacing: 0.07em;
}

.boss-name span:last-child { text-align: right; }

.boss-bar {
  height: 8px;
  margin-top: 5px;
  padding: 2px;
  border: 1px solid rgba(229, 116, 79, 0.44);
  background: rgba(10, 3, 2, 0.72);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.6);
}

.boss-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #873724, #e26645);
  box-shadow: 0 0 9px rgba(226, 94, 63, 0.6);
  transition: width 180ms linear;
}

.objective-chip {
  position: absolute;
  top: 4.4%;
  right: 2.3%;
  padding: 7px 10px 7px 12px;
  border-right: 2px solid var(--gold);
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(8, 16, 14, 0.55), rgba(6, 13, 11, 0.9));
  text-align: right;
  text-shadow: 0 1px 3px #000;
}

.objective-chip span,
.objective-chip strong {
  display: block;
  text-transform: uppercase;
}

.objective-chip span {
  color: var(--gold);
  font-size: 7px;
  letter-spacing: 0.18em;
}

.objective-chip strong {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.encounter-callout {
  position: absolute;
  right: 3%;
  bottom: 9%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 11px;
  border: 1px solid rgba(230, 191, 105, 0.3);
  border-radius: 2px;
  background: rgba(7, 14, 12, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.encounter-callout span { color: #b8c7c2; font-size: 8px; }
.encounter-callout strong { color: var(--gold-strong); font-size: 15px; }
.encounter-callout.is-urgent { border-color: var(--red); animation: warning-pulse 0.7s ease-in-out infinite alternate; }
.encounter-callout.is-urgent strong { color: #ff826b; }

.casting-bar {
  position: absolute;
  left: 50%;
  bottom: 8.5%;
  width: 25%;
  min-width: 190px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2px 10px;
  padding: 6px 9px 7px;
  border: 1px solid rgba(255, 224, 135, 0.62);
  border-radius: 3px;
  background: rgba(8, 15, 12, 0.9);
  box-shadow: 0 0 16px rgba(236, 196, 82, 0.14);
  transform: translateX(-50%);
  text-transform: uppercase;
}

.casting-bar > span { display: flex; align-items: baseline; gap: 7px; }
.casting-bar strong { color: #fff0b8; font-size: 11px; letter-spacing: 0.12em; }
.casting-bar small { color: #84968f; font-size: 7px; letter-spacing: 0.1em; }
.casting-bar > b { color: #ffe092; font-size: 11px; }
.casting-bar > i { grid-column: 1 / -1; height: 5px; overflow: hidden; background: #211d0d; }
.casting-bar > i em { display: block; height: 100%; background: linear-gradient(90deg, #b78b2f, #ffe48b); box-shadow: 0 0 7px #efc85b; }

.control-hint {
  position: absolute;
  bottom: 3.5%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 7px;
  transform: translateX(-50%);
  color: #8da19a;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px #000;
}

.control-hint b { color: #e5eee9; }
.control-hint i { width: 2px; height: 2px; border-radius: 50%; background: var(--gold); }

.phase-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(7, 18, 15, 0.22), rgba(3, 9, 8, 0.78));
  text-align: center;
  text-shadow: 0 2px 10px #000;
}

.phase-overlay::before,
.phase-overlay::after {
  content: "";
  width: 22%;
  height: 1px;
  margin: 12px 0;
  background: linear-gradient(90deg, transparent, rgba(231, 198, 111, 0.7), transparent);
}

.phase-sigil {
  color: var(--gold);
  font-size: 26px;
  filter: drop-shadow(0 0 10px rgba(232, 200, 114, 0.55));
}

.phase-overlay > span {
  color: var(--gold);
  font-size: clamp(8px, 1vw, 12px);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.phase-overlay h1 {
  margin: 5px 0 0;
  color: #f5efe4;
  font-family: "Cinzel", serif;
  font-size: clamp(26px, 4.2vw, 54px);
  font-weight: 600;
  letter-spacing: 0.07em;
}

.phase-overlay p {
  width: 45%;
  margin: 10px 0 0;
  color: #a9b9b3;
  font-size: clamp(10px, 1.25vw, 15px);
  line-height: 1.35;
}

.phase-overlay small {
  color: #758a82;
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.phase-victory { background: radial-gradient(circle at center, rgba(23, 71, 53, 0.42), rgba(3, 9, 8, 0.82)); }
.phase-intermission { background: radial-gradient(circle at center, rgba(94, 76, 26, 0.38), rgba(3, 9, 8, 0.84)); }
.phase-defeat { background: radial-gradient(circle at center, rgba(85, 31, 21, 0.45), rgba(6, 5, 4, 0.86)); }

.pause-overlay { position: absolute; z-index: 12; inset: 0; display: grid; place-items: center; background: rgba(2,8,7,0.76); backdrop-filter: blur(5px); pointer-events: auto; }
.pause-panel { width: min(370px, 62%); display: grid; justify-items: center; padding: 25px 30px 20px; border: 1px solid rgba(232,200,114,0.48); background: linear-gradient(145deg, rgba(12,29,24,0.97), rgba(4,11,9,0.98)); box-shadow: 0 18px 55px rgba(0,0,0,0.6), inset 0 0 30px rgba(232,200,114,0.035); text-align: center; }
.pause-panel > span { color: var(--gold); font-size: 7px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.pause-panel h1 { margin: 4px 0; font-family: "Cinzel", serif; font-size: clamp(26px, 4cqw, 38px); font-weight: 500; }
.pause-panel p { margin: 0 0 17px; color: #83978f; font-size: 10px; }
.pause-actions { width: 100%; display: grid; gap: 7px; }
.pause-actions button { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 8px 12px; border: 1px solid var(--gold); color: #172019; background: linear-gradient(110deg, #ffe499, #d1af54); font-family: "Cinzel", serif; font-size: 10px; text-align: left; }
.pause-actions button.secondary { border-color: rgba(197,218,209,0.25); color: #dce9e4; background: rgba(8,20,17,0.9); }
.pause-actions button.is-controller-focused { outline: 2px solid #fff1b6; outline-offset: 2px; }
.pause-actions small { font-family: Inter, sans-serif; font-size: 6px; letter-spacing: 0.08em; }
.pause-panel footer { display: flex; align-items: center; gap: 6px; margin-top: 14px; color: #72877f; font-size: 7px; text-transform: uppercase; }
.pause-panel footer b { color: #dce9e4; }
.pause-panel footer i { width: 2px; height: 2px; border-radius: 50%; background: var(--gold); }

.lower-pause-overlay { position: absolute; z-index: 10; inset: 11.5% 0 0; display: grid; place-content: center; justify-items: center; gap: 5px; background: rgba(3,10,8,0.86); backdrop-filter: blur(4px); text-align: center; }
.lower-pause-overlay span { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: 0.2em; }
.lower-pause-overlay strong { font-family: "Cinzel", serif; font-size: clamp(18px, 4cqw, 26px); }
.lower-pause-overlay small { color: #71867e; font-size: clamp(7px, 1.6cqw, 9px); }

/* Bottom display shell */

.lower-header {
  flex: 0 0 11.5%;
  min-height: 54px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0 3.2%;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 12, 10, 0.74);
}

.lower-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 8px;
  min-width: 170px;
}

.lower-brand > span {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(228, 199, 114, 0.48);
  color: var(--gold);
  font-family: "Cinzel", serif;
  font-size: 11px;
  transform: rotate(45deg);
}

.lower-brand > span::first-letter { transform: rotate(-45deg); }

.lower-brand strong {
  align-self: end;
  color: #ecf2ee;
  font-family: "Cinzel", serif;
  font-size: clamp(10px, 2.25cqw, 14px);
  letter-spacing: 0.04em;
}

.lower-brand small {
  align-self: start;
  color: #61766e;
  font-size: clamp(7px, 1.55cqw, 9px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lower-header nav {
  display: flex;
  align-items: stretch;
}

.lower-header nav button {
  position: relative;
  min-width: 66px;
  display: grid;
  grid-template-columns: auto auto;
  place-content: center;
  gap: 5px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #6f847c;
  background: transparent;
  text-transform: uppercase;
  cursor: pointer;
}

.lower-header nav button:hover { color: #cbd8d3; background: rgba(255,255,255,0.025); }
.lower-header nav button.is-active { color: var(--gold-strong); border-bottom-color: var(--gold); background: linear-gradient(180deg, transparent, rgba(222, 191, 105, 0.07)); }
.lower-header nav button i { font-size: 14px; font-style: normal; }
.lower-header nav button span { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; }
.lower-header nav button small { position: absolute; top: 7px; right: 7px; color: #43564f; font-size: 7px; }

.lower-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Combat */

.combat-panel {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 2.5%;
  padding: 2.6%;
}

.section-label {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-label small { color: #536860; font-size: 7px; letter-spacing: 0.08em; }

.party-list {
  min-width: 0;
  display: grid;
  grid-template-rows: 22px repeat(5, 1fr);
  gap: 1.5%;
}

.party-frame {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 42px 1fr 34px;
  align-items: center;
  gap: 8px;
  padding: 4px 7px 4px 5px;
  overflow: hidden;
  border: 1px solid rgba(133, 167, 155, 0.15);
  border-left: 3px solid transparent;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(17, 34, 30, 0.92), rgba(10, 23, 20, 0.8));
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.party-frame:hover { border-color: rgba(232, 200, 114, 0.35); }
.party-frame.is-selected { border-color: rgba(232, 200, 114, 0.66); border-left-color: var(--gold); background: linear-gradient(90deg, rgba(65, 57, 29, 0.42), rgba(12, 26, 22, 0.9)); transform: translateX(2px); }
.party-frame.is-down { filter: grayscale(0.9); opacity: 0.48; }

.party-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--member-color), white 22%);
  border-radius: 3px;
  color: #07100e;
  background: linear-gradient(145deg, color-mix(in srgb, var(--member-color), white 18%), color-mix(in srgb, var(--member-color), black 18%));
  box-shadow: inset 0 0 12px rgba(255,255,255,0.14);
  font-family: "Cinzel", serif;
  font-size: 16px;
  font-weight: 700;
}

.party-data {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.party-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
}

.party-name strong { overflow: hidden; font-size: clamp(10px, 2.25cqw, 13px); letter-spacing: 0.04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.party-name em { color: #84978f; font-size: clamp(7px, 1.55cqw, 9px); font-style: normal; white-space: nowrap; }
.party-data > small { color: #5e736a; font-size: clamp(7px, 1.4cqw, 9px); letter-spacing: 0.08em; text-transform: uppercase; }

.health-bar {
  position: relative;
  height: 11px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 1px;
  background: #04100d;
}

.health-bar > i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #327b56, #5bc286);
  transition: width 160ms linear;
}

.health-bar > i.is-low { background: linear-gradient(90deg, #8d392d, #e45b45); animation: warning-pulse 0.7s infinite alternate; }
.health-bar > b { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, #3a8dd0, #73caff); box-shadow: 0 0 7px #51b8ff; transition: left 150ms linear, width 150ms linear; }

.effect-stack {
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(2, 15px);
  place-content: center end;
  gap: 2px;
}

.effect {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.shield-effect { border: 1px solid #63bfff; color: #9edbff; background: #153d58; }
.renew-effect { border: 1px solid #59c888; color: #b5f1cd; background: #163e29; }
.barrier-effect { border: 1px solid #ebca60; color: #fff1a8; background: #554715; box-shadow: 0 0 7px rgba(235, 202, 96, 0.55); }
.tank-aura-effect { border: 1px solid #66bdf2; color: #cceeff; background: #174764; box-shadow: 0 0 7px rgba(102, 189, 242, 0.55); }
.debuff-effect { border: 1px solid #ff795e; color: white; background: #9a3528; box-shadow: 0 0 8px rgba(229, 80, 54, 0.66); animation: warning-pulse 0.6s infinite alternate; }
.knock-effect { border: 1px solid #ffb45e; color: #2a1504; background: #ef8d35; box-shadow: 0 0 8px rgba(239, 141, 53, 0.66); font-size: 7px; }

.ability-column {
  min-width: 0;
  display: grid;
  grid-template-rows: 40px 1fr 48px;
  gap: 2%;
}

.ability-meta {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(15, 31, 27, 0.66);
}

.target-chip,
.mana-wrap {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.target-chip span,
.mana-wrap span { color: #63786f; font-size: 7px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.target-chip strong { overflow: hidden; color: var(--gold-strong); font-size: 11px; letter-spacing: 0.07em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.mana-wrap b { color: #7ecfff; font-size: 11px; }
.mana-wrap > i { position: relative; flex: 1; height: 4px; overflow: hidden; background: #07121b; }
.mana-wrap > i em { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #326990, #67bcf2); }

.ability-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 4%;
}

.ability {
  --ability-color: #ddd;
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 37px 1fr;
  align-items: center;
  gap: 7px;
  padding: 6px 6px 6px 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ability-color), transparent 64%);
  border-bottom: 2px solid color-mix(in srgb, var(--ability-color), transparent 22%);
  border-radius: 5px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--ability-color), #0d1b18 90%), #091411);
  text-align: left;
  cursor: pointer;
  transition: filter 100ms ease, transform 100ms ease, border-color 100ms ease;
}

.ability::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 14% 40%, color-mix(in srgb, var(--ability-color), transparent 76%), transparent 35%);
}

.ability:hover:not(:disabled) { border-color: var(--ability-color); filter: brightness(1.18); transform: translateY(-1px); }
.ability:active:not(:disabled) { transform: translateY(1px); }
.ability:disabled:not(.on-cooldown) { cursor: not-allowed; filter: saturate(0.35) brightness(0.7); }

.ability-key,
.ability-pad {
  position: absolute;
  z-index: 3;
  color: #6c8078;
  font-size: 7px;
  font-weight: 700;
}

.ability-key { top: 4px; left: 5px; }
.ability-pad { right: 5px; bottom: 3px; }

.ability-icon {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ability-color), transparent 38%);
  border-radius: 50%;
  color: var(--ability-color);
  background: rgba(3, 11, 9, 0.62);
  font-family: "Cinzel", serif;
  font-size: 19px;
  text-shadow: 0 0 8px color-mix(in srgb, var(--ability-color), transparent 30%);
}

.ability-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
}

.ability-copy strong { overflow: hidden; font-size: clamp(10px, 2.32cqw, 13px); letter-spacing: 0.05em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.ability-copy small { color: #70837c; font-size: clamp(7px, 1.4cqw, 9px); text-transform: uppercase; }

.cooldown-mask {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  background: conic-gradient(from 0deg, rgba(1, 5, 4, 0.9) calc(var(--cooldown-progress) * 100%), rgba(1, 5, 4, 0.46) 0);
  backdrop-filter: grayscale(0.65);
}

.cooldown-mask b {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid rgba(255,255,255,0.19);
  border-radius: 50%;
  color: white;
  background: rgba(3, 8, 7, 0.72);
  font-size: 16px;
}

.cooldown-mask.global-cooldown {
  background: conic-gradient(from 0deg, rgba(42, 34, 12, 0.93) calc(var(--cooldown-progress) * 100%), rgba(7, 13, 11, 0.58) 0);
}

.cooldown-mask.global-cooldown b { border-color: rgba(255, 225, 147, 0.5); color: var(--gold-strong); }

.incoming-strip {
  position: relative;
  display: grid;
  grid-template-columns: 31px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  overflow: hidden;
  border: 1px solid rgba(226, 116, 77, 0.24);
  border-radius: 4px;
  background: rgba(40, 19, 14, 0.48);
}

.incoming-strip > i { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: rgba(0,0,0,0.5); }
.incoming-strip > i em { display: block; height: 100%; background: #df704e; transition: width 100ms linear; }
.incoming-icon { color: #e67c55; font-size: 23px; }
.incoming-strip > span:nth-child(2) { display: grid; }
.incoming-strip small { color: #87695f; font-size: 7px; letter-spacing: 0.13em; text-transform: uppercase; }
.incoming-strip strong { font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; }
.incoming-strip > b { color: #f4b08e; font-size: 15px; }
.incoming-strip.is-urgent { border-color: #f05b41; background: rgba(91, 29, 20, 0.55); animation: warning-pulse 0.6s infinite alternate; }

/* Briefing and result */

.briefing-panel {
  height: 100%;
  display: grid;
  grid-template-columns: 0.76fr 1.24fr;
  gap: 5%;
  padding: 5.5% 5%;
}

.briefing-class {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
}

.class-crest {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border: 1px solid rgba(232, 200, 114, 0.5);
  color: var(--gold);
  background: radial-gradient(circle, rgba(232, 200, 114, 0.13), transparent 68%);
  font-size: 28px;
  transform: rotate(45deg);
}

.briefing-class > span { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.briefing-class h2 { margin: 4px 0 8px; font-family: "Cinzel", serif; font-size: clamp(21px, 4.95cqw, 30px); font-weight: 600; }
.briefing-class p { margin: 0; color: #879b93; font-size: clamp(9px, 2.01cqw, 12px); line-height: 1.35; }

.start-button {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(232, 200, 114, 0.62);
  border-radius: 3px;
  color: #1a180e;
  background: linear-gradient(135deg, #d9b85d, #f1d989);
  box-shadow: 0 5px 20px rgba(219, 185, 89, 0.13);
  cursor: pointer;
}

.start-button:hover { filter: brightness(1.1); }
.start-button span { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.start-button small { color: rgba(26, 24, 14, 0.62); font-size: 7px; font-weight: 700; }

.briefing-kit {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.kit-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 4%;
}

.kit-skill {
  --ability-color: #ddd;
  min-width: 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--ability-color), transparent 72%);
  border-left: 2px solid var(--ability-color);
  border-radius: 3px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ability-color), #0a1512 90%), rgba(9, 19, 16, 0.65));
}

.kit-skill > b { color: var(--ability-color); font-family: "Cinzel", serif; font-size: 23px; text-align: center; }
.kit-skill > span { min-width: 0; display: grid; gap: 3px; }
.kit-skill strong { font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; }
.kit-skill small { display: -webkit-box; overflow: hidden; color: #71867e; font-size: 9px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.end-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6%;
  background: radial-gradient(circle at 50% 15%, rgba(70, 142, 112, 0.16), transparent 52%);
  text-align: center;
}

.end-defeat { background: radial-gradient(circle at 50% 15%, rgba(151, 66, 45, 0.18), transparent 52%); }
.end-mark { width: 55px; height: 55px; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold); font-size: 25px; transform: rotate(45deg); }
.end-defeat .end-mark { border-color: var(--red); color: var(--red); }
.end-panel > small { margin-top: 17px; color: var(--gold); font-size: 8px; letter-spacing: 0.19em; }
.end-panel h2 { margin: 5px 0 16px; font-family: "Cinzel", serif; font-size: clamp(20px, 4.8cqw, 29px); font-weight: 500; }
.result-stats { width: 80%; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-stats span { display: grid; gap: 3px; padding: 12px 7px; border-right: 1px solid var(--line); }
.result-stats span:last-child { border-right: 0; }
.result-stats small { color: #6d8179; font-size: 7px; letter-spacing: 0.1em; text-transform: uppercase; }
.result-stats strong { font-size: 16px; }
.end-actions { display: flex; gap: 9px; margin-top: 18px; }
.end-actions button { padding: 9px 18px; border: 1px solid var(--gold); color: #13170f; background: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.end-actions button.secondary { color: #9eafa8; background: transparent; border-color: #43564f; }
.end-actions button.is-controller-focused { outline: 2px solid #fff1b6; outline-offset: 2px; }

.buff-draft {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 3.5%;
  padding: 3.7% 4.5% 2.8%;
  background: radial-gradient(circle at 50% 0%, rgba(232, 200, 114, 0.14), transparent 48%);
}

.top-buff-draft {
  position: absolute;
  z-index: 11;
  inset: 0;
  height: auto;
  padding: 4.5% 8% 3.5%;
  background: radial-gradient(circle at 50% 0%, rgba(232, 200, 114, 0.2), rgba(3, 9, 8, 0.96) 58%);
  pointer-events: auto;
}

.top-buff-draft .buff-choice-grid { gap: 3%; }
.top-buff-draft .buff-choice-grid button { padding: 14px; }

.intermission-status {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8%;
  background: radial-gradient(circle at 50% 12%, rgba(232, 200, 114, 0.13), transparent 52%);
  text-align: center;
}

.intermission-status > i { color: var(--gold); font-family: "Cinzel", serif; font-size: 34px; font-style: normal; }
.intermission-status > span { margin-top: 12px; color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.intermission-status h2 { margin: 4px 0; font-family: "Cinzel", serif; font-size: clamp(18px, 4.2cqw, 26px); font-weight: 500; }
.intermission-status p { max-width: 310px; margin: 0; color: #81958d; font-size: clamp(8px, 1.7cqw, 10px); }
.intermission-status small { margin-top: 16px; color: #dce8e3; font-size: 7px; letter-spacing: 0.08em; text-transform: uppercase; }

.buff-draft > header { text-align: center; }
.buff-draft > header > span { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.buff-draft > header h2 { margin: 2px 0; font-family: "Cinzel", serif; font-size: clamp(18px, 4.2cqw, 26px); font-weight: 500; }
.buff-draft > header p { margin: 0; color: #81958d; font-size: clamp(8px, 1.7cqw, 10px); }
.buff-choice-grid { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5%; }
.buff-choice-grid.choice-count-1 { grid-template-columns: minmax(0, 360px); justify-content: center; }
.buff-choice-grid.choice-count-2 { width: min(640px, 100%); grid-template-columns: repeat(2, minmax(0, 1fr)); justify-self: center; }
.buff-choice-grid button {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 7px 8px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--buff-accent), transparent 62%);
  border-top: 3px solid var(--buff-accent);
  color: #dce8e3;
  background: linear-gradient(155deg, color-mix(in srgb, var(--buff-accent), #081310 91%), rgba(5, 13, 11, 0.94));
  text-align: left;
}
.buff-choice-grid button.is-controller-focused { outline: 2px solid var(--gold-strong); outline-offset: 2px; transform: translateY(-2px); }
.buff-draft.is-input-locked .buff-choice-grid button { cursor: default; filter: saturate(0.55) brightness(0.78); }
.buff-draft.is-input-locked .buff-choice-grid button.is-controller-focused { outline-color: #60726b; transform: none; }
.buff-choice-grid button > i { grid-row: 1 / 3; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--buff-accent); color: var(--buff-accent); font-family: "Cinzel", serif; font-size: 16px; font-style: normal; }
.buff-choice-grid button > span { min-width: 0; display: grid; }
.buff-choice-grid button small { color: var(--buff-accent); font-size: 6px; letter-spacing: 0.1em; text-transform: uppercase; }
.buff-choice-grid button strong { overflow: hidden; font-family: "Cinzel", serif; font-size: clamp(9px, 2cqw, 12px); text-overflow: ellipsis; white-space: nowrap; }
.buff-choice-grid button > b { grid-column: 1 / -1; color: #edf5f1; font-size: clamp(8px, 1.7cqw, 10px); }
.buff-choice-grid button > p { grid-column: 1 / -1; margin: 0; color: #71867e; font-size: clamp(7px, 1.45cqw, 9px); line-height: 1.25; }
.buff-choice-grid .buff-mastery-continue { grid-column: 1 / -1; width: min(420px, 100%); justify-self: center; align-self: center; }
.buff-draft > footer { display: flex; align-items: center; justify-content: center; gap: 7px; color: #6e827a; font-size: 7px; letter-spacing: 0.08em; text-transform: uppercase; }
.buff-draft > footer b { color: #dce8e3; }
.buff-draft > footer i { width: 2px; height: 2px; border-radius: 50%; background: var(--gold); }

/* Map */

.map-panel {
  height: 100%;
  display: grid;
  grid-template-columns: 0.64fr 1.36fr;
  gap: 6%;
  padding: 5%;
  background: radial-gradient(circle at 75% 45%, rgba(61, 115, 99, 0.11), transparent 45%);
}

.map-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.map-copy > span { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.map-copy h2 { margin: 5px 0 9px; font-family: "Cinzel", serif; font-size: clamp(18px, 4.34cqw, 27px); font-weight: 500; line-height: 1.1; }
.map-copy p { margin: 0; color: #7d928a; font-size: clamp(9px, 1.94cqw, 12px); line-height: 1.4; }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 20px; color: #71877e; font-size: 8px; text-transform: uppercase; }
.map-legend i { width: 7px; height: 7px; border-radius: 50%; }
.legend-party { background: var(--gold); }
.legend-boss { background: var(--red); }
.legend-exit { border: 1px solid var(--teal); }

.map-canvas {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: linear-gradient(rgba(80, 122, 108, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(80, 122, 108, 0.03) 1px, transparent 1px), rgba(4, 12, 10, 0.56);
  background-size: 20px 20px;
}

.map-canvas svg { width: auto; height: 94%; }
.map-room { stroke: #36554a; stroke-width: 2; }
.map-ring { fill: none; stroke: #2b493f; stroke-width: 1; stroke-dasharray: 3 4; }
.map-glyph { fill: none; stroke: #755f34; stroke-width: 1; opacity: 0.7; }
.map-pillar { fill: #315247; stroke: #66877a; stroke-width: 1; }
.map-boss { fill: #8c3929; stroke: #ff8a63; stroke-width: 2; filter: drop-shadow(0 0 5px #b74731); }
.map-boss-arrow { fill: #ff9f74; }
.map-player-pulse { fill: rgba(237, 205, 116, 0.14); stroke: #e8c872; stroke-width: 1; animation: map-pulse 1.2s infinite; transform-box: fill-box; transform-origin: center; }
.map-barrier { fill: rgba(237, 201, 83, 0.18); stroke: #f4d96f; stroke-width: 1.5; stroke-dasharray: 3 2; }
.map-player { fill: #f4d67e; stroke: #fff1bd; stroke-width: 2; filter: drop-shadow(0 0 4px #d8b74f); }
.map-ally { fill: #7bcdb6; stroke: #d1fff2; stroke-width: 1; filter: drop-shadow(0 0 3px #4aa98e); transition: cx 100ms linear, cy 100ms linear; }
.map-ally-brann { fill: #70b8e8; stroke: #d8f1ff; }
.map-entry { fill: none; stroke: #62c2aa; stroke-width: 2; }
.map-state { position: absolute; top: 8px; right: 9px; color: #4f685f; font-size: 7px; letter-spacing: 0.12em; }

/* Inventory */

.pack-panel {
  height: 100%;
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 4%;
  padding: 4%;
}

.item-list {
  min-width: 0;
  display: grid;
  grid-template-rows: 24px repeat(4, 1fr);
  gap: 2.2%;
}

.item-list button {
  min-width: 0;
  display: grid;
  grid-template-columns: 35px 1fr 18px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(134, 165, 154, 0.16);
  border-left: 2px solid transparent;
  border-radius: 3px;
  background: rgba(13, 27, 23, 0.75);
  text-align: left;
  cursor: pointer;
}

.item-list button:hover,
.item-list button.is-selected { border-color: rgba(229, 197, 111, 0.5); border-left-color: var(--gold); background: linear-gradient(90deg, rgba(62, 52, 27, 0.35), rgba(12, 25, 21, 0.8)); }
.item-list button > b { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #4e675d; color: #cfc093; background: #0b1815; font-family: "Cinzel", serif; font-size: 17px; }
.item-list button > span { min-width: 0; display: grid; }
.item-list button strong { overflow: hidden; font-size: clamp(9px, 2.01cqw, 12px); letter-spacing: 0.04em; text-overflow: ellipsis; white-space: nowrap; }
.item-list button small { overflow: hidden; color: #647970; font-size: clamp(7px, 1.4cqw, 9px); text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.item-list button > i { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #4a5d56; border-radius: 50%; color: #87998f; font-size: 8px; font-style: normal; }

.item-tooltip {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 6%;
  overflow: hidden;
  border: 1px solid #4c6159;
  border-top: 2px solid #8c9c96;
  background: radial-gradient(circle at 85% 0%, rgba(110, 143, 130, 0.13), transparent 35%), linear-gradient(145deg, rgba(17, 34, 29, 0.98), rgba(7, 17, 14, 0.98));
  box-shadow: 0 9px 25px rgba(0,0,0,0.25);
}

.item-tooltip.rarity-rare { border-top-color: #6d99df; }
.item-tooltip.rarity-uncommon { border-top-color: #63ba80; }
.tooltip-label { color: #60756c; font-size: 7px; letter-spacing: 0.14em; text-transform: uppercase; }
.tooltip-title { display: grid; grid-template-columns: 50px 1fr; align-items: center; gap: 12px; margin-top: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tooltip-title > b { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid #637b71; color: var(--gold); background: rgba(2,9,7,0.55); font-family: "Cinzel", serif; font-size: 25px; }
.tooltip-title h2 { margin: 0; font-family: "Cinzel", serif; font-size: clamp(15px, 3.4cqw, 21px); font-weight: 500; line-height: 1.1; }
.tooltip-title small { color: #7396ce; font-size: 8px; text-transform: uppercase; }
.rarity-uncommon .tooltip-title small { color: #68be83; }
.rarity-common .tooltip-title small { color: #aeb9b4; }
.tooltip-stats { display: grid; gap: 3px; margin-top: 12px; }
.tooltip-stats strong { color: #69c78d; font-size: clamp(9px, 2.01cqw, 12px); font-weight: 600; }
.item-tooltip p { color: #a8b8b2; font-size: clamp(9px, 1.94cqw, 12px); line-height: 1.4; }
.item-tooltip footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.item-tooltip footer span { color: var(--gold); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.item-tooltip footer button { padding: 6px 12px; border: 1px solid var(--gold); color: #17180f; background: var(--gold); font-size: 9px; font-weight: 700; text-transform: uppercase; cursor: pointer; }
.item-tooltip footer small { color: #52675f; font-size: 7px; text-transform: uppercase; }

@keyframes warning-pulse {
  from { filter: brightness(0.9); }
  to { filter: brightness(1.35); }
}

@keyframes map-pulse {
  from { transform: scale(0.6); opacity: 1; }
  to { transform: scale(1.5); opacity: 0; }
}

@media (max-width: 760px) {
  .app-shell { padding: 10px 7px 45px; }
  .app-header { padding: 0 4px; }
  .app-header p { display: none; }
  .screen-label span { font-size: 8px; }
  .screen-label small { display: none; }
  .display { box-shadow: 0 0 0 3px #080d0c, 0 0 0 4px rgba(152, 181, 171, 0.1), 0 12px 35px rgba(0,0,0,0.55); }
  .top-party { width: 25%; gap: 2px; }
  .top-party-member { min-height: 29px; grid-template-columns: 19px 1fr; gap: 4px; padding: 2px 4px 4px 2px; }
  .portrait-dot { width: 18px; height: 18px; font-size: 8px; }
  .top-party-copy strong { font-size: 7px; }
  .top-party-copy small, .top-effects { display: none; }
  .microbar { left: 25px; right: 4px; bottom: 3px; height: 4px; }
  .microbar.player-health-bar { bottom: 8px; }
  .player-mana-bar { right: 4px; bottom: 3px; left: 25px; height: 3px; }
  .boss-name span { display: none; }
  .boss-name { display: block; text-align: center; }
  .boss-name strong { font-size: 8px; }
  .boss-bar { height: 5px; margin-top: 2px; padding: 1px; }
  .objective-chip { padding: 3px 5px; }
  .objective-chip span { font-size: 5px; }
  .objective-chip strong { font-size: 6px; }
  .encounter-callout { bottom: 8%; padding: 3px 5px; }
  .encounter-callout span { font-size: 5px; }
  .encounter-callout strong { font-size: 8px; }
  .casting-bar { bottom: 7.5%; min-width: 120px; padding: 3px 5px 4px; }
  .casting-bar strong, .casting-bar > b { font-size: 7px; }
  .casting-bar small { display: none; }
  .casting-bar > i { height: 3px; }
  .control-hint { display: none; }
  .phase-overlay p { width: 63%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Capacitor single-display fallback. Thor dual-display routing will replace this
   switcher once both Android display contexts share one authoritative game state. */
.native-platform,
.native-platform body,
.native-platform #root,
.native-platform .app-shell,
.native-platform .device-frame {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.native-platform .app-shell {
  padding: 0;
}

.native-platform .app-header,
.native-platform .screen-label,
.native-platform .hinge {
  display: none;
}

.native-platform .device-frame {
  position: relative;
  display: block;
  max-width: none;
}

.native-platform .surface-slot {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: #030706;
}

/* Thor top panel hides a thin lower edge in immersive mode. Keep content and
   render surface above that measured strip, plus any Android-reported inset. */
.native-platform .surface-slot.top-slot,
.native-platform[data-display-surface="top"] .dedicated-display-surface {
  padding-bottom: max(var(--thor-top-bottom-overscan), env(safe-area-inset-bottom, 0px));
}

.native-platform .surface-slot.is-active {
  display: grid;
}

.native-platform .top-slot > .display {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.native-platform .bottom-slot > .display {
  width: min(620px, 100%);
  height: 100%;
  aspect-ratio: auto;
}

.native-platform .display {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.native-platform .native-display-switch {
  position: fixed;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 100;
  display: grid;
  min-width: 76px;
  padding: 5px 8px;
  border: 1px solid rgba(232, 200, 114, 0.55);
  border-radius: 3px;
  color: var(--ink);
  background: rgba(3, 9, 8, 0.9);
  text-align: left;
}

.native-platform .device-frame.active-bottom .native-display-switch {
  top: max(7px, env(safe-area-inset-top));
  right: auto;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
}

.native-platform .native-display-switch b {
  color: var(--gold-strong);
  font-size: 9px;
  line-height: 1;
  text-transform: uppercase;
}

.native-platform .native-display-switch small {
  color: var(--muted);
  font-size: 6px;
  line-height: 1.2;
}

.native-platform[data-display-surface] .native-display-switch {
  display: none;
}

.native-platform[data-display-surface] .dedicated-display-surface {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #030706;
}

.native-platform[data-display-surface="top"] .top-display,
.native-platform[data-display-surface="top"] .front-surface {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.native-platform[data-display-surface="bottom"] .bottom-display-root,
.native-platform[data-display-surface="bottom"] .dedicated-display-surface,
.native-platform[data-display-surface="bottom"] .bottom-display {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.native-platform[data-display-surface="bottom"] .bottom-display {
  aspect-ratio: auto;
}

.companion-standby {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 6.5% 7%;
  background:
    radial-gradient(circle at 82% 12%, rgba(94, 199, 176, 0.15), transparent 34%),
    linear-gradient(145deg, #091713, #030807 72%);
}

.companion-standby header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 4%;
  border-bottom: 1px solid var(--line);
}

.companion-standby header > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 200, 114, 0.6);
  color: var(--gold);
  font-family: "Cinzel", serif;
  transform: rotate(45deg);
}

.companion-standby header div { display: grid; gap: 2px; }
.companion-standby header small,
.companion-standby main > small { color: var(--muted); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; }
.companion-standby header strong { font-family: "Cinzel", serif; font-size: 18px; }
.companion-standby main { align-self: center; }
.companion-standby h1 { margin: 6px 0 8px; font-family: "Cinzel", serif; font-size: clamp(26px, 6cqw, 38px); font-weight: 500; }
.companion-standby p { max-width: 440px; margin: 0; color: #9cb0a8; font-size: clamp(12px, 2.6cqw, 16px); line-height: 1.35; }
.companion-standby em { display: block; margin-top: 12px; color: var(--gold); font-size: 11px; font-style: normal; }
.companion-standby footer { display: flex; gap: 18px; padding-top: 4%; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; text-transform: uppercase; }
.companion-standby footer b { color: var(--ink); }

/* Frontend shell — I Want To Heal */

.front-surface {
  isolation: isolate;
  color: #edf8f3;
  background:
    radial-gradient(circle at 18% 0%, rgba(100, 197, 172, 0.14), transparent 34%),
    linear-gradient(145deg, #0a1916, #050c0b 67%, #0d1713);
}

.front-surface::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(229, 202, 120, 0.05) 50%, transparent 50.2%),
    radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.42));
}

.front-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.28;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 8px);
}

.front-surface button {
  border: 1px solid rgba(150, 190, 175, 0.23);
  color: var(--ink);
  background: rgba(10, 25, 21, 0.88);
  cursor: pointer;
}

.front-surface button:disabled {
  cursor: not-allowed;
  filter: saturate(0.3);
  opacity: 0.35;
}

.front-surface button.is-controller-focused,
.front-surface button:focus-visible {
  outline: 2px solid var(--gold-strong);
  outline-offset: 2px;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 225, 147, 0.18), 0 0 18px rgba(232, 200, 114, 0.16);
}

.front-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
}

.front-brand .brand-sigil {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(235, 210, 137, 0.48);
  border-radius: 50%;
  color: var(--gold-strong);
  background: radial-gradient(circle, rgba(232, 200, 114, 0.18), transparent 65%);
  font-size: 21px;
  box-shadow: inset 0 0 0 5px rgba(232, 200, 114, 0.04);
}

.front-brand > span:last-child { display: grid; }
.front-brand small { color: #71877e; font-size: 8px; font-weight: 700; letter-spacing: 0.19em; }
.front-brand strong { font-family: "Cinzel", serif; font-size: 20px; font-weight: 600; letter-spacing: 0.045em; }
.front-brand.is-compact { gap: 8px; }
.front-brand.is-compact .brand-sigil { width: 30px; height: 30px; font-size: 13px; }
.front-brand.is-compact small { display: none; }
.front-brand.is-compact strong { font-size: 13px; }

.controller-legend {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #70837c;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.controller-legend span { display: flex; align-items: center; gap: 4px; }
.controller-legend b { min-width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid #61736c; border-radius: 50%; color: #d7e4de; font-size: 8px; }

.front-primary,
.front-secondary {
  width: 100%;
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  text-align: left;
}

.front-primary {
  border-color: #d5b963 !important;
  color: #122019 !important;
  background: linear-gradient(110deg, #ffe498, #d6b65d) !important;
}

.front-primary span,
.front-secondary span { font-size: 13px; font-weight: 700; letter-spacing: 0.035em; }
.front-primary small,
.front-secondary small { font-size: 8px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.65; }
.front-secondary { background: rgba(9, 23, 19, 0.8); }

.front-notice {
  padding: 7px 10px;
  border-left: 2px solid var(--teal);
  color: #a6bbb2;
  background: rgba(8, 23, 19, 0.8);
  font-size: 9px;
}

.front-screen-header {
  height: 66px;
  display: grid;
  grid-template-columns: 190px 1fr auto;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(150, 190, 175, 0.15);
}

.front-screen-header > div:nth-child(2) { display: grid; }
.front-screen-header > div:nth-child(2) > span { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.front-screen-header h1 { margin: 1px 0 0; font-family: "Cinzel", serif; font-size: 20px; font-weight: 500; letter-spacing: 0.035em; }
.front-screen-header > b { color: #71877e; font-size: 9px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.front-screen-header > b.is-online { color: #78d2a9; }
.header-back { padding: 7px 10px; color: #a5b9b1 !important; font-size: 9px; font-weight: 700; text-transform: uppercase; }

.context-header {
  height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5.5%;
  border-bottom: 1px solid rgba(150, 190, 175, 0.15);
  text-transform: uppercase;
}

.context-header span { color: #b9c9c3; font-size: clamp(9px, 1.9cqw, 12px); font-weight: 700; letter-spacing: 0.1em; }
.context-header b { color: #6fc7a7; font-size: clamp(7px, 1.45cqw, 9px); letter-spacing: 0.1em; }

/* Login */

.login-surface { padding: 30px 37px; }
.login-aura { position: absolute; top: 48px; left: 62px; width: 410px; height: 410px; display: grid; place-items: center; opacity: 0.24; transform: rotate(-12deg); }
.login-aura::before,
.login-aura::after { position: absolute; inset: 12%; border: 1px solid rgba(233, 209, 139, 0.36); border-radius: 50%; content: ""; }
.login-aura::after { inset: 27%; border-style: dashed; }
.login-aura b { color: var(--gold); font-family: "Cinzel", serif; font-size: 145px; font-weight: 400; text-shadow: 0 0 40px rgba(235, 207, 124, 0.3); }
.login-aura i { position: absolute; width: 1px; height: 100%; background: linear-gradient(transparent, rgba(232,200,114,0.4), transparent); }
.login-aura i:last-child { transform: rotate(90deg); }
.login-copy { position: absolute; left: 38px; bottom: 50px; width: 48%; }
.login-copy > span { color: var(--teal); font-size: 9px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.login-copy h1 { width: 390px; margin: 8px 0 9px; font-family: "Cinzel", serif; font-size: 36px; font-weight: 500; line-height: 1.05; }
.login-copy p { width: 390px; margin: 0; color: #96aaa2; font-size: 13px; line-height: 1.45; }
.login-panel { position: absolute; top: 68px; right: 44px; width: 300px; display: grid; gap: 6px; padding: 15px 20px; border: 1px solid rgba(163, 198, 185, 0.22); border-top: 2px solid rgba(232,200,114,0.68); background: linear-gradient(145deg, rgba(14, 31, 26, 0.96), rgba(5, 15, 12, 0.97)); box-shadow: 0 20px 50px rgba(0,0,0,0.35); }
.login-panel label { color: #81978e; font-size: 8px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.login-panel input { height: 36px; padding: 0 11px; border: 1px solid rgba(155,190,176,0.28); outline: 0; color: #e8f2ee; background: #071310; font: 600 12px "Rajdhani", sans-serif; }
.login-panel input:focus,
.login-panel input.is-controller-focused { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232,200,114,0.12); }
.login-panel .front-primary,
.login-panel .front-secondary { min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.login-surface > .front-notice { position: absolute; right: 44px; bottom: 83px; width: 300px; }
.login-surface > .controller-legend { position: absolute; right: 44px; bottom: 47px; }
.login-save-context { padding: 0 5.5% 18px; }
.login-save-context .context-header { margin: 0 -5.8%; }
.login-save-list { display: grid; gap: 9px; margin-top: 16px; }
.login-save-list article { min-height: 105px; display: grid; grid-template-columns: 30px 52px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid rgba(150,190,175,.18); border-left: 2px solid rgba(232,200,114,.52); background: linear-gradient(100deg, rgba(23,48,40,.66), rgba(7,18,15,.78)); }
.login-save-list article.is-empty { grid-template-columns: 30px minmax(0, 1fr); border-left-color: #425850; background: rgba(6,16,13,.62); }
.login-save-list article > b { color: #61776e; font-family: "Cinzel", serif; font-size: 15px; font-weight: 500; }
.login-save-avatar { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(232,200,114,.48); border-radius: 50%; color: var(--gold-strong); background: radial-gradient(circle at 50% 28%, #2c493f, #0b1a17); font: 20px "Cinzel", serif; }
.login-save-list article > span { min-width: 0; display: grid; }
.login-save-list article small { color: #6d8279; font-size: clamp(7px, 1.45cqw, 9px); font-style: normal; letter-spacing: .08em; text-transform: uppercase; }
.login-save-list article span > strong { overflow: hidden; font: 500 clamp(13px, 2.8cqw, 17px) "Cinzel", serif; text-overflow: ellipsis; white-space: nowrap; }
.login-save-list article em { overflow: hidden; color: #8fa49b; font-size: clamp(8px, 1.7cqw, 10px); font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.login-save-list time { min-width: 86px; display: grid; justify-items: end; }
.login-save-list time strong { color: var(--gold); font-size: clamp(9px, 1.9cqw, 11px); }
.login-empty-copy { grid-column: 2 / -1; }
.login-save-footer { position: absolute; right: 5.5%; bottom: 19px; left: 5.5%; display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); color: #60756d; font-size: clamp(6px, 1.3cqw, 8px); letter-spacing: .08em; text-transform: uppercase; }
.login-save-footer b { color: #78988c; }

/* Save management */

.save-surface { padding: 0 30px; }
.save-slot-grid { height: 326px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; align-items: center; }
.save-slot { position: relative; height: 265px; display: flex; flex-direction: column; align-items: center; padding: 14px 16px; overflow: hidden; text-align: center; transition: transform 140ms ease, border-color 140ms ease; }
.save-slot::before { position: absolute; inset: 0; content: ""; background: radial-gradient(circle at 50% 36%, rgba(95,177,154,0.13), transparent 42%), linear-gradient(180deg, rgba(25, 48, 41, 0.55), rgba(7, 18, 15, 0.86)); }
.save-slot > * { position: relative; }
.save-slot:hover,
.save-slot.is-selected { border-color: rgba(232,200,114,0.68); transform: translateY(-4px); }
.save-slot.is-selected::after { position: absolute; inset: 5px; border: 1px solid rgba(232,200,114,0.18); content: ""; pointer-events: none; }
.slot-number { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: #83978f; font-size: 9px; font-weight: 700; letter-spacing: 0.15em; text-align: left; text-transform: uppercase; }
.slot-number b { padding: 2px 4px; color: #87d9b9; background: rgba(62,133,109,.17); font-size: 6px; letter-spacing: .08em; white-space: nowrap; }
.slot-portrait { width: 68px; height: 68px; display: grid; place-items: center; margin-top: 14px; border: 1px solid rgba(232,200,114,0.55); border-radius: 50%; color: var(--gold-strong); background: radial-gradient(circle at 50% 30%, #304d42, #0c1c18); font-family: "Cinzel", serif; font-size: 29px; box-shadow: 0 0 25px rgba(81,176,151,0.13); }
.slot-portrait i { position: absolute; right: -3px; bottom: 0; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #192019; background: var(--gold); font-size: 10px; font-style: normal; }
.slot-name { display: grid; margin-top: 12px; }
.slot-name strong { font-family: "Cinzel", serif; font-size: 17px; font-weight: 500; }
.slot-name small { color: #7c9289; font-size: 9px; text-transform: uppercase; }
.slot-location { margin-top: 12px; color: #b1c1bb; font-size: 10px; }
.slot-meta { width: 100%; display: grid; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.slot-meta b { color: var(--gold); font-size: 11px; }
.slot-meta small { color: #61766e; font-size: 8px; }
.selection-chevron { position: absolute; right: 10px; bottom: 7px; color: var(--gold); font-size: 20px; font-style: normal; opacity: 0; }
.save-slot.is-selected .selection-chevron { opacity: 1; }
.empty-slot { flex: 1; display: grid; place-content: center; }
.empty-slot b { color: #6f8c81; font-size: 36px; font-weight: 300; }
.empty-slot strong { font-family: "Cinzel", serif; font-size: 14px; font-weight: 500; }
.empty-slot small { color: #5e736b; font-size: 8px; text-transform: uppercase; }
.save-top-actions { display: grid; grid-template-columns: 1.75fr repeat(5, minmax(0, 1fr)); gap: 7px; }
.save-top-actions button { min-width: 0; min-height: 55px; display: grid; align-content: center; padding: 7px 9px; text-align: left; }
.save-top-actions button:not(.front-primary) strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.save-top-actions button:not(.front-primary) small { overflow: hidden; color: #6d827a; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.save-top-actions .danger-link strong { color: #ed8c78; }
.save-footer { min-height: 31px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 7px 2px 5px; border-top: 1px solid var(--line); color: #6e847b; font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
.save-footer > span b { color: #72cba9; }
.save-top-notice { overflow: hidden; color: #82978f; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.front-dialog { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; padding: 0 calc(50% - 190px); background: rgba(2,8,7,0.85); backdrop-filter: blur(7px); text-align: center; }
.front-dialog::before { position: absolute; top: 80px; right: calc(50% - 210px); bottom: 70px; left: calc(50% - 210px); z-index: -1; border: 1px solid rgba(232,200,114,0.35); border-top: 2px solid var(--gold); content: ""; background: #0b1916; box-shadow: 0 22px 60px rgba(0,0,0,0.6); }
.front-dialog > span { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; }
.front-dialog form { display: grid; justify-items: center; }
.front-dialog form > span { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; }
.front-dialog form > label { justify-self: start; margin-top: 12px; color: #82978f; font-size: 8px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.front-dialog form > input { width: 100%; height: 38px; margin-top: 5px; padding: 0 11px; border: 1px solid rgba(155,190,176,0.32); outline: 0; color: #eef8f4; background: #06120f; font: 600 13px "Rajdhani", sans-serif; text-align: center; }
.front-dialog form > input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232,200,114,0.14); }
.front-dialog form > small { justify-self: end; margin-top: 3px; color: #647a71; font-size: 7px; }
.front-dialog h2 { margin: 7px 0; font-family: "Cinzel", serif; font-size: 24px; font-weight: 500; }
.front-dialog p { margin: 0; color: #8ca198; font-size: 11px; line-height: 1.4; }
.dialog-actions { display: flex; justify-content: center; gap: 9px; margin-top: 18px; }
.dialog-actions button { min-width: 110px; padding: 10px 14px; font-weight: 700; }
.dialog-actions button small { display: block; color: #748a81; font-size: 7px; text-transform: uppercase; }
.dialog-actions button.is-danger { border-color: #d76551; color: #fff; background: #8e3025; }
.front-dialog.version-dialog { grid-template-columns: minmax(0, 630px); padding-right: calc(50% - 315px); padding-left: calc(50% - 315px); }
.front-dialog.version-dialog::before { top: 45px; right: calc(50% - 345px); bottom: 45px; left: calc(50% - 345px); }
.version-choice-dialog { width: 100%; }
.version-choice-dialog > span { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.version-choice-dialog h2 { margin: 5px 0; }
.version-choice-dialog > p { font-size: 10px; }
.version-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 13px; text-align: left; }
.version-comparison article { display: grid; gap: 3px; padding: 11px 13px; border: 1px solid var(--line); background: rgba(5,16,13,.75); }
.version-comparison article.is-newer { border-color: rgba(111,208,168,.55); box-shadow: inset 3px 0 #6fd0a8; background: rgba(29,74,59,.2); }
.version-comparison header { display: flex; justify-content: space-between; color: #788d85; font-size: 7px; letter-spacing: .11em; text-transform: uppercase; }
.version-comparison header b { color: #70d0a8; }
.version-comparison article > strong { font: 500 13px "Cinzel", serif; }
.version-comparison time { color: var(--gold-strong); font-size: 11px; }
.version-comparison article > small { color: #6f847c; font-size: 8px; }
.version-actions { display: grid; grid-template-columns: 1.35fr 1.35fr .7fr; }
.version-actions button { min-width: 0; min-height: 47px; display: grid; align-content: center; text-align: left; }
.version-actions button > span { font-size: 10px; }
.version-choice-error { margin-top: 8px; padding: 6px 9px; border-left: 2px solid #e5634d; color: #f0a594; background: rgba(95,31,23,.2); font-size: 8px; text-align: left; }
.save-context { padding: 0 5.5% 18px; }
.save-context .context-header { margin: 0 -5.8%; }
.selected-save-summary { min-height: 105px; display: grid; grid-template-columns: 66px 1fr; align-items: center; gap: 15px; padding: 16px 0 11px; border-bottom: 1px solid var(--line); }
.summary-avatar { width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid rgba(232,200,114,0.5); border-radius: 50%; color: var(--gold); background: #122620; font-family: "Cinzel", serif; font-size: 25px; }
.summary-avatar.is-empty { color: #61786f; border-style: dashed; }
.selected-save-summary > span { display: grid; min-width: 0; }
.selected-save-summary small { color: #6d827a; font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; }
.selected-save-summary h2 { margin: 2px 0 0; font-family: "Cinzel", serif; font-size: clamp(16px, 3.4cqw, 21px); font-weight: 500; }
.selected-save-summary p { margin: 2px 0; overflow: hidden; color: #9dafA8; font-size: clamp(8px, 1.9cqw, 11px); text-overflow: ellipsis; white-space: nowrap; }
.selected-save-summary time { color: #60756d; font-size: 8px; }
.save-dossier-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 13px; border: 1px solid var(--line); background: rgba(6,17,14,.68); }
.save-dossier-stats > span { min-width: 0; display: grid; padding: 11px 10px; border-right: 1px solid var(--line); }
.save-dossier-stats > span:last-child { border: 0; }
.save-dossier-stats small,
.save-dossier-records small { color: #62776f; font-size: clamp(6px, 1.35cqw, 8px); letter-spacing: .07em; text-transform: uppercase; }
.save-dossier-stats strong { color: var(--gold-strong); font: 500 clamp(15px, 3.1cqw, 19px) "Cinzel", serif; }
.save-dossier-stats em { overflow: hidden; color: #80958d; font-size: clamp(7px, 1.5cqw, 9px); font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.save-dossier-records { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.save-dossier-records > span { display: grid; padding: 9px 11px; border-left: 2px solid rgba(232,200,114,.45); background: rgba(46,40,21,.24); }
.save-dossier-records b { color: #c7d6d0; font-size: clamp(9px, 1.9cqw, 11px); }
.save-copy-state { display: grid; gap: 6px; margin-top: 12px; }
.save-copy-state > span { display: grid; grid-template-columns: 8px auto 1fr; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--line); color: #90a49c; font-size: clamp(7px, 1.55cqw, 9px); text-transform: uppercase; }
.save-copy-state i { width: 6px; height: 6px; border-radius: 50%; background: #455750; }
.save-copy-state i.is-present { background: #6fd0a8; box-shadow: 0 0 8px rgba(111,208,168,.4); }
.save-copy-state b { justify-self: end; color: #647970; font-size: clamp(6px, 1.35cqw, 8px); font-weight: 600; }
.front-notice.is-lower { margin-top: auto; font-size: clamp(7px, 1.55cqw, 9px); }

/* Main menu */

.home-surface { padding: 0 32px 25px; }
.home-header { height: 58px; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.home-header > span { margin-left: auto; color: #8fa39b; font-size: 10px; }
.home-header > span b { color: #dce9e4; }
.home-header > i { color: #6ecaa7; font-size: 8px; font-style: normal; font-weight: 700; letter-spacing: 0.08em; }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, 78px); gap: 10px; margin-top: 18px; }
.mode-card { position: relative; display: grid; grid-template-columns: 54px 1fr 17px; align-items: center; gap: 12px; padding: 13px; overflow: hidden; text-align: left; }
.mode-card::after { position: absolute; inset: 0; content: ""; background: linear-gradient(110deg, rgba(69,153,131,0.13), transparent 60%); pointer-events: none; }
.mode-card.is-wide { grid-row: 1 / 3; }
.mode-card > i { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(232,200,114,0.42); border-radius: 50%; color: var(--gold); background: rgba(2,9,7,0.45); font-family: "Cinzel", serif; font-size: 20px; font-style: normal; }
.mode-card.is-wide > i { width: 64px; height: 64px; font-size: 27px; }
.mode-card > span { z-index: 1; display: flex; flex-direction: column-reverse; }
.mode-card small { color: #72887f; font-size: 8px; text-transform: uppercase; }
.mode-card strong { font-family: "Cinzel", serif; font-size: 14px; font-weight: 500; }
.mode-card.is-wide strong { font-size: 19px; }
.mode-card > b { color: var(--gold); font-size: 21px; font-weight: 400; }
.home-secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.home-secondary-actions button { min-height: 58px; display: grid; grid-template-columns: 34px 1fr 12px; align-items: center; gap: 10px; padding: 8px 12px; text-align: left; }
.home-secondary-actions button > i { color: var(--teal); font-size: 20px; font-style: normal; }
.home-secondary-actions button > span { display: grid; }
.home-secondary-actions strong { font-size: 12px; }
.home-secondary-actions small { color: #71867e; font-size: 8px; }
.home-secondary-actions button > b { color: #8aa097; font-size: 17px; }
.home-surface > .controller-legend { position: absolute; right: 32px; bottom: 8px; }
.hunter-context { padding: 0 5.5% 18px; }
.hunter-context .context-header { margin: 0 -5.8%; }
.hunter-card { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 16px; padding: 21px 0 16px; border-bottom: 1px solid var(--line); }
.hunter-crest { position: relative; width: 78px; height: 78px; display: grid; place-items: center; border: 1px solid rgba(232,200,114,0.5); border-radius: 50%; color: var(--gold); background: radial-gradient(circle at 50% 30%, #29483d, #0c1b17); font-family: "Cinzel", serif; font-size: 31px; }
.hunter-crest i { position: absolute; right: 0; bottom: 1px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #101711; background: var(--gold); font-size: 9px; font-style: normal; }
.hunter-card > span { display: grid; }
.hunter-card small { color: #768b83; font-size: clamp(8px, 1.65cqw, 10px); text-transform: uppercase; }
.hunter-card h2 { margin: 1px 0; font-family: "Cinzel", serif; font-size: clamp(18px, 4cqw, 24px); font-weight: 500; }
.hunter-card p { margin: 0; color: #9eafa9; font-size: clamp(8px, 1.8cqw, 11px); }
.hunter-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.hunter-stat-row span { display: grid; padding: 0 9px; border-right: 1px solid var(--line); }
.hunter-stat-row span:first-child { padding-left: 0; }
.hunter-stat-row span:last-child { border: 0; }
.hunter-stat-row small { color: #677c74; font-size: clamp(7px, 1.45cqw, 9px); text-transform: uppercase; }
.hunter-stat-row strong { color: var(--gold-strong); font-family: "Cinzel", serif; font-size: clamp(17px, 3.6cqw, 22px); font-weight: 500; }
.healer-picker { margin-top: 13px; }
.healer-picker > span { color: #6b8178; font-size: 8px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.healer-picker > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 7px; }
.healer-picker button { min-width: 0; min-height: 72px; display: grid; grid-template-columns: 28px 1fr 12px; align-items: center; gap: 6px; padding: 7px; text-align: left; }
.healer-picker button.is-selected { border-color: rgba(232,200,114,0.62); background: linear-gradient(145deg, rgba(76,65,31,0.42), rgba(8,22,18,0.9)); }
.healer-picker button > i { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-family: "Cinzel", serif; font-size: 13px; font-style: normal; }
.healer-picker button > span { min-width: 0; display: grid; }
.healer-picker button strong { overflow: hidden; font-size: clamp(9px, 1.85cqw, 11px); text-overflow: ellipsis; white-space: nowrap; }
.healer-picker button small { overflow: hidden; color: #667b73; font-size: clamp(6px, 1.25cqw, 8px); text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.healer-picker button > b { color: var(--gold); font-size: 11px; }
.recent-collection { margin-top: 15px; }
.recent-collection > span { color: #6b8178; font-size: 8px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.recent-collection > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 7px; }
.recent-collection i { position: relative; height: 47px; display: grid; place-items: center; border: 1px solid #425b52; color: #a8bab2; background: #091713; font-size: 18px; font-style: normal; }
.recent-collection i b { position: absolute; right: 3px; bottom: 2px; min-width: 15px; padding: 1px 3px; color: #dce8e3; background: #101d19; font-size: 8px; text-align: center; }
.recent-collection i.rarity-rare { border-color: #547eb6; }
.recent-collection i.rarity-mythic { border-color: #9b6fba; }
.change-save { position: absolute; right: 5.5%; bottom: 18px; left: 5.5%; display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; text-align: left; }
.change-save span { font-size: 10px; font-weight: 700; }
.change-save small { color: #647971; font-size: 7px; }

/* Profile */

.profile-surface { padding: 0 30px; }
.profile-header { grid-template-columns: 190px minmax(0, 1fr) auto auto; }
.profile-view-tabs { display: flex; gap: 4px; }
.profile-view-tabs button { min-height: 28px; padding: 5px 9px; color: #80948c; font-size: 8px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.profile-view-tabs button.is-selected { border-color: var(--gold); color: var(--gold-strong); background: linear-gradient(180deg, rgba(102,82,30,.28), rgba(37,29,12,.18)); }
.collection-heading { display: flex; align-items: end; justify-content: space-between; padding: 16px 2px 10px; }
.collection-heading > span { display: grid; }
.collection-heading small { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.collection-heading h2 { margin: 1px 0 0; font-family: "Cinzel", serif; font-size: 21px; font-weight: 500; }
.collection-heading > b { color: #77bfa5; font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }
.collection-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.collection-drop { position: relative; height: 218px; padding: 12px; overflow: hidden; border: 1px solid #475d55; border-top: 2px solid #8f9e98; background: radial-gradient(circle at 50% 30%, rgba(91,151,131,0.13), transparent 42%), rgba(7,18,15,0.88); }
.collection-drop.rarity-uncommon { border-top-color: #61b97f; }
.collection-drop.rarity-rare { border-top-color: #648fd0; }
.collection-drop.rarity-mythic { border-top-color: #a071c1; }
.collection-drop.is-missing { filter: saturate(0.35); }
.drop-icon { position: relative; width: 78px; height: 78px; display: grid; place-items: center; margin: 6px auto 13px; border: 1px solid #4a6259; color: var(--gold); background: rgba(2,9,7,0.7); font-family: "Cinzel", serif; font-size: 30px; }
.drop-icon b { position: absolute; right: -5px; bottom: -5px; min-width: 23px; padding: 3px 5px; border: 1px solid #526a61; color: #e4eee9; background: #10201b; font: 700 9px "Rajdhani", sans-serif; text-align: center; }
.collection-drop > small { color: #70867d; font-size: 7px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.collection-drop > strong { min-height: 32px; display: block; margin-top: 3px; font-family: "Cinzel", serif; font-size: 12px; font-weight: 500; line-height: 1.25; }
.collection-drop > p { position: absolute; right: 12px; bottom: 10px; left: 12px; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); color: #71867e; font-size: 8px; text-transform: uppercase; }
.collection-note { display: flex; align-items: center; gap: 10px; margin-top: 11px; padding: 7px 10px; border: 1px solid rgba(232,200,114,0.18); background: rgba(55,45,20,0.14); }
.collection-note > i { color: var(--gold); font-style: normal; }
.collection-note > span { display: flex; align-items: baseline; gap: 8px; }
.collection-note strong { font-size: 9px; }
.collection-note small { color: #758a82; font-size: 8px; }
.trophy-heading { padding-top: 11px; }
.trophy-case { display: grid; gap: 10px; }
.trophy-count-1 { grid-template-columns: 1fr; }
.trophy-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trophy-count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trophy-count-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trophy-count-1 .boss-trophy { width: min(280px, 100%); justify-self: center; }
.boss-trophy { --boss-accent: var(--gold); position: relative; min-width: 0; height: 326px; overflow: hidden; border: 1px solid #43574f; border-top: 2px solid #6e8079; background: radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--boss-accent) 18%, transparent), transparent 47%), linear-gradient(180deg, #0b1815, #07100e); box-shadow: inset 0 0 30px rgba(0,0,0,.55); }
.boss-trophy::before { content: ""; position: absolute; inset: 7px; z-index: 2; border: 1px solid rgba(198,218,210,.1); pointer-events: none; }
.boss-trophy.is-owned { border-color: color-mix(in srgb, var(--boss-accent) 68%, #d6bf79); box-shadow: inset 0 0 30px rgba(0,0,0,.42), 0 0 15px color-mix(in srgb, var(--boss-accent) 24%, transparent); }
.boss-trophy.is-locked { border-color: #3b4844; background: linear-gradient(180deg, #111715, #080d0c); }
.trophy-portrait { position: relative; height: 224px; overflow: hidden; border-bottom: 1px solid rgba(180,207,197,.16); background: radial-gradient(ellipse at 50% 68%, color-mix(in srgb, var(--boss-accent) 18%, transparent), transparent 48%); }
.trophy-portrait canvas { position: relative; z-index: 1; display: block; width: 100% !important; height: 100% !important; pointer-events: none; }
.trophy-portrait > span { position: absolute; right: 12px; bottom: 7px; z-index: 2; color: color-mix(in srgb, var(--boss-accent) 78%, #fff); font: 19px "Cinzel", serif; opacity: .72; }
.boss-trophy.is-locked .trophy-portrait canvas { filter: grayscale(1) brightness(.36) contrast(1.18); opacity: .7; }
.boss-trophy.is-locked .trophy-portrait::after { content: ""; position: absolute; inset: 0; z-index: 1; background: repeating-linear-gradient(135deg, rgba(8,12,11,.25) 0 5px, rgba(23,28,26,.16) 5px 10px); pointer-events: none; }
.boss-trophy.is-locked .trophy-portrait > span { color: #75817d; opacity: .42; }
.trophy-plaque { position: absolute; right: 10px; bottom: 12px; left: 10px; display: grid; }
.trophy-plaque small { color: color-mix(in srgb, var(--boss-accent) 78%, #d8d0b4); font-size: 7px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.boss-trophy.is-locked .trophy-plaque small { color: #69756f; }
.trophy-plaque strong { margin-top: 2px; overflow: hidden; font-family: "Cinzel", serif; font-size: 12px; font-weight: 500; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.trophy-plaque span { margin-top: 5px; color: #768981; font-size: 8px; text-transform: uppercase; }
.trophy-state { position: absolute; top: 13px; left: 13px; z-index: 3; padding: 3px 6px; border: 1px solid color-mix(in srgb, var(--boss-accent) 58%, #716d5d); color: #fff0bb; background: rgba(9,17,14,.82); font-size: 7px; letter-spacing: .12em; text-transform: uppercase; }
.boss-trophy.is-locked .trophy-state { border-color: #56615d; color: #8b9893; background: rgba(12,16,15,.86); }
.trophy-note { margin-top: 8px; }
.boss-stats-heading { padding-top: 10px; }
.boss-stats-layout { height: 331px; display: grid; grid-template-columns: minmax(235px, .78fr) minmax(0, 1.22fr); gap: 11px; }
.boss-stat-selector { min-width: 0; display: grid; align-content: start; gap: 5px; }
.boss-stat-selector button { width: 100%; min-height: 51px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 32px; align-items: center; gap: 8px; padding: 6px 9px; text-align: left; }
.boss-stat-selector button.is-selected { border-color: var(--gold); box-shadow: inset 3px 0 var(--gold); background: linear-gradient(90deg, rgba(93,73,23,.27), rgba(8,18,15,.88)); }
.boss-stat-selector button > i { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #496159; color: var(--gold); font-style: normal; }
.boss-stat-selector button > span { min-width: 0; display: grid; }
.boss-stat-selector strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.boss-stat-selector small { overflow: hidden; color: #6f837b; font-size: 7px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.boss-stat-selector button > b { color: var(--gold-strong); font-family: "Cinzel", serif; font-size: 16px; text-align: right; }
.leaderboard-panel { min-width: 0; overflow: hidden; border: 1px solid #435950; background: linear-gradient(180deg, rgba(11,25,21,.94), rgba(5,13,11,.94)); }
.leaderboard-panel > header { height: 53px; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); background: rgba(59,47,17,.16); }
.leaderboard-panel > header span { min-width: 0; display: grid; }
.leaderboard-panel > header small { color: var(--gold); font-size: 7px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.leaderboard-panel > header strong { overflow: hidden; font: 500 13px "Cinzel", serif; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-panel > header > b { color: #88a79b; font-size: 8px; text-transform: uppercase; }
.leaderboard-rows { min-height: 218px; padding: 4px 8px; }
.leaderboard-rows > div, .leaderboard-self { min-height: 40px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 44px; align-items: center; gap: 8px; padding: 4px 7px; border-bottom: 1px solid rgba(164,195,184,.1); }
.leaderboard-rows > div.is-you { background: rgba(102,81,24,.2); }
.leaderboard-rows > div > b, .leaderboard-self > b { color: var(--gold); font: 600 12px "Cinzel", serif; }
.leaderboard-rows span, .leaderboard-self span { min-width: 0; display: grid; }
.leaderboard-rows strong, .leaderboard-self strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-rows small, .leaderboard-self small { color: #6d8179; font-size: 6px; text-transform: uppercase; }
.leaderboard-rows em, .leaderboard-self em { color: #e8f3ee; font: 500 15px "Cinzel", serif; font-style: normal; text-align: right; }
.leaderboard-self { min-height: 48px; margin: 0 8px 7px; border: 1px solid rgba(232,200,114,.33); background: rgba(79,62,19,.2); }
.leaderboard-status, .leaderboard-empty { min-height: 218px; display: grid; place-items: center; padding: 20px; color: #71867e; font-size: 9px; text-align: center; text-transform: uppercase; }
.leaderboard-empty { min-height: 200px !important; border: 0 !important; }
.profile-context { padding: 0 5.5% 18px; }
.profile-context .context-header { margin: 0 -5.8%; }
.profile-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.profile-stats span { min-width: 0; display: grid; padding: 8px 6px; border-right: 1px solid var(--line); }
.profile-stats span:last-child { border-right: 0; }
.profile-stats small { color: #6d8179; font-size: clamp(7px, 1.5cqw, 9px); text-transform: uppercase; }
.profile-stats strong { color: var(--gold-strong); font-family: "Cinzel", serif; font-size: clamp(14px, 2.8cqw, 17px); font-weight: 500; }
.boss-log { margin-top: 7px; }
.boss-log > span { color: #6c8179; font-size: 8px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.boss-log button { width: 100%; min-height: 36px; display: grid; grid-template-columns: 28px 1fr 30px; align-items: center; gap: 7px; margin-top: 3px; padding: 3px 8px; text-align: left; }
.boss-log button.is-selected { border-left: 2px solid var(--gold); background: linear-gradient(90deg, rgba(91,75,31,0.22), rgba(8,21,17,0.85)); }
.boss-log button > i { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #4d635b; color: var(--gold); font-style: normal; }
.boss-log button > span { display: grid; }
.boss-log strong { font-size: clamp(10px, 2.15cqw, 13px); }
.boss-log small { color: #687d75; font-size: clamp(7px, 1.45cqw, 9px); text-transform: uppercase; }
.boss-log button > b { color: #85a198; font-size: 10px; }

/* Settings */

.settings-surface { padding: 0 30px; }
.settings-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 18px; padding-top: 19px; }
.settings-layout > section { min-width: 0; }
.settings-section-title { display: block; margin-bottom: 7px; color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.volume-setting { position: relative; height: 170px; padding: 16px; border: 1px solid var(--line); background: rgba(8,20,17,0.8); }
.volume-setting > span { display: grid; }
.volume-setting strong { font-family: "Cinzel", serif; font-size: 14px; font-weight: 500; }
.volume-setting small { color: #6d8179; font-size: 8px; }
.volume-setting > div { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 8px; margin-top: 24px; }
.volume-setting button { height: 34px; font-size: 17px; }
.volume-setting > div b { color: var(--gold-strong); font-family: "Cinzel", serif; font-size: 22px; font-weight: 500; text-align: center; }
.volume-setting > i { position: absolute; right: 16px; bottom: 17px; left: 16px; height: 4px; overflow: hidden; background: #07100e; }
.volume-setting > i em { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); }
.setting-row { width: 100%; min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; padding: 10px 13px; text-align: left; }
.setting-row > span { display: grid; }
.setting-row strong { font-size: 12px; }
.setting-row small { color: #6e827a; font-size: 8px; }
.setting-row > b { min-width: 44px; padding: 5px 8px; border: 1px solid #475c54; color: #71867d; font-size: 8px; letter-spacing: 0.08em; text-align: center; }
.setting-row > b.is-on { border-color: #4fa985; color: #79d2ad; background: rgba(52,133,103,0.14); }
.settings-save-state { margin-top: 13px; padding: 8px 10px; border-left: 2px solid var(--teal); color: #758a82; background: rgba(8,20,17,0.7); font-size: 8px; }
.controls-context { padding: 0 5.5% 18px; }
.controls-context .context-header { margin: 0 -5.8%; }
.controller-map { display: flex; align-items: center; justify-content: space-around; padding: 25px 4% 20px; border-bottom: 1px solid var(--line); }
.pad-diagram,
.face-diagram { display: grid; place-items: center; color: #889c94; font-size: 16px; }
.pad-diagram span,
.face-diagram span { display: flex; align-items: center; gap: 9px; }
.pad-diagram b,
.face-diagram b { color: #40534c; }
.face-diagram i { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-style: normal; }
.face-diagram .triangle { color: #70c18b; }
.face-diagram .circle { color: #dc6f78; }
.face-diagram .cross { color: #78a9dd; }
.face-diagram .square { color: #cf8fc5; }
.mapping-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 15px; }
.mapping-list span { padding: 8px; border: 1px solid var(--line); color: #83978f; font-size: clamp(8px, 1.7cqw, 10px); }
.mapping-list b { color: #d6e3de; }
.control-assurance { position: absolute; right: 5.5%; bottom: 22px; left: 5.5%; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid rgba(73,170,134,0.3); background: rgba(40,120,90,0.12); }
.control-assurance > i { color: #6dd0a8; font-style: normal; }
.control-assurance > span { display: grid; }
.control-assurance strong { font-size: 10px; }
.control-assurance small { color: #6d827a; font-size: 8px; }

/* Mode briefing */

.mode-surface { padding: 0 30px; }
.mode-surface::after { position: absolute; right: -90px; bottom: -160px; width: 560px; height: 560px; z-index: -1; border: 1px solid rgba(232,200,114,0.13); border-radius: 50%; content: ""; box-shadow: inset 0 0 0 70px rgba(61,142,120,0.025), inset 0 0 0 140px rgba(232,200,114,0.018); }
.mode-roguelike-pvp::after { border-color: rgba(192,99,92,0.2); }
.mode-stadium-pvp::after { border-color: rgba(91,150,212,0.2); }
.mode-hero { width: 56%; margin: 52px 0 0 22px; }
.mode-hero > span { color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; }
.mode-hero h2 { margin: 8px 0; font-family: "Cinzel", serif; font-size: 35px; font-weight: 500; line-height: 1; }
.mode-hero p { margin: 0; color: #98aca4; font-size: 13px; line-height: 1.45; }
.mode-hero > b { display: block; margin-top: 15px; color: #cbd9d4; font-size: 10px; font-weight: 600; }
.boss-picker { position: absolute; top: 84px; right: 38px; left: 38px; display: grid; gap: 4px; }
.boss-picker-heading { min-height: 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.boss-picker-heading > span { color: #71867e; font-size: 7px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.boss-picker-heading > div { display: flex; gap: 4px; }
.boss-picker-heading button { min-width: 72px; padding: 2px 6px; border: 1px solid var(--line); color: #a9bbb4; background: rgba(6,18,16,0.82); font-size: 7px; text-transform: uppercase; }
.boss-picker-heading button:disabled { opacity: 0.32; }
.boss-group-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.boss-group-choice { min-height: 30px; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid var(--line); color: #9db2aa; background: rgba(6,18,16,0.82); text-align: left; }
.boss-group-choice > b { display: grid; width: 19px; height: 19px; place-items: center; border: 1px solid #527066; border-radius: 50%; color: var(--gold); font-family: "Cinzel", serif; font-size: 9px; }
.boss-group-choice > span { display: grid; min-width: 0; }
.boss-group-choice strong { font-size: 7px; }
.boss-group-choice small { overflow: hidden; color: #6f867d; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.boss-group-choice.is-selected { border-color: var(--gold); background: rgba(87,69,25,0.22); color: #e8d68d; }
.boss-group-choice.is-selected > b { border-color: var(--gold); background: rgba(232,200,114,0.14); }
.boss-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 3px; color: #d6e3de; }
.boss-group-heading > span { font-family: "Cinzel", serif; font-size: 10px; }
.boss-group-heading > small { color: #71867e; font-size: 7px; text-transform: uppercase; }
.boss-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.boss-choice { min-height: 40px; display: grid; grid-template-columns: 26px 1fr 14px; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid var(--line); color: #dce8e3; background: rgba(6,18,16,0.82); text-align: left; }
.boss-choice > i { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--boss-accent) 55%, transparent); border-radius: 50%; color: var(--boss-accent); font-size: 11px; font-style: normal; }
.boss-choice > span { display: grid; min-width: 0; }
.boss-choice strong { font-family: "Cinzel", serif; font-size: 9px; }
.boss-choice small { overflow: hidden; color: #72877f; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.boss-choice > b { color: var(--boss-accent); }
.boss-choice.is-selected { border-color: var(--boss-accent); box-shadow: inset 3px 0 var(--boss-accent); background: color-mix(in srgb, var(--boss-accent) 10%, rgba(6,18,16,0.9)); }
.mode-launch { position: absolute; right: 38px; bottom: 18px; width: 275px; min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-color: var(--gold) !important; color: #182019 !important; background: linear-gradient(110deg, #ffe499, #d1af54) !important; text-align: left; }
.mode-launch span { font-family: "Cinzel", serif; font-size: 13px; font-weight: 600; }
.mode-launch small { font-size: 8px; font-weight: 700; text-transform: uppercase; opacity: 0.65; }
.mode-surface > .front-notice { position: absolute; right: 38px; bottom: 20px; width: 360px; }
.mode-context { padding: 0 5.5% 18px; }
.mode-context .context-header { margin: 0 -5.8%; }
.mode-rule { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 11px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.mode-rule > i { color: #526b62; font-family: "Cinzel", serif; font-size: 17px; font-style: normal; }
.mode-rule > span { display: grid; }
.mode-rule strong { font-size: clamp(11px, 2.35cqw, 14px); }
.mode-rule small { color: #71867e; font-size: clamp(8px, 1.7cqw, 10px); }
.mode-loadout { position: absolute; right: 5.5%; bottom: 23px; left: 5.5%; display: grid; padding: 11px 13px; border: 1px solid rgba(232,200,114,0.24); background: rgba(70,58,25,0.12); }
.mode-loadout span { color: var(--gold); font-size: 7px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.mode-loadout b { font-size: 11px; }
.mode-loadout small { color: #6e827a; font-size: 8px; }

.game-menu-button {
  position: absolute;
  top: 4%;
  right: 2.2%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(199,219,211,0.28);
  color: #dbe8e3;
  background: rgba(4,12,10,0.78);
  pointer-events: auto;
  font-size: 9px;
  text-transform: uppercase;
}

.game-menu-button small { color: #71857e; font-size: 6px; }

.game-loading {
  display: grid;
  place-content: center;
  gap: 7px;
  color: #dce9e4;
  background: radial-gradient(circle at center, rgba(73, 153, 130, 0.18), transparent 38%), #07110f;
  text-align: center;
}

.game-loading > span { color: var(--gold); font-size: 29px; }
.game-loading > strong { font-family: "Cinzel", serif; font-size: 20px; font-weight: 500; }
.game-loading > small { color: #71867e; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.game-loading.is-lower > strong { font-size: clamp(14px, 3.4cqw, 20px); }

.large-interface-text .front-surface { font-size: 108%; }
.force-reduced-motion *,
.force-reduced-motion *::before,
.force-reduced-motion *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }

@media (max-width: 760px) {
  .bottom-display { width: 100%; }
  .screen-label.bottom-label { width: 100%; }
  .login-surface { padding: 13px 16px; }
  .login-aura { top: 3%; left: 4%; width: 48%; height: 90%; }
  .login-copy { left: 16px; bottom: 18px; width: 47%; }
  .login-copy h1 { width: 100%; margin: 3px 0; font-size: clamp(14px, 4.5vw, 25px); }
  .login-copy p { width: 100%; font-size: clamp(7px, 1.8vw, 10px); }
  .login-panel { top: 18%; right: 16px; width: 42%; gap: 4px; padding: 9px; }
  .login-panel input { height: 26px; }
  .front-primary, .front-secondary { min-height: 30px; padding: 5px 7px; }
  .front-primary span, .front-secondary span { font-size: 8px; }
  .front-primary small, .front-secondary small { display: none; }
  .login-surface > .front-notice { right: 16px; bottom: 28px; width: 42%; padding: 3px 5px; font-size: 6px; }
  .login-surface > .controller-legend { display: none; }
  .front-brand .brand-sigil { width: 28px; height: 28px; font-size: 12px; }
  .front-brand strong { font-size: 11px; }
  .front-brand small { font-size: 5px; }
  .front-screen-header { height: 44px; grid-template-columns: 125px 1fr auto; gap: 7px; }
  .front-screen-header h1 { font-size: 11px; }
  .save-surface, .home-surface, .profile-surface, .settings-surface, .mode-surface { padding-right: 12px; padding-left: 12px; }
  .profile-header { grid-template-columns: 125px minmax(0, 1fr) auto auto; }
  .profile-view-tabs { gap: 2px; }
  .profile-view-tabs button { min-height: 22px; padding: 3px 5px; font-size: 5px; }
  .save-slot-grid { height: calc(100% - 125px); gap: 5px; }
  .save-slot { height: 84%; padding: 7px 5px; }
  .slot-portrait { width: 36px; height: 36px; margin-top: 7px; font-size: 14px; }
  .slot-portrait i { width: 13px; height: 13px; font-size: 5px; }
  .slot-name { margin-top: 4px; }
  .slot-name strong { font-size: 9px; }
  .slot-name small, .slot-location, .slot-meta small { font-size: 5px; }
  .slot-meta b { font-size: 7px; }
  .empty-slot b { font-size: 19px; }
  .empty-slot strong { font-size: 8px; }
  .save-top-actions { grid-template-columns: 1.5fr repeat(5, minmax(0, 1fr)); gap: 3px; }
  .save-top-actions button { min-height: 38px; padding: 3px 4px; }
  .save-top-actions .front-primary { min-height: 38px; }
  .save-top-actions .front-primary span,
  .save-top-actions button:not(.front-primary) strong { font-size: 6px; }
  .save-top-actions .front-primary small,
  .save-top-actions button:not(.front-primary) small { display: none; }
  .save-footer { min-height: 18px; gap: 5px; padding: 3px 1px; font-size: 5px; }
  .save-top-notice { display: none; }
  .save-footer .controller-legend { display: none; }
  .front-dialog.version-dialog { grid-template-columns: minmax(0, 1fr); padding-right: 8%; padding-left: 8%; }
  .front-dialog.version-dialog::before { top: 16px; right: 6%; bottom: 16px; left: 6%; }
  .version-choice-dialog > span { font-size: 7px; }
  .version-choice-dialog h2 { margin: 3px 0; font-size: 18px; }
  .version-choice-dialog > p { font-size: 8px; }
  .version-comparison { gap: 6px; margin-top: 8px; }
  .version-comparison article { gap: 2px; padding: 8px 9px; }
  .version-comparison header { font-size: 6px; }
  .version-comparison article > strong { font-size: 10px; }
  .version-comparison time { font-size: 8px; }
  .version-comparison article > small { font-size: 6px; }
  .version-actions { gap: 4px; margin-top: 7px; }
  .version-actions button { min-width: 0; min-height: 38px; padding: 5px 7px; }
  .version-actions button > span { font-size: 8px; }
  .version-actions button small { font-size: 6px; }
  .home-header { height: 35px; }
  .home-header > span, .home-header > i { font-size: 5px; }
  .mode-grid { grid-template-rows: repeat(2, 43px); gap: 5px; margin-top: 6px; }
  .mode-card { grid-template-columns: 25px 1fr 8px; gap: 4px; padding: 4px; }
  .mode-card > i, .mode-card.is-wide > i { width: 23px; height: 23px; font-size: 10px; }
  .mode-card strong, .mode-card.is-wide strong { font-size: 8px; }
  .mode-card small { font-size: 5px; }
  .home-secondary-actions { gap: 5px; margin-top: 5px; }
  .home-secondary-actions button { min-height: 34px; grid-template-columns: 18px 1fr 6px; gap: 4px; padding: 3px 6px; }
  .home-secondary-actions button > i { font-size: 10px; }
  .home-secondary-actions strong { font-size: 7px; }
  .home-secondary-actions small { font-size: 5px; }
  .home-surface > .controller-legend { display: none; }
  .hunter-card { grid-template-columns: 48px 1fr; gap: 8px; padding: 8px 0; }
  .hunter-crest { width: 44px; height: 44px; font-size: 17px; }
  .hunter-crest i { width: 15px; height: 15px; font-size: 6px; }
  .hunter-stat-row { margin-top: 5px; }
  .healer-picker { margin-top: 5px; }
  .healer-picker > div { gap: 3px; margin-top: 3px; }
  .healer-picker button { min-height: 38px; grid-template-columns: 17px 1fr 7px; gap: 3px; padding: 3px; }
  .healer-picker button > i { width: 16px; height: 16px; font-size: 7px; }
  .healer-picker button strong { font-size: 6px; }
  .healer-picker button small { font-size: 4px; }
  .collection-heading { padding: 5px 0; }
  .collection-heading h2 { font-size: 11px; }
  .collection-heading > b { font-size: 5px; }
  .collection-grid { gap: 5px; }
  .collection-drop { height: 119px; padding: 5px; }
  .drop-icon { width: 35px; height: 35px; margin: 2px auto 5px; font-size: 13px; }
  .drop-icon b { min-width: 13px; padding: 1px; font-size: 5px; }
  .collection-drop > strong { min-height: 18px; font-size: 6px; }
  .collection-drop > small, .collection-drop > p { font-size: 4px; }
  .collection-drop > p { right: 5px; bottom: 4px; left: 5px; padding-top: 3px; }
  .collection-note { margin-top: 5px; padding: 3px 5px; }
  .collection-note strong, .collection-note small { font-size: 5px; }
  .trophy-heading { padding-top: 4px; }
  .trophy-case { gap: 5px; }
  .trophy-count-1 .boss-trophy { width: min(180px, 100%); }
  .boss-trophy { height: 211px; }
  .boss-trophy::before { inset: 3px; }
  .trophy-portrait { height: 140px; }
  .trophy-portrait > span { right: 6px; bottom: 3px; font-size: 10px; }
  .trophy-plaque { right: 5px; bottom: 6px; left: 5px; }
  .trophy-plaque small, .trophy-state { font-size: 4px; }
  .trophy-plaque strong { font-size: 7px; }
  .trophy-plaque span { margin-top: 2px; font-size: 4px; }
  .trophy-state { top: 6px; left: 6px; padding: 2px 3px; }
  .trophy-note { margin-top: 4px; }
  .boss-stats-heading { padding-top: 3px; }
  .boss-stats-layout { height: 213px; grid-template-columns: minmax(138px, .82fr) minmax(0, 1.18fr); gap: 4px; }
  .boss-stat-selector { gap: 2px; }
  .boss-stat-selector button { min-height: 33px; grid-template-columns: 18px minmax(0, 1fr) 18px; gap: 3px; padding: 2px 4px; }
  .boss-stat-selector button > i { width: 16px; height: 16px; font-size: 7px; }
  .boss-stat-selector strong { font-size: 6px; }
  .boss-stat-selector small { font-size: 4px; }
  .boss-stat-selector button > b { font-size: 9px; }
  .leaderboard-panel > header { height: 35px; padding: 3px 6px; }
  .leaderboard-panel > header small { font-size: 4px; }
  .leaderboard-panel > header strong { font-size: 7px; }
  .leaderboard-panel > header > b { font-size: 4px; }
  .leaderboard-rows { min-height: 139px; padding: 2px 4px; }
  .leaderboard-rows > div, .leaderboard-self { min-height: 25px; grid-template-columns: 20px minmax(0, 1fr) 24px; gap: 3px; padding: 2px 3px; }
  .leaderboard-rows > div > b, .leaderboard-self > b { font-size: 7px; }
  .leaderboard-rows strong, .leaderboard-self strong { font-size: 5px; }
  .leaderboard-rows small, .leaderboard-self small { font-size: 3px; }
  .leaderboard-rows em, .leaderboard-self em { font-size: 8px; }
  .leaderboard-self { min-height: 29px; margin: 0 4px 3px; }
  .leaderboard-status, .leaderboard-empty { min-height: 139px; padding: 7px; font-size: 5px; }
  .leaderboard-empty { min-height: 130px !important; }
  .settings-layout { gap: 7px; padding-top: 7px; }
  .volume-setting { height: 98px; padding: 7px; }
  .volume-setting strong { font-size: 8px; }
  .volume-setting small { font-size: 5px; }
  .volume-setting > div { grid-template-columns: 22px 1fr 22px; gap: 3px; margin-top: 8px; }
  .volume-setting button { height: 21px; font-size: 9px; }
  .volume-setting > div b { font-size: 11px; }
  .volume-setting > i { right: 7px; bottom: 7px; left: 7px; }
  .setting-row { min-height: 35px; margin-bottom: 3px; padding: 3px 5px; }
  .setting-row strong { font-size: 7px; }
  .setting-row small { font-size: 5px; }
  .setting-row > b { min-width: 25px; padding: 2px; font-size: 5px; }
  .settings-save-state { margin-top: 4px; padding: 3px 5px; font-size: 5px; }
  .mode-hero { width: 58%; margin: 18px 0 0 8px; }
  .mode-hero h2 { margin: 3px 0; font-size: 18px; }
  .mode-hero p { font-size: 7px; }
  .mode-hero > span, .mode-hero > b { margin-top: 4px; font-size: 5px; }
  .boss-picker { top: 54px; right: 14px; left: 14px; gap: 3px; }
  .boss-group-grid { gap: 3px; }
  .boss-group-choice { min-height: 23px; grid-template-columns: 16px minmax(0, 1fr); gap: 3px; padding: 2px 3px; }
  .boss-group-choice > b { width: 15px; height: 15px; font-size: 6px; }
  .boss-group-choice strong { font-size: 5px; }
  .boss-group-choice small { font-size: 4px; }
  .boss-group-heading { padding-top: 1px; }
  .boss-group-heading > span { font-size: 7px; }
  .boss-group-heading > small { font-size: 4px; }
  .boss-choice-grid { gap: 3px; }
  .boss-picker-heading { min-height: 11px; }
  .boss-picker-heading > span { font-size: 4px; }
  .boss-picker-heading button { min-width: 42px; padding: 1px 3px; font-size: 4px; }
  .boss-choice { min-height: 27px; grid-template-columns: 18px 1fr 9px; gap: 4px; padding: 3px 4px; }
  .boss-choice > i { width: 16px; height: 16px; font-size: 7px; }
  .boss-choice strong { font-size: 6px; }
  .boss-choice small { font-size: 4px; }
  .mode-launch { right: 14px; bottom: 25px; width: 33%; min-height: 33px; padding: 5px 7px; }
  .mode-launch span { font-size: 7px; }
  .mode-launch small { font-size: 4px; }
  .game-menu-button { padding: 3px 5px; font-size: 6px; }
}

/* Data-driven loot and gear workshop */

.home-secondary-actions { grid-template-columns: repeat(3, 1fr); }
.collection-grid { grid-template-columns: repeat(3, 1fr); gap: 9px; }
.collection-drop { height: 154px; padding: 8px 9px; }
.collection-drop.rarity-epic { border-top-color: #a071c1; }
.collection-drop.rarity-legendary { border-top-color: #d79b42; }
.collection-drop .drop-icon { width: 48px; height: 48px; margin: 2px auto 5px; font-size: 20px; }
.collection-drop > strong { min-height: 26px; font-size: 10px; }
.collection-drop > p { right: 9px; bottom: 7px; left: 9px; }

.difficulty-picker { position: absolute; left: 52px; bottom: 25px; width: 52%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.difficulty-picker > span { grid-column: 1 / -1; color: #71867e; font-size: 7px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.difficulty-picker button { min-height: 39px; display: grid; padding: 5px 7px; text-align: left; }
.difficulty-picker button strong { font-size: 8px; }
.difficulty-picker button small { color: #71867e; font-size: 6px; }
.difficulty-picker button.is-selected { border-color: var(--gold); color: var(--gold-strong); background: rgba(96,76,27,.22); }
.mode-dungeons .difficulty-picker { bottom: 75px; }
.mode-dungeons .mode-launch { bottom: 68px; }
.mode-loot-preview { position: absolute; right: 5.5%; bottom: 89px; left: 5.5%; display: grid; padding: 9px 12px; border-left: 2px solid var(--gold); background: rgba(69,55,19,.14); }
.mode-loot-preview span { color: var(--gold); font-size: 7px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.mode-loot-preview b { font-size: 10px; }
.mode-loot-preview small { color: #71867e; font-size: 7px; }

.gear-surface { padding: 0 28px; }
.gear-surface .front-screen-header { grid-template-columns: 190px minmax(0, 1fr) auto auto; }
.gear-mode-tabs { display: flex; gap: 4px; }
.gear-mode-tabs button { padding: 6px 8px; color: #7f958c; font-size: 7px; font-weight: 700; text-transform: uppercase; }
.gear-mode-tabs button.is-selected { border-color: var(--gold); color: var(--gold-strong); background: rgba(72,58,21,.2); }
.gear-workshop-layout { box-sizing: border-box; height: calc(100% - 91px); display: grid; grid-template-columns: 190px 220px 1fr; gap: 11px; padding-top: 12px; }
.gear-owner-list,
.gear-slot-list { display: grid; align-content: start; gap: 5px; }
.gear-owner-list button,
.gear-slot-list button { width: 100%; min-height: 43px; display: grid; align-items: center; gap: 8px; padding: 6px 9px; text-align: left; }
.gear-owner-list button { grid-template-columns: 1fr 15px; }
.gear-slot-list button { grid-template-columns: 27px 1fr 28px; }
.gear-owner-list button > span,
.gear-slot-list button > span { display: grid; }
.gear-owner-list strong,
.gear-slot-list strong { font-size: 9px; }
.gear-owner-list small,
.gear-slot-list small { color: #71867e; font-size: 6px; text-transform: uppercase; }
.gear-owner-list button > b,
.gear-slot-list button > b { color: var(--gold); font-size: 10px; text-align: right; }
.gear-slot-list button > i { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #3d554c; color: #8fc4b1; font-style: normal; }
.gear-owner-list button.is-selected,
.gear-slot-list button.is-selected { border-color: var(--gold); box-shadow: inset 3px 0 var(--gold); background: rgba(72,58,21,.16); }
.gear-owner-list button.is-upgrade-ready,
.gear-slot-list button.is-upgrade-ready { border-color: #65e6a8; box-shadow: inset 3px 0 #65e6a8, 0 0 12px rgba(101,230,168,.28); background: rgba(29,103,72,.2); }
.gear-owner-list button.is-upgrade-ready.is-selected,
.gear-slot-list button.is-upgrade-ready.is-selected { box-shadow: inset 3px 0 var(--gold), 0 0 0 1px rgba(101,230,168,.35), 0 0 12px rgba(101,230,168,.28); }
.gear-preview { padding: 16px; border: 1px solid var(--line); background: radial-gradient(circle at 70% 20%, rgba(232,200,114,.1), transparent 45%), rgba(7,18,15,.84); }
.gear-preview > span { color: var(--gold); font-size: 7px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.gear-preview h2 { margin: 8px 0; font: 500 17px "Cinzel", serif; }
.gear-preview p { color: #81958d; font-size: 9px; line-height: 1.45; }
.gear-stat-comparison { display: grid; grid-template-columns: 1fr 20px 1fr; align-items: center; gap: 7px; margin-top: 24px; }
.gear-stat-comparison > span { display: grid; padding: 11px; border: 1px solid #354b43; background: rgba(4,13,11,.7); }
.gear-stat-comparison small { color: #71867e; font-size: 6px; text-transform: uppercase; }
.gear-stat-comparison strong { color: var(--gold-strong); font: 500 18px "Cinzel", serif; }
.gear-stat-comparison > i { color: #60766d; font-style: normal; text-align: center; }
.gear-infusion-preview h2 { margin-bottom: 4px; }
.gear-infusion-options,
.gear-passive-options { display: grid; gap: 4px; margin-top: 9px; }
.gear-infusion-options button,
.gear-passive-choice-list button { min-height: 39px; display: grid; grid-template-columns: 24px 1fr 12px; align-items: center; gap: 6px; padding: 4px 6px; text-align: left; }
.gear-infusion-options button > i,
.gear-passive-choice-list button > i { color: #8fc4b1; font-size: 12px; font-style: normal; text-align: center; }
.gear-infusion-options button > span,
.gear-passive-choice-list button > span { min-width: 0; display: grid; }
.gear-infusion-options button strong,
.gear-passive-choice-list button strong { overflow: hidden; color: #dbe8e3; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.gear-infusion-options button small,
.gear-passive-choice-list button small { overflow: hidden; color: #71867e; font-size: 5px; text-overflow: ellipsis; white-space: nowrap; }
.gear-infusion-options button > b,
.gear-passive-choice-list button > b { color: var(--gold); font-size: 9px; }
.gear-infusion-options button.is-selected { border-color: var(--gold); background: rgba(72,58,21,.16); }
.gear-infusion-options button.is-equipped,
.gear-passive-choice-list button.is-equipped { box-shadow: inset 3px 0 #67c89e; }
.gear-passive-options > span { color: #71867e; font-size: 5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.gear-passive-ability-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.gear-passive-ability-filter button { min-width: 0; min-height: 22px; padding: 2px 4px; color: #829890; font-size: 6px; }
.gear-passive-ability-filter button.is-selected { border-color: var(--gold); color: var(--gold-strong); background: rgba(72,58,21,.16); }
.gear-passive-choice-list { display: grid; gap: 3px; }
.gear-passive-choice-list button { min-width: 0; grid-template-columns: 18px 1fr 10px; }
.gear-passive-choice-list button.is-selected { border-color: #70b99d; background: rgba(46,103,81,.14); }

.gear-context { padding: 0 5.5% 18px; }
.gear-context .context-header { margin: 0 -5.8%; }
.gear-costs { margin-top: 16px; }
.gear-costs > span { color: #71867e; font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.gear-costs article { min-height: 68px; display: grid; grid-template-columns: 28px 1fr 48px; align-items: center; gap: 10px; margin-top: 8px; padding: 9px 11px; border: 1px solid var(--line); background: rgba(6,17,14,.78); }
.gear-costs article > i { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid currentColor; color: #ba6f68; font-style: normal; }
.gear-costs article.is-met > i { color: #67c89e; }
.gear-costs article > span { display: grid; }
.gear-costs strong { font-size: clamp(9px, 2cqw, 12px); }
.gear-costs small { color: #71867e; font-size: clamp(6px, 1.35cqw, 8px); }
.gear-costs article > b { color: var(--gold); font-size: 12px; text-align: right; }
.gear-upgrade-action { position: absolute; right: 5.5%; bottom: 57px; left: 5.5%; min-height: 56px; display: grid; padding: 9px 13px; border-color: var(--gold); color: #182019; background: linear-gradient(110deg, #ffe499, #d1af54); text-align: left; }
.gear-upgrade-action:disabled { border-color: #42554e; color: #71827c; background: #13201c; }
.gear-upgrade-action span { font: 600 clamp(10px, 2.3cqw, 14px) "Cinzel", serif; }
.gear-upgrade-action small { font-size: clamp(6px, 1.35cqw, 8px); }
.gear-passive-context-action { position: absolute; right: 5.5%; bottom: 57px; left: 5.5%; min-height: 56px; display: grid; align-content: center; padding: 9px 13px; border: 1px solid #67c89e; color: #dce8e3; background: rgba(20,55,43,.72); }
.gear-passive-context-action span { font: 600 clamp(10px, 2.3cqw, 14px) "Cinzel", serif; }
.gear-passive-context-action small { color: #8aa198; font-size: clamp(6px, 1.35cqw, 8px); }

@media (min-width: 761px) and (max-width: 1000px) and (max-height: 650px) {
  .gear-surface { padding: 0 12px; }
  .gear-surface .front-screen-header { grid-template-columns: 125px minmax(0, 1fr) auto auto; }
  .gear-mode-tabs { gap: 2px; }
  .gear-mode-tabs button { padding: 3px 4px; font-size: 4px; }
  .gear-workshop-layout { height: calc(100% - 81px); grid-template-columns: 27% 31% 1fr; gap: 4px; padding-top: 5px; }
  .gear-owner-list,
  .gear-slot-list { gap: 2px; }
  .gear-owner-list button,
  .gear-slot-list button { min-height: 27px; gap: 3px; padding: 2px 4px; }
  .gear-slot-list button { grid-template-columns: 16px 1fr 17px; }
  .gear-owner-list strong,
  .gear-slot-list strong { font-size: 5px; }
  .gear-owner-list small,
  .gear-slot-list small { font-size: 4px; }
  .gear-slot-list button > i { width: 14px; height: 14px; font-size: 6px; }
  .gear-preview { padding: 6px; }
  .gear-preview h2 { margin: 3px 0; font-size: 8px; }
  .gear-preview p { font-size: 5px; }
  .gear-preview > span { font-size: 4px; }
  .gear-infusion-options,
  .gear-passive-options { gap: 2px; margin-top: 3px; }
  .gear-infusion-options button,
  .gear-passive-choice-list button { min-height: 25px; grid-template-columns: 12px 1fr 8px; gap: 2px; padding: 2px 3px; }
  .gear-infusion-options button > i,
  .gear-passive-choice-list button > i { font-size: 6px; }
  .gear-infusion-options button strong,
  .gear-passive-choice-list button strong { font-size: 4px; }
  .gear-infusion-options button small,
  .gear-passive-choice-list button small,
  .gear-passive-options > span { font-size: 3px; }
  .gear-passive-ability-filter { gap: 2px; }
  .gear-passive-ability-filter button { min-height: 14px; padding: 1px 2px; font-size: 3px; }
}

.reward-summary { display: grid; gap: 4px; margin: 8px 0; }
.reward-summary > span { padding: 5px 7px; border: 1px solid rgba(232,200,114,.25); color: #dbe8e3; background: rgba(68,54,18,.17); font-size: 8px; }
.reward-summary b { margin-right: 6px; color: var(--gold); }
.reward-summary i { color: #d79b42; font-style: normal; }

@media (max-width: 760px) {
  .home-secondary-actions { grid-template-columns: repeat(3, 1fr); }
  .collection-grid { grid-template-columns: repeat(3, 1fr); }
  .collection-drop { height: 96px; padding: 4px 5px; }
  .collection-drop .drop-icon { width: 25px; height: 25px; margin: 1px auto 2px; font-size: 10px; }
  .collection-drop > strong { min-height: 12px; font-size: 5px; }
  .collection-drop > p { display: none; }
  .collection-note { margin-top: 3px; padding: 2px 4px; }
  .profile-stats span { padding: 5px 7px; }
  .profile-stats strong { font-size: 12px; }
  .boss-log { margin-top: 5px; }
  .boss-log button { min-height: 40px; gap: 5px; margin-top: 3px; padding: 3px 6px; }
  .boss-log button > i { width: 23px; height: 23px; }
  .difficulty-picker { left: 16px; bottom: 23px; width: 58%; gap: 2px; }
  .difficulty-picker button { min-height: 27px; padding: 2px 3px; }
  .difficulty-picker button strong { font-size: 5px; }
  .difficulty-picker button small,
  .difficulty-picker > span { font-size: 4px; }
  .mode-dungeons .mode-hero { display: none; }
  .mode-dungeons .boss-picker { top: 49px; right: 12px; left: 12px; width: auto; gap: 2px; }
  .mode-dungeons .boss-group-grid, .mode-dungeons .boss-choice-grid { gap: 2px; }
  .mode-dungeons .boss-group-choice { min-height: 22px; grid-template-columns: 15px minmax(0, 1fr); gap: 2px; padding: 2px; }
  .mode-dungeons .boss-group-choice > b { width: 14px; height: 14px; font-size: 6px; }
  .mode-dungeons .boss-group-choice strong { font-size: 5px; }
  .mode-dungeons .boss-group-choice small { display: none; }
  .mode-dungeons .boss-group-heading > span { font-size: 6px; }
  .mode-dungeons .boss-group-heading > small { font-size: 4px; }
  .mode-dungeons .boss-choice { min-width: 0; min-height: 27px; grid-template-columns: 15px 1fr 7px; gap: 2px; padding: 2px 3px; }
  .mode-dungeons .boss-choice > i { width: 14px; height: 14px; font-size: 6px; }
  .mode-dungeons .boss-choice strong { overflow: hidden; font-size: 5px; text-overflow: ellipsis; white-space: nowrap; }
  .mode-dungeons .boss-choice small { display: none; }
  .mode-dungeons .difficulty-picker { right: 39%; bottom: 17px; left: 12px; width: auto; }
  .mode-dungeons .mode-launch { right: 12px; bottom: 17px; width: 34%; }
  .gear-surface { padding: 0 12px; }
  .gear-surface .front-screen-header { grid-template-columns: 125px minmax(0, 1fr) auto auto; }
  .gear-mode-tabs { gap: 2px; }
  .gear-mode-tabs button { padding: 3px 4px; font-size: 4px; }
  .gear-workshop-layout { height: calc(100% - 53px); grid-template-columns: 27% 31% 1fr; gap: 4px; padding-top: 5px; }
  .gear-owner-list,
  .gear-slot-list { gap: 2px; }
  .gear-owner-list button,
  .gear-slot-list button { min-height: 27px; gap: 3px; padding: 2px 4px; }
  .gear-slot-list button { grid-template-columns: 16px 1fr 17px; }
  .gear-owner-list strong,
  .gear-slot-list strong { font-size: 5px; }
  .gear-owner-list small,
  .gear-slot-list small { font-size: 4px; }
  .gear-slot-list button > i { width: 14px; height: 14px; font-size: 6px; }
  .gear-preview { padding: 6px; }
  .gear-preview h2 { margin: 3px 0; font-size: 8px; }
  .gear-preview p { font-size: 5px; }
  .gear-stat-comparison { gap: 2px; margin-top: 7px; }
  .gear-stat-comparison > span { padding: 4px; }
  .gear-stat-comparison strong { font-size: 9px; }
  .gear-stat-comparison small,
  .gear-preview > span { font-size: 4px; }
  .gear-infusion-options,
  .gear-passive-options { gap: 2px; margin-top: 3px; }
  .gear-infusion-options button,
  .gear-passive-choice-list button { min-height: 25px; grid-template-columns: 12px 1fr 8px; gap: 2px; padding: 2px 3px; }
  .gear-infusion-options button > i,
  .gear-passive-choice-list button > i { font-size: 6px; }
  .gear-infusion-options button strong,
  .gear-passive-choice-list button strong { font-size: 4px; }
  .gear-infusion-options button small,
  .gear-passive-choice-list button small,
  .gear-passive-options > span { font-size: 3px; }
  .gear-passive-ability-filter { gap: 2px; }
  .gear-passive-ability-filter button { min-height: 14px; padding: 1px 2px; font-size: 3px; }
}
