@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=UnifrakturCook:wght@700&family=Grenze+Gotisch:wght@500;600;700;800;900&family=Pirata+One&family=Inter:wght@400;600;700;800;900&display=swap');

:root {
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-title: "Grenze Gotisch", "Cinzel", Georgia, "Times New Roman", serif;
  --font-gothic: "UnifrakturCook", "Pirata One", "Grenze Gotisch", Georgia, serif;
  --font-ritual: "Pirata One", "Grenze Gotisch", Georgia, serif;
  --font-numeric: "Inter", ui-sans-serif, system-ui, sans-serif;
  --bg: #050505;
  --bg-2: #0b0c0c;
  --ink: #0f1110;
  --panel: rgba(18, 19, 18, 0.88);
  --panel-solid: #141615;
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(216, 224, 216, 0.12);
  --line-strong: rgba(230, 238, 230, 0.22);
  --text: #f1f0ea;
  --text-soft: #c7c4bb;
  --muted: #8f918b;
  --cel: #66d982;
  --cel-strong: #86f29f;
  --cel-dim: rgba(102, 217, 130, 0.12);
  --bone: #d8d2c2;
  --danger: #ff4b5c;
  --warning: #d99a35;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.36);
  --radius-cut: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12% -8%, rgba(102, 217, 130, 0.08), transparent 28rem),
    radial-gradient(circle at 90% 8%, rgba(180, 180, 170, 0.055), transparent 24rem),
    linear-gradient(135deg, #030303 0%, #0a0b0b 43%, #050505 100%);
}

body::before,
.site-backdrop {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.021) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.016) 1px, transparent 1px),
    radial-gradient(circle at 50% 15%, rgba(255,255,255,0.035), transparent 30rem);
  background-size: 54px 54px, 54px 54px, auto;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.82), rgba(0,0,0,0.18));
}

.site-backdrop {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.72), transparent 22%, transparent 78%, rgba(0,0,0,0.70)),
    radial-gradient(circle at 50% 55%, rgba(102, 217, 130, 0.045), transparent 36rem),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.018) 0, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 18px);
  opacity: 0.92;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 34px));
  margin: 0 auto;
  padding: 20px 0 44px;
}

.hero {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: clamp(20px, 3.6vw, 34px);
  border: 1px solid rgba(224, 224, 214, 0.18);
  background: url("/assets/hero-raven-banner.png") center 30% / cover no-repeat;
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 32px 100%, 0 calc(100% - 32px));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.02) 48%, rgba(0,0,0,0.16) 100%);
  opacity: 1;
}

.hero::after {
  content: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 0;
  border-left: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero__eyebrow,
.section-kicker {
  letter-spacing: 0.18em;
  color: var(--cel-strong);
  font-weight: 900;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 9px 0 9px;
  color: var(--text);
  font-size: clamp(2.15rem, 5vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(34, 84, 52, 0.35), 0 2px 10px rgba(0,0,0,0.72), 0 0 2px rgba(0,0,0,0.9);
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: #e0ddd3;
  font-size: clamp(0.94rem, 1.5vw, 1.05rem);
  line-height: 1.48;
  text-shadow: 0 2px 8px rgba(0,0,0,0.65);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.status-pill,
.section-status,
.card__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(102, 217, 130, 0.34);
  color: var(--cel-strong);
  background: rgba(102, 217, 130, 0.07);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero__meta {
  color: var(--muted);
  font-size: 0.88rem;
}


.dashboard {
  display: grid;
  gap: 24px;
  margin-top: 12px;
}

.section-block {
  display: grid;
  gap: 8px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
}

.section-heading h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: clamp(1.12rem, 1.8vw, 1.48rem);
  letter-spacing: -0.045em;
}

.grid {
  display: grid;
  gap: 11px;
}

.grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  position: relative;
  overflow: hidden;
  padding: 13px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.048), rgba(255,255,255,0.018)),
    rgba(17, 18, 17, 0.88);
  box-shadow: var(--shadow-soft);
  clip-path: var(--radius-cut);
  backdrop-filter: blur(8px);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), transparent 38%);
  opacity: 0.5;
}

.wide { width: 100%; }

.card__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.card__label {
  color: var(--bone);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
}

.card__tag {
  border-color: rgba(216, 224, 216, 0.16);
  background: rgba(255,255,255,0.035);
  color: var(--muted);
}

.clock-card { overflow: hidden; }

.clock-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(102,217,130,0.48), rgba(216,210,194,0.18), transparent);
  opacity: 0.75;
}

.clock {
  position: relative;
  z-index: 1;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.15rem, 5.5vw, 4.05rem);
  font-weight: 950;
  letter-spacing: -0.07em;
  line-height: 1;
  color: #f4f0e6;
}

.muted {
  position: relative;
  z-index: 1;
  color: var(--muted);
}

.timer-list {
  display: grid;
  gap: 8px;
}

.timer-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(230, 238, 230, 0.10);
  background: rgba(255, 255, 255, 0.032);
}

.timer-title {
  color: var(--text);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.timer-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.timer-value {
  font-variant-numeric: tabular-nums;
  color: var(--cel-strong);
  font-size: clamp(1.35rem, 3.15vw, 2.1rem);
  font-weight: 950;
  white-space: nowrap;
  letter-spacing: -0.04em;
}

.empty-state {
  color: var(--muted);
  border: 1px dashed var(--line);
  padding: 14px;
  background: rgba(255,255,255,0.018);
}

.countdown-card .timer-item.urgent {
  border-color: rgba(217, 154, 53, 0.45);
  background: linear-gradient(90deg, rgba(217,154,53,0.12), rgba(255,255,255,0.025));
}

.countdown-card .timer-item.critical {
  border-color: rgba(255, 75, 92, 0.56);
  background: linear-gradient(90deg, rgba(255,75,92,0.15), rgba(255,255,255,0.025));
}

.countdown-card .timer-item.critical .timer-value { color: var(--danger); }
.countdown-card .timer-item.urgent .timer-value { color: var(--warning); }

.links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.links a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(230, 238, 230, 0.13);
  padding: 13px;
  background: linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018));
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.links a small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: none;
}

.links a:hover {
  transform: translateY(-2px);
  border-color: rgba(102,217,130,0.48);
  background: linear-gradient(135deg, rgba(102,217,130,0.075), rgba(255,255,255,0.032));
}

/* AvA */
.ava-card { overflow: hidden; }

.ava-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 82% 18%, rgba(255, 75, 92, 0.055), transparent 22rem);
  opacity: 0.75;
}

.ava-grid,
.combat-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.ava-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ava-panel,
.combat-panel {
  padding: 12px;
  border: 1px solid rgba(230, 238, 230, 0.10);
  background: rgba(255, 255, 255, 0.031);
  min-width: 0;
}

.ava-panel-main,
.combat-panel-main {
  background: linear-gradient(135deg, rgba(102,217,130,0.055), rgba(255,255,255,0.026));
}

.ava-main,
.combat-main {
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(1.2rem, 2.65vw, 1.9rem);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.shield-panel {
  transition: border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.shield-value { margin-top: 8px; }

.shield-bar {
  margin-top: 10px;
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.045);
}

.shield-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cel), #c8c966, var(--warning), var(--danger));
  transition: width 400ms ease;
}

.shield-safe .shield-value { color: var(--cel-strong); }
.shield-alert .shield-value { color: #c8c966; }
.shield-warning .shield-value { color: #e0c35a; }
.shield-danger .shield-value { color: var(--warning); }

.shield-danger,
.shield-critical,
.shield-up {
  border-color: rgba(255, 75, 92, 0.56);
  background: linear-gradient(135deg, rgba(255, 75, 92, 0.13), rgba(255,255,255,0.03));
}

.shield-critical .shield-value,
.shield-up .shield-value {
  color: var(--danger);
}

.shield-up .shield-value {
  animation: shieldPulse 1.35s ease-in-out infinite;
  font-size: clamp(1.55rem, 3.8vw, 2.35rem);
}

.shield-rest .shield-value { color: var(--muted); }

.ava-card[data-status="shield_up"] .card__tag {
  color: var(--danger);
  border-color: rgba(255, 75, 92, 0.7);
}

.ava-card[data-status="rest_day"] .card__tag { color: var(--muted); }

.ava-card[data-status="rest_day"] .ava-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.ava-card[data-status="rest_day"] #avaNextPhasePanel {
  grid-column: 1 / -1;
  background: linear-gradient(90deg, rgba(102,217,130,0.075), rgba(216,210,194,0.035));
}

.ava-card[data-status="rest_day"] #avaNextPhase {
  font-size: clamp(2.05rem, 4.2vw, 3.4rem);
}

.ava-card[data-status="shield_up"] #shieldPanel {
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at 82% 35%, rgba(255, 75, 92, 0.20), transparent 40%),
    linear-gradient(90deg, rgba(255, 75, 92, 0.20), rgba(18, 18, 18, 0.84));
  border-color: rgba(255, 75, 92, 0.75);
}

.ava-card[data-status="shield_up"] #shieldValue {
  color: var(--danger);
  letter-spacing: 0.08em;
}

@keyframes shieldPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.015); filter: brightness(1.18); }
}

/* Combat */
.combat-card { overflow: hidden; }

.combat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 18%, rgba(216,210,194,0.06), transparent 18rem),
    radial-gradient(circle at 82% 35%, rgba(102,217,130,0.045), transparent 18rem);
  opacity: 0.84;
}

.combat-grid { grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr); }

.combat-card .card__tag {
  color: var(--cel-strong);
  border-color: rgba(102,217,130,0.30);
}

.combat-card[data-phase="4"] .combat-main,
.combat-card[data-phase="5"] .combat-main,
.combat-card[data-phase="6"] .combat-main {
  color: #d3d0a0;
}

@media (max-width: 860px) {
  .app-shell { width: min(100% - 22px, 1160px); padding-top: 12px; }
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .hero__visual {
    position: absolute;
    right: -36px;
    bottom: -56px;
    width: 190px;
    opacity: 0.18;
  }
  .grid--two,
  .combat-grid,
  .ava-grid,
  .ava-card[data-status="rest_day"] .ava-grid,
  .links {
    grid-template-columns: 1fr;
  }
  .timer-item { grid-template-columns: 1fr; }
  .timer-value { white-space: normal; }
  .section-heading { align-items: flex-start; }
}

@media (max-width: 520px) {
  .app-shell { width: min(100% - 14px, 1160px); padding-bottom: 34px; }
  .hero { padding: 20px; clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); }
  .hero h1 { font-size: clamp(1.75rem, 11vw, 2.65rem); }
  .hero__meta { display: none; }
  .dashboard { gap: 14px; margin-top: 14px; }
  .card { padding: 16px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }
  .clock { font-size: clamp(2.15rem, 13.5vw, 3.25rem); }
  .ava-main, .combat-main { font-size: clamp(1.15rem, 6.5vw, 1.65rem); }
  .timer-value { font-size: clamp(1.35rem, 7.5vw, 2.15rem); }
  .section-heading h2 { font-size: 1.25rem; }
  .section-kicker, .card__label { font-size: 0.7rem; }
}

/* V3.2 dark gothic typography */
.hero__eyebrow,
.section-kicker,
.card__label,
.card__tag,
.section-status,
.status-pill {
  font-family: var(--font-title);
  letter-spacing: 0.105em;
}

.hero h1 {
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: -0.035em;
  text-shadow: 0 2px 0 rgba(0,0,0,0.75), 0 16px 42px rgba(0,0,0,0.45);
}

.section-heading h2 {
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: -0.018em;
}

.timer-title {
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: 0.015em;
}

.ava-main,
.combat-main {
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: -0.018em;
}

.clock,
.timer-value {
  font-family: var(--font-numeric);
  letter-spacing: -0.035em;
}

.hero__eyebrow {
  color: var(--bone);
}

#appTitle::first-letter {
  color: var(--cel-strong);
}

.links a span {
  font-family: var(--font-title);
  letter-spacing: 0.035em;
}



/* V3.1 compact tuning */
.hero__eyebrow,
.section-kicker {
  font-size: 0.68rem;
}

.card__label {
  font-size: 0.70rem;
}

.card__tag,
.section-status,
.status-pill {
  min-height: 24px;
  padding: 4px 9px;
  font-size: 0.66rem;
}

.timer-meta,
.muted {
  font-size: 0.82rem;
}

.clock-card::before {
  height: 2px;
}

@media (min-width: 861px) {
  .section-block--clocks .card {
    min-height: 150px;
  }

  .system-card,
  .combat-card,
  .ava-card,
  .countdown-card,
  .quick-links {
    padding: 16px 18px;
  }
}

@media (max-width: 520px) {
  .hero p {
    font-size: 0.92rem;
  }

  .hero__actions {
    margin-top: 14px;
  }

  .timer-item {
    gap: 7px;
  }
}


/* V3.3 stronger gothic direction */
.hero h1 {
  font-family: var(--font-gothic);
  text-transform: none;
  font-weight: 700;
  letter-spacing: 0.008em;
  line-height: 0.9;
  color: #f3eddf;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.86),
    0 18px 40px rgba(0,0,0,0.62),
    0 0 18px rgba(102,217,130,0.10);
}

.hero__eyebrow,
.section-kicker {
  font-family: var(--font-ritual);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: #cfc7b3;
}

.section-heading h2 {
  font-family: var(--font-ritual);
  font-size: clamp(1.25rem, 2.05vw, 1.7rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #eee6d5;
}

.card__label {
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #d9d1bd;
}

.card__tag,
.section-status,
.status-pill {
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: 0.13em;
}

.timer-title {
  font-family: var(--font-ritual);
  font-weight: 400;
  font-size: 1.02rem;
  letter-spacing: 0.035em;
  text-transform: none;
  color: #eee5d3;
}

.ava-main,
.combat-main {
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: 0.006em;
  color: #f0eadc;
}

.links a span {
  font-family: var(--font-ritual);
  font-weight: 400;
  font-size: 1.08rem;
  letter-spacing: 0.045em;
  text-transform: none;
}

.clock,
.timer-value {
  font-family: var(--font-numeric);
  font-weight: 900;
}

.card::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216,210,194,0.18), rgba(102,217,130,0.14), transparent);
  pointer-events: none;
  z-index: 1;
}

.hero::before {
  opacity: 0.68;
}

#appTitle::first-letter {
  color: #e8dec7;
  text-shadow: 0 0 16px rgba(102,217,130,0.18), 0 2px 0 #000;
}

@media (max-width: 520px) {
  .hero h1 {
    font-size: clamp(2.0rem, 12vw, 3.0rem);
    line-height: 0.92;
  }

  .timer-title {
    font-size: 0.98rem;
  }

  .section-heading h2 {
    font-size: 1.38rem;
  }
}

/* V3.4 refined gothic halo typography */
.hero h1 {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: clamp(2.45rem, 5.55vw, 5.15rem);
  letter-spacing: 0.004em;
  line-height: 0.90;
  color: #f1eadc;
  -webkit-text-stroke: 0.45px rgba(41, 93, 61, 0.72);
  text-shadow:
    -1px -1px 0 rgba(20, 64, 39, 0.55),
     1px -1px 0 rgba(20, 64, 39, 0.48),
    -1px  1px 0 rgba(20, 64, 39, 0.48),
     1px  1px 0 rgba(20, 64, 39, 0.50),
     0 0 10px rgba(50, 126, 76, 0.32),
     0 0 24px rgba(34, 92, 56, 0.24),
     0 14px 36px rgba(0, 0, 0, 0.72);
}

.hero h1 strong,
#appTitle {
  font-weight: 500;
}

#appTitle::first-letter {
  color: #f1eadc;
  text-shadow:
    -1px -1px 0 rgba(20, 64, 39, 0.65),
     1px  1px 0 rgba(20, 64, 39, 0.58),
     0 0 16px rgba(79, 171, 105, 0.34),
     0 2px 0 #000;
}

.combat-main,
#avaDay {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: clamp(1.42rem, 3.05vw, 2.22rem);
  letter-spacing: 0.012em;
  line-height: 1.02;
  color: #f0eadc;
  -webkit-text-stroke: 0.30px rgba(37, 83, 52, 0.62);
  text-shadow:
    -1px -1px 0 rgba(16, 48, 30, 0.55),
     1px  1px 0 rgba(16, 48, 30, 0.50),
     0 0 9px rgba(52, 128, 76, 0.26),
     0 9px 24px rgba(0, 0, 0, 0.60);
}

.combat-card[data-phase="4"] .combat-main,
.combat-card[data-phase="5"] .combat-main,
.combat-card[data-phase="6"] .combat-main {
  color: #e9dfbf;
  -webkit-text-stroke-color: rgba(112, 91, 42, 0.58);
  text-shadow:
    -1px -1px 0 rgba(76, 57, 22, 0.48),
     1px  1px 0 rgba(76, 57, 22, 0.48),
     0 0 12px rgba(217, 154, 53, 0.22),
     0 9px 24px rgba(0, 0, 0, 0.60);
}

@media (max-width: 520px) {
  .hero h1 {
    font-size: clamp(2.15rem, 13vw, 3.35rem);
    line-height: 0.91;
  }

  .combat-main,
  #avaDay {
    font-size: clamp(1.38rem, 7.3vw, 1.92rem);
  }
}

/* V3.5 unified dark timer typography */
:root {
  --timer-ink: #d7d3c8;
  --timer-ink-soft: #c4beb0;
  --timer-shadow-dark: rgba(0, 0, 0, 0.78);
}

.clock,
.timer-value,
#combatNextPhaseIn,
#avaNextPhase,
#shieldValue {
  font-family: "Cinzel", "Grenze Gotisch", Georgia, "Times New Roman", serif;
  font-weight: 700;
  color: var(--timer-ink) !important;
  letter-spacing: 0.015em;
  -webkit-text-stroke: 0.22px rgba(0, 0, 0, 0.62);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.92),
    0 0 10px rgba(216, 210, 194, 0.08),
    0 8px 20px var(--timer-shadow-dark);
}

.clock {
  font-size: clamp(1.72rem, 4.35vw, 3.15rem);
  line-height: 1.02;
}

.timer-value {
  font-size: clamp(1.18rem, 2.65vw, 1.78rem);
}

.clock-card {
  min-height: unset;
}

.clock-card::before {
  background: linear-gradient(90deg, rgba(216, 210, 194, 0.22), rgba(102, 217, 130, 0.18), transparent);
  opacity: 0.46;
}

.countdown-card .timer-item.critical .timer-value,
.countdown-card .timer-item.urgent .timer-value,
.shield-safe .shield-value,
.shield-alert .shield-value,
.shield-warning .shield-value,
.shield-danger .shield-value,
.shield-critical .shield-value,
.shield-up .shield-value,
.shield-rest .shield-value,
.ava-card[data-status="shield_up"] #shieldValue {
  color: var(--timer-ink) !important;
}

.shield-up .shield-value,
.ava-card[data-status="shield_up"] #shieldValue {
  text-shadow:
    0 1px 0 #000,
    0 0 10px rgba(255, 75, 92, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.82);
}

.ava-card[data-status="rest_day"] #avaNextPhase {
  font-size: clamp(1.68rem, 3.45vw, 2.72rem);
}

@media (min-width: 861px) {
  .section-block--clocks .card {
    min-height: 130px;
  }
}

@media (max-width: 520px) {
  .clock {
    font-size: clamp(1.72rem, 10.5vw, 2.7rem);
  }

  .timer-value {
    font-size: clamp(1.16rem, 6.3vw, 1.85rem);
  }
}


/* V3.6 dark CEL halo for all timer digits */
:root {
  --timer-halo-green: rgba(31, 91, 55, 0.62);
  --timer-halo-green-soft: rgba(72, 149, 91, 0.24);
  --timer-halo-green-deep: rgba(7, 34, 20, 0.88);
}

.clock,
.timer-value,
#combatNextPhaseIn,
#avaNextPhase,
#shieldValue,
.countdown-card .timer-item.urgent .timer-value,
.countdown-card .timer-item.critical .timer-value,
.shield-up .shield-value,
.ava-card[data-status="shield_up"] #shieldValue {
  color: var(--timer-ink) !important;
  -webkit-text-stroke: 0.28px rgba(12, 52, 29, 0.82);
  text-shadow:
    -1px -1px 0 var(--timer-halo-green-deep),
     1px -1px 0 rgba(7, 34, 20, 0.72),
    -1px  1px 0 rgba(7, 34, 20, 0.72),
     1px  1px 0 rgba(7, 34, 20, 0.78),
     0 0 7px var(--timer-halo-green),
     0 0 16px var(--timer-halo-green-soft),
     0 8px 20px rgba(0, 0, 0, 0.84);
}

.clock {
  text-shadow:
    -1px -1px 0 var(--timer-halo-green-deep),
     1px -1px 0 rgba(7, 34, 20, 0.74),
    -1px  1px 0 rgba(7, 34, 20, 0.74),
     1px  1px 0 rgba(7, 34, 20, 0.80),
     0 0 8px rgba(31, 91, 55, 0.66),
     0 0 18px rgba(72, 149, 91, 0.22),
     0 10px 24px rgba(0, 0, 0, 0.86);
}


@media (max-width: 900px) {
  .hero {
    min-height: 236px;
    background-position: 62% 28%;
    padding: 18px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 8vw, 3rem);
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 230px;
    background-position: 66% 24%;
    padding: 16px;
  }

  .hero::before {
    background:
      linear-gradient(90deg, rgba(6,8,7,0.66) 0%, rgba(6,8,7,0.12) 54%, rgba(6,8,7,0.30) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.00), rgba(0,0,0,0.16) 82%);
    opacity: 0.86;
  }

  .hero__content {
    padding: 12px 13px;
    background: linear-gradient(90deg, rgba(3,5,4,0.54), rgba(3,5,4,0.22), transparent);
  }

  .hero__meta {
    width: 100%;
  }
}


/* Hero V3.7: remove blurred glass effect from Last Asylum Hub text frame */
.hero__content {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: linear-gradient(90deg, rgba(3, 5, 4, 0.38), rgba(3, 5, 4, 0.12), transparent) !important;
}

@media (max-width: 640px) {
  .hero__content {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: linear-gradient(90deg, rgba(3, 5, 4, 0.42), rgba(3, 5, 4, 0.16), transparent) !important;
  }
}

.hero__subtitle-hidden { display: none !important; }


/* V4.0 Combat image integration */
.combat-card {
  overflow: hidden;
  min-height: 255px;
  padding: 16px 18px 18px;
  border: 1px solid rgba(223, 220, 210, 0.20);
  background: url("/assets/combat-status-bg.png") center center / cover no-repeat;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.combat-card::before,
.combat-card::after {
  content: none;
}

.combat-card .card__header {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.combat-card .card__label,
.combat-card .card__tag {
  color: #efe7d6;
  border-color: rgba(239, 231, 214, 0.22);
  background: transparent;
  text-shadow: 0 2px 10px rgba(0,0,0,0.72);
}

.combat-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
  gap: 18px;
  align-items: end;
  min-height: 150px;
}

.combat-panel {
  padding: 0;
  border: 0;
  background: transparent;
  min-width: 0;
  box-shadow: none;
}

.combat-panel-main,
.combat-panel-side {
  background: transparent;
}

.combat-card .timer-title {
  color: #f1eadc;
  text-shadow: 0 2px 10px rgba(0,0,0,0.72), 0 0 10px rgba(37, 83, 52, 0.10);
}

.combat-main {
  margin-top: 10px;
  max-width: 15ch;
  color: #f3ecdd;
  text-shadow:
    0 2px 14px rgba(0,0,0,0.78),
    0 0 12px rgba(38, 88, 56, 0.20);
}

.combat-card .timer-value {
  color: var(--timer-ink);
  text-shadow:
    -1px -1px 0 rgba(20, 54, 35, 0.38),
     1px  1px 0 rgba(20, 54, 35, 0.30),
     0 0 12px rgba(47, 114, 69, 0.20),
     0 2px 12px rgba(0,0,0,0.78);
}

.combat-card .timer-meta {
  max-width: 36ch;
  color: #ddd7ca;
  text-shadow: 0 2px 8px rgba(0,0,0,0.74);
}

.combat-card[data-phase="4"] .combat-main,
.combat-card[data-phase="5"] .combat-main,
.combat-card[data-phase="6"] .combat-main {
  color: #eadfbf;
  text-shadow:
    0 2px 14px rgba(0,0,0,0.78),
    0 0 12px rgba(137, 103, 38, 0.22);
}

@media (max-width: 860px) {
  .combat-card {
    min-height: 230px;
    padding: 16px;
    background-position: center center;
  }

  .combat-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 0;
  }

  .combat-main {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .combat-card {
    min-height: 220px;
    background-position: center 50%;
  }

  .combat-card .card__header {
    margin-bottom: 14px;
  }
}


/* V4.2 AvA image integration */
.ava-card {
  overflow: hidden;
  min-height: 280px;
  padding: 16px 18px 18px;
  border: 1px solid rgba(223, 220, 210, 0.20);
  background: url("/assets/ava-status-bg.png") center center / cover no-repeat;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ava-card::before,
.ava-card::after {
  content: none;
}

.ava-card .card__header {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.ava-card .card__label,
.ava-card .card__tag {
  color: #efe7d6;
  border-color: rgba(239, 231, 214, 0.22);
  background: transparent;
  text-shadow: 0 2px 10px rgba(0,0,0,0.74);
}

.ava-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
  min-height: 170px;
}

.ava-panel {
  padding: 0;
  border: 0;
  background: transparent;
  min-width: 0;
  box-shadow: none;
}

.ava-panel-main,
#avaNextPhasePanel,
#shieldPanel {
  background: transparent;
}

.ava-card .timer-title {
  color: #f1eadc;
  text-shadow: 0 2px 10px rgba(0,0,0,0.75), 0 0 10px rgba(37, 83, 52, 0.08);
}

.ava-main {
  margin-top: 10px;
  max-width: 18ch;
  color: #f2ebdc;
  text-shadow:
    0 2px 14px rgba(0,0,0,0.80),
    0 0 12px rgba(38, 88, 56, 0.14);
}

.ava-card .timer-value,
.ava-card .shield-value {
  color: var(--timer-ink) !important;
  text-shadow:
    -1px -1px 0 rgba(20, 54, 35, 0.38),
     1px  1px 0 rgba(20, 54, 35, 0.30),
     0 0 12px rgba(47, 114, 69, 0.20),
     0 2px 12px rgba(0,0,0,0.80);
}

.ava-card .timer-meta {
  max-width: 38ch;
  color: #ddd7ca;
  text-shadow: 0 2px 8px rgba(0,0,0,0.76);
}

.ava-card .shield-bar {
  margin-top: 10px;
  border-color: rgba(239,231,214,0.14);
  background: rgba(0,0,0,0.16);
}

.ava-card[data-status="rest_day"] .ava-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ava-card[data-status="rest_day"] #avaNextPhasePanel,
.ava-card[data-status="shield_up"] #shieldPanel {
  grid-column: auto;
  border: 0;
  background: transparent;
}

.ava-card[data-status="rest_day"] #avaNextPhase {
  font-size: clamp(1.68rem, 3.45vw, 2.72rem);
}

.ava-card[data-status="shield_up"] #shieldValue {
  letter-spacing: 0.08em;
}

.ava-card[data-status="shield_up"] .card__tag {
  color: #f0d9d9;
  border-color: rgba(255, 220, 220, 0.26);
}

@media (max-width: 860px) {
  .ava-card {
    min-height: 250px;
    padding: 16px;
    background-position: center center;
  }

  .ava-grid,
  .ava-card[data-status="rest_day"] .ava-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 0;
  }

  .ava-main,
  .ava-card .timer-meta {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .ava-card {
    min-height: 230px;
    background-position: center 48%;
  }

  .ava-card .card__header {
    margin-bottom: 14px;
  }
}


/* V4.3 Time cards image integration */
.clock-card {
  overflow: hidden;
  min-height: 175px;
  border: 1px solid rgba(223, 220, 210, 0.18);
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.clock-card,
.clock-card::after,
.clock-card::before {
  background-clip: padding-box;
}

.clock-card::after,
.clock-card::before {
  content: none;
}

.clock-card.clock-card--official {
  background: url("/assets/official-time-bg.png") center center / cover no-repeat;
}

.clock-card.clock-card--local {
  background: url("/assets/local-time-bg.png") center center / cover no-repeat;
}

.clock-card .card__header,
.clock-card .clock,
.clock-card .muted {
  position: relative;
  z-index: 1;
}

.clock-card .card__label,
.clock-card .card__tag {
  color: #efe7d6;
  border-color: rgba(239,231,214,0.20);
  background: transparent;
  text-shadow: 0 2px 10px rgba(0,0,0,0.76);
}

.clock-card .clock {
  color: var(--timer-ink);
  text-shadow:
    -1px -1px 0 rgba(20, 54, 35, 0.38),
     1px  1px 0 rgba(20, 54, 35, 0.30),
     0 0 12px rgba(47, 114, 69, 0.16),
     0 2px 12px rgba(0,0,0,0.80);
}

.clock-card .muted {
  color: #ddd7ca;
  text-shadow: 0 2px 8px rgba(0,0,0,0.76);
}

@media (max-width: 860px) {
  .clock-card {
    min-height: 168px;
    background-position: center center;
  }
}

@media (max-width: 520px) {
  .clock-card {
    min-height: 162px;
    background-position: center 48%;
  }
}


/* V4.5 Countdown event image integration */
.countdown-card {
  overflow: hidden;
}

.countdown-visual-list {
  gap: 12px;
}

.countdown-event {
  min-height: 170px;
  padding: 18px 20px;
  border: 1px solid rgba(223, 220, 210, 0.18);
  box-shadow: var(--shadow-soft);
}

.countdown-event.has-image {
  background: var(--countdown-bg) center center / cover no-repeat;
}

.countdown-event.no-image {
  background:
    radial-gradient(circle at 82% 28%, rgba(102,217,130,0.10), transparent 16rem),
    linear-gradient(135deg, rgba(255,255,255,0.048), rgba(255,255,255,0.018)),
    rgba(17, 18, 17, 0.88);
}

.countdown-event .countdown-event__copy,
.countdown-event .timer-value {
  position: relative;
  z-index: 1;
}

.countdown-event .countdown-event__copy {
  max-width: 44ch;
}

.countdown-event .timer-title {
  font-family: var(--font-gothic);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: clamp(1.55rem, 2.3vw, 2.15rem);
  color: #f3ecdd;
  text-shadow: 0 2px 14px rgba(0,0,0,0.80), 0 0 10px rgba(31,74,46,0.18);
}

.countdown-event .timer-meta {
  margin-top: 6px;
  max-width: 44ch;
  color: #ddd7ca;
  text-shadow: 0 2px 8px rgba(0,0,0,0.78);
}

.countdown-event .timer-value {
  color: var(--timer-ink) !important;
  font-size: clamp(1.7rem, 3.8vw, 3.05rem);
  text-shadow:
    -1px -1px 0 rgba(20, 54, 35, 0.38),
     1px  1px 0 rgba(20, 54, 35, 0.30),
     0 0 14px rgba(47, 114, 69, 0.16),
     0 2px 12px rgba(0,0,0,0.84);
}

.countdown-card .countdown-event.urgent,
.countdown-card .countdown-event.critical {
  background-blend-mode: normal;
}

.countdown-card .countdown-event.urgent {
  border-color: rgba(217, 154, 53, 0.42);
}

.countdown-card .countdown-event.critical {
  border-color: rgba(255, 75, 92, 0.50);
}

@media (max-width: 720px) {
  .countdown-event {
    grid-template-columns: 1fr;
    min-height: 155px;
    padding: 16px;
    gap: 14px;
  }

  .countdown-event .timer-value {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .countdown-event {
    min-height: 145px;
    background-position: center center;
  }

  .countdown-event .timer-title {
    font-size: clamp(1.35rem, 7vw, 1.75rem);
  }

  .countdown-event .timer-value {
    font-size: clamp(1.65rem, 9vw, 2.55rem);
  }
}


/* V4.6 Daily Reset restored */
.system-card {
  overflow: hidden;
}

.system-card .timer-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.system-card .timer-item--daily-reset {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 18px 22px;
  border: 1px solid rgba(223, 220, 210, 0.18);
  background: url("/assets/daily-reset-bg.png") center center / cover no-repeat;
  box-shadow: var(--shadow-soft);
}

.system-card .timer-item--daily-reset .daily-reset-copy {
  max-width: 36ch;
}

.system-card .timer-item--daily-reset .timer-title,
.system-card .timer-item--daily-reset .timer-meta,
.system-card .timer-item--daily-reset .timer-value {
  position: relative;
  z-index: 1;
}

.system-card .timer-item--daily-reset .timer-title {
  font-size: clamp(1.7rem, 2.5vw, 2.25rem);
  font-family: var(--font-gothic);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  color: #f3ecdd;
  text-shadow: 0 2px 14px rgba(0,0,0,0.78), 0 0 10px rgba(31,74,46,0.20);
}

.system-card .timer-item--daily-reset .timer-meta {
  margin-top: 6px;
  max-width: 34ch;
  color: #ddd7ca;
  font-size: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.76);
}

.system-card .timer-item--daily-reset .timer-value {
  margin-top: 12px;
  display: block;
  color: var(--timer-ink) !important;
  font-size: clamp(2.3rem, 5vw, 4rem);
  text-shadow:
    -1px -1px 0 rgba(20, 54, 35, 0.38),
     1px  1px 0 rgba(20, 54, 35, 0.30),
     0 0 14px rgba(47, 114, 69, 0.16),
     0 2px 12px rgba(0,0,0,0.84);
}

@media (max-width: 860px) {
  .system-card .timer-item--daily-reset {
    min-height: 205px;
    padding: 16px 18px;
    background-position: center center;
  }

  .system-card .timer-item--daily-reset .daily-reset-copy {
    max-width: 28ch;
  }
}

@media (max-width: 520px) {
  .system-card .timer-item--daily-reset {
    min-height: 175px;
    padding: 14px 16px;
    background-position: center 45%;
  }

  .system-card .timer-item--daily-reset .timer-title {
    font-size: clamp(1.45rem, 8vw, 1.9rem);
  }

  .system-card .timer-item--daily-reset .timer-meta {
    font-size: 0.92rem;
  }

  .system-card .timer-item--daily-reset .timer-value {
    margin-top: 10px;
    font-size: clamp(2rem, 11vw, 3.25rem);
  }
}


/* V4.7 Countdown fallback background + active takeover */
.countdown-card {
  overflow: hidden;
  min-height: 175px;
  background: var(--countdown-panel-bg, url("/assets/countdown-fallback-bg.png")) center center / cover no-repeat;
  box-shadow: var(--shadow-soft);
}

.countdown-card::before,
.countdown-card::after {
  content: none;
}

.countdown-visual-list {
  position: relative;
  z-index: 1;
  gap: 12px;
}

.countdown-visual-list--empty {
  min-height: 138px;
  display: flex;
  align-items: center;
}

.countdown-empty-note {
  font-size: 1.18rem;
  color: #ddd7ca;
  text-shadow: 0 2px 8px rgba(0,0,0,0.80);
}

.countdown-card--active .countdown-event,
.countdown-card--empty .countdown-empty-note {
  position: relative;
}

.countdown-event {
  min-height: 170px;
  padding: 18px 20px;
  border: 1px solid rgba(223, 220, 210, 0.18);
  box-shadow: none;
  background: transparent;
}

.countdown-card--active .countdown-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  background: transparent !important;
  border-color: rgba(239,231,214,0.16);
}

.countdown-card--active .countdown-event .countdown-event__copy,
.countdown-card--active .countdown-event .timer-value {
  position: relative;
  z-index: 1;
}

.countdown-card--active .countdown-event .countdown-event__copy {
  max-width: 44ch;
}

.countdown-card--active .countdown-event .timer-title {
  font-family: var(--font-gothic);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: clamp(1.55rem, 2.3vw, 2.15rem);
  color: #f3ecdd;
  text-shadow: 0 2px 14px rgba(0,0,0,0.80), 0 0 10px rgba(31,74,46,0.18);
}

.countdown-card--active .countdown-event .timer-meta {
  margin-top: 6px;
  max-width: 44ch;
  color: #ddd7ca;
  text-shadow: 0 2px 8px rgba(0,0,0,0.78);
}

.countdown-card--active .countdown-event .timer-value {
  color: var(--timer-ink) !important;
  font-size: clamp(1.7rem, 3.8vw, 3.05rem);
  text-shadow:
    -1px -1px 0 rgba(20, 54, 35, 0.38),
     1px  1px 0 rgba(20, 54, 35, 0.30),
     0 0 14px rgba(47, 114, 69, 0.16),
     0 2px 12px rgba(0,0,0,0.84);
}

.countdown-card--active .countdown-event.urgent {
  border-color: rgba(217, 154, 53, 0.42);
}

.countdown-card--active .countdown-event.critical {
  border-color: rgba(255, 75, 92, 0.50);
}

@media (max-width: 720px) {
  .countdown-card--active .countdown-event {
    grid-template-columns: 1fr;
    min-height: 155px;
    padding: 16px;
    gap: 14px;
  }

  .countdown-card--active .countdown-event .timer-value {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .countdown-card {
    background-position: center 46%;
  }

  .countdown-visual-list--empty {
    min-height: 108px;
  }

  .countdown-card--active .countdown-event {
    min-height: 145px;
    background-position: center center;
  }

  .countdown-card--active .countdown-event .timer-title {
    font-size: clamp(1.35rem, 7vw, 1.75rem);
  }

  .countdown-card--active .countdown-event .timer-value {
    font-size: clamp(1.65rem, 9vw, 2.55rem);
  }
}


/* V4.8 Countdown item images without replacing common background */
.countdown-card {
  background: url("/assets/countdown-fallback-bg.png") center center / cover no-repeat !important;
}

.countdown-card--active {
  background: url("/assets/countdown-fallback-bg.png") center center / cover no-repeat !important;
}

.countdown-card--active .countdown-event.has-image {
  background: var(--countdown-item-bg) center center / cover no-repeat !important;
  border-color: rgba(239,231,214,0.20);
}

.countdown-card--active .countdown-event.no-image {
  background: transparent !important;
  border-color: rgba(239,231,214,0.14);
}

.countdown-card--active .countdown-event + .countdown-event {
  margin-top: 0;
}

@media (max-width: 520px) {
  .countdown-card--active .countdown-event.has-image {
    background-position: center center !important;
  }
}


/* V4.9 Quick Access portal integration */
.quick-links {
  overflow: hidden;
  min-height: 220px;
  padding: 22px 24px;
  border: 1px solid rgba(223, 220, 210, 0.20);
  background: url("/assets/quick-access-bg.png") center center / cover no-repeat;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.quick-links::before,
.quick-links::after {
  content: none;
}

.quick-links .links {
  position: relative;
  z-index: 1;
  min-height: 168px;
  align-items: end;
  gap: 16px;
}

.quick-links .links a {
  min-height: 116px;
  justify-content: flex-end;
  padding: 16px 18px;
  border: 1px solid rgba(239, 231, 214, 0.18);
  background: transparent;
  box-shadow: none;
  text-shadow: 0 2px 10px rgba(0,0,0,0.78);
}

.quick-links .links a span {
  color: #f3ecdd;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  text-shadow:
    0 2px 12px rgba(0,0,0,0.82),
    0 0 10px rgba(47, 114, 69, 0.14);
}

.quick-links .links a small {
  color: #d9d2c3;
  font-size: 0.82rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.78);
}

.quick-links .links a:hover {
  transform: translateY(-2px);
  border-color: rgba(102,217,130,0.42);
  background: transparent;
}

@media (max-width: 860px) {
  .quick-links {
    min-height: 240px;
    padding: 18px;
    background-position: center center;
  }

  .quick-links .links {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .quick-links .links a {
    min-height: 84px;
  }
}

@media (max-width: 520px) {
  .quick-links {
    min-height: 230px;
    background-position: center 48%;
  }

  .quick-links .links a {
    min-height: 76px;
    padding: 14px 16px;
  }
}


/* V5.0 Bone-white text pass */
:root {
  --text: #f2ebdc;
  --text-soft: #e5dcc9;
  --muted: #d2c8b7;
  --bone: #f0e7d3;
  --timer-ink: #efe7d4;
}

body {
  color: var(--text);
}

.hero__eyebrow,
.section-kicker,
.section-heading h2,
.card__label,
.timer-title,
.timer-meta,
.muted,
.hero p,
.hero__meta,
.links a,
.links a small,
.empty-state,
.countdown-empty-note,
.countdown-empty-card .empty-title,
.countdown-empty-card .empty-subtitle {
  color: var(--bone);
  text-shadow: 0 2px 8px rgba(0,0,0,0.76), 0 0 8px rgba(29, 70, 44, 0.18);
}

.hero__eyebrow,
.section-kicker,
.card__label {
  color: #ebe1cd;
}

.section-heading h2,
.hero h1,
.links a span,
.timer-title,
.ava-main,
.combat-main,
#avaDay,
#avaPhase,
#combatAction {
  color: var(--bone);
  text-shadow: 0 2px 12px rgba(0,0,0,0.80), 0 0 10px rgba(31,74,46,0.22);
}

.clock,
.timer-value,
.system-card .timer-item--daily-reset .timer-value,
.countdown-card--active .countdown-event .timer-value,
.ava-card .timer-value,
.ava-card .shield-value,
.combat-card .timer-value {
  color: var(--timer-ink) !important;
  text-shadow:
    -1px -1px 0 rgba(20, 54, 35, 0.42),
     1px  1px 0 rgba(20, 54, 35, 0.34),
     0 0 12px rgba(47, 114, 69, 0.20),
     0 2px 12px rgba(0,0,0,0.84);
}

.card__tag {
  color: #e8decb;
  border-color: rgba(231, 223, 205, 0.22);
  background: rgba(255,255,255,0.02);
  text-shadow: 0 2px 8px rgba(0,0,0,0.72), 0 0 6px rgba(29, 70, 44, 0.16);
}

.links a {
  color: var(--bone);
}

.links a small {
  color: #d7ccba;
}

.hero p,
.timer-meta,
.muted,
.links a small,
.hero__meta {
  color: #d7ccba;
}

.countdown-card .timer-item.critical .timer-value {
  color: #ffb6bf !important;
}

.countdown-card .timer-item.urgent .timer-value {
  color: #f2d49f !important;
}

/* V5.1 multi-page navigation + protected admin portal */
.app-shell--with-nav {
  padding-top: 14px;
  padding-bottom: 86px;
}

.top-nav {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(216, 210, 194, 0.14);
  background: linear-gradient(135deg, rgba(8, 11, 9, 0.88), rgba(17, 21, 18, 0.72));
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.42);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.top-nav__brand,
.top-nav__links a,
.mobile-nav a,
.ghost-button,
.module-actions a,
.module-actions span {
  color: #eee6d5;
  text-decoration: none;
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow:
    -1px -1px 0 rgba(7, 34, 20, 0.72),
     1px  1px 0 rgba(7, 34, 20, 0.72),
     0 0 8px rgba(31, 91, 55, 0.34);
}

.top-nav__brand {
  font-family: var(--font-ritual);
  font-size: 1.02rem;
  letter-spacing: 0.05em;
}

.top-nav__links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.top-nav__links a,
.mobile-nav a,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(216, 210, 194, 0.14);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.76rem;
  text-transform: uppercase;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.top-nav__links a:hover,
.top-nav__links a.is-active,
.mobile-nav a.is-active,
.mobile-nav a:hover,
.ghost-button:hover,
.module-actions a:hover {
  border-color: rgba(102, 217, 130, 0.42);
  background: rgba(102, 217, 130, 0.075);
  transform: translateY(-1px);
}

.mobile-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 40;
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(216, 210, 194, 0.16);
  background: linear-gradient(135deg, rgba(5, 7, 6, 0.94), rgba(14, 20, 16, 0.90));
  box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.52);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mobile-nav a {
  min-height: 42px;
}

.admin-page .admin-hero {
  min-height: 220px;
  background:
    linear-gradient(90deg, rgba(3, 5, 4, 0.44), rgba(3, 5, 4, 0.12), rgba(3, 5, 4, 0.24)),
    url("/assets/quick-access-bg.png") center center / cover no-repeat;
}

.admin-hero__copy {
  max-width: 720px;
  color: #ddd5c3;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

.ghost-button {
  cursor: pointer;
  color: #eee6d5;
}

.status-pill.is-danger {
  color: var(--danger);
  border-color: rgba(255, 75, 92, 0.52);
  background: rgba(255, 75, 92, 0.08);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-module-card {
  min-height: 235px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-color: rgba(216, 210, 194, 0.15);
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.34), rgba(4, 14, 9, 0.32)),
    rgba(17, 18, 17, 0.88);
}

.admin-module-card::before {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(216,210,194,0.22), rgba(102,217,130,0.18), transparent);
}

.admin-module-card h3,
.access-panel h1 {
  position: relative;
  z-index: 1;
  margin: 6px 0 8px;
  color: #f1eadc;
  font-family: var(--font-title);
  font-weight: 500;
  font-size: clamp(1.45rem, 2.7vw, 2.2rem);
  letter-spacing: 0.01em;
  -webkit-text-stroke: 0.30px rgba(37, 83, 52, 0.62);
  text-shadow:
    -1px -1px 0 rgba(16, 48, 30, 0.55),
     1px  1px 0 rgba(16, 48, 30, 0.50),
     0 0 9px rgba(52, 128, 76, 0.26),
     0 9px 24px rgba(0, 0, 0, 0.60);
}

.admin-module-card p,
.access-panel p {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: #c9c2b3;
  line-height: 1.45;
}

.module-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.module-actions a,
.module-actions span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(216, 210, 194, 0.14);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.module-actions span {
  color: #9f9a8f;
  border-style: dashed;
}

.module-actions--inline {
  margin-top: 18px;
}

.access-panel {
  max-width: 760px;
  margin: 56px auto 0;
  padding: 22px;
}

.admin-module-card--ava {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.36), rgba(5, 17, 10, 0.30)),
    url("/assets/ava-status-bg.png") center center / cover no-repeat;
}

.admin-module-card--absence,
.admin-module-card--registry {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.46), rgba(5, 17, 10, 0.34)),
    url("/assets/quick-access-bg.png") center center / cover no-repeat;
}

.admin-module-card--countdown {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.42), rgba(5, 17, 10, 0.32)),
    url("/assets/countdown-fallback-bg.png") center center / cover no-repeat;
}

@media (max-width: 860px) {
  .top-nav {
    display: none;
  }

  .mobile-nav {
    display: grid;
  }

  .app-shell--with-nav {
    padding-top: 12px;
    padding-bottom: 92px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .admin-module-card {
    min-height: 218px;
  }

  .module-actions {
    flex-direction: column;
  }

  .module-actions a,
  .module-actions span {
    width: 100%;
    justify-content: center;
  }
}

/* V5.2 Countdown Admin web panel */
.admin-countdown-panel {
  grid-column: 1 / -1;
  min-height: 0;
}

.countdown-admin-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 14px;
  margin-top: 14px;
}

.admin-form,
.admin-countdown-list {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(216, 210, 194, 0.14);
  background: rgba(0, 0, 0, 0.30);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-field {
  display: grid;
  gap: 6px;
  color: #eee6d5;
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.admin-field em {
  color: #9f9a8f;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0.02em;
}

.admin-field input,
.admin-field textarea {
  width: 100%;
  border: 1px solid rgba(216, 210, 194, 0.18);
  background: rgba(5, 8, 6, 0.76);
  color: #f2ebdc;
  outline: none;
  padding: 10px 11px;
  font: 700 0.92rem var(--font-body);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18);
}

.admin-field textarea {
  resize: vertical;
  min-height: 106px;
}

.admin-field input:focus,
.admin-field textarea:focus {
  border-color: rgba(102, 217, 130, 0.46);
  box-shadow: 0 0 0 2px rgba(102, 217, 130, 0.10), inset 0 0 0 1px rgba(0,0,0,0.18);
}

.admin-time-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(102, 217, 130, 0.18);
  background: linear-gradient(135deg, rgba(102,217,130,0.045), rgba(255,255,255,0.018));
}

.admin-time-box__head,
.admin-countdown-list__head,
.admin-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-time-box__head strong {
  display: block;
  margin-top: 2px;
  color: #f2ebdc;
  font-family: var(--font-title);
  font-size: 1.1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.78), 0 0 8px rgba(29, 70, 44, 0.22);
}

.time-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.time-preview div {
  padding: 10px;
  border: 1px solid rgba(216, 210, 194, 0.12);
  background: rgba(255,255,255,0.026);
}

.time-preview span,
.admin-countdown-meta span {
  display: block;
  color: #ada699;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.time-preview strong {
  display: block;
  margin-top: 4px;
  color: #efe7d4;
  font-family: var(--font-numeric);
  font-size: 0.96rem;
  text-shadow:
    -1px -1px 0 rgba(20, 54, 35, 0.34),
     1px  1px 0 rgba(20, 54, 35, 0.28),
     0 2px 10px rgba(0,0,0,0.74);
}

.admin-primary-button,
.admin-danger-button {
  cursor: pointer;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgba(102, 217, 130, 0.42);
  background: rgba(102, 217, 130, 0.10);
  color: #eee6d5;
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow:
    -1px -1px 0 rgba(7, 34, 20, 0.72),
     1px  1px 0 rgba(7, 34, 20, 0.72),
     0 0 8px rgba(31, 91, 55, 0.34);
}

.admin-primary-button:hover {
  border-color: rgba(102, 217, 130, 0.64);
  background: rgba(102, 217, 130, 0.16);
}

.admin-danger-button {
  flex: 0 0 auto;
  border-color: rgba(255, 75, 92, 0.46);
  background: rgba(255, 75, 92, 0.08);
  color: #ffd5da;
}

.admin-danger-button:hover {
  background: rgba(255, 75, 92, 0.14);
}

.admin-form__message {
  min-height: 20px;
  color: #d7ccba;
  font-size: 0.86rem;
  line-height: 1.35;
}

.admin-form__message.is-success {
  color: #bdf0c8;
}

.admin-form__message.is-danger,
.admin-list-empty.is-danger {
  color: #ffb6bf;
}

.admin-countdown-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.admin-list-empty {
  padding: 12px;
  border: 1px dashed rgba(216, 210, 194, 0.18);
  color: #d7ccba;
  background: rgba(255,255,255,0.02);
}

.admin-countdown-items {
  display: grid;
  gap: 9px;
}

.admin-countdown-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(216, 210, 194, 0.13);
  background: rgba(255,255,255,0.026);
}

.admin-countdown-item strong {
  display: block;
  color: #f2ebdc;
  font-family: var(--font-title);
  font-size: 1.08rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.76), 0 0 8px rgba(29, 70, 44, 0.18);
}

.admin-countdown-item p {
  margin: 5px 0 8px;
  color: #d7ccba;
  font-size: 0.88rem;
  line-height: 1.35;
}

.admin-countdown-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-countdown-meta span {
  display: inline-flex;
  padding: 4px 7px;
  border: 1px solid rgba(216, 210, 194, 0.12);
  background: rgba(0,0,0,0.22);
  color: #cfc7b8;
  font-size: 0.66rem;
}

@media (max-width: 900px) {
  .countdown-admin-layout,
  .admin-form__grid,
  .time-preview {
    grid-template-columns: 1fr;
  }

  .admin-countdown-item {
    grid-template-columns: 1fr;
  }

  .admin-danger-button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .admin-form,
  .admin-countdown-list {
    padding: 12px;
  }

  .admin-form__actions,
  .admin-time-box__head,
  .admin-countdown-list__head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-primary-button,
  .admin-form__actions .ghost-button,
  .admin-time-box__head .ghost-button,
  .admin-countdown-list__head .ghost-button {
    width: 100%;
  }
}

/* V5.3 Admin module windows + Countdown time correction */
body.admin-window-open {
  overflow: hidden;
}

.admin-grid--hub .admin-module-card {
  min-height: 245px;
}

.module-open-button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(216, 210, 194, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: #eee6d5;
  font-family: var(--font-title);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow:
    -1px -1px 0 rgba(7, 34, 20, 0.72),
     1px  1px 0 rgba(7, 34, 20, 0.72),
     0 0 8px rgba(31, 91, 55, 0.24);
}

.module-open-button:hover,
.module-open-button--primary {
  border-color: rgba(102, 217, 130, 0.44);
  background: rgba(102, 217, 130, 0.10);
}

.admin-window-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 10%, rgba(41, 105, 63, 0.16), transparent 38%),
    rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.admin-window-overlay[hidden] {
  display: none;
}

.admin-window {
  width: min(1180px, 100%);
  max-height: min(86vh, 980px);
  overflow: auto;
  border: 1px solid rgba(216, 210, 194, 0.17);
  background:
    linear-gradient(135deg, rgba(0,0,0,0.46), rgba(5, 17, 10, 0.34)),
    url("/assets/quick-access-bg.png") center center / cover no-repeat;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.78);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
}

.admin-window__head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(216, 210, 194, 0.14);
  background: rgba(3, 5, 4, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.admin-window__head h2 {
  margin: 2px 0 0;
  color: #f1eadc;
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  font-weight: 500;
  text-shadow:
    -1px -1px 0 rgba(16, 48, 30, 0.55),
     1px  1px 0 rgba(16, 48, 30, 0.50),
     0 0 10px rgba(52, 128, 76, 0.26),
     0 9px 24px rgba(0, 0, 0, 0.60);
}

.admin-window__close {
  cursor: pointer;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(216, 210, 194, 0.18);
  background: rgba(255, 255, 255, 0.035);
  color: #eee6d5;
  font-size: 1.55rem;
  line-height: 1;
}

.admin-window__panel {
  padding: 18px;
}

.admin-window__panel[hidden] {
  display: none !important;
}

.admin-window__intro {
  max-width: 880px;
  margin: 0 0 14px;
  color: #d7ccba;
  line-height: 1.45;
}

.admin-window__panel--countdown {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.30), rgba(5, 17, 10, 0.22)),
    url("/assets/countdown-fallback-bg.png") center center / cover no-repeat;
}

.admin-window__panel--placeholder {
  min-height: 260px;
  color: #d7ccba;
  font-size: 1rem;
  line-height: 1.5;
}

.admin-current-time-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-current-time-box__item {
  padding: 10px;
  border: 1px solid rgba(102, 217, 130, 0.16);
  background: rgba(0, 0, 0, 0.28);
}

.admin-current-time-box__item span {
  display: block;
  color: #ada699;
  font-size: 0.70rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-current-time-box__item strong {
  display: block;
  margin-top: 4px;
  color: #efe7d4;
  font-family: var(--font-numeric);
  font-size: 0.96rem;
  text-shadow:
    -1px -1px 0 rgba(20, 54, 35, 0.34),
     1px  1px 0 rgba(20, 54, 35, 0.28),
     0 2px 10px rgba(0,0,0,0.74);
}

@media (max-width: 900px) {
  .admin-window-overlay {
    align-items: stretch;
    padding: 0;
  }

  .admin-window {
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    clip-path: none;
    border-width: 0;
  }

  .admin-window__head {
    padding: 14px;
  }

  .admin-window__panel {
    padding: 14px;
    padding-bottom: 96px;
  }

  .admin-current-time-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .admin-grid--hub .admin-module-card {
    min-height: 218px;
  }

  .module-open-button {
    width: 100%;
  }
}

/* V5.4 Countdown Bot Bridge + image upload */
.admin-field select {
  width: 100%;
  border: 1px solid rgba(216, 210, 194, 0.18);
  background: rgba(5, 8, 6, 0.86);
  color: #f2ebdc;
  outline: none;
  padding: 10px 11px;
  font: 800 0.92rem var(--font-body);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18);
}

.admin-field select:focus {
  border-color: rgba(102, 217, 130, 0.46);
  box-shadow: 0 0 0 2px rgba(102, 217, 130, 0.10), inset 0 0 0 1px rgba(0,0,0,0.18);
}

.admin-image-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(102, 217, 130, 0.18);
  background: linear-gradient(135deg, rgba(102,217,130,0.045), rgba(255,255,255,0.018));
}

.admin-image-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-image-picker__head strong {
  display: block;
  margin-top: 2px;
  color: #f2ebdc;
  font-family: var(--font-title);
  font-size: 1.05rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.78), 0 0 8px rgba(29, 70, 44, 0.22);
}

.admin-file-button {
  cursor: pointer;
}

.admin-image-preview {
  min-height: 92px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px dashed rgba(216, 210, 194, 0.18);
  background: rgba(0,0,0,0.22);
  color: #d7ccba;
}

.admin-image-preview > span {
  grid-column: 1 / -1;
  color: #ada699;
  font-size: 0.86rem;
}

.admin-image-preview img {
  width: 132px;
  height: 74px;
  object-fit: cover;
  border: 1px solid rgba(216, 210, 194, 0.16);
  box-shadow: 0 12px 22px rgba(0,0,0,0.35);
}

.admin-image-preview strong {
  display: block;
  color: #efe7d4;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.admin-image-preview div span {
  display: block;
  margin-top: 4px;
  color: #ada699;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-image-help {
  margin: 0;
  color: #bdb4a5;
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (min-width: 1000px) {
  .admin-window {
    width: min(1360px, 94vw);
    max-height: 88vh;
  }

  .countdown-admin-layout {
    grid-template-columns: minmax(420px, 0.88fr) minmax(480px, 1.12fr);
    align-items: start;
  }
}

@media (max-width: 700px) {
  .admin-image-picker__head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-file-button {
    width: 100%;
  }

  .admin-image-preview {
    grid-template-columns: 1fr;
  }

  .admin-image-preview img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
  }

  .admin-image-preview .ghost-button {
    width: 100%;
  }
}

/* V5.5 Mobile Alerts admin bridge */
.admin-module-card--mobile-alert {
  border-color: rgba(102, 217, 130, 0.24);
  background:
    linear-gradient(135deg, rgba(102, 217, 130, 0.070), rgba(0, 0, 0, 0.34)),
    rgba(255, 255, 255, 0.025);
}

.admin-window__panel--mobile-alert {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.34), rgba(5, 17, 10, 0.24)),
    url("/assets/quick-access-bg.png") center center / cover no-repeat;
}

.mobile-alert-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 14px;
  align-items: start;
}

.mobile-alert-token-box,
.mobile-alert-token-reveal,
.mobile-alert-help,
.mobile-alert-shortcut {
  border: 1px solid rgba(216, 210, 194, 0.14);
  background: rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18);
}


.mobile-alert-android-setup {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(102, 217, 130, 0.22);
  background:
    linear-gradient(135deg, rgba(7, 36, 20, 0.55), rgba(0, 0, 0, 0.42)),
    rgba(0, 0, 0, 0.36);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.20), 0 0 22px rgba(56, 170, 91, 0.08);
}

.mobile-alert-android-setup h3 {
  margin: 3px 0 7px;
  color: #f1eadc;
  font-family: var(--font-title);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.mobile-alert-android-setup p {
  margin: 0;
  color: #d7cfbe;
  line-height: 1.45;
  font-size: 0.9rem;
}

.mobile-alert-android-setup__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-alert-android-setup__actions--single {
  grid-template-columns: minmax(0, 1fr);
}

.mobile-alert-resource-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(102, 217, 130, 0.42);
  background: rgba(4, 28, 15, 0.82);
  color: #f1eadc;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: inset 0 0 18px rgba(56, 170, 91, 0.12);
}

.mobile-alert-resource-button--secondary {
  background: rgba(0, 0, 0, 0.52);
  border-color: rgba(216, 210, 194, 0.20);
}

.mobile-alert-resource-button:hover,
.mobile-alert-resource-button:focus-visible {
  border-color: rgba(165, 255, 187, 0.72);
  color: #ffffff;
  outline: none;
}

.mobile-alert-token-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.mobile-alert-token-box strong {
  display: block;
  margin-top: 3px;
  color: #efe7d4;
  font-family: var(--font-numeric);
  letter-spacing: 0.08em;
}

.mobile-alert-token-box p,
.mobile-alert-help p {
  margin: 5px 0 0;
  color: #cfc7b8;
  line-height: 1.42;
  font-size: 0.88rem;
}

.mobile-alert-token-reveal {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-color: rgba(102, 217, 130, 0.24);
}

.mobile-alert-token-reveal span {
  color: #bdf0c8;
  font-size: 0.82rem;
  font-weight: 800;
}

.mobile-alert-token-reveal code,
.mobile-alert-help pre {
  overflow: auto;
  max-width: 100%;
  padding: 10px;
  border: 1px solid rgba(102, 217, 130, 0.18);
  background: rgba(0, 0, 0, 0.50);
  color: #efe7d4;
  font-family: var(--font-numeric);
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.mobile-alert-shortcuts {
  display: grid;
  gap: 12px;
}

.mobile-alert-shortcut {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.mobile-alert-shortcut legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: calc(100% - 16px);
  padding: 0 8px;
  color: #f1eadc;
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(52, 128, 76, 0.26);
}

.mobile-alert-copy-setup {
  cursor: pointer;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(102, 217, 130, 0.36);
  background: rgba(3, 16, 10, 0.82);
  color: #f1eadc;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 0 18px rgba(56, 170, 91, 0.10), 0 0 14px rgba(56, 170, 91, 0.12);
}

.mobile-alert-copy-setup:hover,
.mobile-alert-copy-setup:focus-visible {
  border-color: rgba(165, 255, 187, 0.72);
  color: #ffffff;
  outline: none;
}

.mobile-alert-help {
  position: sticky;
  top: 82px;
  padding: 12px;
}

.mobile-alert-help h3 {
  margin: 4px 0 8px;
  color: #f1eadc;
  font-family: var(--font-title);
  font-size: 1.28rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .mobile-alert-admin-layout {
    grid-template-columns: 1fr;
  }

  .mobile-alert-help {
    position: static;
  }
}

@media (max-width: 520px) {
  .mobile-alert-android-setup__actions {
    grid-template-columns: 1fr;
  }

  .mobile-alert-token-box {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-alert-token-box .ghost-button,
  .mobile-alert-form .admin-form__actions .ghost-button {
    width: 100%;
  }

  .mobile-alert-shortcut legend {
    align-items: flex-start;
    flex-direction: column;
    width: auto;
  }

  .mobile-alert-copy-setup {
    width: 100%;
  }
}

/* V5.6 Mobile Alert channel manager */
.mobile-alert-channel-manager {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(216, 210, 194, 0.14);
}

.mobile-alert-channel-manager h3 {
  margin-top: 4px;
}

.mobile-alert-channel-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mobile-alert-channel-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.mobile-alert-channel-list.is-empty {
  padding: 10px;
  border: 1px solid rgba(216, 210, 194, 0.12);
  color: #cfc7b8;
  background: rgba(0, 0, 0, 0.22);
}

.mobile-alert-channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(102, 217, 130, 0.18);
  background: rgba(0, 0, 0, 0.30);
}

.mobile-alert-channel-item.is-disabled {
  opacity: 0.62;
  border-color: rgba(216, 210, 194, 0.12);
}

.mobile-alert-channel-item strong,
.mobile-alert-channel-item small {
  display: block;
}

.mobile-alert-channel-item strong {
  color: #efe7d4;
  font-weight: 900;
}

.mobile-alert-channel-item small {
  margin-top: 2px;
  color: #9f9788;
  font-family: var(--font-numeric);
  font-size: 0.72rem;
  word-break: break-all;
}

.mobile-alert-channel-item .ghost-button {
  flex: 0 0 auto;
  min-width: 86px;
}

@media (max-width: 520px) {
  .mobile-alert-channel-item {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-alert-channel-item .ghost-button {
    width: 100%;
  }
}

/* Mobile Alerts + Countdown mention presets */
.admin-field--mentions {
  gap: 8px;
}

.admin-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-check-chip {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(102, 217, 130, 0.22);
  background: rgba(0, 0, 0, 0.34);
  color: #efe7d4;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: none;
  box-shadow: inset 0 0 12px rgba(56, 170, 91, 0.06);
}

.admin-check-chip input {
  width: auto;
  margin: 0;
  accent-color: #66d982;
}

.admin-check-chip:has(input:checked) {
  border-color: rgba(165, 255, 187, 0.66);
  background: rgba(31, 91, 55, 0.24);
  color: #ffffff;
}

/* Player Registry Admin */
.admin-window__panel--registry { display: grid; gap: 16px; }
.registry-toolbar { display: grid; gap: 12px; }
.registry-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.registry-summary article { padding: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); clip-path: var(--radius-cut); }
.registry-summary span { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.registry-summary strong { display: block; margin-top: 4px; font-size: 1.6rem; color: var(--bone); }
.registry-toolbar__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.registry-form { border: 1px solid rgba(102,217,130,.25); background: rgba(102,217,130,.045); padding: 14px; }
.registry-filters { display: grid; grid-template-columns: minmax(0, 1fr) 180px 180px; gap: 10px; }
.registry-filters input,
.registry-filters select { width: 100%; min-height: 42px; border: 1px solid var(--line); background: #0d0f0e; color: var(--text); padding: 9px 11px; }
.registry-list { display: grid; gap: 10px; }
.registry-player { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.registry-player__photo { width: 88px; height: 88px; object-fit: cover; border: 1px solid var(--line-strong); background: #090a09; }
.registry-player__photo--empty { display: grid; place-items: center; color: var(--muted); font-size: .72rem; text-align: center; }
.registry-player__body { min-width: 0; }
.registry-player__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.registry-player__title strong { font-size: 1.05rem; }
.registry-player__meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; color: var(--muted); font-size: .82rem; }
.registry-player__meta strong { color: var(--text-soft); }
.registry-player__actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.registry-status { display: inline-flex; padding: 3px 7px; border: 1px solid var(--line); font-size: .67rem; text-transform: uppercase; letter-spacing: .07em; }
.registry-status--active { color: var(--cel-strong); border-color: rgba(102,217,130,.35); }
.registry-status--scheduled { color: #e6bd69; border-color: rgba(230,189,105,.35); }
.registry-status--expired { color: var(--danger); border-color: rgba(255,75,92,.35); }
@media (max-width: 780px) {
  .registry-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .registry-filters { grid-template-columns: 1fr; }
  .registry-player { grid-template-columns: 72px minmax(0, 1fr); }
  .registry-player__photo { width: 72px; height: 72px; }
  .registry-player__actions { grid-column: 1 / -1; justify-content: stretch; }
  .registry-player__actions button { flex: 1; }
}

.admin-countdown-side { display: grid; gap: 16px; align-content: start; }
