.jg-roadmap-card {
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px solid #c9e1e5;
  border-left: 3px solid #2f6f78;
  border-radius: 10px;
  background: #f7fcfd;
  box-shadow: 0 4px 14px rgba(38, 82, 90, 0.08);
}

.jg-roadmap-card-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 7px;
  color: #2f6f78;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.jg-roadmap-card-label .jg-bookmark-icon {
  width: 12px;
  height: 15px;
  fill: #2f6f78;
  stroke: #2f6f78;
}

.jg-roadmap-card-title {
  display: block;
  margin: 0 0 11px;
  color: #262626 !important;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none !important;
}

.jg-roadmap-card-title:hover {
  color: #2f6f78 !important;
}

.jg-roadmap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.jg-roadmap-resume {
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  color: #2f6f78 !important;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
}

.jg-roadmap-resume:hover {
  text-decoration: underline !important;
}

.jg-roadmap-clear {
  padding: 0;
  border: 0;
  background: transparent;
  color: #666;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.jg-roadmap-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.jg-roadmap-focus-target:focus {
  outline: 2px solid #2f6f78;
  outline-offset: 3px;
}

.jg-roadmap-toast {
  box-sizing: border-box;
  position: fixed;
  z-index: 999999;
  left: 50%;
  bottom: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: calc(100% - 32px);
  max-width: 720px;
  padding: 13px 14px 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: #214f57;
  color: #fff;
  box-shadow: 0 10px 30px rgba(20, 55, 61, 0.28);
  font-size: 14px;
  line-height: 1.5;
  transform: translateX(-50%);
  animation: jg-roadmap-toast-in 0.2s ease-out;
}

.jg-roadmap-toast-content {
  min-width: 0;
}

.jg-roadmap-toast-title {
  display: block;
  margin: 0 0 2px;
  color: inherit;
  font-size: 15px;
}

.jg-roadmap-toast p {
  margin: 0;
  color: inherit;
}

.jg-roadmap-toast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 9px;
}

.jg-roadmap-toast a.jg-roadmap-toast-primary {
  padding: 6px 11px;
  border-radius: 999px;
  background: #fff;
  color: #214f57 !important;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none !important;
}

.jg-roadmap-toast a.jg-roadmap-toast-primary:hover {
  background: #eaf4f5;
}

.jg-roadmap-toast a.jg-roadmap-toast-login {
  color: #fff !important;
  font-weight: 700;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

.jg-roadmap-toast-icon {
  display: flex;
  align-items: center;
}

.jg-roadmap-toast-icon .jg-bookmark-icon {
  width: 15px;
  height: 19px;
  fill: #fff;
  stroke: #fff;
}

.jg-roadmap-toast-icon .jg-success-icon {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jg-roadmap-toast-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.jg-roadmap-toast-dismiss:hover {
  background: rgba(255, 255, 255, 0.22);
}

.jg-roadmap-toast a:focus-visible,
.jg-roadmap-toast-dismiss:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.jg-roadmap-toast--local {
  bottom: 28px;
  bottom: calc(28px + env(safe-area-inset-bottom));
  gap: 16px;
  align-items: start;
  max-width: 560px;
  padding: 23px 22px 22px;
  border: 1px solid #b7d8dd;
  border-top: 5px solid #2f6f78;
  border-radius: 18px;
  background: #fff;
  color: #19353a;
  box-shadow: 0 22px 60px rgba(20, 55, 61, 0.32);
  font-size: 15px;
}

.jg-roadmap-toast--local .jg-roadmap-toast-icon {
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e6f3f5;
  color: #2f6f78;
}

.jg-roadmap-toast--local .jg-roadmap-toast-title {
  margin-bottom: 5px;
  color: #19353a;
  font-size: 20px;
  line-height: 1.3;
}

.jg-roadmap-toast--local .jg-roadmap-toast-message {
  color: #53646a;
}

.jg-roadmap-toast--local .jg-roadmap-toast-actions {
  gap: 10px 16px;
  margin-top: 16px;
}

.jg-roadmap-toast--local a.jg-roadmap-toast-primary {
  padding: 10px 18px;
  background: #2f6f78;
  color: #fff !important;
  font-size: 15px;
}

.jg-roadmap-toast--local a.jg-roadmap-toast-primary:hover {
  background: #255d65;
}

.jg-roadmap-toast--local a.jg-roadmap-toast-login {
  color: #2f6f78 !important;
}

.jg-roadmap-toast--local .jg-roadmap-toast-dismiss {
  background: #eaf4f5;
  color: #2f6f78;
}

.jg-roadmap-toast--local .jg-roadmap-toast-dismiss:hover {
  background: #dcecef;
}

.jg-roadmap-toast--local a:focus-visible,
.jg-roadmap-toast--local .jg-roadmap-toast-dismiss:focus-visible {
  outline-color: #2f6f78;
}

@keyframes jg-roadmap-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .jg-roadmap-toast {
    animation: none;
  }
}

.jg-roadmap-account-note {
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid #dcecef;
  color: #53646a;
  font-size: 13px;
  line-height: 1.5;
}

.jg-roadmap-account-note p {
  margin: 0;
}

.jg-roadmap-account-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 14px;
  align-items: center;
  margin-top: 9px;
}

.jg-roadmap-account-note a {
  color: #2f6f78;
  font-weight: 700;
}

.jg-roadmap-account-note a.jg-roadmap-register {
  padding: 6px 11px;
  border-radius: 999px;
  background: #2f6f78;
  color: #fff !important;
  line-height: 1.25;
  text-decoration: none !important;
}

.jg-roadmap-account-note a.jg-roadmap-register:hover {
  background: #255d65;
}

.jg-roadmap-login-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.jg-roadmap-save {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 0 8px;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #2f6f78;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.25;
  vertical-align: middle;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.jg-roadmap-save:hover {
  border-color: #b7d8dd;
  background: #eff8fa;
  color: #255d65;
}

.jg-roadmap-save:focus-visible,
.jg-roadmap-clear:focus-visible,
.jg-roadmap-resume:focus-visible,
.jg-roadmap-account-note a:focus-visible {
  outline: 2px solid #2f6f78;
  outline-offset: 2px;
}

.jg-roadmap-save:disabled,
.jg-roadmap-clear:disabled {
  cursor: wait;
  opacity: 0.7;
}

.jg-roadmap-save .jg-bookmark-icon {
  width: 12px;
  height: 15px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.jg-roadmap-save[aria-pressed="true"] {
  border-color: #9fc9cf;
  background: #e6f3f5;
  color: #2f6f78;
}

.jg-roadmap-save[aria-pressed="true"] .jg-bookmark-icon {
  fill: currentColor;
}

.wp-block-buttons > .jg-roadmap-save-checkpoint {
  align-self: center;
  margin-left: 0;
}

@media (max-width: 600px) {
  .jg-roadmap-card {
    padding: 14px 16px;
  }

  .jg-roadmap-card-title {
    font-size: 17px;
  }

  .jg-roadmap-save {
    margin-left: 5px;
  }

  .jg-roadmap-toast {
    bottom: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    gap: 9px;
    width: calc(100% - 20px);
    padding: 12px 10px 12px 13px;
    font-size: 13.5px;
  }

  .jg-roadmap-toast--local {
    bottom: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    gap: 12px;
    width: calc(100% - 16px);
    padding: 19px 13px 18px;
    border-radius: 18px;
    font-size: 14px;
  }

  .jg-roadmap-toast--local .jg-roadmap-toast-icon {
    width: 40px;
    height: 40px;
  }

  .jg-roadmap-toast--local .jg-roadmap-toast-icon .jg-success-icon {
    width: 24px;
    height: 24px;
  }

  .jg-roadmap-toast--local .jg-roadmap-toast-title {
    font-size: 18px;
  }

  .jg-roadmap-toast--local .jg-roadmap-toast-actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 14px;
  }

  .jg-roadmap-toast--local a.jg-roadmap-toast-primary,
  .jg-roadmap-toast--local a.jg-roadmap-toast-login {
    text-align: center;
  }
}


/* Post controls sit inside the article, below its title/byline and at the end. */
.jg-lesson-save-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 18px 0 26px;
}
.jg-lesson-save-tools:empty { display: none; }
.jg-lesson-save-tools .jg-lesson-save {
  margin: 0;
  padding: 10px 15px;
  border: 1px solid #b7d8dd;
  background: #eff8fa;
  font-size: 14px;
  line-height: 1.5;
}
.jg-lesson-save-tools .jg-bookmark-icon { width: 14px; height: 18px; }
.jg-lesson-roadmap-link {
  color: #2f6f78;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.jg-roadmap-card-detail { margin: -5px 0 12px; color: #53646a; font-size: 13px; }
.jg-roadmap-replace {
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 510px;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 28px;
  border: 1px solid #b7d8dd;
  border-top: 5px solid #2f6f78;
  border-radius: 16px;
  background: #fff;
  color: #19353a;
  box-shadow: 0 22px 60px rgba(20, 55, 61, 0.3);
  font: inherit;
}
.jg-roadmap-replace::backdrop { background: rgba(15, 38, 43, 0.55); }
.jg-roadmap-replace h2 { margin: 0 0 12px; color: #19353a; font-size: 24px; line-height: 1.3; }
.jg-roadmap-replace p { margin: 0 0 22px; line-height: 1.65; overflow-wrap: anywhere; }
.jg-roadmap-replace-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.jg-roadmap-replace button {
  padding: 10px 16px;
  border: 1px solid #b7d8dd;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.jg-roadmap-replace-confirm { background: #2f6f78; color: #fff; }
.jg-roadmap-replace-cancel { background: #eff8fa; color: #255d65; }
.jg-roadmap-replace-confirm:hover { background: #255d65; }
.jg-roadmap-replace button:focus-visible,
.jg-lesson-roadmap-link:focus-visible { outline: 2px solid #2f6f78; outline-offset: 3px; }
.jg-roadmap-card-title { overflow-wrap: anywhere; }
.jg-roadmap-clear { color: #53646a; }
.jg-roadmap-toast--error { border-top: 4px solid #e2b7a5; }
@media (max-width: 600px) {
  .jg-roadmap-replace { padding: 22px 20px; }
  .jg-roadmap-replace-actions { flex-direction: column; }
  .jg-roadmap-replace-actions button { width: 100%; }
}
@media print {
  #jg-roadmap-saved-places,
  .jg-lesson-save-tools,
  .jg-roadmap-save,
  .jg-roadmap-replace,
  .jg-roadmap-toast { display: none !important; }
}
