/* Noc Halloween: shared portal/showcase contract, isolated from other themes. */

.tg-halloween-theme {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  background: #100b19;
}

.tg-halloween-theme::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #100b19;
  background-image: linear-gradient(#100b19b3, #100b19c7), url("./background.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}
.tg-halloween-theme .tg-glass,
.tg-halloween-theme .tg-glass-soft {
  background: linear-gradient(160deg, #25142ff0, #160f21f2);
}
.tg-halloween-theme main p,
.tg-halloween-theme main li,
.tg-halloween-theme main h1,
.tg-halloween-theme main h2,
.tg-halloween-theme main nav a {
  text-shadow: 0 1px 2px #000c, 0 0 8px #000a;
}

@media (max-width: 1023px) {
  .tg-halloween-theme::before {
    background-position: center center, right center;
  }
}
@media print {
  .tg-halloween-theme::before { display: none; }
}



.tg-halloween-profile {
  --tg-halloween-text: #ffe5ad;
  position: relative;
  width: 100%;
  aspect-ratio: 1659 / 948;
  container-type: inline-size;
  isolation: isolate;
  color: var(--tg-halloween-text);
  font-family: Georgia, "Times New Roman", serif;
}
.tg-halloween-profile *, .tg-halloween-profile *::before, .tg-halloween-profile *::after { box-sizing: border-box; }
.tg-halloween-profile__frame { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.tg-halloween-profile__avatar {
  position: absolute; left: 12.35%; top: 9.4%; width: 13.2%; aspect-ratio: 1;
  display: grid; place-items: center; overflow: hidden; border-radius: 50%;
}
.tg-halloween-profile__avatar > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tg-halloween-profile__nickname {
  position: absolute; left: 32.8%; top: 14.8%; width: 41%; height: 12.9%;
  display: flex; align-items: center; padding-inline: 1.2%;
  font-size: 3.8cqw; font-weight: 700; line-height: 1.1;
}
.tg-halloween-profile__nickname > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-halloween-profile__rank {
  position: absolute; left: 41.4%; top: 28.7%; width: 17.4%; height: 4.8%;
  display: grid; place-items: center; font-size: 1.65cqw; font-weight: 700;
  line-height: 1; letter-spacing: .12cqw; text-transform: uppercase;
}
.tg-halloween-profile__level-label {
  position: absolute; left: 81.1%; top: 14.1%; width: 12.1%; height: 4.6%;
  display: grid; place-items: center; font-size: 1.65cqw; font-weight: 700; letter-spacing: .12cqw;
}
.tg-halloween-profile__level {
  position: absolute; left: 81.1%; top: 18.5%; width: 12.1%; height: 13.2%;
  display: grid; place-items: center; font-size: 5cqw; line-height: 1; font-weight: 700;
}
.tg-halloween-profile__heading {
  position: absolute; left: 37.8%; top: 36.8%; width: 24.5%; height: 5%;
  display: grid; place-items: center; margin: 0; font-size: 1.65cqw;
  line-height: 1; letter-spacing: .11cqw; font-weight: 700; white-space: nowrap;
}
.tg-halloween-profile__slots { list-style: none; margin: 0; padding: 0; }
.tg-halloween-profile__slot {
  position: absolute; width: 15.6%; height: 21.2%; top: 43.5%;
  display: flex; align-items: center; justify-content: center;
}
.tg-halloween-profile__slot:nth-child(5n + 1) { left: 7.35%; }
.tg-halloween-profile__slot:nth-child(5n + 2) { left: 24.8%; }
.tg-halloween-profile__slot:nth-child(5n + 3) { left: 42.4%; }
.tg-halloween-profile__slot:nth-child(5n + 4) { left: 59.9%; }
.tg-halloween-profile__slot:nth-child(5n) { left: 77.45%; }
.tg-halloween-profile__slot:nth-child(n + 6) { top: 67.8%; }

.tg-halloween-profile__slot > .tg-halloween-profile__badge {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
}
.tg-halloween-profile__badge > img { display: block; width: 74%; height: 82%; object-fit: contain; }
.tg-halloween-profile__badge:focus-visible { outline: 2px solid #fff4cd; outline-offset: 3px; border-radius: 5px; }
.tg-halloween-profile__slot:focus-within { z-index: 2; }
.tg-halloween-profile[data-rank="drewno"] { --tg-halloween-text: #ffe5b3; }
.tg-halloween-profile[data-rank="miedz"] { --tg-halloween-text: #ffd8b8; }
.tg-halloween-profile[data-rank="srebro"] { --tg-halloween-text: #edf6ff; }
.tg-halloween-profile[data-rank="zloto"] { --tg-halloween-text: #ffe5ad; }
.tg-halloween-profile[data-rank="platyna"] { --tg-halloween-text: #ddfff6; }
.tg-halloween-profile[data-rank="diament"] { --tg-halloween-text: #dbf4ff; }
.tg-halloween-profile[data-rank="rubin"] { --tg-halloween-text: #ffe0c5; }
.tg-halloween-profile[data-rank="master"] { --tg-halloween-text: #ffebbc; }



.tg-halloween-theme {
  --tg-gold: #f1cf82;
  --tg-muted: #d6c1df;
  --tg-panel-border: #bb7848;
  --tg-xp-start: #f77932;
  --tg-xp-end: #ffd48c;
  color: #e8f1ef;
}
.tg-halloween-theme *, .tg-halloween-theme *::before, .tg-halloween-theme *::after { box-sizing: border-box; }
.tg-halloween-theme .tg-halloween-panel {
  border: 1px solid var(--tg-panel-border);
  border-radius: 12px;
  background: linear-gradient(125deg, #291835ed, #160f21f5);
  box-shadow: inset 0 0 0 3px #e3c37e0a, 0 7px 25px #0002;
  padding: 20px;
}
.tg-halloween-theme .tg-halloween-title {
  color: var(--tg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}
.tg-halloween-theme .tg-halloween-muted { color: var(--tg-muted); line-height: 1.6; }
.tg-halloween-theme .tg-halloween-progress {
  display: block; width: 100%; height: 12px;
  margin: 0; overflow: hidden; appearance: none; -webkit-appearance: none;
  border: 1px solid #73959a99; border-radius: 999px;
  background: #20122c; color: var(--tg-xp-start); accent-color: var(--tg-xp-start);
}
.tg-halloween-theme .tg-halloween-progress::-webkit-progress-bar {
  background: #20122c; border-radius: 999px; box-shadow: inset 0 1px 4px #0008;
}
.tg-halloween-theme .tg-halloween-progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--tg-xp-start), var(--tg-xp-end));
  border-radius: 999px; box-shadow: inset 0 1px 1px #ffffff66;
}
.tg-halloween-theme .tg-halloween-progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--tg-xp-start), var(--tg-xp-end));
  border-radius: 999px; box-shadow: inset 0 1px 1px #ffffff66;
}
.tg-halloween-theme .tg-halloween-progress--large { height: 18px; }
.tg-halloween-theme .tg-halloween-progress--small { height: 8px; }
.tg-halloween-theme .tg-halloween-progress[data-rank="drewno"] { --tg-xp-start:#855533; --tg-xp-end:#e7be7d; }
.tg-halloween-theme .tg-halloween-progress[data-rank="miedz"] { --tg-xp-start:#ad542f; --tg-xp-end:#f0b585; }
.tg-halloween-theme .tg-halloween-progress[data-rank="srebro"] { --tg-xp-start:#8393a3; --tg-xp-end:#edf5ff; }
.tg-halloween-theme .tg-halloween-progress[data-rank="zloto"] { --tg-xp-start:#c28a26; --tg-xp-end:#ffe6a1; }
.tg-halloween-theme .tg-halloween-progress[data-rank="platyna"] { --tg-xp-start:#86bdbb; --tg-xp-end:#e5fff9; }
.tg-halloween-theme .tg-halloween-progress[data-rank="diament"] { --tg-xp-start:#188bdf; --tg-xp-end:#c9f8ff; }
.tg-halloween-theme .tg-halloween-progress[data-rank="rubin"] { --tg-xp-start:#a91f43; --tg-xp-end:#ff9ba9; }
.tg-halloween-theme .tg-halloween-progress[data-rank="master"] { --tg-xp-start:#9144dd; --tg-xp-end:#f4d58c; }
.tg-halloween-theme .tg-halloween-stat-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.tg-halloween-theme .tg-halloween-tag {
  display: inline-block; border: 1px solid #b99c67; border-radius: 999px;
  padding: 3px 10px; color: #f1e5cb; background: #281735; font-size: 12px; line-height: 1.4;
}
.tg-halloween-theme .tg-halloween-button {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; justify-content: center; align-items: center; gap: 10px;
  min-height: 44px; padding: 10px 18px; border-radius: 9px; border: 1px solid #f7a55a;
  background: linear-gradient(180deg,#a44919,#6e2818);
  color: #fff9df; font: inherit; font-weight: 700; line-height: 1.3;
  text-decoration: none; text-align: center; cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff33,0 3px 12px #f779321a;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tg-halloween-theme .tg-halloween-button--secondary {
  background: linear-gradient(180deg,#362043,#1b1029);
  border-color: #c9a568; color: #f1d89c;
}
.tg-halloween-theme .tg-halloween-button:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: #f4d68d; box-shadow: inset 0 1px 0 #ffffff33,0 0 14px #f7793233;
}
.tg-halloween-theme .tg-halloween-button:disabled, .tg-halloween-theme .tg-halloween-button[aria-disabled="true"] {
  opacity: .55; cursor: default;
}
.tg-halloween-theme .tg-halloween-tabs {
  display: flex; gap: 22px; overflow-x: auto; border-bottom: 1px solid #b38d4b70;
}
.tg-halloween-theme .tg-halloween-tab {
  display: inline-flex; align-items: center; padding: 14px 0;
  color: #d6c1df; text-decoration: none; white-space: nowrap;
  font: inherit; background: transparent; border: 0; border-bottom: 2px solid transparent;
}
.tg-halloween-theme .tg-halloween-tab[aria-current="page"], .tg-halloween-theme .tg-halloween-tab[aria-selected="true"] {
  color: #f6d992; border-bottom-color: #f2cf80; font-weight: 700;
}
.tg-halloween-theme .tg-halloween-avatar {
  border-radius: 50%; overflow: hidden; border: 2px solid #c8a15c;
  background: radial-gradient(circle at 30% 25%,#5d2855,#1d1028);
}
.tg-halloween-theme .tg-halloween-avatar > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.tg-halloween-theme .tg-halloween-input {
  max-width: 100%; min-height: 44px; background: #25162e; color: #fff0cf;
  border: 1px solid #a88c59; border-radius: 8px; padding: 9px 12px; font: inherit;
}
.tg-halloween-theme :is(.tg-halloween-button,.tg-halloween-tab,.tg-halloween-input):focus-visible {
  outline: 2px solid #fff0b9; outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .tg-halloween-theme .tg-halloween-button { transition: none; }
}


.tg-halloween-theme { color-scheme: dark; --color-muted: #d6c1df; --color-faint: #bda5c9; --color-foreground: #fff0da; }
.tg-halloween-theme::before { background-image: linear-gradient(#100b1966, #100b1999), url("./background.webp"); }
.tg-halloween-theme .tg-halloween-panel { border-color: #ba784870; }
.tg-halloween-profile { filter: drop-shadow(0 12px 22px #0005); }
.tg-halloween-theme .tg-halloween-button { border-color: #eb9a51; }
.tg-halloween-theme .tg-halloween-tab[aria-current="page"] { color: #ffc17c; border-bottom-color: #ff994b; }
@media print { .tg-halloween-profile { filter: none; } }
