/* «Ming bir kecha» */
:root { --gold: #f3d58b; --gold2: #d9a845; --goldL: #fff3c4; --ink: #0b0f33; --tq: #7fe6da; --text: #f3eeff; --muted: #c4bde8; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0f33; overscroll-behavior: none; }
body { color: var(--text); font-family: "Cormorant Garamond", Georgia, serif; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; touch-action: none; -webkit-touch-callout: none; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 10; }

/* ——— заставка ——— */
#splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; transition: opacity .9s ease, visibility .9s; }
.sp-sky { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 100%, #3a2c78 0%, #151a52 45%, #070a26 100%); }
.sp-sky::after { content: ""; position: absolute; inset: 0; opacity: .8;
  background-image: radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 32% 42%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 72% 12%, #ffe9b0 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 36%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 56% 28%, #cfe6ff 50%, transparent 51%), radial-gradient(1px 1px at 20% 64%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 70%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 44% 80%, #ffe9b0 50%, transparent 51%), radial-gradient(1px 1px at 66% 56%, #fff 50%, transparent 51%);
  animation: sptw 2.4s ease-in-out infinite alternate; }
@keyframes sptw { to { opacity: .35; } }
.sp-in { position: relative; display: grid; justify-items: center; gap: 14px; }
.sp-moon { width: 92px; height: 92px; filter: drop-shadow(0 0 18px rgba(255, 220, 140, .75)); animation: spm 3s ease-in-out infinite alternate; }
@keyframes spm { to { filter: drop-shadow(0 0 30px rgba(255, 220, 140, .95)); } }
.sp-carpet { width: 112px; animation: spc 2.2s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(80, 220, 210, .35)); }
@keyframes spc { 0%, 100% { transform: translate(-14px, 0) rotate(-2deg); } 50% { transform: translate(14px, -6px) rotate(2deg); } }
.sp-dots { display: flex; gap: 8px; }
.sp-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: .3; animation: spd 1.2s infinite; }
.sp-dots i:nth-child(2) { animation-delay: .2s; } .sp-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes spd { 50% { opacity: 1; transform: translateY(-3px); } }
body.ready #splash { opacity: 0; visibility: hidden; pointer-events: none; }

/* ——— карточки ——— */
.card { position: absolute; left: 12px; right: 12px; bottom: 42px; margin: 0 auto; max-width: 420px; box-sizing: border-box; padding: 20px 18px 16px; text-align: center;
  border-radius: 24px; visibility: hidden; opacity: 0; pointer-events: none; will-change: transform, opacity;
  background: linear-gradient(180deg, rgba(24, 28, 88, .74), rgba(10, 12, 46, .86));
  border: 1px solid rgba(243, 213, 139, .6);
  box-shadow: 0 0 0 4px rgba(243, 213, 139, .07), 0 22px 44px -14px rgba(0, 0, 0, .7), inset 0 0 34px rgba(90, 220, 205, .07), 0 0 40px -10px rgba(255, 190, 110, .35); }
.card::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(243, 213, 139, .2); border-radius: 19px; pointer-events: none; }
.card.live { pointer-events: auto; }
.orn { position: absolute; left: 50%; top: -15px; width: 64px; height: 28px; transform: translateX(-50%);
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 28'%3E%3Cpath d='M0 15h20M44 15h20' stroke='%23d9a845' stroke-width='1.2'/%3E%3Ccircle cx='32' cy='14' r='13' fill='%23121648' stroke='%23f3d58b' stroke-width='1.2'/%3E%3Cpath d='M35.5 6.5a8 8 0 1 0 0 15 6.4 6.4 0 1 1 0-15z' fill='%23f3d58b'/%3E%3Cpath d='M38.5 10.5l.9 2 2.1.2-1.6 1.4.5 2.1-1.9-1.1-1.9 1.1.5-2.1-1.6-1.4 2.1-.2z' fill='%23fff3c4'/%3E%3C/svg%3E"); }
.kick { font: 800 11.5px/1.2 "Nunito", system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--tq); margin: 2px 0 6px; }
.names { margin: 0; font: 400 50px/1.05 "Great Vibes", cursive; display: flex; flex-wrap: nowrap; justify-content: center; align-items: baseline; gap: 0 .18em; white-space: nowrap; }
.names .nm { background: linear-gradient(180deg, #fff6d2 8%, #f3d58b 46%, #cf9b3e 86%); -webkit-background-clip: text; background-clip: text; color: transparent; padding: .12em .14em .16em; }
.names .w2 { display: inline-flex; align-items: baseline; gap: 0 .18em; }
.names i { font-style: normal; font-size: .6em; color: var(--gold2); }
.names.stack { flex-direction: column; align-items: center; line-height: .9; font-size: 44px; }
.names.stack .w2 { margin-top: -.18em; }
.names { filter: drop-shadow(0 0 14px rgba(255, 200, 110, .28)); }
.hello { margin: 4px 0 2px; font: 700 21px/1.25 "Cormorant Garamond", serif; color: #fff; }
.inv { margin: 0 auto; max-width: 30ch; font: italic 500 18px/1.3 "Cormorant Garamond", serif; color: var(--muted); }
.swipe { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; font: 700 12.5px "Nunito", sans-serif; color: var(--tq); letter-spacing: .02em; transition: opacity .5s, max-height .5s, margin .5s; max-height: 30px; overflow: hidden; }
.swipe .hand { position: relative; width: 34px; height: 14px; }
.swipe .hand::before { content: ""; position: absolute; top: 3px; right: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px #ffd27a; animation: sw 1.6s ease-in-out infinite; }
.swipe .hand::after { content: ""; position: absolute; top: 6px; left: 0; right: 4px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(243, 213, 139, 0), rgba(243, 213, 139, .7)); transform-origin: right; animation: swl 1.6s ease-in-out infinite; }
@keyframes sw { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 70% { transform: translateX(-26px); opacity: 1; } 100% { transform: translateX(-26px); opacity: 0; } }
@keyframes swl { 0% { transform: scaleX(0); } 70% { transform: scaleX(1); opacity: 1; } 100% { opacity: 0; } }
body.moved .swipe { opacity: 0; max-height: 0; margin-top: 0; }
body.phone .swipe .hd, body:not(.phone) .swipe .hm { display: none; }

.date { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 2px; }
.date b { font: 700 64px/1 "Cormorant Garamond", serif; background: linear-gradient(180deg, #fff6d2, #f3d58b 50%, #cf9b3e); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .04em; }
.date span { display: grid; text-align: left; gap: 2px; }
.date em { font: italic 600 26px/1 "Cormorant Garamond", serif; color: #fff; text-transform: capitalize; }
.date small { display: block; font: 700 12.5px/1.2 "Nunito", sans-serif; color: var(--muted); }
.date small::first-letter { text-transform: uppercase; }
.dline { margin: 6px 0 12px; font: 600 16px/1.3 "Cormorant Garamond", serif; color: var(--gold); }
.dline.small { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.cd { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
.cd div { flex: 1; max-width: 76px; padding: 8px 2px 7px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(243, 213, 139, .32); box-shadow: inset 0 0 16px rgba(127, 230, 218, .06); }
.cd b { display: block; font: 700 34px/1 "Cormorant Garamond", serif; color: var(--gold); font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(255, 200, 110, .35); }
.cd small { display: block; margin-top: 4px; font: 800 10.5px "Nunito", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.today { font: 700 22px/1.3 "Cormorant Garamond", serif; color: var(--gold); margin: 6px 0; }
.hall { margin: 2px 0 2px; font: 700 27px/1.15 "Cormorant Garamond", serif; color: var(--gold); text-shadow: 0 0 16px rgba(255, 190, 100, .35); }
.addr { margin: 0 0 12px; font: italic 500 18px/1.3 "Cormorant Garamond", serif; color: var(--muted); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.card .tpl-btn { font: 800 14px "Nunito", sans-serif; padding: 10px 18px; background: rgba(255, 255, 255, .04); color: var(--gold); box-shadow: inset 0 0 0 1.5px rgba(243, 213, 139, .75); }
.card .tpl-btn.pri { background: linear-gradient(180deg, #fae6a8, #d9a845); color: #2b1a05; box-shadow: 0 10px 22px -10px rgba(255, 190, 90, .85), inset 0 1px 0 rgba(255, 255, 255, .6); }
.seat { margin: 4px 0 2px; font: 700 23px/1.2 "Cormorant Garamond", serif; color: var(--gold); text-shadow: 0 0 16px rgba(255, 190, 100, .35); }
.wait { margin: 0 0 8px; font: italic 500 18px/1.3 "Cormorant Garamond", serif; color: #fff; }
.ayah { margin: 0 auto; padding-top: 8px; border-top: 1px solid rgba(243, 213, 139, .25); max-width: 34ch; }
.ayah .ar { margin: 0; font: 700 30px/1.5 "Amiri", serif; color: var(--goldL); text-shadow: 0 0 18px rgba(255, 210, 130, .4); }
.ayah .tr { margin: 0; font: italic 500 17px/1.3 "Cormorant Garamond", serif; color: var(--text); }
.ayah small { display: block; margin-top: 3px; font: 700 11.5px "Nunito", sans-serif; color: var(--muted); }
.again { margin-top: 8px; border: 0; background: none; color: var(--tq); font: 700 13px "Nunito", sans-serif; cursor: pointer; padding: 6px 10px; opacity: .85; }
html[lang="ru"] .kick { letter-spacing: .12em; }

/* ——— кнопка «дальше» и путь ——— */
#nextBtn { position: fixed; z-index: 20; right: 10px; top: 46%; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(243, 213, 139, .7); background: rgba(14, 17, 58, .55);
  color: var(--gold); display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: 0 0 18px -4px rgba(255, 200, 110, .6); animation: nb 2.2s ease-in-out infinite; transition: opacity .4s; }
#nextBtn svg { width: 22px; height: 22px; }
@keyframes nb { 50% { box-shadow: 0 0 26px 0 rgba(255, 200, 110, .75); transform: translateX(2px); } }
body.end #nextBtn { opacity: 0; pointer-events: none; }
#path { position: fixed; z-index: 20; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 6px; padding: 4px 8px; }
#path::before { content: ""; position: absolute; left: 18px; right: 18px; top: 50%; height: 1px; background: linear-gradient(90deg, rgba(243, 213, 139, .1), rgba(243, 213, 139, .5), rgba(243, 213, 139, .1)); }
#path i { position: relative; width: 22px; height: 22px; cursor: pointer; }
#path i::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #8f89c8; transition: all .35s; }
#path i.on::after { inset: 4px; background: var(--gold); box-shadow: 0 0 12px 2px rgba(255, 210, 120, .8); }

/* ——— компьютер ——— */
body:not(.phone) .card { left: auto; right: max(6.5vw, 92px); bottom: auto; top: 52%; width: min(470px, 40vw); max-width: none; padding: 28px 28px 22px; }
body:not(.phone) .names { font-size: 68px; }
body:not(.phone) .kick { font-size: 13px; }
body:not(.phone) .date b { font-size: 84px; }
body:not(.phone) .date em { font-size: 34px; }
body:not(.phone) .date small { font-size: 14px; }
body:not(.phone) .hall { font-size: 32px; }
body:not(.phone) .addr, body:not(.phone) .wait { font-size: 20px; }
body:not(.phone) .seat { font-size: 27px; }
body:not(.phone) .ayah .tr { font-size: 19px; }
body:not(.phone) .card .tpl-btn { font-size: 15px; padding: 11px 20px; }
body:not(.phone) .hello { font-size: 24px; }
body:not(.phone) .inv { font-size: 20px; }
body:not(.phone) .cd b { font-size: 40px; }
body:not(.phone) .ayah .ar { font-size: 34px; }
body:not(.phone) #nextBtn { right: 18px; top: 50%; width: 52px; height: 52px; }
body:not(.phone) #path { bottom: 16px; }
@media (max-height: 700px) and (max-width: 500px) {
  .names { font-size: 42px; } .hello { font-size: 19px; } .inv { font-size: 16px; } .card { padding: 16px 14px 12px; bottom: 38px; }
  .ayah .ar { font-size: 26px; } .seat { font-size: 20px; }
}
body.phone .c4 { padding: 16px 14px 8px; }
body.phone .c4 .seat { font-size: 21px; margin-top: 2px; }
body.phone .c4 .wait { font-size: 17px; margin-bottom: 6px; }
body.phone .c4 .ayah .ar { font-size: 27px; line-height: 1.35; }
body.phone .c4 .ayah .tr { font-size: 16px; }
body.phone .c4 .again { margin-top: 2px; }
/* низкий экран компьютера / телефон боком */
@media (max-height: 560px) {
  body:not(.phone) .card { padding: 16px 18px 12px; top: 54%; }
  body:not(.phone) .names { font-size: 44px; } body:not(.phone) .hello { font-size: 19px; } body:not(.phone) .inv { font-size: 16px; }
  body:not(.phone) .date b { font-size: 56px; } body:not(.phone) .cd b { font-size: 30px; } body:not(.phone) .hall { font-size: 24px; }
  body:not(.phone) .seat { font-size: 20px; } body:not(.phone) .wait, body:not(.phone) .addr { font-size: 16px; }
  body:not(.phone) .ayah .ar { font-size: 24px; line-height: 1.3; } body:not(.phone) .ayah .tr { font-size: 15px; }
  body:not(.phone) .swipe { display: none; }
}
