:root {
  --cream: #f7e7c4;
  --cream-soft: #fbf3e0;
  --cream-dark: #e8d4a8;
  --blue-gray: #88a8bd;
  --blue-gray-deep: #4a6d85;
  --oil: #9a7bac;
  --oil-deep: #6f8a5c;
  --ink: #2a2634;
  --ink-soft: #5b5468;
  --accent: #e8d4a8;
  --gold: #c9a961;
  --rose: #c98c8c;
  --shadow: 0 12px 36px rgba(42, 38, 52, 0.12);
  --shadow-deep: 0 20px 50px rgba(42, 38, 52, 0.18);
  --radius: 18px;
  --transition: 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Georgia', 'Times New Roman', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body { height: 100vh; overflow: hidden; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ========== ГОРЫ ========== */
.mountains {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #7fa8c8 0%, #b8cce0 25%, #e8d8c0 55%, #f0e0c0 100%);
  overflow: hidden;
}

/* Звёзды */
.mountains::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 28% 8%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 45% 22%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1px 1px at 62% 12%, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 78% 20%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 88% 6%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 35% 32%, rgba(255,255,255,0.65), transparent),
    radial-gradient(1px 1px at 55% 30%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.5px 1.5px at 92% 28%, rgba(255,255,255,0.75), transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* КЛЮЧЕВОЙ ФИКС: bottom: -50px, чтобы при translateY вверх не было щели */
.mountain-layer {
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
  background-size: 100% 100%;
  background-position: bottom center;
  background-repeat: no-repeat;
}

.mountain-back {
  height: 65%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 500' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g1' x1='0' x2='0' y1='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%237a94ad' stop-opacity='0.95'/%3E%3Cstop offset='60%25' stop-color='%23a8bccf' stop-opacity='0.9'/%3E%3Cstop offset='100%25' stop-color='%23d4e0ea' stop-opacity='0.85'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0,320 L120,240 L260,160 L360,180 L460,170 L540,80 L620,180 L710,110 L840,210 L960,130 L1100,220 L1180,140 L1260,210 L1340,150 L1440,200 L1440,500 L0,500 Z' fill='url(%23g1)'/%3E%3Cpath d='M540,80 L570,100 L555,110 L585,130 L540,120 L500,130 L520,110 L510,100 Z' fill='%23f8fbff' opacity='0.85'/%3E%3Cpath d='M960,130 L990,150 L975,160 L1000,175 L960,165 L925,175 L940,160 L935,148 Z' fill='%23f8fbff' opacity='0.8'/%3E%3C/svg%3E");
  animation: parallaxBack 22s ease-in-out infinite alternate;
}

.mountain-mid {
  height: 55%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 500' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g2' x1='0' x2='0' y1='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%235c7a94' stop-opacity='0.9'/%3E%3Cstop offset='100%25' stop-color='%23c0d0dd' stop-opacity='0.95'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0,380 L120,280 L260,340 L400,240 L540,320 L680,260 L820,330 L960,270 L1100,340 L1240,280 L1380,330 L1440,310 L1440,500 L0,500 Z' fill='url(%23g2)'/%3E%3Cpath d='M400,240 L430,265 L415,275 L440,290 L400,282 L372,290 L385,275 L380,262 Z' fill='%23ffffff' opacity='0.75'/%3E%3Cpath d='M1100,340 L1125,358 L1112,366 L1132,378 L1100,372 L1078,378 L1088,366 L1085,356 Z' fill='%23ffffff' opacity='0.7'/%3E%3C/svg%3E");
  animation: parallaxMid 16s ease-in-out infinite alternate;
}

.mountain-front {
  height: 45%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 500' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g3' x1='0' x2='0' y1='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23405a72' stop-opacity='0.95'/%3E%3Cstop offset='100%25' stop-color='%23a0b8ca' stop-opacity='1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0,440 L180,380 L300,420 L450,370 L620,400 L780,350 L920,380 L1080,420 L1200,390 L1440,420 L1440,500 L0,500 Z' fill='url(%23g3)'/%3E%3C/svg%3E");
  animation: parallaxFront 11s ease-in-out infinite alternate;
}

.sun-glow {
  position: absolute;
  top: 12%;
  right: 18%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 235, 190, 0.85) 0%, rgba(255, 220, 160, 0.4) 35%, transparent 70%);
  border-radius: 50%;
  animation: sunPulse 7s ease-in-out infinite alternate;
  filter: blur(2px);
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  filter: blur(24px);
}

.cloud-1 { width: 340px; height: 90px; top: 18%; left: 5%; animation: cloudMove 45s linear infinite; }
.cloud-2 { width: 460px; height: 110px; top: 28%; left: 55%; animation: cloudMove 65s linear infinite reverse; }

@keyframes parallaxBack { 0% { transform: translateY(0); } 100% { transform: translateY(-10px); } }
@keyframes parallaxMid { 0% { transform: translateY(0); } 100% { transform: translateY(-14px); } }
@keyframes parallaxFront { 0% { transform: translateY(0); } 100% { transform: translateY(-18px); } }
@keyframes sunPulse { 0% { opacity: 0.7; transform: scale(1); } 100% { opacity: 1; transform: scale(1.12); } }
@keyframes cloudMove { 0% { transform: translateX(-100%); } 100% { transform: translateX(100vw); } }

.snow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.95), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.75), transparent),
    radial-gradient(2px 2px at 40% 80%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1px 1px at 85% 20%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 10% 55%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,0.7), transparent);
  opacity: 0.75;
  animation: snowFall 32s linear infinite;
}

@keyframes snowFall {
  0% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 100px 500px, 200px 400px, 50px 600px, 300px 300px, 150px 550px, 250px 450px; }
}

.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

.screen.active { opacity: 1; transform: translateY(0); pointer-events: auto; }

.hero-title {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(1.4rem, 4.2vw, 2.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  text-align: center;
  line-height: 1.4;
  max-width: 820px;
  user-select: none;
  cursor: default;
  text-shadow: 0 3px 24px rgba(255,255,255,0.7), 0 0 40px rgba(255, 240, 200, 0.4);
  padding: 8px 12px;
  border-radius: 8px;
}

.hero-sub {
  margin-top: 28px;
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  color: var(--ink-soft);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-align: center;
}

.countdown {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.cd-block {
  min-width: 90px;
  padding: 20px 16px;
  background: linear-gradient(145deg, rgba(255,255,255,0.75), rgba(255,250,235,0.55));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(201, 169, 97, 0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.8);
  text-align: center;
  position: relative;
}

.cd-block::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(201, 169, 97, 0.25);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}

.cd-num {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 400;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-family: 'Georgia', serif;
}

.cd-label {
  margin-top: 6px;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.cd-sep {
  align-self: center;
  font-size: 1.8rem;
  color: var(--gold);
  opacity: 0.7;
  padding-bottom: 18px;
}

.btn {
  margin-top: 40px;
  padding: 16px 48px;
  background: linear-gradient(145deg, #ffffff, #f5ead0);
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 97, 0.4);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  min-height: 54px;
  font-family: 'Georgia', serif;
}

.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-deep); background: linear-gradient(145deg, #ffffff, #fff5dd); }
.btn:active { transform: translateY(-1px); }

.hero-note {
  margin-top: 26px;
  max-width: 560px;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-soft);
  opacity: 0.9;
  font-style: italic;
}

.secret-dot {
  position: fixed;
  bottom: 14px; right: 14px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.4), rgba(201, 169, 97, 0.1));
  z-index: 5;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.secret-dot:hover {
  background: radial-gradient(circle, rgba(201, 169, 97, 0.9), rgba(201, 169, 97, 0.4));
  transform: scale(1.4);
}

.made-by {
  position: fixed;
  top: 8px; right: 14px;
  font-size: 0.6rem;
  color: rgba(42, 38, 52, 0.4);
  z-index: 6;
  letter-spacing: 0.1em;
  pointer-events: none;
  text-transform: lowercase;
}

.pre-ski-marquee {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  height: 32px;
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
  opacity: 0.4;
  background: linear-gradient(180deg, transparent, rgba(42, 38, 52, 0.08));
}

.pre-ski-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 22s linear infinite;
  height: 100%;
  align-items: center;
}

.pre-ski-track span {
  font-size: 0.95rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--ink);
  padding-right: 60px;
  font-weight: 400;
  font-style: italic;
  font-family: 'Georgia', serif;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.wishlist-screen {
  justify-content: flex-start;
  padding-top: 60px;
  padding-bottom: 50px;
}

.wishlist-header {
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
  flex-shrink: 0;
}

.wishlist-title {
  font-family: 'Georgia', serif;
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
}

.wishlist-hint {
  width: 100%;
  max-width: 720px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  opacity: 0.85;
  font-style: italic;
}

.back-btn {
  padding: 10px 20px;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255,255,255,0.85), rgba(255,250,235,0.65));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(201, 169, 97, 0.4);
  transition: background 0.3s, transform 0.2s;
  min-height: 40px;
}
.back-btn:hover { background: linear-gradient(145deg, #ffffff, #fff5dd); transform: translateY(-1px); }

.wishlist-list {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wish-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: linear-gradient(145deg, rgba(255,255,255,0.8), rgba(255,250,235,0.65));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(201, 169, 97, 0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.wish-item::before {
  content: "";
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  border-radius: 3px;
  opacity: 0.5;
}

.wish-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255,255,255,0.9);
  background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(255,250,235,0.8));
}

.wish-item.reserved {
  background: linear-gradient(145deg, rgba(230, 220, 200, 0.75), rgba(220, 210, 190, 0.6));
  border-color: rgba(154, 123, 172, 0.3);
}
.wish-item.reserved .wish-name { text-decoration: line-through; color: var(--ink-soft); }
.wish-item.reserved::before { background: linear-gradient(180deg, transparent, var(--oil), transparent); }

.wish-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.wish-name {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.4;
  word-break: break-word;
  font-family: 'Georgia', serif;
}

.wish-reserver {
  font-size: 0.78rem;
  color: var(--blue-gray-deep);
  letter-spacing: 0.02em;
  font-weight: 500;
  font-style: italic;
}

.inline-link {
  color: var(--blue-gray-deep);
  text-decoration: none;
  border-bottom: 1px dashed var(--blue-gray-deep);
  transition: color 0.2s, border-color 0.2s;
}
.inline-link:hover { color: var(--ink); border-bottom-color: var(--ink); }
.inline-link::after {
  content: "↗";
  font-size: 0.7em;
  opacity: 0.7;
  margin-left: 2px;
  vertical-align: super;
}

.wish-checkbox {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 2px solid var(--blue-gray-deep);
  background: linear-gradient(145deg, #ffffff, #f0f4f8);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
  cursor: pointer;
  box-shadow: inset 0 1px 3px rgba(42, 38, 52, 0.08);
}

.wish-checkbox:hover { transform: scale(1.05); }

.wish-checkbox.checked {
  background: linear-gradient(145deg, var(--blue-gray-deep), var(--blue-gray));
  border-color: var(--blue-gray-deep);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15), 0 2px 8px rgba(74, 109, 133, 0.3);
}

.wish-checkbox.checked.locked {
  background: linear-gradient(145deg, #b8a8a8, #a89898);
  border-color: #8a7878;
  cursor: not-allowed;
}

.wish-checkbox svg {
  width: 20px; height: 20px;
  stroke: #ffffff;
  stroke-width: 2.5;
  fill: none;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s, transform 0.25s;
}

.wish-checkbox.checked svg { opacity: 1; transform: scale(1); }

.wish-tooltip { display: none; }

.admin-badge {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  padding: 9px 20px;
  background: linear-gradient(145deg, var(--ink), #1a1622);
  color: var(--cream-soft);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 999px;
  z-index: 20;
  transition: transform var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(201, 169, 97, 0.3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.admin-badge.visible { transform: translateX(-50%) translateY(0); }
.admin-badge button {
  color: var(--cream-soft);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.admin-badge button:hover { opacity: 1; }

.admin-controls {
  width: 100%;
  max-width: 720px;
  margin-top: 24px;
  padding: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,0.85), rgba(255,250,235,0.7));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(201, 169, 97, 0.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.9);
  display: none;
}

.admin-controls.visible { display: block; }
.admin-controls h3 {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.admin-tip {
  font-size: 0.76rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 16px;
  opacity: 0.9;
  font-style: italic;
}

.admin-tip code {
  background: rgba(201, 169, 97, 0.15);
  padding: 2px 6px;
  border-radius: 5px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-style: normal;
}

.admin-row { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

.admin-row input, .admin-row textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(201, 169, 97, 0.3);
  border-radius: 12px;
  background: rgba(255,255,255,0.9);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.admin-row input:focus, .admin-row textarea:focus {
  border-color: var(--blue-gray-deep);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74, 109, 133, 0.1);
}
.admin-row textarea { min-height: 70px; resize: vertical; }

.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.admin-actions button {
  padding: 11px 22px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--ink), #1a1622);
  color: var(--cream-soft);
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  border: 1px solid rgba(201, 169, 97, 0.2);
}

.admin-actions button.secondary {
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(250, 240, 220, 0.7));
  color: var(--ink-soft);
  border: 1px solid rgba(201, 169, 97, 0.35);
}

.admin-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(42, 38, 52, 0.2);
}

.wish-admin-actions { display: none; gap: 6px; flex-shrink: 0; }
body.admin-mode .wish-admin-actions { display: flex; }

.wish-admin-btn {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(240, 232, 215, 0.7));
  border: 1px solid rgba(201, 169, 97, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
}

.wish-admin-btn:hover {
  background: linear-gradient(145deg, #ffffff, #f5ead0);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 38, 52, 0.15);
}

.wish-admin-btn:active { transform: translateY(0); }
.wish-admin-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

.wish-admin-btn svg {
  width: 16px; height: 16px;
  stroke: var(--ink);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wish-admin-btn.move-btn { background: linear-gradient(145deg, #e8f0f8, #d0e0ec); border-color: rgba(74, 109, 133, 0.4); }
.wish-admin-btn.move-btn:hover { background: linear-gradient(145deg, #d8e8f4, #b8d0e0); box-shadow: 0 4px 14px rgba(74, 109, 133, 0.3); }
.wish-admin-btn.move-btn svg { width: 18px; height: 18px; stroke: var(--blue-gray-deep); stroke-width: 2.8; }

.wish-admin-btn.danger:hover { background: linear-gradient(145deg, #f8e0e0, #f0c8c8); border-color: rgba(180, 70, 70, 0.4); }
.wish-admin-btn.danger svg { stroke: #b44848; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 38, 52, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.visible { opacity: 1; pointer-events: auto; }

.modal {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(145deg, var(--cream-soft), #f5ead0);
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 24px 70px rgba(42, 38, 52, 0.35), inset 0 1px 0 rgba(255,255,255,0.9);
  border: 1px solid rgba(201, 169, 97, 0.35);
  transform: scale(0.95);
  transition: transform var(--transition);
}

.modal-overlay.visible .modal { transform: scale(1); }

.modal h2 {
  font-family: 'Georgia', serif;
  font-size: 1.15rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 12px;
  color: var(--ink);
}

.modal p { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 20px; line-height: 1.55; }

.modal input:not([type="checkbox"]) {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(201, 169, 97, 0.35);
  border-radius: 14px;
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.modal input:not([type="checkbox"]):focus {
  border-color: var(--blue-gray-deep);
  box-shadow: 0 0 0 3px rgba(74, 109, 133, 0.12);
}

.modal-error { color: #b44848; font-size: 0.82rem; margin-top: -8px; margin-bottom: 12px; min-height: 18px; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink-soft);
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--blue-gray-deep);
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.modal-buttons { display: flex; gap: 10px; justify-content: flex-end; }

.modal-buttons button {
  padding: 12px 24px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background 0.25s, transform 0.2s, box-shadow 0.2s;
  min-height: 46px;
}

.modal-buttons .primary {
  background: linear-gradient(145deg, var(--ink), #1a1622);
  color: var(--cream-soft);
  border: 1px solid rgba(201, 169, 97, 0.2);
}
.modal-buttons .primary:hover {
  background: linear-gradient(145deg, var(--blue-gray-deep), var(--ink));
  box-shadow: 0 8px 20px rgba(42, 38, 52, 0.3);
  transform: translateY(-1px);
}

.modal-buttons .secondary {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid rgba(201, 169, 97, 0.35);
}
.modal-buttons .secondary:hover { background: rgba(201, 169, 97, 0.12); }

.comment-modal { max-width: 500px; }
.comment-modal #commentTitle {
  font-size: 1.05rem;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(201, 169, 97, 0.3);
  word-break: break-word;
}

.comment-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 22px;
  white-space: pre-wrap;
  word-break: break-word;
}
.comment-body.empty { font-style: italic; opacity: 0.6; }

/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ — переработана
   ============================================================ */
@media (max-width: 520px) {
  /* Горы — растягиваем по высоте, чтобы заполнить экран */
  .mountain-back { height: 70%; }
  .mountain-mid { height: 60%; }
  .mountain-front { height: 50%; }

  .screen {
    padding: 16px;
  }

  /* Главный экран — всё компактно и по центру */
  #screen-hero {
    justify-content: center;
    padding-top: 40px;
    padding-bottom: 60px;
  }

  .hero-title {
    font-size: 1.35rem;
    line-height: 1.45;
    max-width: 100%;
    padding: 4px;
  }

  .hero-sub {
    margin-top: 18px;
    font-size: 0.7rem;
    letter-spacing: 0.24em;
  }

  /* Обратный отсчёт — сетка 4 в ряд */
  .countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 22px;
    width: 100%;
    max-width: 400px;
  }

  .cd-sep { display: none; }

  .cd-block {
    min-width: 0;
    padding: 12px 4px;
    border-radius: 12px;
  }

  .cd-block::before { inset: 3px; border-radius: 9px; }

  .cd-num {
    font-size: 1.45rem;
    line-height: 1;
  }

  .cd-label {
    margin-top: 5px;
    font-size: 0.5rem;
    letter-spacing: 0.08em;
  }

  .btn {
    margin-top: 28px;
    padding: 14px 40px;
    font-size: 0.8rem;
    min-height: 50px;
  }

  .hero-note {
    margin-top: 20px;
    font-size: 0.75rem;
    line-height: 1.5;
    max-width: 100%;
  }

  /* Экран вишлиста */
  .wishlist-screen {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .wishlist-header { margin-bottom: 4px; }

  .wishlist-title { font-size: 1.2rem; }

  .wishlist-hint { font-size: 0.72rem; margin-bottom: 12px; }

  .wishlist-list { gap: 10px; }

  .wish-item {
    padding: 14px 14px;
    gap: 10px;
    flex-wrap: wrap;
    border-radius: 14px;
  }

  .wish-item::before { display: none; }

  .wish-name { font-size: 0.95rem; }
  .wish-reserver { font-size: 0.72rem; }

  .wish-checkbox {
    width: 30px; height: 30px;
    border-radius: 8px;
  }

  .wish-checkbox svg { width: 16px; height: 16px; }

  /* Кнопки админа — компактнее и переносятся на след. строку */
  .wish-admin-btn {
    width: 30px; height: 30px;
    border-radius: 8px;
  }

  .wish-admin-btn svg { width: 14px; height: 14px; }

  .wish-admin-actions {
    order: 5;
    flex-basis: 100%;
    justify-content: flex-end;
    margin-top: 4px;
  }

  /* Тултип-комментарий на мобильном — аккуратный блок снизу */
  .wish-tooltip {
    display: none;
    position: static;
    flex-basis: 100%;
    order: 10;
    margin-top: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(74, 109, 133, 0.1), rgba(154, 123, 172, 0.08));
    border-left: 3px solid var(--blue-gray-deep);
    border-radius: 10px;
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-style: italic;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
  }
  .wish-item.mobile-open .wish-tooltip { display: block; }

  .admin-controls { padding: 16px; margin-top: 18px; }
  .admin-controls h3 { font-size: 0.75rem; margin-bottom: 10px; }
  .admin-tip { font-size: 0.7rem; }
  .admin-row input, .admin-row textarea { padding: 11px 13px; font-size: 0.9rem; }
  .admin-actions button { padding: 10px 18px; font-size: 0.72rem; }

  .modal { padding: 22px; border-radius: 18px; }
  .modal h2 { font-size: 1rem; }

  .made-by { font-size: 0.55rem; top: 5px; right: 8px; }
  .pre-ski-marquee { height: 24px; }
  .pre-ski-track span { font-size: 0.75rem; padding-right: 40px; letter-spacing: 0.35em; }

  .admin-badge {
    padding: 7px 14px;
    font-size: 0.62rem;
    gap: 8px;
  }
  .admin-badge button { font-size: 0.62rem; }
}

/* Очень узкие экраны */
@media (max-width: 360px) {
  .hero-title { font-size: 1.15rem; }
  .cd-num { font-size: 1.25rem; }
  .cd-label { font-size: 0.45rem; }
}

@media (max-height: 640px) and (orientation: landscape) {
  .countdown { margin-top: 16px; }
  .btn { margin-top: 18px; }
  .hero-note { margin-top: 12px; }
}