/* Шапка */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.brand__logo {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  padding: 4px;

  object-fit: contain;
  background: var(--color-accent);

  border: 1px solid #a3ff12;
  border-radius: 50%;

  box-shadow:
    0 0 5px rgb(163 255 18 / 65%),
    0 0 14px rgb(125 255 0 / 35%),
    inset 0 0 7px rgb(163 255 18 / 12%);
}

.brand__caption {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--color-text-muted);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
}

.brand__title {
  font-family: var(--font-family);
  font-size: clamp(1.125rem, 4.5vw, 1.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--color-accent);
}

/* Баланс */
.balance {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--space-2);

  min-height: var(--touch-target-size);
  padding: var(--space-2) var(--space-3);

  color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);

  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Общая карточка */
.card {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
}

/* Кнопки */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);

  min-height: var(--touch-target-size);
  padding: var(--space-3) var(--space-4);

  color: var(--color-on-primary);
  background: var(--color-primary);
  border: 1px solid transparent;
  border-radius: var(--radius-small);

  font-weight: 700;
  line-height: var(--line-height-body);
  text-align: center;
  text-decoration: none;

  transition: background-color 150ms ease;
}

.button--accent {
  color: var(--color-on-accent);
  background: var(--color-accent);
}

.button--full {
  width: 100%;
}

.button:disabled {
  opacity: 0.5;
}

/* Навигация закреплена у нижнего края */
#app-navigation:not(:empty) {
  position: fixed;
  z-index: var(--z-navigation);
  right: 0;
  bottom: 0;
  left: 0;

  width: 100%;
  max-width: var(--app-max-width);
  margin-inline: auto;
  padding-bottom: var(--safe-area-bottom);

  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: var(--navigation-height);
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);

  min-width: 0;
  min-height: var(--touch-target-size);
  padding: var(--space-2);

  color: var(--color-text-muted);
  background: transparent;
  border: 0;

  font-size: var(--font-size-small);
  line-height: var(--line-height-body);
  text-align: center;
  text-decoration: none;
}

.bottom-nav__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.bottom-nav__item[aria-current="page"] {
  color: var(--color-accent);
}

.bottom-nav__item:disabled {
  opacity: 0.45;
}

/* Наведение применяется на устройствах с мышью */
@media (hover: hover) {
  .button:hover:not(:disabled) {
    background: var(--color-primary-hover);
  }

  .button--accent:hover:not(:disabled) {
    background: var(--color-accent-hover);
  }

  .bottom-nav__item:hover:not(:disabled) {
    color: var(--color-accent);
  }
}

/* Учитываем настройку уменьшения анимации */
@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}

/* Кислотно-зелёное свечение */
.button,
.chest-tile,
.balance,
.card.daily-gift {
  border: 1px solid #a3ff12;

  box-shadow:
    0 0 5px rgb(163 255 18 / 65%),
    0 0 14px rgb(125 255 0 / 35%),
    inset 0 0 7px rgb(163 255 18 / 12%);
}

/* Золотая монета */
.coin-icon {
  display: inline-block;
  flex-shrink: 0;

  width: 20px;
  height: 20px;

  background: radial-gradient(
    circle at 35% 30%,
    #fff2ae,
    #f5cd58 40%,
    #bd7c13 80%
  );

  border: 2px solid #e7b63c;
  border-radius: 50%;

  box-shadow:
    inset 0 0 0 2px rgb(124 73 0 / 35%),
    0 1px 3px rgb(0 0 0 / 35%);
}

/* Единое отображение монеты и суммы */
.coin-amount {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.coin-amount__value {
  line-height: 1;
  transform: translateY(0.1em);
}