/* ============================================================
   Атмосфера: настройки, полноэкранный слой и подарки
   ============================================================ */
.atmo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}
.atmo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 54px;
  padding: 7px 3px 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .022);
  color: var(--dim);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
}
.atmo-btn:hover {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
}
.atmo-btn:active { transform: scale(.97); }
.atmo-btn .ico { opacity: .9; }
.atmo-btn span {
  font-size: 8.5px;
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
}
.atmo-btn.active {
  border-color: color-mix(in srgb, var(--acc) 55%, transparent);
  background: var(--acc-soft);
  color: var(--acc);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 16%, transparent);
}
.atmo-now {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  line-height: 1.5;
}
.switch-inline {
  padding: 10px 0;
  border-top: 0;
  border-bottom: 0;
  background: none;
}
.switch-inline + .switch-inline { border-top: 1px solid var(--line); }
.switch-inline .field-hint { font-size: 9px; }

.atmo-canvas {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  opacity: .92;
}
body.clean-mode .atmo-canvas,
body.kiosk .atmo-canvas { z-index: 55; }

/* ----- подарок дня ----- */
.holiday-gift {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 500;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--acc) 32%, var(--line-2));
  background:
    radial-gradient(120% 120% at 30% 0%, var(--acc-soft), transparent 55%),
    rgba(13, 17, 23, .82);
  color: var(--acc);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .32);
  backdrop-filter: blur(10px);
  transition: transform .18s, box-shadow .2s, border-color .2s;
}
.holiday-gift:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--acc) 60%, transparent);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .4), 0 0 24px var(--acc-soft);
}
.holiday-gift:active { transform: translateY(0) scale(.96); }
.holiday-gift[hidden] { display: none; }
.holiday-gift svg { display: block; }
.holiday-gift .gift-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 8px var(--acc);
  display: none;
}
.holiday-gift.unread .gift-dot { display: block; animation: giftPulse 1.8s ease-in-out infinite; }
@keyframes giftPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.8); }
}
body.clean-mode .holiday-gift,
body.kiosk .holiday-gift { display: none; }

.holiday-modal { max-width: 440px; }
.holiday-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--acc);
  margin-bottom: 5px;
}
.holiday-art {
  display: grid;
  place-items: center;
  padding: 2px 0 12px;
}
.holiday-art svg {
  width: 168px;
  height: auto;
  max-width: 100%;
  color: var(--acc);
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .38));
}
.holiday-message {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.holiday-note {
  margin: 0 0 18px;
  font-size: 10px;
  line-height: 1.55;
  color: var(--dim);
}
.holiday-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.holiday-actions .btn { flex: 0 1 auto; }

@media (max-width: 520px) {
  .atmo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .atmo-btn { min-height: 50px; padding: 6px 2px 5px; }
  .atmo-btn span { font-size: 8px; }
  .holiday-gift { left: 12px; bottom: 12px; }
}

/* ----- лёгкий режим для слабых ПК ----- */
.atmo-grid.disabled {
  opacity: .38;
  pointer-events: none;
  filter: grayscale(.45);
}
body.low-power .ambient,
body.low-power .atmo-canvas { display: none !important; }
body.low-power *,
body.low-power *::before,
body.low-power *::after { animation: none !important; }
body.low-power .widget {
  backdrop-filter: none !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28) !important;
}
body.low-power .holiday-gift,
body.low-power .toast,
body.low-power .modal { backdrop-filter: none !important; }
body.low-power .w-resize { transition: none !important; }

/* ----- календарь праздников в настройках ----- */
.holiday-calendar {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.holiday-calendar summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}
.holiday-calendar summary::-webkit-details-marker { display: none; }
.holiday-calendar summary::after {
  content: "+";
  font-size: 13px;
  line-height: 1;
  color: var(--dim);
}
.holiday-calendar[open] summary::after { content: "−"; }
.holiday-calendar summary:hover { color: var(--text); }
.holiday-calendar summary span { color: var(--acc); }
.holiday-calendar-list {
  max-height: 232px;
  overflow: auto;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.hc-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 14px;
  gap: 7px;
  align-items: center;
  padding: 4px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .035);
  font-size: 10px;
}
.hc-date {
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--dim);
  white-space: nowrap;
}
.hc-name { color: var(--muted); line-height: 1.35; }
.hc-row.gift .hc-name { color: var(--text); }
.hc-gift { display: grid; place-items: center; color: var(--acc); }

.holiday-gift.victory {
  border-color: rgba(255, 176, 92, .6);
  background:
    radial-gradient(120% 120% at 30% 0%, rgba(255, 176, 92, .18), transparent 55%),
    rgba(24, 18, 12, .86);
  color: #ffc46b;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35), 0 0 22px rgba(255, 176, 92, .12);
}
.holiday-gift.victory .gift-dot { background: #ffc46b; box-shadow: 0 0 8px #ffc46b; }
