.h5p-espa-milka-image-labels {
  color: #202124;
  font-family: inherit;
}

.h5p-emil-activity {
  box-sizing: border-box;
  max-width: 78rem;
  margin: 0 auto;
  padding: 0.25rem;
}

.h5p-emil-image-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: #f7f8fa;
  border: 1px solid #d5dbe5;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.h5p-emil-image {
  display: block;
  width: 100%;
  height: auto;
}

.h5p-emil-marker-layer {
  position: absolute;
  inset: 0;
}

.h5p-emil-marker {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 2.05rem;
  height: 2.05rem;
  padding: 0 0.5rem;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  z-index: 4;
  background: #0f766e;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.24), 0 0 0 4px rgba(255, 255, 255, 0.28);
  color: #ffffff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: auto;
}

.h5p-emil-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.16rem;
  height: var(--stem-length, 44px);
  transform: translate(-50%, 0.95rem) rotate(var(--stem-angle, 90deg));
  transform-origin: 50% 0;
  background: #2563eb;
  border-radius: 999px;
  pointer-events: none;
}

.h5p-emil-marker:hover,
.h5p-emil-marker:focus {
  background: #0b5f59;
  outline: none;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.25), 0 2px 9px rgba(15, 23, 42, 0.3);
}

.h5p-emil-marker-active {
  background: #1d4ed8;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.24), 0 3px 10px rgba(15, 23, 42, 0.32);
}

.h5p-emil-marker-active::after {
  background: #1d4ed8;
}

.h5p-emil-drop-target {
  outline: 3px solid rgba(47, 128, 237, 0.32);
  outline-offset: 4px;
}

.h5p-emil-drop-target-hover {
  background: #1f6feb;
  transform: translate(-50%, -50%) scale(1.08);
}

.h5p-emil-marker-correct {
  background: #15803d;
}

.h5p-emil-marker-correct::after {
  background: #15803d;
}

.h5p-emil-marker-incorrect {
  background: #c2410c;
}

.h5p-emil-marker-incorrect::after {
  background: #c2410c;
}

.h5p-emil-answer-item {
  position: absolute;
  box-sizing: border-box;
  z-index: 5;
  max-width: calc(100% - 1.5rem);
}

.h5p-emil-answer-drag {
  min-width: 0;
}

.h5p-emil-control-wrap {
  position: relative;
  box-sizing: border-box;
  padding: 0.7rem;
  border: 1px solid rgba(37, 99, 235, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(4px);
}

.h5p-emil-control-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 0.85rem;
  height: 0.85rem;
  transform: translate(-50%, 50%) rotate(45deg);
  border-left: 1px solid rgba(37, 99, 235, 0.34);
  border-top: 1px solid rgba(37, 99, 235, 0.34);
  background: rgba(255, 255, 255, 0.96);
}

.h5p-emil-popover-above .h5p-emil-control-wrap::before {
  top: 100%;
  bottom: auto;
  transform: translate(-50%, -50%) rotate(225deg);
}

.h5p-emil-popover-close {
  position: absolute;
  top: 0.3rem;
  right: 0.35rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.h5p-emil-answer-label {
  display: block;
  margin-bottom: 0.25rem;
  padding-right: 1.6rem;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.h5p-emil-answer-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #aeb8c7;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  max-width: 100%;
}

.h5p-emil-answer-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  outline: none;
}

.h5p-emil-answer-status {
  min-height: 1.35rem;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.h5p-emil-hint {
  margin-bottom: 0.45rem;
  color: #5d6673;
  font-size: 0.925rem;
}

.h5p-emil-is-correct .h5p-emil-control-wrap {
  border-color: #16a34a;
  background: rgba(240, 253, 244, 0.98);
}

.h5p-emil-is-correct .h5p-emil-answer-input {
  border-color: #16a34a;
}

.h5p-emil-is-correct .h5p-emil-answer-status {
  color: #11613d;
}

.h5p-emil-is-incorrect .h5p-emil-control-wrap {
  border-color: #f97316;
  background: rgba(255, 247, 237, 0.98);
}

.h5p-emil-is-incorrect .h5p-emil-answer-input {
  border-color: #f97316;
}

.h5p-emil-is-incorrect .h5p-emil-answer-status {
  color: #a62b24;
}

.h5p-emil-has-solution .h5p-emil-control-wrap {
  border-color: #6b91d8;
  background: #f5f8ff;
}

.h5p-emil-word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0.7rem;
  border: 1px solid #d5dbe5;
  border-radius: 8px;
  background: #f8fafc;
}


.h5p-emil-drag-word {
  min-height: 2.2rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid #94a3b8;
  border-radius: 999px;
  background: #ffffff;
  color: #202124;
  cursor: grab;
  font: inherit;
  font-weight: 700;
}

.h5p-emil-drag-word:active {
  cursor: grabbing;
}

.h5p-emil-drag-word-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.h5p-emil-drop-zone {
  background: #f8fafc;
  cursor: pointer;
}

.h5p-emil-answer-drag .h5p-emil-control-wrap {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.h5p-emil-answer-drag .h5p-emil-control-wrap::before {
  display: none;
}

.h5p-emil-answer-drag .h5p-emil-answer-label,
.h5p-emil-answer-drag .h5p-emil-answer-status,
.h5p-emil-answer-drag .h5p-emil-popover-close {
  display: none;
}

.h5p-emil-answer-drag .h5p-emil-drop-zone {
  width: auto;
  min-width: 2.75rem;
  max-width: 14rem;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border: 1px dashed rgba(37, 99, 235, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5p-emil-drop-target-open .h5p-emil-control-wrap {
  border-color: rgba(47, 128, 237, 0.72);
  background: rgba(237, 244, 255, 0.94);
}

.h5p-emil-drop-zone-filled {
  border-style: solid !important;
  border-color: #2563eb !important;
  background: rgba(239, 246, 255, 0.96) !important;
  color: #1e3a8a;
}

.h5p-emil-answer-drag.h5p-emil-is-correct .h5p-emil-drop-zone-filled {
  border-color: #16a34a !important;
  background: rgba(240, 253, 244, 0.97) !important;
  color: #14532d;
}

.h5p-emil-answer-drag.h5p-emil-is-incorrect .h5p-emil-drop-zone-filled {
  border-color: #f97316 !important;
  background: rgba(255, 247, 237, 0.97) !important;
  color: #9a3412;
}

.h5p-emil-drag-over {
  border-color: #1f6feb;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.22);
}

.h5p-emil-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding: 0.65rem 0 0;
}

.h5p-emil-button {
  min-height: 2.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid #2563eb;
  border-radius: 7px;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.h5p-emil-button:hover,
.h5p-emil-button:focus {
  background: #1d4ed8;
  outline: none;
}

.h5p-emil-button:focus {
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.22);
}

.h5p-emil-retry,
.h5p-emil-solution {
  background: #ffffff;
  color: #1f4f9c;
}

.h5p-emil-retry:hover,
.h5p-emil-retry:focus,
.h5p-emil-solution:hover,
.h5p-emil-solution:focus {
  background: #edf4ff;
}

.h5p-emil-score {
  margin-top: 0.75rem;
  font-weight: 700;
}

.h5p-emil-score-card {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #d5dbe5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.h5p-emil-stars {
  display: flex;
  gap: 0.1rem;
  color: #cbd5e1;
  font-size: 1.35rem;
  line-height: 1;
}

.h5p-emil-star-filled {
  color: #f5b301;
  text-shadow: 0 1px 0 rgba(146, 64, 14, 0.25);
}

.h5p-emil-score-text {
  color: #0f172a;
}

.h5p-emil-error {
  padding: 1rem;
  border: 1px solid #ee8b84;
  border-radius: 6px;
  background: #fff6f5;
  color: #a62b24;
}

@media (max-width: 44rem) {
  .h5p-emil-marker {
    min-width: 1.75rem;
    height: 1.75rem;
    font-size: 0.9rem;
  }

  .h5p-emil-answer-item {
    width: calc(100% - 1.5rem);
  }

  .h5p-emil-answer-label {
    font-size: 0.76rem;
  }

  .h5p-emil-answer-input {
    min-height: 2.1rem;
    font-size: 0.9rem;
  }

  .h5p-emil-controls {
    align-items: stretch;
    flex-direction: column;
  }
}

