  * {
      box-sizing: border-box;
      margin: 0;
      padding: 0
  }

  body {
      min-height: 100vh;
      background:
          radial-gradient(ellipse at 20% -10%, #4a2f70 0%, transparent 55%),
          radial-gradient(ellipse at 100% 110%, #3a2258 0%, transparent 50%),
          linear-gradient(160deg, #211230 0%, #17091f 100%);
      font-family: 'Luz Texto', Georgia, serif;
      color: var(--muted);
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: calc(var(--header-h, 74px) + 20px) 0 110px
  }

  button {
      cursor: pointer;
      font-family: 'Luz Texto', Georgia, serif
  }

  @keyframes fadeUp {
      from {
          opacity: 0;
          transform: translateY(16px)
      }

      to {
          opacity: 1;
          transform: translateY(0)
      }
  }

  @keyframes shake {

      0%,
      100% {
          transform: translateX(0)
      }

      20% {
          transform: translateX(-9px)
      }

      40% {
          transform: translateX(9px)
      }

      60% {
          transform: translateX(-5px)
      }

      80% {
          transform: translateX(5px)
      }
  }

  @keyframes popIn {
      0% {
          transform: scale(.92);
          opacity: 0
      }

      100% {
          transform: scale(1);
          opacity: 1
      }
  }

  @keyframes glow {

      0%,
      100% {
          box-shadow: 0 0 10px rgba(201, 168, 76, .15)
      }

      50% {
          box-shadow: 0 0 26px rgba(201, 168, 76, .38)
      }
  }

  @keyframes float {

      0%,
      100% {
          transform: translateY(0)
      }

      50% {
          transform: translateY(-5px)
      }
  }

  @keyframes trail {
      from {
          opacity: 0;
          transform: scale(.6)
      }

      to {
          opacity: 1;
          transform: scale(1)
      }
  }

  /* TOP BAR */
  #topbar {
      width: 100%;
      max-width: 600px;
      padding: 18px 20px 0;
      display: flex;
      flex-direction: column;
      gap: 10px
  }

  .top-meta {
      display: flex;
      justify-content: space-between;
      align-items: center
  }

  .app-name {
      font-size: 13px;
      color: var(--gold);
      letter-spacing: .1em;
      font-family: sans-serif
  }

  .lives {
      display: flex;
      gap: 5px
  }

  .xp-badge {
      font-size: 12px;
      font-family: sans-serif;
      color: var(--gold2);
      background: rgba(201, 168, 76, .1);
      border: 1px solid rgba(201, 168, 76, .28);
      padding: 3px 12px;
      border-radius: 20px
  }

  .seg-row {
      display: flex;
      gap: 8px
  }

  .seg {
      flex: 1;
      height: 7px;
      background: rgba(255, 240, 210, .07);
      border-radius: 4px;
      overflow: hidden
  }

  .seg-fill {
      height: 100%;
      border-radius: 4px;
      background: linear-gradient(90deg, var(--gold), var(--gold2));
      transition: width .6s ease
  }

  .step-icons {
      display: flex;
      justify-content: space-around;
      font-size: 15px
  }

  /* SOUND CONTROLS */
  .sound-bar {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      align-items: center;
      padding: 0 20px
  }

  .sound-btn {
      background: transparent;
      border: 1px solid rgba(201, 168, 76, .2);
      border-radius: 8px;
      padding: 5px 10px;
      font-size: 13px;
      color: var(--muted);
      transition: all .2s
  }

  .sound-btn.active {
      color: var(--gold);
      border-color: rgba(201, 168, 76, .4)
  }

  .sound-btn:hover {
      border-color: var(--gold);
      color: var(--cream2)
  }

  /* SCREEN */
  #screen {
      width: calc(100% - 32px);
      max-width: 560px;
      margin-top: 18px;
      display: flex;
      flex-direction: column;
      gap: 20px;
      animation: fadeUp .4s ease
  }

  /* TYPOGRAPHY */
  .eyebrow {
      font-size: 11px;
      font-family: sans-serif;
      letter-spacing: .14em;
      text-transform: uppercase;
      color: var(--muted)
  }

  .ex-title {
      font-size: clamp(17px, 4vw, 22px);
      font-weight: normal;
      color: var(--cream);
      line-height: 1.5
  }

  .hint {
      font-size: 12px;
      color: var(--muted);
      font-family: sans-serif;
      font-style: italic
  }

  .counter {
      font-size: 11px;
      font-family: sans-serif;
      color: var(--muted);
      letter-spacing: .05em;
      text-align: center
  }

  .label-sm {
      font-size: 12px;
      font-family: sans-serif;
      color: var(--muted);
      text-align: center
  }

  /* CARDS */
  .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 32px 24px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 22px;
      text-align: center
  }

  /* BUTTONS */
  .btn-primary {
      background: linear-gradient(135deg, #7c5a1e, var(--gold));
      color: #1c1008;
      border: none;
      border-radius: 12px;
      padding: 13px 32px;
      font-size: 14px;
      font-family: sans-serif;
      font-weight: 700;
      letter-spacing: .04em;
      transition: opacity .2s
  }

  .btn-primary:hover {
      opacity: .82
  }

  .btn-primary:disabled,
  .btn-ghost:disabled {
      opacity: .5;
      cursor: default;
      pointer-events: none;
  }

  .btn-ghost {
      background: transparent;
      color: var(--muted);
      border: 1px solid rgba(158, 140, 114, .28);
      border-radius: 12px;
      padding: 12px 20px;
      font-size: 13px;
      font-family: sans-serif;
      transition: all .15s
  }

  .btn-ghost:hover {
      border-color: var(--muted);
      color: var(--muted)
  }

  .btn-exit {
      background: transparent;
      color: var(--muted);
      border: 1px solid rgba(106, 88, 64, .35);
      border-radius: 10px;
      padding: 9px 18px;
      font-size: 12px;
      font-family: sans-serif;
      transition: all .2s
  }

  .btn-exit:hover {
      color: var(--wrong);
      border-color: var(--wrong-br)
  }

  .btn-red {
      background: var(--wrong-bg);
      color: var(--wrong);
      border: 1.5px solid var(--wrong-br);
      border-radius: 12px;
      padding: 12px 22px;
      font-size: 13px;
      font-family: sans-serif;
      font-weight: 700;
      transition: all .15s
  }

  .btn-green {
      background: var(--correct-bg);
      color: var(--correct);
      border: 1.5px solid var(--correct-br);
      border-radius: 12px;
      padding: 12px 22px;
      font-size: 13px;
      font-family: sans-serif;
      font-weight: 700;
      transition: all .15s
  }

  .btn-red:hover {
      background: rgba(224, 112, 112, .2)
  }

  .btn-green:hover {
      background: rgba(94, 201, 122, .2)
  }

  .btn-row {
      display: flex;
      gap: 12px;
      justify-content: center;
      flex-wrap: wrap
  }

  .btn-tab {
      background: transparent;
      color: var(--muted);
      border: 1px solid rgba(158, 140, 114, .22);
      border-radius: 10px;
      padding: 9px 18px;
      font-size: 13px;
      font-family: sans-serif;
      transition: all .2s
  }

  .btn-tab.active {
      background: rgba(201, 168, 76, .12);
      color: var(--gold2);
      border-color: rgba(201, 168, 76, .4)
  }

  /* RESULT BANNER */
  .result-banner {
      background: rgba(201, 168, 76, .08);
      border: 1.5px solid rgba(201, 168, 76, .3);
      border-radius: 16px;
      padding: 24px 22px;
      text-align: center;
      animation: popIn .35s ease;
      display: flex;
      flex-direction: column;
      gap: 14px;
      align-items: center;
      width: 100%
  }

  .result-banner p {
      font-size: 14px;
      font-family: sans-serif;
      color: var(--cream2);
      line-height: 1.75
  }

  /* NEXT BADGE */
  .next-badge {
      display: flex;
      align-items: center;
      gap: 14px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 16px 22px
  }

  .next-label {
      font-size: 16px;
      font-family: sans-serif;
      color: var(--cream2)
  }

  /* COMPLETE / GAMEOVER */
  .big-emoji {
      font-size: 54px
  }

  .screen-title {
      font-size: 23px;
      font-weight: normal;
      color: var(--muted)
  }

  .screen-body {
      font-size: 14px;
      font-family: sans-serif;
      color: var(--muted);
      line-height: 1.8;
      text-align: center
  }

  .xp-circle {
      display: flex;
      flex-direction: column;
      align-items: center;
      background: rgba(201, 168, 76, .1);
      border: 2px solid rgba(201, 168, 76, .35);
      border-radius: 50%;
      width: 96px;
      height: 96px;
      justify-content: center;
      gap: 2px;
      animation: glow 2.5s ease infinite
  }

  .xp-big {
      font-size: 30px;
      font-family: sans-serif;
      font-weight: 700;
      color: var(--gold2)
  }

  .xp-sub {
      font-size: 10px;
      font-family: sans-serif;
      color: var(--muted);
      letter-spacing: .08em
  }

  /* ── MAPA DUOLINGO ── */
  #mapa-view {
      width: calc(100% - 32px);
      max-width: 560px;
      margin-top: 18px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0
  }

  .mapa-header {
      text-align: center;
      margin-bottom: 24px
  }

  .mapa-header h2 {
      font-size: 20px;
      font-weight: normal;
      color: var(--muted);
      margin-bottom: 6px
  }

  .mapa-header p {
      font-size: 13px;
      font-family: sans-serif;
      color: var(--muted)
  }

  .mapa-path {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0;
      width: 100%;
      padding-bottom: 20px
  }

  .stone-row {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      position: relative;
      margin: 0
  }

  .stone-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      padding: 6px
  }

  .stone {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      border: 3px solid;
      transition: transform .2s;
      position: relative
  }

  .stone:hover {
      transform: scale(1.08)
  }

  .stone.done {
      background: rgba(201, 168, 76, .2);
      border-color: var(--gold);
      animation: none
  }

  .stone.today {
      background: rgba(201, 168, 76, .25);
      border-color: var(--gold2);
      animation: float 2.5s ease infinite;
      box-shadow: 0 0 20px rgba(201, 168, 76, .4)
  }

  .stone.locked {
      background: rgba(255, 240, 210, .04);
      border-color: rgba(255, 240, 210, .1);
      cursor: default;
      opacity: .4
  }

  .stone-date {
      font-size: 10px;
      font-family: sans-serif;
      color: var(--muted);
      letter-spacing: .04em
  }

  .stone-xp {
      font-size: 10px;
      font-family: sans-serif;
      color: var(--gold);
      font-weight: 700
  }

  .connector {
      width: 3px;
      height: 24px;
      background: linear-gradient(to bottom, rgba(201, 168, 76, .5), rgba(201, 168, 76, .15));
      margin: 0 auto
  }

  .connector.done {
      background: linear-gradient(to bottom, var(--gold), rgba(201, 168, 76, .4))
  }

  /* LICENÇA — badge mostrado no ecrã de seleção de nível */
  .licenca-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      font-family: sans-serif;
      padding: 6px 16px;
      border-radius: 999px;
      margin: 0 0 14px;
  }

  .licenca-badge.ativa {
      background: rgba(201, 168, 76, .15);
      border: 1px solid rgba(201, 168, 76, .4);
      color: var(--gold-light);
  }

  .licenca-badge.demo {
      background: rgba(155, 114, 207, .08);
      border: 1px solid rgba(155, 114, 207, .25);
      color: var(--muted);
  }

  /* LEADERBOARD */
  .leader-wrap {
      width: 100%;
      max-width: 560px;
      margin-top: 18px;
      animation: fadeUp .4s ease
  }

  .leader-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
      padding: 0 4px
  }

  .leader-title {
      font-size: 18px;
      font-weight: normal;
      color: var(--gold2)
  }

  .leader-table-wrap {
      max-height: 380px;
      overflow-y: auto;
      border-radius: 16px;
      border: 1px solid var(--border)
  }

  .leader-table-wrap::-webkit-scrollbar {
      width: 5px
  }

  .leader-table-wrap::-webkit-scrollbar-track {
      background: transparent
  }

  .leader-table-wrap::-webkit-scrollbar-thumb {
      background: rgba(201, 168, 76, .3);
      border-radius: 4px
  }

  .leader-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 18px;
      border-bottom: 1px solid rgba(201, 168, 76, .08);
      transition: background .15s
  }

  .leader-row:last-child {
      border-bottom: none
  }

  .leader-row:hover {
      background: var(--surface2)
  }

  .leader-row.me {
      background: rgba(201, 168, 76, .08);
      border-left: 3px solid var(--gold)
  }

  .leader-row.separator {
      background: rgba(255, 240, 210, .03);
      justify-content: center;
      color: var(--muted2);
      font-size: 12px;
      font-family: sans-serif;
      font-style: italic;
      padding: 10px
  }

  .rank {
      font-size: 16px;
      width: 32px;
      text-align: center;
      flex-shrink: 0
  }

  .leader-email {
      flex: 1;
      font-size: 13px;
      font-family: sans-serif;
      color: var(--cream2);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
  }

  .leader-xp {
      font-size: 14px;
      font-family: sans-serif;
      font-weight: 700;
      color: var(--gold2);
      flex-shrink: 0
  }

  .leader-days {
      font-size: 11px;
      font-family: sans-serif;
      color: var(--muted);
      flex-shrink: 0;
      margin-left: 6px
  }

  /* NAV TABS — pílula flutuante no fundo do ecrã, ao estilo do Sete Véus */
  .nav-tabs {
      display: flex;
      align-items: center;
      gap: 6px;
      width: calc(100% - 28px);
      max-width: 460px;
      padding: 6px 8px 6px 6px;
      justify-content: space-between;
      /* Flutua sempre por cima de tudo, fixa no fundo do ecrã — mesma
         posição/estilo do #soundToolbar usado no Sete Véus */
      position: fixed;
      left: 50%;
      bottom: 10px;
      transform: translateX(-50%);
      z-index: 9999;
      background: linear-gradient(160deg, rgba(56, 36, 81, 0.92), rgba(33, 18, 48, 0.92));
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      border: 1px solid rgba(207, 159, 63, .4);
      border-radius: 999px;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  }

  .nav-tabs .btn-tab {
      padding: 8px 14px;
      font-size: 12px;
      white-space: nowrap;
      border-color: rgba(207, 159, 63, .3);
      color: var(--cream);
  }

  .nav-tabs .btn-tab.active {
      background: rgba(233, 196, 106, .16);
      color: var(--gold-light);
      border-color: rgba(233, 196, 106, .45);
  }

  .nav-tabs #tab-voltar {
      flex: 0 0 auto;
      width: 34px;
      height: 34px;
      padding: 0;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
  }

  .nav-tabs .sound-btn {
      flex: 0 0 auto;
      width: 34px;
      height: 34px;
      padding: 0;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      color: var(--cream);
      border-color: rgba(207, 159, 63, .3);
  }

  @media (max-width: 380px) {
      .nav-tabs {
          gap: 4px;
          padding: 6px 6px 6px 4px;
      }

      .nav-tabs .btn-tab {
          padding: 7px 10px;
          font-size: 11px;
      }
  }

  /* EXERCISE STYLES */
  .assembly-box {
      border: 1.5px solid;
      border-radius: 14px;
      padding: 16px;
      min-height: 66px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      width: 100%
  }

  .chip {
      font-size: 12px;
      font-family: sans-serif;
      padding: 6px 12px;
      border-radius: 8px;
      border: 1px solid;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      transition: opacity .2s
  }

  .piece-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 100%
  }

  .piece-btn {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 13px 16px;
      border-radius: 12px;
      border: 1px solid var(--border);
      text-align: left;
      width: 100%;
      background: var(--surface);
      transition: all .15s
  }

  .piece-btn:hover {
      background: var(--surface2);
      border-color: rgba(201, 168, 76, .3)
  }

  .piece-type-icon {
      font-size: 15px;
      flex-shrink: 0
  }

  .piece-txt {
      flex: 1;
      font-size: 13px;
      font-family: sans-serif;
      color: var(--cream2)
  }

  .current-card {
      border: 1.5px solid var(--violet-br);
      border-radius: 18px;
      padding: 26px 20px 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
      background: var(--violet-bg);
      width: 100%;
      transition: all .15s
  }

  .current-txt {
      font-size: clamp(15px, 4vw, 19px);
      text-align: center;
      color: var(--cream);
      line-height: 1.55
  }

  .mirror-row {
      display: flex;
      gap: 12px;
      width: 100%
  }

  .mini-panel {
      flex: 1;
      border: 1.5px solid;
      border-radius: 14px;
      padding: 14px;
      min-height: 90px
  }

  .mini-panel-label {
      font-size: 11px;
      font-family: sans-serif;
      font-weight: 700;
      letter-spacing: .06em;
      margin-bottom: 10px;
      text-align: center
  }

  .mini-item {
      font-size: 12px;
      font-family: sans-serif;
      padding: 6px 10px;
      border-radius: 8px;
      border: 1px solid;
      margin-bottom: 6px;
      background: rgba(255, 255, 255, .03);
      animation: fadeUp .2s ease
  }

  .mini-empty {
      font-size: 11px;
      color: var(--muted2);
      font-family: sans-serif;
      font-style: italic;
      text-align: center;
      margin-top: 10px
  }

  .neg-box {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      padding: 16px;
      background: var(--wrong-bg);
      border: 1px solid var(--wrong-br);
      border-radius: 12px;
      width: 100%;
      align-items: center
  }

  .neg-word {
      font-size: 14px;
      color: var(--wrong);
      font-family: sans-serif
  }

  .built-area {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      padding: 16px;
      background: var(--violet-bg);
      border: 1.5px solid var(--violet-br);
      border-radius: 12px;
      min-height: 60px;
      align-items: center;
      width: 100%;
      transition: border-color .25s
  }

  .built-word {
      background: rgba(155, 114, 212, .2);
      border: 1px solid var(--violet-br);
      color: var(--violet2);
      border-radius: 8px;
      padding: 7px 13px;
      font-size: 13px;
      font-family: sans-serif
  }

  .built-word:hover {
      opacity: .7
  }

  .pool-wrap {
      display: flex;
      flex-wrap: wrap;
      gap: 9px;
      justify-content: center;
      width: 100%
  }

  .pool-word {
      background: var(--surface2);
      border: 1px solid var(--border);
      color: var(--cream2);
      border-radius: 9px;
      padding: 9px 15px;
      font-size: 13px;
      font-family: sans-serif;
      transition: all .15s
  }

  .pool-word:hover {
      background: rgba(201, 168, 76, .14);
      border-color: var(--gold);
      color: var(--cream)
  }

  .option-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
      width: 100%
  }

  .option-btn {
      display: flex;
      align-items: center;
      gap: 13px;
      padding: 14px 18px;
      border-radius: 12px;
      border: 1px solid var(--border);
      text-align: left;
      width: 100%;
      font-family: sans-serif;
      background: var(--surface);
      color: var(--cream2);
      font-size: 13px;
      transition: all .2s
  }

  .option-btn:hover:not([disabled]) {
      background: var(--surface2);
      border-color: rgba(201, 168, 76, .3)
  }

  .option-letter {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: rgba(201, 168, 76, .1);
      border: 1px solid rgba(201, 168, 76, .25);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      flex-shrink: 0;
      color: var(--gold);
      font-family: sans-serif
  }

  .option-txt {
      flex: 1
  }

  .explanation-box {
      background: var(--violet-bg);
      border: 1px solid var(--violet-br);
      border-radius: 12px;
      padding: 16px 18px;
      animation: fadeUp .4s ease;
      width: 100%
  }

  .explanation-txt {
      font-size: 13px;
      font-family: sans-serif;
      color: var(--violet2);
      line-height: 1.8
  }

  .oracle-card {
      background: rgba(201, 168, 76, .07);
      border: 1.5px solid rgba(201, 168, 76, .3);
      border-radius: 18px;
      padding: 28px 22px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
      width: 100%;
      animation: glow 3s ease infinite
  }

  .oracle-msg {
      font-size: 15px;
      font-style: italic;
      color: var(--cream2);
      line-height: 1.75;
      text-align: center
  }

  /* ══════════════════════════════════════════════════════════
           MAPA DE 4 NÍVEIS — "Portal do Coração"
           ══════════════════════════════════════════════════════════ */
  :root {
      --nivel1-viva: #4db8ff;
      --nivel2-viva: #3dd68c;
      --nivel3-viva: #ffd166;
      --nivel4-viva: #ff7096;
      --nivel5-viva: #ff8c42;
      --nivel6-viva: #4dd6c0;
      --nivel7-viva: #a78bfa;
      --nivel8-viva: #fa3153;
      --bloqueado-claro: #3e3350;

      /* Paleta base refinada — alinhada com a identidade Luz de Cristal */
      --bg-deep: #211230;
      --surface: #382451;
      --surface2: #4a2f70;
      --border: rgba(207, 159, 63, .22);
      --gold: #cf9f3f;
      --gold-light: #e9c46a;
      --gold2: #e9c46a;
      --cream: #d9c9a3;
      --cream2: #d9c9a3;
      --muted: #c9bfe0;
      --violet: #9b72cf;
      --violet2: #c4a0f0;
      --violet-bg: rgba(155, 114, 207, .10);
      --violet-br: rgba(155, 114, 207, .30);
      --correct: #5ec97a;
      --correct-bg: rgba(94, 201, 122, .10);
      --correct-br: rgba(94, 201, 122, .35);
      --wrong: #e07070;
      --wrong-bg: rgba(224, 112, 112, .10);
      --wrong-br: rgba(224, 112, 112, .35);
  }


  /* :root {
      --bg: #f7f3f0;
      --surface: rgba(255, 240, 210, .05);
      --surface2: rgba(255, 240, 210, .09);
      --border: #9e8a6a;
      --cream: #9e8a6a;
      --cream2: #9e8a6a;
      --muted: #9e8a6a;
      --muted2: #1c1008;
      --gold: #c9a84c;
      --gold2: #c9a84c;
      --violet: #9b72d4;
      --violet2: #c4a0f0;
      --violet-bg: rgba(155, 114, 212, .12);
      --violet-br: rgba(155, 114, 212, .3);
      --correct: #5ec97a;
      --correct-bg: rgba(94, 201, 122, .1);
      --correct-br: rgba(94, 201, 122, .35);
      --wrong: #e07070;
      --wrong-bg: rgba(224, 112, 112, .1);
      --wrong-br: rgba(224, 112, 112, .35);
  } */


  /* ── CORAÇÕES DO MAPA ── */
  .jornada-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 8px 14px 40px;
      width: 100%;
  }

  .mascote-mapa-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin: 6px 0 26px;
      animation: flutuarMapa 3s ease-in-out infinite;
  }

  .mascote-mapa-avatar {
      width: 110px;
      height: 110px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold) 70%);
      padding: 4px;
      box-shadow: 0 0 0 4px rgba(212, 175, 55, .18), 0 6px 24px rgba(212, 175, 55, .35);
      display: flex;
      align-items: center;
      justify-content: center;
  }

  .mascote-mapa-avatar img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
      background: rgba(212, 175, 55, .18);
      display: block;
  }

  @keyframes flutuarMapa {

      0%,
      100% {
          transform: translateY(0);
      }

      50% {
          transform: translateY(-8px);
      }
  }

  .balao-fala-mapa {
      background: rgba(212, 175, 55, .18);
      border: 2px solid var(--gold);
      padding: 10px 20px;
      border-radius: 18px;
      position: relative;
      margin-bottom: 16px;
      max-width: 280px;
      text-align: center;
      box-shadow: 0 4px 20px rgba(0, 0, 0, .35);
  }

  .balao-fala-mapa span {
      font-size: .88rem;
      color: var(--cream);
      font-family: sans-serif;
      font-weight: 600;
  }

  .balao-fala-mapa::after {
      content: '';
      position: absolute;
      bottom: -11px;
      left: 50%;
      transform: translateX(-50%);
      border-left: 11px solid transparent;
      border-right: 11px solid transparent;
      border-top: 11px solid var(--gold);
  }

  .nivel-secao {
      width: 100%;
      max-width: 560px;
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-bottom: 44px;
  }

  /* Ecrã 1 — painel com border dourado à volta de tudo (mascote, título,
     "continuar" e grelha de níveis), igual ao .panel do Sete Véus no
     ecrã "Escolhe o teu nível". */
  .niveis-selecao-panel {
      box-sizing: border-box;
      width: 100%;
      max-width: 560px;
      margin: 0 auto;
      border: 1px solid rgba(207, 159, 63, 0.3);
      border-radius: 18px;
      padding: 22px 20px 24px;
      background: linear-gradient(180deg, rgba(56, 36, 81, 0.55), rgba(33, 18, 48, 0.7));
      backdrop-filter: blur(2px);
      -webkit-backdrop-filter: blur(2px);
  }

  /* Ecrã 1 — cartão fechado por omissão que esconde a lista dos 7 níveis;
     só abre com o clique do utilizador (o botão "Continuar" acima já leva
     diretamente ao nível em curso, sem ser preciso abrir isto). */
  .niveis-lista-card {
      width: 100%;
      max-width: 560px;
      margin: 0 auto 4px;
      border: 1px solid rgba(207, 159, 63, 0.3);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.03);
      overflow: hidden;
  }

  .niveis-lista-toggle {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 14px 18px;
      background: transparent;
      border: none;
      color: var(--cream);
      font-family: sans-serif;
      font-size: .88rem;
      font-weight: 600;
      cursor: pointer;
  }

  .niveis-lista-toggle:hover {
      background: rgba(233, 196, 106, 0.08);
  }

  .niveis-lista-seta {
      font-size: .8rem;
      color: var(--gold-light);
      flex-shrink: 0;
      transition: transform .2s ease;
  }

  .niveis-lista-card.aberto .niveis-lista-seta {
      transform: rotate(180deg);
  }

  .niveis-scroll-container {
      display: none;
      padding: 0 16px 16px;
  }

  .niveis-lista-card.aberto .niveis-scroll-container {
      display: block;
  }

  /* Ecrã 1 — grelha de seleção dos 7 níveis (cartões clicáveis) */
  .niveis-grid {
      display: flex;
      flex-direction: column;
      gap: 14px;
      width: 100%;
      max-width: 560px;
      margin: 0 auto;
  }

  .nivel-card {
      margin-bottom: 0;
      cursor: pointer;
      transition: transform .15s ease, filter .15s ease;
  }

  .nivel-card:not(.nivel-trancado):hover {
      transform: translateY(-2px);
  }

  .nivel-card:not(.nivel-trancado):active {
      transform: translateY(0) scale(.98);
  }

  .nivel-card.nivel-trancado {
      cursor: default;
  }

  .nivel-card .nivel-header {
      margin-bottom: 0;
  }

  .nivel-header {
      width: 100%;
      padding: 18px 20px;
      border-radius: 20px;
      margin-bottom: 32px;
      color: #fff;
      text-align: center;
      box-shadow: 0 6px 24px rgba(0, 0, 0, .30);
      position: relative;
  }

  #nivel-wrapper-1.nivel-header {
      background: linear-gradient(135deg, #2e8fd9, #1a6ab5);
  }

  #nivel-wrapper-2.nivel-header {
      background: linear-gradient(135deg, #22a869, #177a4a);
  }

  #nivel-wrapper-3.nivel-header {
      background: linear-gradient(135deg, #d4950a, #a97100);
  }

  #nivel-wrapper-4.nivel-header {
      background: linear-gradient(135deg, #d94470, #a82855);
  }

  #nivel-wrapper-5.nivel-header {
      background: linear-gradient(135deg, #e0792e, #b35a1a);
  }

  #nivel-wrapper-6.nivel-header {
      background: linear-gradient(135deg, #1fb39c, #0e7d6c);
  }

  #nivel-wrapper-7.nivel-header {
      background: linear-gradient(135deg, #8768e0, #5f43b8);
  }

  #nivel-wrapper-8.nivel-header {
      background: linear-gradient(135deg, #d42a47, #a22036);
  }

  /* Botão de destaque no topo do mapa de níveis: leva diretamente ao
     nível onde o utilizador ficou, sem ter de descer a lista até lá —
     útil com muitos níveis desbloqueados. Reutiliza o mesmo gradiente
     de cada nível (#nivel-wrapper-N) para se manter consistente. */
  .continuar-nivel {
      width: 100%;
      max-width: 560px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 16px 20px;
      border-radius: 18px;
      margin: 0 auto 22px;
      color: #fff;
      cursor: pointer;
      box-shadow: 0 6px 22px rgba(0, 0, 0, .32);
      transition: transform .15s ease;
  }

  .continuar-nivel:hover {
      transform: translateY(-2px);
  }

  .continuar-nivel:active {
      transform: translateY(0) scale(.98);
  }

  .continuar-nivel-1 {
      background: linear-gradient(135deg, #2e8fd9, #1a6ab5);
  }

  .continuar-nivel-2 {
      background: linear-gradient(135deg, #22a869, #177a4a);
  }

  .continuar-nivel-3 {
      background: linear-gradient(135deg, #d4950a, #a97100);
  }

  .continuar-nivel-4 {
      background: linear-gradient(135deg, #d94470, #a82855);
  }

  .continuar-nivel-5 {
      background: linear-gradient(135deg, #e0792e, #b35a1a);
  }

  .continuar-nivel-6 {
      background: linear-gradient(135deg, #1fb39c, #0e7d6c);
  }

  .continuar-nivel-7 {
      background: linear-gradient(135deg, #8768e0, #5f43b8);
  }

  .continuar-nivel-8 {
      background: linear-gradient(135deg, #d42a47, #a22036);
  }

  .continuar-label {
      font-family: 'Luz Texto', serif;
      font-size: .72rem;
      letter-spacing: .16em;
      text-transform: uppercase;
      opacity: .85;
  }

  .continuar-nome {
      font-family: 'Luz Texto', serif;
      font-size: 1.05rem;
      margin-top: 2px;
  }

  .continuar-seta {
      font-size: 1.3rem;
      flex-shrink: 0;
  }

  .nivel-titulo {
      font-family: 'Luz Texto', serif;
      font-size: 1.18rem;
      margin: 0 0 4px;
  }

  .nivel-sub {
      font-size: .72rem;
      font-family: sans-serif;
      letter-spacing: .05em;
      opacity: .88;
      margin: 0 0 10px;
      text-transform: uppercase;
  }

  .nivel-progresso-txt {
      font-size: .75rem;
      font-family: sans-serif;
      opacity: .85;
      margin: 0;
  }

  .nivel-trancado .nivel-header {
      filter: grayscale(.8) brightness(.5);
  }

  .nivel-trancado .nivel-cadeado {
      display: flex;
  }

  .nivel-cadeado {
      display: none;
      align-items: center;
      justify-content: center;
      gap: 6px;
      font-size: .78rem;
      font-family: sans-serif;
      margin-top: 6px;
      opacity: .9;
  }

  .nivel-caminho {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 44px;
      width: 100%;
      /* Border dourado à volta do mapa, igual ao .panel do Sete Véus */
      box-sizing: border-box;
      border: 1px solid rgba(207, 159, 63, 0.3);
      border-radius: 18px;
      padding: 28px 20px 24px;
      background: linear-gradient(180deg, rgba(56, 36, 81, 0.55), rgba(33, 18, 48, 0.7));
      backdrop-filter: blur(2px);
      -webkit-backdrop-filter: blur(2px);
  }

  /* CORAÇÕES — MAIORES */
  .licao-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      position: relative;
  }

  /* --- BOTÕES ESTILO DUOLINGO: ESPESSURA LARGA + BRILHO --- */
  .licao-btn {
      /* 1. Limpa o fundo cinzento padrão do botão */
      background: transparent !important;
      border: none !important;
      outline: none !important;
      padding: 0 !important;
      cursor: pointer !important;

      /* 2. Tamanho grande e centralização absoluta */
      width: 85px !important;
      /* Aumentado ligeiramente para acomodar a espessura maior */
      height: 85px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;

      /* 3. Tamanho do Coração */
      font-size: 4.5rem !important;

      /* 4. O SEGREDO DA ESPESSURA LARGA + BRILHO:
       - Linhas 1 a 7: Empilham a cor até 7px para tornar a espessura muito mais larga.
       - Linha 8: Aplica a sombra preta para dar o contraste escuro tridimensional.
       - Linha 9: Cria o BRILHO (glow) expandido usando a própria cor do coração (currentColor).
       - Linha 10: Sombra projetada suave no chão do mapa. */
      text-shadow:
          0 1px 0 var(--cream),
          0 2px 0 var(--cream),
          0 3px 0 var(--cream),
          0 4px 0 var(--cream),
          0 5px 0 var(--cream),
          0 6px 0 var(--cream),
          0 7px 0 var(--cream),
          /* Espessura expandida até 7px (mais larga) */
          0 7px 0 rgba(22, 22, 22, 0.2),
          /* Escurece a base da espessura */
          0 0 15px currentColor,
          /* BRILHO iluminado com a cor do nível */
          0 12px 14px rgba(0, 0, 0, 0.2) !important;
      /* Sombra projetada distante */

      /* 5. Posicionamento para o efeito mecânico do clique */
      position: relative !important;
      top: 0 !important;
      transition: transform 0.1s ease, text-shadow 0.1s ease, top 0.1s ease !important;
  }

  /* Efeito ao passar o rato (Aumenta ligeiramente e intensifica o brilho) */
  .licao-btn:hover {
      transform: scale(1.05) !important;
  }

  /* Efeito de CLIQUE (O botão afunda fisicamente na proporção da nova espessura) */
  .licao-btn:active {
      top: 6px !important;
      /* Desce quase na totalidade da espessura larga */
      text-shadow:
          0 1px 0 currentColor,
          0 1px 0 rgba(0, 0, 0, 0.42),
          0 0 20px currentColor,
          /* Mantém o brilho ao carregar */
          0 2px 4px rgba(0, 0, 0, 0.25) !important;
  }

  .licao-btn::after {
      content: attr(data-num);
      position: absolute;
      top: 52%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-size: .88rem;
      color: #fff;
      font-family: sans-serif;
      font-weight: 800;
      text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  }

  .licao-btn.bloqueada {
      pointer-events: none;
      opacity: .38;
      filter: grayscale(1) brightness(.7);
  }

  .licao-btn.bloqueada::after {
      content: "🔒";
      font-size: .9rem;
  }

  .licao-btn.concluida {
      opacity: .82;
      cursor: pointer;
  }

  .licao-btn.concluida:hover {
      transform: scale(1.06);
      opacity: 1;
  }

  .licao-btn.disponivel {
      cursor: pointer;
      filter: drop-shadow(0 0 10px rgba(255, 255, 255, .15));
      animation: pulsarLicao 1.8s ease-in-out infinite;
  }

  .licao-btn.disponivel::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 72px;
      height: 72px;
      background: currentColor;
      border-radius: 50%;
      transform: translate(-50%, -50%);
      z-index: -1;
      opacity: .22;
      animation: auraLicao 2.2s ease-out infinite;
  }

  @keyframes pulsarLicao {

      0%,
      100% {
          transform: scale(1);
      }

      50% {
          transform: scale(1.1);
      }
  }

  @keyframes auraLicao {
      0% {
          transform: translate(-50%, -50%) scale(.7);
          opacity: .4;
      }

      100% {
          transform: translate(-50%, -50%) scale(2);
          opacity: 0;
      }
  }

  #nivel-1 .licao-btn.disponivel,
  #nivel-1 .licao-btn.concluida {
      color: var(--nivel1-viva);
  }

  #nivel-2 .licao-btn.disponivel,
  #nivel-2 .licao-btn.concluida {
      color: var(--nivel2-viva);
  }

  #nivel-3 .licao-btn.disponivel,
  #nivel-3 .licao-btn.concluida {
      color: var(--nivel3-viva);
  }

  #nivel-4 .licao-btn.disponivel,
  #nivel-4 .licao-btn.concluida {
      color: var(--nivel4-viva);
  }

  #nivel-5 .licao-btn.disponivel,
  #nivel-5 .licao-btn.concluida {
      color: var(--nivel5-viva);
  }

  #nivel-6 .licao-btn.disponivel,
  #nivel-6 .licao-btn.concluida {
      color: var(--nivel6-viva);
  }

  #nivel-7 .licao-btn.disponivel,
  #nivel-7 .licao-btn.concluida {
      color: var(--nivel7-viva);
  }

  #nivel-8 .licao-btn.disponivel,
  #nivel-8 .licao-btn.concluida {
      color: var(--nivel8-viva);
  }

  .licao-label {
      font-size: .7rem;
      font-family: sans-serif;
      color: var(--muted);
      margin-top: 6px;
      text-align: center;
      max-width: 100px;
  }

  .licao-wrap:nth-child(odd) {
      transform: translateX(-52px);
  }

  .licao-wrap:nth-child(even) {
      transform: translateX(52px);
  }

  /* ── IMAGENS FLUTUANTES DECORATIVAS AO LONGO DO CAMINHO ── */
  .licao-decor {
      position: absolute;
      width: 72px;
      height: 72px;
      object-fit: contain;
      pointer-events: none;
      z-index: 0;
      opacity: .92;
      filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .3));
      animation: flutuarDecor 4.5s ease-in-out infinite;
  }

  @keyframes flutuarDecor {

      0%,
      100% {
          transform: translateY(0) rotate(-5deg);
      }

      50% {
          transform: translateY(-12px) rotate(6deg);
      }
  }

  .licao-decor.decor-left {
      left: -80px;
  }

  .licao-decor.decor-right {
      right: -80px;
  }

  .licao-decor.decor-top {
      top: -12px;
  }

  .licao-decor.decor-mid {
      top: 26px;
  }

  .licao-decor.decor-bottom {
      top: 62px;
  }

  .nivel-trancado .licao-decor {
      filter: grayscale(1) brightness(.75) drop-shadow(0 3px 8px rgba(0, 0, 0, .3));
      opacity: .5;
  }

  @media (max-width: 480px) {
      .licao-btn {
          font-size: 3.6rem;
      }

      .licao-wrap:nth-child(odd) {
          transform: translateX(-34px);
      }

      .licao-wrap:nth-child(even) {
          transform: translateX(34px);
      }

      .licao-decor {
          width: 50px;
          height: 50px;
      }

      .licao-decor.decor-left {
          left: -48px;
      }

      .licao-decor.decor-right {
          right: -48px;
      }
  }

  .nivel-completo-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(255, 255, 255, .16);
      padding: 5px 14px;
      border-radius: 20px;
      font-size: .72rem;
      font-family: sans-serif;
      font-weight: 700;
      margin-top: 4px;
  }

  /* ══════════════════════════════════════════════════════════
           EXERCÍCIOS — REDESIGN HARMONIOSO
           bege · dourado · violeta
           ══════════════════════════════════════════════════════════ */

  /* Cartão base de exercício */
  .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 22px;
      padding: 28px 22px 24px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
      width: 100%;
      max-width: 480px;
      margin: 0 auto;
      box-shadow: 0 8px 32px rgba(0, 0, 0, .35),
          inset 0 1px 0 rgba(212, 175, 55, .12);
  }

  /* Eyebrow label (tipo de exercício) */
  .eyebrow {
      font-size: .7rem;
      font-family: sans-serif;
      font-weight: 700;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: var(--gold);
      margin: 0;
      background: rgba(212, 175, 55, .1);
      border: 1px solid rgba(212, 175, 55, .2);
      padding: 4px 14px;
      border-radius: 30px;
      align-self: center;
  }

  /* Título de exercício */
  .ex-title {
      font-family: 'Luz Texto', serif;
      font-size: 1.22rem;
      color: var(--cream);
      text-align: center;
      line-height: 1.45;
      margin: 4px 0 0;
  }

  .ex-title em {
      display: block;
      color: var(--gold-light);
      font-style: normal;
      margin-top: 2px;
  }

  /* Caixa de montagem */
  .assembly-box {
      min-height: 58px;
      width: 100%;
      border: 1.5px dashed rgba(212, 175, 55, .35);
      border-radius: 14px;
      background: rgba(212, 175, 55, .05);
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      padding: 12px 14px;
  }

  .hint {
      font-size: .8rem;
      color: var(--muted);
      font-family: sans-serif;
      font-style: italic;
  }

  /* Chips de emoção selecionados */
  .chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 6px 11px;
      border-radius: 30px;
      border: 1.5px solid;
      font-size: .8rem;
      font-family: sans-serif;
      font-weight: 600;
      cursor: pointer;
      transition: opacity .15s;
  }

  /* Peças clicáveis */
  .piece-list {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
      width: 100%;
      margin-top: 2px;
  }

  .piece-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 9px 14px;
      border-radius: 30px;
      border: 1.5px solid rgba(155, 114, 207, .30);
      background: rgba(155, 114, 207, .08);
      color: var(--cream2);
      font-size: .82rem;
      font-family: sans-serif;
      font-weight: 500;
      cursor: pointer;
      transition: background .15s, border-color .15s, transform .12s;
  }

  .piece-btn:hover {
      background: rgba(155, 114, 207, .18);
      border-color: rgba(155, 114, 207, .55);
      transform: translateY(-1px);
  }

  .piece-type-icon {
      font-size: .9rem;
      opacity: .75;
  }

  .piece-txt {
      font-size: .82rem;
  }

  .counter {
      font-size: .76rem;
      color: var(--muted);
      font-family: sans-serif;
      margin: 0;
      align-self: flex-end;
  }

  /* Espelho partido */
  .current-card {
      background: var(--surface2);
      border: 1.5px solid var(--border);
      border-radius: 16px;
      padding: 20px 18px;
      width: 100%;
      text-align: center;
      box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
  }

  .current-txt {
      font-size: 1.05rem;
      font-family: 'Luz Texto', serif;
      color: var(--cream);
      line-height: 1.5;
      margin: 10px 0 16px;
      font-style: italic;
  }

  .mirror-row {
      display: flex;
      gap: 10px;
      width: 100%;
  }

  .mini-panel {
      flex: 1;
      border-radius: 14px;
      padding: 12px 10px;
      border: 1px solid;
  }

  .mini-panel-label {
      font-size: .68rem;
      font-family: sans-serif;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
      margin: 0 0 8px;
  }

  .mini-item {
      font-size: .75rem;
      color: var(--cream2);
      font-family: sans-serif;
      padding: 5px 8px;
      border-radius: 8px;
      border: 1px solid;
      margin-bottom: 5px;
      line-height: 1.4;
  }

  .mini-empty {
      font-size: .72rem;
      color: var(--muted);
      font-style: italic;
      font-family: sans-serif;
      margin: 0;
  }

  .btn-red,
  .btn-green {
      flex: 1;
      padding: 10px 8px;
      border-radius: 12px;
      border: none;
      font-size: .85rem;
      font-family: sans-serif;
      font-weight: 700;
      cursor: pointer;
      transition: transform .15s, opacity .15s;
  }

  .btn-red {
      background: rgba(224, 112, 112, .15);
      color: #e07070;
      border: 1.5px solid rgba(224, 112, 112, .35);
  }

  .btn-green {
      background: rgba(94, 201, 122, .12);
      color: #5ec97a;
      border: 1.5px solid rgba(94, 201, 122, .30);
  }

  .btn-red:hover {
      background: rgba(224, 112, 112, .28);
      transform: scale(1.03);
  }

  .btn-green:hover {
      background: rgba(94, 201, 122, .24);
      transform: scale(1.03);
  }

  /* Palavras que Curam */
  .neg-box {
      background: rgba(224, 112, 112, .07);
      border: 1.5px solid rgba(224, 112, 112, .25);
      border-radius: 14px;
      padding: 14px 16px;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      justify-content: center;
      width: 100%;
  }

  .neg-word {
      font-size: .85rem;
      color: #e07070;
      font-family: sans-serif;
      background: rgba(224, 112, 112, .1);
      padding: 4px 10px;
      border-radius: 20px;
  }

  .built-area {
      min-height: 52px;
      width: 100%;
      border: 1.5px dashed rgba(94, 201, 122, .35);
      background: rgba(94, 201, 122, .05);
      border-radius: 14px;
      padding: 12px 14px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      transition: border-color .25s;
  }

  .built-word {
      padding: 7px 13px;
      border-radius: 30px;
      background: rgba(94, 201, 122, .14);
      border: 1.5px solid rgba(94, 201, 122, .35);
      color: #6ed4a0;
      font-size: .82rem;
      font-family: sans-serif;
      font-weight: 600;
      cursor: pointer;
      transition: background .15s;
  }

  .built-word:hover {
      background: rgba(94, 201, 122, .26);
  }

  .pool-wrap {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
      width: 100%;
  }

  .pool-word {
      padding: 8px 14px;
      border-radius: 30px;
      background: var(--surface2);
      border: 1.5px solid var(--border);
      color: var(--cream2);
      font-size: .82rem;
      font-family: sans-serif;
      font-weight: 500;
      cursor: pointer;
      transition: background .15s, border-color .15s, transform .12s;
  }

  .pool-word:hover {
      background: rgba(212, 175, 55, .12);
      border-color: rgba(212, 175, 55, .4);
      transform: translateY(-1px);
  }

  /* Quiz / Opções */
  .option-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 100%;
  }

  .option-btn {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 13px 16px;
      border-radius: 14px;
      background: var(--surface2);
      border: 1.5px solid var(--border);
      color: var(--cream2);
      font-size: .88rem;
      font-family: sans-serif;
      font-weight: 500;
      cursor: pointer;
      transition: background .15s, border-color .15s, transform .12s;
      text-align: left;
  }

  .option-btn:not([disabled]):hover {
      background: rgba(212, 175, 55, .1);
      border-color: rgba(212, 175, 55, .4);
      transform: translateX(3px);
  }

  .option-letter {
      min-width: 28px;
      height: 28px;
      border-radius: 50%;
      background: rgba(212, 175, 55, .15);
      border: 1.5px solid rgba(212, 175, 55, .3);
      color: var(--gold);
      font-size: .78rem;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
  }

  .option-txt {
      flex: 1;
  }

  .explanation-box {
      background: var(--violet-bg);
      border: 1px solid var(--violet-br);
      border-radius: 14px;
      padding: 16px 18px;
      width: 100%;
  }

  .explanation-txt {
      font-size: .85rem;
      font-family: sans-serif;
      color: var(--cream2);
      line-height: 1.6;
      margin: 0;
  }

  /* Oráculo */
  .oracle-card {
      background: linear-gradient(145deg, var(--surface2), rgba(155, 114, 207, .15));
      border: 1.5px solid var(--violet-br);
      border-radius: 20px;
      padding: 28px 22px;
      text-align: center;
      width: 100%;
      box-shadow: 0 6px 24px rgba(0, 0, 0, .3),
          inset 0 1px 0 rgba(155, 114, 207, .2);
  }

  .oracle-msg {
      font-family: 'Luz Texto', serif;
      font-size: 1rem;
      color: var(--cream);
      line-height: 1.7;
      font-style: italic;
      margin: 12px 0 0;
  }

  /* Resultado / banner */
  .result-banner {
      background: linear-gradient(145deg, var(--surface2), rgba(212, 175, 55, .08));
      border: 1.5px solid rgba(212, 175, 55, .25);
      border-radius: 18px;
      padding: 22px 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      margin-top: 14px;
      width: 100%;
      box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
      animation: slideUp .35s ease;
  }

  @keyframes slideUp {
      from {
          opacity: 0;
          transform: translateY(16px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  .result-banner p {
      font-size: .88rem;
      color: var(--cream2);
      font-family: sans-serif;
      line-height: 1.5;
      text-align: center;
      margin: 0;
  }

  /* Transição entre exercícios */
  .next-badge {
      display: flex;
      align-items: center;
      gap: 12px;
      background: var(--surface2);
      border: 1.5px solid var(--border);
      border-radius: 14px;
      padding: 14px 20px;
      width: 100%;
  }

  .next-label {
      font-size: .92rem;
      font-family: sans-serif;
      font-weight: 600;
      color: var(--cream);
  }

  /* Títulos dos cartões de transição/resultado */
  .screen-title {
      font-family: 'Luz Texto', serif;
      font-size: 1.4rem;
      color: var(--cream);
      text-align: center;
      margin: 0;
  }

  .screen-body {
      font-size: .9rem;
      color: var(--cream2);
      font-family: sans-serif;
      text-align: center;
      line-height: 1.6;
      margin: 0;
  }

  .label-sm {
      font-size: .78rem;
      color: var(--muted);
      font-family: sans-serif;
      margin: 0;
      align-self: flex-start;
  }

  /* XP circle */
  .xp-circle {
      width: 100px;
      height: 100px;
      border-radius: 50%;
      border: 2.5px solid rgba(212, 175, 55, .4);
      background: radial-gradient(circle, rgba(212, 175, 55, .12), transparent);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
  }

  .xp-big {
      font-size: 1.8rem;
      font-family: 'Luz Texto', serif;
      color: var(--gold-light);
      line-height: 1;
  }

  .xp-sub {
      font-size: .65rem;
      font-family: sans-serif;
      color: var(--muted);
      letter-spacing: .06em;
      text-transform: uppercase;
  }

  .big-emoji {
      font-size: 3rem;
      line-height: 1;
  }

  /* Botões principais */
  .btn-primary {
      width: 100%;
      padding: 13px 20px;
      border-radius: 14px;
      border: none;
      background: linear-gradient(135deg, #c9952a, #a67520);
      color: #fff;
      font-size: .92rem;
      font-family: sans-serif;
      font-weight: 700;
      cursor: pointer;
      letter-spacing: .03em;
      box-shadow: 0 4px 14px rgba(201, 149, 42, .35);
      transition: transform .15s, box-shadow .15s;
  }

  .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(201, 149, 42, .5);
  }

  .btn-primary:active {
      transform: translateY(0);
  }

  .btn-ghost {
      width: 100%;
      padding: 11px 20px;
      border-radius: 14px;
      background: transparent;
      border: 1.5px solid var(--border);
      color: var(--cream2);
      font-size: .88rem;
      font-family: sans-serif;
      font-weight: 600;
      cursor: pointer;
      transition: background .15s, border-color .15s;
  }

  .btn-ghost:hover {
      background: rgba(212, 175, 55, .08);
      border-color: rgba(212, 175, 55, .4);
  }

  .btn-exit {
      background: none;
      border: none;
      color: var(--muted);
      font-size: .78rem;
      font-family: sans-serif;
      cursor: pointer;
      padding: 4px 0;
      letter-spacing: .04em;
      transition: color .15s;
  }

  .btn-exit:hover {
      color: #e07070;
  }

  .btn-row {
      display: flex;
      gap: 10px;
      width: 100%;
  }

  .btn-row .btn-primary {
      flex: 1;
  }

  .btn-row .btn-ghost {
      flex: 1;
  }

  /* Shake animation */
  @keyframes shake {

      0%,
      100% {
          transform: translateX(0);
      }

      25% {
          transform: translateX(-6px);
      }

      75% {
          transform: translateX(6px);
      }
  }

  /* ══════════════════════════════════════════════════════════
           BARRA FLUTUANTE INFERIOR — Vidas / Pontuação / Progresso
           (inspirada na controls-game-floating da Poção Mágica)
           ══════════════════════════════════════════════════════════ */
  #topbar {
      position: fixed !important;
      left: 50%;
      bottom: 0px;
      transform: translateX(-50%);
      width: calc(100% - 28px);
      max-width: 440px;
      z-index: 999;
      background: rgba(18, 13, 30, 0.88);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid var(--border);
      border-radius: 26px;
      padding: 10px 16px 12px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
  }

  .top-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 8px;
  }

  .top-meta .app-name {
      font-size: .68rem;
      font-family: sans-serif;
      font-weight: 700;
      color: var(--cream2);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 90px;
  }

  .topbar-back-btn {
      flex-shrink: 0;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: rgba(255, 255, 255, .06);
      border: 1px solid var(--border);
      color: var(--cream);
      font-size: .85rem;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background .15s, transform .15s;
      padding: 0;
  }

  .topbar-back-btn:active {
      transform: scale(.9);
      background: rgba(212, 175, 55, .2);
  }

  .lives {
      display: flex;
      align-items: center;
      gap: 3px;
  }

  .xp-badge {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: .72rem;
      font-weight: 800;
      font-family: sans-serif;
      color: var(--gold-light);
      background: rgba(212, 175, 55, .12);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 4px 10px;
      white-space: nowrap;
  }

  .seg-row {
      display: flex;
      gap: 4px;
      margin-bottom: 7px;
  }

  .seg {
      flex: 1;
      height: 6px;
      border-radius: 4px;
      background: rgba(255, 255, 255, .08);
      overflow: hidden;
  }

  .seg-fill {
      height: 100%;
      border-radius: 4px;
      background: linear-gradient(90deg, var(--gold), var(--gold-light));
      transition: width .35s ease, opacity .35s ease;
  }

  .step-icons {
      display: flex;
      justify-content: space-between;
      font-size: .92rem;
      line-height: 1;
  }

  /* Empurra o conteúdo do exercício para cima da barra flutuante */
  #screen {
      padding-bottom: 96px;
  }

  @media (max-width: 380px) {
      #topbar {
          padding: 8px 12px 10px;
          border-radius: 22px;
      }

      .top-meta .app-name {
          display: none;
      }

      .topbar-back-btn {
          width: 24px;
          height: 24px;
      }
  }

  /* ══════════════════════════════════════════════════════════
           BARRA DE PROGRESSO FLUTUANTE — no topo, logo abaixo do
           header (mesmo padrão do "spread tracker" dos 7 Véus:
           position sticky presa a var(--header-h)).
           ══════════════════════════════════════════════════════════ */
  #progress-float {
      position: sticky;
      top: var(--header-h, 74px);
      z-index: 38;
      width: calc(100% - 28px);
      max-width: 440px;
      margin: 0 auto 14px;
      background: rgba(18, 13, 30, 0.88);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 10px 16px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  }

  #progress-float .seg-row {
      margin-bottom: 7px;
  }

  #progress-float .step-icons {
      margin-bottom: 0;
  }

  @media (max-width: 380px) {
      #progress-float {
          padding: 8px 12px;
          border-radius: 16px;
      }
  }

  /* ══════════════════════════════════════════════════════════
           MASCOTE — imagem/emoji fixo em cima de cada pergunta.
           Troca o emoji em mascotHtml() (JS) por uma imagem própria
           quando quiseres (ex: <img src="..."> dentro do mesmo círculo).
           ══════════════════════════════════════════════════════════ */
  .mascot-static {
      width: 64px;
      height: 64px;
      margin: 4px auto 12px;
      border-radius: 50%;
      background: radial-gradient(circle at 32% 28%, var(--violet2), var(--surface2) 75%);
      border: 2px solid var(--gold);
      box-shadow: 0 8px 18px rgba(0, 0, 0, .4), 0 0 0 4px rgba(233, 196, 106, .1);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.8rem;
      overflow: hidden;
      animation: float 2.6s ease-in-out infinite;
  }

  .mascot-static img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
  }

  /* ══════════════════════════════════════════════════════════
           GAVETA DE RESPOSTA — desliza de baixo para cima, por
           cima da barra de ferramentas, com a mesma mascote a
           reagir (certo/errado), em vez de aparecer no corpo
           da página.
           ══════════════════════════════════════════════════════════ */
  #answer-drawer {
      position: fixed;
      left: 50%;
      bottom: 0;
      width: 100%;
      max-width: 620px;
      transform: translate(-50%, 100%);
      background: linear-gradient(180deg, var(--surface2), var(--bg-deep));
      border: 1px solid var(--border);
      border-bottom: none;
      border-radius: 22px 22px 0 0;
      box-shadow: 0 -14px 34px rgba(0, 0, 0, .5);
      padding: 14px 20px calc(20px + env(safe-area-inset-bottom, 0px));
      z-index: 1000;
      transition: transform .38s cubic-bezier(.32, .72, .33, 1);
      pointer-events: none;
      max-height: 60vh;
      overflow-y: auto;
      text-align: center;
  }

  #answer-drawer.open {
      transform: translate(-50%, 0);
      pointer-events: auto;
  }

  #answer-drawer::before {
      content: "";
      display: block;
      width: 42px;
      height: 4px;
      margin: 0 auto 12px;
      border-radius: 999px;
      background: rgba(233, 196, 106, .4);
  }

  #answer-drawer.correct {
      background: linear-gradient(180deg, #2f6b45, #16321f);
      border-color: var(--correct-br);
  }

  #answer-drawer.wrong {
      background: linear-gradient(180deg, #7a3434, #341515);
      border-color: var(--wrong-br);
  }

  .drawer-mascot {
      width: 72px;
      height: 72px;
      margin: -4px auto 10px;
      border-radius: 50%;
      background: radial-gradient(circle at 32% 28%, var(--violet2), var(--surface2) 75%);
      border: 2px solid var(--gold);
      box-shadow: 0 10px 22px rgba(0, 0, 0, .45), 0 0 0 5px rgba(233, 196, 106, .1);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2rem;
      overflow: hidden;
      animation: float 2.6s ease-in-out infinite;
  }

  #answer-drawer.correct .drawer-mascot {
      border-color: var(--correct-br);
  }

  #answer-drawer.wrong .drawer-mascot {
      border-color: var(--wrong-br);
  }

  .drawer-mascot .mascot-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
  }

  .drawer-mascot .mascot-emoji {
      line-height: 1;
  }

  .drawer-msg {
      font-size: 15px;
      color: #e8d5b5;
      font-weight: bold;
      font-family: sans-serif;
      margin: 0 0 6px;
  }

  .drawer-reflection {
      font-size: 14px;
      color: #e8d5b5;
      font-family: sans-serif;
      line-height: 1.5;
      margin: 0 0 4px;
  }

  #answer-drawer .btn-primary {
      width: 100%;
      margin-top: 12px;
  }

  @media (max-width: 380px) {
      .drawer-mascot {
          width: 60px;
          height: 60px;
          font-size: 1.7rem;
      }
  }