/* my-plan.css — "My Plan" page. Reuses progress-dashboard.css's
   .progress-main/.progress-section/.skill-performance-bar-track and
   base.css's .btn — this file is only the plan-specific pieces. */
.plan-main { max-width: 780px; }

.plan-empty-goal {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 40px 24px 32px;
  background: linear-gradient(160deg, var(--unio-cream) 0%, var(--ielts-white) 70%);
  border: 1px solid var(--ielts-border);
  border-radius: 14px;
}
body.dark-theme .plan-empty-goal { background: linear-gradient(160deg, #2a2411 0%, var(--ielts-white) 75%); }
.plan-empty-goal-mascot { width: 96px; margin: 0 auto 10px; display: block; }
.plan-empty-goal h3 { margin: 0 0 8px; font-size: 19px; }
.plan-empty-goal p { color: var(--ielts-text-muted); margin: 0 0 18px; max-width: 440px; margin-left: auto; margin-right: auto; }

/* ---- Header — hero treatment: gradient, mascot, twinkling stars, not
   just a flat bordered box of stats. ---- */
.plan-header-card {
  position: relative;
  /* Not overflow:hidden — the mascot is taller than the card's content
     and deliberately pokes up past the top edge (peeking in), which a
     clipped overflow would cut its head off. */
  background: linear-gradient(135deg, var(--unio-cream) 0%, var(--ielts-white) 65%);
  border: 1px solid var(--ielts-border);
  border-radius: 14px;
  padding: 20px 120px 20px 22px;
  margin-bottom: 8px;
}
body.dark-theme .plan-header-card { background: linear-gradient(135deg, #2a2411 0%, var(--ielts-white) 70%); }
.plan-header-mascot {
  position: absolute;
  right: 14px;
  bottom: 0;
  width: 92px;
  animation: planMascotBob 3.2s ease-in-out infinite;
}
@media (max-width: 560px) {
  .plan-header-card { padding: 18px; }
  .plan-header-mascot { display: none; }
}
@keyframes planMascotBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.plan-sparkle {
  position: absolute;
  color: var(--unio-yellow);
  opacity: 0;
  animation: planTwinkle 2.6s ease-in-out infinite;
}
.plan-sparkle .icon { width: 16px; height: 16px; }
.plan-sparkle:nth-child(1) { top: 14px; right: 96px; animation-delay: 0s; }
.plan-sparkle:nth-child(2) { top: 44px; right: 128px; animation-delay: 0.9s; }
.plan-sparkle:nth-child(3) { bottom: 18px; right: 84px; animation-delay: 1.7s; }
@keyframes planTwinkle {
  0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(15deg); }
}
@media (prefers-reduced-motion: reduce) {
  .plan-header-mascot, .plan-sparkle { animation: none; opacity: 1; }
}
.plan-header-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; position: relative; z-index: 1; }
.plan-header-overall strong { font-size: 22px; font-family: var(--font-heading); color: var(--unio-dark); }
body.dark-theme .plan-header-overall strong { color: var(--ielts-text); }
.plan-header-sep { color: var(--ielts-text-muted); }
.plan-header-hint { color: var(--ielts-text-muted); font-size: 13px; }
.plan-phase-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; padding: 3px 10px; border-radius: 10px; margin-left: auto; }
.plan-phase-build { background: #e6f0fd; color: var(--unio-blue); }
.plan-phase-improve { background: #fff6df; color: #a4780c; }
.plan-phase-perform { background: #fdecec; color: var(--ielts-incorrect); }
/* Dark mode — hardcoded light pastels, no theme-aware variant. */
body.dark-theme .plan-phase-build { background: #1a2c47; }
body.dark-theme .plan-phase-improve { background: #3a2f10; color: #e8c766; }
body.dark-theme .plan-phase-perform { background: #3a2326; }

/* ---- Current Focus ---- */
.plan-focus-list { display: flex; flex-direction: column; gap: 12px; }
.plan-focus-card {
  background: var(--ielts-white);
  border: 1px solid var(--ielts-border);
  border-left: 4px solid var(--ielts-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.plan-focus-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07); }
.plan-focus-head { display: flex; align-items: center; gap: 10px; }
.plan-focus-skill-icon {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.plan-focus-skill-icon .icon { width: 16px; height: 16px; }
.plan-focus-rank {
  width: 20px; height: 20px; border-radius: 50%; background: var(--ielts-bg); color: var(--ielts-text-muted);
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.plan-focus-skill { font-weight: 700; font-size: 15px; }
/* Mini gap bar: current -> target, filled proportionally, gives the
   "5.5 -> 7.0" numbers a visual read instead of pure text. */
.plan-focus-bar-track { height: 6px; border-radius: 3px; background: var(--ielts-bg); overflow: hidden; }
.plan-focus-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.plan-priority-badge { margin-left: auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; padding: 2px 9px; border-radius: 10px; white-space: nowrap; }
.plan-priority-high { background: #fdecec; color: var(--ielts-incorrect); }
.plan-priority-medium { background: #fff6df; color: #a4780c; }
.plan-priority-low { background: #e6f6ec; color: var(--ielts-correct); }
/* Dark mode — hardcoded light pastels, no theme-aware variant. */
body.dark-theme .plan-priority-high { background: #3a2326; }
body.dark-theme .plan-priority-medium { background: #3a2f10; color: #e8c766; }
body.dark-theme .plan-priority-low { background: #1e3327; }
.plan-focus-numbers { font-size: 13.5px; color: var(--ielts-text-secondary); display: flex; gap: 10px; flex-wrap: wrap; }
.plan-focus-gap { color: var(--ielts-text-muted); }
.plan-focus-recommended { font-size: 13px; color: var(--ielts-text-muted); }
.plan-focus-actions { margin: 2px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ielts-text-secondary); }
.plan-focus-actions li { margin-bottom: 2px; }
.plan-focus-card .btn { align-self: flex-start; margin-top: 2px; }

/* ---- This Week — a checklist of chips (icon + text), not a plain <ul>
   with browser bullets. ---- */
.plan-week-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--ielts-white);
  border: 1px solid var(--ielts-border);
  border-radius: 12px;
  padding: 10px;
  margin: 0;
}
.plan-week-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
}
.plan-week-list li:hover { background: var(--ielts-bg); }
.plan-week-item-icon {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--ielts-blue-light); color: var(--unio-blue);
  display: inline-flex; align-items: center; justify-content: center;
}
.plan-week-item-icon .icon { width: 14px; height: 14px; }

/* ---- Today ---- */
.plan-today-card { position: relative; overflow: hidden; background: var(--ielts-white); border: 1px solid var(--ielts-border); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 16px; }
.plan-today-goal-label { font-size: 13.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-today-goal-met { color: var(--ielts-correct); font-weight: 700; }
.plan-today-recommended-body { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.plan-today-mascot {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 56px;
  animation: planMascotBob 3.2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .plan-today-mascot { animation: none; } }

/* ------------------------------------------------------------------
   My Plan dashboard refresh: a clear page heading, a stronger goal hero,
   and a two-column action dashboard instead of one long text-heavy stack.
   ------------------------------------------------------------------ */
.plan-main { max-width: 1040px; padding-bottom: 56px; }

.plan-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 4px 0 24px;
}
.plan-page-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: var(--unio-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.plan-page-kicker .icon { width: 14px; height: 14px; }
.plan-page-heading h1 { margin: 0; font-size: 28px; line-height: 1.2; }
.plan-page-heading p { margin: 6px 0 0; color: var(--ielts-text-muted); font-size: 13.5px; }
.plan-edit-goal-btn { flex-shrink: 0; border-radius: 999px; text-decoration: none; }

.plan-header-card {
  min-height: 172px;
  display: flex;
  align-items: center;
  padding: 26px 190px 26px 28px;
  margin-bottom: 26px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 78% 20%, rgba(244, 190, 42, 0.22), transparent 24%),
    linear-gradient(135deg, var(--unio-cream) 0%, var(--ielts-white) 72%);
  box-shadow: 0 8px 28px rgba(30, 40, 60, 0.06);
}
body.dark-theme .plan-header-card {
  background:
    radial-gradient(circle at 78% 20%, rgba(244, 190, 42, 0.12), transparent 24%),
    linear-gradient(135deg, #2a2411 0%, var(--ielts-white) 72%);
}
.plan-header-content { position: relative; z-index: 1; width: 100%; }
.plan-header-eyebrow {
  margin-bottom: 12px;
  color: var(--ielts-text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.plan-goal-metrics { display: flex; align-items: stretch; gap: 10px; }
.plan-goal-metric {
  min-width: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid rgba(36, 43, 61, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(3px);
}
body.dark-theme .plan-goal-metric { background: rgba(20, 23, 31, 0.65); border-color: var(--ielts-border); }
.plan-goal-metric-label { color: var(--ielts-text-muted); font-size: 11px; font-weight: 700; }
.plan-goal-metric-value {
  color: var(--ielts-text);
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
}
.plan-goal-overall .plan-goal-metric-value { color: var(--unio-blue); }
.plan-goal-metric-value-small { font-family: inherit; font-size: 16px; }
.plan-goal-metric-inline { display: flex; align-items: baseline; gap: 5px; margin-top: 2px; }
.plan-goal-metric-unit { color: var(--ielts-text-secondary); font-size: 12px; font-weight: 600; }
.plan-header-phase { display: flex; align-items: center; gap: 9px; margin-top: 12px; color: var(--ielts-text-muted); font-size: 11.5px; }
.plan-header-phase .plan-phase-badge { margin-left: 0; }
.plan-header-mascot { right: 24px; width: 146px; }
.plan-sparkle:nth-child(1) { right: 164px; }
.plan-sparkle:nth-child(2) { right: 188px; }
.plan-sparkle:nth-child(3) { right: 142px; }

.plan-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.86fr);
  gap: 22px;
  align-items: start;
}
.plan-dashboard-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.plan-dashboard-section.progress-section { margin: 0; min-width: 0; }
.plan-section-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.plan-section-heading h3 { margin: 0; font-size: 16px; }
.plan-section-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--ielts-blue-light);
  color: var(--unio-blue);
}
.plan-section-icon .icon { width: 15px; height: 15px; }

.plan-focus-list { gap: 14px; }
.plan-focus-card { gap: 13px; padding: 17px 18px; border-radius: 14px; }
.plan-focus-head { gap: 11px; }
.plan-focus-skill-icon { width: 36px; height: 36px; border-radius: 11px; }
.plan-focus-title-wrap { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.plan-focus-rank {
  width: auto;
  height: auto;
  justify-content: flex-start;
  border-radius: 0;
  background: transparent;
  color: var(--ielts-text-muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.plan-focus-skill { line-height: 1.2; }
.plan-priority-badge { padding: 4px 9px; }
.plan-focus-score-row { display: flex; align-items: center; gap: 9px; }
.plan-focus-score {
  min-width: 70px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--ielts-bg);
}
.plan-focus-score span { display: block; color: var(--ielts-text-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.plan-focus-score strong { display: block; margin-top: 1px; font-family: var(--font-heading); font-size: 21px; line-height: 1.1; }
.plan-focus-score.target { background: var(--ielts-blue-light); }
.plan-focus-score.target strong { color: var(--unio-blue); }
.plan-focus-score-arrow { color: var(--ielts-text-muted); }
.plan-focus-gap {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ielts-bg);
  color: var(--ielts-text-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.plan-focus-bar-track { height: 8px; }
.plan-focus-no-data { padding: 12px; border-radius: 9px; background: var(--ielts-bg); color: var(--ielts-text-muted); font-size: 12.5px; line-height: 1.5; }
.plan-focus-recommended {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--ielts-bg);
  color: var(--ielts-text-muted);
  font-size: 11px;
}
.plan-focus-recommended span { flex-shrink: 0; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.plan-focus-recommended strong { color: var(--ielts-text); font-size: 13px; }
.plan-focus-strategy { border-top: 1px solid var(--ielts-border); border-bottom: 1px solid var(--ielts-border); }
.plan-focus-strategy summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 1px;
  color: var(--ielts-text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.plan-focus-strategy summary::-webkit-details-marker { display: none; }
.plan-focus-strategy summary .icon { width: 14px; height: 14px; }
.plan-focus-strategy[open] summary .icon { transform: rotate(180deg); }
.plan-focus-actions { margin: 0 0 10px; padding-left: 20px; line-height: 1.55; }
.plan-focus-footer { display: flex; justify-content: flex-end; }
.plan-focus-card .plan-focus-footer .btn { align-self: auto; margin: 0; border-radius: 999px; text-decoration: none; }
.plan-focus-footer .btn .icon { width: 14px; height: 14px; }

.plan-today-card {
  gap: 14px;
  padding: 17px;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--ielts-white), var(--unio-cream));
}
body.dark-theme .plan-today-card { background: linear-gradient(150deg, var(--ielts-white), #2a2411); }
.plan-today-goal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.plan-today-goal-label { display: block; margin: 0 0 2px; color: var(--ielts-text-muted); font-size: 11px; font-weight: 700; }
.plan-today-minutes { display: flex; align-items: baseline; gap: 4px; }
.plan-today-minutes strong { font-family: var(--font-heading); font-size: 26px; line-height: 1; }
.plan-today-minutes span { color: var(--ielts-text-muted); font-size: 11.5px; }
.plan-today-percent {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 5px solid var(--unio-yellow);
  border-radius: 50%;
  background: var(--ielts-white);
  font-size: 11px;
  font-weight: 800;
}
.plan-today-goal-met { display: block; margin-top: 8px; font-size: 11.5px; }
.plan-today-recommended {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--plan-skill-color) 30%, var(--ielts-border));
  border-radius: 11px;
  background: var(--ielts-white);
}
.plan-today-skill-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: #fff; }
.plan-today-skill-icon .icon { width: 16px; height: 16px; }
.plan-today-recommended-copy { min-width: 0; }
.plan-today-recommended .insights-callout-label { margin-bottom: 2px; font-size: 9.5px; }
.plan-today-recommended-body { margin: 0; font-size: 13px; line-height: 1.3; }
.plan-today-recommended-body span { display: block; overflow: hidden; color: var(--ielts-text-muted); font-size: 10.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.plan-today-recommended .btn { width: 34px; height: 34px; justify-content: center; padding: 0; border-radius: 50%; }
.plan-today-mascot { right: 16px; top: 14px; }

.plan-week-list { gap: 7px; padding: 9px; border-radius: 14px; }
.plan-week-list li { align-items: flex-start; padding: 9px; line-height: 1.45; }
.plan-week-item-icon {
  width: 24px;
  height: 24px;
  background: var(--unio-cream);
  color: #8a6507;
  font-size: 10px;
  font-weight: 800;
}
body.dark-theme .plan-week-item-icon { background: #3a2f10; color: #e8c766; }

@media (max-width: 840px) {
  .plan-dashboard-grid { grid-template-columns: 1fr; }
  .plan-dashboard-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .plan-page-heading { align-items: flex-start; margin-bottom: 18px; }
  .plan-page-heading h1 { font-size: 24px; }
  .plan-page-heading p { display: none; }
  .plan-edit-goal-btn { padding: 7px 10px; font-size: 12px; }
  .plan-header-card { min-height: 0; padding: 20px; }
  .plan-header-mascot, .plan-sparkle { display: none; }
  .plan-goal-metrics { flex-direction: column; }
  .plan-goal-metric { min-width: 0; }
  .plan-dashboard-side { grid-template-columns: 1fr; }
  .plan-focus-score-row { flex-wrap: wrap; }
  .plan-focus-gap { margin-left: 0; }
  .plan-focus-recommended { align-items: flex-start; flex-direction: column; gap: 3px; }
  .plan-focus-footer .btn { width: 100%; justify-content: center; }
}
