/**
 * Стили для MobileInputModal - модального окна ввода на мобильных устройствах.
 * Мультистрочное поле ввода в верхней части экрана.
 * Подтверждение через кнопку "Done" на виртуальной клавиатуре.
 */

.mobile-input-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 99999 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.mobile-input-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
}

.mobile-input-modal__input-container {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  box-sizing: border-box;
}

.mobile-input-modal__textarea {
  width: 100%;
  min-height: 80px;
  padding: 16px;
  font-family: 'mainFont', system-ui, -apple-system, sans-serif;
  font-size: 20px;
  font-weight: bold;
  color: #563610;
  text-align: left;
  background: linear-gradient(180deg, #fff 0%, #f5f0e0 100%);
  border: 3px solid #a67c52;
  border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
  outline: none;
  resize: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.mobile-input-modal__textarea:focus {
  border-color: #8b5a2b;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(139, 90, 43, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-input-modal__textarea::placeholder {
  color: #a89070;
  font-weight: normal;
}

/* Поддержка старого класса input для обратной совместимости */
.mobile-input-modal__input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  font-family: 'mainFont', system-ui, -apple-system, sans-serif;
  font-size: 24px;
  font-weight: bold;
  color: #563610;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, #f5f0e0 100%);
  border: 3px solid #a67c52;
  border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Анимация появления */
@keyframes mobile-input-modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes mobile-input-modal-slide-down {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-input-modal {
  animation: mobile-input-modal-fade-in 0.2s ease-out;
}

.mobile-input-modal__input-container {
  animation: mobile-input-modal-slide-down 0.3s ease-out;
}

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
}

html {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  overflow: hidden;
  height: 100%;
  width: 100%;
  position: fixed;
  touch-action: pan-x pan-y;
}

:root {
  --safe-area-inset-top: env(safe-area-inset-top);
  --safe-area-inset-right: env(safe-area-inset-right);
  --safe-area-inset-bottom: env(safe-area-inset-bottom);
  --safe-area-inset-left: env(safe-area-inset-left);
}

body {
  -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
  -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
  -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-image: linear-gradient(top, #a7a7a7 0%, #e4e4e4 51%);
  font-family: system-ui, -apple-system, -apple-system-font, 'Segoe UI', 'Roboto', sans-serif;
  font-size: 12px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  line-height: 1.5;
  background-color: #f1f3fb;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  position: fixed;
  touch-action: pan-x pan-y;
}

#rotate-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  display: none; /* по умолчанию скрыто */
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.5rem;
  z-index: 2;
  padding: 1rem;
}

@media screen and (orientation: portrait) {
  #rotate-screen {
    display: flex;
  }
}

@media screen and (orientation: landscape) {
  #rotate-screen {
    display: none;
  }
}

#loading-screen {
  width: 100%;
  height: 100%;
  background: #000000 url(assets/screen.0c77619f8064fefa6c1f.jpg) center;
  position: absolute;
  background-repeat: no-repeat;
  background-size: auto 100%;
  top: 0;
  overscroll-behavior: none;
  touch-action: none;
}

#loading-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 3% calc(3% + var(--safe-area-inset-bottom, 0px));
  gap: 6px;
}

#loading-tip {
  width: 85%;
  max-width: 560px;
  text-align: center;
  color: #e8d9b5;
  font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', sans-serif;
  font-size: clamp(11px, 1.4vw, 15px);
  line-height: 1.4;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 1vh;
}

#progress-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 90%;
  max-width: 466px;
}

#progress-bar {
  position: relative;
  width: 100%;
  aspect-ratio: 466 / 37;
  background: url(assets/progress_bar.17f7b478f39ce2c2b431.png) no-repeat center center;
  background-size: 100% 100%;
  overflow: hidden;
}

#progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: url(assets/progress_bar_fill.d65591a545d397bc2ec4.png) no-repeat left center;
  background-size: auto 100%;
}

#loading-percent {
  color: #ffcd35;
  font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', sans-serif;
  font-size: clamp(10px, 1.2vw, 14px);
  font-weight: 700;
  text-shadow: 0 0 6px rgba(255, 205, 53, 0.4), 0 1px 3px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  z-index: 1;
}

#loading-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 1.5em;
}

#version-label {
  color: #ffcd35;
  font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', sans-serif;
  font-size: clamp(9px, 1.1vw, 13px);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(255, 205, 53, 0.4), 0 1px 3px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

#game {
  width: 100%;
  height: 100%;
  /* Гарантируем минимальные размеры для предотвращения ошибки
     "Framebuffer status: Incomplete Attachment" при нулевых размерах */
  min-width: 1px;
  min-height: 1px;
}

*,
*:after,
*:before {
  box-sizing: border-box;
}

input:focus {
  outline: none;
}

input:active {
  outline: none;
}

input {
  position: absolute;
  top: 50%;
  left: 50%;
  font-weight: 800;
  color: #862c00;
  background: none;
  user-select: none;
  border: none;
}

input::placeholder {
  color: #c38560;
}

/* Стили для TextInput компонента Phaser - перезаписывают глобальные */
input.phaser-text-input,
input.phaser-text-input:focus,
input.phaser-text-input:active,
input.phaser-text-input:hover {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  outline: 0 !important;
  outline-width: 0 !important;
  outline-style: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  color: transparent !important;
  /* каретка видимая - цвет задаётся inline */
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* Стили для ManualCopyWindow - видимый input для копирования */
input.manual-copy-input,
input.manual-copy-input:focus,
input.manual-copy-input:active,
input.manual-copy-input:hover {
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 16px !important;
  font-size: 18px !important;
  font-weight: bold !important;
  color: #134a61 !important;
  background-color: #fff !important;
  border: 2px solid #c4a574 !important;
  border-radius: 8px !important;
  text-align: center !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  outline: none !important;
  user-select: text !important;
  -webkit-user-select: text !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

/* Site-themed HTML overlays (LinkCopy / DiscordLink / Iframe) — reset global input styles */
.pr-site-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(0, 0, 0, 0.75) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10000 !important;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important;
  box-sizing: border-box !important;
  padding: 16px !important;
}

.pr-site-overlay__card {
  position: relative !important;
  background-color: #16181d !important;
  border-radius: 12px !important;
  padding: 24px !important;
  max-width: 90% !important;
  width: 420px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(207, 137, 58, 0.15) !important;
  border: 1px solid #2a2d35 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.pr-site-overlay__card--wide {
  width: 440px !important;
}

.pr-site-overlay__card--promo {
  width: min(460px, 100%) !important;
  max-height: 92vh !important;
  max-height: 92dvh !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* Pinned header — the close cross is anchored here */
.pr-site-overlay__card-head {
  position: relative !important;
  flex: 0 0 auto !important;
  /* Symmetric inset keeps the title centred despite the absolute close cross */
  padding: 0 40px !important;
}

/* The only scrollable zone of the promo card */
.pr-site-overlay__card-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: #cf893a #0a0a0c !important;
}

.pr-site-overlay__card-scroll::-webkit-scrollbar {
  width: 6px !important;
}

.pr-site-overlay__card-scroll::-webkit-scrollbar-track {
  background: #0a0a0c !important;
  border-radius: 3px !important;
}

.pr-site-overlay__card-scroll::-webkit-scrollbar-thumb {
  background: #cf893a !important;
  border-radius: 3px !important;
}

/* Pinned footer — CTA and manual steps never scroll out of view */
.pr-site-overlay__card-foot {
  flex: 0 0 auto !important;
  margin-top: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid #2a2d35 !important;
}

.pr-site-overlay__close {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  width: 32px !important;
  height: 32px !important;
  font-size: 24px !important;
  line-height: 1 !important;
  border: 1px solid #2a2d35 !important;
  background-color: #0a0a0c !important;
  color: #cf893a !important;
  cursor: pointer !important;
  /* Bottom padding shifts the flex-centered × up by ~2px inside the button */
  padding: 0 0 4px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: inherit !important;
}

.pr-site-overlay__promo-note {
  font-style: italic !important;
  margin-bottom: 0 !important;
}

.pr-site-overlay__hint {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 4px 0 !important;
  background: none !important;
  border: 0 !important;
  color: #9ca3af !important;
  font-family: inherit !important;
  font-size: 13px !important;
  text-align: center !important;
  text-decoration: underline !important;
  cursor: pointer !important;
}

.pr-site-overlay__hint[hidden] {
  display: none !important;
}

.pr-site-overlay__manual-toggle {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 6px 0 !important;
  background: none !important;
  border: 0 !important;
  color: #cf893a !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  cursor: pointer !important;
}

.pr-site-overlay__manual-toggle[hidden] {
  display: none !important;
}

.pr-site-overlay__manual-toggle::after {
  content: ' \25BE' !important;
}

.pr-site-overlay__card--promo.is-manual .pr-site-overlay__manual-toggle::after {
  content: ' \25B4' !important;
}

.pr-site-overlay__manual {
  padding-top: 10px !important;
}

.pr-site-overlay__manual[hidden] {
  display: none !important;
}

.pr-site-overlay__manual .pr-site-overlay__row:last-child {
  margin-bottom: 0 !important;
}

/* Manual view: the steps replace the benefits, so the card keeps its height */
.pr-site-overlay__card--promo.is-manual .pr-site-overlay__benefits,
.pr-site-overlay__card--promo.is-manual .pr-site-overlay__promo-note,
.pr-site-overlay__card--promo.is-manual .pr-site-overlay__reward-caption {
  display: none !important;
}

.pr-site-overlay__card--promo.is-manual .pr-site-overlay__reward {
  min-height: 0 !important;
  margin-bottom: 0 !important;
  padding: 8px 12px !important;
}

.pr-site-overlay__card--promo.is-manual .pr-site-overlay__reward-icon {
  width: 28px !important;
  height: 28px !important;
}

.pr-site-overlay__card--promo.is-manual .pr-site-overlay__reward-amount {
  font-size: 16px !important;
}

/* Linked view: a check glyph replaces the seal icon, and the status is a
   sentence rather than a number — so it wraps and drops to a readable size.
   Left as 28px/nowrap it runs past the 460px card. */
.pr-site-overlay__reward--linked {
  background: linear-gradient(135deg, rgba(78, 161, 106, 0.14) 0%, #0a0a0c 55%) !important;
  border-color: #4ea16a !important;
  box-shadow: 0 0 18px rgba(78, 161, 106, 0.18), inset 0 0 0 1px rgba(78, 161, 106, 0.08) !important;
}

.pr-site-overlay__reward-check {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #4ea16a !important;
  font-size: 34px !important;
  line-height: 1 !important;
  filter: none !important;
}

.pr-site-overlay__card--linked .pr-site-overlay__reward-amount {
  font-size: 20px !important;
  color: #f3f4f6 !important;
  white-space: normal !important;
  text-shadow: 0 1px 0 #000 !important;
}

.pr-site-overlay__card--linked .pr-site-overlay__reward-caption {
  color: #4ea16a !important;
}

/* Only one copy row here instead of two steps: the benefits and the note still
   fit beside it, so the manual view has nothing to hide. */
.pr-site-overlay__card--linked.is-manual .pr-site-overlay__benefits {
  display: grid !important;
}

.pr-site-overlay__card--linked.is-manual .pr-site-overlay__promo-note,
.pr-site-overlay__card--linked.is-manual .pr-site-overlay__reward-caption {
  display: block !important;
}

.pr-site-overlay__btn--primary:disabled {
  background-color: #6b4a20 !important;
  border-color: #6b4a20 !important;
  color: #d1d5db !important;
  cursor: default !important;
  box-shadow: none !important;
}

/* Short viewports (mobile landscape): drop the marketing copy, tighten the grid */
@media (max-height: 700px) {
  .pr-site-overlay__card--promo {
    padding: 14px !important;
  }

  .pr-site-overlay__card--promo .pr-site-overlay__subtitle,
  .pr-site-overlay__card--promo .pr-site-overlay__promo-note {
    display: none !important;
  }

  .pr-site-overlay__card--promo .pr-site-overlay__reward {
    min-height: 0 !important;
    padding: 10px 12px !important;
  }

  .pr-site-overlay__card--promo .pr-site-overlay__reward-icon {
    width: 40px !important;
    height: 40px !important;
  }

  .pr-site-overlay__card--promo .pr-site-overlay__reward-amount {
    font-size: 22px !important;
  }

  .pr-site-overlay__card--promo .pr-site-overlay__benefits {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .pr-site-overlay__card--promo .pr-site-overlay__benefit {
    padding: 4px 8px 4px 22px !important;
    font-size: 12px !important;
  }

  .pr-site-overlay__card--promo .pr-site-overlay__benefit::before {
    top: 4px !important;
  }
}

@media (max-height: 560px) {
  .pr-site-overlay__card--promo {
    max-height: 96vh !important;
    max-height: 96dvh !important;
  }
}

.pr-site-overlay__reward {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 0 14px 0 !important;
  padding: 14px 16px !important;
  min-height: 72px !important;
  background: linear-gradient(135deg, rgba(255, 205, 53, 0.12) 0%, #0a0a0c 55%) !important;
  border: 1px solid #cf893a !important;
  border-radius: 10px !important;
  box-shadow: 0 0 18px rgba(255, 205, 53, 0.18), inset 0 0 0 1px rgba(255, 205, 53, 0.08) !important;
  box-sizing: border-box !important;
}

.pr-site-overlay__reward-icon {
  width: 52px !important;
  height: 52px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  filter: drop-shadow(0 2px 6px rgba(255, 205, 53, 0.35)) !important;
}

.pr-site-overlay__reward-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.pr-site-overlay__reward-amount {
  font-size: 28px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  color: #ffcd35 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  text-shadow: 0 1px 0 #000, 0 0 12px rgba(255, 205, 53, 0.35) !important;
}

.pr-site-overlay__reward-caption {
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: #cf893a !important;
  margin-top: 2px !important;
}

.pr-site-overlay__benefits {
  list-style: none !important;
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 8px !important;
}

@media (max-width: 420px) {
  .pr-site-overlay__benefits {
    grid-template-columns: 1fr !important;
  }
}

.pr-site-overlay__benefit {
  position: relative !important;
  margin: 0 !important;
  padding: 8px 12px 8px 28px !important;
  color: #e5e7eb !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  background-color: #0a0a0c !important;
  border: 1px solid #2a2d35 !important;
  border-radius: 8px !important;
  display: block !important;
}

.pr-site-overlay__benefit::before {
  content: '✓' !important;
  position: absolute !important;
  left: 10px !important;
  top: 8px !important;
  color: #cf893a !important;
  font-weight: 700 !important;
}

.pr-site-overlay__title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #f3f4f6 !important;
  text-align: center !important;
  margin: 0 0 12px 0 !important;
  display: block !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.pr-site-overlay__text {
  font-size: 14px !important;
  color: #9ca3af !important;
  text-align: center !important;
  margin: 0 0 16px 0 !important;
  display: block !important;
  line-height: 1.4 !important;
}

.pr-site-overlay__label {
  font-size: 13px !important;
  color: #9ca3af !important;
  margin: 0 0 6px 0 !important;
  font-weight: 600 !important;
  display: block !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

/* Labels that quote a Discord command keep their case: commands are lowercase,
   and "/LINK" sends the player hunting for a command that does not exist. */
.pr-site-overlay__label--plain {
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.35 !important;
}

.pr-site-overlay__field {
  display: block !important;
  width: 100% !important;
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.pr-site-overlay__row {
  display: flex !important;
  gap: 8px !important;
  align-items: stretch !important;
  margin: 0 0 14px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.pr-site-overlay__status {
  font-size: 14px !important;
  color: #22c55e !important;
  text-align: center !important;
  margin: 0 0 12px 0 !important;
  display: none !important;
  font-weight: 700 !important;
}

.pr-site-overlay input.pr-site-overlay__input,
.pr-site-overlay input.pr-site-overlay__input:focus,
.pr-site-overlay input.pr-site-overlay__input:active,
.pr-site-overlay input.pr-site-overlay__input:hover {
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  float: none !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 48px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 48px !important;
  color: #d1d5db !important;
  background-color: #0a0a0c !important;
  border: 1px solid #2a2d35 !important;
  border-radius: 8px !important;
  text-align: center !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  word-break: break-all !important;
  user-select: text !important;
  -webkit-user-select: text !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  font-family: inherit !important;
}

.pr-site-overlay input.pr-site-overlay__input:focus {
  border-color: #cf893a !important;
}

.pr-site-overlay input.pr-site-overlay__input--flex,
.pr-site-overlay input.pr-site-overlay__input--flex:focus,
.pr-site-overlay input.pr-site-overlay__input--flex:active,
.pr-site-overlay input.pr-site-overlay__input--flex:hover {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  height: 44px !important;
  line-height: 44px !important;
  font-weight: 600 !important;
  padding: 0 12px !important;
}

.pr-site-overlay__btn {
  display: block !important;
  width: 100% !important;
  padding: 14px 16px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  font-family: inherit !important;
  margin: 0 0 10px 0 !important;
}

.pr-site-overlay__btn--primary {
  color: #0a0a0c !important;
  background-color: #cf893a !important;
  border: 1px solid #a86e2e !important;
  box-shadow: 0 0 20px rgba(207, 137, 58, 0.2) !important;
}

.pr-site-overlay__btn--secondary {
  color: #d1d5db !important;
  background-color: #16181d !important;
  border: 1px solid #2a2d35 !important;
  margin-bottom: 0 !important;
}

.pr-site-overlay__btn--compact {
  width: auto !important;
  flex: 0 0 auto !important;
  padding: 12px 16px !important;
  font-size: 13px !important;
  margin: 0 !important;
  white-space: nowrap !important;
  color: #0a0a0c !important;
  background-color: #cf893a !important;
  border: 1px solid #a86e2e !important;
}

.pr-site-overlay__btn--success {
  background-color: #22c55e !important;
  border-color: #16a34a !important;
  color: #fff !important;
}

/* Fullscreen iframe overlay */
/*
 * Оверлей встроенного клиента тикетов.
 *
 * Занимает экран целиком, как и вариант с iframe, но внутри не фрейм, а DOM пакета
 * @pr-tickets/ui — на канале facebook-instant фрейм с нашим доменом запрещён CSP.
 * Собственные стили пакета живут под `.tk-root`, здесь только контейнер.
 *
 * `!important` — вынужденно и как у соседей: у игры агрессивные глобальные правила.
 */
.pr-site-overlay--tickets {
  padding: 0 !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  flex-direction: column !important;
  background-color: #0a0a0c !important;
  height: 100dvh !important;
  min-height: 100% !important;
  /* Клавиатура на мобильных не должна прятать поле ввода под краем экрана. */
  padding-bottom: env(safe-area-inset-bottom) !important;
}

.pr-site-overlay--tickets .tk-root {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.pr-site-overlay--iframe {
  padding: 0 !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  flex-direction: column !important;
  background-color: #0a0a0c !important;
  height: 100dvh !important;
  min-height: 100% !important;
}

.pr-site-overlay__iframe-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 16px !important;
  height: 52px !important;
  min-height: 52px !important;
  background-color: #16181d !important;
  border-bottom: 1px solid #2a2d35 !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.pr-site-overlay__iframe-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #f3f4f6 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}

.pr-site-overlay__iframe-close {
  width: 36px !important;
  height: 36px !important;
  font-size: 28px !important;
  line-height: 32px !important;
  border: 1px solid #2a2d35 !important;
  background-color: #0a0a0c !important;
  color: #cf893a !important;
  cursor: pointer !important;
  /* Bottom padding shifts flex-centered × up by ~2px inside the button */
  padding: 0 0 4px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: inherit !important;
}

.pr-site-overlay__iframe {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  flex: 1 1 auto !important;
  box-sizing: border-box !important;
  background-color: #0a0a0c !important;
}


/* общий стиль: положим прямо в <head> или ваш index.css */
#paystation-custom-close {
  position: fixed; /* поверх всего, не зависит от DOM-слоя Pay Station */
  top: 8px;
  right: 12px;
  z-index: 2000; /* по умолчанию lightbox = 1000, так что 2000 с запасом */
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  font-size: 26px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  display: none; /* покажем позже JS-ом */
}

@keyframes supportLinkAppear {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes supportLinkPulse {
  0%,
  100% {
    text-shadow: 0 0 6px rgba(255, 205, 53, 0.4), 0 1px 3px rgba(0, 0, 0, 0.9);
  }
  50% {
    text-shadow: 0 0 14px rgba(255, 205, 53, 0.7), 0 1px 3px rgba(0, 0, 0, 0.9);
  }
}

#loading-support-link {
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 1;
  padding: 8px 20px;
  border: 1px solid rgba(196, 165, 116, 0.6);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(90, 60, 20, 0.7) 0%, rgba(50, 30, 10, 0.8) 100%);
  color: #ffcd35;
  font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', sans-serif;
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-shadow: 0 0 6px rgba(255, 205, 53, 0.4), 0 1px 3px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  animation: supportLinkAppear 0.6s ease-out both, supportLinkPulse 3s ease-in-out 1s infinite;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  margin-left: auto;
}

#loading-support-link:hover {
  background: linear-gradient(180deg, rgba(110, 75, 25, 0.85) 0%, rgba(65, 40, 15, 0.9) 100%);
  border-color: rgba(255, 205, 53, 0.7);
  transform: scale(1.05);
  animation-play-state: paused;
}

#loading-support-link:active {
  transform: scale(0.97);
}

.loading-support-icon {
  width: 1.3em;
  height: 1.3em;
  filter: brightness(0) invert(83%) sepia(50%) saturate(500%) hue-rotate(5deg);
  flex-shrink: 0;
}

@media (orientation: landscape) and (max-aspect-ratio: 5/4) {
  #loading-bottom {
    padding-bottom: 2%;
  }

  #progress-bar-wrapper {
    transform: scale(0.75);
  }
}

@media (orientation: portrait) {
  #loading-screen {
    background-size: 200%;
  }

  #loading-footer {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  #loading-support-link {
    margin-left: 0;
  }

  #version-label {
    text-align: center;
  }
}

/* ── Login Widget ── */

@keyframes loginWidgetFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes loginWidgetSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#login-widget-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 12, 0.75);
  animation: loginWidgetFadeIn 0.3s ease-out;
}

#login-widget-panel {
  background: #16181d;
  border: 1px solid rgba(207, 137, 58, 0.25);
  border-radius: 16px;
  padding: 36px 28px 28px;
  width: 340px;
  max-width: 92vw;
  text-align: center;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  position: relative;
  animation: loginWidgetSlideUp 0.35s ease-out;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(207, 137, 58, 0.08);
}

#login-widget-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
  display: none;
}

#login-widget-close:hover {
  color: #fff;
}

#login-widget-panel.has-close #login-widget-close {
  display: block;
}

#login-widget-title {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

#login-widget-subtitle {
  color: #9ca3af;
  font-size: 13px;
  margin-bottom: 24px;
  line-height: 1.4;
}

#login-widget-error {
  display: none;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  padding: 10px 12px;
  margin: -12px 0 16px;
  text-align: left;
}

.login-widget-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 10px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  line-height: 1;
}

.login-widget-btn:hover {
  opacity: 0.88;
}

.login-widget-btn:active {
  transform: scale(0.98);
}

.login-widget-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.login-widget-btn-google {
  background: #fff;
  color: #1f1f1f;
}

.login-widget-btn-facebook {
  background: #1877F2;
  color: #fff;
}

.login-widget-btn-apple {
  background: #000;
  color: #fff;
}

.login-widget-btn-discord {
  background: #5865F2;
  color: #fff;
}

#login-widget-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #4b5563;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#login-widget-divider::before,
#login-widget-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #374151;
}

#login-widget-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}

.login-widget-icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}

.login-widget-icon-btn:hover {
  opacity: 0.85;
  transform: scale(1.08);
}

.login-widget-icon-btn:active {
  transform: scale(0.95);
}

.login-widget-icon-btn svg {
  width: 22px;
  height: 22px;
}

.login-widget-icon-btn.icon-google   { background: #fff; }
.login-widget-icon-btn.icon-facebook { background: #1877F2; }
.login-widget-icon-btn.icon-apple    { background: #000; border: 1px solid #374151; }
.login-widget-icon-btn.icon-discord  { background: #5865F2; }

#login-widget-guest-divider {
  height: 1px;
  background: #1f2937;
  margin: 18px 0 14px;
}

#login-widget-guest-hint {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 12px;
}

#login-widget-guest-btn {
  background: none;
  border: 1px solid #374151;
  color: #9ca3af;
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

#login-widget-guest-btn:hover {
  border-color: #6b7280;
  color: #d1d5db;
}

@media (max-width: 380px) {
  #login-widget-panel {
    padding: 28px 18px 22px;
  }

  #login-widget-title {
    font-size: 19px;
  }

  .login-widget-btn {
    padding: 10px 14px;
    font-size: 14px;
  }

  .login-widget-icon-btn {
    width: 42px;
    height: 42px;
  }
}

/* ── Guest banner ── */

#guest-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 36px;
  background: rgba(22, 24, 29, 0.95);
  border-bottom: 2px solid rgba(207, 137, 58, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 16px;
  z-index: 10;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#guest-banner-text {
  color: #cf893a;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

#guest-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#guest-banner-login {
  background: linear-gradient(135deg, #cf893a, #a86e2e);
  color: #fff;
  border: none;
  padding: 4px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

#guest-banner-login:hover {
  opacity: 0.85;
}

#guest-banner-login:active {
  opacity: 0.7;
}

#guest-banner-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

#guest-banner-close:hover {
  color: #fff;
}

#game.with-guest-banner {
  height: calc(100% - 36px) !important;
  margin-top: 36px !important;
}

@media (max-width: 480px) {
  #guest-banner {
    font-size: 11px;
    padding: 0 8px;
    height: 32px;
  }

  #guest-banner-login {
    font-size: 11px;
    padding: 3px 10px;
  }

  #game.with-guest-banner {
    height: calc(100% - 32px) !important;
    margin-top: 32px !important;
  }
}

/* Подключаем стили для мобильного ввода */

