
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1rem;
}

.journey-ticket {
  position: relative;
  display: grid;
  min-height: 420px;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: end;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.25rem);
  padding-right: clamp(5.6rem, 9vw, 8.5rem);
  color: var(--on-brand);
  background:
    linear-gradient(128deg, rgba(25, 75, 91, 0.97), rgba(16, 55, 66, 0.97)),
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(255, 255, 255, 0.08) 15px 16px);
  border-radius: 1.65rem;
  box-shadow: var(--shadow);
}

.journey-ticket::before,
.journey-ticket::after {
  position: absolute;
  right: 74px;
  width: 28px;
  height: 28px;
  background: var(--surface-page);
  border-radius: 50%;
  content: "";
}

.journey-ticket::before { top: -14px; }
.journey-ticket::after { bottom: -14px; }

.ticket-route {
  position: absolute;
  inset: 2rem 5.35rem auto 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.route-line {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.route-stop {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  background: var(--surface-brand-strong);
  border: 2px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
}

.route-stop--done {
  background: var(--surface-card);
}

.route-stop--current {
  width: 16px;
  height: 16px;
  background: var(--vermilion);
  border-color: var(--on-brand);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.1);
}

.ticket-copy {
  position: relative;
  z-index: 1;
  align-self: end;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--mineral);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.journey-ticket .eyebrow,
.lesson-aside .eyebrow,
.quiz-aside .eyebrow {
  color: #9dc6c2;
}

.journey-ticket h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.hero-lead {
  max-width: 36rem;
  margin: 1.1rem 0 1.7rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.primary-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1.2rem 0.75rem 1.4rem;
  color: var(--on-brand);
  background: var(--vermilion);
  border: 0;
  border-radius: 0.65rem;
  box-shadow: 0 10px 24px rgba(185, 56, 37, 0.2);
  font-size: 0.87rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-button:hover:not(:disabled) {
  background: var(--vermilion-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.48;
}

.primary-button svg,
.back-button svg,
.hint-button svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.ticket-summary {
  position: relative;
  z-index: 1;
  display: grid;
  align-self: end;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.ticket-summary div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0 0.55rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ticket-summary strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.ticket-summary span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.7rem;
}

.passport-seal {
  position: absolute;
  top: 5.5rem;
  right: 7rem;
  display: grid;
  width: 100px;
  height: 100px;
  place-content: center;
  color: rgba(226, 92, 69, 0.72);
  border: 2px solid currentColor;
  border-radius: 50%;
  text-align: center;
  transform: rotate(-11deg);
}

.passport-seal::before {
  position: absolute;
  inset: 5px;
  border: 1px dashed currentColor;
  border-radius: inherit;
  content: "";
}

.passport-seal span,
.passport-seal strong {
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.passport-seal span { font-size: 0.6rem; letter-spacing: 0.18em; }
.passport-seal strong { font-family: var(--font-display); font-size: 1.25rem; }

.vertical-title {
  position: absolute;
  top: 50%;
  right: 1.65rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

.today-stamp-card,
.panel,
.lesson-main,
.quiz-card,
.result-card {
  background: rgba(248, 251, 251, 0.92);
  border: 1px solid rgba(203, 217, 220, 0.85);
  box-shadow: 0 16px 40px rgba(16, 55, 66, 0.06);
}

.today-stamp-card {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: 1.65rem;
}

.card-heading,
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.card-heading h2,
.panel-heading h2,
.update-panel h2,
.date-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.streak-badge,
.mini-label,
.status-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  white-space: nowrap;
  color: var(--text-accent);
  font-size: 0.7rem;
  font-weight: 800;
}

.streak-badge strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.stamp-stage {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 1.5rem 0;
}

.empty-stamp,
.completion-seal {
  position: relative;
  display: grid;
  width: 150px;
  height: 150px;
  place-content: center;
  color: #9bacb1;
  border: 2px dashed currentColor;
  border-radius: 50%;
  text-align: center;
  transform: rotate(-7deg);
}

.empty-stamp::before,
.completion-seal::before {
  position: absolute;
  inset: 9px;
  border: 1px solid currentColor;
  border-radius: inherit;
  content: "";
}

.empty-stamp span,
.empty-stamp strong,
.completion-seal span,
.completion-seal strong {
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.empty-stamp strong,
.completion-seal strong {
  font-family: var(--font-display);
  font-size: 2rem;
}

.empty-stamp span,
.completion-seal span {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.empty-stamp.is-complete {
  color: var(--vermilion);
  border-style: solid;
  animation: stamp-in 620ms cubic-bezier(0.18, 0.84, 0.28, 1.2) both;
}

@keyframes stamp-in {
  from { opacity: 0; transform: scale(1.5) rotate(-15deg); }
  to { opacity: 1; transform: scale(1) rotate(-7deg); }
}

.stamp-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 1rem;
  margin-top: 1rem;
}

.weakness-prescription {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(220px, 1fr) minmax(310px, 0.9fr) auto;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  overflow: hidden;
  margin-top: 1rem;
  padding: 1.25rem 1.4rem;
  background:
    linear-gradient(90deg, rgba(217, 74, 50, 0.045), transparent 24%),
    var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--vermilion);
  border-radius: 1.15rem;
  box-shadow: 0 14px 38px rgba(16, 55, 66, 0.07);
}

.weakness-prescription::after {
  position: absolute;
  top: -45px;
  right: 16%;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(25, 75, 91, 0.06);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.weakness-prescription__seal {
  display: grid;
  width: 68px;
  aspect-ratio: 1;
  place-content: center;
  color: var(--vermilion-dark);
  text-align: center;
  border: 3px double var(--vermilion);
  border-radius: 50%;
  transform: rotate(-5deg);
}

.weakness-prescription__seal strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
}

.weakness-prescription__seal span {
  font-size: 0.46rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.weakness-prescription__copy,
.weakness-prescription__signals,
.weakness-prescription__action {
  position: relative;
  z-index: 1;
}

.weakness-prescription__copy h2 {
  margin: 0.2rem 0 0.35rem;
  color: var(--text-heading);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  font-weight: 600;
  line-height: 1.35;
}

.weakness-prescription__copy > p:last-child {
  max-width: 630px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.weakness-prescription__signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.weakness-prescription__signals div {
  min-width: 0;
  padding: 0.7rem 0.75rem;
  background: var(--surface-soft);
}

.weakness-prescription__signals dt {
  color: var(--text-muted);
  font-size: 0.48rem;
  font-weight: 900;
}

.weakness-prescription__signals dd {
  overflow: hidden;
  margin: 0.18rem 0 0;
  color: var(--text-accent);
  font-size: 0.66rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weakness-prescription__action {
  min-width: 164px;
  white-space: nowrap;
}

.weakness-prescription[data-mode="advance"] {
  border-left-color: var(--mineral);
}

.weakness-prescription[data-mode="advance"] .weakness-prescription__seal {
  color: var(--mineral);
  border-color: var(--mineral);
}

.panel {
  padding: 1.5rem;
  border-radius: 1.25rem;
}

.study-plan {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.study-plan li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.plan-index {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--text-accent);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.8rem;
}

.plan-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.plan-copy strong { font-size: 0.86rem; }
.plan-copy span { overflow: hidden; color: var(--text-muted); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.plan-count { color: var(--text-accent); font-size: 0.76rem; font-weight: 900; }

.score-ring {
  display: inline-flex;
  width: 62px;
  height: 62px;
  align-items: baseline;
  justify-content: center;
  padding-top: 0.85rem;
  color: var(--text-accent);
  background: conic-gradient(var(--mineral) 0 78%, var(--paper-blue) 78% 100%);
  border: 7px solid var(--paper-cold);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1;
}

.score-ring small { font-family: var(--font-body); font-size: 0.55rem; }

.record-bars {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.record-row {
  display: grid;
  grid-template-columns: 5rem minmax(80px, 1fr) 2.5rem;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.record-row strong { color: var(--text-primary); font-size: 0.7rem; text-align: right; }
.bar-track { height: 5px; overflow: hidden; background: var(--surface-tinted); border-radius: 999px; }
.bar-track span { display: block; width: var(--value); height: 100%; background: var(--mineral); border-radius: inherit; }

.record-tip {
  margin: 1.2rem 0 0;
  padding-top: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
}

.record-tip span {
  margin-right: 0.45rem;
  padding: 0.15rem 0.35rem;
  color: var(--vermilion-dark);
  background: rgba(217, 74, 50, 0.09);
  border-radius: 0.25rem;
  font-weight: 900;
}

.update-panel,
.date-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.update-panel p,
.date-panel p {
  margin: 0.3rem 0 0;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.update-mark {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--on-brand);
  background: var(--vermilion);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.25rem;
  transform: rotate(-7deg);
}

.status-chip {
  margin-left: auto;
  padding: 0.3rem 0.55rem;
  color: var(--mineral);
  background: rgba(47, 118, 109, 0.09);
  border-radius: 999px;
}

.date-panel {
  justify-content: space-between;
}

.text-button {
  padding: 0.4rem 0;
  color: var(--text-accent);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}
