#halloween-page {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
}
#halloween-page .panel {
  padding: clamp(18px, 2.4vw, 30px);
  min-width: 0;
}
#halloween-page h1 {
  margin: 8px 0 12px;
  font-size: clamp(26px, 3vw, 42px);
}
#halloween-page h2 {
  margin: 0 0 14px;
  font-size: 21px;
}
#halloween-page h3 {
  font-size: 15px;
  margin: 18px 0 8px;
}
#halloween-page p {
  line-height: 1.65;
}
.event-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background:
    radial-gradient(ellipse at top right, #ac6c2829, transparent 65%),
    var(--panel, #171b22);
  border-top: 2px solid #d49a50;
}
.event-hero-coin {
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 18px #0005);
}
.event-hero-neutral {
  background: var(--panel, #171b22);
  border-top-color: var(--line, #ffffff20);
}
.event-status {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid #d49a5066;
  border-radius: 5px;
  color: #efc083;
  font-size: 12px;
}
.event-back {
  width: fit-content;
}
.event-sections {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.event-sections a {
  padding: 10px 16px;
  border: 1px solid var(--line, #ffffff20);
  border-radius: 6px;
}
#halloween-page section[id] {
  scroll-margin-top: 28px;
}
.event-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.event-summary-grid .panel {
  display: grid;
  gap: 8px;
}
.event-summary-grid strong {
  font-size: 32px;
  color: #efc083;
}
.event-summary-grid small,
.event-summary-grid span {
  color: var(--muted);
}
.event-two-col,
.event-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.event-theme-halloween {
  --event-accent: #efbd78;
  --event-glow: #d1872920;
}
.event-theme-abyss {
  --event-accent: #80d9d6;
  --event-glow: #29b3c222;
}
.event-overview-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--text);
  text-decoration: none;
  background: radial-gradient(ellipse at top right, var(--event-glow), transparent 72%), var(--panel, #171b22);
  border-top: 2px solid var(--event-accent);
  transition: border-color 160ms, box-shadow 160ms;
}
.event-overview-card:hover {
  border-color: var(--event-accent);
  box-shadow: 0 8px 28px #0003;
  text-decoration: none;
}
.event-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.event-art {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  border: 1px solid var(--item-grade-color, #ffffff30);
  border-radius: 16px;
  background: var(--item-grade-background, none) center / cover, #10151c;
  box-shadow: 0 10px 28px #0004;
}
.event-art img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 5px 6px #0005);
}
#halloween-page .event-card-copy h2 {
  margin: 8px 0 12px;
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.2;
}
#halloween-page .event-card-copy p,
#halloween-page .event-card-date {
  margin: 0;
}
.event-card-copy { flex: 1; }
.event-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.event-tags span {
  padding: 6px 10px;
  border: 1px solid #ffffff18;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
}
.event-card-date { color: var(--muted); font-size: 13px; }
.event-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #ffffff18;
  padding-top: 18px;
  color: var(--event-accent);
  font-weight: 600;
}
.event-card-action > span { font-size: 22px; }
.event-theme-abyss.event-hero {
  border-top-color: var(--event-accent);
  background: radial-gradient(ellipse at top right, var(--event-glow), transparent 70%), var(--panel, #171b22);
}
.event-theme-abyss .event-status {
  color: var(--event-accent);
  border-color: #80d9d644;
}
.event-guide-section { display: grid; gap: 18px; }
#halloween-page .event-guide-section > header h2 { margin: 6px 0 0; }
.event-currency-card { display: flex; flex-direction: column; gap: 20px; }
#halloween-page .event-currency-card header h3 { font-size: 22px; margin: 0 0 6px; }
#halloween-page .event-currency-card header p { margin: 0; color: var(--muted); }
.event-currency-card > .event-item {
  padding: 14px;
  border-radius: 8px;
  background: #ffffff04;
  border: 1px solid #ffffff0d;
}
.event-facts { margin: 0; }
.event-facts > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #ffffff10;
  line-height: 1.5;
}
.event-facts dt { color: var(--muted); font-size: 13px; }
.event-facts dd { margin: 0; }
.event-locations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.event-locations > div { display: grid; align-content: start; gap: 8px; }
.event-locations strong { font-size: 16px; }
.event-locations ul { margin: 0; padding-left: 16px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.event-conversion {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
  border-radius: 8px;
  background: #ffffff05;
}
.event-conversion strong { font-size: 26px; color: #efc083; }
.event-conversion span { font-size: 13px; }
#halloween-page .event-note { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 12px 0 0; max-width: 74ch; }
.event-inline-link { display: inline-block; margin-top: 18px; color: #efc083; font-weight: 600; }
.event-currency-card > .event-inline-link { margin-top: auto; padding-top: 8px; }
.event-menu-path { display: inline-block; padding: 8px 12px; border-radius: 5px; background: #ffffff06; font-size: 13px; }
.event-details { margin-top: 20px; border-top: 1px solid #ffffff18; padding-top: 16px; }
.event-details summary { font-weight: 600; }
.event-recipe-cost { display: grid; gap: 7px; padding: 12px; border-radius: 6px; background: #ffffff05; }
.event-recipe-cost span { font-size: 12px; color: var(--muted); }
.event-rewards {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 8px;
}
.event-rewards .event-item {
  margin: 0;
  min-height: 78px;
  padding: 10px;
  border: 1px solid var(--line, #ffffff20);
  border-radius: 6px;
  background: #ffffff03;
}
.event-item:hover > span:last-child { text-decoration: underline; }
.event-item:focus-visible { outline: 2px solid var(--accent, #efc083); outline-offset: 3px; }
.event-cost-total { display: grid; gap: 8px; padding: 20px; margin-top: 22px; border-radius: 8px; background: #5bbab90c; }
.event-cost-total strong { font-size: 26px; color: #80d9d6; }
.event-cost-total small { color: var(--muted); }
.event-time-cap { display: grid; gap: 8px; padding: 18px 0; }
.event-time-cap strong { font-size: 52px; color: #80d9d6; line-height: 1.1; }
.event-time-cap span { color: var(--muted); }
.event-warning {
  border-left: 3px solid #d49a50;
  padding-left: 14px;
}
.event-attendance {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  list-style: none;
  padding: 12px 0;
}
.event-attendance li {
  display: grid;
  gap: 6px;
  padding: 8px 2px;
  text-align: center;
  border: 1px solid var(--line, #ffffff20);
  font-size: 11px;
}
.event-attendance strong {
  color: #efc083;
  font-size: 16px;
}
.event-missions {
  list-style: none;
  padding: 0;
  margin: 0;
}
.event-missions li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line, #ffffff14);
}
.event-missions strong {
  color: #efc083;
}
.event-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.event-currency-icon {
  object-fit: contain;
}
.event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--item-grade-color, inherit);
  text-decoration: none;
}
.event-item > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.event-item small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.event-item-icon {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--item-grade-color, #ffffff30);
  border-radius: 5px;
  background-image: var(--item-grade-background, none);
  background-size: cover;
  background-color: #10151c;
}
.event-item img {
  object-fit: contain;
  width: 46px;
  height: 46px;
}
.event-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.event-shop-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line, #ffffff20);
  border-radius: 8px;
  background: #ffffff02;
}
.event-shop-row > .event-item {
  grid-column: 1 / -1;
}
.event-offer-details {
  display: grid;
  gap: 5px;
  align-content: start;
}
.event-offer-details strong {
  color: #efc083;
}
.event-offer-details span,
.event-offer-details small {
  color: var(--muted);
  font-size: 12px;
}
.event-quantity {
  display: grid;
  gap: 8px;
  min-width: 0;
  align-content: start;
  font-size: 12px;
}
.event-quantity input {
  width: 100%;
  min-width: 0;
}
.event-chest {
  padding: 20px 0 10px;
}
.event-chest .event-item {
  margin-top: 16px;
}
.event-morph-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.event-morph-card {
  border: 1px solid var(--line, #ffffff20);
  border-radius: 8px;
  padding: 18px;
  min-width: 0;
}
.event-morph-card > .event-item {
  margin: 10px 0;
}
.event-morph-card .event-quantity {
  max-width: 100px;
  margin-top: 16px;
}
.event-shard-morph {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 140px;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line, #ffffff20);
  padding: 20px 0;
}
.event-budget-inputs,
.event-budget-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.event-budget-results {
  margin-top: 20px;
}
.event-budget-results > div {
  display: grid;
  gap: 8px;
  background: #ffffff05;
  padding: 16px;
  border-radius: 8px;
}
.event-budget-results strong {
  font-size: 28px;
  color: #efc083;
}
.event-budget-results span {
  font-size: 13px;
}
.event-cosmetic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 20px;
}
#halloween-page summary {
  cursor: pointer;
  line-height: 1.5;
}
#halloween-page summary:focus-visible,
#halloween-page a:focus-visible {
  outline: 2px solid #efc083;
  outline-offset: 4px;
}
@media (max-width: 1100px) {
  .event-two-col {
    grid-template-columns: 1fr;
  }
  .event-morph-grid,
  .event-cosmetic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .event-shop-grid,
  .event-morph-grid,
  .event-overview-grid,
  .event-shard-morph {
    grid-template-columns: 1fr;
  }
  .event-summary-grid {
    gap: 8px;
    grid-template-columns: 1fr;
  }
  #halloween-page .event-summary-grid .panel {
    padding: 14px 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 20px;
  }
  .event-summary-grid strong {
    font-size: 28px;
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }
  .event-summary-grid small,
  .event-summary-grid span {
    font-size: 12px;
    grid-column: 1;
  }
  .event-hero-coin {
    width: 64px;
    height: 64px;
  }
  .event-hero {
    gap: 20px;
    align-items: flex-start;
    flex-direction: column-reverse;
  }
  .event-art { width: 76px; height: 76px; }
  .event-locations { grid-template-columns: 1fr; gap: 18px; }
  .event-cosmetic-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 400px) {
  .event-budget-inputs,
  .event-budget-results {
    grid-template-columns: 1fr;
  }
  .event-attendance {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .event-hero-coin {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .event-overview-card { transition: none; }
}
