/* «Мой паспорт» (вид 17.10): обложка паспорта, путь уровней, «следующая наклейка», фильтр, наклейки-стикеры
   (полученные — глянец, блик, наклон за мышью; пустые — силуэт в лунке), штампы-оттиски, рекорды, образец диплома.
   Только для pasport.html (общие .stk и .toast — в style.css). Разметка — js/pasport-page.js. */

/* ── обложка ───────────────────────────────────────────── */
.pp-cover { --gold: #f9cc4f; position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px;
  align-items: center; padding: 28px 32px 28px 46px; border-radius: 28px; color: #fff;
  background: radial-gradient(110% 140% at 100% 0, rgba(95, 195, 230, .85) 0, transparent 55%), linear-gradient(135deg, #0d4373 0, #1666a8 48%, #2b8fd6 100%);
  box-shadow: 0 2px 0 rgba(13, 67, 115, .2), 0 22px 44px rgba(22, 102, 168, .3); }
.pp-cover::before { content: ""; position: absolute; left: 16px; top: 14px; bottom: 14px; border-left: 2px dashed rgba(255, 255, 255, .38); }   /* корешок со строчкой */
.pp-cover::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 58%; opacity: .14;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 120'%3E%3Cpath d='M0 50 Q75 10 150 50 T300 50 T450 50 T600 50 V120 H0Z' fill='white'/%3E%3Cpath d='M0 80 Q75 45 150 80 T300 80 T450 80 T600 80 V120 H0Z' fill='white' opacity='.6'/%3E%3C/svg%3E") 0 100% / 600px 100% repeat-x;
  animation: pp-waves 22s linear infinite; }
.pp-wm { position: absolute; z-index: -1; right: 22px; top: 50%; transform: translateY(-50%) rotate(12deg); opacity: .09; fill: #fff; pointer-events: none; }
.pp-ring { --p: 0; position: relative; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, .2) 0); box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
.pp-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #fff 0, #d9eefb 75%); }
.pp-ring img { position: relative; width: 88px; height: 88px; object-fit: contain; animation: pp-bob 3.4s ease-in-out infinite; }
.pp-ring-n { position: absolute; right: -6px; bottom: 0; min-width: 42px; height: 42px; padding: 0 9px; border-radius: 99px; display: grid; place-items: center;
  background: var(--gold); color: #5a3d00; font-weight: 900; font-size: 18px; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, .2); }
.pp-cv { min-width: 0; }
.pp-cv-k .pp-no { white-space: nowrap; }
.pp-cv-k { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; opacity: .82; }
.pp-cv-name { display: block; font-family: var(--hand); font-weight: 400; font-size: clamp(30px, 4.6vw, 48px); line-height: 1.08; margin: 4px 0 0;
  overflow-wrap: anywhere; text-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.pp-cv-edit { display: inline-block; margin: 2px 0 6px; color: rgba(255, 255, 255, .82); font-size: 13.5px; font-weight: 800; text-decoration: none; }
.pp-cv-edit:hover { color: #fff; text-decoration: underline; }
#pasport .pp-lv { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
#pasport .pp-lv small { display: inline; color: rgba(255, 255, 255, .78); font-weight: 800; font-size: 15px; }
#pasport .pp-lv b { display: inline; font-size: clamp(24px, 3.2vw, 32px); font-weight: 900; color: var(--gold); line-height: 1.1; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pp-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 99px; font-weight: 800; font-size: 14px;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .3); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.pp-chips b { font-weight: 900; }

/* ── путь уровней ──────────────────────────────────────── */
.pp-levels.card { margin-top: 14px; padding: 20px 22px 16px; }
.pp-path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pp-path li { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; text-align: center; min-width: 0; }
.pp-path li + li::before { content: ""; position: absolute; z-index: 0; top: 22px; right: 50%; width: 100%; height: 6px; border-radius: 9px;
  background: linear-gradient(90deg, var(--water) calc(var(--p, 0) * 1%), var(--line) 0); }
.pp-path li.done::before, .pp-path li.cur::before { --p: 100; }
.pp-pd { position: relative; z-index: 1; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid var(--line);
  color: #c6d5e2; transition: transform .3s cubic-bezier(.2, 1.5, .4, 1); }
.pp-pd svg { display: block; fill: currentColor; }
.pp-path li.done .pp-pd { border-color: var(--water); color: var(--water); background: var(--sky-2); }
.pp-path li.cur .pp-pd { border-color: #fff; color: #fff; background: radial-gradient(circle at 35% 30%, #5fc3e6, var(--water) 70%);
  box-shadow: 0 0 0 3px var(--water), 0 0 0 9px rgba(43, 143, 214, .16); animation: pp-pulse 2.6s ease-in-out infinite; }
.pp-path li:hover .pp-pd { transform: translateY(-3px) scale(1.06); }
.pp-path b { font-size: 13.5px; font-weight: 900; color: var(--ink-soft); line-height: 1.15; overflow-wrap: anywhere; }
.pp-path li.cur b { color: var(--water-deep); }
.pp-path small { font-size: 12px; font-weight: 700; color: #7f93a6; }
#pasport .pp-next { margin: 14px 0 0; text-align: center; font-weight: 700; color: var(--ink-soft); }
#pasport .pp-next b { color: var(--water-deep); }

/* ── «попробуй получить» ───────────────────────────────── */
.pp-tip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; margin-top: 14px; padding: 16px 20px; border-radius: 22px;
  background: linear-gradient(115deg, var(--sun-soft) 0, #fffdf6 60%, #fff 100%); border: 2px solid #f3dc9a; box-shadow: var(--shadow); }
.pp-tip .stk { width: 68px; height: 68px; transform: rotate(-8deg); animation: pp-float 4s ease-in-out infinite; }
.pp-tip .stk i { font-size: 32px; }
.pp-tip.swap .stk { animation: pp-flip .55s cubic-bezier(.2, 1.4, .4, 1); }
.pp-tip.swap .pp-tip-t { animation: pp-in .4s ease both; }
.pp-tip-t small { display: block; color: #8a6100; font-weight: 900; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.pp-tip-t b { display: block; font-size: 20px; line-height: 1.2; margin: 1px 0 2px; }
.pp-tip-t span { color: var(--ink-soft); font-weight: 700; }
.pp-tip-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.pp-tip-more { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 99px; background: #fff; color: var(--ink-soft); font: 800 15px var(--text); cursor: pointer;
  box-shadow: inset 0 0 0 2px #f3dc9a; transition: transform .2s ease; }
.pp-tip-more:hover { transform: rotate(-3deg) scale(1.04); color: var(--ink); }

/* ── фильтр и заголовки разделов ───────────────────────── */
.pp-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin: 40px 0 0; }
#pasport .pp-tools .pp-h { margin: 0; }
.pp-filter { display: inline-flex; gap: 2px; padding: 4px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); }
.pp-filter button { min-height: 40px; padding: 7px 14px; border: 0; border-radius: 99px; background: none; color: var(--ink-soft); font: 800 15px var(--text); cursor: pointer;
  transition: background-color .2s ease, color .2s ease; }
.pp-filter button b { display: inline-block; min-width: 26px; margin-left: 3px; padding: 1px 7px; border-radius: 99px; background: var(--sky-2); font-size: 13px; }
.pp-filter button:hover { color: var(--ink); }
.pp-filter button[aria-pressed="true"] { background: var(--water); color: #fff; box-shadow: 0 4px 10px rgba(43, 143, 214, .3); }
.pp-filter button[aria-pressed="true"] b { background: rgba(255, 255, 255, .25); }
#pasport .pp-g { padding: 0; }   /* у section на сайте свои поля сверху и снизу */
.pp-gh { display: flex; align-items: center; gap: 12px 14px; margin: 30px 0 14px; }
#pasport .pp-gh .pp-h { margin: 0; display: flex; align-items: center; gap: 10px; font-size: clamp(22px, 2.6vw, 28px); }
#pasport .pp-gh .pp-h span { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--sky-2); font-size: 22px; }
.pp-gbar { flex: 1 1 auto; max-width: 280px; height: 10px; border-radius: 99px; background: var(--sky); overflow: hidden; }
.pp-gbar i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, var(--water), #5fc3e6); transition: width .6s ease; }
.pp-gh small { font-weight: 900; color: var(--ink-soft); white-space: nowrap; }
.pp-gh.full .pp-gbar i { background: linear-gradient(90deg, #f6bf3c, #ffe08a, #f6bf3c); }
.pp-gh.full small { color: #8a6100; }
.pp-gh.full .pp-h span { background: var(--sun-soft); }
.pp-empty { margin: 0; padding: 18px 20px; border-radius: 18px; background: var(--sky-2); color: var(--ink-soft); font-weight: 700; }

/* ── наклейки ──────────────────────────────────────────── */
#pasport .stks { grid-template-columns: repeat(auto-fill, minmax(min(178px, 42vw), 1fr)); gap: 14px; }
#pasport .stk-card { --r: -6deg; position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 22px 12px 16px; border-radius: 22px;
  text-align: center; text-decoration: none; color: var(--ink); transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.2, 1.4, .4, 1), box-shadow .3s ease, background-color .3s ease, border-color .3s ease; }
#pasport .stk-card b { font-size: 16.5px; line-height: 1.2; }
#pasport .stk-card small { font-size: 13.5px; line-height: 1.3; color: var(--ink-soft); }
#pasport .stk-card .stk { position: relative; width: 88px; height: 88px; transform: rotate(var(--r)); transition: transform .5s cubic-bezier(.2, 1.6, .4, 1); }
#pasport .stk-card:focus-visible { outline: 3px solid var(--water); outline-offset: 3px; }

/* получена: глянцевая наклейка с белой каймой, карточка в её цвете */
#pasport .stk-card.got { border: 1.5px solid color-mix(in srgb, var(--c) 30%, #fff);
  background: radial-gradient(130% 90% at 50% 0, color-mix(in srgb, var(--c) 17%, #fff) 0, #fff 72%);
  box-shadow: 0 1px 0 rgba(29, 58, 85, .04), 0 8px 22px color-mix(in srgb, var(--c) 16%, transparent); }
#pasport .stk-card.got .stk { overflow: hidden; border: 5px solid #fff;
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .8) 0, transparent 40%), radial-gradient(circle at 72% 88%, color-mix(in srgb, var(--c) 65%, #000) 0, transparent 62%), var(--c);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 55%, #fff), 0 10px 20px color-mix(in srgb, var(--c) 38%, transparent); }
#pasport .stk-card.got .stk i { font-size: 42px; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); }
#pasport .stk-card.got .stk::after { content: ""; position: absolute; inset: -40%; pointer-events: none; transform: translateX(-75%);
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .9) 50%, transparent 62%); }        /* полоса света */
#pasport .stk-card.got::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .75), transparent 45%); }   /* блик под курсором — под текстом */
#pasport .stk-card > b, #pasport .stk-card > small, #pasport .stk-card > .stk-go { position: relative; z-index: 1; }
#pasport .stk-card.got small { color: color-mix(in srgb, var(--c) 55%, var(--ink-soft)); font-weight: 800; }
.stk-new { position: absolute; top: 10px; right: 10px; padding: 2px 9px; border-radius: 99px; background: var(--coral); color: #fff; font-style: normal;
  font-size: 11.5px; font-weight: 900; letter-spacing: .03em; box-shadow: 0 3px 8px rgba(239, 138, 123, .45); animation: pp-pop .6s .3s cubic-bezier(.2, 1.6, .4, 1) both; }
#pasport .stk-card.got.new .stk { animation: pp-glow 2.4s ease-in-out infinite; }

/* ещё нет: лунка с силуэтом наклейки; при наведении силуэт проявляется, кольцо крутится */
#pasport .stk-card:not(.got) { border: 2px dashed #cddbe7; background: linear-gradient(180deg, #fbfdff, #f2f7fb); }
#pasport .stk-card:not(.got) .stk { --c: #e7eff6 !important; transform: none; border: 0; background: radial-gradient(circle at 50% 40%, #f4f8fb, #e3ecf4 70%);
  box-shadow: inset 0 5px 12px rgba(29, 58, 85, .13), inset 0 -2px 0 rgba(255, 255, 255, .9); }
#pasport .stk-card:not(.got) .stk::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2.5px dashed #bfcfdf; transition: border-color .3s ease; }
#pasport .stk-card:not(.got) .stk i { font-size: 40px; color: inherit; font-weight: 400; filter: grayscale(1) brightness(0); opacity: .2;
  transition: opacity .35s ease, filter .35s ease, transform .45s cubic-bezier(.2, 1.6, .4, 1); }
#pasport .stk-card:not(.got) b { color: #5a7086; }
#pasport .stk-card:not(.got) small { margin-bottom: 2px; }
.stk-go { margin-top: 2px; padding: 4px 12px; border-radius: 99px; background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 70%, #0d2f4f);
  font-size: 13px; font-weight: 900; opacity: 0; transform: translateY(6px); transition: opacity .25s ease, transform .3s ease; }
@media (hover: none) { .stk-go { opacity: 1; transform: none; } }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #pasport .stk-card.got:hover { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px);
    transition: transform .12s ease-out, box-shadow .3s ease; box-shadow: 0 20px 36px color-mix(in srgb, var(--c) 30%, transparent); }
  #pasport .stk-card.got:hover .stk { transform: rotate(0deg) scale(1.1) translateZ(30px); }
  #pasport .stk-card.got:hover .stk::after { transform: translateX(75%); transition: transform .9s ease; }
  #pasport .stk-card.got:hover::after { opacity: 1; }
  #pasport .stk-card.got:hover .stk i { animation: pp-wiggle .7s ease; }
  #pasport .stk-card:not(.got):hover { transform: translateY(-5px); border-style: solid; border-color: color-mix(in srgb, var(--c) 55%, #fff);
    background: color-mix(in srgb, var(--c) 7%, #fff); box-shadow: 0 14px 28px rgba(29, 58, 85, .1); }
  #pasport .stk-card:not(.got):hover .stk::before { border-color: var(--c); animation: pp-spin 7s linear infinite; }
  #pasport .stk-card:not(.got):hover .stk i { filter: grayscale(.15); opacity: .6; transform: scale(1.12) rotate(-6deg); }
  #pasport .stk-card:not(.got):hover .stk-go { opacity: 1; transform: none; }
}
#pasport .stk-card:active { transform: scale(.97); }

/* ── штампы-оттиски ────────────────────────────────────── */
#pasport .stamps { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 14px; padding: 22px; border-radius: 22px;
  background: radial-gradient(#efe6d2 1px, transparent 1.2px) 0 0 / 18px 18px, #fffdf7; border: 1.5px solid #efe4cc; }
#pasport .stamp { --ink: #c9483c; --r: -3deg; position: relative; display: grid; justify-items: center; gap: 1px; min-width: 128px; max-width: 230px; padding: 11px 16px 9px;
  border: 3px solid var(--ink); border-radius: 14px; outline: 1.5px solid var(--ink); outline-offset: -8px; color: var(--ink); background: none; text-decoration: none;
  transform: rotate(var(--r)); opacity: .9;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.2 0 0 0 2.75'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 180px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.2 0 0 0 2.75'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 180px;
  transition: transform .4s cubic-bezier(.2, 1.6, .4, 1), opacity .2s ease; }
#pasport .stamp:nth-child(2n) { transform: rotate(var(--r)); }
#pasport .stamp .st-k { font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: inherit; opacity: .9; }
#pasport .stamp span { font-weight: 900; font-size: 14.5px; line-height: 1.15; letter-spacing: .03em; text-transform: uppercase; text-align: center; }
#pasport .stamp small { font-size: 11.5px; font-weight: 800; color: inherit; opacity: .85; }
#pasport .stamp:hover { transform: rotate(0deg) scale(1.07); opacity: 1; }
/* «ещё ждут штампа» — не штамп, а приглашение на карту */
#pasport .stamp-more { display: grid; justify-items: center; gap: 1px; min-width: 128px; padding: 11px 16px 9px; border: 3px dashed #6f8aa3; border-radius: 14px;
  background: #fff; color: #6f8aa3; text-align: center; text-decoration: none; transition: transform .4s cubic-bezier(.2, 1.6, .4, 1); }
#pasport .stamp-more span { font-weight: 900; font-size: 22px; line-height: 1.15; }
#pasport .stamp-more small { font-size: 11.5px; font-weight: 800; }
#pasport .stamp-more .st-go { margin-top: 2px; color: var(--water-deep); font-weight: 900; }
#pasport .stamp-more:hover { transform: scale(1.07); }

/* ── рекорды ───────────────────────────────────────────── */
#pasport .recs { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
#pasport .rec b { display: block; font-size: 16.5px; line-height: 1.25; }
#pasport .rec small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.3; }
#pasport a.card.rec { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; border-radius: 20px; transition: transform .35s cubic-bezier(.2, 1.4, .4, 1), box-shadow .25s ease; }
#pasport .rec-e { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 29px; background: var(--sky-2); }
#pasport .rec.got .rec-e { background: linear-gradient(135deg, #fff6d8, #ffdf7e); box-shadow: inset 0 0 0 2px #f3dc9a; }
#pasport .rec:not(.got) .rec-e { filter: grayscale(.7); opacity: .75; }
#pasport .rec:not(.got) small { color: #7f93a6; }
.rec-go { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sky-2); color: var(--water-deep); font-weight: 900; }
#pasport .rec.got .rec-go { background: var(--sun-soft); color: #8a6100; }
@media (hover: hover) { #pasport a.card.rec:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(29, 58, 85, .12); } }

/* ── диплом: форма и живой образец ─────────────────────── */
main .pp-dip.card { display: block; padding: 30px 32px 40px; background: linear-gradient(135deg, #fff 0, var(--sky-2) 100%); }
.pp-dip-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 530px); gap: 16px 40px; align-items: center; }
.pp-dip-ctl .cta { margin: 12px 0 0; }
.pp-dip-intro h2 { margin-top: 0; }
.pp-dip-intro p { margin: 0; }
.pp-dip-form input { max-width: 100%; }
.pp-dip-form .cta { display: flex; flex-wrap: wrap; gap: 10px; }
.pp-dip-note { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); }
.pp-dip-prev { position: relative; display: block; max-width: 940px; margin: 28px auto 0; border-radius: 10px; cursor: zoom-in; outline: none;
  transform: rotate(.5deg); transition: transform .5s cubic-bezier(.2, 1.4, .4, 1), box-shadow .3s ease;
  box-shadow: 0 2px 0 rgba(29, 58, 85, .05), 0 22px 44px rgba(29, 58, 85, .2); }
.pp-dip-prev .dpl { border-radius: 10px; }
.pp-dip-prev:focus-visible { box-shadow: 0 0 0 4px var(--sun), 0 22px 44px rgba(29, 58, 85, .2); }
.pp-dip-zoom { position: absolute; right: 10px; top: 10px; padding: 5px 11px; border-radius: 99px; background: rgba(15, 76, 128, .82); color: #fff;
  font-size: 13px; font-weight: 800; opacity: 0; transform: translateY(-4px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
@media (hover: hover) {
  .pp-dip-prev:hover { transform: rotate(0deg) scale(1.015); }
  .pp-dip-prev:hover .pp-dip-zoom, .pp-dip-prev:focus-visible .pp-dip-zoom { opacity: 1; transform: none; }
}
@media (hover: none) { .pp-dip-zoom { position: absolute; left: 50%; right: auto; top: auto; bottom: -15px; opacity: 1; transform: translateX(-50%); white-space: nowrap; } }
@media (prefers-reduced-motion: no-preference) {
  .pp-dip-prev:not(.stamped) .dpl-seal { opacity: 0; }
  .pp-dip-prev.stamped .dpl-seal { animation: dpl-stamp .55s .35s cubic-bezier(.3, 1.5, .5, 1) both; }
}
@keyframes dpl-stamp { from { opacity: 0; transform: rotate(-20deg) scale(2.1); } 60% { opacity: 1; } }

@media (max-width: 900px) { .pp-dip-form { grid-template-columns: minmax(0, 1fr); max-width: 560px; } }

/* ── диплом: один рисунок для образца, крупного просмотра и печати; все размеры — доли ширины (cqw), лист 277 × 189 мм ── */
.dpl-box { container-type: inline-size; width: 100%; }
.dpl { position: relative; width: 100%; aspect-ratio: 277 / 189; overflow: hidden; background: #fffdf8; color: #1d3a55; font-family: var(--text); line-height: 1.2;
  text-align: left; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.dpl img { display: block; max-width: none; }
.dpl-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.dpl-wm { position: absolute; left: 50%; top: 8.5cqw; height: 44cqw; width: auto; transform: translateX(-50%); opacity: .13; }   /* гильоширная розетка */
.dpl-head { position: absolute; left: 5.2cqw; right: 5.4cqw; top: 4.6cqw; display: flex; justify-content: space-between; align-items: center; }
.dpl-org { display: flex; align-items: center; gap: 1.1cqw; }
.dpl-org { gap: .9cqw; }
.dpl-org img { height: 4.8cqw; width: auto; }
.dpl-org b { font-weight: 900; font-size: 1.14cqw; line-height: 1.2; letter-spacing: .07em; text-transform: uppercase; color: #055b94; }
.dpl-sk { height: 4.4cqw; width: auto; }   /* знак Sk: в печати 12,2 мм (минимум по руководству Фонда — 12 мм), на образце 940 px — 41 px (минимум 34) */
.dpl-deco { position: absolute; width: auto; }
/* слева — QR-код сайта с адресом, справа — золотая розетка уровня */
.dpl-qr { position: absolute; left: 5.2cqw; top: 16.6cqw; width: 12cqw; display: grid; justify-items: center; gap: .3cqw; padding: .6cqw .5cqw .75cqw;
  text-align: center; background: #fff; border: .14cqw solid #8cc4ea; border-radius: 1cqw; box-shadow: 0 0 0 .4cqw #fff, 0 0 0 .54cqw #cfe6f7; }
.dpl-qr img { width: 9.6cqw; height: 9.6cqw; }
.dpl-qr b { font-size: .92cqw; font-weight: 900; line-height: 1.1; color: #0f4c80; }
.dpl-qr small { font-size: .78cqw; font-weight: 700; line-height: 1.2; color: #5b7690; }
.dpl-award { position: absolute; right: 5.8cqw; top: 16.6cqw; width: 11.4cqw; }
.dpl-award img { width: 100%; height: auto; }
.dpl-award span { position: absolute; left: 50%; top: 34.7%; width: 52%; transform: translate(-50%, -50%); display: grid; justify-items: center; text-align: center; }
.dpl-award small { font-size: .74cqw; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: #9a6c08; }
.dpl-award b { margin-top: .15cqw; font-family: var(--hand); font-weight: 400; line-height: 1; color: #0f4c80; }
.dpl-mid { position: absolute; left: 17%; right: 17%; top: 11cqw; display: flex; flex-direction: column; align-items: center; text-align: center; }
.dpl-title { display: flex; align-items: center; gap: 1.4cqw; }
.dpl-title img { height: 8cqw; width: auto; }
.dpl-title img.r { transform: scaleX(-1); }
.dpl-title b { padding: 0 .6cqw .5cqw; font-family: var(--hand); font-weight: 400; font-size: 8.2cqw; line-height: 1; color: #1666a8;
  background: linear-gradient(180deg, #49a6e6 0, #1666a8 55%, #0f4c80 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 .22cqw 0 rgba(15, 76, 128, .14)); }
.dpl-sub { margin-top: 0; font-weight: 900; font-size: 2cqw; letter-spacing: .15em; text-transform: uppercase; color: #0f4c80; }
.dpl-for { margin-top: 1cqw; font-size: 1.45cqw; font-style: italic; color: #5b7690; }
.dpl-name { min-width: 44cqw; max-width: 100%; margin-top: .1cqw; padding: 0 3cqw .2cqw; font-family: var(--hand); font-size: 5.2cqw; line-height: 1.22; color: #12385c;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: .2cqw solid #a9cfee; }
.dpl-name.empty { color: #b9c9d7; }
.diploma .dpl-name.empty { color: transparent; }                  /* без имени на листе — пустая строка, вписать от руки */
.dpl .dpl-txt { margin: 1cqw 0 0; font-size: 1.7cqw; font-weight: 700; color: #3a5670; }
.dpl-stats { display: flex; gap: 2.4cqw; margin-top: 1.4cqw; }
.dpl-st { display: grid; justify-items: center; width: 12.5cqw; text-align: center; }
.dpl-md { width: 5.6cqw; height: 5.6cqw; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff 0, #fff6df 75%);
  box-shadow: 0 0 0 .3cqw #e2b54a, 0 0 0 .55cqw #fff, 0 0 0 .68cqw #ecd08a; }   /* все медали одинаковые, золотые — без пестроты */
.dpl-md img { width: 3.9cqw; height: 3.9cqw; object-fit: contain; }
.dpl-st b { margin-top: .8cqw; font-size: 2cqw; font-weight: 900; line-height: 1; color: #12385c; }
.dpl-st small { margin-top: .3cqw; font-size: 1cqw; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #5b7690; }
.dpl-foot { position: absolute; left: 20%; right: 41%; bottom: 7cqw; display: grid; justify-items: center; gap: .9cqw; }
.dpl-signs { display: flex; justify-content: space-between; gap: 2.2cqw; width: 100%; }
.dpl-sg { flex: 1; display: grid; justify-items: center; }
.dpl-sg i { font-style: normal; font-family: var(--hand); font-size: 2.7cqw; line-height: 1; color: #1d5fa6; transform: rotate(-6deg); }
.dpl-sg svg { width: 7.6cqw; height: 1.5cqw; margin-top: -.5cqw; fill: none; stroke: #1d5fa6; stroke-width: 1.6; stroke-linecap: round; }
.dpl-sg small { width: 100%; padding-top: .3cqw; border-top: .12cqw solid #8aa7c0; font-size: .98cqw; font-weight: 700; color: #5b7690; text-align: center; }
.dpl-date { font-size: 1.15cqw; font-weight: 800; letter-spacing: .03em; color: #3a5670; }
.dpl-seal { position: absolute; left: 61%; bottom: 5cqw; width: 11.6cqw; height: 11.6cqw; transform: rotate(-10deg); mix-blend-mode: multiply; }
.dpl-h { position: absolute; bottom: 3.9cqw; width: auto; }
.dpl-misha { left: 5cqw; height: 17.5cqw; }
.dpl-aqua { right: 13.8cqw; height: 13cqw; }
.dpl-katya { right: 4.8cqw; height: 18.5cqw; }

/* ── крупный просмотр ── */
.dpl-zoom { position: fixed; inset: 0; z-index: 90; background: rgba(13, 34, 54, .78); backdrop-filter: blur(3px); }
.dpl-zoom[hidden] { display: none; }
.dpl-zoom-in { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.dpl-zoom-x { position: absolute; right: 14px; top: 14px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: #fff; color: var(--ink);
  font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.dpl-zoom-x:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
html.dpl-lock { overflow: hidden; }

/* ── лист для печати: А4 альбомный, поля 10 мм ── */
@media print {
  /* своё правило листа: в style.css ниже по файлу стоит книжный А4 для печатных листов (.sheet) — он перебивал альбомный,
     и диплом печатался уменьшенным на книжном листе. pasport.css грузится после style.css, поэтому это правило главнее */
  @page { size: A4 landscape; margin: 10mm; }
  main:has(.diploma) { padding: 0 !important; margin: 0 !important; }
  .diploma .dpl-box { width: 277mm; }
  .diploma .dpl { width: 277mm; height: 189mm; aspect-ratio: auto; break-inside: avoid; }
}

/* ── появление ─────────────────────────────────────────── */
#pasport.pp-anim .pp-cover, #pasport.pp-anim .pp-levels, #pasport.pp-anim .pp-tip { animation: pp-in .55s cubic-bezier(.2, 1.2, .4, 1) both; }
#pasport.pp-anim .pp-levels { animation-delay: .08s; }
#pasport.pp-anim .pp-tip { animation-delay: .16s; }
#pasport .stk-card { animation: pp-in .5s cubic-bezier(.2, 1.2, .4, 1) both; animation-delay: calc(var(--i, 0) * 28ms); }

@keyframes pp-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes pp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pp-float { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-5px); } }
@keyframes pp-waves { to { background-position-x: 600px; } }
@keyframes pp-pulse { 0%, 100% { box-shadow: 0 0 0 3px var(--water), 0 0 0 8px rgba(43, 143, 214, .18); } 50% { box-shadow: 0 0 0 3px var(--water), 0 0 0 14px rgba(43, 143, 214, .05); } }
@keyframes pp-wiggle { 0%, 100% { transform: none; } 25% { transform: rotate(-12deg) scale(1.12); } 55% { transform: rotate(9deg) scale(1.05); } 80% { transform: rotate(-3deg); } }
@keyframes pp-spin { to { transform: rotate(360deg); } }
@keyframes pp-pop { from { opacity: 0; transform: scale(.3); } }
@keyframes pp-flip { from { transform: rotateY(90deg) scale(.7); } }
@keyframes pp-glow { 0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 55%, #fff), 0 10px 20px color-mix(in srgb, var(--c) 38%, transparent); }
  50% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 55%, #fff), 0 0 0 9px color-mix(in srgb, var(--c) 16%, transparent), 0 10px 26px color-mix(in srgb, var(--c) 45%, transparent); } }

@media (prefers-reduced-motion: reduce) {
  #pasport *, #pasport *::before, #pasport *::after, #pasport .stk-card, .pp-dip * { animation: none !important; transition: none !important; }
  .pp-dip-prev { transition: none; }
}

/* ── телефон ───────────────────────────────────────────── */
@media (max-width: 760px) {
  main .pp-dip.card { grid-template-columns: 1fr; gap: 22px; padding: 22px 18px; }
  .pp-dip-prev { transform: none; }
}
@media (max-width: 560px) {
  .pp-cover { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 14px; padding: 24px 18px 22px 30px; }
  .pp-cover::before { left: 12px; }
  .pp-ring { width: 112px; height: 112px; }
  .pp-ring img { width: 74px; height: 74px; }
  #pasport .pp-lv { justify-content: center; }
  .pp-chips { justify-content: center; }
  .pp-chips span { font-size: 13px; padding: 5px 10px; }
  .pp-levels.card { padding: 16px 10px 14px; }
  .pp-pd { width: 40px; height: 40px; border-width: 2.5px; }
  .pp-path li + li::before { top: 17px; height: 5px; }
  .pp-path b { font-size: 11px; }
  .pp-path small { font-size: 10.5px; }
  .pp-tip { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; padding: 14px; }
  .pp-tip .stk { width: 56px; height: 56px; }
  .pp-tip .stk i { font-size: 26px; }
  .pp-tip-t b { font-size: 17px; }
  .pp-tip-t span { font-size: 14px; }
  .pp-tip-btns { grid-column: 1 / -1; }
  .pp-tip-btns > * { flex: 1 1 0; justify-content: center; }
  .pp-tools { margin-top: 30px; }
  .pp-filter { width: 100%; }
  .pp-filter button { flex: 1 1 0; padding: 7px 6px; font-size: 14px; }
  .pp-gh { flex-wrap: wrap; margin: 24px 0 10px; }
  .pp-gbar { order: 3; flex-basis: 100%; max-width: none; }
  .pp-gh small { margin-left: auto; }
  #pasport .stks { gap: 10px; }
  #pasport .stk-card { padding: 16px 8px 12px; gap: 4px; border-radius: 18px; }
  #pasport .stk-card .stk { width: 68px; height: 68px; }
  #pasport .stk-card.got .stk { border-width: 4px; }
  #pasport .stk-card .stk i { font-size: 32px !important; }
  #pasport .stk-card b { font-size: 14px; }
  #pasport .stk-card small { font-size: 12px; }
  .stk-go { font-size: 12px; padding: 3px 10px; }
  .stk-new { top: 7px; right: 7px; font-size: 10.5px; padding: 1px 7px; }
  #pasport .stamps { padding: 16px 12px; gap: 12px 10px; justify-content: center; }
  #pasport .stamp, #pasport .stamp-more { min-width: 0; padding: 9px 12px 8px; }
  #pasport .stamp span { font-size: 13px; }
}
