/* ==========================================================================
   🥋 KOTOBA DOJO STYLESHEET
   Tactile Japanese micro-learning UI (Duolingo-inspired with Dojo Belt Path)
   ========================================================================== */

.dojo-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  min-height: 480px;
}

/* --- Top Header (In Lesson & Map) --- */
.dojo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line, #e0d8cc);
}

.dojo-progress-bar-wrap {
  flex: 1;
  height: 16px;
  background: var(--bg-soft, #ede6db);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
}

.dojo-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #55b783, #2e7d32);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(85, 183, 131, 0.4);
}

.dojo-hearts-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  color: #d32f2f;
  background: #ffebee;
  border: 2px solid #ffcdd2;
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.dojo-hearts-btn:hover {
  background: #ffcdd2;
  transform: scale(1.05);
}
.dojo-hearts-btn.empty {
  animation: dojoHeartPulse 1.2s infinite;
  background: #ffcdd2;
  border-color: #e53935;
}
.dojo-heart-add {
  background: #d32f2f;
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.dojo-xp-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 800;
  color: #f57f17;
  background: #fff9c4;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #fbc02d;
}

.dojo-exit-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted, #7c7267);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
}
.dojo-exit-btn:hover {
  background: rgba(0,0,0,0.06);
  color: var(--fg, #2c251e);
}

/* --- Map View (Belt Path) --- */
.dojo-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 20px 10px 40px;
}

.dojo-map-header {
  text-align: center;
  margin-bottom: 8px;
}
.dojo-map-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--fg, #2c251e);
  margin-bottom: 4px;
}
.dojo-map-subtitle {
  font-size: 14px;
  color: var(--muted, #7c7267);
}

.dojo-belt-section {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border: 2px solid var(--line, #e0d8cc);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.06);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.dojo-belt-section:hover {
  box-shadow: 0 6px 0 rgba(0,0,0,0.08);
}

.dojo-belt-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line, #e0d8cc);
}
.dojo-belt-tag {
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dojo-belt-info {
  flex: 1;
}
.dojo-belt-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--fg, #2c251e);
}
.dojo-belt-desc {
  font-size: 12px;
  color: var(--muted, #7c7267);
  margin-top: 2px;
}

.dojo-nodes-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.dojo-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: none;
}
.dojo-node-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: #fff;
  border: 4px solid var(--node-color, #9e9e9e);
  box-shadow: 0 5px 0 var(--node-shadow, #757575);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.dojo-node:hover:not(:disabled) .dojo-node-circle {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--node-shadow, #757575);
}
.dojo-node:active:not(:disabled) .dojo-node-circle {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--node-shadow, #757575);
}
.dojo-node:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.8);
}
.dojo-node-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg, #2c251e);
  max-width: 90px;
  text-align: center;
}
.dojo-node-stars {
  font-size: 11px;
  color: #fbc02d;
  letter-spacing: 1px;
}

/* --- Arena Esercizio --- */
.dojo-arena {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px 0;
}

.dojo-question-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dojo-instruction {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted, #7c7267);
}
.dojo-prompt-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dojo-prompt-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--fg, #2c251e);
  line-height: 1.4;
}
.dojo-audio-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--line, #e0d8cc);
  background: #fff;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--line, #e0d8cc);
  transition: all 0.15s;
}
.dojo-audio-btn:hover {
  transform: translateY(-1px);
  border-color: #55b783;
}
.dojo-audio-btn:active {
  transform: translateY(2px);
  box-shadow: 0 0 0;
}

/* --- Word Bank Area --- */
.dojo-slots-area {
  min-height: 72px;
  border-bottom: 2px solid var(--line, #e0d8cc);
  padding: 8px 4px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.dojo-slots-empty-hint {
  font-size: 14px;
  color: var(--muted, #a89f91);
  font-style: italic;
  user-select: none;
}

.dojo-bank-area {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 16px 0;
  min-height: 100px;
}

/* --- Tiles (Tasselli 3D) --- */
.dojo-tile {
  background: #fff;
  border: 2px solid var(--line, #e0d8cc);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 17px;
  font-weight: 700;
  color: var(--fg, #2c251e);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--line, #e0d8cc);
  transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dojo-tile:hover {
  transform: translateY(-2px);
  border-color: #bcaaa4;
  box-shadow: 0 6px 0 var(--line, #e0d8cc);
}
.dojo-tile:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--line, #e0d8cc);
}

/* Particelle separate con stile distintivo */
.dojo-tile.particle {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #1b5e20;
  box-shadow: 0 4px 0 #81c784;
}
.dojo-tile.particle:hover {
  border-color: #66bb6a;
  box-shadow: 0 6px 0 #81c784;
}

.dojo-tile.used-placeholder {
  visibility: hidden;
  pointer-events: none;
}

/* --- Match Pairs Grid --- */
.dojo-pairs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 10px 0;
}
.dojo-pair-card {
  background: #fff;
  border: 2px solid var(--line, #e0d8cc);
  border-radius: 14px;
  padding: 16px 12px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--line, #e0d8cc);
  transition: all 0.12s;
  user-select: none;
}
.dojo-pair-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--line, #e0d8cc);
}
.dojo-pair-card.selected {
  border-color: #2196f3;
  background: #e3f2fd;
  color: #0d47a1;
  box-shadow: 0 4px 0 #90caf9;
}
.dojo-pair-card.matched {
  border-color: #4caf50;
  background: #e8f5e9;
  color: #1b5e20;
  box-shadow: 0 4px 0 #81c784;
  opacity: 0.35;
  pointer-events: none;
  transform: scale(0.96);
}
.dojo-pair-card.wrong {
  border-color: #f44336;
  background: #ffebee;
  color: #b71c1c;
  animation: dojoShake 0.4s ease;
}

/* --- Choice / Cloze Buttons --- */
.dojo-options-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0;
}
.dojo-choice-btn {
  background: #fff;
  border: 2px solid var(--line, #e0d8cc);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--line, #e0d8cc);
  transition: all 0.12s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dojo-choice-btn:hover {
  border-color: #bcaaa4;
  transform: translateY(-1px);
}
.dojo-choice-btn.selected {
  border-color: #55b783;
  background: #e8f5e9;
  box-shadow: 0 4px 0 #a5d6a7;
}

/* --- Footer & Check Action --- */
.dojo-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid var(--line, #e0d8cc);
  display: flex;
  justify-content: flex-end;
}
.dojo-check-btn {
  background: #55b783;
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 #2e7d32;
  transition: all 0.15s;
  letter-spacing: 0.5px;
}
.dojo-check-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #2e7d32;
  background: #4bae77;
}
.dojo-check-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #2e7d32;
}
.dojo-check-btn:disabled {
  background: #e0d8cc;
  box-shadow: 0 4px 0 #bdbdbd;
  color: #9e9e9e;
  cursor: not-allowed;
}

/* --- Feedback Drawer (Success / Error) --- */
.dojo-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 20px 20px 0 0;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.12);
  animation: dojoSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}
.dojo-drawer.success {
  background: #e8f5e9;
  border-top: 3px solid #4caf50;
}
.dojo-drawer.error {
  background: #ffebee;
  border-top: 3px solid #f44336;
}
.dojo-drawer-text {
  flex: 1;
}
.dojo-drawer-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 4px;
}
.dojo-drawer.success .dojo-drawer-title {
  color: #2e7d32;
}
.dojo-drawer.error .dojo-drawer-title {
  color: #c62828;
}
.dojo-drawer-tip {
  font-size: 13px;
  color: var(--fg, #2c251e);
  line-height: 1.4;
}
.dojo-drawer-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.dojo-drawer.success .dojo-drawer-btn {
  background: #4caf50;
  color: #fff;
  box-shadow: 0 4px 0 #2e7d32;
}
.dojo-drawer.error .dojo-drawer-btn {
  background: #f44336;
  color: #fff;
  box-shadow: 0 4px 0 #b71c1c;
}

/* --- Victory Modal --- */
.dojo-victory {
  text-align: center;
  padding: 30px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: dojoFadeIn 0.3s ease;
}
.dojo-victory-badge {
  font-size: 64px;
  animation: dojoBounce 1s infinite alternate;
}
.dojo-victory-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--fg, #2c251e);
}
.dojo-victory-stats {
  display: flex;
  gap: 16px;
  margin: 12px 0;
}
.dojo-stat-box {
  background: #fff;
  border: 2px solid var(--line, #e0d8cc);
  border-radius: 16px;
  padding: 12px 20px;
  box-shadow: 0 3px 0 var(--line, #e0d8cc);
}
.dojo-stat-num {
  font-size: 22px;
  font-weight: 900;
  color: #55b783;
}
.dojo-stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #7c7267);
}

/* --- Animations --- */
@keyframes dojoSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes dojoFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes dojoBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}
@keyframes dojoShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@keyframes dojoHeartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes dojoHeartShake {
  0%, 100% { transform: scale(1) rotate(0deg); }
  20%, 60% { transform: scale(1.15) rotate(-10deg); }
  40%, 80% { transform: scale(1.15) rotate(10deg); }
}

/* --- Practice Banner on Map --- */
.dojo-practice-banner {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border: 2px solid #ffb74d;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 0 #f57c00;
  margin-bottom: 8px;
}
.dojo-practice-icon {
  font-size: 32px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.dojo-practice-info {
  flex: 1;
}
.dojo-practice-title {
  font-size: 15px;
  font-weight: 800;
  color: #e65100;
  margin-bottom: 2px;
}
.dojo-practice-sub {
  font-size: 12px;
  color: #6d4c41;
  line-height: 1.35;
}
.dojo-practice-btn {
  background: #ff9800;
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 12px;
  box-shadow: 0 3px 0 #e65100;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.dojo-practice-btn:hover {
  background: #fb8c00;
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #e65100;
}
.dojo-practice-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #e65100;
}

/* --- Out of Hearts Screen --- */
.dojo-out-of-hearts {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 40px 20px;
  max-width: 440px;
  margin: 0 auto;
}
.dojo-out-of-hearts-icon {
  font-size: 64px;
  animation: dojoHeartShake 0.6s ease-in-out;
}
.dojo-out-of-hearts-title {
  font-size: 24px;
  font-weight: 900;
  color: #c62828;
}
.dojo-out-of-hearts-msg {
  font-size: 15px;
  color: var(--muted, #7c7267);
  line-height: 1.5;
}

/* --- Drawer Audio Pronunciation Button --- */
.dojo-drawer-audio-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  margin-left: 6px;
  vertical-align: middle;
  padding: 2px 6px;
  border-radius: 6px;
  transition: transform 0.15s;
}
.dojo-drawer-audio-btn:hover {
  transform: scale(1.2);
}

/* --- Belt Grammar Guide Button & Modal --- */
.dojo-grammar-btn {
  background: var(--card-bg, #fff);
  border: 1.5px solid var(--line, #d8d0c5);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--fg, #2c251e);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 0 var(--line, #d8d0c5);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.dojo-grammar-btn:hover {
  background: #fbf9f4;
  border-color: var(--green, #2e7d32);
  color: var(--green, #2e7d32);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--green, #2e7d32);
}
.dojo-grammar-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--line, #d8d0c5);
}

.dojo-grammar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: dojoFadeIn 0.2s ease-out;
}
.dojo-grammar-sheet {
  background: var(--card-bg, #fff);
  border: 2px solid var(--line, #e0d8cc);
  border-radius: 20px;
  max-width: 620px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}
.dojo-grammar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line, #e0d8cc);
  position: sticky;
  top: 0;
  background: var(--card-bg, #fff);
  z-index: 2;
}
.dojo-grammar-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dojo-grammar-sheet-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--fg, #2c251e);
}
.dojo-grammar-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted, #7c7267);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.15s;
}
.dojo-grammar-close-btn:hover {
  background: #f0eae1;
  color: var(--fg, #2c251e);
}
.dojo-grammar-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dojo-grammar-summary-card {
  background: #f7f4ee;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg, #2c251e);
}
.dojo-grammar-section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted, #7c7267);
  margin-bottom: 8px;
}
.dojo-grammar-pattern-card {
  background: #fdfcf9;
  border: 1px solid #e8e0d4;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dojo-grammar-formula {
  font-family: monospace;
  font-size: 15px;
  font-weight: 900;
  color: var(--green, #2e7d32);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dojo-grammar-pattern-desc {
  font-size: 13px;
  color: var(--fg, #2c251e);
  line-height: 1.45;
}
.dojo-grammar-example {
  padding: 10px 14px;
  background: #fff;
  border-radius: 10px;
  border-left: 3px solid var(--green, #2e7d32);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.dojo-grammar-ex-ja {
  font-weight: 800;
  font-size: 16px;
  color: var(--fg, #2c251e);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dojo-grammar-ex-sub {
  font-size: 12px;
  color: var(--muted, #7c7267);
  margin-top: 3px;
}
.dojo-grammar-particle-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dojo-grammar-particle-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid #eee5d8;
  border-radius: 10px;
  padding: 10px 14px;
}
.dojo-grammar-particle-tag {
  background: #fff3e0;
  border: 1px solid #ffe082;
  color: #e65100;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 14px;
  min-width: 32px;
  text-align: center;
}
.dojo-grammar-particle-text {
  font-size: 13px;
  color: var(--fg, #2c251e);
  line-height: 1.4;
  flex: 1;
}
.dojo-grammar-mistake-card {
  background: #fff5f5;
  border: 1px solid #ffcdd2;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.45;
  color: #b71c1c;
}

/* --- Spot the Mistake Exercise (Trova l'Errore) --- */
.dojo-spot-sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 14px;
  background: #fbf9f4;
  border: 2px dashed #ded4c5;
  border-radius: 16px;
  margin: 12px 0 6px;
}
.dojo-spot-token {
  background: #fff;
  border: 2px solid var(--line, #d8d0c5);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 19px;
  font-weight: 800;
  color: var(--fg, #2c251e);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--line, #d8d0c5);
  transition: all 0.15s ease;
  user-select: none;
}
.dojo-spot-token:hover {
  background: #fdfbf7;
  transform: translateY(-2px);
  border-color: #ff9800;
  box-shadow: 0 4px 0 #ff9800;
}
.dojo-spot-token.selected {
  border-color: #e65100;
  background: #fff3e0;
  color: #bf360c;
  box-shadow: 0 3px 0 #e65100;
  transform: translateY(1px);
}
.dojo-spot-hint {
  font-size: 12px;
  color: var(--muted, #7c7267);
  text-align: center;
  margin-top: 4px;
}

/* --- Conjugation Drill Exercise (Sfida delle Coniugazioni) --- */
.dojo-conj-card {
  background: linear-gradient(135deg, #f7f4ee, #f0eae1);
  border: 2px solid #ded5c7;
  border-radius: 18px;
  padding: 16px 20px;
  margin: 10px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.dojo-conj-base-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.dojo-conj-base-text {
  font-size: 26px;
  font-weight: 900;
  color: var(--fg, #2c251e);
  letter-spacing: 0.5px;
}
.dojo-conj-meaning {
  font-size: 13px;
  color: var(--muted, #7c7267);
  font-style: italic;
}
.dojo-conj-target-badge {
  background: #e8f5e9;
  border: 1.5px solid #a5d6a7;
  color: #2e7d32;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

/* --- Syllable Spell Exercise (Ricomponi le Sillabe) --- */
.dojo-syllable-meaning-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fdfbf7;
  border: 1.5px solid var(--line, #e0d8cc);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 15px;
  font-weight: 800;
  color: var(--fg, #2c251e);
  margin-top: 4px;
}
.dojo-syllable-slots-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 70px;
  padding: 14px 16px;
  background: #fbf9f4;
  border: 2px dashed #ded4c5;
  border-radius: 18px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.dojo-syllable-slot-empty {
  width: 52px;
  height: 56px;
  border: 2px dashed #c9beae;
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c9beae;
  font-size: 20px;
  font-weight: 700;
}
.dojo-syllable-tile {
  min-width: 52px;
  height: 56px;
  padding: 0 12px;
  background: #fff;
  border: 2px solid var(--line, #d8d0c5);
  border-radius: 14px;
  font-size: 24px;
  font-weight: 900;
  color: var(--fg, #2c251e);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 var(--line, #d8d0c5);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.dojo-syllable-tile:hover {
  background: #fdfbf7;
  transform: translateY(-2px);
  border-color: #43a047;
  box-shadow: 0 4px 0 #2e7d32;
}
.dojo-syllable-tile:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--line, #d8d0c5);
}
.dojo-syllable-tile.in-slot {
  border-color: #43a047;
  color: #1b5e20;
  background: #f1f8e9;
  box-shadow: 0 3px 0 #2e7d32;
}
.dojo-syllable-tile.used-placeholder {
  opacity: 0.25;
  cursor: default;
  transform: none;
  box-shadow: none;
  pointer-events: none;
  background: #eee;
}
.dojo-syllable-bank-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0;
}


