/* ============================================================
   SAKUWA: стили
   Композиция: телефон = экран приложения (логотип, камень с овальными
   кнопками, «о проекте»), разделы открываются карточкой-папкой с вкладками.
   Десктоп: слева логотип и камень, справа папка с вкладками.
   Один осознанный светлый мир (темной темы нет), цвета заданы токенами.
   ============================================================ */
:root {
  --lav-1: #f1eaff; --lav-2: #dccdfb; --lav-3: #a78fe0;
  --edge: #33234f; --edge-soft: #6c5a98; --ink: #241a3c; --ink-soft: #5b4a80;
  --lime: #b9f25c; --lime-2: #e6ffb6; --lime-3: #7fd629;
  --cream: #fffbea; --pink: #f4b9e6; --blue: #9fcbff; --yellow: #fbff9e;
  --f-logo: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --f-head: "Unbounded", "Onest", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Onest", "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background-color: #dccdfb; color: var(--ink);
  font: 400 18px/1.5 var(--f-body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.bgc { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; background: linear-gradient(160deg, #f1eaff, #dccdfb 55%, #c6b3f2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a, button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--edge); outline-offset: 3px; box-shadow: 0 0 0 3px #fff; }

.app { max-width: 1120px; margin-inline: auto; overflow-x: clip; }
.screen { display: grid; gap: 20px; padding-block: 14px 150px; }
.herocol, .maincol { min-width: 0; }

/* ---------- кнопки-значки ---------- */
.hbar, .mbar { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.ext { font: 500 17px/1 var(--f-mono); color: var(--ink); text-decoration: none; padding: 12px 4px; background: none; border: 0; cursor: pointer; text-align: left; }
.ext:hover { text-decoration: underline; text-underline-offset: 4px; }
.ibtn {
  display: grid; place-items: center; width: 50px; height: 50px; color: var(--ink); text-decoration: none; cursor: pointer; padding: 0;
  background: radial-gradient(circle at 35% 25%, #fff, #efe6ff 70%); border: 2px solid var(--edge); border-radius: 50%; box-shadow: 0 3px 0 var(--edge-soft);
  transition: transform .18s, box-shadow .18s;
}
.ibtn span { font: italic 700 28px/1 Georgia, "Times New Roman", serif; }
.ibtn svg { width: 24px; height: 24px; }
.ibtn:hover { transform: translateY(-2px); }
.ibtn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--edge-soft); }

/* ---------- логотип ---------- */
.logo-wrap { position: relative; display: grid; place-items: center; margin: 10px 0 0; min-height: 124px; }
.oval {
  position: absolute; left: 50%; top: 50%; width: min(96%, 430px); height: 98px; transform: translate(-50%, -46%) rotate(-5deg); border-radius: 50%;
  background: linear-gradient(180deg, #e3fdb0, #9fe34a); border: 2px solid var(--edge); box-shadow: 0 5px 0 rgba(51, 35, 79, .22);
}
.logo {
  position: relative; font: 600 clamp(64px, 21vw, 96px)/1 var(--f-logo); letter-spacing: -.025em; color: var(--cream);
  -webkit-text-stroke: 3px var(--edge); paint-order: stroke fill; text-shadow: 3px 4px 0 var(--lav-3);
}

/* ---------- камень и овальные кнопки ---------- */
.orbit { position: relative; container-type: inline-size; width: 100%; max-width: 440px; margin: 4px auto 0; aspect-ratio: 1 / 1.1; }
.rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hg { position: absolute; left: 50%; top: 50%; width: 64cqw; transform: translate(-50%, -50%); }
.hg .g { width: 100%; }
.orbit .g { position: absolute; }
.orbit .hg .g { position: relative; }
.o-sp { right: 4cqw; top: 2cqw; width: 14cqw; }
.o-bf { right: 3cqw; bottom: 9cqw; width: 18cqw; }
.o-sp2 { left: 3cqw; top: 46cqw; width: 8cqw; }
.pill {
  position: absolute; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 12px 0 28px; z-index: 3;
  font: 500 22px/1 var(--f-body); color: var(--ink); text-decoration: none; white-space: nowrap; transform: rotate(var(--rot, 0deg));
  background: linear-gradient(180deg, #fff 5%, var(--c) 100%); border: 2px solid var(--edge); border-radius: 999px;
  box-shadow: 3px 5px 0 var(--edge-soft), inset 0 -8px 12px rgba(255, 255, 255, .35); transition: transform .2s, box-shadow .2s;
}
.pill:hover { transform: rotate(var(--rot, 0deg)) translateY(-3px); }
.pill:active { transform: rotate(var(--rot, 0deg)) translate(3px, 4px); box-shadow: 0 0 0 var(--edge-soft); }
.p1 { left: 0; top: 7%; --rot: -11deg; }
.p2 { right: -1%; top: 53%; --rot: 7deg; }
.p3 { left: 7%; bottom: 7%; --rot: -7deg; }
.ab {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(180deg, #93abd0, #4f6a96); border: 1px solid rgba(31, 18, 51, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
.ab svg { width: 20px; height: 20px; }

/* ---------- стразы и наклейки: анимации ---------- */
.g { position: relative; display: block; width: 44px; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.gem-svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 4px 4px rgba(51, 25, 100, .3)); }
.g.float { animation: float 7s ease-in-out infinite alternate; animation-delay: calc(var(--d, 0s) * -1); }
@keyframes float { 0% { transform: translateY(0) rotate(var(--r, 0deg)); } 100% { transform: translateY(-4%) rotate(calc(var(--r, 0deg) + 5deg)); } }
.g.blink { animation: blink 3.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { transform: scale(.75) rotate(0); opacity: .8; } 50% { transform: scale(1.1) rotate(16deg); opacity: 1; } }
.sw { animation: sw 7s ease-in-out infinite; animation-delay: calc(var(--d, 0s) * -1); }
@keyframes sw { 0%, 55% { transform: translateX(0); } 100% { transform: translateX(190px); } }
.spk { transform-box: fill-box; transform-origin: center; animation: spk 3.6s ease-in-out infinite; animation-delay: calc(var(--d, 0s) * -1); }
@keyframes spk { 0%, 100% { transform: scale(.55) rotate(0); opacity: .75; } 45% { transform: scale(1.15) rotate(25deg); opacity: 1; } }
.g.pop .gem-svg { animation: pop .7s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes pop { 0% { transform: none; filter: brightness(1) drop-shadow(0 4px 4px rgba(51, 25, 100, .3)); } 35% { transform: rotate(-12deg) scale(1.12); filter: brightness(1.25) drop-shadow(0 4px 4px rgba(51, 25, 100, .3)); } 70% { transform: rotate(6deg) scale(.97); } 100% { transform: none; } }
.sp {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; pointer-events: none; z-index: 5;
  background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: spark .7s ease-out forwards;
}
.sp:nth-child(odd) { background: var(--lime); }
@keyframes spark { from { transform: translate(0, 0) scale(.4); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(90deg); opacity: 0; } }

/* ---------- о проекте ---------- */
.about { display: grid; gap: 14px; }
.acc {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 0 6px; cursor: pointer; text-align: left;
  background: none; border: 0; border-top: 2px solid rgba(51, 35, 79, .35); font: 500 22px/1 var(--f-body);
}
.acc i { position: relative; width: 22px; height: 22px; }
.acc i::before, .acc i::after { content: ""; position: absolute; left: 3px; right: 3px; top: 10px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .25s; }
.acc i::after { transform: rotate(90deg); }
.acc[aria-expanded="true"] i::after { transform: rotate(0); }
.about-body { display: grid; gap: 22px; }
.bubble {
  position: relative; margin: 0; padding: 20px 22px 22px; font-size: 21px; line-height: 1.6; white-space: pre-wrap;
  background: linear-gradient(180deg, #f5ffdc 0%, #b9f25c 100%); border: 2px solid var(--edge); border-radius: 30px 30px 30px 8px; box-shadow: 3px 5px 0 var(--edge-soft);
}
.lead { font-weight: 700; }
.photos { display: flex; justify-content: center; gap: 0; padding: 6px 0 10px; }
.pol { width: 31%; max-width: 150px; padding: 6px 6px 22px; background: #fff; border: 2px solid var(--edge); box-shadow: 2px 4px 0 var(--edge-soft); }
.pol-0 { transform: rotate(-6deg) translateY(4px); } .pol-1 { transform: rotate(3deg) translateY(-8px); margin-inline: -6px; z-index: 1; } .pol-2 { transform: rotate(7deg) translateY(6px); }
.ph { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: linear-gradient(180deg, var(--a, #c9eaff), var(--b, #8fd0ff)); border: 1.5px solid var(--edge); }
.ph svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-0 { --a: #d9f0ff; --b: #9cd2ff; --f1: #fff69a; --f2: #ffc83e; }
.ph-1 { --a: #ffe0f2; --b: #ff9bd3; --f1: #7de3d8; --f2: #139ba0; }
.ph-2 { --a: #d9f7a6; --b: #8fe03a; --f1: #ffc0e4; --f2: #ff5eb4; }
.ph-3 { --a: #fff6b0; --b: #ffd54a; --f1: #a8d6ff; --f2: #3f8ef5; }
.ph-tag { position: absolute; left: 6%; right: 6%; top: 6%; text-align: center; font: 700 12px/1.15 var(--f-body); background: rgba(255, 255, 255, .8); border-radius: 999px; padding: 3px 4px 4px; }

/* ---------- плеер (демо) ---------- */
.player { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; padding: 18px 16px 14px; background: var(--cream); border: 2px solid var(--edge); border-radius: 26px; box-shadow: 3px 5px 0 var(--edge-soft); }
.disc {
  width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--edge);
  background: radial-gradient(circle, #f4b9e6 0 12%, var(--edge) 13% 16%, transparent 17%),
    conic-gradient(from 20deg, rgba(255, 255, 255, 0) 0 18%, rgba(255, 255, 255, .3) 24%, rgba(255, 255, 255, 0) 30% 68%, rgba(255, 255, 255, .22) 74%, rgba(255, 255, 255, 0) 80%),
    repeating-radial-gradient(circle, #4a3a78 0 3px, #33234f 3px 6px);
}
.player.is-on .disc { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pinfo { min-width: 0; }
.pinfo b { display: block; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.pinfo small { display: block; font-size: 16px; line-height: 1.3; color: var(--ink-soft); }
.bar { height: 10px; margin-top: 8px; border: 2px solid var(--edge); border-radius: 999px; background: #ece7f7; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--lime-3); }
.pctl { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 12px; }
.pb { width: 48px; height: 48px; display: grid; place-items: center; padding: 0; cursor: pointer; background: linear-gradient(180deg, #fff, #dfeaff); border: 2px solid var(--edge); border-radius: 50%; box-shadow: 0 3px 0 var(--edge-soft); color: var(--ink); }
.pb svg { width: 22px; height: 22px; }
.pb.main { width: 58px; height: 58px; background: linear-gradient(180deg, #f4ffd6, #9fe34a); }
.pb:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.pb .i-pause { display: none; } .player.is-on .i-pause { display: block; } .player.is-on .i-play { display: none; }
.tag { font: 700 15px/1 var(--f-body); font-style: normal; white-space: nowrap; background: #ffe9f7; border: 1.5px solid var(--edge); border-radius: 999px; padding: 4px 10px 5px; flex: none; }
.tag.demo { position: absolute; top: -12px; right: 16px; transform: rotate(3deg); background: var(--yellow); }
.rplayer { display: none; }

/* ---------- папка с вкладками ---------- */
.folder { position: relative; isolation: isolate; padding-bottom: 14px; }
.folder::before, .folder::after { content: ""; position: absolute; z-index: -1; left: 6px; right: -4px; bottom: 0; height: 140px; border: 2px solid var(--edge); border-radius: 0 0 30px 30px; }
.folder::before { background: #d5c4fb; transform: rotate(1.4deg); transform-origin: right bottom; }
.folder::after { background: #cbf48e; transform: rotate(-1.6deg); transform-origin: left bottom; left: -4px; right: 8px; bottom: -2px; }
.tabs { display: flex; gap: 6px; align-items: flex-end; padding: 0 4px; position: relative; z-index: 2; margin-bottom: -2px; }
.tab {
  flex: 1; min-width: 0; min-height: 54px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px 6px;
  font: 700 16px/1.1 var(--f-body); color: var(--ink); text-decoration: none; background: var(--tc); border: 2px solid var(--edge); border-bottom: 0; border-radius: 22px 22px 0 0; transition: min-height .2s;
}
.tab[aria-current="page"] { min-height: 64px; background: var(--sh); font-weight: 800; }
.tab:not([aria-current]):hover { min-height: 58px; }
.sheet {
  position: relative; display: grid; gap: 18px; padding: 22px 16px 26px; background: linear-gradient(180deg, var(--sh), var(--sh2));
  border: 2px solid var(--edge); border-radius: 16px 30px 30px 30px; box-shadow: 4px 6px 0 var(--edge-soft);
}
.sh-head { display: flex; align-items: center; gap: 14px; }
.sh-gem { flex: none; width: 66px; }
.title { margin: 0; font: 400 clamp(36px, 11vw, 52px)/1.05 var(--f-head); color: var(--cream); -webkit-text-stroke: 3px var(--edge); paint-order: stroke fill; text-shadow: 3px 4px 0 var(--lav-3); text-wrap: balance; }

/* ---------- строки-ссылки ---------- */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rows > li { min-width: 0; }
.sheet > * { min-width: 0; }
.row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 82px; padding: 9px 14px 9px 10px; color: var(--ink); text-decoration: none; text-align: left; cursor: pointer;
  background: linear-gradient(180deg, #fff 8%, var(--c) 100%); border: 2px solid var(--edge); border-radius: 28px; box-shadow: 3px 5px 0 var(--edge-soft); transition: transform .18s, box-shadow .18s;
}
.row:hover { transform: translateY(-2px); }
.row:active { transform: translate(3px, 4px); box-shadow: 0 0 0 var(--edge-soft); }
.tile { flex: none; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 19px; background: linear-gradient(180deg, #fff, rgba(255, 255, 255, .5)); border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--edge-soft); }
.tile .g { width: 44px; }
.rtxt { flex: 1; min-width: 0; }
.rtxt b { display: block; font-size: 21px; line-height: 1.2; font-weight: 700; overflow-wrap: break-word; }
.rtxt small { display: block; font-size: 16px; line-height: 1.3; color: var(--ink-soft); }

/* ---------- как вступить ---------- */
.instr { padding: 18px 18px 20px; background: var(--cream); border: 2px solid var(--edge); border-radius: 26px; box-shadow: 3px 5px 0 var(--edge-soft); }
.instr p { margin: 0; font-size: 20px; line-height: 1.7; }
.il { display: inline; padding: 0; background: none; border: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: #f27cc9; text-decoration-thickness: 4px; text-underline-offset: 3px; }
.il:hover { background: #ffe0f4; }

/* ---------- правила ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  min-height: 48px; padding: 4px 18px 6px; cursor: pointer; font: 600 22px/1 var(--f-logo); letter-spacing: .04em;
  background: linear-gradient(180deg, #fff, var(--t)); border: 2px solid var(--edge); border-radius: 999px; box-shadow: 0 3px 0 var(--edge-soft); transition: transform .18s;
}
.chip:hover { transform: translateY(-2px); } .chip:active { transform: translateY(3px); box-shadow: none; }
.rule-list { display: grid; gap: 16px; }
.rule { padding: 16px 18px 20px; background: linear-gradient(180deg, #fff 30%, var(--t)); border: 2px solid var(--edge); border-radius: 26px; box-shadow: 3px 5px 0 var(--edge-soft); scroll-margin-top: 24px; }
.rhead { margin-bottom: 8px; font-size: 20px; line-height: 2; }
.num { display: inline-block; vertical-align: middle; padding: 6px 14px 8px; font: 600 25px/1 var(--f-logo); letter-spacing: .05em; background: linear-gradient(180deg, #fff, var(--t2)); border: 2px solid var(--edge); border-radius: 999px; box-shadow: 0 2px 0 var(--edge-soft); }
.rhead .g.rgem { display: inline-block; vertical-align: middle; width: 50px; }
.sep { white-space: pre; font-weight: 700; color: var(--ink-soft); }
.rtitle { display: inline; margin: 0; font: 700 23px/1.4 var(--f-body); }
.rtext { margin: 0; font-size: 19px; line-height: 1.7; }
mark { color: inherit; background: linear-gradient(transparent 52%, var(--t2) 52%); padding: 0 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.rule.flash { animation: flash 1.1s ease; }
@keyframes flash { 0%, 100% { transform: none; } 25% { transform: rotate(-1deg) scale(1.02); } 60% { transform: rotate(.7deg) scale(1.01); } }

/* ---------- строка поиска (как «enter a message») ---------- */
.msg { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 22px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); pointer-events: none; }
.msg::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(220, 205, 251, 0), rgba(214, 198, 247, .94) 55%); }
.msg-in { position: relative; max-width: 560px; margin: 0 auto; pointer-events: auto; }
.pillbar { display: flex; align-items: center; gap: 8px; height: 62px; padding: 0 8px 0 22px; background: linear-gradient(180deg, #fff, #f7f1ff); border: 2px solid var(--edge); border-radius: 999px; box-shadow: 0 4px 0 var(--edge-soft), inset 0 2px 5px rgba(120, 90, 180, .16); }
.sin { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font: 400 19px var(--f-body); color: var(--ink); outline: none; }
.sin::placeholder { color: #8d80ad; }
.sin:focus-visible { outline: 0; box-shadow: none; }
.sin::-webkit-search-cancel-button, .sin::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.rtxt .tag { display: inline-block; margin-top: 6px; }
.pillbar:focus-within { box-shadow: 0 4px 0 var(--edge-soft), 0 0 0 3px #fff, 0 0 0 5px var(--edge); }
.send { width: 48px; height: 48px; flex: none; padding: 0; background: none; border: 0; cursor: pointer; transition: transform .2s; }
.send svg { width: 100%; height: 100%; }
.send:hover { transform: translateX(2px) rotate(-6deg); }
.results { position: absolute; left: 0; right: 0; bottom: calc(100% + 12px); list-style: none; margin: 0; padding: 8px; display: grid; gap: 4px; max-height: 50vh; overflow-y: auto; background: var(--cream); border: 2px solid var(--edge); border-radius: 26px; box-shadow: 3px 5px 0 var(--edge-soft); }
.results[hidden] { display: none; }
.res { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; background: none; border: 0; border-radius: 18px; text-align: left; cursor: pointer; font: 700 19px var(--f-body); color: var(--ink); text-decoration: none; }
.res:hover, .res:focus-visible { background: #efe6ff; }
.rt { flex: none; font: 700 14px/1 var(--f-body); background: var(--lime); border: 1.5px solid var(--edge); border-radius: 999px; padding: 4px 10px 5px; }
.none { padding: 12px; color: var(--ink-soft); font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom, 0px)); z-index: 50; max-width: calc(100% - 32px); padding: 12px 18px; font: 700 16px/1.35 var(--f-body); color: #fff; background: var(--edge); border-radius: 18px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- анимация смены раздела ---------- */
.maincol.in > * { animation: rise .5s cubic-bezier(.2, .9, .3, 1.1) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* ---------- телефон: на подстраницах прячем шапку-камень ---------- */
.app[data-mode="mob"]:not([data-view="home"]) .herocol { display: none; }

/* ---------- широкий экран ---------- */
@media (min-width: 960px) {
  body { font-size: 19px; }
  .screen { grid-template-columns: 420px minmax(0, 1fr); gap: 56px; align-items: start; padding-block: 36px 150px; }
  .herocol { position: sticky; top: 28px; }
  .pills, .mplayer, .ibtn[href="#about"] { display: none; }
  .rplayer { display: block; margin-top: 18px; }
  .orbit { max-width: 360px; aspect-ratio: 1 / .92; }
  .hg { width: 74cqw; }
  .o-sp { right: 0; } .o-bf { right: 0; bottom: 4cqw; }
  .maincol { padding-top: 62px; }
  .tab { font-size: 18px; min-height: 58px; }
  .tab[aria-current="page"] { min-height: 70px; }
  .sheet { padding: 30px 32px 36px; gap: 22px; }
  .rule-list { gap: 18px; }
  .rows { grid-template-columns: 1fr 1fr; }
  .rows > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .app[data-view="join"] .rows { grid-template-columns: 1fr; }
  .instr { max-width: 640px; }
  .bubble { max-width: 560px; }
  .toast { bottom: 110px; }
}


/* ============================================================
   КАРТИНКИ-СТРАЗЫ: блеск, переливы, искры (маска по форме картинки)
   ============================================================ */
.spr { position: relative; aspect-ratio: var(--ar); }
.spr > img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(51, 25, 100, .28)); user-select: none; -webkit-user-select: none; -webkit-user-drag: none; pointer-events: none; }
.spr::before, .spr::after, .shine::before, .shine::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
}
.spr::before, .shine::before {
  background: linear-gradient(115deg, #ff8fd8, #ffe27a 20%, #8dffd0 40%, #8fc7ff 60%, #c79bff 80%, #ff8fd8); background-size: 300% 100%;
  mix-blend-mode: soft-light; opacity: .6; animation: irid 7s linear infinite; animation-delay: calc(var(--d, 0s) * -1);
}
.spr::after, .shine::after {
  background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .95) 50%, transparent 58%); background-size: 300% 100%; background-position: 0 0;
  animation: glint 5.5s ease-in-out infinite; animation-delay: calc(var(--d, 0s) * -1);
}
@keyframes irid { to { background-position: 150% 0; } }
@keyframes glint { 0%, 42% { background-position: 0% 0; } 78%, 100% { background-position: 100% 0; } }
.tw {
  position: absolute; z-index: 2; width: 22%; max-width: 24px; min-width: 11px; aspect-ratio: 1; margin: -10px 0 0 -10px; pointer-events: none; background: #fff;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); opacity: 0; animation: twk 3.6s ease-in-out infinite; animation-delay: var(--td, 0s);
}
@keyframes twk { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0); } 45% { opacity: 1; transform: scale(1) rotate(45deg); } }
.g.pop > img { animation: pop .7s cubic-bezier(.3, 1.4, .5, 1); }
.hlogo ~ .mbtns, .mbtns { display: flex; align-items: center; gap: 10px; }
.sbtn .g { width: 30px; }
.tile .spr, .sh-gem.spr, .rhead .rgem.spr { aspect-ratio: auto; }
.tile .spr { width: 44px; height: 44px; }
.sh-gem.spr { width: 66px; height: 66px; }
.rhead .g.rgem { width: 50px; height: 50px; }
.sbtn .tw { display: none; }
.hlogo { display: block; height: 46px; }
.hlogo img { display: block; height: 100%; width: auto; filter: drop-shadow(0 3px 3px rgba(51, 25, 100, .25)); }

/* логотип на главном экране */
.logo-wrap { display: grid; place-items: center; margin: 6px 0 0; min-height: 0; }
.logo-img { position: relative; display: block; width: min(100%, 470px); aspect-ratio: var(--ar); animation: logoin .9s cubic-bezier(.2, 1.2, .3, 1) backwards; }
.logo-img img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 5px 6px rgba(51, 25, 100, .3)); }
@keyframes logoin { from { opacity: 0; transform: scale(.85) rotate(-3deg); } }

/* овальные кнопки: готовые глянцевые картинки */
.pill { height: 76px; padding: 0 16px 0 36px; background: var(--bgi) center / 100% 100% no-repeat; border: 0; box-shadow: none; filter: drop-shadow(0 5px 4px rgba(51, 25, 100, .28)); }
.pill:active { box-shadow: none; }
.pill::after { z-index: 0; }
.pill > * { position: relative; z-index: 2; }

/* ============================================================
   НАКЛЕЙКИ
   ============================================================ */
.slayer { position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 25; pointer-events: none; }
.stk {
  position: absolute; pointer-events: auto; touch-action: none; cursor: grab; transform-origin: center; user-select: none; -webkit-user-select: none;
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 3px 5px rgba(40, 20, 80, .35));
}
.stk .g { width: 100%; cursor: inherit; }
.stk .spr > img { filter: none; }
.stk.lift { cursor: grabbing; z-index: 3; }
.stk.lift .g { transform: scale(1.12); transition: transform .15s; filter: drop-shadow(0 10px 8px rgba(40, 20, 80, .3)); }
.stk.stuck .g { animation: stuck .5s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes stuck { 0% { transform: scale(1.22) rotate(-7deg); filter: brightness(1.2) drop-shadow(0 10px 8px rgba(40, 20, 80, .3)); } 60% { transform: scale(.93); } 100% { transform: none; } }
.stk.peel { animation: peel .26s ease-in forwards; }
@keyframes peel { to { opacity: 0; scale: .3; } }
.stk.sel { outline: 2px dashed rgba(51, 35, 79, .6); outline-offset: 8px; border-radius: 10px; z-index: 2; }
.stk-x, .stk-r { display: none; position: absolute; z-index: 3; width: 32px; height: 32px; padding: 0; border: 2px solid var(--edge); border-radius: 50%; color: var(--ink); cursor: pointer; }
.stk.sel .stk-x, .stk.sel .stk-r { display: grid; place-items: center; }
.stk-x { top: -18px; right: -18px; background: #fff; font: 700 22px/1 var(--f-body); }
.stk-r { right: -18px; bottom: -18px; background: var(--lime); cursor: nwse-resize; touch-action: none; }
.stk-r::before { content: "↻"; font: 700 18px/1 var(--f-body); }

.tray {
  position: fixed; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 31;
  padding: 12px 12px 8px; background: var(--cream); border: 2px solid var(--edge); border-radius: 28px; box-shadow: 3px 5px 0 var(--edge-soft);
}
.tray[hidden] { display: none; }
.tray, .tray * { -webkit-user-select: none; user-select: none; }
body.dragging, body.dragging * { -webkit-user-select: none !important; user-select: none !important; cursor: grabbing; }
.tray-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; padding-left: 6px; }
.tray-h b { font: 400 26px/1 var(--f-head); }
.tray-hint { flex: 1 1 140px; font-size: 15px; line-height: 1.25; color: var(--ink-soft); }
@media (max-width: 560px) { .tray-hint { display: none; } .tray-h b { margin-right: auto; } }
.tray-btn { min-height: 40px; padding: 4px 14px; border: 2px solid var(--edge); border-radius: 999px; background: linear-gradient(#fff, #e8dcff); font: 700 15px var(--f-body); cursor: pointer; }
.tray-btn.x { width: 40px; padding: 0; font-size: 24px; line-height: 1; }
.tray-row { display: flex; gap: 10px; overflow-x: auto; padding: 8px 4px 12px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.ti { flex: none; display: grid; place-items: center; width: 80px; height: 80px; padding: 9px; background: #fff; border: 2px dashed rgba(51, 35, 79, .35); border-radius: 22px; cursor: grab; touch-action: pan-x; transition: transform .18s, background .18s; }
.ti:hover { transform: translateY(-3px) rotate(-3deg); background: #f7f0ff; }
.ti img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(51, 25, 100, .25)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* кнопки-облачка: готовые картинки заказчицы, текст пишется прямо на них */
.pill { display: block; width: var(--w); height: auto; aspect-ratio: var(--ar); padding: 0; gap: 0; background: var(--bgi) center / 100% 100% no-repeat; border: 0; border-radius: 0; box-shadow: none; }
.pill .t { position: absolute; left: var(--tx); top: var(--ty); transform: translate(-50%, -50%); font: 600 clamp(20px, 6.6cqw, 28px)/1 var(--f-body); color: var(--ink); white-space: nowrap; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.pill.shine::before { opacity: .55; }
.p1 { left: 1%; top: 1%; --rot: -5deg; }
.p2 { right: -1%; top: 50%; --rot: 5deg; }
.p3 { left: 0; bottom: 1%; --rot: -3deg; }

.hbar { justify-content: flex-end; }
.il.off { text-decoration: underline; text-decoration-color: #f27cc9; text-decoration-thickness: 4px; text-underline-offset: 3px; font-weight: 700; }

/* правки: ровное выделение, чистые заголовки, камни не вылезают */
.title { -webkit-text-stroke: 0; paint-order: normal; color: var(--ink); text-shadow: 2px 3px 0 rgba(255, 255, 255, .9), 4px 5px 0 var(--lav-3); letter-spacing: .01em; }
mark { background: var(--t2); color: inherit; border-radius: 7px; padding: .04em .28em; line-height: 1.9; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.rhead .g.rgem { width: 44px; height: 44px; margin-right: 8px; flex: none; }
.rhead .rgem .tw, .tile .tw, .sh-gem .tw, .sbtn .tw { display: none; }
.rhead .rgem.spr::before, .rhead .rgem.spr::after, .tile .spr::after { display: none; }
.sh-gem.spr, .tile .spr, .rhead .rgem.spr { overflow: hidden; }
.sh-gem.spr > img, .tile .spr > img, .rhead .rgem.spr > img { object-fit: contain; }
.g.float { animation-name: none; }

/* наклейки в лотке: всё строго внутри квадрата */
.ti { box-sizing: border-box; overflow: hidden; padding: 10px; }
.ti img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.tray-row { padding-block: 10px 14px; }

/* воздух между «о проекте» и плеером */
.mplayer { margin-top: 34px; }
.about { gap: 18px; }

/* плеер в стиле остального сайта */
.player { background: linear-gradient(180deg, #fff 0%, #efe6ff 100%); border: 2px solid var(--edge); border-radius: 26px; box-shadow: 3px 5px 0 var(--edge-soft); }
.disc { display: grid; place-items: center; width: 68px; height: 68px; padding: 8px; box-sizing: border-box; border-radius: 19px; border: 2px solid var(--edge); background: linear-gradient(180deg, #fff, #f8c9ee); box-shadow: 0 3px 0 var(--edge-soft); animation: none !important; }
.disc img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pinfo b { font-weight: 700; }
.bar { height: 12px; background: #fff; }
.bar i { background: linear-gradient(90deg, #ff9bdc, #c5b0fb); }
.pb { background: linear-gradient(180deg, #fff, #e3d8ff); }
.pb.main { background: linear-gradient(180deg, #ffe0f4, #ff9bdc); }

/* подчеркивание в инструкции: ровный маркер вместо волнистой линии */
.il, .il.off { text-decoration: none; background: #ffc6ea; border-radius: 7px; padding: .02em .28em; font-weight: 700; -webkit-box-decoration-break: clone; box-decoration-break: clone; line-height: 1.9; }
.il:hover { background: #ffaee0; }
.title { text-shadow: 2px 3px 0 var(--lav-3); }
.sh-gem.spr::before, .sh-gem.spr::after, .tile .spr::before { display: none; }
.sh-gem.spr, .tile .spr { overflow: visible; }

.disc { padding: 0; overflow: hidden; background: #fff; }
.disc img { border-radius: 17px; object-fit: cover; }
.ti { overflow: visible; }
.ti img { width: 100%; height: 100%; }
.sbtn .g { width: 34px; }
.ti { position: relative; display: block; }
.ti img { position: absolute; left: 10px; top: 10px; width: calc(100% - 20px); height: calc(100% - 20px); max-width: none; max-height: none; object-fit: contain; }
.title { font-family: var(--f-head); font-weight: 800; font-size: clamp(30px, 9vw, 46px); line-height: 1.08; letter-spacing: -.02em; text-transform: none; }
.tray-h b { font-family: var(--f-head); font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
.rtitle, .acc span { font-family: var(--f-head); font-weight: 800; }
.rtitle { letter-spacing: -.01em; }
.title { text-shadow: 2px 2px 0 var(--lav-3); }
.title { font-weight: 700; font-size: clamp(22px, 7.2vw, 34px); line-height: 1.15; letter-spacing: -.01em; }
.tray-h b { font-weight: 700; font-size: 17px; }
.rtitle { font-weight: 700; font-size: .92em; }
.acc span { font-weight: 700; font-size: 17px; }

/* смешанные буквы: скрипт, узкий гротеск, пиксель, широкий */
.mxw { display: inline-block; line-height: 1.1; letter-spacing: .01em; }
.mx { display: inline-block; background: linear-gradient(180deg, #fff 15%, #7be03a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1.1px #1f1233; paint-order: stroke fill; filter: drop-shadow(1px 1px 0 rgba(31, 18, 51, .35)); }
.mx.m0 { font: italic 400 1.18em/1 "Lobster", cursive; }
.mx.m1 { font: 500 1.08em/1 "Oswald", "Arial Narrow", sans-serif; }
.mx.m2 { font: 400 .98em/1 "Silkscreen", monospace; }
.mx.m3 { font: 700 .92em/1 "Unbounded", sans-serif; }
.lead .mxw { font-size: 1.12em; }
.pinfo b .mxt { font-size: 1.25em; }
.pinfo small .mxw { font-size: 1.1em; }
.pinfo b, .pinfo small { overflow: visible; }
.attn { display: inline-block; vertical-align: -.32em; height: 1.55em; margin: 0 .08em; }
.attn img { display: block; height: 100%; width: auto; filter: drop-shadow(1px 2px 0 rgba(31, 18, 51, .25)); }
.pinfo b, .pinfo small { overflow: visible; }
.attn { height: 2.05em; vertical-align: -.5em; margin: 0 .1em; } .lead { line-height: 2.2; }

/* вкладки: буквы разных шрифтов, обводка (как у примера заказчицы) */
.tab { font-size: 19px; line-height: 1.15; min-height: 62px; }
.tab[aria-current="page"] { min-height: 72px; }
.tab > span { display: block; }
.mx.mt { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #fff; -webkit-text-stroke: 1.4px #1f1233; paint-order: stroke fill; filter: drop-shadow(1px 1.5px 0 rgba(31, 18, 51, .4)); letter-spacing: 0; }
.mx.mt.m0 { font: italic 400 1.2em/1 "Lobster", cursive; }
.mx.mt.m1 { font: 500 1.06em/1 "Oswald", "Arial Narrow", sans-serif; }
.mx.mt.m2 { font: 500 1em/1 "Pixelify Sans", monospace; }
.mx.mt.m3 { font: 700 .86em/1 "Unbounded", sans-serif; }
@media (min-width: 960px) { .tab { font-size: 22px; } }
.mw { display: inline-block; white-space: nowrap; }
@media (max-width: 370px) { .hlogo { height: 34px; } .mbtns { gap: 6px; } .ibtn { width: 46px; height: 46px; } .tab { font-size: 17px; } }

/* вкладки ровно по краям листа, без выступающих уголков */
.tabs { padding: 0; gap: 4px; margin-bottom: -2px; }
.tab { border-radius: 20px 20px 0 0; border-bottom: 0; box-sizing: border-box; }
.sheet { border-radius: 0 0 30px 30px; }
.tab[aria-current="page"] { background: var(--sh); padding-bottom: 8px; }
@media (min-width: 960px) { .tabs { gap: 6px; } }
.tabs { margin-bottom: 0; }
.tab { margin-bottom: 0; }
.tab[aria-current="page"] { margin-bottom: -2px; padding-bottom: 10px; position: relative; z-index: 3; }


/* ---------- мобильная типографика: компактный текст без обрезания ---------- */
@media (max-width: 959px) {
  /* подписи на декоративных кнопках остаются внутри картинок */
  .pill .t {
    font-size: clamp(17px, 5.5cqw, 22px);
    line-height: 1.1;
  }

  /* инструкция: меньше строк и ровнее расстояния между ними */
  .instr { padding: 16px; }
  .instr p {
    font-size: clamp(15px, 4.2vw, 17px);
    line-height: 1.55;
    overflow-wrap: break-word;
  }
  .instr .il {
    line-height: inherit;
    padding: .02em .2em;
  }

  /* правила: заголовки и основной текст не сливаются */
  .rule { padding: 15px 16px 18px; }
  .rhead {
    margin-bottom: 9px;
    font-size: 17px;
    line-height: 1.55;
  }
  .rtitle {
    font-size: 18px;
    line-height: 1.4;
  }
  .num {
    font-size: 21px;
    padding: 5px 11px 7px;
  }
  .rtext {
    font-size: clamp(15px, 4.2vw, 17px);
    line-height: 1.6;
    overflow-wrap: break-word;
  }

  /* ссылки: @Sakuwa_anonbot не переносится посреди ника */
  .row {
    gap: 10px;
    padding: 9px 11px 9px 9px;
  }
  .tile { width: 56px; height: 56px; }
  .tile .spr { width: 40px; height: 40px; }
  .rtxt b {
    font-size: clamp(15px, 4.2vw, 18px);
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
  }
  .rtxt small {
    font-size: 14px;
    line-height: 1.35;
  }
}

@media (max-width: 370px) {
  /* запас места для длинного ника на узких телефонах */
  .sheet { padding-inline: 13px; }
  .row { gap: 8px; padding-inline: 8px; }
  .tile { width: 50px; height: 50px; }
  .tile .spr { width: 36px; height: 36px; }
  .rtxt b { font-size: 15px; }
}


/* ---------- мягкий гротеск с кириллицей, как в референсе ---------- */
.pill .t,
.instr p,
.rhead,
.rtitle,
.rtext,
.rtxt b,
.rtxt small {
  font-family: "Nunito", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
}
.pill .t,
.rtitle,
.rtxt b { font-weight: 800; }
.instr p,
.rtext,
.rtxt small { font-weight: 600; }
