/* ════════════════════════════════════════════════════════════════
   components.css — базовые UI-компоненты игры
   Содержание:
   1. Инпуты (input-group, text/number/select)
   2. Кнопки (button, variants green/red/blue)
   3. Number input (.number-input-wrapper, stepper)
   4. Кнопки-инструменты (.dropdown-button, .hand-strength-button)
   5. Кастомный select (.app-select)
   6. Выпадающие меню (.calc-dropdown, .score-entry-dropdown)
   7. Voice / info кнопки
   8. Кнопка расчёта раунда (.calculateRound)
   9. Левая колонка (.left-section-tables-wrap)
   10. Заголовок раунда (.round-title, кости)
   11. Ветер раунда (.roundWind)
   12. Заголовок сводки очков (.scoreSummary-title)
   13. Заголовок истории (.historyScore-title)
   14. Выбор ветра в шапке (#roundWindSelectHeader)
   15. Keyframes
   ════════════════════════════════════════════════════════════════ */

/* ── 1. Инпуты ── */

/* ── 1.1 Группа инпутов ── */

.input-group {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* ── 1.2 Базовые инпуты ── */

input[type="text"],
input[type="number"],
select {
  padding: 12px;
  font-size: 16px;
  color: var(--color-input-text);
  background-color: var(--color-input-bg);
  border: 1px solid var(--color-border);
  border-radius: 30px;
  box-sizing: border-box;
  transition: 0.3s;
  outline: none;
  min-height: 44px;
}

input[type="number"] {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  width: 100%;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

select:not(.app-select__native) {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--color-input-bg);
  border: 1px solid var(--color-border);
  padding: 10px 36px 10px 14px;
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--color-heading);
  text-align: center;
  cursor: pointer;
}

/* ── 1.3 Фокус ── */

input[type="text"]:focus,
input[type="number"]:focus,
select:not(.app-select__native):focus {
  background-color: var(--color-input-bg);
  border-color: var(--color-green);
  box-shadow: 0px 0px 0px 1px var(--color-green);
}

/* ── 2. Кнопки ── */

button {
  background-color: rgb(255 255 255 / 55%);
  color: var(--color-button-text);
  max-width: 275px;
  min-width: 70px;
  max-height: 42px;
  padding: 10px 20px;
  border-radius: 20px;
  border: 1px solid rgb(255 255 255 / 50%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 55%),
    0 2px 8px -3px rgb(15 23 42 / 12%);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  margin-top: 15px;
  font-weight: 600;
}

button:active {
  transform: scale(0.98);
}

button:disabled,
button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── 2.1 Варианты (green / red / blue) ── */

button.green {
  border: 1px solid var(--color-green);
}

button.green:hover {
  background-color: var(--color-green-hover);
  color: var(--color-green-dark);
}

button.red {
  border: 1px solid var(--color-red);
}

button.red:hover {
  background-color: var(--color-red-hover);
  color: var(--color-red-dark);
}

button.blue {
  border: 1px solid var(--color-blue);
}

button.blue:hover {
  background-color: var(--color-blue-hover);
  color: var(--color-blue-dark);
}

button.blue.is-muted {
  opacity: 0.72;
  border-color: var(--color-blue-muted);
  color: #6b7280;
}

button.blue.is-muted:hover {
  background-color: rgb(154 163 173 / 25%);
  color: #4b5563;
}

/* ── 3. Number input ── */

.number-input-wrapper {
  position: relative;
  width: 100%;
}

.number-input-wrapper--compact input[type="number"] {
  padding-right: 48px;
}



.number-input-wrapper--compact .number-input-stepper {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
}



/* ── 3.1 Степпер ── */

.number-input-stepper {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 15px;
  height: 30px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 20px;
}

.number-step-button {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--color-text-muted);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}

.number-step-button + .number-step-button {
  border-top: 1px solid var(--color-border);
}

.number-step-button i {
  margin: 0;
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
}

.number-step-button:hover {
  background: rgb(224 188 81 / 16%);
  color: var(--color-heading);
}

.number-step-button:active {
  background: rgb(224 188 81 / 28%);
  transform: none;
}



/* ── 4. Кнопки-инструменты ── */

/* ── 4.1 Общий базовый стиль ── */

.dropdown-button,
    .score-entry-button {
position: static;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  transform: none;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.dropdown-button {
  background: rgb(245 233 200 / 46%);
  border: 1px solid var(--color-gold-border);
  color: #8a7428;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 70%),
    0 2px 8px -3px rgb(15 23 42 / 12%);
}



.score-entry-button {
  background: rgb(255 255 255 / 30%);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  min-width: 0;
  max-width: none;
  max-height: none;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 55%),
    0 2px 8px -3px rgb(15 23 42 / 10%);
}

/* ── 4.2 Hover ── */

.dropdown-button:hover {
  background: rgb(237 216 148 / 60%);
  border-color: rgb(224 188 81 / 75%);
  color: #6f5d1d;
}



.score-entry-button:hover {
  background: rgb(224 188 81 / 16%);
  border-color: var(--color-border);
  color: var(--color-heading);
}

/* ── 4.3 Активное состояние ── */

.dropdown-button.is-active {
  background: var(--color-gold);
  border-color: rgb(176 141 36 / 90%);
  color: #ffffff;
}

.score-entry-button.is-active {
  background: rgb(224 188 81 / 28%);
  border-color: var(--color-gold-border);
  color: var(--color-heading);
}

.dropdown-button:active,
    .score-entry-button:active {
transform: scale(0.94);
}

.dropdown-button i,
    .score-entry-button i {
margin: 0;
  font-size: 13px;
  line-height: 1;
}

/* ── 5. Кастомный select ── */

.app-select {
  position: relative;
  display: block;
  width: 100%;
}

.app-select__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── 5.1 Триггер ── */

.app-select__trigger {
  position: relative;
  width: 100%;
  margin: 0;
  min-height: 44px;
  padding: 10px 36px 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  background: var(--color-input-bg);
  border: 1px solid var(--color-border);
  border-radius: 30px;
  color: var(--color-heading);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  text-align: center;
}

button.app-select__trigger:active {
  transform: none;
}

.app-select__trigger:hover {
  border-color: rgb(224 188 81 / 55%);
  background-color: #fff;
  color: var(--color-heading);
}

.app-select__trigger:focus-visible {
  border-color: var(--color-green);
  box-shadow: 0 0 0 1px var(--color-green);
  outline: none;
}

.app-select.is-disabled .app-select__trigger {
  opacity: 0.55;
  cursor: not-allowed;
}

.app-select.is-round-wind .app-select__trigger {
  box-shadow: 0 0 0 3px var(--color-gold-ring);
}

/* ── 5.2 Значение и стрелка ── */

.app-select__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-select__chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 1em;
  height: 1em;
  margin-top: -0.5em;
  display: grid;
  place-items: center;
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
}

.app-select__chevron i {
  display: block;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform 0.2s ease;
}

.app-select.is-open .app-select__chevron i {
  transform: rotate(180deg);
}

/* ── 5.3 Меню ── */

.app-select__menu {
  position: fixed;
  z-index: 35000;
  display: none;
  padding: 6px;
  background: rgb(255 255 255 / 85%);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid rgb(255 255 255 / 55%);
  border-top: 3px solid #ffca54;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgb(15 23 42 / 12%), inset 0 1px 0 rgb(255 255 255 / 70%);
  overflow-y: auto;
  transform-origin: top center;
}

.app-select__menu--floating {
  display: block;
  animation: appSelectPop 0.28s ease;
}

.app-select__menu--above {
  transform-origin: bottom center;
}

.app-select.is-open .app-select__menu:not(.app-select__menu--floating) {
  display: block;
  animation: appSelectPop 0.28s ease;
}

/* ── 5.4 Опции ── */

.app-select__option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text);
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.app-select__option:hover,
.app-select__option:focus-visible {
  background: rgb(224 188 81 / 16%);
  color: var(--color-heading);
  outline: none;
}

.app-select__option.is-selected {
  background: var(--color-gold-light);
  color: var(--color-heading);
}

.app-select__option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── 5.5 Вариант header-wind (ветер в заголовке) ── */

.app-select--header-wind {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: 1em;
  line-height: 1;
}

.app-select--header-wind .app-select__chevron,
.app-select--wind .app-select__chevron {
  display: none;
}

.app-select--header-wind .app-select__trigger,
.app-select--header-wind .app-select__trigger:hover,
.app-select--header-wind .app-select__trigger:focus-visible,
.app-select--header-wind .app-select__trigger:active {
  position: static;
  width: auto;
  min-width: 0;
  min-height: 0;
  height: 1em;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-family: inherit;
  font-size: 1.05em;
  font-weight: inherit;
  letter-spacing: 0;
  line-height: 1;
  transform: none;
}

.app-select--header-wind .app-select__value {
  display: block;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  font: inherit;
  line-height: 1;
}

.app-select--header-wind .app-select__menu {
  min-width: 108px;
}

.app-select--header-wind .app-select__option {
  justify-content: center;
  padding: 10px 14px;
  white-space: nowrap;
}

/* ── 5.6 Вариант wind ── */

.app-select--wind {
  width: auto;
  max-width: none;
  margin: 0 auto;
}

.app-select--wind .app-select__trigger {
  width: auto;
  border: none;
  background: transparent;
  min-height: 46px;
  padding: 8px 12px;
  font-size: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.app-select--wind .app-select__trigger:active {
  transform: translateX(-50%);
}

/* ── 5.7 Вариант field ── */

.app-select--field .app-select__trigger {
  min-height: 38px;
  max-width: 100%;
  padding: 1px 36px 1px 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--color-text);
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
  box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
  border-radius: 8px;
}

.app-select--field .app-select__value {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.35;
}

.app-select--field .app-select__menu:not(.app-select__menu--hand-decomposition) .app-select__option {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.35;
  width: auto;
  min-width: 100%;
}

/* ── 5.8 Специальные меню (hand-decomposition, measuring) ── */

.app-select__menu--hand-decomposition .app-select__option {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  max-height: none;
  margin: 0;
  box-sizing: border-box;
}

.app-select__menu--measuring .app-select__option {
  width: max-content;
  min-width: 0;
}

/* ── 6. Выпадающие меню ── */

/* ── 6.1 Калькулятор (.calc-dropdown) ── */

.calc-dropdown {
  position: fixed;
  background: rgb(255 255 255 / 82%);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid rgb(255 255 255 / 55%);
  border-top: 3px solid #ffca54;
  border-radius: 20px;
  display: none;
  z-index: 111112;
  padding: 10px;
  box-shadow: 0 6px 18px rgb(15 23 42 / 12%), inset 0 1px 0 rgb(255 255 255 / 70%);
}

.calc-dropdown.show {
  display: block;
  animation: dropdownPop 0.4s ease;
}

.calc-dropdown::before {
  content: "";
  position: absolute;
  top: -10px;
  right: 10%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 10px solid #ffca54;
}

.calc-buttons {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  gap: 5px;
  margin-bottom: 5px;
}

.calc-buttons button {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  min-width: 30px;
  padding: 5px;
  font-size: 16px;
  cursor: pointer;
  border: none;
}

#calcBlurOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(0.8px);
  background: rgb(0 0 0 / 29%);
  z-index: 111111;
  display: none;
}

/* ── 6.2 Ввод очков (.score-entry-dropdown) ── */

.score-entry-dropdown {
  position: fixed;
  display: none;
  z-index: 111113;
  min-width: 220px;
}

.score-entry-dropdown.show {
  display: block;
  animation: dropdownPop 0.25s ease;
}

.score-entry-menu {
  background: rgb(255 255 255 / 82%);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid rgb(255 255 255 / 55%);
  border-top: 3px solid #ffca54;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgb(15 23 42 / 12%), inset 0 1px 0 rgb(255 255 255 / 70%);
  overflow: hidden;
  padding: 6px;
}

.score-entry-menu__title {
  margin: 0;
  padding: 8px 12px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.score-entry-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.score-entry-menu__item:hover,
.score-entry-menu__item:focus-visible {
  background: var(--color-panel);
  color: var(--color-heading);
  outline: none;
}

.score-entry-menu__item i {
  width: 18px;
  text-align: center;
}

.score-entry-menu__item[data-score-action="hand"] i,
.score-entry-menu__item[data-score-action="number"] i {
  color: #ea580c;
}

/* ── 7. Voice / info кнопки ── */

.voice-score-button,
.info-score-button {
  position: relative;
  width: 34px;
  height: 34px;
  min-width: 34px;
  max-width: 34px;
  max-height: 34px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-weight: 400;
  align-self: center;
}

.voice-score-button i,
.info-score-button i {
  margin: 0;
  font-size: 14px;
  line-height: 1;
  display: block;
}

.voice-score-button.is-listening {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}

.voice-score-button.is-listening::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 3px solid rgb(220 38 38 / 70%);
  pointer-events: none;
  will-change: transform, opacity;
  animation: voicePulse 1.2s ease-in-out infinite;
}

/* ── 8. Кнопка расчёта раунда ── */

.calculateRound-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.calculateRound-wrap > button,
.calculateRound-secondary,
.calculateRound-secondary button {
  margin-top: 0;
}

.calculateRound-wrap > button.calculateRound,
.calculateRound-secondary button:not(.voice-score-button) {
  width: auto;
}

.calculateRound-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* ── 9. Левая колонка ── */

.left-section-tables-wrap {
  padding: 0px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 84vh;
}

#roundNumber {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

#scoreSummary {
  margin-top: auto;
}

/* ── 10. Заголовок раунда ── */

.round-title {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% + 10px);
  padding: 0px 10px;
  box-sizing: border-box;
  letter-spacing: 0.02em;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-title__icons {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 26px;
}

.round-title__text {
  flex: 0 0 auto;
  text-transform: uppercase;
}

/* ── 10.1 Кости ── */

.round-title__dice {
  position: absolute;
  display: block;
  margin: 0;
  will-change: transform, opacity;
  color: #60957d;
  z-index: 2;
}

/* первая кость */
.round-title__dice--1 {
  left: 2px;
  top: -5px;
  color: #3d6151;
  font-size: 18px;
  transform: rotate(-10deg);
  animation: diceRollLeft 3.8s ease-in-out infinite;
}

/* вторая кость */
.round-title__dice--2 {
  left: 15px;
  top: 4px;
  font-size: 21px;
  color: #7da98e;
  transform: rotate(10deg);
  animation: diceRollRight 4.5s ease-in-out infinite;
}

/* ── 11. Ветер раунда ── */

.roundWind-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 16px 14px 20px;
  box-sizing: border-box;
}

.roundWind-wrap p {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0;
}

#roundWindTitle {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  text-align: center;
  /* background-color: var(--color-panel); */
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0px 10px;
  border-radius: 30px;
  /* box-shadow: 0px 1px 0px 1px #0000001a; */
  white-space: nowrap;
}

.roundWind-title__icons {
  position: relative;
  flex: 0 0 52px;
  width: 52px;
  height: 36px;
  color: #6f8fc8;
}

.roundWind-title__label {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  min-height: 1.2em;
  line-height: 1.2;
}

.roundWind-title__text {
  flex: 0 0 auto;
  line-height: inherit;
  cursor: pointer;
}

.roundWind-title__svg {
  display: block;
  width: 140%;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
}

/* ── 11.1 Порывы ветра и компас ── */

.roundWind-title__gust {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: windGustSweep 5.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.roundWind-title__gust--1 {
  animation-delay: 0s;
}

.roundWind-title__gust--2 {
  stroke-width: 2.15;
  animation-delay: 0.35s;
}

.roundWind-title__gust--3 {
  stroke-width: 1.65;
  animation-delay: 0.7s;
}

.roundWind-title__compass-ring {
  fill: color-mix(in srgb, var(--color-bg, #fff) 78%, transparent);
  stroke: currentColor;
  stroke-width: 2.4;
}

.roundWind-title__compass-hub {
  fill: currentColor;
}

.roundWind-title__compass-marks {
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  opacity: 0.72;
}

.roundWind-title__compass-needle {
  transform-origin: 16px 16px;
  transform-box: view-box;
  animation: windCompassSwing 3.6s ease-in-out infinite;
}

.roundWind-title__needle-n {
  fill: #d4524a;
}

.roundWind-title__needle-s {
  fill: color-mix(in srgb, currentColor 42%, transparent);
}

/* ── 12. Заголовок сводки очков ── */

.scoreSummary-title {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.scoreSummary-title__icons {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 26px;
}

.scoreSummary-title__text {
  flex: 0 0 auto;
  text-transform: uppercase;
}

.scoreSummary-title__icons .scoreSummary-title__trophy,
.scoreSummary-title__icons .scoreSummary-title__star {
  position: absolute;
  display: block;
  margin: 0;
  will-change: transform, opacity;
}

.scoreSummary-title__icons .scoreSummary-title__trophy {
  left: 8px;
  top: 1px;
  font-size: 20px;
  color: #6392ab;
  z-index: 2;
  text-shadow:
    0 1px 0 rgb(255 255 255 / 30%),
    0 2px 3px rgb(95 118 140 / 22%);
  animation: scoreTrophyBob 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.scoreSummary-title__icons .scoreSummary-title__star {
  font-size: 11px;
  color: #5a5a5a;
  z-index: 3;
  text-shadow: 0 1px 2px rgb(95 118 140 / 18%);
  animation: scoreStarTwinkle 2.4s ease-in-out infinite;
}

.scoreSummary-title__icons .scoreSummary-title__star--1 {
  left: -2px;
  top: 0;
  animation-name: scoreStarDrift1;
}

.scoreSummary-title__icons .scoreSummary-title__star--2 {
  left: 22px;
  top: 14px;
  font-size: 9px;
  color: #7c7c7c;
  animation-name: scoreStarDrift2;
  animation-duration: 2.9s;
}

/* ── 13. Заголовок истории ── */

.historyScore-title {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.historyScore-title__icons {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 26px;
}

.historyScore-title__text {
  flex: 0 0 auto;
  text-transform: uppercase;
}

.historyScore-title__icons .historyScore-title__clock,
.historyScore-title__icons .historyScore-title__dot {
  position: absolute;
  display: block;
  margin: 0;
  will-change: transform, opacity;
}

.historyScore-title__icons .historyScore-title__clock {
  left: 6px;
  top: 1px;
  font-size: 20px;
  color: var(--color-settings-active);
  z-index: 2;
  animation: historyClockTurn 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.historyScore-title__icons .historyScore-title__dot {
  font-size: 7px;
  color: var(--color-gold);
  z-index: 3;
}

.historyScore-title__icons .historyScore-title__dot--1 {
  left: -4px;
  top: 3px;
  animation: historyDotPulse1 2.6s ease-in-out infinite;
}

.historyScore-title__icons .historyScore-title__dot--2 {
  left: 26px;
  top: 16px;
  font-size: 6px;
  color: #d4a84a;
  animation: historyDotPulse2 2.9s ease-in-out infinite;
}

/* ── 14. Выбор ветра в шапке ── */

#roundWindSelectHeader {
  font-weight: 600;
  font-size: 20px;
  padding: 10px 14px;
  color: var(--color-text);
  background: var(--color-surface-alt);
}

select.round-wind:not(.app-select__native) {
  box-shadow: 0 0 0 3px var(--color-gold-ring);
}

/* ── 15. Keyframes ── */

@keyframes appSelectPop {
  0% {
    transform: scale(0.96);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes dropdownPop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  60% {
    transform: scale(1.08);
    opacity: 1;
  }

  100% {
    transform: scale(1);
  }
}

@keyframes diceRollLeft {

  0%,100% {
    transform: rotate(-10deg) translateY(0) scale(1);
  }

  15% {
    transform: rotate(-20deg) translateY(-2px) scale(1.08);
  }

  30% {
    transform: rotate(15deg) translateY(1px);
  }

  45% {
    transform: rotate(-12deg);
  }

  60% {
    transform: rotate(-10deg);
  }
}

@keyframes diceRollRight {

  0%,100% {
    transform: rotate(10deg) translateY(0) scale(1);
  }

  20% {
    transform: rotate(12deg) translateY(-3px) scale(1.12);
  }

  40% {
    transform: rotate(-18deg) translateY(0);
  }

  55% {
    transform: rotate(8deg) translateY(-1px);
  }

  70% {
    transform: rotate(0deg);
  }
}

@keyframes windGustSweep {
  0% {
    transform: translateX(-18px);
    opacity: 0;
  }

  7% {
    opacity: 0.45;
  }

  26% {
    opacity: 0.38;
  }

  36% {
    transform: translateX(22px);
    opacity: 0;
  }

  100% {
    transform: translateX(22px);
    opacity: 0;
  }
}

@keyframes windCompassSwing {
  0%,
  100% {
    transform: rotate(-28deg);
  }

  18% {
    transform: rotate(22deg);
  }

  36% {
    transform: rotate(-14deg);
  }

  54% {
    transform: rotate(30deg);
  }

  72% {
    transform: rotate(-6deg);
  }

  88% {
    transform: rotate(12deg);
  }
}

@keyframes scoreTrophyBob {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg) scale(1);
    opacity: 0.88;
  }

  45% {
    transform: translateY(-2px) rotate(3deg) scale(1.08);
    opacity: 1;
  }

  70% {
    transform: translateY(1px) rotate(-2deg) scale(1.02);
    opacity: 0.95;
  }
}

@keyframes scoreStarDrift1 {
  0%,
  100% {
    opacity: 0.45;
    transform: translate(0, 0) scale(0.85) rotate(-12deg);
  }

  40% {
    opacity: 1;
    transform: translate(-2px, -3px) scale(1.2) rotate(8deg);
  }

  70% {
    opacity: 0.7;
    transform: translate(1px, -1px) scale(1) rotate(-4deg);
  }
}

@keyframes scoreStarDrift2 {
  0%,
  100% {
    opacity: 0.4;
    transform: translate(0, 0) scale(0.8) rotate(10deg);
  }

  50% {
    opacity: 1;
    transform: translate(2px, -4px) scale(1.25) rotate(-14deg);
  }
}

@keyframes historyClockTurn {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
    opacity: 0.88;
  }

  35% {
    transform: rotate(-18deg) scale(1.06);
    opacity: 1;
  }

  70% {
    transform: rotate(10deg) scale(1.02);
    opacity: 0.95;
  }
}

@keyframes historyDotPulse1 {
  0%,
  100% {
    opacity: 0.35;
    transform: translate(0, 0) scale(0.75);
  }

  45% {
    opacity: 1;
    transform: translate(-1px, -2px) scale(1.35);
  }

  75% {
    opacity: 0.65;
    transform: translate(1px, 0) scale(1);
  }
}

@keyframes historyDotPulse2 {
  0%,
  100% {
    opacity: 0.3;
    transform: translate(0, 0) scale(0.7);
  }

  50% {
    opacity: 1;
    transform: translate(2px, -3px) scale(1.4);
  }
}

@keyframes voicePulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.45); opacity: 0; }
}
