
@font-face { font-family: "Noto Sans"; src: url(./noto-regular.woff) format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url(./noto-bold.woff) format('woff'); font-weight: 700; font-display: swap; }
:root { --paper: #faf9f6; --ink: #251e35; --muted: #555062; --accent: #5935b0; --line: #ded9e8; --wash: #eee8fb; font: 16px/1.5 "Noto Sans", Arial, sans-serif; background: var(--paper); color: var(--ink); }
* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(1152px, calc(100% - 72px)); margin-inline: auto; }
.bar, .brand, nav, .languages, .actions, .meta, footer { display: flex; align-items: center; }
.bar { min-height: 75px; justify-content: space-between; gap: 12px; }
.brand { gap: 9px; font-weight: 700; letter-spacing: -.055em; font-size: 1.25rem; white-space: nowrap; }
.brand-mark { width: 27px; height: 27px; border-radius: 8px; background: var(--ink); display: grid; place-items: center; }
.brand-mark::after, .spark { content: ""; display: block; background: currentColor; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.brand-mark::after { width: 16px; height: 16px; color: #e2d5fa; }
nav { gap: 22px; font-weight: 700; }
nav > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.languages { padding: 3px; border: 1px solid var(--line); border-radius: 12px; }
.languages a { display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; border-radius: 8px; min-height: 36px; min-width: 38px; font-size: .83rem; font-weight: 700; }
.languages a[aria-current="page"] { background: #e9e0f7; color: #46278b; }
.hero { overflow: hidden; position: relative; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; min-height: 470px; isolation: isolate; border: 1px solid #e2d9f5; border-radius: 30px; background: var(--wash); }
.hero-copy { padding: clamp(28px, 5vw, 64px); padding-right: 0; z-index: 2; min-width: 0; }
.hero h1 { font-size: clamp(2.55rem, 6.13vw, 5.65rem); line-height: 1.00; letter-spacing: -.087em; font-weight: 700; color: var(--ink); }
.hero h1 span { display: block; color: var(--accent); }
[lang="ru"] .hero h1 { font-size: clamp(2.25rem, 4.65vw, 4.35rem); letter-spacing: -.083em; }
.lede { max-width: 35ch; margin-top: 23px; font-size: 1.07rem; line-height: 1.55; color: #504665; }
.actions { gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn { border: 1px solid transparent; border-radius: 10px; padding: 11px 16px; min-height: 46px; font-weight: 700; font-size: .92rem; cursor: pointer; text-align: center; }
.primary { background: var(--ink); color: white; }
.primary:hover { background: #3d2c5c; }
.secondary { border-color: #bfb0dd; background: none; }
.secondary:hover { background: #e6dcfa; }
.note { color: #514568; font-size: .85rem; margin-top: 15px; }
.illustration { position: relative; min-width: 0; align-self: stretch; }
.illustration canvas { display: block; width: 100%; height: 100%; position: absolute; inset: 0; }
.motion { position: absolute; right: 13px; bottom: 13px; border: 1px solid #c7b8e4; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #f5efff; cursor: pointer; }
.motion::after { content: ''; width: 10px; height: 12px; border-inline: 2px solid currentColor; }
.motion[data-paused]::after { width: 0; height: 0; border: 6px solid transparent; border-left: 9px solid currentColor; translate: 3px 0; }
#games { scroll-margin-top: 15px; margin: 39px auto 45px; }
h2 { font-size: clamp(1.85rem, 4vw, 3.35rem); line-height: 1.1; letter-spacing: -.072em; margin-bottom: 18px; }
.game-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.game { padding: 18px; min-width: 0; background: #fff; border: 1px solid #e4dfeb; border-radius: 19px; display: flex; flex-direction: column; align-items: flex-start; }
.game-picture { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #d7c9ef; background: #f1eafb; border-radius: 13px; color: var(--accent); }
.game-picture .spark { width: 22px; height: 22px; }
.talk { width: 24px; height: 18px; border: 1.5px solid currentColor; border-radius: 7px; position: relative; }
.talk::before { content: ''; position: absolute; inset: 6px 0 0 5px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: 5px 0 currentColor, 10px 0 currentColor; }
.talk::after { content: ''; width: 5px; height: 5px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; background: #f1eafb; position: absolute; bottom: -3px; left: 5px; rotate: -26deg; }
.pair { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; position: relative; translate: -4px 0; }
.pair::after { content: ''; position: absolute; inset: -1.5px; border: 1.5px solid currentColor; border-radius: 50%; translate: 8px 0; }
.tag { font-size: .79rem; font-weight: 700; color: #533b89; margin-top: 15px; }
h3 { font-size: 1.36rem; line-height: 1.15; letter-spacing: -.045em; margin-top: 4px; }
.game p { margin: 8px 0 14px; color: var(--muted); font-size: .94rem; }
.meta { margin-top: auto; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }
.game .btn { margin-top: 15px; width: 100%; border-color: var(--line); }
.game .btn:hover { background: var(--wash); }
footer { justify-content: space-between; padding-block: 16px 25px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
footer .footer-brand { color: var(--ink); }
@media (max-width: 820px) {
  .wrap { width: calc(100% - 44px); }
  .hero { min-height: 400px; }
  .hero-copy { padding-left: 34px; }
  .game { padding: 15px; }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 28px); }
  .bar { min-height: 64px; }
  nav { gap: 10px; }
  nav > a { display: none; }
  .hero { grid-template-columns: 1fr; border-radius: 22px; }
  .hero-copy { padding: 25px 18px 0; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 4rem); }
  [lang="ru"] .hero h1 { font-size: clamp(1.97rem, 9.1vw, 3.8rem); }
  .illustration { min-height: clamp(210px, 62vw, 330px); }
  .game-grid { grid-template-columns: 1fr; }
  #games { margin-top: 29px; }
}
.quiz-page { width: min(730px, 100%); margin: 7px auto 56px; }
.quiz-back { display: inline-block; font-weight: 700; color: var(--accent); margin: 4px 0 17px; text-decoration: underline; text-underline-offset: 4px; }
.quiz-panel { background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.quiz-top { padding: 16px clamp(18px, 5vw, 36px); background: var(--wash); display: flex; align-items: center; gap: 12px; font-weight: 700; }
.quiz-top .game-picture { width: 39px; height: 39px; background: #fffaff; }
.quiz-top .game-picture .spark { width: 19px; height: 19px; }
.quiz-content { padding: clamp(19px, 5vw, 36px); }
.quiz-content h2 { font-size: clamp(1.7rem, 5vw, 2.7rem); letter-spacing: -.048em; margin: 0 0 15px; line-height: 1.16; }
.quiz-content h2:focus { outline: none; }
.quiz-content p { color: var(--muted); margin: 0 0 17px; max-width: 56ch; }
.quiz-score { font-weight: 700; font-size: clamp(2.7rem, 9vw, 4.6rem); line-height: 1.1; letter-spacing: -.075em; color: var(--accent); margin-bottom: 18px; }
.quiz-meter { display: flex; gap: 12px; align-items: center; margin-bottom: 21px; color: var(--muted); font-size: .87rem; white-space: nowrap; }
.quiz-meter progress { width: 100%; height: 8px; accent-color: var(--accent); }
.quiz-answers { display: grid; gap: 8px; margin-bottom: 14px; }
.quiz-answers .btn { text-align: left; background: #faf8fe; border-color: var(--line); }
.quiz-answers .btn:hover:not(:disabled) { border-color: var(--accent); }
.quiz-answers .btn:disabled { cursor: default; opacity: 1; }
.quiz-answers .correct { background: #edf5ea; border-color: #487757; }
.quiz-answers .incorrect { background: #fff0ec; border-color: #b45c46; }
.quiz-content .feedback:empty { margin: 0; }

.skip { position: absolute; top: 5px; left: 10px; transform: translateY(-180%); padding: 9px 12px; background: white; z-index: 3; }
.skip:focus { transform: none; }
main:focus, #games:focus { outline: none; }
.quiz-top h1 { font: inherit; }
.quiz-top .game-picture { flex: 0 0 auto; }
.quiz-top .game-meta { margin-left: auto; color: var(--muted); font-size: .84rem; font-weight: 400; }
.quiz-content .round-rules { margin-bottom: 15px; }
.prompt-instructions { padding: 16px 20px; border: 1px solid #dfd2f1; background: #f6f0fd; border-radius: 12px; margin: 0 0 20px; }
.prompt-instructions summary { cursor: pointer; font-weight: 700; }
.prompt-instructions p { margin: 10px 0 0; }
@media (max-width: 480px) {
  .quiz-top { flex-wrap: wrap; }
  .quiz-top .game-meta { flex-basis: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 950px) { .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .game-grid { grid-template-columns: 1fr; } }

.lens { width: 15px; height: 15px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; translate: -2px -2px; }
.lens::after { content: ''; position: absolute; top: 10px; left: 10px; width: 8px; border-top: 1.5px solid currentColor; transform: rotate(46deg); transform-origin: left; }
.case-clues { padding: 0; margin: 0 0 20px; display: grid; gap: 8px; list-style: none; counter-reset: clue; }
.case-clues li { counter-increment: clue; position: relative; background: #f5effc; border: 1px solid #e3d8f2; border-radius: 10px; padding: 11px 12px 11px 41px; }
.case-clues li::before { content: counter(clue); position: absolute; top: 11px; left: 14px; font-weight: 700; color: var(--accent); }
.case-explanation { display: block; margin-top: 8px; }
.result-actions { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.round-notice, .score-comparison { padding: 14px 16px; border: 1px solid #e3d8f2; background: #f5effc; border-radius: 12px; }
.score-comparison { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; margin: 0 0 12px; }
.score-comparison dd { margin: 0; font-weight: 700; color: var(--accent); }
.match-outcome { font-weight: 700; }
.share-panel { max-width: 100%; }
.share-panel summary { list-style: none; }
.share-panel summary::-webkit-details-marker { display: none; }
.share-fields { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; padding: 12px 0; max-width: 100%; }
.share-fields p { margin: 0; flex-basis: 100%; }
.share-fields .share-status:empty { display: none; }
.share-fields input { flex: 1 1 180px; min-width: 0; border: 1px solid var(--line); border-radius: 9px; font: inherit; color: var(--ink); background: #fff; padding: 10px; min-height: 46px; }

.catalog-heading, .game-navigation { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.catalog-heading { margin-bottom: 18px; }
.catalog-heading h2 { margin: 0; }
.game-navigation { margin-bottom: 16px; }
.game-navigation .quiz-back { margin-bottom: 0; }
.room-forms { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.room-form, .room-invite, .room-scores { background: #f8f4fd; border: 1px solid #e3d8f2; border-radius: 14px; padding: 15px; min-width: 0; }
.room-form h2, .room-scores h2 { font-size: 1.18rem; margin-bottom: 12px; }
.room-field { display: grid; gap: 4px; margin: 0 0 11px; font-weight: 700; font-size: .92rem; }
.room-field input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 42px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
.room-field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.room-invite, .room-scores { margin-bottom: 15px; }
.room-code { font-size: 2rem; font-weight: 700; letter-spacing: .14em; color: var(--accent); line-height: 1.3; margin-bottom: 11px; }
.room-status:empty { display: none; }
.room-status { padding: 11px 12px; border-radius: 9px; background: #f5effc; }
.room-scores ul { margin: 0; padding: 0; list-style: none; }
.room-scores li { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #e3d8f2; padding: 7px 0; overflow-wrap: anywhere; }
.room-option { cursor: default; }
.quiz-answers .picked { outline: 2px solid var(--accent); outline-offset: -2px; }
.room-page button:disabled { opacity: .68; cursor: default; }
@media (max-width: 580px) { .room-forms { grid-template-columns: 1fr; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero {
  min-height: 445px;
  border: 1px solid #342457;
  border-radius: 27px;
  background:
    radial-gradient(ellipse at 83% 47%, #6343a2 0, transparent 48%),
    linear-gradient(124deg, #171125 11%, #2b1d45 61%, #362657 100%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#d0b8f542 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(90deg, transparent 37%, #000 80%);
  pointer-events: none;
}
.hero h1 { color: #fff9ff; }
.hero h1 span { color: #e4ff8c; }
.hero .lede { color: #e3d8f2; }
.hero .note { color: #d6c6ed; }
.hero .primary { color: #22232b; background: #e4ff8c; border-color: #e4ff8c; }
.hero .primary:hover { background: #f0ffc4; }
.hero .secondary { color: #fff9ff; border-color: #8b72ab; }
.hero .secondary:hover { background: #4d376e; }
.hero :is(a,button):focus-visible { outline-color: #e4ff8c; }
.hero .motion { background: #281c40; color: #f6ecff; border-color: #8b72ab; }
.live-strip {
  margin-top: 16px;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
  background: #f1e9fc;
  border: 1px solid #ded0f2;
  border-radius: 16px;
}
.live-copy { display: flex; align-items: center; gap: 12px; }
.live-icon { flex: none; background: #ddcdf7; }
.live-strip h2 { font-size: 1.3rem; letter-spacing: -.038em; margin: 0 0 2px; }
.live-strip p { color: var(--muted); font-size: .89rem; }
.quick-join { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-join input {
  width: 136px;
  min-height: 46px;
  padding: 8px 11px;
  color: var(--ink);
  border-radius: 10px;
  border: 1px solid #bfb0dd;
  background: #fff;
  font: inherit;
  font-size: .90rem;
}
.quick-join input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.catalog-filters .btn { background: #fff; border-color: #e0d8eb; border-radius: 99px; min-height: 40px; padding: 7px 12px; }
.catalog-filters .btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.catalog-filters .btn:hover:not([aria-pressed="true"]) { background: #f0e8fb; }
.game { position: relative; padding: 12px 14px 14px; }
.game-cover {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 2 / 1;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #382151;
  background:
    radial-gradient(circle at 85% 20%, #ffffff48, transparent 53%),
    var(--cover);
}
.game-brain-riot { --cover: #e2faa3; --symbol: #263623; --tilt: -15deg; }
.game-worst-advice { --cover: #ebdfff; --symbol: #523476; --tilt: 12deg; }
.game-between-us { --cover: #ffdce8; --symbol: #742f52; --tilt: -14deg; }
.game-plot-twist { --cover: #d4ede9; --symbol: #244d52; --tilt: 16deg; }
.game-cover::before,.game-cover::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 77%;
  height: 50%;
  border: 1px solid currentColor;
  opacity: .36;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(var(--tilt));
  pointer-events: none;
}
.game-cover::after { width: 90%; height: 33%; transform: translate(-50%, -50%) rotate(calc(-1 * var(--tilt))); border-style: dashed; opacity: .24; }
.game-cover .game-picture {
  width: 56px;
  height: 56px;
  scale: 1.13;
  z-index: 1;
  transform: rotate(var(--tilt));
  background: #fff8;
  border-color: currentColor;
  color: var(--symbol);
  box-shadow: 4px 5px 0 #23153a22;
}
.game-cover .spark { width: 32px; height: 32px; }
.game-cover .talk, .game-cover .lens, .game-cover .pair { scale: 1.25; }
.game-cover .talk::after { background: #f5edff; }
.game:focus-within { border-color: #b19ad6; }
.game .tag { margin-top: 11px; }
.room-invite:has(.room-qr) { display: grid; grid-template-columns: minmax(0, 1fr) auto; place-items: start; gap: 4px 18px; }
.room-invite:has(.room-qr) .room-field { width: 100%; }
.room-qr {
  margin: 0;
  max-width: 164px;
  grid-column: 2;
  grid-row: 1 / span 3;
  padding: 5px 8px 8px;
  text-align: center;
  border: 1px solid #e3d8f2;
  border-radius: 11px;
  background: #fff;
}
.room-qr canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.room-qr figcaption { color: var(--muted); font-size: .78rem; line-height: 1.3; }
.room-ranking li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.rank-place { display: grid; place-items: center; width: 27px; height: 27px; font-weight: 700; border-radius: 8px; background: #efe7f9; }
.room-ranking [data-place="1"] .rank-place { background: #e4ff8c; color: #28331f; }
.room-ranking [data-place="2"] .rank-place { background: #e2d2fa; color: #42286c; }
.room-ranking [data-place="3"] .rank-place { background: #ffdce8; color: #6a2849; }
@media (max-width: 650px) {
  .hero { min-height: auto; }
  .hero-copy { padding-top: 33px; }
  .hero::before { mask-image: linear-gradient(180deg, transparent 32%, #000 82%); }
  .live-strip { padding: 14px 13px; }
  .quick-join { width: 100%; }
  .quick-join input { flex: 1 1 120px; min-width: 0; }
  .live-icon { width: 38px; height: 38px; }
}
@media (max-width: 470px) {
  .room-invite:has(.room-qr) { display: block; }
  .room-qr { margin: 12px 0 0; }
}

.create-quiz-link { margin-top: 15px; }
.create-quiz-link a { display: inline-block; }
#room-quiz-title { max-width: 100%; overflow-wrap: anywhere; }
.builder-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.builder-questions { display: grid; gap: 15px; margin-bottom: 17px; }
.builder-card, .builder-choices { min-width: 0; }
.builder-card { margin: 0; padding: 12px 14px; background: #f7f1fd; border: 1px solid #e3d8f2; border-radius: 13px; }
.builder-card > legend { font-weight: 700; padding-inline: 6px; }
.builder-choices { margin: 0; padding: 0; border: 0; }
.builder-choices > legend { font-size: .84rem; color: var(--muted); }
.builder-answer { display: flex; gap: 11px; align-items: center; }
.builder-answer .room-field { flex: 1; min-width: 0; }
.builder-answer input[type="radio"] { accent-color: var(--accent); width: 20px; height: 20px; flex: none; }
.builder-answer input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 500px) { .builder-details { grid-template-columns: 1fr; gap: 0; } }

.themed-heading { margin: 25px 0 13px; font-size: clamp(1.45rem, 4vw, 2rem); }
.pack-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.game-birthday-quiz { --cover:#ffdfbb; --symbol:#7c372e; --tilt:-14deg; }
.game-family-quiz { --cover:#dfedba; --symbol:#2d5431; --tilt:11deg; }
.game-movie-quiz { --cover:#dfdafa; --symbol:#382667; --tilt:-12deg; }
@media(max-width:790px) { .pack-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:540px) { .pack-grid { grid-template-columns:1fr; } }
