:root {
  --ink: #091630;
  --muted: #5d687b;
  --blue: #0a78ec;
  --lime: #c8f000;
  --coral: #ff6e50;
  --yellow: #ffc900;
  --paper: #fffdfa;
  --line: #e5e7eb;
  --soft: #f5f7fa;
  --radius: 20px;
  --shadow: 0 16px 50px rgba(19, 34, 58, 0.08);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
main {
  min-height: calc(100vh - 170px);
}
.site-header {
  height: 88px;
  padding: 0 clamp(22px, 4vw, 64px);
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 64px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}
.brand {
  font:
    bold 42px/1 "Libre Franklin",
    sans-serif;
  letter-spacing: -3px;
}
.brand span {
  color: var(--blue);
  font-size: 0.57em;
  letter-spacing: -1px;
}
.brand-small {
  font-size: 28px;
}
.main-nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 34px;
  margin: auto;
}
.main-nav a {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  color: #31394a;
  position: relative;
}
.main-nav a span {
  font-size: 19px;
  color: var(--blue);
}
.main-nav a.active:after {
  content: "";
  position: absolute;
  height: 3px;
  border-radius: 3px;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--blue);
}
.account-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.streak {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
}
.profile-menu {
  position: relative;
}
.profile-menu summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
}
.profile-menu summary::-webkit-details-marker {
  display: none;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.profile-name {
  font-weight: 600;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-popover {
  position: absolute;
  right: 0;
  top: 54px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  width: 210px;
  box-shadow: var(--shadow);
}
.profile-popover small {
  display: block;
  color: var(--muted);
  margin: 3px 0 12px;
}
.text-button,
.table-action {
  border: 0;
  background: none;
  color: var(--blue);
  padding: 0;
  font-weight: 700;
}
.nav-toggle {
  display: none;
  border: 0;
  background: none;
  font-size: 25px;
}
.flash {
  max-width: 1440px;
  margin: 16px auto -4px;
  padding: 13px 20px;
  border-radius: 12px;
}
.flash-success {
  background: #e9f9ef;
  color: #136b38;
}
.home-shell,
.page-shell,
.admin-shell {
  max-width: 1460px;
  margin: 0 auto;
  padding: 40px 34px 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(330px, 0.82fr);
  gap: 30px;
}
.hero-card {
  min-height: 460px;
  background: linear-gradient(135deg, #fffdf7, #fff9ee);
  border: 1px solid #e8dfd0;
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  position: relative;
}
.hero-copy {
  padding: 54px 0 48px 52px;
  position: relative;
  z-index: 2;
}
.eyebrow {
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  margin: 0 0 20px;
}
.hero-card h1,
.page-intro h1,
.auth-card h1,
.form-heading h1,
.result-card h1,
.error-page h1 {
  font:
    700 clamp(48px, 5vw, 72px) / 1.02 "Libre Franklin",
    sans-serif;
  letter-spacing: -3.5px;
  margin: 0;
}
.hero-lead {
  font-size: 18px;
  color: #3f4858;
  max-width: 590px;
  margin: 24px 0 30px;
}
.button {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 700;
  transition: 0.2s;
}
.button:hover {
  transform: translateY(-2px);
}
.button-primary {
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(157, 190, 0, 0.18);
}
.button-outline {
  border-color: #cdd3dc;
  background: white;
}
.button-yellow {
  background: var(--yellow);
  min-width: 220px;
  border: 0;
}
.button-small {
  min-height: 40px;
  padding: 0 16px;
}
.play-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.hero-art {
  position: relative;
  min-height: 430px;
}
.globe {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  top: 68px;
  right: 56px;
  background: radial-gradient(
    circle at 35% 25%,
    #e5f4ff 0 18%,
    #78b5eb 19% 45%,
    #2674b8 46% 100%
  );
  box-shadow:
    inset -20px -16px 40px rgba(4, 60, 115, 0.2),
    0 20px 40px rgba(29, 91, 147, 0.16);
  display: grid;
  place-items: center;
  color: white;
  font-size: 11px;
  letter-spacing: 2px;
  overflow: hidden;
}
.globe:before,
.globe:after {
  content: "";
  position: absolute;
  background: #e9e0bd;
  border-radius: 48% 52% 40% 60%;
  transform: rotate(20deg);
}
.globe:before {
  width: 80px;
  height: 110px;
  left: 42px;
  top: 5px;
}
.globe:after {
  width: 105px;
  height: 62px;
  right: -20px;
  bottom: 20px;
}
.globe span {
  z-index: 2;
}
.orbit {
  position: absolute;
  border: 7px solid var(--lime);
  border-radius: 50%;
  transform: rotate(-13deg);
  z-index: 2;
}
.orbit-one {
  width: 275px;
  height: 80px;
  top: 145px;
  right: 27px;
  border-left-color: transparent;
  border-bottom-color: transparent;
}
.news-paper {
  position: absolute;
  width: 200px;
  height: 155px;
  background: #f4f0e8;
  right: 68px;
  bottom: 42px;
  z-index: 5;
  transform: rotate(-7deg);
  padding: 19px;
  box-shadow: 0 16px 30px rgba(30, 37, 47, 0.25);
}
.news-paper strong {
  font: 700 23px/1 "Libre Franklin";
  display: block;
  border-bottom: 2px solid #777;
  padding-bottom: 9px;
}
.news-paper span {
  display: block;
  height: 5px;
  background: #aaa;
  margin-top: 8px;
  width: 95%;
}
.news-paper span:nth-child(3) {
  width: 70%;
}
.art-blob {
  position: absolute;
  width: 170px;
  height: 150px;
  border-radius: 55% 45% 38% 62%;
  background: var(--coral);
  right: 18px;
  bottom: 22px;
}
.question-bubble {
  position: absolute;
  width: 55px;
  height: 48px;
  border-radius: 14px 14px 14px 4px;
  background: var(--lime);
  font-size: 30px;
  display: grid;
  place-items: center;
  top: 52px;
  left: 26px;
  z-index: 4;
}
.streak-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 5px 25px rgba(30, 40, 55, 0.03);
  overflow: hidden;
}
.streak-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px 5px;
}
.streak-heading h2 {
  margin: 0;
  font-size: 22px;
}
.fire {
  font-size: 25px;
  background: #fff3e8;
  padding: 10px;
  border-radius: 50%;
}
.streak-main {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 30px;
}
.streak-main p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 14px;
}
.streak-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(var(--lime) 0 74%, #edf0f2 74%);
  display: grid;
  place-items: center;
  position: relative;
}
.streak-ring:before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: white;
}
.streak-ring strong {
  font-size: 36px;
  z-index: 1;
}
.week {
  display: flex;
  justify-content: space-between;
  padding: 15px 31px 25px;
}
.week span {
  display: grid;
  gap: 7px;
  text-align: center;
  font-size: 12px;
}
.week i {
  font-style: normal;
  width: 25px;
  height: 25px;
  border: 1px dashed #aeb6c2;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.week span:nth-child(-n + 5) i {
  border: 0;
  background: var(--lime);
}
.points-row {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 17px 28px;
  gap: 12px;
}
.points-star {
  font-size: 29px;
  color: var(--blue);
}
.points-row small,
.points-row strong {
  display: block;
}
.points-row > div > strong {
  font-size: 25px;
}
.ranking {
  margin-left: auto;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.ranking strong {
  font-size: 14px !important;
}
.card-link {
  border-top: 1px solid var(--line);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  color: var(--blue);
  font-weight: 600;
}
.guest-streak {
  padding: 15px 32px 32px;
  text-align: center;
}
.guest-streak .streak-ring {
  margin: 0 auto 15px;
}
.guest-streak p {
  color: var(--muted);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 48px 10px 20px;
}
.section-heading h2 {
  font-size: 26px;
  margin: 0;
}
.section-heading .eyebrow {
  margin-bottom: 5px;
}
.section-heading > a {
  font-weight: 600;
  color: #3d4654;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.news-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card-visual {
  height: 160px;
  border-radius: 13px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.visual-blue {
  background: linear-gradient(145deg, #07182b, #1768a6);
}
.visual-lime {
  background: linear-gradient(145deg, #cde7cc, #4b926b);
}
.visual-coral {
  background: linear-gradient(145deg, #b9dcf5, #f18d65);
}
.visual-pink {
  background: linear-gradient(145deg, #dad9ed, #b6859c);
}
.category-pill {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px 10px;
  border-radius: 7px;
  text-transform: uppercase;
  color: #e45243;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.visual-icon {
  font-size: 70px;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.2));
  z-index: 1;
}
.visual-lines {
  position: absolute;
  width: 170%;
  height: 90px;
  border-top: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  bottom: -45px;
  transform: rotate(-7deg);
}
.news-content {
  padding: 14px 10px 6px;
  min-height: 130px;
}
.news-content h3 {
  font-size: 20px;
  margin: 0 0 7px;
}
.news-content p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.news-meta {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  font-size: 12px;
  color: #4f5868;
}
.meta-points {
  color: #e96143;
}
.card-progress {
  height: 4px;
  background: #eef0f2;
  border-radius: 3px;
  margin: 4px 10px 8px;
}
.card-progress i {
  height: 100%;
  display: block;
  border-radius: 3px;
  background: var(--blue);
}
.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px clamp(25px, 5vw, 70px);
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
}
.site-footer p {
  margin-right: auto;
}
.site-footer nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
}
.page-intro {
  max-width: 800px;
  padding: 30px 0 42px;
}
.page-intro h1 {
  font-size: 54px;
}
.page-intro > p:last-child {
  font-size: 19px;
  color: var(--muted);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}
.feature-card {
  min-height: 240px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  gap: 25px;
  align-items: flex-start;
}
.feature-number {
  font: 700 50px/1 "Libre Franklin";
  color: #dbe1e9;
}
.feature-card small {
  color: var(--blue);
  font-weight: 700;
}
.feature-card h2 {
  font-size: 28px;
  margin: 8px 0;
}
.feature-card p {
  color: var(--muted);
  margin: 0 0 20px;
}
.topic-list {
  display: grid;
  gap: 16px;
}
.topic-list article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.topic-icon {
  width: 100px;
  height: 100px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 44px;
}
.topic-list small {
  color: var(--blue);
  font-weight: 700;
}
.topic-list h2 {
  margin: 2px 0;
}
.topic-list p {
  margin: 0;
  color: var(--muted);
}
.topic-list > a,
.topic-list article > a {
  margin-left: auto;
  color: var(--blue);
  font-weight: 700;
}
.auth-page,
.result-page,
.error-page {
  min-height: 680px;
  display: grid;
  place-items: center;
  padding: 60px 20px;
  background:
    radial-gradient(circle at 75% 15%, #eef8ff, transparent 32%),
    radial-gradient(circle at 20% 85%, #f4fbd8, transparent 30%);
}
.auth-card,
.result-card,
.error-page > div {
  width: min(520px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 45px;
  box-shadow: var(--shadow);
}
.auth-card h1,
.result-card h1,
.error-page h1 {
  font-size: 50px;
}
.auth-card > p,
.form-heading > p:last-child {
  color: var(--muted);
}
.stack-form {
  display: grid;
  gap: 16px;
  margin-top: 25px;
}
.stack-form label,
.content-form label {
  font-size: 14px;
  font-weight: 700;
  display: grid;
  gap: 7px;
}
.stack-form input,
.stack-form select,
.content-form input,
.content-form select,
.content-form textarea {
  width: 100%;
  border: 1px solid #ccd3dd;
  border-radius: 10px;
  padding: 12px 13px;
  background: white;
  outline: none;
}
.stack-form input:focus,
.content-form input:focus,
.content-form select:focus,
.content-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(10, 120, 236, 0.12);
}
.form-error {
  background: #fff0ed;
  color: #9d281c;
  border-radius: 10px;
  padding: 12px;
}
.demo-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}
.demo-note summary {
  cursor: pointer;
  color: var(--blue);
}
.quiz-page {
  max-width: 1500px;
  margin: auto;
  padding: 28px 32px 70px;
}
.quiz-top {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.quiz-top .category-pill {
  position: static;
  background: #e5f4f6;
  color: #176979;
}
.quiz-progress {
  text-align: center;
  flex: 1;
  max-width: 430px;
}
.quiz-progress span {
  height: 4px;
  background: #e3e7ec;
  display: block;
  margin-top: 8px;
  border-radius: 4px;
}
.quiz-progress i {
  display: block;
  width: 22%;
  height: 100%;
  background: #1290a0;
}
.quiz-points {
  color: #c18c00;
}
.quiz-layout {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: white;
}
.briefing-card {
  border-right: 1px solid var(--line);
  padding: 28px;
}
.briefing-visual {
  height: 300px;
  border-radius: 16px;
  display: grid;
  place-items: center;
}
.briefing-visual span {
  font-size: 120px;
  filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.3));
}
.briefing-copy {
  padding: 25px 15px 10px;
}
.briefing-copy h1 {
  font: 700 42px/1.08 "Libre Franklin";
  letter-spacing: -2px;
  margin: 0 0 18px;
}
.briefing-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
}
.source-line {
  display: flex;
  gap: 20px;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.source-line span:first-child {
  color: #167254;
}
.question-card {
  padding: 50px 45px 30px;
}
.question-card h2 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 28px;
}
.answer-list {
  display: grid;
  gap: 14px;
}
.answer-option {
  border: 1px solid #d6dce4;
  border-radius: 13px;
  min-height: 82px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: 0.18s;
}
.answer-option:hover {
  border-color: var(--yellow);
  background: #fffdf5;
}
.answer-option input {
  position: absolute;
  opacity: 0;
}
.answer-letter {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #f2f4f6;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 700;
  flex: none;
}
.answer-option i {
  font-style: normal;
  margin-left: auto;
  color: transparent;
}
.answer-option:has(input:checked) {
  border-color: #edb900;
  background: #fffaf0;
}
.answer-option:has(input:checked) .answer-letter {
  background: var(--yellow);
}
.answer-option:has(input:checked) i {
  color: #d9aa00;
}
.question-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  color: var(--muted);
  font-size: 14px;
}
.result-card {
  text-align: center;
}
.result-icon,
.error-page > div > span {
  margin: auto;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fff2d0;
  color: #9a7000;
  font-size: 40px;
  display: grid;
  place-items: center;
}
.result-card.is-correct .result-icon {
  background: #e9fbd5;
  color: #4b7200;
}
.result-card .eyebrow,
.error-page .eyebrow {
  margin-top: 25px;
}
.result-lead {
  color: var(--muted);
  font-size: 18px;
}
.result-points strong,
.result-points span {
  display: block;
}
.result-points strong {
  font-size: 40px;
  color: var(--blue);
}
.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}
.error-page > div {
  text-align: center;
}
.error-page > div > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 28px;
}
.admin-shell {
  max-width: 1550px;
}
.admin-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 15px 0 35px;
}
.admin-heading h1,
.form-heading h1 {
  font: 700 50px/1 "Libre Franklin";
  letter-spacing: -2px;
  margin: 0;
}
.admin-heading p {
  color: var(--muted);
  margin: 8px 0 0;
}
.admin-heading > div:last-child {
  display: flex;
  gap: 10px;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.admin-stats article,
.role-cards article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.admin-stats span,
.admin-stats small {
  display: block;
  color: var(--muted);
}
.admin-stats strong {
  display: block;
  font-size: 34px;
}
.admin-stats .role-stat {
  font-size: 22px;
  margin: 8px 0;
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
}
.panel-heading h2 {
  margin: 0;
  font-size: 21px;
}
.panel-heading a {
  color: var(--blue);
  font-weight: 700;
  font-size: 14px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid #eef0f2;
  font-size: 14px;
}
th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}
.status-published {
  background: #e5f7ea;
  color: #22703c;
}
.status-draft {
  background: #f1f2f4;
  color: #656d79;
}
.role-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.role-cards h2 {
  font-size: 20px;
  margin: 14px 0 6px;
}
.role-cards p {
  color: var(--muted);
  font-size: 14px;
  min-height: 64px;
}
.role-cards > article > strong {
  color: var(--blue);
  font-size: 13px;
}
.role-icon {
  width: 45px;
  height: 45px;
  background: #edf6ff;
  color: var(--blue);
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.users-grid {
  grid-template-columns: 1.6fr 0.65fr;
}
.inline-role-form {
  display: flex;
  gap: 6px;
}
.inline-role-form select {
  max-width: 180px;
  border: 1px solid #d1d6de;
  border-radius: 8px;
  padding: 7px;
}
.inline-role-form button {
  border: 0;
  background: #edf5ff;
  color: var(--blue);
  border-radius: 8px;
  font-weight: 700;
}
.create-user .stack-form {
  padding: 0 22px 24px;
}
.form-page {
  max-width: 1000px;
  margin: auto;
  padding: 55px 30px 90px;
}
.form-heading {
  margin-bottom: 30px;
}
.form-heading > a {
  display: inline-block;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 35px;
}
.content-form {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.content-form .wide {
  grid-column: 1/-1;
}
.content-form .check-row {
  display: flex;
  align-items: center;
  grid-column: 1/-1;
}
.content-form .check-row input {
  width: auto;
}
.form-actions {
  grid-column: 1/-1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.option-field {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}
.option-field span {
  width: 34px;
  height: 34px;
  background: #f1f3f6;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}
@media (max-width: 1100px) {
  .main-nav {
    gap: 18px;
  }
  .main-nav a {
    font-size: 14px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-card {
    grid-template-columns: 1fr 380px;
  }
  .streak-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .streak-heading {
    grid-column: 1/-1;
  }
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quiz-layout {
    grid-template-columns: 1fr;
  }
  .briefing-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .admin-grid,
  .users-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 800px) {
  .site-header {
    height: 72px;
    padding: 0 20px;
    gap: 14px;
  }
  .brand {
    font-size: 32px;
  }
  .nav-toggle {
    display: block;
    margin-left: auto;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--line);
    height: auto;
    align-items: stretch;
  }
  .main-nav.open {
    display: grid;
    gap: 0;
  }
  .main-nav a {
    padding: 12px;
    height: auto;
  }
  .main-nav a.active:after {
    display: none;
  }
  .streak,
  .profile-name {
    display: none;
  }
  .hero-card {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    padding: 40px 28px;
  }
  .hero-art {
    min-height: 360px;
  }
  .hero-card h1 {
    font-size: 49px;
  }
  .streak-card {
    display: block;
  }
  .news-grid,
  .feature-grid,
  .role-cards,
  .admin-stats {
    grid-template-columns: 1fr;
  }
  .home-shell,
  .page-shell,
  .admin-shell {
    padding: 25px 18px 60px;
  }
  .section-heading {
    margin-top: 34px;
  }
  .site-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .site-footer nav {
    width: 100%;
    flex-wrap: wrap;
  }
  .quiz-page {
    padding: 15px;
  }
  .quiz-points {
    display: none;
  }
  .question-card {
    padding: 30px 20px;
  }
  .question-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }
  .briefing-card {
    padding: 15px;
  }
  .briefing-visual {
    height: 210px;
  }
  .briefing-copy h1 {
    font-size: 34px;
  }
  .content-form {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .content-form label {
    grid-column: 1 !important;
  }
  .admin-heading {
    align-items: flex-start;
    gap: 22px;
    flex-direction: column;
  }
  .table-wrap {
    margin-bottom: 4px;
  }
  .page-intro h1 {
    font-size: 45px;
  }
}

/* Adventure asset catalog and focused editor workspaces v0.20.0 */
.adventure-tile.tile-asset-rendered,
.adventure-scene-grid > button.tile-asset-rendered,
[data-tile-swatch].tile-asset-rendered,
[data-catalog-preview].tile-asset-rendered,
[data-selected-tile-preview].tile-asset-rendered {
  background-color: var(--tile-primary, #82bf74) !important;
}
.tile-asset-rendered[data-tile-pattern="solid"] {
  background-image: none;
}
.tile-asset-rendered[data-tile-pattern="grass"] {
  background-image: linear-gradient(135deg, var(--tile-primary) 0 46%, var(--tile-secondary) 47% 53%, var(--tile-primary) 54%) !important;
}
.tile-asset-rendered[data-tile-pattern="waves"] {
  background-image: repeating-radial-gradient(ellipse at 50% 115%, var(--tile-secondary) 0 8%, var(--tile-primary) 9% 18%) !important;
  background-size: var(--tile-scale) calc(var(--tile-scale) * .55) !important;
}
.tile-asset-rendered[data-tile-pattern="planks"] {
  background-image: repeating-linear-gradient(90deg, var(--tile-secondary) 0 4%, var(--tile-primary) 5% 22%) !important;
  background-size: var(--tile-scale) 100% !important;
}
.tile-asset-rendered[data-tile-pattern="bricks"] {
  background-image: linear-gradient(335deg, var(--tile-secondary) 5px, transparent 5px), linear-gradient(155deg, var(--tile-secondary) 5px, transparent 5px), linear-gradient(335deg, var(--tile-secondary) 5px, transparent 5px), linear-gradient(155deg, var(--tile-secondary) 5px, transparent 5px) !important;
  background-position: 0 0, 2px 8px, 10px 9px, 12px 17px !important;
  background-size: 20px 18px !important;
}
.tile-asset-rendered[data-tile-pattern="cobble"] {
  background-image: radial-gradient(ellipse at 25% 40%, var(--tile-secondary) 0 23%, transparent 25%), radial-gradient(ellipse at 75% 60%, var(--tile-secondary) 0 23%, transparent 25%) !important;
  background-size: var(--tile-scale) var(--tile-scale) !important;
}
.tile-asset-rendered[data-tile-pattern="foliage"] {
  background-image: radial-gradient(circle at 35% 35%, var(--tile-secondary) 0 20%, transparent 22%), radial-gradient(circle at 66% 45%, var(--tile-primary) 0 27%, transparent 29%), radial-gradient(circle at 46% 72%, var(--tile-secondary) 0 25%, transparent 27%) !important;
}
.tile-asset-rendered[data-tile-pattern="grid"] {
  background-image: linear-gradient(var(--tile-secondary) 1px, transparent 1px), linear-gradient(90deg, var(--tile-secondary) 1px, transparent 1px) !important;
  background-size: var(--tile-scale) var(--tile-scale) !important;
}
.tile-asset-rendered[data-custom-art="true"] {
  image-rendering: pixelated;
  background-position: center !important;
}
.adventure-tile[data-tile="b"][data-custom-art="true"]:before,
.adventure-tile[data-tile="b"][data-custom-art="true"]:after {
  display: none;
}
.plugin-adventure.adventure-immersive-stage {
  border: var(--adventure-frame-width, 0) solid var(--adventure-frame-border, transparent);
  border-radius: var(--adventure-frame-radius, 0);
  background-color: var(--adventure-frame, #0b243b);
  background-image: var(--adventure-frame-image, none);
  background-size: cover;
  overflow: hidden;
}
.plugin-adventure .adventure-board {
  border-color: var(--adventure-frame, #071426);
  border-radius: var(--adventure-frame-radius, 10px);
  background-color: var(--adventure-board, var(--adventure-grass, #82bf74));
  background-image: var(--adventure-board-image, none);
  background-size: cover;
}
.plugin-adventure .adventure-hud {
  border-radius: var(--adventure-frame-radius, 9px);
  background: var(--adventure-hud-bg, #fff9e8);
  color: var(--adventure-hud-text, #173854);
}
.plugin-adventure .adventure-hud strong,
.plugin-adventure .adventure-hud em {
  color: var(--adventure-hud-accent, #0a78ec);
}
.plugin-adventure .adventure-speech {
  border-radius: var(--adventure-dialog-radius, 18px);
  background: var(--adventure-dialog-bg, #fffef4);
  color: var(--adventure-dialog-text, #071426);
  border-color: var(--adventure-dialog-accent, #ef5b4c);
}
.adventure-sprite {
  scale: var(--sprite-scale, 1);
}
.adventure-sprite.has-sprite-image {
  overflow: visible;
  border: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
}
.adventure-sprite.has-sprite-image > * {
  display: none !important;
}
.adventure-scene-grid > button > span.has-editor-sprite {
  inset: 8%;
  scale: var(--editor-sprite-scale, 1);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 2px 2px rgba(7,20,38,.35));
}
.adventure-sprite[data-sprite-shape="circle"] {
  border-radius: 50%;
}
.adventure-sprite[data-sprite-shape="square"] {
  border-radius: 8px;
}
.adventure-portal {
  scale: var(--portal-scale, 1);
  color: var(--portal-color, #d7ff00);
}
.adventure-portal.has-portal-image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.adventure-portal.has-portal-image > b {
  opacity: 0;
}
.runtime-controls.adventure-gamepad-controls {
  background: var(--gamepad-bg, #071426) !important;
  color: var(--gamepad-text, #fff);
}
.runtime-controls.adventure-gamepad-controls .adventure-dpad button,
.runtime-controls.adventure-gamepad-controls .adventure-face-buttons button {
  background: var(--gamepad-button, #173854) !important;
  color: var(--gamepad-text, #fff) !important;
}
.runtime-controls.adventure-gamepad-controls .adventure-face-buttons .button-a {
  background: var(--gamepad-action, #e66251) !important;
}
.runtime-controls[data-gamepad-preset="arcade"] .adventure-dpad button,
.runtime-controls[data-gamepad-preset="arcade"] .adventure-face-buttons button {
  border-radius: 8px !important;
}
.runtime-controls[data-gamepad-preset="playstation"] .adventure-face-buttons button {
  border-radius: 50% !important;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.3), 0 5px 12px rgba(0,0,0,.28) !important;
}
.runtime-controls[data-gamepad-preset="minimal"] .adventure-control-help {
  display: none;
}
.runtime-controls[data-gamepad-preset="minimal"] .adventure-dpad button,
.runtime-controls[data-gamepad-preset="minimal"] .adventure-face-buttons button {
  box-shadow: none !important;
}
.adventure-editor-tools > [data-terrain-tools] {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.adventure-editor-tools [data-terrain-tools] button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
[data-tile-swatch],
[data-catalog-preview],
[data-selected-tile-preview] {
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 7px;
  overflow: hidden;
}
.tile-catalog-layout {
  display: grid;
  grid-template-columns: minmax(190px, .36fr) minmax(0, 1fr);
  gap: 12px;
  padding: 0 12px 12px;
}
.tile-catalog-list {
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: 680px;
  overflow: auto;
}
.tile-catalog-list > button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid #d9e1ea;
  border-radius: 10px;
  background: #fff;
  padding: 7px;
  text-align: left;
}
.tile-catalog-list > button.active {
  border-color: #0a78ec;
  box-shadow: 0 0 0 2px rgba(10,120,236,.14);
}
.tile-catalog-list span,
.tile-catalog-list b,
.tile-catalog-list small {
  display: block;
  min-width: 0;
}
.tile-catalog-list small {
  color: #69788d;
}
.tile-asset-inspector {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}
.tile-asset-inspector > header {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.tile-asset-inspector [data-selected-tile-preview] {
  width: 52px;
  height: 52px;
}
.tile-asset-inspector header small {
  display: block;
  color: #69788d;
}
.tile-property-grid,
.adventure-design-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.tile-property-grid label,
.adventure-design-grid label {
  display: grid;
  gap: 4px;
  color: #445269;
  font-size: 11px;
  font-weight: 750;
}
.tile-collision-editor,
.adventure-design-grid fieldset {
  border: 1px solid #d9e1ea;
  border-radius: 10px;
  padding: 10px;
}
.tile-collision-editor legend,
.adventure-design-grid legend {
  color: #173854;
  font-weight: 850;
}
.tile-pixel-studio {
  display: grid;
  gap: 9px;
  border-radius: 12px;
  background: #f3f6f9;
  padding: 10px;
}
.tile-pixel-studio > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.tile-pixel-studio small {
  display: block;
  color: #69788d;
}
.tile-palette {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.tile-palette label {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 8px;
}
.tile-palette label.active,
.tile-palette button.active {
  border-color: #0a78ec;
}
.tile-palette input,
.tile-palette button {
  width: 28px;
  height: 28px;
  min-height: 0;
  border: 1px solid #b9c5d2;
  border-radius: 6px;
  background: var(--palette, #fff);
  padding: 0;
}
.tile-pixel-canvas {
  display: grid;
  grid-template-columns: repeat(16, minmax(9px, 1fr));
  width: min(100%, 480px);
  aspect-ratio: 1;
  gap: 1px;
  background: #b9c5d2;
  touch-action: none;
}
.tile-pixel-canvas > button {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background-color: var(--pixel, transparent);
  background-image: linear-gradient(45deg, #eef1f4 25%, transparent 25%), linear-gradient(-45deg, #eef1f4 25%, transparent 25%);
  background-size: 6px 6px;
  padding: 0;
}
.tile-asset-inspector > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.adventure-design-presets {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 0 12px 10px;
}
.adventure-design-preview {
  padding: 0 12px 12px;
}
.adventure-design-preview > div {
  overflow: hidden;
  border: 4px solid var(--preview-border);
  border-radius: var(--preview-radius);
  background: var(--preview-frame);
  padding: 8px;
}
.adventure-design-preview header,
.adventure-design-preview footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-radius: 7px;
  background: var(--preview-hud);
  color: var(--preview-hud-text);
  padding: 8px;
}
.adventure-design-preview main {
  min-height: 110px;
  display: grid;
  place-items: center;
  background: var(--preview-board);
  color: rgba(7,20,38,.55);
  font-weight: 900;
}
.adventure-design-preview footer {
  justify-content: flex-end;
  background: var(--preview-control);
}
.adventure-design-preview footer i,
.adventure-design-preview footer b {
  border-radius: 999px;
  background: var(--preview-button);
  color: #fff;
  padding: 7px 10px;
}
.adventure-design-preview footer b:last-child {
  background: var(--preview-action);
}
.adventure-design-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 12px 12px;
}
.adventure-design-grid fieldset {
  display: grid;
  align-content: start;
  gap: 8px;
}
@media (max-width: 900px) {
  .tile-catalog-layout,
  .adventure-design-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .hero-art {
    display: none;
  }
  .hero-card {
    min-height: auto;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .streak-main {
    padding: 10px 20px;
  }
  .week {
    padding: 15px 20px;
  }
  .site-footer p {
    width: 100%;
    margin: 0;
  }
  .quiz-top {
    gap: 10px;
  }
  .quiz-progress {
    font-size: 13px;
  }
  .question-card h2 {
    font-size: 24px;
  }
  .answer-option {
    padding: 10px;
  }
  .result-actions {
    flex-direction: column;
  }
  .auth-card,
  .result-card,
  .error-page > div {
    padding: 32px 22px;
  }
  .role-cards article p {
    min-height: 0;
  }
}

.custom-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 45px 30px 100px;
}
.custom-page-wide {
  max-width: 1460px;
}
.custom-page-compact {
  max-width: 780px;
}
.page-block {
  margin: 0 0 24px;
}
.block-inner {
  padding: 20px;
}
.page-block-hero .block-inner {
  padding: clamp(45px, 7vw, 95px);
  border-radius: 24px;
  background: #f4f7fb;
}
.page-block-hero.background-blue .block-inner {
  background: #e6f2ff;
}
.page-block-hero.background-dark .block-inner {
  background: #101d35;
  color: white;
}
.page-block-hero.background-lime .block-inner {
  background: var(--lime);
}
.page-block-hero h1 {
  font: 700 clamp(45px, 7vw, 82px) / 1.02 "Libre Franklin";
  letter-spacing: -3.5px;
  margin: 0;
  max-width: 1000px;
}
.page-block-hero.align-center .block-inner,
.page-block-heading.align-center,
.page-block-text.align-center {
  text-align: center;
}
.page-block-hero.align-center h1,
.page-block-hero.align-center .block-lead {
  margin-left: auto;
  margin-right: auto;
}
.block-lead {
  font-size: 20px;
  color: inherit;
  opacity: 0.82;
  max-width: 760px;
  margin: 22px 0 28px;
}
.page-block-heading h2,
.page-block-heading h3,
.page-block-heading h4,
.page-block-video h2,
.page-block-links h2,
.page-block-carousel h2,
.page-block-latest_articles h2,
.page-block-latest_quizzes h2 {
  font: 700 clamp(28px, 4vw, 46px) / 1.1 "Libre Franklin";
  letter-spacing: -1.5px;
  margin: 0;
}
.rich-text {
  font-size: 18px;
  line-height: 1.8;
  color: #354052;
}
.rich-text p {
  margin: 0 0 20px;
}
.page-block-callout .block-inner {
  border-radius: 16px;
  border: 1px solid #c7def5;
  background: #eef7ff;
}
.page-block-callout.tone-lime .block-inner {
  background: #f3fad6;
  border-color: #d8eb8a;
}
.page-block-callout.tone-coral .block-inner {
  background: #fff0ec;
  border-color: #ffc6b9;
}
.page-block-callout.tone-neutral .block-inner {
  background: #f5f6f8;
  border-color: #dfe2e7;
}
.page-block-callout strong {
  font-size: 20px;
}
.page-block-callout p {
  margin: 7px 0 0;
  color: var(--muted);
}
.page-block-image figure {
  margin: 0;
}
.page-block-image img {
  display: block;
  width: 100%;
  max-height: 720px;
  border-radius: 18px;
  background: #edf0f4;
}
.page-block-image img.fit-cover {
  object-fit: cover;
}
.page-block-image img.fit-contain {
  object-fit: contain;
}
.page-block-image figcaption,
.media-caption {
  font-size: 13px;
  color: var(--muted);
  margin: 9px 4px;
}
.video-frame {
  position: relative;
  aspect-ratio: 16/9;
  background: #071426;
  border-radius: 18px;
  overflow: hidden;
  margin-top: 18px;
}
.video-frame iframe,
.video-frame video {
  border: 0;
  width: 100%;
  height: 100%;
}
.builder-link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.builder-link {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  background: white;
}
.builder-link:hover {
  border-color: var(--blue);
}
.builder-link p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.builder-link > span {
  color: var(--blue);
  font-size: 22px;
}
.builder-link-text {
  border-color: transparent;
  padding-left: 0;
}
.builder-columns {
  display: grid;
  grid-template-columns: repeat(var(--columns), 1fr);
  gap: 18px;
}
.builder-columns > div {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  padding: 25px;
  min-width: 0;
}
.builder-columns h3 {
  font-size: 23px;
  margin: 0 0 10px;
}
.builder-columns p {
  color: var(--muted);
}
.builder-columns a,
.builder-carousel a,
.dynamic-card-grid a {
  color: var(--blue);
  font-weight: 700;
}
.carousel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.carousel-heading button {
  border: 1px solid var(--line);
  background: white;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 18px;
  margin-left: 6px;
}
.builder-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 36%);
  gap: 15px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 12px;
}
.builder-carousel > article {
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: hidden;
  background: white;
}
.builder-carousel img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.builder-carousel article > div {
  padding: 20px;
}
.builder-carousel h3 {
  margin: 0;
}
.builder-carousel p {
  color: var(--muted);
}
.dynamic-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 20px;
}
.dynamic-card-grid article {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  background: white;
}
.dynamic-card-grid article > span {
  font-size: 35px;
}
.dynamic-card-grid small {
  display: block;
  color: var(--blue);
  font-weight: 700;
  margin: 10px 0 5px;
}
.dynamic-card-grid h3 {
  font-size: 19px;
  margin: 0 0 8px;
}
.dynamic-card-grid p {
  font-size: 14px;
  color: var(--muted);
}
.page-block-divider hr {
  border: 0;
  border-top: 1px solid var(--line);
}
.builder-spacer.spacer-small {
  height: 20px;
}
.builder-spacer.spacer-medium {
  height: 55px;
}
.builder-spacer.spacer-large {
  height: 110px;
}
.builder-preview-bar {
  position: sticky;
  top: 88px;
  z-index: 12;
  background: #101d35;
  color: white;
  padding: 12px 5vw;
  display: flex;
  gap: 18px;
  align-items: center;
}
.builder-preview-bar span {
  color: #b9c4d4;
}
.builder-preview-bar a {
  margin-left: auto;
  color: #d9ff54;
  font-weight: 800;
}
@media (max-width: 900px) {
  .builder-columns {
    grid-template-columns: 1fr 1fr;
  }
  .dynamic-card-grid {
    grid-template-columns: 1fr 1fr;
  }
  .builder-carousel {
    grid-auto-columns: 70%;
  }
}
@media (max-width: 600px) {
  .custom-page {
    padding: 24px 12px 70px;
  }
  .block-inner {
    padding: 15px;
  }
  .page-block-hero .block-inner {
    padding: 40px 24px;
  }
  .builder-link-grid,
  .builder-columns,
  .dynamic-card-grid {
    grid-template-columns: 1fr;
  }
  .builder-carousel {
    grid-auto-columns: 88%;
  }
  .builder-preview-bar {
    top: 72px;
    flex-wrap: wrap;
  }
  .builder-preview-bar span {
    display: none;
  }
}

/* Unified visual page system v0.4 */
.custom-page {
  max-width: none;
  padding: 0 0 100px;
}
.custom-page > .page-section {
  margin-inline: auto;
}
.page-section {
  --section-max: 1180px;
}
.page-section.section-width-standard {
  max-width: 1180px;
}
.page-section.section-width-wide {
  max-width: 1480px;
}
.page-section.section-width-full {
  max-width: none;
}
.page-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}
.section-layout-2 .page-section-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.section-layout-2-left .page-section-grid {
  grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
}
.section-layout-2-right .page-section-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
}
.section-layout-3 .page-section-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.section-gap-small .page-section-grid {
  gap: 10px;
}
.section-gap-medium .page-section-grid {
  gap: 22px;
}
.section-gap-large .page-section-grid {
  gap: 42px;
}
.section-padding-none {
  padding: 0;
}
.section-padding-small {
  padding: 18px clamp(14px, 3vw, 34px);
}
.section-padding-medium {
  padding: 38px clamp(14px, 4vw, 55px);
}
.section-padding-large {
  padding: 75px clamp(14px, 5vw, 80px);
}
.section-bg-white {
  background: #fff;
}
.section-bg-soft {
  background: #f4f7fb;
}
.section-bg-blue {
  background: #e6f2ff;
}
.section-bg-dark {
  background: #101d35;
  color: #fff;
}
.section-bg-lime {
  background: var(--lime);
}
.page-section.align-center .page-section-grid {
  align-items: center;
}
.page-section.align-end .page-section-grid {
  align-items: end;
}
.page-section-column {
  min-width: 0;
}
.page-section-column > .page-block {
  margin: 0 0 18px;
}
.page-block > .block-inner {
  padding: 20px;
}
.page-section-column > .page-block:last-child {
  margin-bottom: 0;
}
.page-block-button .button-align-center {
  text-align: center;
}
.page-block-button .button-align-right {
  text-align: right;
}
.button-text {
  background: transparent;
  color: var(--blue);
  padding-inline: 0;
}
.page-block-quote blockquote {
  margin: 0;
  padding: 36px;
  border-left: 5px solid var(--blue);
  background: #f4f8fd;
  border-radius: 0 18px 18px 0;
}
.page-block-quote blockquote p {
  font: 600 clamp(23px, 3vw, 38px) / 1.35 "Libre Franklin";
  margin: 0;
}
.page-block-quote footer {
  display: grid;
  margin-top: 20px;
}
.page-block-quote footer span {
  color: var(--muted);
  font-size: 14px;
}
.builder-gallery {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.gallery-columns-2 {
  grid-template-columns: repeat(2, 1fr);
}
.gallery-columns-3 {
  grid-template-columns: repeat(3, 1fr);
}
.gallery-columns-4 {
  grid-template-columns: repeat(4, 1fr);
}
.builder-gallery figure {
  margin: 0;
}
.builder-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 14px;
}
.ratio-16-9 {
  aspect-ratio: 16/9;
}
.ratio-4-3 {
  aspect-ratio: 4/3;
}
.ratio-1-1 {
  aspect-ratio: 1;
}
.ratio-auto {
  aspect-ratio: auto;
}
.media-card,
.file-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.media-card audio {
  width: 100%;
  margin-top: 12px;
}
.file-card {
  display: flex;
  gap: 18px;
  align-items: center;
}
.file-card > span {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: #e9f4ff;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}
.file-card > div {
  flex: 1;
}
.file-card h3,
.file-card p {
  margin: 0;
}
.file-card p {
  color: var(--muted);
  margin-top: 4px;
}
.generic-embed {
  border: 0;
  width: 100%;
  min-height: 420px;
  border-radius: 16px;
  background: #eef1f5;
}
.builder-accordion {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.builder-accordion details {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
}
.builder-accordion summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 800;
}
.builder-accordion details > div {
  padding: 0 20px 18px;
}
.builder-tabs > [role="tablist"] {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  margin: 18px 0;
}
.builder-tabs [role="tab"] {
  border: 0;
  background: transparent;
  padding: 12px 16px;
  font-weight: 700;
  border-bottom: 3px solid transparent;
}
.builder-tabs [role="tab"][aria-selected="true"] {
  color: var(--blue);
  border-color: var(--blue);
}
.table-scroll {
  overflow-x: auto;
}
.table-scroll table {
  width: 100%;
  border-collapse: collapse;
}
.table-scroll caption {
  text-align: left;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 10px;
}
.table-scroll th,
.table-scroll td {
  text-align: left;
  padding: 13px;
  border: 1px solid var(--line);
}
.table-scroll th {
  background: #f4f7fa;
}
.builder-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.builder-stats > div {
  display: grid;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.builder-stats strong {
  font: 700 clamp(30px, 5vw, 52px) / 1 "Libre Franklin";
  color: var(--blue);
}
.builder-stats span {
  font-weight: 800;
  margin-top: 10px;
}
.builder-stats small {
  color: var(--muted);
}
.builder-timeline {
  list-style: none;
  padding: 0;
  margin: 22px 0;
  display: grid;
}
.builder-timeline li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 25px;
  padding-bottom: 30px;
  position: relative;
}
.builder-timeline li:before {
  content: "";
  position: absolute;
  left: 128px;
  top: 5px;
  bottom: -5px;
  border-left: 2px solid #cfe2f4;
}
.builder-timeline li:after {
  content: "";
  position: absolute;
  left: 122px;
  top: 3px;
  width: 14px;
  height: 14px;
  background: var(--blue);
  border-radius: 50%;
}
.builder-timeline time {
  color: var(--blue);
  font-weight: 800;
  text-align: right;
}
.builder-timeline h3,
.builder-timeline p {
  margin: 0;
}
.builder-timeline p {
  color: var(--muted);
  margin-top: 5px;
}
.progress-builder-card {
  padding: 32px !important;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.progress-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.progress-metrics > div {
  display: grid;
  padding: 18px;
  background: #f3f7fb;
  border-radius: 13px;
}
.progress-metrics strong {
  font-size: 32px;
  color: var(--blue);
}
.progress-metrics span {
  font-size: 13px;
  color: var(--muted);
}
.builder-search,
.newsletter-card form,
.newsletter-card > div:last-child {
  display: flex;
  gap: 10px;
}
.builder-search input,
.newsletter-card input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px 15px;
  font: inherit;
}
.newsletter-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding: 35px !important;
  background: #101d35;
  color: white;
  border-radius: 20px;
}
.newsletter-card h2,
.newsletter-card p {
  margin: 0;
}
.newsletter-card p {
  color: #b8c2d2;
  margin-top: 7px;
}
.breadcrumbs {
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}
.breadcrumbs a {
  color: var(--blue);
}
.divider-dashed {
  border-top-style: dashed !important;
}
.divider-dotted {
  border-top-style: dotted !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 900px) {
  .section-layout-2 .page-section-grid,
  .section-layout-2-left .page-section-grid,
  .section-layout-2-right .page-section-grid,
  .section-layout-3 .page-section-grid {
    grid-template-columns: 1fr;
  }
  .section-padding-large {
    padding-block: 48px;
  }
  .gallery-columns-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .newsletter-card {
    align-items: stretch;
    flex-direction: column;
  }
}
@media (max-width: 600px) {
  .section-padding-medium,
  .section-padding-large {
    padding-inline: 12px;
  }
  .gallery-columns-2,
  .gallery-columns-3,
  .gallery-columns-4 {
    grid-template-columns: 1fr;
  }
  .file-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .file-card .button {
    width: 100%;
  }
  .builder-timeline li {
    grid-template-columns: 1fr;
    gap: 5px;
    padding-left: 25px;
  }
  .builder-timeline time {
    text-align: left;
  }
  .builder-timeline li:before {
    left: 5px;
  }
  .builder-timeline li:after {
    left: -1px;
  }
  .newsletter-card form,
  .builder-search {
    flex-direction: column;
  }
}

/* Homepage composition and reusable rich dynamic blocks v0.5 */
.page-section.align-stretch .page-section-grid {
  align-items: stretch;
}
.page-section.align-stretch .page-section-column {
  display: flex;
}
.page-section.align-stretch .page-section-column > .page-block {
  width: 100%;
}
.page-block-hero.background-cream .block-inner {
  background: #fdfaf3;
  border: 1px solid #ebe4d9;
}
.page-block-hero .hero-with-media {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  align-items: center;
  gap: 20px;
  min-height: 458px;
  padding: clamp(34px, 4vw, 62px);
  overflow: hidden;
}
.hero-with-media.media-left .hero-builder-copy {
  order: 2;
}
.hero-with-media.media-left .hero-builder-media {
  order: 1;
}
.page-block-hero .hero-with-media h1 {
  font-size: clamp(45px, 4.35vw, 70px);
  max-width: 650px;
}
.hero-builder-copy {
  position: relative;
  z-index: 1;
}
.hero-builder-media {
  align-self: stretch;
  min-height: 320px;
  display: grid;
  place-items: center;
}
.hero-builder-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 390px;
  border-radius: 18px;
}
.hero-builder-media img.fit-contain {
  object-fit: contain;
}
.hero-builder-media img.fit-cover {
  object-fit: cover;
}
.hero-builder-cta {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.hero-builder-cta > span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #071426;
  color: var(--lime);
  font-size: 11px;
  padding-left: 2px;
}
.page-block-user_progress > .progress-builder-card {
  height: 100%;
  box-sizing: border-box;
  padding: 26px 0 0 !important;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(7, 20, 38, 0.02);
}
.progress-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.progress-card-heading h2 {
  font-size: 24px;
  margin: 0;
}
.progress-card-heading > span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff4ea;
  font-size: 25px;
}
.streak-summary {
  display: flex;
  align-items: center;
  gap: 23px;
  padding: 18px 28px 8px;
}
.streak-summary > div:last-child {
  min-width: 0;
}
.streak-summary > div:last-child > strong {
  font-size: 18px;
}
.streak-summary p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 6px 0 0;
}
.streak-ring {
  --streak-progress: 72%;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: conic-gradient(var(--lime) var(--streak-progress), #edf0f1 0);
  display: grid;
  place-items: center;
  position: relative;
  flex: none;
}
.streak-ring:after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}
.streak-ring strong {
  position: relative;
  z-index: 1;
  font: 700 42px/1 "Libre Franklin";
}
.progress-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 12px 28px 24px;
}
.progress-week span {
  display: grid;
  justify-items: center;
  gap: 8px;
}
.progress-week small {
  font-size: 12px;
  color: #253148;
}
.progress-week i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px dashed #aeb7c3;
  color: #071426;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 13px;
}
.progress-week i.complete {
  border: 0;
  background: var(--lime);
}
.progress-card-stats {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 28px;
}
.progress-card-stats > div:first-child {
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 12px;
  align-items: center;
}
.progress-card-stats > div:first-child small,
.progress-card-stats > div:first-child strong {
  grid-column: 2;
}
.progress-card-stats small {
  color: var(--muted);
  font-size: 13px;
}
.progress-card-stats strong {
  font: 700 30px/1.15 "Libre Franklin";
}
.progress-star {
  grid-row: 1/3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eaf4ff;
  color: var(--blue);
  font-size: 31px;
}
.progress-ranking {
  display: grid;
  align-content: center;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.progress-ranking strong {
  font: 700 15px/1.2 "DM Sans";
}
.progress-ranking small {
  margin-top: 5px;
}
.progress-card-link {
  display: flex;
  justify-content: space-between;
  padding: 17px 28px;
  color: #071426;
  font-weight: 700;
}
.progress-card-link span {
  color: var(--blue);
  font-size: 20px;
}
.progress-guest {
  text-align: center;
  padding: 18px 28px 30px;
}
.progress-guest .streak-ring {
  width: 90px;
  height: 90px;
  margin: 0 auto 18px;
}
.progress-guest .streak-ring strong {
  font-size: 32px;
}
.progress-guest h3 {
  margin: 0;
}
.progress-guest p {
  color: var(--muted);
}
.quiz-showcase-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.quiz-showcase-heading h2 {
  font-size: 25px;
  letter-spacing: -0.6px;
}
.quiz-showcase-heading > a {
  color: #071426;
  font-size: 14px;
}
.quiz-showcase-heading > a span {
  color: var(--blue);
  font-size: 24px;
  margin-left: 7px;
  vertical-align: -2px;
}
.quiz-showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  margin-top: 18px;
}
.quiz-showcase-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  overflow: hidden;
  min-width: 0;
  box-shadow: 0 2px 9px rgba(7, 20, 38, 0.025);
}
.quiz-card-media {
  position: relative;
  display: block;
  margin: 9px 9px 0;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  background: #eaf4ff;
}
.quiz-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.quiz-showcase-card:hover .quiz-card-media img {
  transform: scale(1.025);
}
.quiz-card-media > span {
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 46px;
  color: var(--blue);
}
.quiz-category {
  position: absolute;
  top: 12px;
  left: 12px;
  margin: 0 !important;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #e65c45 !important;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  font-size: 10px !important;
}
.quiz-category-1 {
  color: #176fcc !important;
}
.quiz-category-2 {
  color: #16875f !important;
}
.quiz-category-3 {
  color: #d44f70 !important;
}
.quiz-card-copy {
  padding: 14px 18px 12px;
}
.quiz-card-copy h3 {
  font-size: 18px;
  margin: 0 0 5px;
}
.quiz-card-copy h3 a {
  color: #071426;
}
.quiz-card-copy p {
  height: 42px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 13px;
}
.quiz-card-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #394355;
}
.quiz-card-meta > span {
  white-space: nowrap;
}
.quiz-points-meta i {
  font-style: normal;
  color: #f06b4e;
  background: #fff0eb;
  border-radius: 50%;
  padding: 4px;
  margin-right: 5px;
}
.difficulty-bars {
  font-style: normal;
  letter-spacing: 1px;
  color: var(--blue);
  margin-right: 5px;
  font-size: 9px;
}
.quiz-progress-meta {
  justify-self: end;
}
.quiz-card-progress {
  height: 4px;
  margin-top: 11px;
  background: #edf0f2;
  border-radius: 999px;
  overflow: hidden;
}
.quiz-card-progress i {
  display: block;
  width: var(--progress);
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
}
.quiz-showcase-card:nth-child(2) .quiz-card-progress i {
  background: #2084d8;
}
.quiz-showcase-card:nth-child(3) .quiz-card-progress i {
  background: var(--lime);
}
.quiz-showcase-card:nth-child(4) .quiz-card-progress i {
  background: #ed5b75;
}
@media (max-width: 1150px) {
  .quiz-showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .page-block-hero .hero-with-media {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-builder-media {
    min-height: 280px;
  }
  .hero-with-media.media-left .hero-builder-copy,
  .hero-with-media.media-left .hero-builder-media {
    order: initial;
  }
  .page-block-user_progress > .progress-builder-card {
    height: auto;
  }
}
@media (max-width: 600px) {
  .page-block-hero .hero-with-media {
    padding: 34px 23px;
  }
  .page-block-hero .hero-with-media h1 {
    font-size: 43px;
    letter-spacing: -2.5px;
  }
  .hero-builder-media {
    min-height: 220px;
  }
  .quiz-showcase-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .quiz-card-media {
    height: 175px;
  }
  .progress-card-heading,
  .streak-summary,
  .progress-week,
  .progress-card-stats,
  .progress-card-link {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Generic variable-driven dashboard system v0.6 */
.builder-dashboard {
  box-sizing: border-box;
  overflow: hidden;
}
.dashboard-surface-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.dashboard-surface-flat {
  background: #f4f7fb;
  border-radius: 20px;
}
.dashboard-surface-transparent {
  background: transparent;
}
.page-block-dashboard > .builder-dashboard {
  height: 100%;
}
.dashboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 28px 12px;
}
.dashboard-heading h2 {
  font: 700 24px/1.15 "Libre Franklin";
  letter-spacing: -0.5px;
  margin: 0;
}
.dashboard-heading-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff4ea;
  font-size: 25px;
  flex: none;
}
.dashboard-widgets {
  display: grid;
  grid-template-columns: repeat(var(--dashboard-columns), minmax(0, 1fr));
  align-items: stretch;
}
.dashboard-widget {
  min-width: 0;
  padding: 18px 28px;
  box-sizing: border-box;
}
.dashboard-widget.span-full {
  grid-column: 1/-1;
}
.dashboard-widget.span-2 {
  grid-column: span 2;
}
.dashboard-widget.span-3 {
  grid-column: span 3;
}
.widget-ring {
  display: flex;
  align-items: center;
  gap: 22px;
}
.dashboard-ring {
  --ring-progress: 0%;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: conic-gradient(
    var(--widget-accent, var(--lime)) var(--ring-progress),
    #edf0f1 0
  );
  display: grid;
  place-items: center;
  position: relative;
  flex: none;
}
.dashboard-ring:after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}
.dashboard-ring strong {
  position: relative;
  z-index: 1;
  font: 700 40px/1 "Libre Franklin";
}
.dashboard-widget-copy {
  display: grid;
  align-content: center;
  min-width: 0;
}
.dashboard-widget-copy > small,
.dashboard-widget-label {
  color: var(--muted);
  font-size: 13px;
}
.dashboard-widget-copy > strong {
  font: 700 29px/1.15 "Libre Franklin";
}
.widget-ring .dashboard-widget-copy > strong {
  font: 700 17px/1.25 "DM Sans";
}
.dashboard-widget-copy p,
.widget-progress p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 5px 0 0;
}
.widget-week {
  padding-top: 8px;
  padding-bottom: 22px;
}
.dashboard-week {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(26px, 1fr));
  gap: 5px;
  margin-top: 8px;
}
.dashboard-week span {
  display: grid;
  justify-items: center;
  gap: 8px;
}
.dashboard-week small {
  font-size: 11px;
}
.dashboard-week i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px dashed #aeb7c3;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
}
.dashboard-week i.complete {
  border: 0;
  background: var(--widget-accent, var(--lime));
}
.widget-metric,
.widget-badge,
.widget-text {
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
}
.widget-metric + .widget-metric {
  border-left: 1px solid var(--line);
}
.dashboard-widget-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--widget-accent, #1786ed) 12%, white);
  color: var(--widget-accent, #1786ed);
  font-size: 28px;
  flex: none;
}
.widget-badge .dashboard-widget-copy {
  border-radius: 999px;
  background: color-mix(in srgb, var(--widget-accent, #1786ed) 12%, white);
  padding: 8px 12px;
}
.dashboard-progress-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.dashboard-progress {
  height: 7px;
  background: #edf0f2;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 9px;
}
.dashboard-progress i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: var(--widget-accent, var(--blue));
}
.widget-action {
  grid-column: 1/-1 !important;
  border-top: 1px solid var(--line);
  padding-block: 0;
}
.widget-action a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  color: #071426;
  font-weight: 700;
}
.widget-action i {
  color: var(--widget-accent, var(--blue));
  font-size: 20px;
  font-style: normal;
}
.widget-separator {
  grid-column: 1/-1 !important;
  padding-block: 0;
}
.widget-separator hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.dashboard-widget.tone-blue {
  --widget-accent: var(--blue);
}
.dashboard-widget.tone-lime {
  --widget-accent: var(--lime);
}
.dashboard-widget.tone-coral {
  --widget-accent: #ed6b54;
}
.dashboard-widget.tone-neutral {
  --widget-accent: #7d8794;
}
.dashboard-widget.tone-dark {
  --widget-accent: #071426;
}
@media (max-width: 600px) {
  .dashboard-widgets {
    grid-template-columns: 1fr;
  }
  .dashboard-widget.span-2,
  .dashboard-widget.span-3,
  .dashboard-widget.span-full {
    grid-column: 1;
  }
  .widget-metric + .widget-metric {
    border-left: 0;
  }
  .dashboard-heading,
  .dashboard-widget {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Visual quiz-type and mini-game builder v0.7 */
.back-link {
  display: inline-block;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 20px;
}
.game-type-note {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border-radius: 15px;
  background: #eef7ff;
  border: 1px solid #cfe6fb;
  margin-bottom: 24px;
}
.game-type-note strong {
  white-space: nowrap;
}
.game-type-note span {
  color: var(--muted);
}
.game-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.game-type-grid > article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
}
.game-type-icon {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  background: #edf6ff;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 25px;
  font-weight: 800;
}
.game-type-grid h2 {
  margin: 8px 0 4px;
}
.game-type-grid p {
  margin: 0;
  color: var(--muted);
}
.game-type-grid small {
  display: block;
  margin-top: 12px;
  color: var(--blue);
  font-weight: 700;
}
.example-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff4d4;
  color: #785b00;
  font-size: 12px;
}
.game-type-actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}
.game-type-actions form {
  display: inline;
}
.danger-text {
  color: #b33123 !important;
}
.game-builder {
  min-height: calc(100vh - 88px);
  background: #f5f7fa;
}
.game-builder-top {
  position: sticky;
  top: 88px;
  z-index: 15;
  min-height: 72px;
  padding: 10px clamp(18px, 3vw, 42px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.game-builder-top > div {
  display: flex;
  align-items: center;
  gap: 18px;
}
.game-builder-top a {
  color: var(--blue);
  font-weight: 700;
}
.game-builder-top span {
  color: var(--muted);
  font-size: 13px;
}
.game-builder-meta {
  padding: 18px clamp(18px, 3vw, 42px);
  display: grid;
  grid-template-columns: 2fr 1.3fr 0.4fr 1fr;
  gap: 12px;
  background: #fff;
}
.game-builder-project {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.game-builder-project > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px clamp(18px, 3vw, 42px);
  cursor: pointer;
  color: #173854;
  font-weight: 850;
  list-style: none;
}
.game-builder-project > summary::-webkit-details-marker {
  display: none;
}
.game-builder-project > summary:before {
  content: "+";
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #edf4fa;
  color: #0a78ec;
}
.game-builder-project[open] > summary:before {
  content: "−";
}
.game-builder-project > summary span {
  margin-right: auto;
}
.game-builder-project > summary small,
.game-builder-meta label > small {
  color: #69788d;
  font-size: 10px;
  font-weight: 650;
}
.game-builder-meta label,
.settings-grid label,
.component-inspector label,
.builder-row-card label,
.logic-card label,
.objective-card label {
  font-size: 12px;
  font-weight: 800;
  display: grid;
  gap: 5px;
}
.game-builder-meta input,
.game-builder-meta select,
.settings-grid input,
.component-inspector input,
.component-inspector textarea,
.builder-row-card input,
.builder-row-card select,
.logic-card input,
.logic-card select,
.objective-card input,
.objective-card select {
  width: 100%;
  border: 1px solid #ccd4df;
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}
.game-builder-meta .wide {
  grid-column: 1/-1;
}
.game-builder-tabs {
  display: flex;
  padding: 0 clamp(18px, 3vw, 42px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow: auto;
}
.game-builder-tabs button {
  border: 0;
  background: none;
  padding: 14px 20px;
  border-bottom: 3px solid transparent;
  font-weight: 800;
  white-space: nowrap;
}
.game-builder-tabs button span {
  margin-right: 7px;
  color: #0a78ec;
  font-size: 17px;
}
.game-builder-tabs button.active {
  color: var(--blue);
  border-color: var(--blue);
}
.game-builder-workspace {
  display: none;
  padding: 18px clamp(12px, 2vw, 28px) 65px;
}
.game-builder-workspace.active {
  display: grid;
}
.game-builder-workspace[data-builder-panel="scene"] {
  grid-template-columns: 235px minmax(500px, 1fr) 300px;
  gap: 16px;
}
.game-builder-panel-guide {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border: 1px solid #cfe0ef;
  border-left: 4px solid #0a78ec;
  border-radius: 0 14px 14px 0;
  background: #f4f9fd;
}
.game-builder-panel-guide span,
.game-builder-panel-guide small {
  color: #607087;
  font-size: 11px;
  font-weight: 750;
}
.game-builder-panel-guide h2 {
  margin: 3px 0 2px;
  color: #071426;
  font-size: 20px;
}
.game-builder-panel-guide p,
.inspector-intro {
  margin: 0;
  color: #607087;
  font-size: 12px;
}
.component-palette,
.component-inspector,
.stage-area,
.builder-list-panel,
.settings-grid,
.engine-info {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.component-palette,
.component-inspector {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 178px;
  max-height: calc(100vh - 195px);
  overflow: auto;
}
.component-palette h2,
.component-inspector h2 {
  margin: 0;
}
.component-palette > p {
  font-size: 12px;
  color: var(--muted);
}
.component-palette > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.component-palette button {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
}
.component-palette button:hover {
  border-color: var(--blue);
  background: #f3f9ff;
}
.component-palette button span {
  display: block;
  color: var(--blue);
  font-size: 21px;
}
.stage-toolbar {
  height: 54px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
}
.stage-toolbar span {
  color: var(--muted);
  font-size: 12px;
  margin-right: auto;
}
.game-stage-frame {
  padding: 18px;
  background: #e8ebef;
  border-radius: 0 0 16px 16px;
  overflow: auto;
}
.game-stage {
  position: relative;
  width: 100%;
  min-width: 500px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(9, 22, 48, 0.12);
}
.stage-component {
  position: absolute;
  border: 1px dashed rgba(10, 120, 236, 0.8);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 7px;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding: 4px;
  cursor: move;
}
.stage-component span {
  font-weight: 800;
  font-size: clamp(9px, 1.1vw, 16px);
  overflow: hidden;
}
.stage-component small {
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-size: 8px;
  color: var(--blue);
}
.stage-component.selected {
  outline: 3px solid var(--blue);
  border-style: solid;
}
.stage-component-player {
  border-radius: 50%;
  background: var(--lime);
}
.stage-component-platform {
  background: #16385c;
  border: 0;
}
.stage-component-collectible {
  border-radius: 50%;
  background: #ffc900;
}
.stage-component-goal {
  background: #ff6e50;
}
.game-builder.is-preview .stage-component {
  border-color: transparent;
  cursor: default;
}
.game-builder.is-preview .stage-component small {
  display: none;
}
.component-inspector {
  display: grid;
  gap: 12px;
}
.component-inspector .inspector-intro {
  margin-top: -7px;
}
.component-inspector > div {
  display: grid;
  gap: 12px;
}
.inspector-type {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #f3f7fb;
  border-radius: 9px;
}
.inspector-type span {
  font-size: 11px;
  color: var(--blue);
}
.inspector-grid {
  grid-template-columns: 1fr 1fr;
}
.field-help {
  font-size: 11px;
  color: var(--muted);
}
.invalid {
  border-color: #d42d20 !important;
  background: #fff1ef !important;
}
.builder-list-panel {
  max-width: 1300px;
  width: 100%;
  margin: auto;
  padding-bottom: 20px;
}
.builder-list-panel .panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.builder-list-panel > [data-field-list],
.builder-list-panel > [data-rule-list],
.builder-list-panel > [data-objective-list] {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.builder-row-card {
  display: grid;
  grid-template-columns: 28px 1fr 1.3fr 0.8fr 0.55fr 1.4fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.drag-handle {
  color: #9ca5b2;
  align-self: center;
}
.check-mini {
  display: flex !important;
  align-items: center;
  height: 38px;
}
.check-mini input {
  width: auto;
}
.row-actions {
  display: flex;
}
.row-actions button,
.logic-card > button,
.objective-card > button {
  width: 32px;
  height: 38px;
  border: 0;
  border-radius: 7px;
  background: #f1f3f6;
}
.logic-columns {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  width: 100%;
}
.logic-card {
  display: grid;
  grid-template-columns: 1fr 1.7fr 34px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.logic-card > div {
  display: grid;
  grid-template-columns: auto 1fr 1fr 1fr;
  gap: 7px;
  align-items: end;
}
.logic-card > div > span {
  font-size: 10px;
  color: var(--blue);
  font-weight: 900;
  align-self: center;
}
.objective-card {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 34px;
  gap: 9px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.settings-grid {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.settings-grid .check-row {
  display: flex;
  align-items: center;
}
.settings-grid .check-row input {
  width: auto;
}
.engine-info {
  max-width: 900px;
  width: 100%;
  margin: 18px auto 0;
  padding: 22px;
  color: var(--muted);
}
.engine-info strong {
  color: var(--ink);
}
@media (max-width: 1200px) {
  .game-builder-workspace[data-builder-panel="scene"] {
    grid-template-columns: 190px minmax(450px, 1fr);
  }
  .component-inspector {
    grid-column: 1/-1;
    position: static;
    max-height: none;
  }
  .logic-columns {
    grid-template-columns: 1fr;
  }
  .game-type-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 800px) {
  .game-builder-top {
    top: 72px;
    align-items: stretch;
    position: static;
    flex-direction: column;
  }
  .game-builder-top > div {
    flex-wrap: wrap;
  }
  .game-builder-meta {
    grid-template-columns: 1fr 1fr;
  }
  .game-builder-project > summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .game-builder-project > summary small {
    width: 100%;
    padding-left: 40px;
  }
  .game-builder-panel-guide {
    display: block;
  }
  .game-builder-panel-guide > small {
    display: block;
    margin-top: 8px;
  }
  .game-builder-workspace[data-builder-panel="scene"] {
    grid-template-columns: 1fr;
  }
  .component-palette {
    position: static;
    max-height: none;
  }
  .component-palette > div {
    grid-template-columns: repeat(4, 1fr);
  }
  .stage-area {
    overflow: hidden;
  }
  .builder-row-card,
  .logic-card,
  .objective-card {
    grid-template-columns: 1fr;
  }
  .logic-card > div {
    grid-template-columns: 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .game-type-note {
    align-items: flex-start;
    flex-direction: column;
  }
  .game-type-actions {
    grid-column: 1/-1;
    flex-wrap: wrap;
  }
}

.quiz-content-page {
  max-width: 1100px;
}
.dynamic-quiz-fields {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}
.dynamic-quiz-fields h2 {
  margin: 0;
}
.dynamic-quiz-fields .eyebrow {
  margin-bottom: 5px;
}
.dynamic-quiz-fields > [data-content-fields] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
}
.dynamic-quiz-fields small,
.quiz-content-page label > small {
  color: var(--muted);
  font-weight: 400;
}
.game-play-page {
  max-width: 1320px;
  margin: auto;
  padding: 38px 28px 80px;
}
.game-play-page > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 22px;
}
.game-play-page > header .category-pill {
  position: static;
  display: inline-block;
}
.game-play-page > header .eyebrow {
  margin: 13px 0 5px;
}
.game-play-page h1 {
  font: 700 clamp(36px, 5vw, 62px) / 1 "Libre Franklin";
  letter-spacing: -2px;
  margin: 0;
}
.game-play-page > header > strong {
  color: #b18300;
}
.runtime-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.runtime-status {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.runtime-status [data-runtime-timer] {
  color: var(--game-accent);
}
.runtime-stage-frame {
  padding: 20px;
  background: #e8ebef;
}
.runtime-stage {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 30px rgba(9, 22, 48, 0.15);
}
.runtime-element {
  position: absolute;
  box-sizing: border-box;
}
.runtime-heading {
  display: flex;
  align-items: center;
}
.runtime-heading h2 {
  font: 700 clamp(18px, 3vw, 38px) / 1.1 "Libre Franklin";
  margin: 0;
}
.runtime-text {
  display: flex;
  align-items: center;
  font-weight: 600;
}
.runtime-image img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 10px;
}
.runtime-button {
  display: grid;
  place-items: center;
}
.runtime-button button,
.runtime-input button {
  border: 0;
  border-radius: 10px;
  background: var(--game-accent);
  color: #fff;
  padding: 10px 18px;
  font-weight: 800;
}
.runtime-choice-list {
  display: grid;
  gap: 8px;
  align-content: center;
}
.runtime-choice-list button {
  min-height: 45px;
  border: 1px solid #ccd4df;
  border-radius: 11px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 13px;
  text-align: left;
  font-weight: 700;
}
.runtime-choice-list button:hover,
.runtime-choice-list button.selected {
  border-color: var(--game-accent);
  background: #edf7ff;
}
.runtime-choice-list b {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eef1f5;
  display: grid;
  place-items: center;
}
.runtime-input {
  display: grid;
  place-items: center;
}
.runtime-input form {
  display: flex;
  width: 100%;
  gap: 8px;
}
.runtime-input input {
  flex: 1;
  min-width: 0;
  border: 2px solid #ccd4df;
  border-radius: 10px;
  padding: 10px;
}
.runtime-hotspot-layer button {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px dashed rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(10, 120, 236, 0.1);
}
.runtime-hotspot-layer button:hover {
  background: rgba(200, 240, 0, 0.55);
  border-color: var(--lime);
}
.runtime-drag-list,
.runtime-drop-list {
  display: grid;
  align-content: center;
  gap: 8px;
}
.runtime-drag-list > div,
.runtime-drop-list > div {
  min-height: 45px;
  border: 1px solid #ccd4df;
  border-radius: 10px;
  background: #fff;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}
.runtime-drag-list > div {
  cursor: grab;
  border-left: 5px solid var(--game-accent);
}
.runtime-drop-list > div {
  border-style: dashed;
}
.runtime-drop-list > div.filled {
  border-style: solid;
  border-color: var(--game-accent);
  background: #eef8ff;
}
.runtime-drop-list small {
  color: var(--muted);
}
.runtime-platform {
  background: #173854;
  border-radius: 7px;
}
.runtime-goal {
  display: grid;
  place-items: center;
  color: #d64732;
}
.runtime-goal span {
  font-size: 44px;
}
.runtime-goal small {
  font-weight: 800;
}
.runtime-collectible-area button {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  background: #ffc900;
  color: #8a6500;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.runtime-collectible-area button.collected {
  opacity: 0;
  pointer-events: none;
}
.runtime-player {
  border-radius: 50%;
  background: var(--lime);
  display: grid;
  place-items: center;
  z-index: 5;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}
.runtime-player span {
  font-size: 28px;
}
.runtime-word-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-size), 1fr);
  gap: 2px;
}
.runtime-word-grid button {
  border: 0;
  border-radius: 3px;
  background: #fff;
  font-weight: 900;
  font-size: clamp(9px, 1.4vw, 18px);
}
.runtime-word-grid button.selected {
  background: var(--lime);
}
.runtime-controls {
  min-height: 64px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.runtime-controls:empty {
  display: none;
}
.runtime-controls button {
  min-width: 72px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 800;
}
.runtime-controls button:active {
  background: var(--game-accent);
  color: #fff;
}
@media (max-width: 700px) {
  .dynamic-quiz-fields > [data-content-fields] {
    grid-template-columns: 1fr;
  }
  .runtime-stage-frame {
    padding: 6px;
  }
  .game-play-page {
    padding: 25px 10px 60px;
  }
  .runtime-choice-list {
    gap: 3px;
  }
  .runtime-choice-list button {
    min-height: 30px;
    padding: 3px;
    font-size: 10px;
  }
  .runtime-choice-list b {
    width: 22px;
    height: 22px;
  }
  .runtime-goal span {
    font-size: 24px;
  }
}
.builder-list-panel {
  max-width: 1400px;
}
.builder-row-card {
  grid-template-columns: 28px 1fr 1.2fr 0.7fr 0.5fr 1.2fr 1.2fr auto;
}
@media (max-width: 800px) {
  .builder-row-card {
    grid-template-columns: 1fr;
  }
}
.logic-card {
  grid-template-columns: 1.2fr 1.6fr 34px;
  align-items: start;
}
.logic-card .logic-trigger {
  grid-template-columns: auto 1.2fr 1fr 0.8fr 0.8fr;
}
.logic-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
}
.logic-actions > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logic-actions > div:first-child span {
  font-size: 10px;
  color: var(--blue);
  font-weight: 900;
}
.logic-actions > div:first-child button {
  border: 1px solid #9bc7ee;
  background: #edf7ff;
  color: var(--blue);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
}
.logic-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 32px;
  gap: 6px;
  align-items: end;
  margin-top: 7px;
}
.logic-action-row > button {
  height: 38px;
  border: 0;
  border-radius: 7px;
  background: #f1f3f6;
  color: #b33123;
}
@media (max-width: 900px) {
  .logic-card,
  .logic-card .logic-trigger,
  .logic-action-row {
    grid-template-columns: 1fr;
  }
}

/* Installable mini-game plugins v0.8 */
.admin-heading-actions {
  display: flex;
  gap: 10px;
}
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.plugin-card {
  padding: 22px;
}
.plugin-card.is-disabled {
  opacity: 0.72;
}
.plugin-card header,
.plugin-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.plugin-card h2 {
  margin: 5px 0 0;
}
.plugin-card > p {
  color: var(--muted);
  min-height: 45px;
}
.plugin-category {
  font-size: 11px;
  color: var(--blue);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.plugin-card ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.plugin-card li {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f6fb;
  font-size: 12px;
  font-weight: 700;
}
.plugin-card li span {
  color: var(--blue);
  margin-right: 5px;
}
.plugin-card footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.plugin-card footer small {
  color: var(--muted);
}
.runtime-drag-list > button,
.runtime-drop-list > button {
  min-height: 45px;
  border: 1px solid #ccd4df;
  border-radius: 10px;
  background: #fff;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  text-align: left;
}
.runtime-drag-list > button {
  cursor: grab;
  border-left: 5px solid var(--game-accent);
}
.runtime-drag-list > button[aria-pressed="true"],
.runtime-drop-list > button.filled {
  border-color: var(--game-accent);
  background: #eef8ff;
}
.plugin-crossword {
  display: grid;
  gap: 8px;
  align-content: center;
  overflow: auto;
}
.plugin-crossword label {
  display: grid;
  grid-template-columns: 1fr minmax(110px, 0.7fr);
  gap: 8px;
  align-items: center;
}
.plugin-crossword input {
  min-width: 0;
  border: 1px solid #bcc7d4;
  border-radius: 8px;
  padding: 8px;
}
.plugin-crossword input.correct {
  border-color: #24a15c;
  background: #e9f8ef;
}
.plugin-memory {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.plugin-memory button {
  border: 1px solid #c9d3df;
  border-radius: 10px;
  background: #fff;
  font-weight: 800;
  overflow: hidden;
}
.plugin-memory button:disabled {
  color: #14304e;
  background: #eaf8d0;
  border-color: #a8ce2d;
}
.plugin-sequence {
  display: grid;
  gap: 7px;
  align-content: center;
}
.plugin-sequence > div {
  display: grid;
  grid-template-columns: 1fr 38px 38px;
  gap: 5px;
  align-items: center;
  background: #fff;
  border: 1px solid #ccd4df;
  border-radius: 9px;
  padding: 7px 9px;
}
.plugin-sequence button,
.plugin-branching button {
  border: 1px solid #b9c8d8;
  border-radius: 8px;
  background: #fff;
  padding: 7px;
  font-weight: 700;
}
.plugin-sequence > button {
  background: var(--game-accent);
  color: #fff;
}
.plugin-multi-hotspot button {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px dashed white;
  border-radius: 50%;
  background: rgba(10, 120, 236, 0.14);
}
.plugin-multi-hotspot button.found {
  background: rgba(200, 240, 0, 0.75);
  border-style: solid;
}
.plugin-branching {
  display: grid;
  gap: 10px;
  align-content: center;
  text-align: center;
  padding: clamp(12px, 4vw, 40px);
}
.plugin-branching p {
  font-size: clamp(16px, 2.3vw, 28px);
  font-weight: 800;
}
.plugin-game-map {
  background-size: cover;
  background-position: center;
  border-radius: 12px;
}
.plugin-game-map button {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--game-accent);
  color: #fff;
  padding: 10px 14px;
  font-weight: 800;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
}
.plugin-game-map button.visited {
  background: var(--lime);
  color: #071426;
}
.plugin-maze {
  display: grid;
  grid-template-columns: repeat(var(--maze-columns), 1fr);
  background: #fff;
}
.plugin-maze span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-size: clamp(8px, 2vw, 22px);
}
.plugin-maze .wall {
  background: #183652;
}
.plugin-maze .path {
  background: #f3f7fa;
}
.plugin-reaction button {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  width: clamp(55px, 9vw, 90px);
  aspect-ratio: 1;
  background: var(--lime);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}
.runtime-plugin-missing {
  display: grid;
  place-items: center;
  padding: 15px;
  background: #fff0ec;
  border: 1px solid #ff9b86;
  color: #8e2b1b;
}
@media (max-width: 800px) {
  .plugin-grid {
    grid-template-columns: 1fr;
  }
  .plugin-memory {
    grid-template-columns: repeat(3, 1fr);
  }
  .admin-heading-actions {
    flex-wrap: wrap;
  }
}

/* Mobile polish v0.8.1 */
@media (max-width: 700px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }
  .site-header {
    z-index: 40;
  }
  .main-nav.open {
    z-index: 45;
    box-shadow: 0 16px 28px rgba(7, 20, 38, 0.12);
  }
  .main-nav.open a {
    min-height: 46px;
    display: flex;
    align-items: center;
  }
  .account-nav {
    margin-left: 0;
  }
  .profile-popover {
    position: fixed;
    top: 66px;
    right: 10px;
    max-width: calc(100vw - 20px);
  }
  button,
  .button,
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .button,
  .nav-toggle {
    min-height: 44px;
  }
  .admin-heading h1,
  .form-heading h1 {
    font-size: clamp(36px, 11vw, 46px);
    line-height: 1.03;
    letter-spacing: -1.8px;
  }
  .admin-heading-actions {
    width: 100%;
  }
  .admin-heading-actions .button {
    flex: 1;
    justify-content: center;
    text-align: center;
  }
  .admin-heading > div:last-child {
    width: 100%;
    flex-wrap: wrap;
  }
  .game-type-grid > article {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 16px;
    gap: 12px;
  }
  .game-type-icon {
    width: 48px;
    height: 48px;
  }
  .game-type-grid h2 {
    font-size: 20px;
    overflow-wrap: anywhere;
  }
  .game-type-actions {
    grid-column: 1/-1;
  }
  .game-type-actions .button {
    width: 100%;
    text-align: center;
  }
  .game-type-actions form {
    flex: 1;
  }
  .game-type-actions form button {
    min-height: 44px;
    width: 100%;
  }
  .plugin-card {
    padding: 17px;
  }
  .plugin-card header,
  .plugin-card footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .plugin-card > p {
    min-height: 0;
  }
  .plugin-card footer form,
  .plugin-card footer .button {
    width: 100%;
  }
  .plugin-card footer .button {
    min-height: 44px;
  }
  .plugin-card li {
    line-height: 1.35;
  }
  .game-builder-top {
    gap: 12px;
    padding: 12px;
  }
  .game-builder-top > div {
    width: 100%;
    gap: 9px;
  }
  .game-builder-top > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .game-builder-top .button {
    width: 100%;
    padding-inline: 8px;
  }
  .game-builder-meta {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .game-builder-meta .wide {
    grid-column: 1;
  }
  .game-builder-tabs {
    padding: 0;
  }
  .game-builder-tabs button {
    padding: 13px 15px;
    min-height: 48px;
  }
  .game-builder-workspace {
    padding: 10px 8px 45px;
  }
  .component-palette,
  .component-inspector {
    padding: 14px;
  }
  .component-palette > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .component-palette button {
    min-height: 72px;
  }
  .stage-toolbar {
    height: auto;
    min-height: 52px;
    flex-wrap: wrap;
    padding: 10px;
  }
  .stage-toolbar span {
    display: none;
  }
  .game-stage-frame {
    padding: 6px;
    overflow: hidden;
  }
  .game-stage {
    min-width: 0;
  }
  .stage-component {
    touch-action: none;
  }
  .component-inspector {
    overflow-wrap: anywhere;
  }
  .builder-list-panel .panel-heading {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
  }
  .builder-list-panel .panel-heading .button {
    width: 100%;
  }
  .builder-list-panel > [data-field-list],
  .builder-list-panel > [data-rule-list],
  .builder-list-panel > [data-objective-list] {
    padding: 9px;
  }
  .builder-row-card,
  .logic-card,
  .objective-card {
    padding: 10px;
  }
  .row-actions {
    justify-content: flex-end;
  }
  .row-actions button,
  .logic-card > button,
  .objective-card > button {
    min-width: 44px;
    min-height: 44px;
  }
  .settings-grid,
  .engine-info {
    padding: 18px;
  }
  .logic-action-row > button {
    min-height: 44px;
  }
  .game-play-page {
    padding: 20px 8px 52px;
  }
  .game-play-page > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .game-play-page h1 {
    font-size: clamp(32px, 10vw, 44px);
    letter-spacing: -1.4px;
    overflow-wrap: anywhere;
  }
  .game-play-page > header > strong {
    align-self: flex-start;
  }
  .runtime-shell {
    border-radius: 15px;
  }
  .runtime-status {
    padding: 8px 13px;
    min-height: 48px;
    font-size: 14px;
  }
  .runtime-stage-frame {
    padding: 5px;
  }
  .runtime-stage {
    border-radius: 9px;
  }
  .runtime-element {
    overflow: auto;
  }
  .runtime-heading h2 {
    font-size: clamp(15px, 4.5vw, 24px);
  }
  .runtime-choice-list {
    gap: 5px;
    overflow: auto;
  }
  .runtime-choice-list button {
    min-height: 42px;
    padding: 6px 8px;
    font-size: 12px;
  }
  .runtime-choice-list b {
    width: 28px;
    height: 28px;
    flex: none;
  }
  .runtime-input form {
    gap: 5px;
  }
  .runtime-input input,
  .runtime-input button {
    min-height: 42px;
    padding: 7px;
  }
  .runtime-drag-list,
  .runtime-drop-list {
    gap: 4px;
    overflow: auto;
  }
  .runtime-drag-list > button,
  .runtime-drop-list > button {
    min-height: 42px;
    padding: 6px 8px;
    font-size: 11px;
  }
  .runtime-hotspot-layer button,
  .plugin-multi-hotspot button {
    min-width: 38px;
    min-height: 38px;
  }
  .runtime-collectible-area button {
    width: 42px;
    height: 42px;
  }
  .runtime-word-grid {
    gap: 1px;
  }
  .runtime-word-grid button {
    min-width: 0;
    min-height: 0;
  }
  .runtime-controls {
    min-height: 58px;
    padding: 6px;
    gap: 6px;
    flex-wrap: wrap;
  }
  .runtime-controls button {
    min-width: 52px;
    min-height: 44px;
  }
  .plugin-memory {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    overflow: auto;
  }
  .plugin-memory button {
    min-width: 0;
    min-height: 42px;
    padding: 4px;
    font-size: 11px;
  }
  .plugin-crossword {
    gap: 5px;
  }
  .plugin-crossword label {
    grid-template-columns: 1fr;
    gap: 3px;
    font-size: 11px;
  }
  .plugin-crossword input {
    min-height: 40px;
    padding: 5px;
  }
  .plugin-sequence {
    overflow: auto;
  }
  .plugin-sequence > div {
    grid-template-columns: minmax(0, 1fr) 38px 38px;
    padding: 4px;
    font-size: 11px;
  }
  .plugin-sequence button,
  .plugin-branching button {
    min-height: 42px;
  }
  .plugin-branching {
    padding: 10px;
  }
  .plugin-branching p {
    font-size: 15px;
    margin: 4px;
  }
  .plugin-game-map button {
    max-width: 42%;
    padding: 7px 9px;
    font-size: 10px;
    white-space: normal;
  }
  .plugin-reaction button {
    min-width: 58px;
  }
  .plugin-maze span {
    font-size: clamp(7px, 3.2vw, 15px);
  }
  .content-form {
    padding: 16px;
    gap: 15px;
  }
  .form-page {
    padding: 30px 12px 65px;
  }
  .dynamic-quiz-fields > [data-content-fields] {
    gap: 13px;
  }
  .flash {
    margin-inline: 10px;
  }
  .table-wrap {
    border-radius: 12px;
  }
  .table-wrap table {
    min-width: 620px;
  }
}
@media (max-width: 420px) {
  .brand {
    font-size: 29px;
  }
  .site-header {
    padding-inline: 12px;
    gap: 8px;
  }
  .account-nav .button {
    padding-inline: 10px;
  }
  .hero-card h1,
  .page-block-hero .hero-with-media h1 {
    font-size: 38px;
  }
  .component-palette > div {
    grid-template-columns: repeat(2, 1fr);
  }
  .plugin-memory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .runtime-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .admin-heading-actions {
    display: grid !important;
    grid-template-columns: 1fr;
  }
}

/* Visual mini-game studio v0.12.0 */
.game-builder-workspace[data-builder-panel="scene"] {
  grid-template-columns: 230px minmax(560px, 1fr) 330px;
}
.palette-search {
  display: flex !important;
  align-items: center;
  gap: 7px;
  margin: 12px 0;
}
.palette-search input {
  min-width: 0;
}
.component-palette button[hidden] {
  display: none;
}
.stage-area {
  min-width: 0;
  overflow: hidden;
}
.stage-toolbar {
  height: auto;
  min-height: 58px;
  flex-wrap: wrap;
}
.stage-toolbar > strong {
  margin-right: auto;
}
.stage-history,
.stage-devices {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f4f7fa;
}
.stage-history button,
.stage-devices button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
}
.stage-history button:disabled {
  opacity: 0.3;
}
.stage-devices button.active {
  background: #071426;
  color: #fff;
}
.game-stage-frame {
  display: grid;
  place-items: start center;
  min-height: 520px;
  background-color: #e5e9ef;
  background-image:
    linear-gradient(45deg, #dce1e8 25%, transparent 25%),
    linear-gradient(-45deg, #dce1e8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dce1e8 75%),
    linear-gradient(-45deg, transparent 75%, #dce1e8 75%);
  background-size: 20px 20px;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
}
.game-stage-viewport {
  width: 100%;
  transition: width 0.2s;
}
.game-stage-viewport.viewport-tablet {
  width: min(760px, 100%);
}
.game-stage-viewport.viewport-mobile {
  width: min(390px, 100%);
}
.game-stage.show-grid {
  background-image:
    linear-gradient(rgba(10, 120, 236, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 120, 236, 0.08) 1px, transparent 1px);
  background-size: 5% 5%;
}
.stage-component {
  display: block;
  padding: 0;
  touch-action: none;
  overflow: visible;
}
.stage-component-content {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: inherit;
}
.stage-component-content > * {
  max-width: 100%;
  box-sizing: border-box;
}
.stage-component-content h2,
.stage-component-content p {
  margin: 0;
  padding: 4px;
  line-height: 1.08;
}
.stage-component-content img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}
.stage-component small {
  z-index: 7;
}
.stage-component.device-hidden {
  opacity: 0.35;
  background-image: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 8px,
    rgba(110, 120, 135, 0.18) 8px,
    rgba(110, 120, 135, 0.18) 16px
  );
}
.stage-resize-handle {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 15px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 3px;
  background: var(--blue);
  cursor: nwse-resize;
  z-index: 12;
}
.game-builder.is-preview .stage-resize-handle {
  display: none;
}
.stage-preview-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}
.stage-preview-list {
  width: 100%;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 6px;
}
.stage-preview-list > span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #cfd7e2;
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
  text-align: left;
}
.stage-preview-list b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf1f5;
}
.stage-preview-input {
  width: 100%;
  display: flex;
  gap: 5px;
  padding: 6px;
}
.stage-preview-input span {
  flex: 1;
  padding: 7px;
  border: 1px solid #cbd3de;
  border-radius: 7px;
  background: #fff;
  color: #778397;
  text-align: left;
}
.stage-preview-input b {
  padding: 7px;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
}
.stage-preview-player {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.2em;
}
.stage-preview-gem {
  color: #9d7500;
}
.stage-preview-goal {
  display: grid;
  place-items: center;
  font-size: 2em;
}
.stage-preview-goal small {
  position: static;
  font-size: 10px;
}
.stage-preview-grid,
.stage-preview-cards {
  font: 800 clamp(8px, 1.5vw, 18px) / 1.25 monospace;
  white-space: nowrap;
}
.stage-preview-story {
  padding: 10px;
}
.stage-preview-story p {
  font-weight: 800;
}
.stage-preview-story span {
  display: inline-block;
  margin: 3px;
  padding: 5px 8px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #ccd4df;
}
.stage-preview-map {
  font-weight: 900;
  color: var(--blue);
}
.stage-preview-reaction {
  padding: 10px;
  border-radius: 999px;
  background: var(--lime);
  font-weight: 900;
}
.stage-preview-icon {
  font-size: clamp(20px, 4vw, 60px);
}
.stage-preview-progress {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 10px;
  text-align: left;
}
.stage-preview-progress i {
  height: 10px;
  border-radius: 999px;
  background: #dde3eb;
  overflow: hidden;
}
.stage-preview-progress b {
  display: block;
  height: 100%;
  background: var(--blue);
}
.stage-preview-counter {
  display: grid;
  place-items: center;
}
.stage-preview-counter b {
  font-size: 2em;
}
.stage-preview-counter small {
  position: static;
}
.stage-preview-audio {
  white-space: nowrap;
}
.stage-hotspot-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
}
.stage-hotspot-svg g {
  fill: rgba(10, 120, 236, 0.22);
  stroke: #fff;
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}
.stage-hotspot-svg g.incorrect {
  fill: rgba(255, 110, 80, 0.2);
}
.stage-hotspot-svg text {
  fill: #071426;
  stroke: none;
  font: bold 28px sans-serif;
  text-anchor: middle;
  dominant-baseline: middle;
}
.stage-component.selected .stage-hotspot-svg {
  pointer-events: none;
}
.game-stage-layers {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.game-stage-layers > div:first-child {
  display: grid;
}
.game-stage-layers small {
  color: var(--muted);
}
.game-stage-layers > [data-stage-layers] {
  display: flex;
  gap: 5px;
  overflow: auto;
}
.game-stage-layers button {
  display: grid;
  grid-template-columns: auto minmax(70px, auto);
  grid-template-rows: auto auto;
  gap: 0 6px;
  min-width: 120px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}
.game-stage-layers button.active {
  border-color: var(--blue);
  background: #eef7ff;
}
.game-stage-layers button > span {
  grid-row: 1/3;
}
.game-stage-layers button > b,
.game-stage-layers button > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.component-inspector details {
  border-top: 1px solid var(--line);
  padding-top: 9px;
}
.component-inspector summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  color: #26364f;
}
.component-inspector details > label,
.component-inspector details > div {
  margin-top: 9px;
}
.inspector-type > div:last-child {
  display: flex;
  gap: 3px;
}
.inspector-type button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  font-weight: 900;
}
.inspector-type small {
  display: block;
  color: var(--blue);
}
.inspector-color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.inspector-color-grid input {
  height: 40px;
  padding: 3px;
}
.component-inspector select {
  width: 100%;
  border: 1px solid #ccd4df;
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}
.component-inspector textarea {
  resize: vertical;
}
.hotspot-inspector {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid #b8d8f5;
  border-radius: 10px;
  background: #f4f9ff;
}
.hotspot-inspector h3 {
  margin: 0;
  font-size: 13px;
}
.hotspot-inspector > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
.hotspot-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.hotspot-tools button {
  min-height: 40px;
  border: 1px solid #b9c9da;
  border-radius: 7px;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}
.hotspot-tools button.active {
  background: var(--blue);
  color: #fff;
}
.hotspot-list {
  display: grid;
  gap: 5px;
}
.hotspot-list article {
  display: grid;
  grid-template-columns: 22px 1fr auto 30px 30px;
  align-items: center;
  gap: 4px;
}
.hotspot-list article > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #071426;
  color: #fff;
  font-size: 10px;
}
.hotspot-list article > label {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
}
.hotspot-list article input {
  min-width: 0;
  padding: 5px;
}
.hotspot-list article input[type="color"] {
  width: 30px;
  height: 30px;
  padding: 2px;
}
.hotspot-list article button {
  height: 30px;
  border: 0;
  border-radius: 6px;
  color: #b9382b;
}
.builder-row-card {
  grid-template-columns: 30px 1fr 1fr 1fr 1fr auto;
}
.builder-row-card .field-default {
  grid-column: 2/6;
}
.builder-row-card textarea {
  width: 100%;
  border: 1px solid #ccd4df;
  border-radius: 8px;
  padding: 9px;
  resize: vertical;
}
@media (max-width: 1400px) {
  .game-builder-workspace[data-builder-panel="scene"] {
    grid-template-columns: 190px minmax(480px, 1fr);
  }
  .component-inspector {
    grid-column: 1/-1;
    position: static;
    max-height: none;
  }
  .component-inspector > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
  .component-inspector .inspector-type,
  .component-inspector .danger-text {
    grid-column: 1/-1;
  }
  .hotspot-inspector {
    grid-column: 1/-1;
  }
}
@media (max-width: 800px) {
  .game-builder-workspace[data-builder-panel="scene"] {
    grid-template-columns: 1fr;
  }
  .game-stage-frame {
    min-height: 300px;
    padding: 6px;
  }
  .stage-toolbar > strong {
    width: 100%;
  }
  .stage-devices {
    order: 2;
  }
  .game-stage-layers {
    grid-template-columns: 1fr;
  }
  .component-inspector > div {
    display: grid;
    grid-template-columns: 1fr;
  }
  .builder-row-card {
    grid-template-columns: 1fr;
  }
  .builder-row-card .field-default {
    grid-column: auto;
  }
  .game-stage-viewport.viewport-mobile {
    width: 100%;
  }
}

/* Visual quiz content studio v0.12.0 */
.dynamic-quiz-fields > [data-content-fields] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.visual-content-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 11px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(7, 20, 38, 0.035);
}
.visual-content-field.visual-content-hotspot-map,
.visual-content-field.visual-content-hotspots,
.visual-content-field.visual-content-story-graph,
.visual-content-field.visual-content-map-nodes,
.visual-content-field.visual-content-maze-grid,
.visual-content-field.visual-content-adventure-scene,
.visual-content-field.visual-content-lines,
.visual-content-field.visual-content-pairs,
.visual-content-field.visual-content-json {
  grid-column: 1/-1;
}
.visual-field-heading > div {
  display: grid;
  gap: 3px;
}
.visual-field-heading strong {
  font-size: 14px;
}
.visual-field-heading small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.visual-field-body {
  min-width: 0;
  display: grid;
  gap: 9px;
}
.visual-field-body > input,
.visual-field-body > textarea,
.visual-field-body > select,
.visual-content-field input:not([type="checkbox"]):not([type="color"]),
.visual-content-field textarea,
.visual-content-field select {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  padding: 9px 11px;
  font: inherit;
}
.visual-content-field input[type="color"] {
  width: 38px;
  height: 38px;
  padding: 3px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}
.visual-content-field button {
  touch-action: manipulation;
}
.visual-add {
  justify-self: start;
  min-height: 38px;
  border: 1px dashed #8cb8e3;
  border-radius: 9px;
  background: #eff8ff;
  color: #075fac;
  padding: 7px 12px;
  font-weight: 850;
}
.visual-list-row,
.visual-pair-row,
.map-node-list article {
  display: grid;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  padding: 7px;
  border: 1px solid #e1e7ee;
  border-radius: 10px;
  background: #f8fafc;
}
.visual-list-row {
  grid-template-columns: 22px minmax(0, 1fr) 34px 34px 34px;
}
.visual-pair-row {
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 34px;
}
.visual-list-row > span,
.visual-pair-row > span {
  color: #728095;
  text-align: center;
}
.visual-list-row button,
.visual-pair-row button,
.map-node-list button,
.story-graph header button,
.hotspot-editor-list button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: #a5362c;
  font-weight: 900;
}
.visual-pair-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-left: 35px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hotspot-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.hotspot-editor-toolbar > div {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f3f6f9;
}
.hotspot-editor-toolbar button,
.maze-tools button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 850;
}
.hotspot-editor-toolbar button.active,
.maze-tools button.active {
  background: #071426;
  color: #fff;
}
.hotspot-editor-toolbar > span {
  color: var(--muted);
  font-size: 11px;
}
.hotspot-editor-canvas {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 300px;
  border: 1px solid #cbd5df;
  border-radius: 13px;
  background-color: #dfe5ec;
  background-image:
    linear-gradient(45deg, #d4dbe4 25%, transparent 25%),
    linear-gradient(-45deg, #d4dbe4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d4dbe4 75%),
    linear-gradient(-45deg, transparent 75%, #d4dbe4 75%);
  background-size: 18px 18px;
  background-position:
    0 0,
    0 9px,
    9px -9px,
    -9px 0;
  touch-action: none;
}
.hotspot-editor-canvas img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 650px;
  display: block;
  object-fit: contain;
}
.hotspot-editor-canvas svg {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}
.hotspot-editor-canvas svg g {
  fill: color-mix(in srgb, var(--spot-color, #0a78ec) 23%, transparent);
  stroke: var(--spot-color, #0a78ec);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.hotspot-editor-canvas svg text {
  fill: #071426;
  stroke: #fff;
  stroke-width: 3;
  paint-order: stroke;
  font: 900 24px/1 sans-serif;
  text-anchor: middle;
  dominant-baseline: middle;
}
.hotspot-editor-list {
  display: grid;
  gap: 6px;
}
.hotspot-editor-list article {
  display: grid;
  grid-template-columns: 30px minmax(120px, 1fr) 120px auto 40px 34px;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid #e1e6ed;
  border-radius: 10px;
  background: #f8fafc;
}
.hotspot-editor-list article > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #071426;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.hotspot-editor-list article > label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  white-space: nowrap;
}
.story-graph {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 11px;
}
.story-graph article {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f6f9fc);
}
.story-graph header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 32px;
  align-items: center;
  gap: 7px;
}
.story-graph label {
  display: grid;
  gap: 4px;
  color: #445269;
  font-size: 11px;
}
.story-graph header label {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.story-graph small {
  display: block;
  color: var(--muted);
}
.map-node-editor {
  position: relative;
  isolation: isolate;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid #cbd5df;
  border-radius: 14px;
  background-color: #e9eef5;
  background-position: center;
  background-size: cover;
  touch-action: none;
}
.map-node-editor > span {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  z-index: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(7, 20, 38, 0.78);
  color: #fff;
  font-size: 10px;
  pointer-events: none;
}
.map-node-editor > button {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  min-width: 54px;
  min-height: 44px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  padding: 6px 10px;
  box-shadow: 0 6px 16px rgba(7, 20, 38, 0.25);
  font-size: 11px;
  font-weight: 900;
  cursor: grab;
  touch-action: none;
}
.map-node-editor > button:active {
  cursor: grabbing;
}
.map-node-list {
  display: grid;
  gap: 6px;
}
.map-node-list article {
  grid-template-columns:
    minmax(100px, 1.3fr) minmax(90px, 1fr) minmax(90px, 1fr)
    auto 34px;
  margin: 0;
}
.map-node-list label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  white-space: nowrap;
}
.maze-tools {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f3f6f9;
}
.maze-grid-editor {
  --maze-editor-columns: 10;
  display: grid;
  grid-template-columns: repeat(var(--maze-editor-columns), minmax(24px, 1fr));
  gap: 2px;
  max-width: 900px;
  overflow: auto;
  padding: 7px;
  border-radius: 12px;
  background: #071426;
  touch-action: none;
}
.maze-grid-editor button {
  aspect-ratio: 1;
  min-width: 24px;
  border: 0;
  border-radius: 3px;
  padding: 0;
}
.maze-grid-editor .cell-wall {
  background: #263852;
}
.maze-grid-editor .cell-path {
  background: #fff;
}
.maze-grid-editor .cell-start {
  background: #c8f000;
  color: #071426;
}
.maze-grid-editor .cell-goal {
  background: #ff6e50;
  color: #fff;
}
.visual-content-field textarea.invalid {
  outline: 3px solid #ef5a4c55;
  border-color: #d93729;
}
@media (max-width: 760px) {
  .dynamic-quiz-fields > [data-content-fields] {
    grid-template-columns: 1fr;
  }
  .visual-content-field {
    grid-column: 1 !important;
    padding: 12px;
  }
  .hotspot-editor-canvas {
    min-height: 220px;
  }
  .hotspot-editor-list article {
    grid-template-columns: 28px minmax(0, 1fr) 95px 38px 32px;
  }
  .hotspot-editor-list article > label {
    grid-column: 2/4;
  }
  .map-node-editor {
    min-height: 300px;
  }
  .map-node-list article {
    grid-template-columns: 1fr 1fr;
  }
  .map-node-list article > button {
    justify-self: end;
  }
  .visual-pair-head {
    display: none;
  }
  .visual-pair-row {
    grid-template-columns: 25px 1fr 34px;
  }
  .visual-pair-row input:nth-of-type(2) {
    grid-column: 2;
  }
  .story-graph {
    grid-template-columns: 1fr;
  }
  .maze-grid-editor {
    grid-template-columns: repeat(
      var(--maze-editor-columns),
      minmax(20px, 1fr)
    );
  }
  .maze-grid-editor button {
    min-width: 20px;
  }
}
.inspector-transparency {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.inspector-transparency button {
  min-height: 34px;
  border: 1px solid #cad4df;
  border-radius: 7px;
  background: #fff;
  color: #536176;
  font-size: 9px;
  font-weight: 850;
}
.inspector-transparency button.active {
  border-color: #78afe3;
  background: #eff8ff;
  color: #075fac;
}
.stage-component-shape[data-shape="circle"] {
  border-radius: 50% !important;
}
.stage-component-shape[data-shape="diamond"] {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* Independent mobile UI and app shell v0.9.0 */
.builder-layout-mobile {
  display: none;
}
.app-ui-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px !important;
  z-index: 20;
}
.app-ui-header.is-sticky {
  position: sticky;
  top: 0;
}
.app-ui-header > a,
.app-ui-header-spacer {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: #071426;
  font-size: 21px;
  font-weight: 900;
}
.app-ui-header-spacer {
  visibility: hidden;
}
.app-ui-header > div {
  text-align: center;
  min-width: 0;
}
.app-ui-header small {
  display: block;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}
.app-ui-header h1 {
  font: 800 20px/1.15 "Libre Franklin";
  letter-spacing: -0.5px;
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-ui-navigation {
  display: grid;
  gap: 8px;
  background: #fff;
}
.app-ui-navigation a {
  display: grid;
  place-items: center;
  gap: 4px;
  min-width: 0;
  color: #647187;
  font-weight: 800;
}
.app-ui-navigation a > span {
  font-size: 21px;
  line-height: 1;
}
.app-ui-navigation a > small {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.app-ui-navigation a.active {
  color: var(--blue);
}
.app-ui-navigation-tabs {
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  border-bottom: 1px solid var(--line);
  padding: 8px !important;
}
.app-ui-navigation-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px !important;
  background: transparent;
}
.app-ui-navigation-grid a {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
}
@media (max-width: 600px) {
  .builder-layout-mobile {
    display: block;
    min-height: calc(100dvh - 72px);
    padding: 0 0 calc(88px + env(safe-area-inset-bottom));
    background: #f4f7fb;
  }
  .builder-layout-mobile.custom-page {
    max-width: none;
  }
  body:has(.builder-layout-mobile) .builder-layout-desktop {
    display: none;
  }
  body:has(.builder-layout-mobile .page-block-app_header) .site-header {
    display: none;
  }
  body:has(.builder-layout-mobile .app-ui-navigation-bottom) .site-footer {
    display: none;
  }
  body:has(.builder-layout-mobile .page-block-app_header)
    .builder-layout-mobile {
    min-height: 100dvh;
  }
  .builder-layout-mobile .page-section {
    max-width: none;
  }
  .builder-layout-mobile .page-block {
    margin: 0;
  }
  .builder-layout-mobile .page-section-column > .page-block {
    margin-bottom: 12px;
  }
  .builder-layout-mobile .page-section-column > .page-block:last-child {
    margin-bottom: 0;
  }
  .app-ui-navigation-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    padding: 9px 10px calc(9px + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 28px rgba(7, 20, 38, 0.09);
  }
  .app-ui-navigation-bottom a {
    min-height: 48px;
  }
  .app-ui-navigation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .builder-layout-mobile .quiz-showcase-carousel {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    gap: 13px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    padding: 2px 2px 12px;
    scrollbar-width: none;
  }
  .builder-layout-mobile .quiz-showcase-carousel::-webkit-scrollbar {
    display: none;
  }
  .builder-layout-mobile .quiz-showcase-carousel > .quiz-showcase-card {
    scroll-snap-align: start;
  }
  .builder-layout-mobile .quiz-showcase-heading {
    align-items: center;
  }
  .builder-layout-mobile .quiz-showcase-heading h2 {
    font-size: 24px;
  }
}

/* Rich mobile app home v0.9.2 */
@media (max-width: 600px) {
  .builder-layout-mobile {
    background:
      radial-gradient(
        circle at 90% 8%,
        rgba(200, 240, 0, 0.18),
        transparent 24%
      ),
      linear-gradient(180deg, #f7f9fc 0, #eef3f8 100%);
  }
  .builder-layout-mobile .section-padding-small {
    padding: 14px;
  }
  .builder-layout-mobile .page-section-column > .page-block {
    margin-bottom: 14px;
  }
  .builder-layout-mobile .app-ui-header {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    border-bottom-color: rgba(214, 222, 231, 0.7);
    padding-top: calc(10px + env(safe-area-inset-top)) !important;
  }
  .builder-layout-mobile .app-ui-header > a {
    background: #071426;
    color: #fff;
    border-radius: 50%;
  }
  .builder-layout-mobile .app-ui-header h1 {
    font-size: 21px;
  }
  .builder-layout-mobile .app-ui-header small {
    color: #647187;
  }
  .builder-layout-mobile .page-block-hero > .hero-with-media {
    display: grid;
    padding: 18px !important;
    border: 1px solid #e8dfd0;
    border-radius: 25px;
    background: linear-gradient(145deg, #fffdf8, #fff7e8);
    box-shadow: 0 14px 34px rgba(35, 48, 67, 0.09);
    overflow: hidden;
  }
  .builder-layout-mobile .page-block-hero .hero-builder-media {
    order: -1;
    min-height: 160px;
    height: 160px;
    margin: -8px -8px 14px;
    border-radius: 19px;
    background: linear-gradient(135deg, #e8f4ff, #fff2df);
    overflow: hidden;
  }
  .builder-layout-mobile .page-block-hero .hero-builder-media img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 19px;
  }
  .builder-layout-mobile .page-block-hero .eyebrow {
    font-size: 10px;
    letter-spacing: 1.2px;
    margin: 0 0 7px;
  }
  .builder-layout-mobile .page-block-hero .hero-with-media h1 {
    font-size: 32px;
    line-height: 1;
    letter-spacing: -1.7px;
  }
  .builder-layout-mobile .page-block-hero .block-lead {
    font-size: 14px;
    line-height: 1.45;
    margin: 12px 0 16px;
  }
  .builder-layout-mobile .page-block-hero .hero-builder-cta {
    width: 100%;
    justify-content: center;
    min-height: 50px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(164, 197, 0, 0.22);
  }
  .builder-layout-mobile .builder-dashboard {
    border: 0;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(35, 48, 67, 0.08);
  }
  .builder-layout-mobile .dashboard-heading {
    padding: 20px 20px 9px;
    background: linear-gradient(135deg, #fff, #f7fbff);
  }
  .builder-layout-mobile .dashboard-heading h2 {
    font-size: 20px;
  }
  .builder-layout-mobile .dashboard-heading-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  .builder-layout-mobile .dashboard-widgets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 9px 12px 12px;
  }
  .builder-layout-mobile .dashboard-widget {
    border: 0 !important;
    border-radius: 16px;
    padding: 13px !important;
    background: #f4f8fc;
  }
  .builder-layout-mobile .dashboard-widget.tone-lime {
    background: #f3fad8;
  }
  .builder-layout-mobile .dashboard-widget-icon {
    width: 36px;
    height: 36px;
    font-size: 21px;
  }
  .builder-layout-mobile .dashboard-widget-copy > strong {
    font-size: 24px;
  }
  .builder-layout-mobile .dashboard-widget-copy > small {
    font-size: 11px;
  }
  .builder-layout-mobile .widget-action {
    grid-column: 1/-1 !important;
    background: #071426 !important;
  }
  .builder-layout-mobile .widget-action a {
    padding: 2px 3px;
    color: #fff;
  }
  .builder-layout-mobile .widget-action i {
    color: var(--lime);
  }
  .builder-layout-mobile .quiz-showcase-heading {
    padding: 5px 2px 0;
  }
  .builder-layout-mobile .quiz-showcase-heading h2 {
    font-size: 24px;
    letter-spacing: -0.8px;
  }
  .builder-layout-mobile .quiz-showcase-card {
    border: 0;
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(35, 48, 67, 0.08);
  }
  .builder-layout-mobile .quiz-card-media {
    height: 155px;
    border-radius: 15px;
  }
  .builder-layout-mobile .quiz-card-copy {
    padding: 13px 15px;
  }
  .builder-layout-mobile .quiz-card-copy p {
    height: 38px;
  }
  .builder-layout-mobile .quiz-showcase-carousel {
    grid-auto-columns: 86%;
    margin-right: -14px;
  }
  .builder-layout-mobile .page-block-button .block-inner {
    padding: 8px 0;
  }
  .builder-layout-mobile .page-block-button .button {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
  }
  .builder-layout-mobile .app-ui-navigation-bottom {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-top: 0;
    box-shadow: 0 -12px 30px rgba(24, 39, 58, 0.11);
    padding-inline: 8px !important;
  }
  .builder-layout-mobile .app-ui-navigation-bottom a {
    border-radius: 16px;
  }
  .builder-layout-mobile .app-ui-navigation-bottom a.active {
    background: #edf6ff;
  }
  .builder-layout-mobile .app-ui-navigation-bottom a.active > span {
    transform: translateY(-1px);
  }
}

/* Mobile spacing and icon safety v0.9.3 */
@media (max-width: 600px) {
  .builder-layout-mobile .page-section-column > .page-block {
    margin-bottom: 18px;
  }
  .builder-layout-mobile .page-section-column > .page-block:last-child {
    margin-bottom: 0;
  }
  .builder-layout-mobile .app-ui-header {
    min-height: 74px;
    padding: 12px 16px !important;
    column-gap: 14px;
  }
  .builder-layout-mobile .app-ui-header > a,
  .builder-layout-mobile .app-ui-header-spacer {
    width: 42px;
    height: 42px;
    flex: none;
    font-size: 19px;
    line-height: 1;
  }
  .builder-layout-mobile .app-ui-header > div {
    display: grid;
    align-content: center;
    gap: 3px;
  }
  .builder-layout-mobile .app-ui-header small {
    line-height: 1.2;
    margin: 0;
  }
  .builder-layout-mobile .app-ui-header h1 {
    font:
      700 20px/1.2 "DM Sans",
      system-ui,
      sans-serif;
    letter-spacing: -0.35px;
    margin: 0;
  }
  .builder-layout-mobile .page-block-hero .hero-builder-copy {
    display: grid;
    align-content: start;
  }
  .builder-layout-mobile .page-block-hero .eyebrow {
    line-height: 1.35;
    margin-bottom: 9px;
  }
  .builder-layout-mobile .page-block-hero .hero-with-media h1 {
    font-size: clamp(29px, 8.2vw, 34px);
    line-height: 1.06;
    letter-spacing: -1.25px;
  }
  .builder-layout-mobile .page-block-hero .block-lead {
    margin: 14px 0 18px;
  }
  .builder-layout-mobile .page-block-hero .block-lead p {
    margin: 0;
  }
  .builder-layout-mobile .page-block-hero .hero-builder-cta {
    gap: 9px;
    padding-inline: 12px;
    font-size: clamp(13px, 3.9vw, 15px);
    line-height: 1.2;
    white-space: nowrap;
  }
  .builder-layout-mobile .page-block-hero .hero-builder-cta > span {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    flex: 0 0 27px;
    border-radius: 50%;
    background: #071426;
    color: #fff;
    font-size: 10px;
    line-height: 1;
  }
  .builder-layout-mobile .dashboard-heading {
    min-height: 76px;
    padding: 20px 20px 14px;
    gap: 16px;
  }
  .builder-layout-mobile .dashboard-heading h2 {
    font:
      700 20px/1.2 "DM Sans",
      system-ui,
      sans-serif;
    letter-spacing: -0.35px;
    overflow-wrap: anywhere;
  }
  .builder-layout-mobile .dashboard-heading-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    line-height: 1;
  }
  .builder-layout-mobile .dashboard-widgets {
    gap: 11px;
    padding: 10px 14px 14px;
  }
  .builder-layout-mobile .dashboard-widget {
    min-width: 0;
    overflow: hidden;
  }
  .builder-layout-mobile .widget-metric {
    display: flex;
    min-height: 132px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    padding: 14px !important;
  }
  .builder-layout-mobile .widget-metric .dashboard-widget-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    font-size: 19px;
    line-height: 1;
  }
  .builder-layout-mobile .widget-metric .dashboard-widget-copy {
    width: 100%;
    display: grid;
    gap: 3px;
    align-content: start;
  }
  .builder-layout-mobile .widget-metric .dashboard-widget-copy > small {
    font-size: 11px;
    line-height: 1.25;
  }
  .builder-layout-mobile .widget-metric .dashboard-widget-copy > strong {
    font-size: 23px;
    line-height: 1.08;
    white-space: nowrap;
  }
  .builder-layout-mobile .widget-metric .dashboard-widget-copy > p {
    font-size: 12px;
    line-height: 1.3;
    margin: 1px 0 0;
    overflow-wrap: anywhere;
  }
  .builder-layout-mobile .widget-action {
    min-height: 62px;
    padding: 0 14px !important;
  }
  .builder-layout-mobile .widget-action a {
    width: 100%;
    min-height: 62px;
    gap: 14px;
    padding: 10px 2px;
    line-height: 1.3;
  }
  .builder-layout-mobile .widget-action a > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .builder-layout-mobile .widget-action i {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    line-height: 1;
  }
  .builder-layout-mobile .quiz-showcase-heading {
    align-items: flex-start;
    gap: 12px;
    padding: 7px 2px 4px;
  }
  .builder-layout-mobile .quiz-showcase-heading h2 {
    min-width: 0;
    font-size: clamp(21px, 6vw, 24px);
    line-height: 1.15;
    margin: 0;
  }
  .builder-layout-mobile .quiz-showcase-heading > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    padding-top: 4px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
  }
  .builder-layout-mobile .quiz-showcase-heading > a span {
    margin: 0;
    font-size: 18px;
    line-height: 1;
  }
  .builder-layout-mobile .quiz-showcase-carousel {
    padding-top: 8px;
  }
  .builder-layout-mobile .app-ui-navigation-bottom {
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom)) !important;
  }
  .builder-layout-mobile .app-ui-navigation-bottom a {
    min-height: 58px;
    align-content: center;
    gap: 5px;
    padding: 5px 3px;
  }
  .builder-layout-mobile .app-ui-navigation-bottom a > span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font-size: 19px;
    line-height: 1;
    transform: none !important;
  }
  .builder-layout-mobile .app-ui-navigation-bottom a > small {
    font-size: 10px;
    line-height: 1.2;
  }
}
@media (max-width: 350px) {
  .builder-layout-mobile .section-padding-small {
    padding-inline: 12px;
  }
  .builder-layout-mobile .page-block-hero > .hero-with-media {
    padding: 16px !important;
  }
  .builder-layout-mobile .page-block-hero .hero-builder-media {
    margin: -6px -6px 15px;
  }
  .builder-layout-mobile .dashboard-heading {
    padding-inline: 18px;
  }
  .builder-layout-mobile .dashboard-widgets {
    padding-inline: 12px;
    gap: 9px;
  }
  .builder-layout-mobile .widget-metric {
    min-height: 136px;
    padding: 12px !important;
  }
  .builder-layout-mobile .widget-metric .dashboard-widget-copy > strong {
    font-size: 21px;
  }
  .builder-layout-mobile .quiz-showcase-heading > a {
    font-size: 11px;
  }
}

/* Native app shell and profile composition v0.9.4 */
.app-ui-header svg,
.app-ui-navigation svg,
.dashboard-heading-icon svg {
  width: 1em;
  height: 1em;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-ui-brand {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  font:
    800 29px/1 "Libre Franklin",
    sans-serif;
  letter-spacing: -2.2px;
  color: #091630;
}
.app-ui-brand strong {
  font: inherit;
}
.app-ui-brand em {
  font:
    800 16px/1 "Libre Franklin",
    sans-serif;
  letter-spacing: -0.8px;
  color: var(--blue);
  font-style: normal;
  margin-left: 1px;
}
.app-ui-page-label {
  display: block;
  margin-top: 4px;
  color: #647187;
  font:
    700 10px/1.2 "DM Sans",
    sans-serif;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}
@media (max-width: 600px) {
  .builder-layout-mobile .app-ui-header {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    min-height: 82px;
  }
  .builder-layout-mobile .app-ui-header > a,
  .builder-layout-mobile .app-ui-header-spacer {
    width: 46px;
    height: 46px;
  }
  .builder-layout-mobile .app-ui-header > a svg {
    width: 25px;
    height: 25px;
  }
  .builder-layout-mobile .app-ui-header.has-status-bubble {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 7px;
  }
  .builder-layout-mobile
    .app-ui-header.has-status-bubble
    > .app-ui-header-title {
    text-align: left;
    justify-items: start;
  }
  .builder-layout-mobile .app-ui-header.has-status-bubble .app-ui-brand {
    justify-content: flex-start;
  }
  .builder-layout-mobile .app-ui-header.has-status-bubble .app-ui-page-label {
    width: 100%;
    text-align: center;
  }
  .builder-layout-mobile .app-ui-header > .app-ui-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    text-align: right;
  }
  .builder-layout-mobile .app-ui-header-actions > a.app-ui-profile-action {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    background: #071426;
    color: #fff;
    border-radius: 50%;
  }
  .builder-layout-mobile .app-ui-header-actions > a.app-ui-profile-action svg {
    width: 24px;
    height: 24px;
  }
  .builder-layout-mobile .app-ui-header-actions > a.app-ui-status-bubble {
    width: auto;
    min-width: 108px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 5px 8px;
    background: #071426;
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(7, 20, 38, 0.16);
  }
  .builder-layout-mobile .app-ui-status-bubble > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 0 7px;
    font:
      800 13px/1 "DM Sans",
      sans-serif;
    letter-spacing: -0.2px;
    white-space: nowrap;
  }
  .builder-layout-mobile .app-ui-status-bubble > span + span {
    border-left: 1px solid rgba(255, 255, 255, 0.22);
  }
  .builder-layout-mobile .app-ui-status-bubble svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px;
  }
  .builder-layout-mobile .app-status-points svg {
    color: #6fc2ff;
  }
  .builder-layout-mobile .app-status-streak svg {
    color: #c7f500;
    fill: currentColor;
    stroke-width: 1.4;
  }
  .builder-layout-mobile .app-ui-header-title {
    gap: 0;
  }
  .builder-layout-mobile .app-ui-brand {
    font-size: 30px;
    letter-spacing: -2.4px;
  }
  .builder-layout-mobile .app-ui-brand em {
    font-size: 17px;
  }
  .builder-layout-mobile .app-ui-navigation-bottom {
    min-height: 78px;
  }
  .builder-layout-mobile .app-ui-navigation-bottom a {
    min-height: 64px;
    gap: 6px;
    padding: 5px 3px;
  }
  .builder-layout-mobile .app-ui-navigation-bottom a > .app-nav-icon {
    width: 34px;
    height: 34px;
    font-size: 28px;
    border-radius: 12px;
  }
  .builder-layout-mobile .app-ui-navigation-bottom a > .app-nav-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.9;
  }
  .builder-layout-mobile .app-ui-navigation-bottom a.active > .app-nav-icon {
    background: #dceeff;
    color: var(--blue);
  }
  .builder-layout-mobile .app-ui-navigation-bottom a > small {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
  }
  .builder-layout-mobile .dashboard-heading-icon svg {
    width: 24px;
    height: 24px;
  }
  .builder-layout-mobile .dashboard-variant-profile,
  .builder-layout-mobile .dashboard-variant-progress {
    overflow: visible;
    border-radius: 26px;
  }
  .builder-layout-mobile .dashboard-variant-profile .dashboard-heading {
    min-height: 92px;
    padding: 24px 22px 16px;
    background: linear-gradient(135deg, #fff, #edf7ff);
  }
  .builder-layout-mobile .dashboard-variant-profile .dashboard-heading h2 {
    font-size: 24px;
    line-height: 1.15;
  }
  .builder-layout-mobile .dashboard-variant-profile .dashboard-heading-icon {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    background: #071426;
    color: #fff;
  }
  .builder-layout-mobile
    .dashboard-variant-profile
    .dashboard-heading-icon
    svg {
    width: 27px;
    height: 27px;
  }
  .builder-layout-mobile .dashboard-variant-profile .dashboard-widgets {
    padding: 6px 14px 16px;
  }
  .builder-layout-mobile .dashboard-variant-profile .widget-text {
    grid-column: 1/-1;
    display: block;
    min-height: 0;
    padding: 15px 14px !important;
    border: 0;
    border-radius: 17px;
    background: #f6f8fb;
    overflow: visible;
  }
  .builder-layout-mobile
    .dashboard-variant-profile
    .widget-text
    .dashboard-widget-copy {
    display: grid;
    gap: 4px;
    width: 100%;
  }
  .builder-layout-mobile
    .dashboard-variant-profile
    .widget-text
    .dashboard-widget-copy
    > small {
    font-size: 12px;
    line-height: 1.3;
    color: #526076;
  }
  .builder-layout-mobile
    .dashboard-variant-profile
    .widget-text
    .dashboard-widget-copy
    > strong {
    font:
      700 15px/1.35 "DM Sans",
      sans-serif;
    letter-spacing: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .builder-layout-mobile
    .dashboard-variant-profile
    .widget-text
    .dashboard-widget-copy
    > p {
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    color: #7b8797;
  }
  .builder-layout-mobile .dashboard-variant-profile .widget-metric {
    min-height: 128px;
  }
  .builder-layout-mobile .dashboard-variant-progress .dashboard-heading {
    padding-bottom: 16px;
  }
  .builder-layout-mobile .dashboard-variant-progress .dashboard-widgets {
    display: grid;
    grid-template-columns: 1fr;
    padding: 4px 14px 16px;
    gap: 12px;
  }
  .builder-layout-mobile .dashboard-variant-progress .dashboard-widget {
    grid-column: 1/-1 !important;
    border: 0;
    border-radius: 17px;
    background: #f6f8fb;
    overflow: visible;
  }
  .builder-layout-mobile .dashboard-variant-progress .widget-week {
    padding: 16px !important;
    background: #f4fad9;
  }
  .builder-layout-mobile .dashboard-variant-progress .dashboard-widget-label {
    display: block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
  }
  .builder-layout-mobile .dashboard-variant-progress .dashboard-week {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    margin-top: 0;
  }
  .builder-layout-mobile .dashboard-variant-progress .dashboard-week span {
    gap: 8px;
    min-width: 0;
  }
  .builder-layout-mobile .dashboard-variant-progress .dashboard-week i {
    width: 30px;
    height: 30px;
    max-width: 100%;
  }
  .builder-layout-mobile .dashboard-variant-progress .widget-progress {
    padding: 17px !important;
  }
  .builder-layout-mobile .dashboard-variant-progress .widget-progress > p {
    font-size: 12px;
    line-height: 1.45;
    margin: 9px 0 0;
    color: var(--muted);
  }
  .builder-layout-mobile .dashboard-variant-progress .widget-action {
    padding-inline: 15px !important;
    background: #071426;
    color: #fff;
  }
  .builder-layout-mobile .dashboard-variant-progress .widget-action a {
    color: #fff;
  }
  .builder-layout-mobile .page-block-links > .block-inner {
    padding: 5px 0;
  }
  .builder-layout-mobile .page-block-links h2 {
    font:
      700 22px/1.2 "DM Sans",
      sans-serif;
    letter-spacing: -0.5px;
    margin: 0 2px 13px;
  }
  .builder-layout-mobile .page-block-links .builder-link-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0;
    border: 1px solid #e1e7ee;
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(35, 48, 67, 0.06);
  }
  .builder-layout-mobile .page-block-links .builder-link {
    min-height: 68px;
    padding: 14px 17px;
    border: 0;
    border-bottom: 1px solid #edf0f3;
    border-radius: 0;
    background: transparent;
  }
  .builder-layout-mobile .page-block-links .builder-link:last-child {
    border-bottom: 0;
  }
  .builder-layout-mobile .page-block-links .builder-link strong {
    font-size: 15px;
    line-height: 1.3;
  }
  .builder-layout-mobile .page-block-links .builder-link p {
    font-size: 12px;
    line-height: 1.35;
    margin-top: 3px;
  }
  .builder-layout-mobile .page-block-links .builder-link > span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    border-radius: 50%;
    background: #edf6ff;
    font-size: 19px;
  }
}
@media (max-width: 350px) {
  .builder-layout-mobile .app-ui-brand {
    font-size: 24px;
  }
  .builder-layout-mobile .app-ui-brand em {
    font-size: 13px;
  }
  .builder-layout-mobile .app-ui-header.has-status-bubble {
    grid-template-columns: 0 minmax(0, 1fr) auto;
    gap: 6px;
  }
  .builder-layout-mobile
    .app-ui-header.has-status-bubble
    > .app-ui-header-spacer {
    width: 0;
  }
  .builder-layout-mobile .app-ui-header-actions {
    gap: 4px;
  }
  .builder-layout-mobile .app-ui-header-actions > a.app-ui-profile-action {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  .builder-layout-mobile .app-ui-header-actions > a.app-ui-status-bubble {
    min-width: 99px;
    padding-inline: 5px;
  }
  .builder-layout-mobile .app-ui-status-bubble > span {
    padding-inline: 4px;
    font-size: 12px;
  }
  .builder-layout-mobile .app-ui-navigation-bottom a > .app-nav-icon {
    width: 32px;
    height: 32px;
  }
  .builder-layout-mobile .app-ui-navigation-bottom a > .app-nav-icon svg {
    width: 26px;
    height: 26px;
  }
  .builder-layout-mobile .dashboard-variant-progress .dashboard-week {
    gap: 3px;
  }
  .builder-layout-mobile .dashboard-variant-progress .dashboard-week span {
    gap: 6px;
  }
  .builder-layout-mobile .dashboard-variant-progress .dashboard-week i {
    width: 22px;
    height: 22px;
  }
}

/* Centered mobile brand with compact status bubble v0.9.4-5 */
@media (max-width: 600px) {
  .builder-layout-mobile .app-ui-header.has-status-bubble {
    position: relative;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .builder-layout-mobile .app-ui-header.has-status-bubble.is-sticky {
    position: sticky;
  }
  .builder-layout-mobile
    .app-ui-header.has-status-bubble
    > .app-ui-header-spacer {
    display: none;
  }
  .builder-layout-mobile
    .app-ui-header.has-status-bubble
    > .app-ui-header-title {
    position: absolute;
    left: 50%;
    width: auto;
    transform: translateX(-50%);
    text-align: center;
    justify-items: center;
  }
  .builder-layout-mobile .app-ui-header.has-status-bubble .app-ui-brand {
    justify-content: center;
  }
  .builder-layout-mobile
    .app-ui-header.has-status-bubble
    > .app-ui-header-actions {
    grid-column: 2;
    justify-self: end;
  }
}
@media (max-width: 350px) {
  .builder-layout-mobile .app-ui-header-actions > a.app-ui-status-bubble {
    min-width: 76px;
    height: 36px;
    padding: 2px;
  }
  .builder-layout-mobile .app-ui-status-bubble > span {
    gap: 2px;
    padding: 0 2px;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
  }
  .builder-layout-mobile .app-ui-status-bubble svg {
    width: 12px !important;
    height: 12px !important;
    flex-basis: 12px;
  }
}

/* Modular app-header canvas v0.9.5 */
.app-ui-header.app-ui-header-modular {
  min-height: var(--app-header-height, 82px);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  padding: 8px var(--app-header-padding, 16px) !important;
  background: var(--app-header-bg, #fff);
  border-bottom: 1px solid var(--app-header-border, #e1e7ee);
  position: relative;
}
.app-ui-header.app-ui-header-modular.is-sticky {
  position: sticky;
  top: 0;
}
.app-ui-header-modular > .app-header-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-align: initial;
}
.app-ui-header-modular > .app-header-slot-left {
  justify-content: flex-start;
}
.app-ui-header-modular > .app-header-slot-center {
  justify-content: center;
}
.app-ui-header-modular > .app-header-slot-right {
  justify-content: flex-end;
}
.app-header-element {
  min-width: 0;
  height: var(--header-element-height, 40px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--header-element-gap, 4px);
  padding-inline: var(--header-element-padding, 0);
  border-radius: var(--header-element-radius, 0);
  background: var(--header-element-bg, transparent);
  color: var(--header-element-color, #091630);
  font:
    800 var(--header-element-font-size, 14px) / 1 "DM Sans",
    sans-serif;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
}
.app-header-element-brand {
  display: grid;
  grid-template-columns: auto auto;
  align-content: center;
  column-gap: 1px;
  background: transparent;
  font-family: "Libre Franklin", sans-serif;
  letter-spacing: -1.7px;
}
.app-header-element-brand > strong {
  font:
    800 var(--header-element-font-size, 24px) / 1 "Libre Franklin",
    sans-serif;
}
.app-header-element-brand > em {
  align-self: end;
  color: var(--header-element-accent, #1786ed);
  font:
    800 calc(var(--header-element-font-size, 24px) * 0.56) / 1 "Libre Franklin",
    sans-serif;
  font-style: normal;
  letter-spacing: -0.6px;
}
.app-header-element-brand > small {
  grid-column: 1/-1;
  margin-top: 3px;
  color: var(--header-element-color, #091630);
  font:
    700 9px/1.1 "DM Sans",
    sans-serif;
  letter-spacing: 0.8px;
  text-align: center;
  text-transform: uppercase;
  opacity: 0.62;
}
.app-header-element-icon {
  width: var(--header-element-height, 40px);
  padding: 0;
}
.app-header-element-icon svg,
.app-header-status-item svg {
  width: 1em;
  height: 1em;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-header-icon {
  display: grid;
  place-items: center;
  font-size: var(--header-element-font-size, 20px);
}
.app-header-element-status {
  font-variant-numeric: tabular-nums;
  box-shadow: 0 7px 20px rgba(7, 20, 38, 0.14);
}
.app-header-status-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-inline: 2px;
}
.app-header-status-item + .app-header-status-item {
  border-left: 1px solid
    color-mix(in srgb, var(--header-element-color, #fff) 25%, transparent);
  padding-left: 5px;
}
.app-header-status-item i {
  display: grid;
  place-items: center;
  color: var(--header-item-color, var(--header-element-accent, #1786ed));
  font-size: calc(var(--header-element-font-size, 11px) * 1.15);
  font-style: normal;
}
.app-header-status-item i svg {
  width: 1em;
  height: 1em;
}
.app-header-status-item strong {
  font:
    800 inherit/1 "DM Sans",
    sans-serif;
}
.app-header-element-text {
  display: grid;
  align-content: center;
}
.app-header-element-text small {
  font-size: 0.72em;
  opacity: 0.7;
}
@media (max-width: 350px) {
  .builder-layout-mobile .app-ui-header-modular {
    gap: 5px;
  }
  .builder-layout-mobile .app-ui-header-modular > .app-header-slot {
    gap: 4px;
  }
}
.app-header-status-item strong {
  font: inherit;
  font-weight: 800;
}
@media (max-width: 350px) {
  .builder-layout-mobile .app-header-element-brand > strong {
    font-size: min(var(--header-element-font-size, 24px), 18px);
    letter-spacing: -1.15px;
  }
  .builder-layout-mobile .app-header-element-brand > em {
    font-size: min(calc(var(--header-element-font-size, 24px) * 0.56), 10px);
    letter-spacing: -0.35px;
  }
  .builder-layout-mobile .app-header-element-brand > small {
    font-size: 8px;
    letter-spacing: 0.55px;
  }
  .builder-layout-mobile .app-header-element-status {
    font-size: min(var(--header-element-font-size, 11px), 9.5px);
  }
  .builder-layout-mobile .app-header-status-item {
    gap: 1px;
    padding-inline: 1px;
  }
  .builder-layout-mobile .app-header-status-item + .app-header-status-item {
    padding-left: 3px;
  }
  .builder-layout-mobile .app-header-status-item i {
    font-size: 10px;
  }
}
@media (max-width: 800px) {
  .runtime-stage .runtime-heading {
    overflow: visible;
  }
  .runtime-stage .runtime-heading h2 {
    font-size: clamp(11px, 3.1vw, 14px);
    line-height: 1.15;
    letter-spacing: -0.15px;
  }
}

/* Device-independent mini-game runtime v0.9.9 */
.runtime-stage-frame {
  display: grid;
  place-items: center;
  overflow: auto;
  overscroll-behavior: contain;
}
.runtime-stage {
  width: min(100%, var(--game-stage-max-width, 100%));
  max-width: 100%;
  margin-inline: auto;
  flex: none;
  touch-action: manipulation;
}
.runtime-stage button,
.runtime-controls button,
.plugin-branching button,
.plugin-game-map button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.runtime-stage button:focus-visible,
.runtime-controls button:focus-visible,
.runtime-stage input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--game-accent, #0a78ec) 75%, #fff);
  outline-offset: 3px;
  z-index: 20;
}
.runtime-hotspot-layer button,
.plugin-multi-hotspot button {
  inline-size: clamp(44px, var(--hotspot-size, 72px), 140px) !important;
  min-inline-size: 44px;
  min-block-size: 44px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  cursor: crosshair;
}
.runtime-hotspot-layer button::after,
.plugin-multi-hotspot button::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
}
.plugin-multi-hotspot button.found {
  opacity: 0.78;
}
.runtime-image-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.runtime-image-target {
  cursor: crosshair;
  outline: none;
}
.runtime-image-target-hit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 24px;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
}
.runtime-image-target-visual {
  fill: transparent;
  stroke: transparent;
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  transition:
    fill 0.14s ease,
    stroke 0.14s ease;
}
.runtime-image-target:hover .runtime-image-target-visual,
.runtime-image-target:focus-visible .runtime-image-target-visual {
  fill: rgba(10, 120, 236, 0.13);
  stroke: rgba(255, 255, 255, 0.95);
}
.runtime-image-target.found .runtime-image-target-visual {
  fill: rgba(200, 240, 0, 0.24);
  stroke: var(--lime, #c8f000);
  stroke-width: 4px;
}
.runtime-image-target:focus-visible .runtime-image-target-visual {
  filter: drop-shadow(0 0 4px rgba(10, 120, 236, 0.8));
}
.runtime-shape-circle {
  border-radius: 50% !important;
}
.runtime-shape-diamond {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.runtime-icon,
.runtime-counter {
  display: grid;
  place-items: center;
}
.runtime-counter strong {
  font-size: 1.8em;
}
.runtime-counter small {
  display: block;
}
.runtime-progress {
  display: grid;
  align-content: center;
  gap: 8px;
}
.runtime-progress > div {
  height: 12px;
  border-radius: 999px;
  background: #dfe5ec;
  overflow: hidden;
}
.runtime-progress > div > i {
  display: block;
  height: 100%;
  background: var(--game-accent);
  border-radius: inherit;
}
.runtime-audio audio {
  width: 100%;
  height: 100%;
}
.runtime-word-grid {
  display: block;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 2px;
}
.runtime-word-grid-cells {
  display: grid;
  grid-template-columns: repeat(var(--grid-size), minmax(38px, 1fr));
  min-width: var(--grid-min-width, 380px);
  gap: 3px;
}
.runtime-word-grid-cells button {
  min-width: 38px;
  min-height: 38px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 5px;
  background: #fff;
  font-weight: 900;
  font-size: clamp(13px, 1.4vw, 18px);
}
.runtime-word-grid-cells button.selected {
  background: var(--lime);
}
.runtime-word-grid-cells button.found {
  background: #b8eaf8;
  color: #071426;
}
.runtime-controls:not(:empty) {
  position: sticky;
  bottom: 0;
  z-index: 25;
  background: color-mix(in srgb, #fff 94%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  padding: 8px;
}
.runtime-controls button {
  min-width: 52px;
  min-height: 48px;
  user-select: none;
}
.runtime-drag-list > button,
.runtime-drop-list > button {
  min-block-size: 48px;
  touch-action: manipulation;
}
.runtime-player {
  pointer-events: none;
}
@media (max-width: 800px) {
  .runtime-stage-frame {
    padding: 5px;
    max-height: none;
  }
  .runtime-hotspot-layer button,
  .plugin-multi-hotspot button {
    inline-size: clamp(44px, var(--hotspot-size, 58px), 92px) !important;
  }
  .runtime-word-grid-cells {
    grid-template-columns: repeat(var(--grid-size), minmax(40px, 1fr));
  }
  .runtime-word-grid-cells button {
    min-width: 40px;
    min-height: 40px;
  }
  .runtime-controls:not(:empty) {
    margin-inline: -5px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .game-play-page {
    padding-top: 10px;
  }
  .game-play-page > header {
    margin-bottom: 10px;
  }
  .game-play-page > header .eyebrow {
    margin-top: 5px;
  }
  .game-play-page h1 {
    font-size: clamp(24px, 5vw, 38px);
  }
  .runtime-status {
    min-height: 42px;
  }
  .runtime-controls:not(:empty) {
    position: relative;
  }
}
@media (orientation: landscape) and (max-width: 900px) and (max-height: 520px) {
  .site-header {
    height: 72px;
    padding: 0 20px;
    gap: 14px;
  }
  .brand {
    font-size: 32px;
  }
  .nav-toggle {
    display: block;
    margin-left: auto;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    height: auto;
    padding: 12px 20px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    align-items: stretch;
  }
  .main-nav.open {
    display: grid;
    gap: 0;
  }
  .main-nav a {
    height: auto;
    padding: 12px;
  }
  .main-nav a.active:after {
    display: none;
  }
  .streak,
  .profile-name {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .runtime-stage * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Cohesive responsive game-player header v0.10.3 */
.game-play-header {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
  gap: 16px;
  margin-bottom: 14px !important;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(7, 20, 38, 0.1);
}
.game-play-title {
  min-width: 0;
}
.game-play-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.game-play-header .category-pill {
  flex: none;
  margin: 0;
}
.game-play-header .eyebrow {
  min-width: 0;
  margin: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-play-page .game-play-header h1 {
  font-size: clamp(26px, 2.5vw, 34px);
  line-height: 1.04;
  letter-spacing: -1.15px;
  overflow-wrap: anywhere;
}
.game-play-points {
  min-width: 94px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 0 5px;
  padding: 8px 11px;
  border: 1px solid #f0d979;
  border-radius: 15px;
  background: #fff9dc;
  color: #8a6800 !important;
  font-variant-numeric: tabular-nums;
  text-align: left;
  box-shadow: 0 7px 18px rgba(174, 130, 0, 0.1);
}
.game-play-points > span {
  grid-row: 1/3;
  font-size: 19px;
}
.game-play-points > b {
  font-size: 18px;
  line-height: 1;
}
.game-play-points > small {
  font-size: 9px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.runtime-stage {
  container-type: inline-size;
}
.runtime-stage .runtime-heading h2 {
  font-size: clamp(16px, 2.6cqw, 34px);
  line-height: 1.08;
}
@media (min-width: 901px) {
  body:has(.game-play-page) > .site-header {
    position: relative;
  }
}
@media (max-width: 900px) {
  .game-play-header {
    padding: 14px;
  }
  .game-play-page .game-play-header h1 {
    font-size: clamp(28px, 6vw, 38px);
  }
  .runtime-stage .runtime-heading h2 {
    font-size: clamp(11px, 3.1vw, 14px);
  }
}
@media (max-width: 520px) {
  .game-play-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 9px;
    padding: 12px;
    border-radius: 14px;
  }
  .game-play-title {
    display: contents;
  }
  .game-play-kicker {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    gap: 6px;
    margin: 0;
    padding-top: 4px;
  }
  .game-play-header .category-pill {
    display: none;
  }
  .game-play-page .game-play-header h1 {
    grid-column: 1/-1;
    grid-row: 2;
    font-size: clamp(24px, 7.8vw, 32px);
    line-height: 1.06;
    letter-spacing: -0.8px;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }
  .game-play-points {
    grid-column: 2;
    grid-row: 1;
    min-width: 58px;
    block-size: 58px;
    box-sizing: border-box;
    padding: 6px;
    border-radius: 13px;
    grid-template-columns: auto;
    justify-items: center;
    gap: 1px;
  }
  .game-play-points > span {
    grid-row: auto;
    font-size: 15px;
  }
  .game-play-points > b {
    font-size: 16px;
  }
  .game-play-points > small {
    font-size: 7px;
  }
  .runtime-shell {
    margin-top: 0;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  body:has(.game-play-page) > .site-header {
    display: none;
  }
  .game-play-header {
    padding: 8px 10px;
  }
  .game-play-kicker {
    display: none;
  }
  .game-play-page .game-play-header h1 {
    font-size: 24px;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .game-play-points {
    min-width: 76px;
    block-size: 48px;
    padding: 5px 8px;
  }
  .game-play-points > span {
    font-size: 16px;
  }
  .game-play-points > b {
    font-size: 16px;
  }
  .game-play-points > small {
    font-size: 7px;
  }
}

/* GameMaker-inspired modular game studio v0.13.0 */
.room-layer-editor {
  margin: 12px;
  border: 1px solid #d8e0e9;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}
.room-layer-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-bottom: 1px solid #dfe5ec;
  background: #fff;
}
.room-layer-editor > header > div {
  display: grid;
  gap: 2px;
}
.room-layer-editor > header small {
  color: var(--muted);
  font-size: 10px;
}
.room-layer-editor > header button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: #071426;
  color: #fff;
  padding: 6px 11px;
  font-weight: 850;
}
.room-layer-editor > [data-layer-list] {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 9px;
}
.room-layer-card {
  min-width: 230px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 9px;
  border: 1px solid #dbe3ec;
  border-radius: 11px;
  background: #fff;
}
.room-layer-card.active {
  border-color: #1786ed;
  box-shadow: 0 0 0 2px rgba(23, 134, 237, 0.12);
}
.room-layer-card > .layer-select {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 1px 6px;
  align-items: center;
  border: 0;
  background: transparent;
  text-align: left;
}
.room-layer-card > .layer-select > span {
  grid-row: 1/3;
  color: #1786ed;
}
.room-layer-card > .layer-select > b {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-layer-card > .layer-select > small {
  color: var(--muted);
  font-size: 9px;
}
.room-layer-card > label,
.resource-card label {
  display: grid;
  gap: 3px;
  color: #56647a;
  font-size: 9px;
  font-weight: 800;
}
.room-layer-card input,
.room-layer-card select,
.resource-card input,
.resource-card select,
.resource-card textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #ccd6e1;
  border-radius: 7px;
  background: #fff;
  padding: 7px;
  font: inherit;
  color: #071426;
}
.room-layer-card > .check-mini {
  display: flex;
  align-items: center;
  gap: 5px;
}
.room-layer-card > .check-mini input {
  width: auto;
}
.room-layer-card > .row-actions {
  grid-column: 1/-1;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}
.room-layer-card > .row-actions button {
  width: 30px;
  height: 30px;
  border: 1px solid #d5dee8;
  border-radius: 7px;
  background: #fff;
}
.stage-component.layer-locked {
  cursor: not-allowed;
}
.stage-component.layer-locked > .stage-resize-handle {
  display: none;
}
.stage-component.layer-locked:after {
  content: "🔒";
  position: absolute;
  right: 4px;
  top: 4px;
  font-size: 10px;
}
.resource-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 18px;
}
.resource-workspace .builder-list-panel {
  min-width: 0;
}
.resource-workspace [data-asset-list],
.resource-workspace [data-object-list] {
  display: grid;
  gap: 10px;
}
.resource-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #dce3eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(7, 20, 38, 0.04);
}
.resource-card > header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 9px;
}
.resource-card > header > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eaf5ff;
  color: #0878dc;
  font-size: 18px;
}
.resource-card > header > div {
  min-width: 0;
  display: grid;
}
.resource-card > header b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resource-card > header small {
  color: var(--muted);
  font-size: 9px;
}
.resource-card > header button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #fff1ef;
  color: #b43125;
  font-weight: 900;
}
.resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.object-resource-card > header > span {
  background: #f0f8dc;
  color: #5f7900;
}
.resource-card textarea.invalid {
  border-color: #df4135;
  box-shadow: 0 0 0 3px rgba(223, 65, 53, 0.13);
}
.stage-preview-media,
.stage-preview-instance,
.stage-preview-trigger,
.stage-preview-camera,
.stage-preview-sequence {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: clamp(9px, 1.2vw, 16px);
  letter-spacing: 0.7px;
}
.stage-preview-tilemap,
.stage-preview-particles {
  font: 800 clamp(10px, 2vw, 24px) / 1.2 monospace;
}
.stage-preview-path {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-dasharray: 5 4;
}
.stage-preview-light {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #fff8b8 0,
    rgba(255, 233, 91, 0.42) 35%,
    transparent 72%
  );
  font-size: clamp(20px, 4vw, 48px);
}
.runtime-video video,
.runtime-sprite img,
.runtime-instance img,
.runtime-timeline img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.runtime-tilemap-grid {
  display: grid;
  grid-template-columns: repeat(var(--tile-columns), 1fr);
  grid-template-rows: repeat(var(--tile-rows), 1fr);
  overflow: hidden;
}
.runtime-tilemap-grid > i {
  display: block;
  min-width: 0;
  min-height: 0;
  background-repeat: no-repeat;
  background-size: cover;
}
.runtime-path-guide {
  pointer-events: none;
}
.runtime-path-guide svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.runtime-path-guide polyline,
.runtime-path-guide polygon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-dasharray: 3 2;
  vector-effect: non-scaling-stroke;
}
.runtime-particle-emitter {
  pointer-events: none;
  overflow: visible;
}
.runtime-particle-emitter > i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--particle-size);
  height: var(--particle-size);
  border-radius: 50%;
  background: var(--particle-color);
  box-shadow: 0 0 calc(var(--particle-size) * 1.4) var(--particle-color);
  animation: qews-particle-fly linear forwards;
}
@keyframes qews-particle-fly {
  from {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(
        calc(-50% + var(--particle-x)),
        calc(-50% + var(--particle-y))
      )
      scale(0.15);
    opacity: 0;
  }
}
.runtime-trigger-zone {
  display: grid;
  place-items: center;
  border: 2px dashed currentColor;
  cursor: pointer;
}
.runtime-camera-guide {
  pointer-events: none;
  border: 2px dashed rgba(23, 134, 237, 0.45) !important;
  background: transparent !important;
}
.runtime-light {
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(
    circle,
    var(--light-color) 0,
    color-mix(
        in srgb,
        var(--light-color) calc(var(--light-intensity) * 60%),
        transparent
      )
      35%,
    transparent var(--light-falloff)
  ) !important;
  filter: blur(2px);
}
.runtime-timer-widget {
  display: grid;
  place-items: center;
  align-content: center;
}
.runtime-timer-widget strong {
  font-size: 1.8em;
}
.runtime-timer-widget small {
  font-size: 0.65em;
}
.runtime-instance[data-tags~="hidden"] {
  display: none;
}
@media (max-width: 900px) {
  .resource-workspace {
    grid-template-columns: 1fr;
  }
  .room-layer-card {
    min-width: 210px;
  }
  .resource-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .resource-workspace {
    padding: 10px;
  }
  .resource-grid {
    grid-template-columns: 1fr;
  }
  .room-layer-editor {
    margin: 8px;
  }
  .runtime-trigger-zone {
    min-width: 44px;
    min-height: 44px;
  }
  .runtime-timer-widget strong {
    font-size: 1.35em;
  }
}
.runtime-light {
  background: radial-gradient(
    circle,
    var(--light-color) 0,
    color-mix(in srgb, var(--light-color) 48%, transparent) 35%,
    transparent var(--light-falloff)
  ) !important;
  opacity: var(--light-intensity);
}
.resource-card label.inspector-check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
}
.resource-card label.inspector-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  padding: 0;
}

/* Polished example-game art direction v0.14.0 */
.runtime-stage {
  background-image:
    radial-gradient(
      circle at 88% 12%,
      rgba(200, 240, 0, 0.16),
      transparent 22%
    ),
    radial-gradient(
      circle at 10% 88%,
      rgba(10, 120, 236, 0.13),
      transparent 25%
    );
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.runtime-heading {
  position: relative;
  align-items: flex-start;
  padding-top: 15px;
}
.runtime-heading:before {
  content: "MISSION";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--game-accent);
  font: 900 9px/1 "DM Sans";
  letter-spacing: 1.4px;
}
.runtime-heading h2 {
  max-width: 100%;
  letter-spacing: -0.75px;
  text-wrap: balance;
}
.runtime-choice-list {
  grid-template-columns: repeat(var(--choice-columns, 1), minmax(0, 1fr));
  gap: 12px;
}
.runtime-choice-list button {
  position: relative;
  min-height: 58px;
  border: 1px solid rgba(118, 139, 161, 0.32);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  box-shadow: 0 7px 20px rgba(7, 20, 38, 0.07);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.runtime-choice-list button:hover {
  transform: translateY(-2px);
  box-shadow: 0 11px 24px rgba(7, 20, 38, 0.11);
}
.runtime-choice-list button.selected {
  border-color: var(--game-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--game-accent) 18%, transparent);
}
.runtime-choice-list button > b {
  background: color-mix(in srgb, var(--game-accent) 12%, #fff);
  color: var(--game-accent);
}
.runtime-choice-list button > span {
  flex: 1;
}
.runtime-choice-list button > i {
  color: var(--game-accent);
  font-style: normal;
  font-size: 18px;
}
.runtime-input {
  align-content: center;
  gap: 10px;
}
.runtime-input-hint {
  display: block;
  color: #657286;
  font-weight: 700;
}
.runtime-input form {
  padding: 6px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(7, 20, 38, 0.08);
}
.runtime-input input {
  border: 0 !important;
  background: #f5f8fb;
  font-size: 16px;
}
.runtime-input button {
  min-width: 118px;
  border-radius: 11px !important;
}
.runtime-input button:disabled {
  opacity: 0.72;
}
.runtime-list-title {
  display: block;
  margin-bottom: 3px;
  color: var(--game-accent);
  font-size: 11px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.runtime-drag-list > button,
.runtime-drop-list > button {
  border-radius: 13px;
  box-shadow: 0 5px 13px rgba(7, 20, 38, 0.05);
}
.runtime-drag-list > button i {
  color: var(--game-accent);
  font-style: normal;
}
.runtime-drop-list > button.needs-selection {
  animation: qews-shake 0.35s ease;
}
.runtime-drop-list > button.filled {
  background: #eff8d9 !important;
  border-color: #9bc100 !important;
}
@keyframes qews-shake {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
.runtime-word-grid {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
}
.runtime-word-hud {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  align-items: center;
}
.runtime-word-hud > strong {
  font: 800 14px/1 "Libre Franklin";
}
.runtime-word-hud > small {
  color: var(--game-accent);
  font-weight: 900;
}
.runtime-word-hud > div {
  grid-column: 1/-1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.runtime-word-hud span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf1f5;
  color: #59677b;
  font-size: 9px;
  font-weight: 850;
}
.runtime-word-hud span.found {
  background: #dff2a2;
  color: #365000;
  text-decoration: line-through;
}
.runtime-word-grid-cells {
  align-self: stretch;
}
.runtime-word-grid-cells button {
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(7, 20, 38, 0.05);
  transition: transform 0.12s ease;
}
.runtime-word-grid-cells button:hover {
  transform: scale(1.05);
}
.runtime-word-grid-cells button.found {
  background: #c8f000 !important;
}
.plugin-game-hud,
.plugin-story-hud,
.plugin-map-hud,
.plugin-maze-hud,
.plugin-reaction-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  color: #536176;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.35px;
}
.plugin-game-hud strong,
.plugin-game-hud b,
.plugin-map-hud strong,
.plugin-maze-hud b,
.plugin-reaction-hud b {
  color: var(--game-accent);
}
.plugin-memory {
  display: grid;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 9px !important;
  overflow: hidden !important;
}
.plugin-memory-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
}
.plugin-memory-board button {
  position: relative;
  min-width: 0;
  min-height: 58px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  background: linear-gradient(145deg, #153756, #0b213b);
  color: #fff;
  box-shadow: 0 7px 16px rgba(7, 20, 38, 0.14);
  transform-style: preserve-3d;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}
.plugin-memory-board button > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 5px;
  backface-visibility: hidden;
}
.memory-card-back {
  font: 900 22px/1 "Libre Franklin";
  color: #c8f000;
}
.memory-card-front {
  transform: rotateY(180deg);
  background: #fff;
  color: #071426;
  font-size: clamp(8px, 1.1vw, 13px);
}
.plugin-memory-board button.open,
.plugin-memory-board button.matched {
  transform: rotateY(180deg);
}
.plugin-memory-board button.matched .memory-card-front {
  background: #eff8d9;
  color: #365000;
}
.plugin-memory-board button.matched {
  border-color: #c8f000;
}
.plugin-sequence {
  display: grid;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px !important;
  overflow: hidden !important;
}
.plugin-sequence-list {
  display: grid;
  gap: 6px;
  align-content: center;
  min-height: 0;
  overflow: auto;
}
.plugin-sequence-list > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 44px 44px;
  gap: 6px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid #d8e0e9;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 12px rgba(7, 20, 38, 0.045);
  cursor: grab;
}
.plugin-sequence-list > div.selected {
  border-color: var(--game-accent);
  background: #edf7ff;
}
.plugin-sequence-list > div > b {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #0e2d4b;
  color: #fff;
}
.plugin-sequence-list > div > button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #edf2f6;
  color: #173854;
  font-weight: 900;
}
.plugin-primary-action {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--game-accent);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--game-accent) 25%, transparent);
}
.plugin-crossword {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px !important;
  overflow: hidden !important;
}
.plugin-crossword-list {
  display: grid;
  gap: 7px;
  overflow: auto;
}
.plugin-crossword-list > label {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(120px, 0.55fr);
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid #dfe5ec;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}
.plugin-crossword-list > label > b {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #0e2d4b;
  color: #fff;
}
.plugin-crossword-list > label > span {
  font-size: 11px;
  font-weight: 750;
}
.plugin-crossword-list input {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #c6d1dd;
  border-radius: 9px;
  padding: 7px 9px;
  text-transform: uppercase;
}
.plugin-crossword-list label.solved {
  border-color: #a9cf31;
  background: #f4fadf;
}
.plugin-crossword-list input.correct {
  border-color: #8db500;
  background: #fff;
}
.plugin-discovery-hud {
  position: absolute;
  z-index: 15;
  left: 12px;
  right: 12px;
  top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  background: rgba(7, 20, 38, 0.76);
  color: #fff;
  backdrop-filter: blur(10px);
  font-size: 10px;
}
.plugin-discovery-hud > span {
  color: #c8f000;
  font-weight: 900;
  letter-spacing: 0.8px;
}
.plugin-discovery-toast {
  position: absolute;
  z-index: 16;
  left: 50%;
  bottom: 15px;
  transform: translate(-50%, 12px);
  padding: 8px 13px;
  border-radius: 999px;
  background: #c8f000;
  color: #173000;
  font-weight: 900;
  opacity: 0;
  transition: 0.2s ease;
}
.plugin-discovery-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}
.plugin-multi-hotspot.completed:after {
  content: "Alle Details entdeckt ✓";
  position: absolute;
  z-index: 14;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 20, 38, 0.34);
  color: #fff;
  font: 900 clamp(18px, 3vw, 34px) / 1 "Libre Franklin";
  pointer-events: none;
}
.plugin-branching {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch !important;
  gap: 9px !important;
  text-align: left !important;
}
.plugin-story-hud {
  border-bottom: 1px solid #e1e7ee;
  padding-bottom: 7px;
}
.plugin-story-hud span {
  color: var(--game-accent);
  font-weight: 900;
  letter-spacing: 1px;
}
.plugin-story-hud i {
  font-style: normal;
}
.plugin-story-scene {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 2px;
}
.plugin-story-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: color-mix(in srgb, var(--game-accent) 14%, #fff);
  color: var(--game-accent);
  font: 900 26px/1 "Libre Franklin";
}
.plugin-story-scene p {
  margin: 0 !important;
  font-size: clamp(15px, 2vw, 25px) !important;
  line-height: 1.25;
}
.plugin-story-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.plugin-story-choices button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  text-align: left;
}
.plugin-story-choices button > b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #0e2d4b;
  color: #fff;
}
.plugin-story-choices button > i {
  color: var(--game-accent);
  font-style: normal;
}
.plugin-story-ending {
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 12px;
  background: #eff8d9;
  color: #365000;
  text-align: center;
}
.plugin-game-map {
  overflow: hidden !important;
  background-size: cover !important;
}
.plugin-map-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.plugin-map-route line {
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 1.1;
  stroke-dasharray: 2 2;
  vector-effect: non-scaling-stroke;
}
.plugin-map-route line.active {
  stroke: #c8f000;
  stroke-width: 1.8;
}
.plugin-map-hud {
  position: absolute;
  z-index: 4;
  left: 12px;
  right: 12px;
  top: 10px;
  padding: 7px 10px;
  border-radius: 11px;
  background: rgba(7, 20, 38, 0.75);
  color: #fff;
  backdrop-filter: blur(9px);
}
.plugin-map-hud > span {
  color: #c8f000;
  letter-spacing: 1px;
}
.plugin-game-map > button {
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  max-width: 190px;
  padding: 6px 10px 6px 6px !important;
  border-radius: 14px !important;
  text-align: left;
}
.plugin-game-map > button > b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #fff;
  color: #173854;
}
.plugin-game-map > button:disabled {
  filter: grayscale(0.7);
  opacity: 0.58;
}
.plugin-game-map > button.visited {
  transform: translate(-50%, -50%) scale(0.96);
}
.plugin-maze {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  background: transparent !important;
}
.plugin-maze-hud {
  padding: 0 3px;
}
.plugin-maze-hud > span:first-child {
  color: #0a78ec;
}
.plugin-maze-hud > span:last-child {
  color: #df4d39;
}
.plugin-maze-board {
  display: grid;
  grid-template-columns: repeat(var(--maze-columns), 1fr);
  align-self: center;
  overflow: hidden;
  border: 5px solid #0d2945;
  border-radius: 14px;
  background: #0d2945;
  box-shadow: 0 9px 20px rgba(7, 20, 38, 0.15);
}
.plugin-maze-board > span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-size: clamp(8px, 1.7vw, 20px);
}
.plugin-maze-board .wall {
  background: linear-gradient(145deg, #173c60, #0b2945);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.plugin-maze-board .path {
  background: #f6f1e7;
}
.plugin-maze-board .player {
  background: #c8f000;
  color: #173854;
}
.plugin-maze-board .goal {
  background: #ffd9cf;
  color: #d43c2b;
}
.plugin-maze.completed .plugin-maze-board {
  box-shadow:
    0 0 0 5px #c8f000,
    0 12px 28px rgba(7, 20, 38, 0.2);
}
.plugin-reaction {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
}
.plugin-reaction-hud {
  color: #fff;
}
.plugin-reaction-hud > strong {
  min-width: 52px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff;
  color: #071426;
  text-align: center;
}
.plugin-reaction-arena {
  position: relative;
  overflow: hidden;
  border-radius: 17px;
  background:
    radial-gradient(
      circle at 70% 20%,
      rgba(10, 120, 236, 0.35),
      transparent 30%
    ),
    linear-gradient(145deg, #102b49, #071426);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.plugin-reaction-arena > button {
  position: absolute;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  width: clamp(72px, 11vw, 112px);
  aspect-ratio: 1;
  border: 5px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: #c8f000;
  color: #071426;
  box-shadow:
    0 0 0 8px rgba(200, 240, 0, 0.16),
    0 12px 30px rgba(0, 0, 0, 0.28);
}
.plugin-reaction-arena > button > span {
  max-width: 90%;
  font-size: clamp(8px, 1.1vw, 13px);
  font-weight: 900;
}
.plugin-reaction-arena > button > small {
  font-size: 8px;
  letter-spacing: 1px;
}
.plugin-reaction-arena > button.hit {
  animation: qews-target-pop 0.2s ease;
}
@keyframes qews-target-pop {
  from {
    transform: translate(-50%, -50%) scale(0.7);
  }
  to {
    transform: translate(-50%, -50%) scale(1);
  }
}
.plugin-reaction.completed .plugin-reaction-arena:after {
  content: "Ziel erreicht ✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 20, 38, 0.74);
  color: #c8f000;
  font: 900 clamp(20px, 4vw, 38px) / 1 "Libre Franklin";
}
.plugin-reaction.failed .plugin-reaction-arena:after {
  content: "Zeit abgelaufen";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 20, 38, 0.74);
  color: #fff;
  font: 900 clamp(18px, 3vw, 32px) / 1 "Libre Franklin";
}
.runtime-stage:has(.runtime-player) {
  background-color: #dff3ff !important;
  background-image:
    radial-gradient(circle at 78% 16%, #fff 0 5%, transparent 5.5%),
    linear-gradient(
      165deg,
      transparent 0 63%,
      rgba(53, 145, 112, 0.18) 63% 72%,
      rgba(28, 100, 82, 0.28) 72%
    );
}
.runtime-player {
  border: 3px solid #fff;
  box-shadow: 0 6px 15px rgba(7, 20, 38, 0.25);
}
.runtime-player span {
  font-size: 0;
}
.runtime-player span:after {
  content: "▲";
  font-size: 22px;
  color: #173854;
}
.runtime-collectible-area button {
  border: 3px solid #fff !important;
  background: #ffc900 !important;
  animation: qews-float 1.7s ease-in-out infinite alternate;
}
@keyframes qews-float {
  to {
    transform: translate(-50%, calc(-50% - 6px));
  }
}
.runtime-goal {
  border: 2px solid #fff;
}
.runtime-goal span {
  font-size: clamp(26px, 5cqw, 44px);
  filter: drop-shadow(0 3px 4px rgba(7, 20, 38, 0.2));
}
.runtime-goal small {
  max-width: 100%;
  font-size: clamp(7px, 1.4cqw, 11px);
  overflow-wrap: anywhere;
  text-align: center;
}
@media (max-width: 800px) {
  .runtime-choice-list {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .runtime-choice-list button {
    min-height: 45px;
    border-radius: 11px;
    padding: 6px 8px;
  }
  .runtime-heading {
    padding-top: 10px;
  }
  .runtime-heading:before {
    font-size: 7px;
  }
  .plugin-memory-board {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .plugin-memory-board button {
    min-height: 44px;
    border-radius: 8px;
  }
  .plugin-sequence-list > div {
    grid-template-columns: 25px minmax(0, 1fr) 44px 44px;
    padding: 4px;
    font-size: 10px;
  }
  .plugin-crossword-list > label {
    grid-template-columns: 24px 1fr;
    gap: 4px;
    padding: 5px;
  }
  .plugin-crossword-list input {
    grid-column: 2;
    min-height: 44px;
  }
  .plugin-story-choices {
    grid-template-columns: 1fr;
  }
  .plugin-story-scene {
    grid-template-columns: 38px 1fr;
    gap: 8px;
    padding: 4px;
  }
  .plugin-story-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 18px;
  }
  .plugin-game-map > button {
    max-width: 38%;
    min-height: 44px;
    font-size: 8px;
    padding: 4px !important;
  }
  .plugin-game-map > button > b {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }
  .plugin-map-hud,
  .plugin-discovery-hud {
    left: 7px;
    right: 7px;
    top: 7px;
    padding: 5px 7px;
    font-size: 8px;
  }
  .plugin-maze-board {
    border-width: 3px;
  }
  .plugin-reaction {
    padding: 6px;
  }
  .plugin-reaction-arena > button {
    min-width: 58px;
    border-width: 3px;
  }
  .runtime-word-grid {
    padding: 5px;
  }
  .runtime-word-hud span {
    padding: 2px 4px;
    font-size: 7px;
  }
  .runtime-input form {
    padding: 3px;
  }
  .runtime-input-hint {
    font-size: 9px;
  }
}
@media (max-width: 520px) {
  .plugin-memory-board {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .plugin-memory-board button {
    min-height: 44px;
  }
  .plugin-game-hud,
  .plugin-story-hud,
  .plugin-map-hud,
  .plugin-maze-hud,
  .plugin-reaction-hud {
    min-height: 24px;
    font-size: 7px;
  }
  .runtime-input button {
    min-width: 90px;
  }
  .plugin-discovery-toast {
    font-size: 9px;
  }
  .plugin-reaction-arena > button {
    width: 64px;
  }
}

/* Runtime layout integrity v0.15.0 */
.runtime-input {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  place-items: stretch !important;
  align-content: center !important;
  gap: 9px !important;
  overflow: hidden !important;
}
.runtime-input-hint {
  position: static !important;
  display: block;
  margin: 0;
  text-align: center;
  line-height: 1.2;
}
.runtime-input form {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
}
.runtime-input form > * {
  box-sizing: border-box;
}
.plugin-sequence {
  grid-template-columns: minmax(0, 1fr) !important;
}
.plugin-sequence > .plugin-game-hud {
  display: flex !important;
  grid-template-columns: none !important;
  width: 100%;
  box-sizing: border-box;
}
.plugin-sequence > .plugin-sequence-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-flow: row !important;
  grid-auto-columns: auto !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden !important;
}
.plugin-sequence-list > div {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.plugin-sequence > .plugin-primary-action {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.plugin-memory {
  perspective: none;
}
.plugin-memory-board button {
  transform: none !important;
}
.plugin-memory-board button > span {
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  backface-visibility: visible !important;
}
.memory-card-back {
  opacity: 1;
  transform: scale(1);
}
.memory-card-front {
  opacity: 0;
  transform: scale(0.92) !important;
}
.plugin-memory-board button.open,
.plugin-memory-board button.matched {
  transform: translateY(-2px) !important;
}
.plugin-memory-board button.open .memory-card-back,
.plugin-memory-board button.matched .memory-card-back {
  opacity: 0;
}
.plugin-memory-board button.open .memory-card-front,
.plugin-memory-board button.matched .memory-card-front {
  opacity: 1;
  transform: scale(1) !important;
}
.plugin-maze {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
  min-width: 0;
  min-height: 0;
}
.plugin-maze-board {
  justify-self: center;
  align-self: center;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: var(--maze-columns) / var(--maze-rows);
  box-sizing: border-box;
}
.plugin-maze-board > span {
  aspect-ratio: auto !important;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
@media (max-width: 800px) {
  .runtime-input {
    gap: 5px !important;
  }
  .runtime-input-hint {
    font-size: 9px;
  }
  .plugin-sequence-list > div {
    grid-template-columns: 25px minmax(0, 1fr) 44px 44px !important;
  }
  .plugin-maze-board {
    border-width: 2px;
  }
}
.runtime-choice-list button {
  min-height: 44px;
  box-sizing: border-box;
}
.runtime-word-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
}
.runtime-word-grid-cells {
  grid-template-columns: repeat(var(--grid-size), minmax(0, 1fr)) !important;
  grid-template-rows: repeat(var(--grid-size), minmax(0, 1fr));
  min-width: 0 !important;
  min-height: 0;
  overflow: hidden;
}
.runtime-word-grid-cells button {
  min-width: 0 !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
}
.runtime-drag-list > button,
.runtime-drop-list > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  box-sizing: border-box;
}
.runtime-drag-list > button span,
.runtime-drop-list > button span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.runtime-drop-list > button small {
  white-space: nowrap;
}
.runtime-player {
  overflow: visible !important;
}

/* Final runtime containment pass v0.18.2 */
.plugin-sequence-list {
  align-content: start !important;
}
.runtime-drag-list,
.runtime-drop-list {
  align-content: start !important;
  gap: 6px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
.runtime-drop-list > button small {
  display: none;
}
.runtime-drag-list > button,
.runtime-drop-list > button {
  flex-shrink: 0;
  line-height: 1.15;
}
.plugin-game-map {
  overflow: hidden;
}
.plugin-game-map > button {
  max-width: 30%;
  white-space: normal;
  text-align: left;
  box-sizing: border-box;
}
@media (max-width: 800px) {
  .runtime-word-grid {
    padding: 4px !important;
  }
}

/* 2D News Adventure */
.plugin-adventure {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 7px;
  overflow: hidden !important;
  background: linear-gradient(145deg, #163b54, #0b243b) !important;
  image-rendering: pixelated;
}
.adventure-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 5px 9px;
  border: 2px solid #081b2c;
  border-radius: 9px;
  background: #f7f0d8;
  color: #173854;
  box-shadow: inset 0 0 0 2px #fff;
  font: 900 10px/1.1 "DM Sans";
  letter-spacing: 0.35px;
}
.adventure-hud span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adventure-hud strong {
  flex: none;
  color: var(--game-accent);
}
.adventure-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 22%);
  gap: 7px;
  min-width: 0;
  min-height: 0;
}
.adventure-board {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 3px solid #071426;
  border-radius: 10px;
  background: #74ad67;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}
.adventure-tiles {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--adventure-columns), minmax(0, 1fr));
  grid-template-rows: repeat(var(--adventure-rows), minmax(0, 1fr));
  background: #78b36b;
}
.adventure-tile {
  min-width: 0;
  min-height: 0;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  background: #79b76d;
}
.adventure-tile[data-tile="."] {
  background: linear-gradient(
    135deg,
    #86c879 0 48%,
    #7cbe70 48% 52%,
    #86c879 52%
  );
}
.adventure-tile[data-tile="r"] {
  background: #d8c18f;
  box-shadow: inset 0 0 0 1px rgba(116, 82, 42, 0.14) !important;
}
.adventure-tile[data-tile="w"] {
  background: repeating-linear-gradient(0deg, #3b9ad1 0 5px, #65b7df 5px 8px);
}
.adventure-tile[data-tile="b"] {
  background: repeating-linear-gradient(
    90deg,
    #a56a3c 0 10px,
    #c48a56 10px 19px
  );
  box-shadow:
    inset 0 2px #f0bf7c,
    inset 0 -2px #714526 !important;
}
.adventure-tile[data-tile="h"] {
  background: linear-gradient(
    135deg,
    #d65a4b 0 45%,
    #b53d38 45% 55%,
    #d65a4b 55%
  );
  box-shadow: inset 0 0 0 3px #f2d49a !important;
}
.adventure-tile[data-tile="t"],
.adventure-tile[data-tile="#"] {
  background:
    radial-gradient(
      circle at 50% 38%,
      #397747 0 32%,
      #285d3c 33% 49%,
      transparent 50%
    ),
    linear-gradient(90deg, transparent 43%, #70482d 44% 57%, transparent 58%),
    #6eaa64;
}
.adventure-sprites {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.adventure-sprite {
  position: absolute;
  width: clamp(24px, 5cqw, 42px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  pointer-events: auto;
  filter: drop-shadow(0 4px 2px rgba(7, 20, 38, 0.3));
  overflow: visible !important;
}
.adventure-sprite > i {
  position: absolute;
  left: 29%;
  top: 7%;
  width: 42%;
  height: 36%;
  border: 2px solid #071426;
  border-radius: 45%;
  background: #f3c39b;
  box-sizing: border-box;
}
.adventure-sprite > span {
  position: absolute;
  left: 17%;
  top: 39%;
  width: 66%;
  height: 52%;
  border: 2px solid #071426;
  border-radius: 5px 5px 2px 2px;
  background: var(--actor-color);
  box-sizing: border-box;
}
.adventure-sprite > small {
  position: absolute;
  z-index: 2;
  inset: 46% 0 auto;
  color: #fff;
  font: 900 clamp(7px, 1.4cqw, 11px) / 1 "Libre Franklin";
  text-align: center;
}
.adventure-player {
  --actor-color: #0a78ec;
  z-index: 5;
  animation: adventure-idle 0.7s steps(2, end) infinite alternate;
}
.adventure-player > i:after {
  content: "";
  position: absolute;
  left: 22%;
  top: -28%;
  width: 56%;
  height: 35%;
  background: #173854;
}
.adventure-clue {
  display: grid;
  place-items: center;
  z-index: 3;
}
.adventure-clue > em {
  display: grid;
  place-items: center;
  width: 75%;
  aspect-ratio: 1;
  border: 2px solid #071426;
  border-radius: 4px;
  background: #ffc900;
  color: #714f00;
  font: 900 clamp(12px, 2.4cqw, 22px) / 1 "Libre Franklin";
  animation: adventure-clue 1s steps(2, end) infinite alternate;
}
.adventure-actor:hover,
.adventure-actor:focus-visible,
.adventure-clue:hover,
.adventure-clue:focus-visible {
  transform: translate(-50%, -55%) scale(1.08);
  outline: 3px solid #c8f000;
  outline-offset: 2px;
}
.adventure-quests {
  min-width: 0;
  overflow: auto;
  padding: 9px;
  border: 2px solid #071426;
  border-radius: 9px;
  background: #f7f0d8;
  color: #173854;
  box-shadow: inset 0 0 0 2px #fff;
}
.adventure-quests > b {
  display: block;
  margin-bottom: 8px;
  color: var(--game-accent);
  font: 900 9px/1 "DM Sans";
  letter-spacing: 1.2px;
}
.adventure-quests > div {
  display: grid;
  gap: 6px;
}
.adventure-quests span {
  display: block;
  padding: 6px 7px;
  border: 1px solid #d7c99e;
  border-radius: 7px;
  background: #fffaf0;
  font: 800 10px/1.25 "DM Sans";
}
.adventure-quests span.done {
  border-color: #94bd2a;
  background: #ecf8cc;
  color: #416000;
  text-decoration: line-through;
}
.adventure-speech {
  position: absolute;
  z-index: 20;
  left: 4%;
  right: 4%;
  bottom: 4%;
  display: grid;
  gap: 6px;
  max-height: 72%;
  overflow: auto;
  padding: 10px;
  border: 3px solid #071426;
  border-radius: 9px;
  background: #fffdf4;
  color: #071426;
  box-shadow:
    0 9px 0 rgba(7, 20, 38, 0.27),
    inset 0 0 0 2px #eadcae;
}
.adventure-speech[hidden] {
  display: none;
}
.adventure-speech:after {
  content: "";
  position: absolute;
  left: 27px;
  bottom: -10px;
  border: 8px solid transparent;
  border-top-color: #071426;
  border-bottom: 0;
}
.adventure-speech > header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
}
.adventure-speech > header > i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid #071426;
  border-radius: 5px;
  background: var(--actor-color);
  color: #fff;
  font: 900 14px/1 "Libre Franklin";
  font-style: normal;
}
.adventure-speech > header > div {
  display: grid;
}
.adventure-speech > header strong {
  font: 900 13px/1.1 "Libre Franklin";
}
.adventure-speech > header small {
  color: #687487;
  font-size: 9px;
}
.adventure-speech > header > button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 5px;
  background: #edf1f4;
  color: #173854;
  font-weight: 900;
}
.adventure-speech > p {
  margin: 0;
  font: 750 12px/1.35 "DM Sans";
}
.adventure-dialogue-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.adventure-dialogue-choices button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-height: 42px;
  border: 1px solid #c7d1dc;
  border-radius: 7px;
  background: #fff;
  text-align: left;
  font: 800 10px/1.2 "DM Sans";
}
.adventure-dialogue-choices button b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #173854;
  color: #fff;
}
.adventure-dialogue-choices button.correct {
  border-color: #8cb100;
  background: #eff8d7;
}
.adventure-dialogue-choices button.incorrect {
  border-color: #dd5a49;
  background: #fff0ed;
}
.plugin-adventure.completed .adventure-hud {
  background: #e8f8c1;
}
.plugin-adventure.bump .adventure-board {
  animation: adventure-bump 0.18s steps(2, end);
}
.runtime-controls .adventure-action {
  min-width: 112px;
  background: #173854;
  color: #fff;
}
@keyframes adventure-idle {
  to {
    transform: translate(-50%, calc(-50% - 2px));
  }
}
@keyframes adventure-clue {
  to {
    transform: translateY(-3px);
  }
}
@keyframes adventure-bump {
  50% {
    transform: translateX(3px);
  }
}
@media (max-width: 800px) {
  .adventure-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .adventure-quests {
    padding: 5px;
    overflow: visible;
  }
  .adventure-quests > b {
    display: none;
  }
  .adventure-quests > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }
  .adventure-quests span {
    min-width: 0;
    padding: 4px 6px;
    font-size: 8px;
    line-height: 1.2;
  }
  .adventure-hud {
    min-height: 25px;
    padding: 3px 6px;
    font-size: 8px;
  }
  .adventure-board {
    border-width: 2px;
  }
  .adventure-sprite {
    width: clamp(22px, 8cqw, 32px);
  }
  .adventure-speech {
    left: 2%;
    right: 2%;
    bottom: 2%;
    max-height: 78%;
    padding: 7px;
  }
  .adventure-speech > p {
    font-size: 10px;
  }
  .adventure-dialogue-choices {
    grid-template-columns: 1fr;
  }
  .adventure-dialogue-choices button {
    min-height: 44px;
  }
  .runtime-controls:has(.adventure-action) {
    display: grid;
    grid-template-columns: repeat(5, minmax(48px, auto));
    overflow-x: auto;
    justify-content: start;
  }
  .runtime-controls .adventure-action {
    min-width: 88px;
  }
}

.adventure-editor {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 12px;
}
.adventure-workspace-tabs {
  position: sticky;
  top: 76px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 5px;
  padding: 6px;
  border: 1px solid #ccd9e5;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(7, 20, 38, .08);
  backdrop-filter: blur(12px);
}
.adventure-workspace-tabs button {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #526176;
  font-weight: 800;
}
.adventure-workspace-tabs button > span {
  color: #0a78ec;
  font-size: 19px;
}
.adventure-workspace-tabs button[aria-selected="true"] {
  background: #071426;
  color: #fff;
  box-shadow: 0 5px 14px rgba(7, 20, 38, .2);
}
.adventure-workspace-tabs button[aria-selected="true"] > span {
  color: #d7ff00;
}
.adventure-workspace-guide {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  border-left: 4px solid #0a78ec;
  border-radius: 0 12px 12px 0;
  background: #f3f8fd;
}
.adventure-workspace-guide span,
.adventure-workspace-guide small {
  color: #607087;
  font-size: 11px;
  font-weight: 750;
}
.adventure-workspace-guide h3 {
  margin: 3px 0 2px;
  color: #071426;
  font-size: 20px;
}
.adventure-workspace-guide p {
  max-width: 760px;
  margin: 0;
  color: #526176;
  font-size: 13px;
}
.adventure-workspace-panel {
  display: grid;
  min-width: 0;
  gap: 12px;
}
.adventure-workspace-panel[hidden] {
  display: none;
}
.adventure-workspace-panel[data-adventure-workspace-panel="map"] {
  grid-template-columns: minmax(0, 1fr);
}
.adventure-workspace-panel > details {
  background: #fff;
}
.adventure-workspace-panel > details[open] > summary {
  border-bottom: 1px solid #d9e1ea;
}
.adventure-editor-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding: 7px;
  border: 1px solid #d9e1ea;
  border-radius: 11px;
  background: #f3f6f9;
}
.adventure-editor-tools button {
  min-height: 36px;
  border: 1px solid #c8d2de;
  border-radius: 8px;
  background: #fff;
  padding: 6px 9px;
  font-weight: 800;
}
.adventure-editor-tools button.active {
  border-color: #0a78ec;
  background: #e9f4ff;
  color: #075fac;
  box-shadow: 0 0 0 2px #0a78ec22;
}
.adventure-editor-tools > span {
  margin-left: auto;
  color: #607087;
  font-size: 11px;
  font-weight: 700;
}
.adventure-editor-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 12px;
  align-items: start;
}
.adventure-scene-grid {
  --adventure-editor-columns: 12;
  display: grid;
  grid-template-columns: repeat(
    var(--adventure-editor-columns),
    minmax(26px, 1fr)
  );
  gap: 2px;
  overflow: auto;
  padding: 8px;
  border: 4px solid #0b243b;
  border-radius: 13px;
  background: #0b243b;
  image-rendering: pixelated;
  touch-action: none;
}
.adventure-scene-grid > button {
  position: relative;
  aspect-ratio: 1;
  min-width: 26px;
  border: 0;
  border-radius: 2px;
  padding: 0;
  background: #82bf74;
  cursor: crosshair;
  user-select: none;
}
.adventure-scene-grid
  > button[data-adventure-object]:not([data-adventure-object=""]) {
  z-index: 2;
  cursor: grab;
}
.adventure-scene-grid
  > button[data-adventure-object]:not([data-adventure-object=""]):hover {
  outline: 3px solid rgba(10, 120, 236, 0.65);
  outline-offset: 1px;
}
.adventure-scene-grid > button.is-dragging {
  z-index: 30;
  cursor: grabbing;
  outline: 3px solid #0a78ec;
  box-shadow: 0 8px 18px rgba(7, 20, 38, 0.35);
}
.adventure-scene-grid > button[data-tile="r"] {
  background: #d8c18f;
}
.adventure-scene-grid > button[data-tile="w"] {
  background: repeating-linear-gradient(0deg, #3b9ad1 0 5px, #65b7df 5px 8px);
}
.adventure-scene-grid > button[data-tile="b"] {
  background: repeating-linear-gradient(90deg, #a56a3c 0 7px, #c48a56 7px 14px);
}
.adventure-scene-grid > button[data-tile="h"] {
  background: #c64b41;
  box-shadow: inset 0 0 0 3px #edcc8f;
}
.adventure-scene-grid > button[data-tile="t"],
.adventure-scene-grid > button[data-tile="#"] {
  background: radial-gradient(
    circle,
    #397747 0 44%,
    #285d3c 45% 62%,
    #78b36b 63%
  );
}
.adventure-scene-grid > button > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #071426;
  font: 900 12px/1 "Libre Franklin";
  text-shadow: 0 1px #fff;
}
.adventure-editor-settings {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  background: #f8fafc;
}
.adventure-editor-settings label,
.adventure-entity-list label {
  display: grid;
  gap: 4px;
  color: #445269;
  font-size: 11px;
  font-weight: 700;
}
.adventure-editor-size,
.adventure-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.adventure-editor details {
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  background: #fbfcfd;
}
.adventure-editor summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #173854;
  font-weight: 850;
}
.adventure-editor details > .visual-add {
  margin: 0 12px 12px;
}
.adventure-entity-list,
.adventure-objective-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 9px;
  padding: 0 12px 12px;
}
.adventure-entity-list > article {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dfe5ec;
  border-radius: 11px;
  background: #fff;
}
.adventure-entity-list article > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 32px;
  align-items: center;
  gap: 7px;
}
.adventure-entity-list article > header button {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  background: #edf4fa;
  color: #173854;
  padding: 5px 8px;
  font-weight: 800;
}
.adventure-entity-list article > header button:last-child {
  width: 32px;
  background: #fff0ed;
  color: #a5362c;
}
.adventure-entity-list small {
  color: #728095;
  font-weight: 500;
}
.adventure-objective-list > article {
  display: grid;
  grid-template-columns: minmax(90px, 0.45fr) minmax(0, 1fr) 32px;
  gap: 7px;
  padding: 8px;
  border: 1px solid #dfe5ec;
  border-radius: 10px;
  background: #fff;
}
.adventure-objective-list button {
  width: 32px;
  border: 0;
  border-radius: 7px;
  background: #fff0ed;
  color: #a5362c;
  font-weight: 900;
}
@media (max-width: 800px) {
  .adventure-workspace-tabs {
    position: static;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .adventure-workspace-tabs button {
    min-width: 108px;
    scroll-snap-align: start;
  }
  .adventure-workspace-guide {
    display: block;
  }
  .adventure-workspace-guide > small {
    display: block;
    margin-top: 8px;
  }
  .adventure-editor-main {
    grid-template-columns: 1fr;
  }
  .adventure-editor-settings {
    grid-template-columns: 1fr;
  }
  .adventure-scene-grid {
    grid-template-columns: repeat(
      var(--adventure-editor-columns),
      minmax(20px, 1fr)
    );
  }
  .adventure-scene-grid > button {
    min-width: 20px;
  }
  .adventure-entity-list {
    grid-template-columns: 1fr;
  }
  .adventure-editor-tools > span {
    width: 100%;
    margin: 0;
  }
  .adventure-objective-list > article {
    grid-template-columns: 1fr 32px;
  }
  .adventure-objective-list > article input:nth-child(2) {
    grid-column: 1;
  }
}

.adventure-tile {
  min-width: 0 !important;
  min-height: 0 !important;
  min-block-size: 0 !important;
  block-size: auto !important;
}

/* Adventure movement, story intro and emulator controls v0.18.2 */
.plugin-adventure {
  position: relative;
  isolation: isolate;
}
.adventure-hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.adventure-hud em {
  min-width: 84px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #173854;
  color: #fff;
  font-style: normal;
  text-align: center;
}
.adventure-board {
  background: var(--adventure-grass, #82bf74);
}
.adventure-tiles {
  background: var(--adventure-grass, #82bf74);
}
.adventure-tile[data-tile="."] {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--adventure-grass, #82bf74) 94%, #fff) 0 48%,
    var(--adventure-grass, #82bf74) 48% 52%,
    color-mix(in srgb, var(--adventure-grass, #82bf74) 94%, #fff) 52%
  );
}
.adventure-tile[data-tile="r"] {
  background: var(--adventure-road, #d8c18f);
}
.adventure-tile[data-tile="w"] {
  background: repeating-linear-gradient(
    0deg,
    var(--adventure-water, #3b9ad1) 0 5px,
    color-mix(in srgb, var(--adventure-water, #3b9ad1) 72%, #fff) 5px 9px
  );
}
.adventure-tile[data-tile="b"] {
  z-index: 1;
  overflow: visible !important;
  background: repeating-linear-gradient(
    90deg,
    color-mix(in srgb, var(--adventure-bridge, #a96732) 78%, #fff) 0 5%,
    var(--adventure-bridge, #a96732) 5% 18%
  ) !important;
  box-shadow:
    inset 0 0 0 2px #5c3219,
    inset 0 5px #e2ad68,
    inset 0 -5px #70401f,
    0 4px 0 rgba(7, 20, 38, 0.22) !important;
}
.adventure-tile[data-tile="b"]:before,
.adventure-tile[data-tile="b"]:after {
  content: "";
  position: absolute;
  z-index: 2;
  background: #5c3219;
  box-shadow: 0 1px #e8b975;
}
.adventure-tile[data-tile="b"][data-bridge="horizontal"]:before {
  left: -2px;
  right: -2px;
  top: 8%;
  height: 5px;
}
.adventure-tile[data-tile="b"][data-bridge="horizontal"]:after {
  left: -2px;
  right: -2px;
  bottom: 8%;
  height: 5px;
}
.adventure-tile[data-tile="b"][data-bridge="vertical"] {
  background: repeating-linear-gradient(
    0deg,
    color-mix(in srgb, var(--adventure-bridge, #a96732) 78%, #fff) 0 5%,
    var(--adventure-bridge, #a96732) 5% 18%
  ) !important;
}
.adventure-tile[data-tile="b"][data-bridge="vertical"]:before {
  top: -2px;
  bottom: -2px;
  left: 8%;
  width: 5px;
}
.adventure-tile[data-tile="b"][data-bridge="vertical"]:after {
  top: -2px;
  bottom: -2px;
  right: 8%;
  width: 5px;
}
.adventure-sprite {
  will-change: left, top;
  transition: none;
}
.adventure-player {
  animation: none !important;
  --actor-color: #0a78ec;
}
.adventure-player > u {
  position: absolute;
  left: 23%;
  right: 23%;
  bottom: 0;
  height: 18%;
  border: 2px solid #071426;
  border-top: 0;
  background: linear-gradient(
    90deg,
    #26384c 0 42%,
    transparent 43% 57%,
    #26384c 58%
  );
  text-decoration: none;
}
.adventure-player.walking {
  animation: adventure-walk 0.18s steps(2, end) infinite !important;
}
.adventure-player[data-facing="left"] > i:after {
  left: -15%;
}
.adventure-player[data-facing="right"] > i:after {
  left: 55%;
}
.adventure-intro {
  position: absolute;
  z-index: 50;
  inset: 45px 8px 8px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(5, 20, 35, 0.86),
    rgba(10, 43, 55, 0.72)
  );
  backdrop-filter: blur(5px);
}
.adventure-intro[hidden] {
  display: none;
}
.adventure-intro > div {
  width: min(620px, 92%);
  max-height: 95%;
  overflow: auto;
  padding: clamp(18px, 4cqw, 34px);
  border: 3px solid #071426;
  border-radius: 18px;
  background: linear-gradient(145deg, #fffdf4, #edf8e7);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.38),
    inset 0 0 0 3px #fff;
}
.adventure-intro span {
  display: block;
  color: #cf4d3c;
  font: 900 10px/1 "DM Sans";
  letter-spacing: 1.4px;
}
.adventure-intro h3 {
  margin: 8px 0 10px;
  font: 900 clamp(22px, 4cqw, 38px) / 1.02 "Libre Franklin";
  letter-spacing: -1px;
}
.adventure-intro p {
  margin: 0;
  color: #48556a;
  font: 650 clamp(11px, 1.8cqw, 15px) / 1.45 "DM Sans";
}
.adventure-intro ol {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 0;
  counter-reset: mission;
  list-style: none;
}
.adventure-intro li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font: 800 12px/1.25 "DM Sans";
}
.adventure-intro li:before {
  counter-increment: mission;
  content: counter(mission);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #173854;
  color: #fff;
}
.adventure-intro button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: #c8f000;
  color: #071426;
  font: 900 14px/1 "Libre Franklin";
  box-shadow: 0 5px 0 #7e9d00;
}
.adventure-intro button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #7e9d00;
}
.adventure-intro button b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #071426;
  color: #fff;
}
.adventure-intro small {
  display: block;
  margin-top: 12px;
  color: #617087;
  font: 700 9px/1.35 "DM Sans";
  text-align: center;
}
.runtime-controls.adventure-gamepad-controls {
  display: grid !important;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 5vw, 48px);
  min-height: 142px;
  padding: 10px clamp(14px, 4vw, 42px) !important;
  background: linear-gradient(
    180deg,
    rgba(12, 28, 46, 0.96),
    rgba(5, 16, 29, 0.98)
  );
  border-top: 2px solid #28435e;
  color: #fff;
  user-select: none;
  touch-action: none;
}
.adventure-dpad {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  grid-template-rows: repeat(3, 40px);
  align-items: stretch;
  justify-items: stretch;
  transform: scale(var(--adventure-control-scale, 1));
  transform-origin: left center;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.38));
  opacity: var(--adventure-control-opacity, 0.82);
}
.runtime-controls .adventure-dpad button {
  min-width: 48px !important;
  min-height: 40px !important;
  border: 1px solid #5d7186 !important;
  border-radius: 10px !important;
  background: linear-gradient(#344b62, #172c40) !important;
  color: #fff !important;
  font-size: 16px !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.22),
    0 3px 0 #071426;
}
.adventure-dpad [data-direction="up"] {
  grid-column: 2;
  grid-row: 1;
  border-radius: 12px 12px 4px 4px !important;
}
.adventure-dpad [data-direction="left"] {
  grid-column: 1;
  grid-row: 2;
  border-radius: 12px 4px 4px 12px !important;
}
.adventure-dpad > i {
  grid-column: 2;
  grid-row: 2;
  background: #1b3146;
  box-shadow: inset 0 0 0 1px #5d7186;
}
.adventure-dpad [data-direction="right"] {
  grid-column: 3;
  grid-row: 2;
  border-radius: 4px 12px 12px 4px !important;
}
.adventure-dpad [data-direction="down"] {
  grid-column: 2;
  grid-row: 3;
  border-radius: 4px 4px 12px 12px !important;
}
.runtime-controls .adventure-dpad button:active,
.runtime-controls .adventure-dpad button.pressed {
  transform: translateY(2px);
  background: #0a78ec !important;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.35);
}
.adventure-control-help {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #9fb0c1;
  text-align: center;
}
.adventure-control-help b {
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.adventure-control-help span {
  font-size: 9px;
}
.adventure-face-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  transform: scale(var(--adventure-control-scale, 1));
  transform-origin: right center;
  opacity: var(--adventure-control-opacity, 0.82);
}
.runtime-controls .adventure-face-buttons button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  width: 70px;
  height: 70px;
  min-width: 70px !important;
  min-height: 70px !important;
  border: 2px solid rgba(255, 255, 255, 0.45) !important;
  border-radius: 50% !important;
  color: #fff !important;
  box-shadow:
    inset 0 2px rgba(255, 255, 255, 0.28),
    0 6px 0 #071426;
}
.runtime-controls .adventure-face-buttons .button-b {
  align-self: flex-end;
  background: linear-gradient(145deg, #536a80, #24394e) !important;
}
.runtime-controls .adventure-face-buttons .button-a {
  align-self: flex-start;
  background: linear-gradient(145deg, #ff7863, #bd3e32) !important;
}
.adventure-face-buttons button b {
  font: 900 24px/1 "Libre Franklin";
}
.adventure-face-buttons button span {
  font: 800 8px/1 "DM Sans";
}
.runtime-controls .adventure-face-buttons button:active,
.runtime-controls .adventure-face-buttons button.pressed {
  transform: translateY(4px);
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.3),
    0 2px 0 #071426;
}
.adventure-config-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 0 12px 12px;
}
.adventure-config-grid label {
  display: grid;
  align-content: start;
  gap: 4px;
  color: #445269;
  font-size: 11px;
  font-weight: 750;
}
.adventure-config-grid .span-2 {
  grid-column: span 2;
}
.adventure-config-grid .span-full {
  grid-column: 1/-1;
}
.adventure-config-grid input,
.adventure-config-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  padding: 9px 11px;
  font: inherit;
}
.adventure-config-grid .adventure-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 20px;
}
.adventure-config-grid .adventure-toggle input {
  width: auto;
}
.adventure-scene-grid > button[data-tile="b"] {
  background: repeating-linear-gradient(90deg, #e5af6e 0 6px, #a96732 6px 13px);
  box-shadow:
    inset 0 3px #5c3219,
    inset 0 -3px #5c3219 !important;
}
@keyframes adventure-walk {
  50% {
    transform: translate(-50%, calc(-50% - 3px));
  }
}
@media (max-width: 800px) {
  .adventure-hud {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .adventure-hud em {
    display: none;
  }
  .adventure-intro {
    inset: 34px 5px 5px;
    padding: 7px;
  }
  .adventure-intro > div {
    width: 94%;
    padding: 17px;
  }
  .adventure-intro h3 {
    font-size: 22px;
  }
  .adventure-intro p {
    font-size: 11px;
  }
  .adventure-intro ol {
    margin: 11px 0;
  }
  .adventure-intro li {
    font-size: 10px;
  }
  .adventure-intro small {
    font-size: 8px;
  }
  .runtime-controls.adventure-gamepad-controls {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    min-height: 132px;
    padding: 8px 10px max(8px, env(safe-area-inset-bottom)) !important;
  }
  .adventure-dpad {
    grid-template-columns: repeat(3, 42px);
    grid-template-rows: repeat(3, 36px);
  }
  .runtime-controls .adventure-dpad button {
    min-width: 42px !important;
    min-height: 36px !important;
  }
  .adventure-control-help {
    display: none;
  }
  .adventure-face-buttons {
    gap: 7px;
  }
  .runtime-controls .adventure-face-buttons button {
    width: 62px;
    height: 62px;
    min-width: 62px !important;
    min-height: 62px !important;
  }
  .adventure-face-buttons button b {
    font-size: 21px;
  }
  .adventure-config-grid {
    grid-template-columns: 1fr 1fr;
  }
  .adventure-config-grid .span-2,
  .adventure-config-grid .span-full {
    grid-column: 1/-1;
  }
  .adventure-speech {
    bottom: 4%;
    max-height: 88%;
  }
}
@media (max-width: 420px) {
  .runtime-controls.adventure-gamepad-controls {
    min-height: 120px;
  }
  .adventure-dpad {
    grid-template-columns: repeat(3, 38px);
    grid-template-rows: repeat(3, 34px);
  }
  .runtime-controls .adventure-dpad button {
    min-width: 38px !important;
    min-height: 34px !important;
  }
  .runtime-controls .adventure-face-buttons button {
    width: 58px;
    height: 58px;
    min-width: 58px !important;
    min-height: 58px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .adventure-player.walking {
    animation: none !important;
  }
  .adventure-intro {
    backdrop-filter: none;
  }
}
.adventure-dpad {
  grid-template-columns: repeat(3, 48px) !important;
  grid-template-rows: repeat(3, 48px) !important;
}
.runtime-controls .adventure-dpad button {
  min-width: 48px !important;
  min-height: 48px !important;
}
@media (max-width: 800px) {
  .runtime-controls.adventure-gamepad-controls {
    min-height: 164px;
  }
}
@media (max-width: 420px) {
  .runtime-controls.adventure-gamepad-controls {
    min-height: 158px;
  }
}
.adventure-intro h3 {
  color: #071426;
}
.adventure-intro li {
  color: #173854;
}

/* Shared immersive game player v0.18.2 */
.runtime-immersive-brand,
.runtime-immersive-actions {
  display: none;
}
html.game-immersive-root,
html.game-immersive-root body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #071426;
}
body.game-immersive > .site-header,
body.game-immersive > .flash,
body.game-immersive > .site-footer {
  display: none !important;
}
body.game-immersive > main {
  height: 100%;
  min-height: 0;
}
body.game-immersive .game-play-page {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: block;
  width: 100%;
  height: 100svh;
  height: 100dvh;
  max-width: none;
  margin: 0;
  padding: 0;
  background: #071426;
  overflow: hidden;
}
body.game-immersive .game-play-header {
  display: none !important;
}
body.game-immersive .runtime-shell {
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #071426;
  box-shadow: none;
  overflow: hidden;
}
body.game-immersive .runtime-status {
  position: relative;
  z-index: 60;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 0;
  height: 52px;
  padding: 4px max(10px, env(safe-area-inset-right)) 4px
    max(12px, env(safe-area-inset-left));
  border: 0;
  border-bottom: 1px solid #28435e;
  background: linear-gradient(180deg, #132b43, #091a2c);
  color: #fff;
}
body.game-immersive .runtime-immersive-brand {
  display: block;
  color: #fff;
  font: 900 24px/1 "Libre Franklin";
  letter-spacing: -1.4px;
}
body.game-immersive .runtime-immersive-brand span {
  color: #55b7ff;
  font-size: 0.58em;
  letter-spacing: -0.5px;
}
body.game-immersive [data-runtime-message] {
  min-width: 0;
  overflow: hidden;
  color: #bdc9d5;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body.game-immersive .runtime-immersive-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
body.game-immersive .runtime-immersive-actions button,
body.game-immersive .runtime-immersive-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #486078;
  border-radius: 11px;
  background: #1a344d;
  color: #fff;
  font: 800 11px/1 "DM Sans";
  text-decoration: none;
}
body.game-immersive .runtime-immersive-actions button {
  padding: 0 12px;
}
body.game-immersive .runtime-immersive-actions button > span {
  font-size: 20px;
}
body.game-immersive .runtime-immersive-actions a {
  font-size: 25px;
}
body.game-immersive .runtime-stage-frame {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 6px;
  background: #10263a;
  overflow: hidden;
}
body.game-immersive .runtime-stage {
  width: var(--runtime-stage-fit-width, 100%) !important;
  height: var(--runtime-stage-fit-height, 100%) !important;
  min-width: 0;
  min-height: 0;
  max-width: none !important;
  aspect-ratio: var(--runtime-stage-ratio, auto) !important;
  border: 0;
  border-radius: 12px;
  margin: 0;
  background: #10263a;
  box-shadow: none;
  overflow: hidden;
}
body.game-immersive.game-immersive-world .runtime-stage {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
}
body.game-immersive.game-immersive-world .runtime-stage > .runtime-heading {
  display: none !important;
}
body.game-immersive.game-immersive-world
  .runtime-stage
  > .adventure-immersive-stage {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 12px;
}
body.game-immersive
  .runtime-controls:not(:empty):not(.adventure-gamepad-controls) {
  max-height: min(35dvh, 280px);
  overflow: auto;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  background: #fff;
}
body.game-immersive .runtime-controls.adventure-gamepad-controls {
  position: relative !important;
  inset: auto !important;
  margin: 0 !important;
  min-height: 0;
  height: 158px;
  padding: 6px clamp(16px, 4vw, 52px) max(6px, env(safe-area-inset-bottom)) !important;
  border-top: 1px solid #28435e;
}
body.game-immersive.adventure-intro-active .runtime-shell {
  grid-template-rows: 52px minmax(0, 1fr) 0;
}
body.game-immersive.adventure-intro-active
  .runtime-controls.adventure-gamepad-controls {
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0;
  overflow: hidden;
  visibility: hidden;
}
body.game-immersive .adventure-dpad {
  grid-column: 1;
}
body.game-immersive .adventure-control-help {
  grid-column: 2;
}
body.game-immersive .adventure-face-buttons {
  grid-column: 3;
}
body.game-immersive .adventure-layout {
  align-items: center;
  justify-items: stretch;
}
body.game-immersive .adventure-board {
  max-width: 100%;
  max-height: 100%;
}
body.game-immersive .adventure-sprite {
  width: clamp(28px, 4cqw, 64px);
}
body.game-immersive .adventure-intro {
  inset: 38px 6px 6px;
  padding: 10px;
}
body.game-immersive .adventure-intro > div {
  width: min(700px, 94%);
  max-height: 100%;
  padding: clamp(16px, 3vmin, 30px);
}
body.game-immersive .adventure-intro h3 {
  font-size: clamp(22px, 4vmin, 42px);
}
body.game-immersive .adventure-intro p {
  font-size: clamp(11px, 1.7vmin, 16px);
}
body.game-immersive .adventure-intro li {
  font-size: clamp(10px, 1.45vmin, 14px);
}
.runtime-shell:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  background: #071426;
}
@media (max-width: 700px) {
  body.game-immersive .runtime-shell {
    grid-template-rows: 46px minmax(0, 1fr) auto;
  }
  body.game-immersive.game-immersive-world .runtime-shell {
    grid-template-rows: 46px minmax(0, 1fr) 158px;
  }
  body.game-immersive.adventure-intro-active .runtime-shell {
    grid-template-rows: 46px minmax(0, 1fr) 0;
  }
  body.game-immersive .runtime-status {
    grid-template-columns: auto minmax(0, 1fr) auto;
    height: 46px;
    gap: 8px;
    padding-block: 2px;
  }
  body.game-immersive .runtime-immersive-brand {
    font-size: 20px;
  }
  body.game-immersive [data-runtime-message] {
    font-size: 10px;
  }
  body.game-immersive [data-runtime-timer] {
    display: none;
  }
  body.game-immersive .runtime-immersive-actions button {
    width: 44px;
    padding: 0;
  }
  body.game-immersive .runtime-immersive-actions button b {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  body.game-immersive .runtime-stage-frame {
    padding: 3px;
  }
  body.game-immersive .runtime-stage,
  body.game-immersive.game-immersive-world
    .runtime-stage
    > .adventure-immersive-stage {
    border-radius: 8px;
  }
  body.game-immersive .adventure-intro {
    inset: 30px 3px 3px;
    padding: 5px;
  }
  body.game-immersive .adventure-intro > div {
    width: 97%;
    padding: 14px;
  }
  body.game-immersive .adventure-intro small {
    margin-top: 8px;
  }
  body.game-immersive .runtime-controls.adventure-gamepad-controls {
    height: 158px;
    padding-inline: 12px !important;
  }
}
@media (max-width: 420px) {
  body.game-immersive [data-runtime-message] {
    display: none;
  }
  body.game-immersive .runtime-status {
    grid-template-columns: 1fr auto;
  }
  body.game-immersive .runtime-immersive-brand {
    justify-self: start;
  }
}
@media (max-height: 620px) and (orientation: landscape) {
  body.game-immersive .runtime-shell {
    grid-template-rows: 44px minmax(0, 1fr) auto;
  }
  body.game-immersive.game-immersive-world .runtime-shell {
    grid-template-rows: 44px minmax(0, 1fr) 154px;
  }
  body.game-immersive.adventure-intro-active .runtime-shell {
    grid-template-rows: 44px minmax(0, 1fr) 0;
  }
  body.game-immersive .runtime-status {
    height: 44px;
  }
  body.game-immersive .adventure-intro {
    inset: 29px 3px 3px;
  }
  body.game-immersive .adventure-intro > div {
    padding: 11px 16px;
  }
  body.game-immersive .adventure-intro h3 {
    margin: 4px 0 6px;
    font-size: 22px;
  }
  body.game-immersive .adventure-intro p {
    font-size: 10px;
  }
  body.game-immersive .adventure-intro ol {
    margin: 7px 0;
    gap: 3px;
  }
  body.game-immersive .adventure-intro li {
    font-size: 9px;
  }
  body.game-immersive .adventure-intro li:before {
    width: 20px;
    height: 20px;
  }
  body.game-immersive .adventure-intro button {
    min-height: 44px;
  }
  body.game-immersive .adventure-intro small {
    display: none;
  }
}

/* Scrollende Kampagnenwelt */
.plugin-side-scroller {
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  overflow: hidden;
  background: #10263a !important;
}
.side-scroller-hud {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  border-bottom: 1px solid #46627d;
  background: #10263a;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}
.side-scroller-hud strong {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #c8f000;
  color: #071426;
}
.side-scroller-hud > span:last-child {
  text-align: right;
}
.side-scroller-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #bfe8ff;
  touch-action: none;
}
.side-scroller-world {
  position: absolute;
  left: 0;
  bottom: 0;
  transform-origin: left bottom;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    var(--side-world-background, #bfe8ff) 0 70%,
    color-mix(in srgb, var(--side-world-background, #bfe8ff) 72%, #fff) 70%
  );
  will-change: transform;
}
.side-scroller-world:before,
.side-scroller-world:after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}
.side-scroller-world:before {
  left: 8%;
  top: 12%;
  width: 180px;
  height: 58px;
  box-shadow:
    720px 30px rgba(255, 255, 255, 0.52),
    1430px -8px rgba(255, 255, 255, 0.62);
}
.side-scroller-world:after {
  left: 45%;
  top: 31%;
  width: 110px;
  height: 35px;
  box-shadow: 860px -70px rgba(255, 255, 255, 0.38);
}
.side-platform {
  position: absolute;
  z-index: 3;
  border: 2px solid #0e3a33;
  border-radius: 9px 9px 3px 3px;
  background: linear-gradient(#36b675 0 28%, #185947 29%);
  box-shadow:
    inset 0 4px #75d498,
    0 5px 0 rgba(7, 20, 38, 0.18);
}
.side-collectible {
  position: absolute;
  z-index: 6;
  display: grid;
  place-items: center;
  align-content: center;
  width: 48px;
  height: 58px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 16px;
  background: #ffc900;
  color: #624900;
  box-shadow: 0 8px 18px rgba(7, 20, 38, 0.22);
  animation: qews-side-float 0.8s ease-in-out infinite alternate;
}
.side-collectible b {
  font-size: 22px;
}
.side-collectible small {
  position: absolute;
  top: 62px;
  min-width: 90px;
  color: #071426;
  font-size: 9px;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 1px #fff;
}
.side-checkpoint,
.side-goal {
  position: absolute;
  z-index: 4;
  display: grid;
  justify-items: center;
  transform: translate(-50%, -100%);
  color: #173854;
}
.side-checkpoint b,
.side-goal b {
  font-size: 48px;
  filter: drop-shadow(0 4px 2px rgba(7, 20, 38, 0.2));
}
.side-checkpoint small,
.side-goal small {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.side-checkpoint.active b {
  color: #c8f000;
}
.side-goal b {
  color: #ff5d49;
}
.side-player {
  --side-player-color: #0a78ec;
  position: absolute;
  z-index: 10;
  width: 38px;
  height: 54px;
  border: 3px solid #fff;
  border-radius: 16px 16px 13px 13px;
  background: var(--side-player-color);
  box-shadow:
    0 5px 0 #071426,
    0 9px 15px rgba(7, 20, 38, 0.25);
  will-change: left, top;
}
.side-player:before,
.side-player:after {
  content: "";
  position: absolute;
  top: 15px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}
.side-player:before {
  left: 8px;
}
.side-player:after {
  right: 8px;
}
.side-player > i {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 12px;
  height: 4px;
  border-radius: 4px;
  background: #071426;
}
.side-player > i:after {
  content: "";
  position: absolute;
  left: -5px;
  bottom: -18px;
  width: 10px;
  height: 16px;
  border-radius: 4px;
  background: #173854;
  box-shadow: 18px 0 #173854;
}
.side-player[data-facing="left"] {
  transform: scaleX(-1);
}
.side-player.running {
  animation: qews-side-run 0.16s steps(2, end) infinite;
}
.side-player.jumping {
  filter: drop-shadow(0 8px 5px rgba(7, 20, 38, 0.22));
}
.side-decoration {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.side-decoration-tree {
  border-radius: 50% 50% 20% 20%;
  background: #3c9362;
}
.side-decoration-sign {
  border: 3px solid #173854;
  border-radius: 8px;
  background: #fff4cf;
  color: #173854;
  font-size: 11px;
  font-weight: 900;
}
.plugin-side-scroller.completed:after {
  content: "Kampagne geschafft ✓";
  position: absolute;
  z-index: 30;
  inset: 38px 0 0;
  display: grid;
  place-items: center;
  background: rgba(7, 20, 38, 0.76);
  color: #c8f000;
  font: 900 clamp(24px, 5vw, 54px) / 1 "Libre Franklin";
}
.runtime-controls.side-scroller-controls {
  display: grid !important;
  grid-template-columns: auto minmax(100px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 112px;
  padding: 10px max(16px, env(safe-area-inset-left))
    max(10px, env(safe-area-inset-bottom)) !important;
  border-top: 1px solid #28435e;
  background: #091a2c;
  color: #fff;
}
.side-scroller-controls > div {
  display: flex;
  gap: 8px;
}
.runtime-controls.side-scroller-controls button {
  min-width: 64px;
  min-height: 64px;
  border: 2px solid #536d84;
  border-radius: 18px;
  background: linear-gradient(#344b62, #172c40);
  color: #fff;
  font-size: 24px;
  box-shadow: 0 5px 0 #030a12;
}
.runtime-controls.side-scroller-controls > button {
  display: grid;
  place-items: center;
  align-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(#ff7a66, #bd3e32);
}
.side-scroller-controls > button b {
  font-size: 26px;
}
.side-scroller-controls > button small {
  font-size: 8px;
}
.side-scroller-controls > span {
  color: #9fb0c1;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.runtime-controls.side-scroller-controls button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #030a12;
}
@keyframes qews-side-float {
  to {
    transform: translate(-50%, calc(-50% - 8px));
  }
}
@keyframes qews-side-run {
  50% {
    margin-top: -3px;
  }
}
@media (max-width: 700px) {
  .side-scroller-hud {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-inline: 8px;
    font-size: 9px;
  }
  .side-scroller-hud > span:last-child {
    display: none;
  }
  .runtime-controls.side-scroller-controls {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    min-height: 108px;
  }
  .side-scroller-controls > span {
    display: none;
  }
  .runtime-controls.side-scroller-controls button {
    min-width: 58px;
    min-height: 58px;
  }
  .runtime-controls.side-scroller-controls > button {
    width: 66px;
    height: 66px;
  }
  .side-collectible small {
    font-size: 8px;
  }
  .plugin-side-scroller.completed:after {
    inset: 38px 0 0;
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .side-collectible,
  .side-player.running {
    animation: none;
  }
}
.adventure-portal {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  width: clamp(28px, 6cqw, 52px);
  aspect-ratio: 1;
  border: 2px solid #fff;
  border-radius: 12px;
  background: #0a78ec;
  color: #fff;
  box-shadow: 0 5px 12px rgba(7, 20, 38, 0.28);
  animation: qews-portal-pulse 1s ease-in-out infinite alternate;
  pointer-events: auto;
}
.adventure-portal b {
  font-size: clamp(15px, 3cqw, 26px);
}
.adventure-portal small {
  position: absolute;
  top: calc(100% + 3px);
  min-width: 90px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #071426;
  color: #fff;
  font-size: 7px;
  font-weight: 850;
  white-space: nowrap;
}
.adventure-portal small em {
  display: block;
  max-width: 190px;
  margin-top: 2px;
  overflow: hidden;
  color: #ffd66b;
  font-size: 6px;
  font-style: normal;
  text-overflow: ellipsis;
}
.adventure-portal.is-locked {
  border-color: #ffd66b;
  background: #31445a;
  color: #fff;
  cursor: not-allowed;
  filter: saturate(.45);
  animation: none;
}
.adventure-portal.is-locked:after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 2px dashed rgba(255, 214, 107, .85);
  border-radius: 16px;
}
.adventure-portal.is-locked small {
  min-width: 142px;
  border: 1px solid #ffd66b;
  background: #071426;
}

/* Professional docked editor shell v0.21.0 */
body:has(.game-builder) > .site-header,
body:has(.game-builder) > .site-footer,
body:has(.adventure-editor) > .site-header,
body:has(.adventure-editor) > .site-footer {
  display: none;
}
body:has(.game-builder) > main,
body:has(.adventure-editor) > main {
  min-height: 100dvh;
}
.game-builder,
.content-form:has(.adventure-editor) {
  --studio-bg: #15181d;
  --studio-panel: #22262d;
  --studio-panel-2: #292e36;
  --studio-line: #3a414b;
  --studio-text: #e7ebf0;
  --studio-muted: #929ba8;
  --studio-accent: #4da3ff;
  --studio-active: #d7ff00;
}
.studio-product-mark {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(145deg, #d7ff00, #a8cf00);
  color: #10151b;
  font: 950 17px/1 "Libre Franklin";
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}
.game-builder {
  min-height: calc(100dvh - 88px);
  padding-bottom: 26px;
  background: var(--studio-bg);
  color: var(--studio-text);
}
.game-builder-top {
  top: 0;
  min-height: 58px;
  padding-block: 7px;
  border-color: var(--studio-line);
  background: #111419;
  color: var(--studio-text);
  box-shadow: 0 3px 14px rgba(0,0,0,.32);
}
.game-builder-top > div:first-child {
  gap: 12px;
}
.studio-breadcrumb {
  display: grid;
  gap: 1px;
  min-width: 150px;
}
.studio-breadcrumb small,
.studio-dock-heading small,
.studio-editor-type,
.room-layer-editor > header small,
.game-stage-layers small {
  color: var(--studio-muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .09em;
}
.studio-breadcrumb strong {
  font-size: 13px;
}
.game-builder-top a {
  color: #b9c2ce;
  font-size: 12px;
}
.game-builder-top span[data-save-state] {
  padding-left: 12px;
  border-left: 1px solid var(--studio-line);
  color: var(--studio-muted);
}
.game-builder-top .button-outline {
  border-color: #525b67;
  background: #252a31;
  color: #fff;
}
.game-builder-project {
  border-color: var(--studio-line);
  background: #1b1f25;
}
.game-builder-project > summary {
  min-height: 40px;
  color: #dce2e9;
  font-size: 12px;
}
.game-builder-project > summary:before {
  background: #303640;
  color: var(--studio-accent);
}
.game-builder-project > summary small,
.game-builder-meta label > small {
  color: var(--studio-muted);
}
.game-builder-meta {
  border-top: 1px solid var(--studio-line);
  background: #20242b;
}
.game-builder-meta label,
.settings-grid label,
.game-builder .builder-row-card label,
.game-builder .logic-card label,
.game-builder .objective-card label {
  color: #bcc5d0;
}
.game-builder-meta input,
.game-builder-meta select,
.game-builder .settings-grid input,
.game-builder .settings-grid select,
.game-builder .builder-row-card input,
.game-builder .builder-row-card select,
.game-builder .builder-row-card textarea,
.game-builder .logic-card input,
.game-builder .logic-card select,
.game-builder .objective-card input,
.game-builder .objective-card select {
  border-color: #4a525e;
  background: #171a1f;
  color: #eef2f6;
}
.game-builder-tabs {
  min-height: 46px;
  align-items: end;
  border-color: var(--studio-line);
  background: #1a1e24;
}
.game-builder-tabs button {
  min-height: 43px;
  padding: 10px 18px;
  color: #aeb7c2;
  font-size: 12px;
}
.game-builder-tabs button span {
  color: #7c8794;
}
.game-builder-tabs button.active {
  border-color: var(--studio-accent);
  background: #242932;
  color: #fff;
}
.game-builder-tabs button.active span {
  color: var(--studio-accent);
}
.game-builder-workspace {
  padding: 10px 12px 16px;
  background: var(--studio-bg);
}
.game-builder-workspace[data-builder-panel="scene"] {
  grid-template-columns: 218px minmax(520px, 1fr) 305px;
  gap: 8px;
}
.game-builder-panel-guide {
  min-height: 58px;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid var(--studio-line);
  border-left: 3px solid var(--studio-accent);
  border-radius: 3px;
  background: #20252c;
}
.game-builder-panel-guide span,
.game-builder-panel-guide small,
.game-builder-panel-guide p {
  color: var(--studio-muted);
}
.game-builder-panel-guide h2 {
  margin: 1px 0;
  color: #f1f4f7;
  font-size: 15px;
}
.component-palette,
.component-inspector,
.stage-area,
.game-builder .builder-list-panel,
.game-builder .settings-grid,
.game-builder .engine-info {
  border: 1px solid var(--studio-line);
  border-radius: 4px;
  background: var(--studio-panel);
  color: var(--studio-text);
  box-shadow: none;
}
.component-palette,
.component-inspector {
  top: 202px;
  padding: 10px;
  max-height: calc(100dvh - 220px);
}
.studio-dock-heading,
.adventure-dock-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--studio-line);
}
.adventure-dock-heading > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}
.adventure-dock-heading strong {
  color: #eef2f6;
  font-size: 11px;
  line-height: 1.2;
}
.studio-dock-heading > span,
.adventure-dock-heading > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 4px;
  background: #343b45;
  color: var(--studio-accent);
}
.studio-dock-heading h2 {
  margin: 1px 0 0;
  color: #f1f4f7;
  font-size: 14px;
}
.component-palette > p,
.component-inspector .inspector-intro {
  margin: 8px 0;
  color: var(--studio-muted);
  font-size: 10px;
}
.palette-search {
  margin: 8px 0 !important;
  border: 1px solid #49515d;
  border-radius: 4px;
  background: #171a1f;
  padding: 0 7px;
}
.palette-search input {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #fff;
  outline: 0;
}
.component-filter-bar {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 3px !important;
  margin-bottom: 7px;
}
.component-filter-bar button {
  min-height: 27px !important;
  border: 1px solid #454d58 !important;
  border-radius: 3px !important;
  background: #2a3038 !important;
  color: #aeb8c4;
  font-size: 9px !important;
}
.component-filter-bar button.active {
  border-color: var(--studio-accent) !important;
  background: #173b60 !important;
  color: #fff;
}
.component-palette > .component-palette-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
}
.component-palette-list > button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 36px;
  align-items: center;
  border-color: transparent;
  border-radius: 3px;
  background: #292f37;
  color: #dce2e9;
  padding: 3px 7px;
  text-align: left;
  font-size: 10px;
}
.component-palette-list > button:hover {
  border-color: var(--studio-accent);
  background: #323a45;
}
.component-palette-list > button span {
  color: var(--studio-accent);
  font-size: 16px;
  text-align: center;
}
.stage-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  overflow: hidden;
}
.stage-toolbar,
.game-stage-frame {
  grid-column: 1 / -1;
}
.stage-toolbar {
  min-height: 44px;
  padding: 5px 9px;
  border-color: var(--studio-line);
  background: #252a31;
  gap: 7px;
}
.stage-toolbar > strong {
  color: #eef2f6;
  font-size: 12px;
}
.studio-editor-type {
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 4px 7px;
  border-radius: 3px;
  background: #171a1f;
  color: #8f9aa7 !important;
}
.stage-history,
.stage-devices {
  border-color: #454d58;
  border-radius: 3px;
  background: #181c21;
}
.stage-history button,
.stage-devices button {
  color: #aeb8c4;
}
.stage-devices button.active {
  background: #3a424d;
}
.stage-toolbar .text-button {
  color: #9dc8f4;
  font-size: 10px;
}
.game-stage-frame {
  min-height: min(58dvh, 680px);
  padding: 18px;
  border-radius: 0;
  background-color: #111419;
  background-image: linear-gradient(45deg,#181c21 25%,transparent 25%),linear-gradient(-45deg,#181c21 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#181c21 75%),linear-gradient(-45deg,transparent 75%,#181c21 75%);
  background-position: 0 0,0 8px,8px -8px,-8px 0;
  background-size: 16px 16px;
}
.game-stage {
  border-radius: 2px;
  box-shadow: 0 0 0 1px #4b535e, 0 18px 40px rgba(0,0,0,.35);
}
.room-layer-editor,
.game-stage-layers {
  min-width: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--studio-line);
  border-radius: 0;
  background: #20242b;
}
.room-layer-editor {
  border-right: 1px solid var(--studio-line);
}
.room-layer-editor > header {
  min-height: 42px;
  padding: 6px 9px;
  border-color: var(--studio-line);
  background: #272c34;
}
.room-layer-editor > header strong,
.game-stage-layers strong {
  color: #e3e8ee;
  font-size: 11px;
}
.room-layer-editor > header button {
  min-height: 28px;
  border-radius: 3px;
  background: #38414c;
  font-size: 9px;
}
.room-layer-editor > [data-layer-list] {
  max-height: 150px;
  padding: 6px;
}
.room-layer-card {
  min-width: 190px;
  border-color: #444c57;
  border-radius: 3px;
  background: #292f37;
  color: #dce2e9;
}
.game-stage-layers {
  grid-template-columns: 120px minmax(0,1fr);
  padding: 8px;
}
.game-stage-layers button {
  border-color: #444c57;
  border-radius: 3px;
  background: #292f37;
  color: #dce2e9;
}
.game-stage-layers button.active {
  border-color: var(--studio-accent);
  background: #173b60;
}
.component-inspector > div {
  gap: 8px;
}
.component-inspector .inspector-type {
  border-radius: 3px;
  background: #303640;
  color: #fff;
}
.component-inspector details {
  border-color: var(--studio-line);
}
.component-inspector summary {
  color: #dce2e9;
}
.component-inspector label {
  color: #aeb8c4;
}
.component-inspector input,
.component-inspector textarea,
.component-inspector select {
  border-color: #4a525e;
  border-radius: 3px;
  background: #171a1f;
  color: #eef2f6;
}
.game-builder .builder-list-panel,
.game-builder .settings-grid,
.game-builder .engine-info {
  color: #dce2e9;
}
.game-builder .panel-heading,
.game-builder .builder-row-card,
.game-builder .logic-card,
.game-builder .objective-card {
  border-color: var(--studio-line);
  background: #252a31;
}
.game-builder .panel-heading h2,
.game-builder .engine-info strong {
  color: #f1f4f7;
}
.game-builder-statusbar,
.adventure-editor-statusbar {
  display: flex;
  min-height: 26px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 12px;
  border-top: 1px solid #3a414b;
  background: #111419;
  color: #8f99a6;
  font-size: 9px;
  font-weight: 700;
}
.game-builder-statusbar {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
}

/* Editorial scene editor: Outliner + Viewport + Inspector */
body:has(.adventure-editor) .quiz-content-page {
  max-width: none;
  padding: 12px max(12px, 1.3vw) 70px;
}
body:has(.adventure-editor) .quiz-content-page > .form-heading {
  display: none;
}
.content-form:has(.adventure-editor) {
  gap: 0;
  padding: 0;
  border-color: var(--studio-line);
  border-radius: 7px;
  background: var(--studio-bg);
  color: var(--studio-text);
  overflow: clip;
  box-shadow: 0 16px 42px rgba(7,20,38,.18);
}
.quiz-editor-commandbar {
  grid-column: 1 / -1;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--studio-line);
  background: #111419;
}
.quiz-editor-commandbar > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}
.quiz-editor-commandbar a {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 4px;
  color: #b9c3ce;
  text-decoration: none;
}
.quiz-editor-commandbar a:hover {
  background: #2d333c;
}
.quiz-editor-commandbar small {
  display: block;
  color: var(--studio-muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .1em;
}
.quiz-editor-commandbar strong {
  display: block;
  max-width: min(58vw, 800px);
  overflow: hidden;
  color: #f1f4f7;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quiz-editor-project-settings {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--studio-line);
  background: #1c2026;
}
.quiz-editor-project-settings > summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  color: #dce2e9;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.quiz-editor-project-settings > summary small {
  color: var(--studio-muted);
  font-size: 9px;
  font-weight: 600;
}
.quiz-editor-meta-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--studio-line);
}
.quiz-editor-meta-grid label {
  color: #b9c3ce;
}
.quiz-editor-meta-grid input,
.quiz-editor-meta-grid select {
  border-color: #4a525e;
  border-radius: 3px;
  background: #15181d;
  color: #eef2f6;
}
.content-form:has(.adventure-editor) .dynamic-quiz-fields {
  grid-column: 1 / -1;
  padding: 0;
  border: 0;
}
.content-form:has(.adventure-editor) .dynamic-quiz-fields > div:first-child {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--studio-line);
  background: #20242b;
}
.content-form:has(.adventure-editor) .dynamic-quiz-fields > div:first-child .eyebrow {
  margin: 0;
  color: var(--studio-accent);
  font-size: 8px;
}
.content-form:has(.adventure-editor) .dynamic-quiz-fields > div:first-child h2 {
  color: #f1f4f7;
  font-size: 13px;
}
.content-form:has(.adventure-editor) .dynamic-quiz-fields > [data-content-fields] {
  gap: 7px;
  margin: 0;
  padding: 8px;
}
.content-form:has(.adventure-editor) .visual-content-field {
  border-color: var(--studio-line);
  border-radius: 4px;
  background: #22262d;
  color: #e6ebf0;
  box-shadow: none;
}
.content-form:has(.adventure-editor) .visual-content-textarea {
  grid-column: 1 / -1;
  padding: 10px 12px;
}
.content-form:has(.adventure-editor) .visual-content-textarea .visual-field-heading {
  margin-bottom: 6px;
}
.content-form:has(.adventure-editor) .visual-content-textarea textarea {
  height: 76px;
  min-height: 76px;
  resize: vertical;
}
.content-form:has(.adventure-editor) .visual-content-adventure-scene {
  padding: 0;
  overflow: hidden;
}
.content-form:has(.adventure-editor) .visual-content-adventure-scene > .visual-field-heading {
  display: none;
}
.content-form:has(.adventure-editor) .visual-field-heading small {
  color: var(--studio-muted);
}
.content-form:has(.adventure-editor) .visual-field-body > textarea,
.content-form:has(.adventure-editor) .visual-field-body > input {
  border-color: #4a525e;
  border-radius: 3px;
  background: #15181d;
  color: #eef2f6;
}
.content-form:has(.adventure-editor) .adventure-editor {
  gap: 0;
  background: var(--studio-bg);
}
.content-form:has(.adventure-editor) .adventure-workspace-tabs {
  top: 0;
  gap: 0;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid var(--studio-line);
  border-radius: 0;
  background: #1a1e24;
  box-shadow: none;
  backdrop-filter: none;
}
.content-form:has(.adventure-editor) .adventure-workspace-tabs button {
  min-height: 46px;
  border-radius: 0;
  color: #aeb7c2;
  font-size: 11px;
}
.content-form:has(.adventure-editor) .adventure-workspace-tabs button[aria-selected="true"] {
  border-bottom: 2px solid var(--studio-accent);
  background: #272c34;
  color: #fff;
  box-shadow: none;
}
.content-form:has(.adventure-editor) .adventure-workspace-tabs button[aria-selected="true"] > span {
  color: var(--studio-accent);
}
.content-form:has(.adventure-editor) .adventure-workspace-guide {
  min-height: 52px;
  align-items: center;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--studio-line);
  border-left: 3px solid var(--studio-accent);
  border-radius: 0;
  background: #20252c;
}
.content-form:has(.adventure-editor) .adventure-workspace-guide h3 {
  color: #f1f4f7;
  font-size: 14px;
}
.content-form:has(.adventure-editor) .adventure-workspace-guide p,
.content-form:has(.adventure-editor) .adventure-workspace-guide span,
.content-form:has(.adventure-editor) .adventure-workspace-guide small {
  color: var(--studio-muted);
}
.adventure-workspace-panel[data-adventure-workspace-panel="map"] {
  grid-template-columns: 190px minmax(480px, 1fr) 250px;
  grid-template-areas:
    "outliner tools tools"
    "outliner viewport inspector"
    "status status status";
  gap: 1px;
  background: var(--studio-line);
}
.adventure-zone-outliner {
  grid-area: outliner;
  display: flex;
  min-width: 0;
  align-items: stretch;
  flex-direction: column;
  gap: 3px;
  padding: 8px;
  border: 0;
  border-radius: 0;
  background: var(--studio-panel);
}
.adventure-zone-outliner > .adventure-dock-heading {
  margin-bottom: 4px;
}
.adventure-zone-outliner > div {
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
  overflow: visible;
}
.adventure-zone-outliner button {
  min-height: 34px;
  border-color: transparent;
  border-radius: 3px;
  background: #2b3038;
  color: #cbd2db;
  padding: 5px 7px;
  text-align: left;
  font-size: 10px;
}
.adventure-zone-outliner button.active {
  border-color: var(--studio-accent);
  background: #173b60;
  color: #fff;
}
.adventure-zone-outliner > button:not(:last-child) {
  margin-top: 5px;
}
.adventure-editor-tools {
  grid-area: tools;
  min-width: 0;
  min-height: 48px;
  padding: 6px 8px;
  border: 0;
  border-radius: 0;
  background: #252a31;
  overflow-x: auto;
  flex-wrap: nowrap;
}
.adventure-editor-tools > [data-terrain-tools] {
  flex-wrap: nowrap;
}
.adventure-editor-tools button {
  flex: 0 0 auto;
  min-height: 32px;
  border-color: #454d58;
  border-radius: 3px;
  background: #303640;
  color: #d9e0e7;
  font-size: 9px;
}
.adventure-editor-tools button.active {
  border-color: var(--studio-accent);
  background: #173b60;
  color: #fff;
  box-shadow: none;
}
.adventure-editor-tools > span:last-child {
  display: none;
}
.adventure-viewport-dock {
  grid-area: viewport;
  min-width: 0;
  min-height: 570px;
  background-color: #111419;
  background-image: linear-gradient(45deg,#181c21 25%,transparent 25%),linear-gradient(-45deg,#181c21 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#181c21 75%),linear-gradient(-45deg,transparent 75%,#181c21 75%);
  background-position: 0 0,0 8px,8px -8px,-8px 0;
  background-size: 16px 16px;
}
.adventure-viewport-dock > header {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  padding: 5px 9px;
  border-bottom: 1px solid var(--studio-line);
  background: #20242b;
}
.adventure-viewport-dock > header span,
.adventure-viewport-dock > header small {
  color: var(--studio-muted);
  font-size: 8px;
  font-weight: 800;
}
.adventure-viewport-dock > header strong {
  margin-right: auto;
  color: #e8edf2;
  font-size: 10px;
}
.adventure-viewport-dock .adventure-scene-grid {
  width: calc(100% - 28px);
  max-height: calc(100% - 64px);
  margin: 14px auto;
  border-color: #0b1015;
  border-radius: 2px;
  box-shadow: 0 12px 34px rgba(0,0,0,.4);
}
.adventure-editor-settings {
  grid-area: inspector;
  align-self: stretch;
  align-content: start;
  border: 0;
  border-radius: 0;
  background: var(--studio-panel);
  color: #dbe2e9;
  padding: 8px;
}
.adventure-editor-settings label {
  color: #aeb8c4;
  font-size: 9px;
}
.adventure-editor-settings input,
.adventure-editor-settings select {
  min-height: 32px;
  border-color: #4a525e;
  border-radius: 3px;
  background: #15181d;
  color: #eef2f6;
}
.adventure-editor-statusbar {
  grid-area: status;
}
.content-form:has(.adventure-editor) .adventure-workspace-panel:not([data-adventure-workspace-panel="map"]) {
  padding: 8px;
  background: var(--studio-bg);
}
.content-form:has(.adventure-editor) .adventure-workspace-panel > details {
  border-color: var(--studio-line);
  border-radius: 3px;
  background: var(--studio-panel);
  color: #dce2e9;
}
.content-form:has(.adventure-editor) .adventure-workspace-panel summary {
  color: #e7ebf0;
}
.content-form:has(.adventure-editor) .adventure-workspace-panel input,
.content-form:has(.adventure-editor) .adventure-workspace-panel textarea,
.content-form:has(.adventure-editor) .adventure-workspace-panel select {
  border-color: #4a525e;
  border-radius: 3px;
  background: #15181d;
  color: #eef2f6;
}
.content-form:has(.adventure-editor) .tile-asset-inspector,
.content-form:has(.adventure-editor) .adventure-entity-list > article,
.content-form:has(.adventure-editor) .adventure-objective-list > article,
.content-form:has(.adventure-editor) .campaign-entity-list > article {
  border-color: #454d58;
  border-radius: 3px;
  background: #292f37;
  color: #dce2e9;
}
.content-form:has(.adventure-editor) .form-actions {
  display: none;
}
@media (min-width: 1101px) and (max-width: 1400px) {
  .game-builder-workspace[data-builder-panel="scene"] {
    grid-template-columns: 205px minmax(500px, 1fr) 285px;
  }
  .component-inspector {
    grid-column: auto;
    position: sticky;
    max-height: calc(100dvh - 220px);
  }
  .component-inspector > div {
    display: grid;
    grid-template-columns: 1fr;
  }
  .component-inspector .inspector-type,
  .component-inspector .danger-text,
  .hotspot-inspector {
    grid-column: auto;
  }
  .adventure-workspace-panel[data-adventure-workspace-panel="map"] {
    grid-template-columns: 170px minmax(440px,1fr) 230px;
  }
}
@media (max-width: 1100px) {
  .game-builder-workspace[data-builder-panel="scene"] {
    grid-template-columns: 190px minmax(460px,1fr);
  }
  .component-inspector {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }
  .adventure-workspace-panel[data-adventure-workspace-panel="map"] {
    grid-template-columns: 160px minmax(420px,1fr);
    grid-template-areas:
      "outliner tools"
      "outliner viewport"
      "inspector inspector"
      "status status";
  }
}
@media (max-width: 800px) {
  body:has(.adventure-editor) .quiz-content-page {
    padding: 0 0 70px;
  }
  .content-form:has(.adventure-editor) {
    border-radius: 0;
  }
  .quiz-editor-commandbar {
    position: sticky;
    top: 0;
    z-index: 30;
  }
  .quiz-editor-commandbar strong {
    max-width: 46vw;
  }
  .quiz-editor-meta-grid {
    grid-template-columns: 1fr;
  }
  .game-builder-workspace[data-builder-panel="scene"] {
    grid-template-columns: 1fr;
  }
  .component-palette,
  .component-inspector {
    max-height: none;
  }
  .stage-area {
    grid-template-columns: 1fr;
  }
  .stage-toolbar,
  .game-stage-frame,
  .room-layer-editor,
  .game-stage-layers {
    grid-column: 1;
  }
  .room-layer-editor {
    border-right: 0;
  }
  .adventure-workspace-panel[data-adventure-workspace-panel="map"] {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "tools"
      "outliner"
      "viewport"
      "inspector"
      "status";
  }
  .adventure-zone-outliner > div {
    display: flex;
    overflow-x: auto;
  }
  .adventure-zone-outliner > div button {
    flex: 0 0 auto;
  }
  .adventure-viewport-dock {
    min-height: 360px;
  }
  .adventure-editor-statusbar,
  .game-builder-statusbar {
    overflow-x: auto;
    justify-content: flex-start;
    white-space: nowrap;
  }
}
@keyframes qews-portal-pulse {
  to {
    box-shadow:
      0 0 0 5px rgba(10, 120, 236, 0.2),
      0 6px 14px rgba(7, 20, 38, 0.3);
  }
}
@media (prefers-reduced-motion: reduce) {
  .adventure-portal {
    animation: none;
  }
}

/* Visuelle Welt- und Level-Editoren */
.campaign-zone-bar {
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid #cbd8e5;
  border-radius: 12px;
  background: #edf5fb;
}
.campaign-zone-bar > div {
  display: flex;
  min-width: 0;
  flex: 1;
  gap: 5px;
  overflow: auto;
}
.campaign-zone-bar button {
  min-height: 38px;
  border: 1px solid #bad0e3;
  border-radius: 9px;
  background: #fff;
  color: #173854;
  padding: 7px 11px;
  font-weight: 850;
  white-space: nowrap;
}
.campaign-zone-bar button.active {
  border-color: #0a78ec;
  background: #0a78ec;
  color: #fff;
}
.campaign-zone-bar > button:last-child {
  color: #a5362c;
}
.campaign-entity-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 9px;
  padding: 0 12px 12px;
}
.campaign-entity-list > article {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid #dfe5ec;
  border-radius: 11px;
  background: #fff;
}
.campaign-entity-list > article > button {
  min-height: 34px;
  border: 1px solid #c6d5e3;
  border-radius: 8px;
  background: #edf5fb;
  color: #173854;
  font-weight: 800;
}
.campaign-entity-list > article > button:last-child {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 30px;
  min-height: 30px;
  border: 0;
  background: #fff0ed;
  color: #a5362c;
}
.campaign-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding-right: 30px;
}
.campaign-card-grid label,
.platform-level-settings label {
  display: grid;
  gap: 4px;
  color: #445269;
  font-size: 11px;
  font-weight: 750;
}
.campaign-card-grid input,
.campaign-card-grid select,
.platform-level-settings input,
.platform-level-settings select {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  font: inherit;
}
.platform-campaign-editor {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 12px;
}
.platform-editor-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 7px;
  border: 1px solid #d9e1ea;
  border-radius: 11px;
  background: #f3f6f9;
}
.platform-editor-tools button {
  min-height: 36px;
  border: 1px solid #c8d2de;
  border-radius: 8px;
  background: #fff;
  padding: 6px 9px;
  font-weight: 850;
}
.platform-editor-tools button.active {
  border-color: #0a78ec;
  background: #e9f4ff;
  color: #075fac;
}
.platform-editor-tools span {
  margin-left: auto;
  color: #607087;
  font-size: 10px;
  font-weight: 700;
}
.platform-editor-canvas {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16/6;
  border: 4px solid #0d2945;
  border-radius: 15px;
  background: #dff3ff;
  touch-action: none;
}
.platform-editor-canvas > [data-platform-world] {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #bfe8ff;
}
.platform-editor-canvas [data-world-type] {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  min-width: 30px;
  min-height: 30px;
  border: 2px solid #fff;
  border-radius: 10px;
  background: #ffc900;
  color: #173854;
  box-shadow: 0 4px 10px rgba(7, 20, 38, 0.22);
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.platform-editor-canvas [data-world-type]:hover {
  outline: 3px solid rgba(10, 120, 236, 0.45);
  outline-offset: 2px;
}
.platform-editor-canvas [data-world-type].is-dragging {
  z-index: 20;
  cursor: grabbing;
  outline: 3px solid #0a78ec;
  box-shadow: 0 10px 22px rgba(7, 20, 38, 0.34);
}
.platform-editor-canvas [data-world-type="platform"] {
  transform: none;
  min-width: 12px;
  min-height: 7px;
  border-color: #173854;
  border-radius: 5px;
  background: linear-gradient(#36b675 0 28%, #185947 29%);
}
.platform-editor-canvas [data-world-type="spawn"] {
  background: #0a78ec;
  color: #fff;
}
.platform-editor-canvas [data-world-type="goal"] {
  background: #ff6653;
  color: #fff;
}
.platform-editor-canvas [data-world-type="checkpoint"] {
  background: #c8f000;
}
.platform-editor-canvas [data-world-type] small {
  position: absolute;
  top: 100%;
  min-width: 80px;
  font-size: 8px;
  font-weight: 850;
}
.platform-level-settings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 11px;
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  background: #f8fafc;
}
.platform-campaign-editor details {
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  background: #fbfcfd;
}
.platform-campaign-editor summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #173854;
  font-weight: 850;
}
.platform-campaign-editor details > .visual-add {
  margin: 0 12px 12px;
}
.platform-player-settings {
  padding: 0 12px 12px;
}
@media (max-width: 800px) {
  .campaign-card-grid,
  .platform-level-settings {
    grid-template-columns: 1fr 1fr;
  }
  .platform-editor-canvas {
    aspect-ratio: 4/3;
  }
  .platform-editor-tools span {
    width: 100%;
    margin: 0;
  }
  .campaign-entity-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .campaign-card-grid,
  .platform-level-settings {
    grid-template-columns: 1fr;
  }
  .campaign-zone-bar {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .campaign-zone-bar > div {
    width: 100%;
    flex-basis: 100%;
  }
}

/* Dock precedence: these rules intentionally follow the legacy campaign editor. */
.content-form:has(.adventure-editor) .adventure-zone-outliner {
  display: flex;
  width: auto;
  max-width: none;
  align-items: stretch;
  flex-direction: column;
  gap: 3px;
  padding: 8px;
  border: 0;
  border-radius: 0;
  background: var(--studio-panel);
}
.content-form:has(.adventure-editor) .adventure-zone-outliner > div {
  display: grid;
  width: auto;
  flex: 0 0 auto;
  gap: 3px;
  overflow: visible;
}
@media (max-width: 800px) {
  .content-form:has(.adventure-editor) .adventure-zone-outliner > div {
    display: flex;
    overflow-x: auto;
  }
}
