:root {
  --primary-color: #802433;
  --primary-dark: #5c1a26;
  --primary-light: #a8324a;
  --route-bg: #f5f1f2;
  --route-surface: rgba(255, 255, 255, 0.9);
  --route-surface-strong: #ffffff;
  --route-text: #251d20;
  --route-muted: #6f6267;
  --route-border: rgba(128, 36, 51, 0.15);
  --route-shadow: 0 22px 60px rgba(69, 31, 42, 0.12);
  --route-radius: 28px;
  font-family: "Poppins", system-ui, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body.route-page {
  color: var(--route-text);
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--route-bg);
  background-image:
    radial-gradient(circle at 6% 4%, rgba(168, 50, 74, 0.13), transparent 26rem),
    radial-gradient(circle at 92% 8%, rgba(128, 36, 51, 0.1), transparent 24rem),
    linear-gradient(rgba(245, 241, 242, 0.78), rgba(245, 241, 242, 0.78)),
    url("../immagini-logo/sfondo.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto, auto, cover, cover;
  background-attachment: fixed;
}

body.route-page::before {
  display: none;
}

button,
a,
input {
  font: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.route-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.route-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid var(--route-border);
  border-radius: 24px;
  background: var(--route-surface);
  box-shadow: var(--route-shadow);
  backdrop-filter: blur(20px);
}

.route-header__brand,
.route-header__actions,
.route-header__brand > div {
  display: flex;
  align-items: center;
}

.route-header__brand {
  min-width: 0;
  gap: 14px;
}

.route-header__brand > div {
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
}

.route-header__brand img {
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 14px rgba(128, 36, 51, 0.18));
}

.route-header p,
.route-header h1 {
  margin: 0;
}

.route-header p {
  color: var(--primary-color);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.route-header h1 {
  overflow: hidden;
  font-size: clamp(1.15rem, 2.3vw, 1.75rem);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-header__actions {
  justify-content: flex-end;
  gap: 9px;
}

.route-icon-btn {
  min-width: 46px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--route-border);
  border-radius: 14px;
  color: var(--primary-color);
  background: var(--route-surface-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(69, 31, 42, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.route-icon-btn:hover,
.route-icon-btn:focus-visible {
  border-color: rgba(128, 36, 51, 0.5);
  box-shadow: 0 12px 26px rgba(69, 31, 42, 0.14);
  transform: translateY(-2px);
}

.route-icon-btn span {
  font-size: 0.78rem;
  font-weight: 700;
}

.route-user {
  max-width: 190px;
  overflow: hidden;
  padding: 9px 13px;
  color: var(--route-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-user i {
  margin-right: 7px;
  color: var(--primary-color);
}

.route-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 22px;
  margin-top: 24px;
}

.route-hero__main,
.route-study-card,
.route-section {
  border: 1px solid var(--route-border);
  border-radius: var(--route-radius);
  background: var(--route-surface);
  box-shadow: var(--route-shadow);
  backdrop-filter: blur(20px);
}

.route-hero__main {
  min-height: 260px;
  padding: clamp(28px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.route-eyebrow {
  margin: 0 0 8px;
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.route-hero h2,
.route-section h2 {
  margin: 0;
}

.route-hero h2 {
  max-width: 760px;
  font-size: clamp(2rem, 5.4vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.route-hero__main > p:last-of-type {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--route-muted);
  line-height: 1.7;
}

.route-study-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  background:
    linear-gradient(150deg, rgba(128, 36, 51, 0.96), rgba(70, 20, 31, 0.96)),
    var(--route-surface);
  text-decoration: none;
}

.route-study-card__icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.45rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.route-study-card strong {
  display: block;
  font-size: 1.35rem;
}

.route-study-card small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.route-section {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 38px);
}

.route-section__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.route-section__heading p {
  margin: 7px 0 0;
  color: var(--route-muted);
}

.route-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.route-channel-card {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--route-border);
  border-radius: 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  color: var(--route-text);
  background: var(--route-surface-strong);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.route-channel-card:hover,
.route-subject-card:hover {
  border-color: rgba(128, 36, 51, 0.45);
  box-shadow: 0 16px 34px rgba(69, 31, 42, 0.12);
  transform: translateY(-3px);
}

.route-channel-card__code {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--primary-light), var(--primary-dark));
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(128, 36, 51, 0.22);
}

.route-channel-card strong,
.route-channel-card small {
  display: block;
}

.route-channel-card small {
  margin-top: 5px;
  color: var(--route-muted);
  font-size: 0.76rem;
}

.route-channel-card > i {
  color: var(--primary-color);
}

.route-channel-intro {
  margin-top: 24px;
  padding: clamp(26px, 5vw, 52px);
  border-radius: var(--route-radius);
  color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.18), transparent 18rem),
    linear-gradient(145deg, var(--primary-light), var(--primary-dark));
  box-shadow: 0 24px 55px rgba(92, 26, 38, 0.25);
}

.route-channel-intro h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
}

.route-channel-intro p {
  max-width: 680px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.route-subject-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.route-subject-card {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--route-border);
  border-radius: 20px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  color: var(--route-text);
  background: var(--route-surface-strong);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.route-subject-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--primary-light), var(--primary-dark));
  box-shadow: 0 10px 20px rgba(128, 36, 51, 0.18);
}

.route-subject-card__copy {
  min-width: 0;
}

.route-subject-card__copy strong,
.route-subject-card__copy small {
  display: block;
}

.route-subject-card__copy strong {
  line-height: 1.3;
}

.route-subject-card__copy small {
  margin-top: 5px;
  overflow: hidden;
  color: var(--route-muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-subject-card__meta {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--primary-color);
  background: rgba(128, 36, 51, 0.08);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.route-subject-card__arrow {
  color: var(--primary-color);
}

.route-loading {
  min-height: 100dvh;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: var(--route-muted);
  text-align: center;
}

.route-loading.route-entry-shell {
  min-height: 100dvh;
  padding: 0;
  display: block;
  text-align: left;
}

.route-entry-shell__inner {
  animation: routeShellEnter 180ms ease-out both;
}

.route-entry-shell__header {
  min-height: 92px;
}

.route-entry-shell__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--route-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.route-entry-shell__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(128, 36, 51, 0.18);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: routeShellSpin 0.8s linear infinite;
}

.route-entry-shell__grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.route-entry-shell__panel {
  min-height: 180px;
  border: 1px solid var(--route-border);
  border-radius: var(--route-radius);
  background:
    linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.62) 50%, transparent 62%) -120% 0 / 220% 100%,
    var(--route-surface);
  box-shadow: var(--route-shadow);
  animation: routeShellShimmer 1.25s ease-in-out infinite;
}

.route-entry-shell__panel--wide {
  min-height: 118px;
  grid-column: 1 / -1;
}

@keyframes routeShellEnter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes routeShellSpin {
  to { transform: rotate(360deg); }
}

@keyframes routeShellShimmer {
  0%, 45% { background-position: -120% 0, 0 0; }
  100% { background-position: 180% 0, 0 0; }
}

.route-loading > i {
  color: var(--primary-color);
  font-size: 2rem;
  animation: routePulse 1.1s ease-in-out infinite;
}

@media (max-width: 720px) {
  .route-entry-shell__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .route-entry-shell__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .route-entry-shell__panel,
  .route-entry-shell__panel--wide {
    min-height: 126px;
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .route-entry-shell__inner,
  .route-entry-shell__spinner,
  .route-entry-shell__panel {
    animation: none;
  }
}

.route-loading--error > i {
  animation: none;
}

.route-loading a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
  background: var(--primary-color);
  text-decoration: none;
}

.guest-lock-dialog {
  position: fixed;
  z-index: 50000;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
  width: min(94vw, 560px);
  max-width: 560px;
  padding: 20px;
  border: 1px solid #d8d8d8;
  border-radius: 18px;
  color: #232529;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
}

.guest-lock-dialog__message {
  margin-bottom: 14px;
  color: #232529;
  font-size: 17px;
  line-height: 1.45;
}

.guest-lock-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guest-lock-dialog__unlock,
.guest-lock-dialog__close {
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.guest-lock-dialog__unlock {
  border: 0;
  color: #fff;
  background: #0f4c81;
}

.guest-lock-dialog__close {
  border: 1px solid #d0d0d0;
  color: #232529;
  background: #fff;
}

.guest-lock-dialog__unlock:hover,
.guest-lock-dialog__unlock:focus-visible,
.guest-lock-dialog__close:hover,
.guest-lock-dialog__close:focus-visible {
  box-shadow: 0 7px 16px rgba(15, 76, 129, 0.18);
  transform: translateY(-1px);
  outline: none;
}

.guest-lock-dialog__unlock:focus-visible,
.guest-lock-dialog__close:focus-visible {
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.2);
}

.route-dashboard-page .menu-item.is-guest-locked {
  cursor: not-allowed;
  opacity: 0.55;
}

body.dark-mode .guest-lock-dialog {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--route-text);
  background: var(--route-surface-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
}

body.dark-mode .guest-lock-dialog__message {
  color: var(--route-text);
}

body.dark-mode .guest-lock-dialog__close {
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--route-text);
  background: rgba(255, 255, 255, 0.06);
}

@keyframes routePulse {
  50% { transform: scale(1.12); opacity: 0.55; }
}

body.dark-mode {
  --route-bg: #171316;
  --route-surface: rgba(35, 29, 32, 0.92);
  --route-surface-strong: #2b2427;
  --route-text: #f5edf0;
  --route-muted: #b9a9af;
  --route-border: rgba(255, 255, 255, 0.1);
  --route-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

body.dark-mode.route-page {
  background-color: var(--route-bg);
  background-image:
    radial-gradient(circle at 6% 4%, rgba(168, 50, 74, 0.16), transparent 26rem),
    radial-gradient(circle at 92% 8%, rgba(128, 36, 51, 0.13), transparent 24rem),
    linear-gradient(rgba(23, 19, 22, 0.72), rgba(23, 19, 22, 0.72)),
    url("../immagini-logo/sfondo-dark.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto, auto, cover, cover;
  background-attachment: fixed;
}

body.dark-mode.route-page::before {
  display: none;
}

/* Le feature a schermo intero mantengono lo stesso fondale della route. */
body.route-page:not(.dark-mode) .flashcards-screen,
body.route-page:not(.dark-mode) .study-mode-backdrop {
  background-color: var(--route-bg);
  background-image:
    radial-gradient(circle at 6% 4%, rgba(168, 50, 74, 0.13), transparent 26rem),
    radial-gradient(circle at 92% 8%, rgba(128, 36, 51, 0.1), transparent 24rem),
    linear-gradient(rgba(245, 241, 242, 0.78), rgba(245, 241, 242, 0.78)),
    url("../immagini-logo/sfondo.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto, auto, cover, cover;
  background-attachment: fixed;
}

body.route-page.dark-mode .flashcards-screen,
body.route-page.dark-mode .study-mode-backdrop {
  background-color: var(--route-bg);
  background-image:
    radial-gradient(circle at 6% 4%, rgba(168, 50, 74, 0.16), transparent 26rem),
    radial-gradient(circle at 92% 8%, rgba(128, 36, 51, 0.13), transparent 24rem),
    linear-gradient(rgba(23, 19, 22, 0.72), rgba(23, 19, 22, 0.72)),
    url("../immagini-logo/sfondo-dark.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto, auto, cover, cover;
  background-attachment: fixed;
}

body.route-page:not(.dark-mode) .flashcards-screen .flashcards-container {
  background-color: rgba(255, 255, 255, 0.91);
  background-image: linear-gradient(rgba(255, 255, 255, 0.91), rgba(255, 255, 255, 0.91));
}

body.route-page.dark-mode .flashcards-screen .flashcards-container {
  background-color: rgba(20, 18, 21, 0.92);
  background-image: linear-gradient(rgba(20, 18, 21, 0.92), rgba(20, 18, 21, 0.92));
}

body.dark-mode .route-icon-btn {
  color: #e4a6b3;
}

body.dark-mode .route-subject-card__meta {
  color: #e4a6b3;
  background: rgba(228, 166, 179, 0.1);
}

@media (max-width: 980px) {
  .route-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-header__actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .route-hero {
    grid-template-columns: 1fr;
  }

  .route-channel-grid,
  .route-subject-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .route-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 10px;
  }

  .route-header {
    padding: 14px;
    border-radius: 19px;
  }

  .route-header__brand img {
    display: none;
  }

  .route-user,
  .route-icon-btn--wide span {
    display: none;
  }

  .route-icon-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
  }

  .route-hero__main,
  .route-study-card,
  .route-section,
  .route-channel-intro {
    border-radius: 22px;
  }

  .route-hero h2 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .route-channel-card {
    min-height: 106px;
  }

  .route-subject-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .route-subject-card__meta {
    display: none;
  }
}

/* Dashboard /app: shell leggero con la struttura della dashboard originale. */
.route-dashboard-page #user-dashboard {
  display: flex;
  flex-direction: column;
}

.route-dashboard-shell {
  min-height: 100dvh;
  padding: 0;
}

.route-dashboard-page .dashboard-header {
  margin: 0;
  border-top: 0;
  border-radius: 0 0 24px 24px;
}

.route-dashboard-page .user-greeting {
  position: relative;
}

.route-dashboard-page .user-greeting h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  margin-bottom: 0;
}

.route-dashboard-page .user-greeting .stat-image {
  flex: 0 0 auto;
}

.route-dashboard-page .channel-card {
  color: inherit;
  text-decoration: none;
}

.route-dashboard-page .channel-icon {
  box-shadow: 0 12px 22px rgba(128, 36, 51, 0.22);
}

.route-dashboard-page .channel-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--route-border);
  border-radius: 24px;
  color: var(--route-text);
  background: var(--route-surface);
  box-shadow: var(--route-shadow);
  backdrop-filter: blur(18px);
}

.route-dashboard-page .channel-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -80px;
  right: -70px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 50, 74, 0.11), transparent 68%);
  pointer-events: none;
}

.route-dashboard-page .channel-section__heading {
  display: block;
  margin-bottom: 20px;
}

.route-dashboard-page .channel-section__heading > div {
  min-width: 0;
}

.route-dashboard-page .channel-section__eyebrow,
.route-dashboard-page .channel-section__description,
.route-dashboard-page .channel-section h3 {
  margin: 0;
}

.route-dashboard-page .channel-section__eyebrow {
  margin-bottom: 3px;
  color: var(--primary-color);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.route-dashboard-page .channel-section h3 {
  color: var(--route-text);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.25;
}

.route-dashboard-page .channel-section__description {
  margin-top: 5px;
  color: var(--route-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.route-dashboard-page .channel-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.route-dashboard-page .channel-section--subjects .channel-card[aria-disabled="true"] {
  border-color: rgba(116, 116, 121, 0.2);
  color: #8b888a;
  background: rgba(128, 126, 127, 0.07);
  box-shadow: none;
  filter: grayscale(1);
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.route-dashboard-page .channel-section--subjects .channel-card[aria-disabled="true"] .channel-icon {
  color: #f4f4f4;
  background: linear-gradient(145deg, #aaa7a8, #817f80);
  box-shadow: none;
}

.route-dashboard-page .channel-section--subjects .channel-card[aria-disabled="true"] .channel-card__arrow {
  color: #858183;
  background: rgba(112, 109, 111, 0.08);
}

.route-dashboard-page .channel-card {
  min-width: 0;
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--route-border);
  border-radius: 19px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  overflow: visible;
  color: var(--route-text);
  background: var(--route-surface-strong);
  box-shadow: 0 8px 20px rgba(69, 31, 42, 0.06);
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.route-dashboard-page .channel-card::before {
  content: none;
}

.route-dashboard-page .channel-card:hover,
.route-dashboard-page .channel-card:focus-visible {
  border-color: rgba(128, 36, 51, 0.42);
  box-shadow: 0 15px 30px rgba(69, 31, 42, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.route-dashboard-page .channel-card:active {
  transform: translateY(0) scale(0.99);
}

.route-dashboard-page .channel-card.is-active {
  border-color: rgba(128, 36, 51, 0.5);
  background:
    linear-gradient(145deg, rgba(128, 36, 51, 0.1), transparent 54%),
    var(--route-surface-strong);
  box-shadow: 0 15px 30px rgba(69, 31, 42, 0.13);
}

.route-dashboard-page .channel-card.is-active .channel-card__arrow {
  color: #fff;
  background: var(--primary-color);
}

.route-dashboard-page .channel-icon {
  width: 52px;
  height: 52px;
  margin: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary-light), var(--primary-dark));
  font-size: 0.98rem;
  font-weight: 800;
}

.route-dashboard-page .channel-card__copy {
  min-width: 0;
}

.route-dashboard-page .channel-card__copy strong,
.route-dashboard-page .channel-card__copy small {
  display: block;
}

.route-dashboard-page .channel-card__copy strong {
  color: var(--route-text);
  font-size: 0.92rem;
  line-height: 1.3;
}

.route-dashboard-page .channel-card__copy small {
  margin-top: 4px;
  color: var(--route-muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.route-dashboard-page .channel-card__arrow {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  background: rgba(128, 36, 51, 0.08);
  font-size: 0.72rem;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.route-dashboard-page .channel-card:hover .channel-card__arrow,
.route-dashboard-page .channel-card:focus-visible .channel-card__arrow {
  color: #fff;
  background: var(--primary-color);
  transform: translateX(2px);
}

.route-dashboard-page .channel-card.is-active:hover .channel-card__arrow,
.route-dashboard-page .channel-card.is-active:focus-visible .channel-card__arrow {
  transform: translateY(2px);
}

.route-dashboard-page .channel-section__back {
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 11px;
  border: 1px solid var(--route-border);
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  background: var(--route-surface-strong);
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.route-dashboard-page .channel-section__back:hover,
.route-dashboard-page .channel-section__back:focus-visible {
  border-color: rgba(128, 36, 51, 0.42);
  box-shadow: 0 9px 20px rgba(69, 31, 42, 0.1);
  transform: translateX(-2px);
  outline: none;
}

.route-dashboard-page .dashboard-subject-groups {
  display: grid;
  gap: 20px;
}

.route-dashboard-page .channel-route-subjects {
  box-sizing: border-box;
  width: 100%;
  padding: clamp(18px, 2.4vw, 24px) clamp(20px, 3vw, 30px) clamp(24px, 3vw, 34px);
  scroll-margin-top: 12px;
}

.route-dashboard-page .dashboard-subject-group {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(128, 36, 51, 0.16);
  border-radius: 20px;
  background-color: var(--route-surface-strong);
  background-image: linear-gradient(145deg, rgba(128, 36, 51, 0.055), transparent 45%);
  box-shadow: 0 10px 24px rgba(69, 31, 42, 0.055);
}

.route-dashboard-page .dashboard-subject-group--oral {
  border-color: rgba(54, 100, 114, 0.2);
  background-image: linear-gradient(145deg, rgba(54, 100, 114, 0.07), transparent 45%);
}

.route-dashboard-page .dashboard-subject-group__heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(128, 36, 51, 0.12);
}

.route-dashboard-page .dashboard-subject-group--oral .dashboard-subject-group__heading {
  border-bottom-color: rgba(54, 100, 114, 0.15);
}

.route-dashboard-page .dashboard-subject-group__icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--primary-light), var(--primary-dark));
  box-shadow: 0 9px 18px rgba(128, 36, 51, 0.18);
}

.route-dashboard-page .dashboard-subject-group--oral .dashboard-subject-group__icon {
  background: linear-gradient(145deg, #527f8c, #315662);
  box-shadow: 0 9px 18px rgba(49, 86, 98, 0.2);
}

.route-dashboard-page .dashboard-subject-group__copy {
  min-width: 0;
}

.route-dashboard-page .dashboard-subject-group__copy h4,
.route-dashboard-page .dashboard-subject-group__copy p {
  margin: 0;
}

.route-dashboard-page .dashboard-subject-group__copy h4 {
  color: var(--route-text);
  font-size: 0.96rem;
  line-height: 1.25;
}

.route-dashboard-page .dashboard-subject-group__copy p {
  margin-top: 3px;
  color: var(--route-muted);
  font-size: 0.69rem;
  line-height: 1.4;
}

.route-dashboard-page .dashboard-subject-group__count {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--primary-color);
  background: rgba(128, 36, 51, 0.09);
  font-size: 0.65rem;
  font-weight: 800;
  white-space: nowrap;
}

.route-dashboard-page .dashboard-subject-group--oral .dashboard-subject-group__count {
  color: #315662;
  background: rgba(54, 100, 114, 0.11);
}

.route-dashboard-page .dashboard-subject-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.route-dashboard-page .dashboard-subject-card {
  min-width: 0;
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--route-border);
  border-radius: 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  color: var(--route-text);
  background: var(--route-surface-strong);
  box-shadow: 0 8px 20px rgba(69, 31, 42, 0.06);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.route-dashboard-page .dashboard-subject-card:hover,
.route-dashboard-page .dashboard-subject-card:focus-visible {
  border-color: rgba(128, 36, 51, 0.42);
  box-shadow: 0 15px 30px rgba(69, 31, 42, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.route-dashboard-page .dashboard-subject-card:active {
  transform: translateY(0) scale(0.995);
}

.route-dashboard-page .dashboard-subject-card__icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--primary-light), var(--primary-dark));
  box-shadow: 0 10px 20px rgba(128, 36, 51, 0.18);
}

.route-dashboard-page .dashboard-subject-card__copy {
  min-width: 0;
}

.route-dashboard-page .dashboard-subject-card__copy strong,
.route-dashboard-page .dashboard-subject-card__copy small {
  display: block;
}

.route-dashboard-page .dashboard-subject-card__copy strong {
  font-size: 0.88rem;
  line-height: 1.3;
}

.route-dashboard-page .dashboard-subject-card__copy small {
  margin-top: 5px;
  color: var(--route-muted);
  font-size: 0.68rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.route-dashboard-page .dashboard-subject-card__copy small b {
  color: var(--primary-color);
  font-weight: 800;
}

.route-dashboard-page .dashboard-subject-card__meta {
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--primary-color);
  background: rgba(128, 36, 51, 0.08);
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}

.route-dashboard-page .dashboard-subject-card__arrow {
  color: var(--primary-color);
  font-size: 0.72rem;
  transition: transform 180ms ease;
}

.route-dashboard-page .dashboard-subject-card:hover .dashboard-subject-card__arrow,
.route-dashboard-page .dashboard-subject-card:focus-visible .dashboard-subject-card__arrow {
  transform: translateX(2px);
}

.route-dashboard-page .dashboard-subject-card--oral:hover,
.route-dashboard-page .dashboard-subject-card--oral:focus-visible {
  border-color: rgba(54, 100, 114, 0.46);
  box-shadow: 0 15px 30px rgba(49, 86, 98, 0.13);
}

.route-dashboard-page .dashboard-subject-card--oral .dashboard-subject-card__icon {
  background: linear-gradient(145deg, #527f8c, #315662);
  box-shadow: 0 10px 20px rgba(49, 86, 98, 0.2);
}

.route-dashboard-page .dashboard-subject-card--oral .dashboard-subject-card__copy small b,
.route-dashboard-page .dashboard-subject-card--oral .dashboard-subject-card__arrow {
  color: #315662;
}

.route-dashboard-page .dashboard-subject-card--oral .dashboard-subject-card__meta {
  color: #315662;
  background: rgba(54, 100, 114, 0.11);
}

body.dark-mode.route-dashboard-page .dashboard-subject-group--oral {
  border-color: rgba(126, 180, 194, 0.24);
  background-color: var(--route-surface-strong);
  background-image: linear-gradient(145deg, rgba(73, 127, 141, 0.15), transparent 45%);
}

body.dark-mode.route-dashboard-page .dashboard-subject-group--oral .dashboard-subject-group__count,
body.dark-mode.route-dashboard-page .dashboard-subject-card--oral .dashboard-subject-card__copy small b,
body.dark-mode.route-dashboard-page .dashboard-subject-card--oral .dashboard-subject-card__arrow,
body.dark-mode.route-dashboard-page .dashboard-subject-card--oral .dashboard-subject-card__meta {
  color: #8fc3d0;
}

body.dark-mode.route-dashboard-page .dashboard-subject-group--oral .dashboard-subject-group__count,
body.dark-mode.route-dashboard-page .dashboard-subject-card--oral .dashboard-subject-card__meta {
  background: rgba(126, 180, 194, 0.13);
}

.route-dashboard-page .menu-theme-card {
  margin-top: 18px;
}

.route-dashboard-page .theme-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.route-dashboard-page .menu-footer .logout-btn {
  margin: 0 auto 13px;
}

.route-dashboard-page .global-search-results {
  max-height: min(60dvh, 480px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.route-dashboard-page .global-search-results__item {
  height: auto;
  min-height: 0;
  align-items: flex-start;
  white-space: normal;
  overflow: visible;
}

.route-dashboard-page .global-search-results__item > i {
  flex: 0 0 auto;
  margin-top: 0.25em;
}

.route-dashboard-page .global-search-results__item > span {
  display: flex;
  flex: 1 1 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  line-height: 1.4;
  text-overflow: clip;
  white-space: normal;
}

.route-dashboard-page .global-search-results__item .badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  max-width: 100%;
  line-height: 1.25;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
}

.route-dashboard-page .site-footer {
  width: 100%;
  margin: 0;
  padding: 16px 20px;
  border: 1px solid var(--surface-border);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  color: var(--text-light);
  background: var(--surface-card);
  box-shadow: var(--shadow-card-soft);
  font-size: 0.82rem;
  line-height: 1.6;
  text-align: center;
}

.route-dashboard-page .site-footer p {
  margin: 0;
}

.route-dashboard-page #dashboard-footer-slot {
  width: 100%;
  margin-top: auto;
}

.route-dashboard-page .cookie-legal {
  max-width: 900px;
  margin: 12px auto 0;
  padding-top: 12px;
  border-top: 1px solid var(--surface-border);
}

.route-dashboard-page .cookie-legal p + p {
  margin-top: 8px;
}

.route-dashboard-page .linklike-btn {
  padding: 0;
  border: 0;
  color: var(--primary-color);
  background: none;
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
}

.route-dashboard-page .pill-btn {
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.route-dashboard-page .review-grade-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.route-dashboard-page #review-error {
  color: #ffd4dc;
  font-size: 0.84rem;
  font-weight: 700;
}

body.collab-panel-open {
  overflow: hidden;
}

body.dark-mode.route-dashboard-page .route-dashboard-card,
body.dark-mode.route-dashboard-page .channel-section,
body.dark-mode.route-dashboard-page .site-footer {
  color: var(--route-text);
  background: var(--route-surface);
  border-color: var(--route-border);
}

@media screen and (min-width: 769px) {
  .route-dashboard-page #user-dashboard {
    box-sizing: border-box;
    min-height: 100dvh;
    padding: 0;
  }

  .route-dashboard-page .dashboard-header,
  .route-dashboard-page .site-footer {
    border-left: 0;
  }
}

@media screen and (max-width: 768px) {
  .route-dashboard-shell {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding: 0;
  }

  .route-dashboard-page #user-dashboard #sidebarMenu .menu-content {
    box-sizing: border-box;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding-bottom: calc(env(safe-area-inset-bottom) + 32px);
    border-radius: 0;
  }

  .route-dashboard-page .channel-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .route-dashboard-page .channel-section--subjects .channel-section__heading {
    margin-bottom: 12px;
  }

  .route-dashboard-page .channel-section {
    padding: 16px;
    border-radius: 18px;
  }

  .route-dashboard-page .channel-section__heading {
    margin-bottom: 15px;
  }

  .route-dashboard-page .channel-section h3 {
    font-size: 1.05rem;
  }

  .route-dashboard-page .channel-section__description {
    font-size: 0.74rem;
  }

  .route-dashboard-page .channel-card {
    min-height: 86px;
    padding: 12px;
    border-radius: 16px;
    gap: 10px;
  }

  .route-dashboard-page .channel-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 0.88rem;
  }

  .route-dashboard-page .channel-card__copy strong {
    font-size: 0.88rem;
  }

  .route-dashboard-page .channel-card__copy small {
    font-size: 0.68rem;
  }

  .route-dashboard-page .channel-card__arrow {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .route-dashboard-page .channel-section__back {
    margin-bottom: 12px;
    padding: 7px 10px;
  }

  .route-dashboard-page .dashboard-subject-groups {
    gap: 14px;
  }

  .route-dashboard-page .channel-route-subjects {
    padding: 0 12px 18px;
  }

  .route-dashboard-page .dashboard-subject-group {
    padding: 13px;
    border-radius: 17px;
  }

  .route-dashboard-page .dashboard-subject-group__heading {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .route-dashboard-page .dashboard-subject-group__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .route-dashboard-page .dashboard-subject-group__copy h4 {
    font-size: 0.9rem;
  }

  .route-dashboard-page .dashboard-subject-group__copy p {
    font-size: 0.66rem;
  }

  .route-dashboard-page .dashboard-subject-group__count {
    grid-column: 2;
    justify-self: start;
    padding: 5px 8px;
  }

  .route-dashboard-page .dashboard-subject-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .route-dashboard-page .dashboard-subject-card {
    min-height: 96px;
    padding: 12px;
    border-radius: 16px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 5px;
  }

  .route-dashboard-page .dashboard-subject-card__icon {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .route-dashboard-page .dashboard-subject-card__copy {
    grid-column: 2;
    grid-row: 1;
  }

  .route-dashboard-page .dashboard-subject-card__meta {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    padding: 5px 8px;
  }

  .route-dashboard-page .dashboard-subject-card__arrow {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
  }

  .route-dashboard-page .review-grade-row {
    flex-wrap: wrap;
  }
}

@media (hover: none), (pointer: coarse) {
  .route-dashboard-page .channel-card,
  .route-dashboard-page .channel-section__back,
  .route-dashboard-page .dashboard-subject-card {
    transition: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .route-dashboard-page .channel-card:hover {
    border-color: var(--route-border);
    box-shadow: 0 8px 20px rgba(69, 31, 42, 0.06);
    transform: none;
  }

  .route-dashboard-page .channel-card.is-active:hover {
    border-color: rgba(128, 36, 51, 0.5);
    box-shadow: 0 15px 30px rgba(69, 31, 42, 0.13);
  }

  .route-dashboard-page .dashboard-subject-card:hover {
    border-color: var(--route-border);
    box-shadow: 0 8px 20px rgba(69, 31, 42, 0.06);
    transform: none;
  }

  .route-dashboard-page .channel-section__back:hover {
    border-color: var(--route-border);
    box-shadow: none;
    transform: none;
  }
}

@media screen and (max-width: 360px) {
  .route-dashboard-page .channel-section {
    padding: 14px;
  }

  .route-dashboard-page .channel-route-subjects {
    padding-inline: 10px;
  }

  .route-dashboard-page .dashboard-subject-group {
    padding: 11px;
  }

  .route-dashboard-page .channel-card {
    padding: 11px;
    gap: 9px;
  }

  .route-dashboard-page .channel-icon {
    width: 44px;
    height: 44px;
  }

  .route-dashboard-page .dashboard-subject-card {
    padding: 11px;
    column-gap: 9px;
  }

  .route-dashboard-page .dashboard-subject-card__icon {
    width: 44px;
    height: 44px;
  }
}

@media screen and (max-width: 1024px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-size: clamp(14px, 1.6vw, 18px);
    line-height: 1.5;
  }

  body.route-page,
  body.route-page:not(.dark-mode) .flashcards-screen,
  body.route-page:not(.dark-mode) .study-mode-backdrop,
  body.route-page.dark-mode .flashcards-screen,
  body.route-page.dark-mode .study-mode-backdrop {
    background-attachment: scroll;
  }

  .route-header,
  .route-dashboard-page .channel-section {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.route-dashboard-page {
    color: var(--text-color);
  }

  .route-dashboard-page #user-dashboard .dashboard-header {
    width: 100% !important;
    max-width: none;
    margin-inline: 0 !important;
    margin-top: calc(env(safe-area-inset-top) + 18px);
    margin-bottom: 10px;
    padding: clamp(18px, 4vw, 24px);
    border-radius: 0 0 24px 24px;
  }

  .route-dashboard-page #user-dashboard .user-greeting h2 {
    width: 100%;
    min-width: 0;
    margin-right: 0;
    font-size: clamp(1.5rem, 5.8vw, 1.95rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
}

@media screen and (max-width: 480px) {
  html,
  body {
    font-size: clamp(14px, 3.4vw, 17px);
  }

  .route-dashboard-page #user-dashboard .dashboard-header {
    width: 100% !important;
    margin-inline: 0 !important;
    padding: 16px;
  }
}

@media screen and (max-width: 768px) {
  .route-dashboard-page #user-dashboard .dashboard-header {
    margin-top: 0;
  }

  .route-dashboard-page #user-dashboard .user-greeting {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    gap: 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .route-dashboard-page #user-dashboard .user-greeting h2 {
    grid-column: 1 / 3;
    grid-row: 1;
    width: 100%;
    flex-flow: row nowrap;
    align-items: center;
    gap: 9px;
    font-size: clamp(0.95rem, 4.8vw, 1.4rem);
    overflow-wrap: normal;
    white-space: nowrap;
  }

  .route-dashboard-page #user-dashboard .user-greeting h2 #welcome-username {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .route-dashboard-page #user-dashboard .user-greeting .stat-image {
    width: clamp(30px, 10vw, 40px);
    height: clamp(30px, 10vw, 40px);
    margin-top: 0;
  }

  .route-dashboard-page #user-dashboard .profile-trigger {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 52px;
    height: 52px;
    min-height: 52px;
    margin: 0;
    padding: 0;
    justify-content: center;
    border-radius: var(--border-radius);
  }

  .route-dashboard-page #user-dashboard .profile-trigger__copy,
  .route-dashboard-page #user-dashboard .profile-trigger__chevron {
    display: none;
  }

  .route-dashboard-page #user-dashboard .user-greeting .menu-toggle {
    position: static;
    grid-column: 1;
    grid-row: 2;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius);
    color: var(--primary-color);
    background: var(--surface-card);
    box-shadow: var(--shadow-card-soft);
    backdrop-filter: blur(10px);
  }

  .route-dashboard-page #user-dashboard .user-greeting .menu-toggle i {
    font-size: 1.15rem;
  }

  .route-dashboard-page #user-dashboard .user-greeting .global-search-wrap {
    grid-column: 2 / -1;
    grid-row: 2;
    order: unset;
    width: 100%;
    min-width: 0;
    flex-basis: auto;
    margin: 0;
  }

  .route-dashboard-page #user-dashboard .global-search {
    width: 100%;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 7px 10px;
    border-radius: 13px;
  }

  .route-dashboard-page #user-dashboard .global-search input {
    min-height: 0;
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .route-dashboard-page #user-dashboard .global-search__clear {
    width: 26px;
    height: 26px;
    font-size: 1.1rem;
  }
}

body.dark-mode.route-dashboard-page #user-dashboard .user-greeting .menu-toggle {
  color: var(--dark-primary, #c77b85);
  background: var(--dark-bg-secondary, #1b1b1b);
  border-color: var(--dark-border, rgba(255, 255, 255, 0.12));
}

body.collab-panel-open {
  overflow: hidden;
}

/* Pannello collaborazioni: misura sul viewport reale e scroll interno su mobile. */
@media screen and (max-width: 640px) {
  .route-dashboard-page .menu-collab-panel {
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding:
      max(12px, env(safe-area-inset-top))
      12px
      max(12px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    overflow: hidden;
  }

  .route-dashboard-page .menu-collab-panel .menu-spotlight,
  .route-dashboard-page .menu-collab-panel .menu-spotlight.is-visible {
    width: min(calc(100vw - 24px), 520px);
    max-width: 520px;
    min-width: 0;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
    margin: 0;
    padding: 14px 14px 12px;
    border-radius: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
  }

  .route-dashboard-page .menu-collab-panel.is-open .menu-spotlight.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: none;
  }

  .route-dashboard-page .menu-spotlight > *,
  .route-dashboard-page .menu-spotlight .menu-collab__grid,
  .route-dashboard-page .menu-spotlight .menu-collab__main-card,
  .route-dashboard-page .menu-spotlight .menu-collab__side,
  .route-dashboard-page .menu-spotlight .menu-collab-step > div {
    min-width: 0;
    max-width: 100%;
  }

  .route-dashboard-page .menu-spotlight p,
  .route-dashboard-page .menu-spotlight h3,
  .route-dashboard-page .menu-spotlight h4,
  .route-dashboard-page .menu-spotlight li,
  .route-dashboard-page .menu-spotlight a {
    overflow-wrap: anywhere;
  }

  .route-dashboard-page .menu-spotlight::-webkit-scrollbar {
    width: 5px;
  }

  .route-dashboard-page .menu-spotlight::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
  }

  .route-dashboard-page .menu-spotlight .spotlight-header {
    position: sticky;
    z-index: 5;
    top: -14px;
    margin: -14px -14px 10px;
    padding: 10px 14px 9px;
    gap: 8px;
    background: rgba(109, 26, 46, 0.94);
    backdrop-filter: blur(12px);
  }

  .route-dashboard-page .menu-spotlight .spotlight-header .left-actions {
    min-width: 0;
    flex: 1 1 auto;
    gap: 8px;
  }

  .route-dashboard-page .menu-spotlight .spotlight-back,
  .route-dashboard-page .menu-spotlight .spotlight-close {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }

  .route-dashboard-page .menu-spotlight .menu-collab__eyebrow {
    min-width: 0;
    overflow: hidden;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .route-dashboard-page .menu-spotlight .menu-collab__title {
    margin-bottom: 6px;
    font-size: clamp(1.2rem, 6vw, 1.45rem);
  }

  .route-dashboard-page .menu-spotlight .menu-collab__lead {
    margin-bottom: 10px;
    font-size: 0.88rem;
    line-height: 1.4;
  }

  .route-dashboard-page .menu-spotlight .menu-collab__grid,
  .route-dashboard-page .menu-spotlight .menu-collab__side {
    gap: 10px;
  }

  .route-dashboard-page .menu-spotlight .menu-collab__main-card {
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
  }

  .route-dashboard-page .menu-spotlight .menu-collab-step {
    flex-direction: row;
    align-items: flex-start;
    padding: 7px 8px;
  }

  .route-dashboard-page .menu-spotlight .menu-collab-step__index {
    flex: 0 0 30px;
  }

  .route-dashboard-page .menu-spotlight .menu-collab-info {
    padding: 10px 12px;
    border-radius: 16px;
  }

  .route-dashboard-page .menu-spotlight .menu-collab-info h4 {
    margin-bottom: 8px;
  }

  .route-dashboard-page .menu-spotlight .menu-collab-info ul {
    gap: 4px;
  }

  .route-dashboard-page .menu-spotlight .menu-collab-cta {
    gap: 5px;
  }

  .route-dashboard-page .menu-spotlight .menu-collab-btn {
    padding: 9px 14px;
  }

  .route-dashboard-page .menu-spotlight .menu-collab__note {
    margin: 7px 0 0;
    line-height: 1.35;
  }
}
