@media (min-width: 821px) {
  .filter-bar select {
    width: auto;
    min-width: 160px;
  }
}

.brand .brand-logo {
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 0;
}

.hero-title-art {
  width: min(100%, 390px);
  height: auto;
  margin: 0 0 1rem;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 620px) {
  .hero-title-art {
    width: min(88%, 330px);
  }
}

.library-view-tabs {
  display: flex;
  gap: .45rem;
  margin: -1rem 0 1.1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}

.library-view-tabs a {
  padding: .6rem 1rem;
  border-radius: 999px;
  color: var(--navy);
  font-size: .82rem;
  font-weight: 900;
}

.library-view-tabs a[aria-current="page"] { background: var(--navy); color: #fff; }
.resource-card { position: relative; }
.resource-card.has-category { background: color-mix(in srgb, var(--resource-category) 6%, #fff); }
.resource-category-band { position: absolute; z-index: 2; inset: 0 auto 0 0; width: 6px; background: var(--resource-category); }
.resource-category-tag { border-color: color-mix(in srgb, var(--resource-category) 70%, #fff); background: color-mix(in srgb, var(--resource-category) 14%, #fff); color: var(--navy); }
.resource-video-label { position: absolute; right: .65rem; bottom: .65rem; background: var(--lime); color: var(--navy); }
.created-game-banner.has-category {
  border-color: color-mix(in srgb, var(--resource-category) 45%, #9fd9cc);
  background: linear-gradient(135deg, color-mix(in srgb, var(--resource-category) 13%, #fff), #eaf8f4);
  box-shadow: 0 18px 45px color-mix(in srgb, var(--resource-category) 14%, transparent);
}
.game-category-swatch { width: 1.35rem; height: 1.35rem; flex: 0 0 1.35rem; border: 3px solid #fff; border-radius: 50%; background: #d7e0e2; box-shadow: 0 0 0 1px #b7c6ca, 0 3px 8px rgba(7,26,43,.12); transition: background-color .18s ease, transform .18s ease; }
.game-category-swatch.is-set { transform: scale(1.08); }
.game-category-swatch.resource-category-uncategorized { background: #d7e0e2; }
.game-category-swatch[class*="resource-category-"] { background: var(--resource-category, #d7e0e2); }

.education-video-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.education-video-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 15px 38px rgba(7,26,43,.08); }
.education-video-card>div { padding: 1.1rem; }
.education-video-card h2 { margin: .35rem 0; font-size: 1.35rem; }
.education-video-card p { color: var(--muted); }
.education-video-image { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 0; background: var(--navy); }
.education-video-image img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; opacity: .9; transition: transform .25s ease; }
.education-video-image:hover img { transform: scale(1.025); }
.education-video-image span { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); padding: .65rem 1rem; border-radius: 999px; background: var(--lime); color: var(--navy); font-weight: 900; }
.video-dialog { width: min(980px,calc(100vw - 2rem)); padding: 1rem; border: 0; border-radius: 22px; background: var(--navy); color: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.45); }
.video-dialog::backdrop { background: rgba(4,18,29,.82); }
.video-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .25rem .3rem 1rem; }
.video-dialog-head h2 { margin: .2rem 0 0; color: #fff; }
.video-dialog-head button { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: transparent; color: #fff; font-size: 1.7rem; }
.video-frame { aspect-ratio: 16/9; overflow: hidden; border-radius: 14px; background: #000; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }

@media (max-width: 900px) { .education-video-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 620px) { .education-video-grid { grid-template-columns: 1fr; } }
.resource-category-setting { display: grid; grid-template-columns: minmax(220px,2fr) minmax(110px,.6fr) minmax(120px,.6fr) auto; gap: .8rem; align-items: end; padding: .9rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.resource-category-setting input[type="color"] { min-height: 48px; padding: .25rem; }
@media (max-width: 760px) { .resource-category-setting { grid-template-columns: 1fr 1fr; } }

/* Admin workspace: a smaller decision surface, using the same quiet cards as the coach-facing app. */
.admin-tabs { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 0 1.65rem; padding: .5rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.8); box-shadow: 0 5px 18px rgba(7,26,43,.04); }
.admin-tabs-primary { display: flex; flex-wrap: wrap; gap: .25rem; }
.admin-tabs a, .admin-tabs-more summary { display: inline-flex; align-items: center; min-height: 36px; padding: .5rem .75rem; border: 0; border-radius: 10px; background: transparent; color: #40545e; font-size: .79rem; font-weight: 800; cursor: pointer; list-style: none; }
.admin-tabs a:hover, .admin-tabs-more summary:hover { color: var(--navy); background: #eef5f2; }
.admin-tabs-more { position: relative; flex: 0 0 auto; }
.admin-tabs-more summary::-webkit-details-marker { display: none; }
.admin-tabs-more summary span { margin-left: .45rem; font-size: 1rem; transition: transform .16s ease; }
.admin-tabs-more[open] summary { background: var(--navy); color: #fff; }
.admin-tabs-more[open] summary span { transform: rotate(180deg); }
.admin-tabs-menu { position: absolute; z-index: 12; right: 0; top: calc(100% + .45rem); display: grid; min-width: 190px; padding: .45rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 18px 40px rgba(7,26,43,.16); }
.admin-tabs-menu a { border-radius: 9px; white-space: nowrap; }

.admin-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin: 0 0 2rem; }
.admin-metrics > * { display: grid; gap: .35rem; min-height: 126px; padding: 1.25rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 5px 18px rgba(7,26,43,.035); }
.admin-metrics > a { transition: transform .16s ease, box-shadow .16s ease; }
.admin-metrics > a:hover { transform: translateY(-2px); box-shadow: 0 13px 28px rgba(7,26,43,.1); }
.admin-metrics strong { align-self: end; color: var(--navy); font-size: 2.4rem; line-height: 1; letter-spacing: -.06em; }
.admin-metrics span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.admin-dashboard-head { position: relative; align-items: center; min-height: 168px; padding: 1.6rem 1.75rem; border: 1px solid #d9e6e2; border-radius: 22px; background: radial-gradient(circle at 100% 0, rgba(200,241,53,.34), transparent 40%), linear-gradient(135deg, #fff, #f1f7f4); overflow: hidden; }
.admin-dashboard-head::after { content: ''; position: absolute; width: 180px; height: 180px; right: -64px; bottom: -108px; border: 20px solid rgba(24,183,160,.12); border-radius: 50%; pointer-events: none; }
.admin-dashboard-head > * { position: relative; z-index: 1; }
.admin-dashboard-head h1 { margin-bottom: .45rem; }
.admin-dashboard-head p { margin-bottom: 0; }
.admin-card-section { margin-bottom: 1.5rem; }
.admin-section-heading { margin: 0 0 1rem; }
.admin-section-heading h2 { margin: .2rem 0; font-size: 1.45rem; }
.admin-section-heading p { max-width: 620px; margin: 0; color: var(--muted); font-size: .9rem; }
.manager-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.manager-links > a { display: grid; grid-template-columns: auto 1fr; gap: .8rem; min-height: 150px; padding: 1.15rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 5px 18px rgba(7,26,43,.035); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.manager-links > a:hover { transform: translateY(-3px); border-color: #bbd8d3; box-shadow: 0 16px 32px rgba(7,26,43,.11); }
.manager-links > a > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--lime); color: var(--navy); font-size: .72rem; font-weight: 900; }
.manager-links strong { display: block; color: var(--navy); font-size: 1rem; }
.manager-links small { display: block; margin-top: .35rem; color: var(--muted); font-size: .79rem; line-height: 1.5; }
.manager-links b { grid-column: 2; align-self: end; color: var(--teal); font-size: .76rem; }
.admin-backup-card { margin-top: 1.5rem; }
.admin-backup-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }
.admin-backup-grid article { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1rem; border: 1px solid #e1e8e7; border-radius: 12px; background: #fbfcfb; }
.admin-backup-grid strong, .admin-backup-grid span { display: block; }
.admin-backup-grid strong { color: var(--navy); font-size: .9rem; }
.admin-backup-grid span { margin-top: .15rem; color: var(--muted); font-size: .75rem; }
.admin-backup-grid .text-button { color: var(--teal); font-size: .75rem; white-space: nowrap; }
.admin-ai-card { display: block; position: relative; overflow: hidden; margin-top: 1.5rem; padding: 1.5rem 4.5rem 1.5rem 1.5rem; border-color: #c9ddd6; background: linear-gradient(135deg, #fff, #edf7f3); transition: transform .16s ease, box-shadow .16s ease; }
.admin-ai-card::after { content: '→'; position: absolute; right: 1.5rem; top: 50%; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--lime); font-size: 1.3rem; font-weight: 800; transform: translateY(-50%); }
.admin-ai-card:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(7,26,43,.11); }
.admin-ai-card h2 { margin: .2rem 0 .4rem; font-size: 1.35rem; }
.admin-ai-card p { max-width: 620px; margin: 0; color: var(--muted); }

.admin-settings-grid { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 1.2rem; align-items: start; }
.admin-settings-grid .admin-setting-card { height: 100%; margin-bottom: 0; }
.admin-setting-card .panel-head p { max-width: 470px; margin: .4rem 0 0; color: var(--muted); font-size: .86rem; }
.admin-setting-card .resource-category-setting { background: #f9fbfa; border-color: #e0e8e5; }

@media (max-width: 1100px) { .manager-links { grid-template-columns: repeat(2,minmax(0,1fr)); } .admin-settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .admin-tabs { align-items: flex-start; flex-direction: column; } .admin-tabs-primary { width: 100%; flex-wrap: nowrap; overflow-x: auto; } .admin-tabs-primary a { flex: 0 0 auto; } .admin-tabs-more { align-self: flex-end; } .admin-dashboard-head { align-items: flex-start; min-height: 0; padding: 1.35rem; } .admin-dashboard-head .button { width: 100%; } .admin-metrics, .manager-links, .admin-backup-grid { grid-template-columns: 1fr; } .admin-metrics > * { min-height: 100px; } .admin-backup-grid article { align-items: flex-start; flex-direction: column; } }
.footer-el-cambio { margin-left: .65rem; opacity: .72; }

.cms-preview-banner {
  position: relative;
  z-index: 100;
  padding: .65rem 1rem;
  text-align: center;
  background: #c8f135;
  color: #071a2b;
}

.cms-preview-banner span { margin-left: .7rem; }

.cms-image-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.cms-image-text.image-right .cms-content-image { order: 2; }

.cms-content-image img,
.cms-hero-image img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 24px;
}

.cms-hero-image { align-self: stretch; }
.hero-simple { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }

@media (max-width: 800px) {
  .cms-image-text,
  .hero-simple { grid-template-columns: 1fr; }
  .cms-image-text.image-right .cms-content-image { order: 0; }
}

.coming-soon-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #cbd8d9;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(200, 241, 53, 0.32), transparent 42%),
    linear-gradient(145deg, #f8faf7, #edf4f2);
}

.coming-soon-card h3 {
  max-width: 520px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.coming-soon-card p {
  color: #53666e;
}

.coming-soon-card .button[disabled] {
  cursor: not-allowed;
  opacity: 0.62;
}

.registration-closed-card {
  width: min(100%, 680px);
  background:
    radial-gradient(circle at 100% 0, rgba(200, 241, 53, 0.3), transparent 38%),
    #fff;
}

.registration-closed-card h1 {
  max-width: 580px;
  font-size: clamp(2.5rem, 7vw, 4.6rem);
}

.registration-closed-card > p {
  max-width: 590px;
  font-size: 1.05rem;
}

.registration-closed-card .coming-soon-card {
  margin-top: 1.4rem;
  padding: 1.2rem;
}

.registration-closed-card .coming-soon-card p {
  margin: .25rem 0 0;
}

.simulation-notice {
  display: flex;
  align-items: center;
  gap: .8rem;
  max-width: 900px;
  padding: .9rem 1rem;
  margin: -1rem auto 1.3rem;
  border: 1px solid #9fd9cc;
  border-radius: 14px;
  background: #eaf8f4;
}

.simulation-notice p {
  margin: 0;
  color: #50646d;
}

/* CSP-safe replacements for formerly inline presentation attributes. */
.player-dot-one { left: 18%; top: 73%; }
.player-dot-two { left: 44%; top: 48%; }
.player-dot-three { left: 68%; top: 22%; }
.player-dot-four { right: 16%; top: 64%; }
.player-dot-five { right: 32%; top: 38%; }
.play-card-one { left: 7%; top: 9%; }
.play-card-two { right: 5%; top: 43%; }
.play-card-three { left: 10%; bottom: 7%; }
.resource-card-pitch { height: calc(100% - 2rem); margin: 1rem; }
.form-honeypot { position: absolute; left: -10000px; }
.hero-actions-centered { justify-content: center; }

.page-back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--navy);
  font-size: .86rem;
  font-weight: 800;
}

.page-back-link:hover { color: var(--teal); }

.session-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: 1.25rem;
}

.activity-picker-dialog {
  width: min(1040px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 1.4rem;
  border: 0;
  border-radius: 24px;
  background: var(--cream);
  box-shadow: 0 30px 90px rgba(7, 26, 43, .32);
}

.activity-picker-dialog::backdrop { background: rgba(4, 18, 29, .72); }
.activity-picker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.activity-picker-head h2 { margin-bottom: .5rem; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.activity-picker-close { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--navy); font-size: 1.65rem; line-height: 1; }
.activity-picker-search { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .75rem; margin: 1rem 0 .5rem; }
.activity-picker-scopes { display: flex; flex-wrap: wrap; gap: .45rem; margin: .85rem 0 0; }
.activity-picker-scope { min-height: 36px; padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-weight: 800; font-size: .78rem; }
.activity-picker-scope.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.activity-picker-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .35rem 0 .75rem; }
.activity-picker-publish { margin-top: .65rem; }
.tag-draft { background: #fff4d6; color: #7a5b00; }
.activity-picker-status { min-height: 1.5rem; margin: .6rem 0; color: var(--muted); font-size: .85rem; }
.activity-picker-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.activity-picker-option { min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--ink); text-align: left; }
.activity-picker-option:hover { border-color: var(--teal); box-shadow: 0 10px 28px rgba(7, 26, 43, .12); }
.activity-picker-option > img, .activity-picker-fallback { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; background: #e7ecec; }
.activity-picker-fallback { display: grid; place-items: center; color: var(--muted); font-weight: 800; }
.activity-picker-option-copy { padding: .85rem; }
.activity-picker-option-copy h3 { margin: 0 0 .35rem; font-size: 1rem; }
.activity-picker-option-copy p { margin: 0 0 .65rem; color: var(--muted); font-size: .78rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.activity-picker-pages { display: flex; justify-content: center; align-items: center; gap: .75rem; margin-top: 1rem; }
.activity-picker-pages span { min-width: 65px; text-align: center; color: var(--muted); font-size: .8rem; font-weight: 800; }
.activity-editor-empty { border-style: dashed; }

@media (max-width: 820px) {
  .activity-picker-results { grid-template-columns: 1fr; }
  .activity-picker-search { grid-template-columns: 1fr; }
  .activity-picker-dialog { padding: 1rem; }
}
.u-mt-065 { margin-top: .65rem; }
.u-mt-1 { margin-top: 1rem; }
.u-mt-12 { margin-top: 1.2rem; }

.wizard-progress {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: #dbe3e5;
}

.wizard-progress::-webkit-progress-bar { background: #dbe3e5; }
.wizard-progress::-webkit-progress-value { background: var(--lime); }
.wizard-progress::-moz-progress-bar { background: var(--lime); }

@media (max-width: 620px) {
  .simulation-notice {
    align-items: flex-start;
    flex-direction: column;
  }
}

.creation-paths > .creation-path-button {
  display: flex;
  min-height: 148px;
  flex-direction: column;
  justify-content: center;
  padding: 1.35rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 17px;
  color: #fff;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.creation-paths > .creation-path-button:hover {
  border-color: rgba(200, 241, 53, .4);
  background: rgba(255, 255, 255, .08);
  transform: translateY(-2px);
}
.creation-paths > .creation-path-button.is-active {
  border-color: #a8d31d;
  background: linear-gradient(145deg, #d8fa58, #bce52d);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42), 0 10px 25px rgba(0, 0, 0, .14);
}
.creation-paths > .creation-path-button span {
  color: var(--lime);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.creation-paths > .creation-path-button strong {
  margin-top: .35rem;
  color: #fff;
  font-size: 1.2rem;
}
.creation-paths > .creation-path-button small {
  margin-top: .35rem;
  color: #b8c9d0;
  line-height: 1.45;
}
.creation-paths > .creation-path-button.is-active span {
  color: #183126;
}
.creation-paths > .creation-path-button.is-active strong {
  color: var(--navy);
}
.creation-paths > .creation-path-button.is-active small {
  color: #34503d;
}
.creation-paths-guided {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
}
.creation-paths-guided > .creation-path-featured {
  position: relative;
  z-index: 1;
  min-height: 204px;
  margin-block: -28px;
  padding: 2.25rem 1.7rem 1.75rem;
}
.creation-paths-guided > .creation-path-featured.is-active {
  border-color: #a8d31d;
  background: linear-gradient(145deg, #d8fa58, #bce52d);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42), 0 24px 54px rgba(3, 17, 28, .4);
}
.creation-paths-guided > .creation-path-featured::before {
  content: "Recommended";
  position: absolute;
  top: 15px;
  right: 16px;
  padding: .3rem .6rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.creation-paths-guided > .creation-path-featured.is-active span {
  color: #183126;
}
.creation-paths-guided > .creation-path-featured.is-active strong {
  color: var(--navy);
  font-size: 1.32rem;
}
.creation-paths-guided > .creation-path-featured.is-active small {
  color: #34503d;
}
.creation-paths-guided > .creation-path-featured.is-active:hover {
  border-color: #8fb817;
  background: linear-gradient(145deg, #e2ff70, #c8ed3f);
  transform: translateY(-2px);
}
.single-game-creator {
  scroll-margin-top: 1.25rem;
  margin-bottom: 2rem;
}
.page-head-compact {
  margin-bottom: 1rem;
}
.page-head-compact h2 {
  margin: .2rem 0;
}
/* Script-controlled panels must stay hidden even when their layout uses grid/flex. */
[hidden] { display: none !important; }
