/* ─── Journey Progress Widget ─────────────────────────────────── */

#journey-widget {
  position: fixed;
  bottom: 80px; /* above sticky-bottom-nav */
  right: 16px;
  z-index: 9000;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed pill */
.journey-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #e3e3e3, #ebebeb);
  border: 1px solid rgba(130, 130, 130, 0.5);
  border-radius: 50px;
  padding: 8px 14px 8px 10px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.journey-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
}

/* Progress ring */
.journey-ring {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.journey-ring svg {
  transform: rotate(-90deg);
}

.journey-ring-bg { fill: none; stroke: var(--line); stroke-width: 3; }
.journey-ring-fill { fill: none; stroke: var(--line); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }

.journey-ring-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.journey-pill-text {
  line-height: 1.3;
}

.journey-pill-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  display: block;
}

.journey-pill-sub {
  font-size: 0.65rem;
  color: var(--ink-muted);
  display: block;
}

/* Expanded panel */
.journey-panel {
  display: none;
  background: linear-gradient(145deg, #e3e3e3, #ebebeb);
  border: 1px solid rgba(130, 130, 130, 0.4);
  border-radius: 16px;
  padding: 0;
  width: 260px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16), 0 0 30px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.journey-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.journey-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.journey-panel-title i { color: #a44604; }

.journey-close-btn {
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.journey-close-btn:hover { color: var(--ink); }

.journey-panel-body {
  padding: 16px;
}

.journey-module-name {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.journey-lesson-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.journey-overall-bar {
  height: 5px;
  background: var(--glass-strong);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.journey-overall-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #828282, #a44604);
  transition: width 0.6s ease;
}

.journey-overall-text {
  font-size: 0.7rem;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.journey-continue-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: linear-gradient(135deg, #828282, #929292);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
}

.journey-continue-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  color: var(--ink);
  text-decoration: none;
}

#journey-widget.is-expanded .journey-pill { display: none; }
#journey-widget.is-expanded .journey-panel { display: block; }
