/* My Journey on the dashboard. Uses the dashboard's own tokens (guidemate.css) so
   the pieces read as part of the exercise book, not a game laid on top of it. */

/* ── the card: the free slot beside Mock Exam ── */
.gm-stat-row .gm-journey-card {
  grid-column: span 2;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 14px 28px;
  align-content: start;
}
.gm-journey-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.gm-journey-emblem { display: block; line-height: 0; border-radius: 12px; }
.gm-journey-emblem svg { width: 72px; height: 79px; }
.gm-journey-emblem:focus-visible { outline: 2px solid var(--gm-gold, #C39A4C); outline-offset: 3px; }
.gm-journey-who .gm-stat-label { margin: 0 0 4px; }
.gm-journey-title { margin: 0; font: 700 1.12rem/1.2 var(--gm-display, "Space Grotesk", sans-serif); color: var(--gm-paper-ink, #13233F); }
.gm-journey-bar {
  display: block; height: 8px; margin: 9px 0 6px; max-width: 280px;
  border: 1.3px solid var(--gm-paper-ink, #13233F); border-radius: 6px; background: var(--gm-gold-soft, #F1E6CB); overflow: hidden;
}
.gm-journey-bar i { display: block; height: 100%; background: var(--gm-success, #2f7d52); }
.gm-journey-bar--thin { height: 6px; margin: 6px 0 0; max-width: 220px; }
.gm-journey-bar--thin i { background: var(--gm-gold, #C39A4C); }
.gm-journey-sub { margin: 0; font-size: .86rem; color: var(--gm-ink-2, #46566B); font-variant-numeric: tabular-nums; }
.gm-journey-sub b { color: var(--gm-paper-ink, #13233F); }

.gm-journey-next { align-self: center; }
.gm-journey-badge {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 10px 12px; border: 1.3px dashed var(--gm-line-strong, #D9C79C); border-radius: 12px;
  color: inherit; text-decoration: none; background: rgba(255, 253, 248, .6);
}
.gm-journey-badge:hover { border-color: var(--gm-gold, #C39A4C); background: var(--gm-surface, #FFFDF8); }
.gm-journey-badge:focus-visible { outline: 2px solid var(--gm-gold, #C39A4C); outline-offset: 2px; }
.gm-journey-badge svg { width: 44px; height: 48px; }
.gm-journey-next-text { display: grid; gap: 2px; min-width: 0; }
.gm-journey-next-text b { font: 700 .98rem/1.2 var(--gm-display, "Space Grotesk", sans-serif); color: var(--gm-paper-ink, #13233F); }
.gm-journey-do { font-size: .82rem; line-height: 1.35; color: var(--gm-ink-2, #46566B); }
.gm-journey-kicker {
  font: 700 .66rem/1.2 var(--gm-display, "Space Grotesk", sans-serif); letter-spacing: .1em; text-transform: uppercase;
  color: var(--gm-gold-ink, #A87E33);
}

.gm-journey-foot {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px;
  padding-top: 12px; border-top: 1px solid var(--gm-line, #E8DDC6);
}
.gm-journey-latest { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gm-journey-latest .gm-journey-kicker { margin-right: 4px; }
.gm-journey-mini { display: inline-block; line-height: 0; border-radius: 6px; transition: transform .15s ease; }
.gm-journey-mini svg { width: 28px; height: 31px; }
.gm-journey-mini:hover { transform: translateY(-2px); }
.gm-journey-mini:focus-visible { outline: 2px solid var(--gm-gold, #C39A4C); outline-offset: 2px; }
.gm-journey-go { margin-left: auto; }

/* ── phone top bar: the emblem on the empty right side ── */
.gm-topbar-journey { display: none; }
@media (max-width: 860px) {
  .gm-topbar-journey:not([hidden]) { display: inline-flex; margin-left: auto; line-height: 0; border-radius: 8px; }
  .gm-topbar-journey svg { width: 30px; height: 33px; }
}

@media (max-width: 1024px) {
  .gm-stat-row .gm-journey-card { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .gm-journey-emblem svg { width: 60px; height: 66px; }
  .gm-journey-go { margin-left: 0; }
}

/* ── unlock toast: top right, where the welcome banner sits (bottom is the status toast) ── */
.gm-journey-toast {
  position: fixed; right: 18px; top: 18px; z-index: 66; width: min(380px, calc(100vw - 32px));
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 14px 14px 14px 16px; border: 1.5px solid var(--gm-paper-ink, #13233F); border-radius: 14px;
  background: var(--gm-surface, #FFFDF8); color: var(--gm-paper-ink, #13233F);
  box-shadow: 4px 4px 0 var(--gm-gold-soft, #F1E6CB), 4px 4px 0 1.5px var(--gm-paper-ink, #13233F);
  animation: gmJourneyIn .45s cubic-bezier(.16, 1, .3, 1);
}
.gm-journey-toast.is-going { opacity: 0; transform: translateY(-8px); transition: opacity .5s ease, transform .5s ease; }
.gm-journey-toast-art svg { width: 56px; height: 62px; }
.gm-journey-coin { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--gm-gold-soft, #F1E6CB); color: var(--gm-paper-ink, #13233F); }
.gm-journey-toast-art.gm-journey-coin svg { width: 34px; height: 34px; }
.gm-journey-toast-body { display: grid; gap: 3px; min-width: 0; }
.gm-journey-toast-title { font: 700 1.05rem/1.2 var(--gm-display, "Space Grotesk", sans-serif); }
.gm-journey-toast-body p { margin: 0; font-size: .86rem; color: var(--gm-ink-2, #46566B); }
.gm-journey-toast-body .gm-agent-run { justify-self: start; margin-top: 4px; }
.gm-journey-toast-x { all: unset; cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; color: var(--gm-ink-2, #46566B); }
.gm-journey-toast-x svg { width: 16px; height: 16px; }
.gm-journey-toast-x:hover { color: var(--gm-paper-ink, #13233F); background: var(--gm-gold-soft, #F1E6CB); }
.gm-journey-toast-x:focus-visible { outline: 2px solid var(--gm-gold, #C39A4C); }
@keyframes gmJourneyIn { from { opacity: 0; transform: translateY(-12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .gm-journey-toast, .gm-journey-toast.is-going { animation: none; transition: none; }
  .gm-journey-mini { transition: none; }
}

/* ── header button: rank and level, the study timer chip's shape (study-rhythm.css .sr-trigger) ── */
.gm-journey-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 7px;
  border: 1.5px solid var(--gm-paper-ink, #13233F); border-radius: 8px; background: var(--gm-field, #fbf6ea);
  color: var(--gm-paper-ink, #13233F); box-shadow: 2px 2px 0 var(--gm-paper-ink, #13233F);
  font: 600 13px/1.1 var(--gm-font, "Hanken Grotesk", sans-serif); white-space: nowrap; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.gm-journey-btn[hidden] { display: none; }
.gm-journey-btn svg { width: 24px; height: 27px; flex: none; }
.gm-journey-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--gm-paper-ink, #13233F); }
.gm-journey-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--gm-paper-ink, #13233F); }
.gm-journey-btn:focus-visible { outline: 2px solid var(--gm-gold, #C39A4C); outline-offset: 2px; }
/* the header keeps "Your workspace" on one line; the buttons wrap beneath instead */
.gm-header h1 { white-space: nowrap; }
@media (max-width: 860px) { .gm-header-actions .gm-journey-btn { display: none; } }   /* the top-bar emblem opens it */
/* workspace headers have no room for the words below ~960px: the emblem carries the level */
@media (max-width: 960px) { .lc-topbar-side .gm-journey-btn .gm-journey-btn-text { display: none; } .lc-topbar-side .gm-journey-btn { padding: 4px 7px; } }

/* ── the drawer: a paper sheet from the right ── */
.gm-jd-dim { position: fixed; inset: 0; z-index: 205; background: rgba(19, 35, 63, .28); opacity: 0; transition: opacity .2s ease; }
.gm-jd-dim.is-open { opacity: 1; }
.gm-jd {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 210; width: min(460px, 100vw);
  display: flex; flex-direction: column; background: var(--gm-field, #FBF6EA); color: var(--gm-paper-ink, #13233F);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(19, 35, 63, .07) 31px 32px);
  border-left: 1.5px solid var(--gm-paper-ink, #13233F); box-shadow: -6px 0 0 var(--gm-gold-soft, #F1E6CB), -7.5px 0 0 var(--gm-paper-ink, #13233F);
  transform: translateX(104%); transition: transform .24s cubic-bezier(.16, 1, .3, 1);
  font-family: var(--gm-font, "Hanken Grotesk", sans-serif);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.gm-jd.is-open { transform: none; }
body.gm-jd-open { overflow: hidden; }
.gm-jd-head { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 22px 22px 18px 24px; background: var(--gm-margin-rule, none); }
.gm-jd-ava { width: 52px; height: 52px; border: 1.5px solid var(--gm-paper-ink, #13233F); border-radius: 50%; background: var(--gm-surface, #FFFDF8); display: grid; place-items: center; overflow: hidden; }
.gm-jd-ava svg, .gm-jd-ava canvas, .gm-jd-ava img { max-width: 42px; max-height: 42px; width: auto; height: auto; image-rendering: pixelated; }
.gm-jd-name { margin: 0; font: 700 1.12rem/1.2 var(--gm-display, "Space Grotesk", sans-serif); overflow-wrap: anywhere; }
.gm-jd-rank { margin: 2px 0 0; font-size: .86rem; color: var(--gm-ink-2, #46566B); }
.gm-jd-rank b { color: var(--gm-gold-ink, #806020); font-family: var(--gm-display, "Space Grotesk", sans-serif); }
.gm-jd-x { all: unset; cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid var(--gm-paper-ink, #13233F); border-radius: 8px; background: var(--gm-surface, #FFFDF8); box-shadow: 2px 2px 0 var(--gm-paper-ink, #13233F); }
.gm-jd-x svg { width: 16px; height: 16px; }
.gm-jd-x:focus-visible { outline: 2px solid var(--gm-gold, #C39A4C); outline-offset: 2px; }
.gm-jd-body { flex: 1; overflow: auto; padding: 8px 24px 32px; display: grid; gap: 28px; align-content: start; overscroll-behavior: contain; }
.gm-jd-sec { display: grid; gap: 14px; padding-bottom: 24px; border-bottom: 1px solid var(--gm-line, #E8DDC6); }
.gm-jd-sec h3 { margin: 0; font: 700 .72rem/1.2 var(--gm-display, "Space Grotesk", sans-serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gm-gold-ink, #806020); }
.gm-jd-sechead { display: flex; align-items: baseline; justify-content: space-between; }
.gm-jd-more { font: 700 .82rem var(--gm-display, "Space Grotesk", sans-serif); color: var(--gm-paper-ink, #13233F); text-decoration: none; }
.gm-jd-more::after { content: " →"; }
.gm-jd-lvtop { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: center; }
.gm-jd-emb { line-height: 0; border-radius: 10px; }
.gm-jd-emb svg { width: 56px; height: 62px; }
.gm-jd-need { margin: 0; font-size: .95rem; } .gm-jd-need b { font-family: var(--gm-display, "Space Grotesk", sans-serif); }
.gm-jd .gm-journey-bar { max-width: none; margin: 7px 0 6px; }
.gm-jd-stats { margin: 0; font-size: .8rem; color: var(--gm-ink-2, #46566B); font-variant-numeric: tabular-nums; }
.gm-jd-ways { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gm-jd-way { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1.3px solid var(--gm-paper-ink, #13233F); border-radius: 10px; background: var(--gm-surface, #FFFDF8); color: inherit; text-decoration: none; box-shadow: 2px 2px 0 var(--gm-paper-ink, #13233F); }
.gm-jd-way:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--gm-paper-ink, #13233F); }
.gm-jd-way span:first-child { display: grid; gap: 1px; min-width: 0; }
.gm-jd-way b { font: 700 .9rem/1.25 var(--gm-display, "Space Grotesk", sans-serif); }
.gm-jd-way small { font-size: .78rem; color: var(--gm-ink-2, #46566B); line-height: 1.35; }
.gm-jd-plus { font: 700 .85rem var(--gm-display, "Space Grotesk", sans-serif); color: var(--gm-success, #2f7d52); }
.gm-jd-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.gm-jd-badge { line-height: 0; border-radius: 8px; } .gm-jd-badge svg { width: 40px; height: 44px; }
.gm-jd-badge:hover { transform: translateY(-2px); }
.gm-jd-hint, .gm-jd-info { margin: 0; font-size: .82rem; line-height: 1.45; color: var(--gm-ink-2, #46566B); }
.gm-jd-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--gm-paper-ink, #13233F); border-radius: 9px; overflow: hidden; }
.gm-jd-tab { all: unset; cursor: pointer; text-align: center; padding: 10px 6px; font: 600 .84rem var(--gm-display, "Space Grotesk", sans-serif); background: var(--gm-surface, #FFFDF8); }
.gm-jd-tab + .gm-jd-tab { border-left: 1.5px solid var(--gm-paper-ink, #13233F); }
.gm-jd-tab[aria-selected="true"] { background: var(--gm-paper-ink, #13233F); color: var(--gm-field, #FBF6EA); }
.gm-jd-tab:focus-visible { outline: 2px solid var(--gm-gold, #C39A4C); outline-offset: -3px; }
.gm-jd-pane { display: grid; gap: 14px; }
.gm-jd-grid { display: grid; gap: 12px; }
.gm-jd-grid--bots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gm-jd-grid--themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gm-jd-tile { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 6px; padding: 8px; border: 1.3px solid var(--gm-line-strong, #D9C79C); border-radius: 9px; background: var(--gm-surface, #FFFDF8); aspect-ratio: 1; align-content: center; max-width: 100%; }
.gm-jd-tile--theme { aspect-ratio: auto; padding: 8px; }
.gm-jd-tile-art { display: grid; place-items: center; line-height: 0; max-width: 100%; overflow: hidden; }
.gm-jd-tile-art > * { max-width: 100%; max-height: 46px; }
.gm-jd-tile--theme .gm-jd-tile-art > * { max-height: none; border-radius: 5px; }
.gm-jd-tile-name { font: 600 .72rem/1.2 var(--gm-display, "Space Grotesk", sans-serif); text-align: center; }
.gm-jd-tile[aria-pressed="true"] { border: 2px solid var(--gm-paper-ink, #13233F); box-shadow: 2px 2px 0 var(--gm-gold, #C39A4C); }
.gm-jd-tile.is-locked { opacity: .45; filter: grayscale(.85); }
.gm-jd-tile:focus-visible { outline: 2px solid var(--gm-gold, #C39A4C); outline-offset: 2px; }
.gm-jd-apply { justify-self: start; border: 0; background: transparent; padding: 2px 0; cursor: pointer; font: 700 .95rem var(--gm-display, "Space Grotesk", sans-serif); color: var(--gm-gold-ink, #806020); }
.gm-jd-apply::after { content: "\00a0→"; display: inline-block; transition: transform .15s ease; }
.gm-jd-apply:hover::after { transform: translateX(3px); }
.gm-jd-apply:disabled { color: var(--gm-success, #2f7d52); cursor: default; } .gm-jd-apply:disabled::after { content: ""; }
.gm-jd-apply[hidden] { display: none; }
.gm-jd-titles { display: flex; flex-wrap: wrap; gap: 10px; }
.gm-jd-title { all: unset; cursor: pointer; padding: 8px 13px; border: 1.3px solid var(--gm-paper-ink, #13233F); border-radius: 8px; background: var(--gm-surface, #FFFDF8); font: 600 .84rem var(--gm-display, "Space Grotesk", sans-serif); }
.gm-jd-title[aria-pressed="true"] { background: var(--gm-paper-ink, #13233F); color: var(--gm-field, #FBF6EA); }
.gm-jd-titles .gm-jd-info { flex-basis: 100%; }
/* My Journey's pages: one contents line (names and small gold dots), not a list of arrowed rows. */
/* Every name carries a leading dot; the list sits 20px left and is clipped there, so a wrapped line
   never starts with a dot (clip-path, not overflow, so the panel's layout is untouched). */
.gm-jd-pages ul { list-style: none; margin: 0 0 0 -20px; padding: 0; display: flex; flex-wrap: wrap; row-gap: 8px; clip-path: inset(-4px -4px -4px 20px); }
.gm-jd-pages li { display: inline-flex; align-items: baseline; }
.gm-jd-pages li::before { content: "·"; width: 20px; text-align: center; color: var(--gm-gold, #C39A4C); font-weight: 700; }
.gm-jd-page { color: var(--gm-paper-ink, #13233F); text-decoration: none; font: 600 .9rem var(--gm-display, "Space Grotesk", sans-serif); }
.gm-jd-page:hover, .gm-jd-page:focus-visible { text-decoration: underline; text-decoration-color: var(--gm-gold, #C39A4C); text-underline-offset: 4px; }
.gm-topbar-journey { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .gm-jd, .gm-jd-dim, .gm-journey-btn { transition: none; } }

/* ── the theme's Apply bar ── */
.gm-jd-applybar { display: grid; gap: 6px; padding: 12px 14px; border: 1.3px dashed var(--gm-line-strong, #D9C79C); border-radius: 10px; background: var(--gm-surface, #FFFDF8); }

/* ── stickers placed on a page (every app page and My Journey page) ── */
.stk-layer { position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 30; pointer-events: none; }
.stk-on { position: absolute; cursor: grab; touch-action: none; width: calc(64px * var(--stk-s, 1)); height: calc(64px * var(--stk-s, 1)); transform: translate(-50%, -50%) rotate(var(--stk-r, 0deg)); pointer-events: auto; }
.stk-on > svg.stk { display: block; width: 100%; height: 100%; }
.stk-on:focus-visible { outline: 2px dashed var(--gm-gold, #C39A4C); outline-offset: 4px; border-radius: 10px; }
.stk-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1.3px solid #13233F; background: #FBF6EA; display: none; place-items: center; cursor: pointer; }
.stk-on:hover :is(.stk-x, .stk-rot, .stk-size), .stk-on:focus-within :is(.stk-x, .stk-rot, .stk-size), .stk-on.is-editing :is(.stk-rot, .stk-size) { display: grid; }
.stk-rot, .stk-size { position: absolute; display: none; place-items: center; background: #FBF6EA; border: 1.3px solid #13233F; touch-action: none; }
.stk-rot { top: -20px; left: 50%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; cursor: grab; }
.stk-rot svg { width: 12px; height: 12px; fill: none; stroke: #13233F; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.stk-size { right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 3px; cursor: nwse-resize; }
.stk-x svg { width: 10px; height: 10px; stroke: #13233F; stroke-width: 2.4; fill: none; }
.stk-ghost { position: fixed; z-index: 300; width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none; transform: rotate(-6deg) scale(1.1); }
.gm-jd-grid--stickers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gm-jd-tile--sticker { cursor: grab; touch-action: none; }
.gm-jd.is-dragging { transform: translateX(104%); }   /* steps aside while a sticker is dragged out */

/* the equipped GuideMate's showpiece on the Coaching Center card (journey-dash.mjs perform) */
.gm-mascot-px-hop { position: relative; }
.gm-mascot-px-view { transform-origin: 50% 100%; }
.gm-journey-perform { position: absolute; left: 50%; transform: translateX(-50%); image-rendering: pixelated; pointer-events: none; }
.gm-mascot-say--right { left: calc(100% + 10px + var(--gm-mascot-reach, 0px)); }
.gm-mascot-say--left { right: calc(100% + 10px + var(--gm-mascot-reach, 0px)); }

/* ── Ink: its own currency (an ink drop, indigo), never gold like credits ── */
.mj-ink { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 6px; border: 1.3px solid #3F3A9C; border-radius: 999px; background: #EEEDFF; color: #2A2672; font: 600 .82rem/1.3 var(--gm-display, "Space Grotesk", sans-serif); white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: middle; }
.mj-ink .mj-ink-n { font-weight: 700; }   /* a span, not <b>: dark cards recolour <b>, the pill keeps its own ink */
.mj-ink-drop { width: 11px; height: 14px; flex: none; }
.mj-ink-drop path { fill: #4C46C4; stroke: #2A2672; stroke-width: 1.2; }
.mj-ink-drop path.hl { fill: none; stroke: #C9C6FF; stroke-linecap: round; }
.mj-ink--lg { font-size: 1.05rem; padding: 4px 13px 4px 9px; }
.mj-ink--lg .mj-ink-drop { width: 14px; height: 18px; }
.gm-jd-wallet { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.gm-jd-shop { font: 700 .88rem var(--gm-display, "Space Grotesk", sans-serif); color: var(--gm-paper-ink, #13233F); text-decoration: none; }
.gm-jd-shop::after { content: " →"; color: #3F3A9C; }
.gm-jd-shop:hover { color: #3F3A9C; }
