/*
 * Сезонные события на сайте (docs/events.md): только свои классы hw-*, общие блоки страниц не трогаем
 * (правило владельца для сайта, 22.10.2026). Хэллоуин — оранжевые тыквы и фиолетовый акцент.
 */

/* Тыква у логотипа: ведёт на /halloween.php. */
.ch_gamebar .hw-logo-pumpkin {
  float: left;
  margin: -2px 14px 0 -12px;
  line-height: 0;
}
.ch_gamebar .hw-logo-pumpkin img {
  transition: transform .2s ease;
}
.ch_gamebar .hw-logo-pumpkin:hover img {
  transform: rotate(-12deg) scale(1.1);
}
@media (max-width: 767px) {
  .ch_gamebar .hw-logo-pumpkin {
    margin: 0 8px 0 -6px;
  }
  .ch_gamebar .hw-logo-pumpkin img {
    width: 26px;
    height: 26px;
  }
}

/* Плашка праздника: над картой, над полем охоты, итог «забрать тыкву», «сладость или гадость». */
.hw-note {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff3e6;
  border: 1px solid #f0a25a;
  border-radius: 4px;
  margin: 10px 0;
  padding: 10px 14px;
}
.hw-note[hidden] {
  display: none;
}
.hw-note p {
  margin: 0;
  font-size: 14px;
  line-height: 19px;
  color: #292929;
}
.hw-note p + p {
  margin-top: 4px;
}
.hw-note .hw-note-title {
  font-weight: bold;
  color: #b4530a;
}
.hw-note-icon {
  flex: none;
}
.hw-note-error {
  background: #f7f1fb;
  border-color: #b49ac8;
}
.hw-note-pat {
  text-align: left;
  margin: 16px 0;
}

.hw-muted {
  color: #777;
  font-size: 13px;
}

/* Главная: блок праздника над профилем. */
.hw-home {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #3b2357;
  border-radius: 4px;
  color: #fff;
  margin: 20px 0;
  padding: 12px 18px;
}
.hw-home h2 {
  color: #ffb066;
  font-size: 18px;
  font-weight: bold;
  line-height: 22px;
  margin: 0 0 4px 0;
}
.hw-home p {
  color: #fff;
  font-size: 14px;
  line-height: 19px;
  margin: 0;
}
.hw-home-body {
  flex: 1;
}
.hw-home-icon {
  flex: none;
}
.hw-home-button {
  flex: none;
}
@media (max-width: 767px) {
  .hw-home {
    flex-wrap: wrap;
  }
  .hw-home-body {
    flex-basis: calc(100% - 62px);
  }
  .hw-home-button {
    margin-left: 62px;
  }
}

/* Карта: районы с тыквой и блок в колонке района. */
#map ul li.hw-pumpkin {
  position: relative;
}
#map ul li.hw-pumpkin::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  background: url("/img/events/map-pumpkin.png") center / contain no-repeat;
  pointer-events: none;
}
.hw-region {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff3e6;
  border: 1px solid #f0a25a;
  border-radius: 4px;
  margin: 8px 0 12px 20px;
  padding: 10px 12px;
}
.hw-region p {
  margin: 0 0 6px 0;
  font-size: 13px;
  line-height: 18px;
}
.hw-region form {
  margin: 0;
}
.hw-map-hint {
  margin: 10px 0 10px 20px;
}

/* Профиль и главная: рамка «Хэллоуин» вокруг аватара (Event\Adornments::framedAvatar). Аватар — кругом в середине
   кольца, кольцо — картинкой поверх. */
.hw-framed {
  display: block;
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 0 20px 0;
}
.hw-framed::after {
  content: "";
  position: absolute;
  top: -12px;
  right: -12px;
  bottom: -12px;
  left: -12px;
  background: center / contain no-repeat;
  pointer-events: none;
}
.hw-framed-halloween::after {
  background-image: url("/img/events/frame-halloween.png");
}
div.profile div.avatar .hw-framed img.avatar {
  width: 66%;
  height: 66%;
  margin: 17%;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  object-fit: cover;
  background: #fff;
}
@media (max-width: 767px) {
  div.profile div.avatar .hw-framed {
    width: 60%;
    max-width: 480px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 12px auto 17px;
  }
  div.profile div.avatar .hw-framed img.avatar {
    width: 66%;
    height: 66%;
    max-width: none;
    margin: 17%;
  }
}

/* Значки за события рядом с именем кота. */
.hw-badges {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}
.hw-badge {
  vertical-align: middle;
  margin-right: 2px;
}

/* /halloween.php */
.hw-page .hw-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #3b2357;
  border-radius: 4px;
  color: #fff;
  margin: 10px 0 20px;
  padding: 14px 20px;
}
.hw-page .hw-hero p {
  margin: 0;
  color: #fff;
}
.hw-page .hw-balance {
  font-size: 22px;
  line-height: 28px;
}
.hw-page .hw-balance b {
  color: #ffb066;
}
.hw-page .hw-timer {
  font-size: 14px;
  opacity: .9;
}
.hw-block {
  margin: 0 0 24px 0;
}
.hw-block h2 {
  font-size: 18px;
  line-height: 24px;
  margin: 0 0 10px 0;
}
.hw-where {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hw-where li {
  border-bottom: 1px solid #eee;
  padding: 8px 0;
  font-size: 14px;
  line-height: 19px;
}
.hw-table {
  width: 100%;
  border-collapse: collapse;
}
.hw-table th {
  text-align: left;
  font-size: 12px;
  color: #777;
  font-weight: normal;
  border-bottom: 1px solid #ddd;
  padding: 4px 6px;
}
.hw-table td {
  border-bottom: 1px solid #eee;
  padding: 8px 6px;
  vertical-align: middle;
}
.hw-table .hw-num {
  text-align: right;
  white-space: nowrap;
}
.hw-table .hw-action {
  text-align: right;
  white-space: nowrap;
}
.hw-offer {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hw-offer img {
  flex: none;
  object-fit: contain;
}
.hw-offer small {
  color: #777;
}
.hw-price-icon {
  vertical-align: -3px;
}
.hw-form {
  display: inline;
  margin: 0;
}
.hw-count input {
  width: 56px;
  margin: 0 6px 0 4px;
}
.hw-quests,
.hw-rating {
  margin: 0;
  padding: 0;
}
.hw-quests {
  list-style: none;
}
.hw-quests li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  border-bottom: 1px solid #eee;
  padding: 8px 0;
}
.hw-quest-title {
  flex: 1 1 100%;
  font-size: 14px;
}
.hw-reward {
  color: #b4530a;
  font-weight: bold;
}
.hw-rating {
  list-style: decimal inside;
}
.hw-rating li {
  padding: 4px 0;
}
.hw-rating li.hw-self {
  font-weight: bold;
}
.hw-columns {
  display: flex;
  gap: 30px;
}
.hw-main {
  flex: 2 1 0;
  min-width: 0;
}
.hw-side {
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 767px) {
  .hw-page {
    padding: 0 12px;
  }
  .hw-columns {
    flex-direction: column;
    gap: 0;
  }
  .hw-table thead {
    display: none;
  }
  .hw-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 6px 0;
  }
  .hw-table td {
    border-bottom: 0;
    padding: 4px 0;
  }
  .hw-table .hw-action {
    grid-column: 1 / -1;
    text-align: left;
    white-space: normal;
  }
  .hw-count {
    display: inline-block;
    margin-right: 6px;
  }
}

/*
 * Сюжет (макеты story-now и site-story, ряд «24 · Сюжетная линия»): блок «Сейчас в Кетхоуме» на главной и страница
 * эпизода /story.php. Свои классы st-*, общие блоки не трогаем.
 */
.st-yellow,
a.st-yellow {
  display: inline-block;
  background: #f8c947;
  border: 1px solid #e9b82c;
  border-radius: 3px;
  color: #333;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  line-height: 18px;
  padding: 6px 16px;
  text-decoration: none;
  white-space: nowrap;
}
.st-yellow:hover {
  background: #f3bd2a;
  color: #333;
  text-decoration: none;
}
.st-blue {
  display: inline-block;
  background: #3d8fd1;
  border: 1px solid #2f7dbd;
  border-radius: 3px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  line-height: 18px;
  padding: 6px 16px;
  white-space: nowrap;
}
.st-blue:hover {
  background: #2f7dbd;
}
.st-gray {
  color: #888;
}

/* Главная: «Сейчас в Кетхоуме» — строка на событие. */
.st-now {
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 3px;
  font-size: 13px;
  line-height: 18px;
  margin: 20px 0;
}
.st-now .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ededed;
  font-size: 14px;
  font-weight: bold;
  padding: 8px 12px;
}
.st-now .hd span {
  color: #888;
  font-size: 12px;
  font-weight: normal;
}
.st-now .it {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
}
.st-now .it + .it {
  border-top: 1px solid #ededed;
}
.st-now .ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}
.st-now .ico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  transform: scale(1.5);
  transform-origin: 50% 10%;
}
.st-now .ico img.hw {
  width: 30px;
  height: 30px;
  object-fit: contain;
  transform: none;
}
.st-now .ico img.fx,
.st-say .who img.fx {
  object-position: 78% 14%;
  transform: scale(2.1);
  transform-origin: 78% 14%;
}
.st-now .tx {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.st-now .tx b {
  font-size: 14px;
}
.st-now .tx span {
  color: #666;
  font-size: 12px;
}
.st-now .bar {
  height: 5px;
  max-width: 240px;
  margin-top: 3px;
  border-radius: 3px;
  background: #eee;
  overflow: hidden;
}
.st-now .bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: #2f6b45;
}
.st-ico-story {
  background: #dcebdd;
}
.st-ico-hw {
  background: #2b1b3d;
}

/* Страница эпизода: текст 13px, как в макете. */
.st-page {
  font-size: 13px;
  line-height: 18px;
}
.st-page .st-crumb {
  color: #888;
}
.st-note {
  background: #f2f8f3;
  border: 1px solid #9cc7a9;
  border-radius: 4px;
  margin: 10px 0;
  padding: 10px 14px;
}
.st-note p {
  margin: 0;
  color: #292929;
  font-size: 14px;
  line-height: 19px;
}
.st-note-error {
  background: #fbf0ec;
  border-color: #e3a693;
}
.st-columns {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.st-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.st-side {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 10px;
  width: 260px;
}
.st-page h2 {
  color: #08577d;
  font-size: 17px;
  line-height: 22px;
  margin: 6px 0 0;
}
.st-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.st-head h1 {
  font-size: 24px;
  line-height: 28px;
  margin: 0;
}
.st-head .ep {
  align-self: flex-start;
  background: #24402f;
  border-radius: 10px;
  color: #fff8e8;
  font-size: 12px;
  font-weight: bold;
  line-height: 18px;
  padding: 1px 9px;
}
.st-art {
  aspect-ratio: 9 / 4;
  background: #24402f;
  border-radius: 4px;
  overflow: hidden;
}
.st-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.st-say {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.st-say .who {
  flex: none;
  width: 64px;
  height: 64px;
  background: #fff2c2;
  border: 2px solid #f2cb3f;
  border-radius: 50%;
  overflow: hidden;
}
.st-say .who img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 10%;
  transform: scale(1.5);
  transform-origin: 50% 8%;
}
.st-say .bub {
  flex: 1;
  background: #fdf6db;
  border: 1px solid #f2cb3f;
  border-radius: 3px;
  font-size: 13px;
  line-height: 19px;
  padding: 9px 12px;
}
.st-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.st-steps > div,
.st-steps > a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 3px;
  color: #333;
  padding: 7px 9px;
  text-decoration: none;
}
.st-steps > a:hover {
  border-color: #2f6b45;
  text-decoration: none;
}
.st-steps b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.st-steps span {
  color: #888;
  font-size: 11px;
  line-height: 14px;
}
.st-steps i {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  background: #eee;
  border-radius: 10px;
  color: #888;
  font-size: 11px;
  font-style: normal;
  font-weight: bold;
}
.st-steps i svg {
  display: block;
}
.st-steps .done i {
  background: #2f6b45;
  color: #fff;
}
.st-steps .now,
.st-steps .st-shown {
  background: #f2f8f3;
  border-color: #2f6b45;
  box-shadow: inset 0 0 0 1px #2f6b45;
}
.st-steps .now i {
  background: #f8c947;
  color: #333;
}
.st-steps .off {
  color: #999;
}
.st-table {
  border-collapse: collapse;
  width: 100%;
}
.st-table th,
.st-table td {
  border-bottom: 1px solid #ddd;
  padding: 7px 4px;
  text-align: left;
  vertical-align: middle;
}
.st-table th {
  color: #646464;
  font-size: 12px;
  font-weight: normal;
}
.st-table .st-nowrap {
  white-space: nowrap;
}
.st-table .st-action {
  text-align: right;
  white-space: nowrap;
}
.st-table .st-action form {
  margin: 0;
}
.st-table .st-num {
  text-align: right;
}
.st-pool {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 3px;
  padding: 12px;
}
.st-pool .big {
  height: 16px;
  background: #eee;
  border-radius: 8px;
  overflow: hidden;
}
.st-pool .big i {
  display: block;
  height: 100%;
  background: linear-gradient(#3a8a57, #2f6b45);
  border-radius: 8px;
}
.st-pool .nums {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #666;
  font-size: 12px;
}
.st-pool .nums b {
  color: #333;
  font-size: 14px;
}
.st-pool .give {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.st-pool .give label {
  margin: 0;
}
.st-pool .give input[type="number"] {
  width: 90px;
  height: 28px;
  margin: 0;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-sizing: border-box;
  padding: 0 8px;
}
.st-plate {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fdf6db;
  border: 1px solid #f2cb3f;
  border-radius: 3px;
  padding: 10px 12px;
}
.st-plate .st-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}
.st-aside {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f7f7f7;
  border: 1px solid #e3e3e3;
  border-radius: 3px;
  padding: 12px;
}
.st-album {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.st-album > div {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  font-size: 10px;
  line-height: 12px;
  overflow: hidden;
  text-align: center;
}
.st-album .got {
  background: #f6ebd0;
  border: 2px solid #c8962e;
}
.st-album .got img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}
.st-album .got span {
  position: relative;
  width: 100%;
  background: rgba(36, 64, 47, .88);
  color: #fff8e8;
  font-weight: bold;
  padding: 2px 2px 3px;
}
.st-album .rare {
  border-color: #7fb6d9;
  box-shadow: 0 0 0 2px #cfe6f5;
}
.st-album .no {
  align-items: center;
  flex-direction: column;
  background: #f1f1f1;
  border: 2px dashed #d5d5d5;
  color: #999;
}
.st-album small {
  display: block;
  font-weight: normal;
  opacity: .8;
}
.st-album-wide {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  margin: 8px 0 16px;
}
.st-album-wide > div {
  font-size: 12px;
  line-height: 15px;
}
.st-chron {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  line-height: 17px;
}
.st-chron p {
  margin: 0;
}
.st-chron time {
  color: #888;
  margin-right: 4px;
}
.st-btn-pug {
  position: relative;
  display: inline-flex;
  flex: none;
  width: 14px;
  height: 14px;
  background: #c8962e;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #8a5f12;
  vertical-align: -2px;
}
.st-btn-pug::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #8a5f12 0 1px, transparent 1.5px) 0 0 / 3px 3px;
}
@media (max-width: 767px) {
  .st-page {
    padding: 0 12px;
  }
  .st-columns {
    flex-direction: column;
    gap: 10px;
  }
  .st-side {
    width: auto;
    align-self: stretch;
  }
  .st-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .st-pool .st-table td {
    font-size: 12px;
  }
  .st-now {
    font-size: 12px;
  }
}

/* Сюжет на карте и охоте: находки в районах, блок находки в колонке района, шёпот, плашка над полем охоты. */
#map ul li.st-has-find {
  position: relative;
}
#map ul li .st-find-mark {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 34px;
  height: 34px;
  pointer-events: none;
}
.st-region {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f2f8f3;
  border: 1px solid #9cc7a9;
  border-radius: 4px;
  font-size: 13px;
  line-height: 18px;
  margin: 8px 0 12px 20px;
  padding: 10px 12px;
}
.st-region p {
  margin: 0 0 6px 0;
}
.st-region form {
  margin: 0;
}
.st-whisper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7f3e9;
  border-color: #d9cfb4;
}
.st-whisper img {
  flex: none;
  border-radius: 50%;
  background: #fff2c2;
  object-fit: cover;
  object-position: 50% 10%;
}
.st-whisper p {
  font-style: italic;
}
.st-hunt-note {
  margin: 0 0 10px 0;
}

/* Сюжет, чат: загадка Тени над этапами и слова пароля в колонке. */
.st-riddle {
  background: #eef0f6;
  border-color: #b8bfd6;
}
.st-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.st-words span {
  background: #24402f;
  border-radius: 10px;
  color: #fff8e8;
  font-weight: bold;
  padding: 1px 9px;
}
