/* Odyssey Tutorial
   The lesson list and guide use the site's look (codex.css / landing.css).
   Everything prefixed dc- copies Discord's own message UI (dark theme), so the bot's screens look exactly like in Discord.
*/

/* ---------- Discord palette (dark theme, same in both site themes: most players use Discord dark) ---------- */
.tutorial-page {
  --dc-bg: #313338;
  --dc-bg-2: #2b2d31;
  --dc-bg-3: #1e1f22;
  --dc-hover: #2e3035;
  --dc-line: #3f4147;
  --dc-text: #dbdee1;
  --dc-head: #f2f3f5;
  --dc-muted: #949ba4;
  --dc-sub: #b5bac1;
  --dc-link: #00a8fc;
  --dc-blurple: #5865f2;
  --dc-blurple-h: #4752c4;
  --dc-grey: #4e5058;
  --dc-grey-h: #6d6f78;
  --dc-green: #248046;
  --dc-green-h: #1a6334;
  --dc-red: #da373c;
  --dc-red-h: #a12828;
  --dc-font: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --dc-mono: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', monospace;
  /* The tutorial's own pointers (dots, "press here", pulse, progress, key words) are green, not the site's orange,
     so they never read as one of the site's own buttons (owner's call) */
  --tt-hi: #23a55a;
  --tt-hi-rgb: 35, 165, 90;
  --tt-hi-text: #3ccf7a;
}
[data-theme="light"] .tutorial-page { --tt-hi-text: #15803d; }

/* ================= HUB: the lesson list as a campaign map ================= */
.tt-hub { padding-bottom: 1rem; }

/* --- First screen. Always dark, whatever the theme: the words sit on the game's art (like the home page) --- */
.tt-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1.6rem 0 0;
  background: #0a090c;
  border-bottom: 1px solid rgba(248, 148, 26, 0.22);
  color: #fff;
  --text-main: #fff;
  --text-muted: rgba(255, 255, 255, 0.82);
  --accent-text: #ffab45;
}
.tt-hero-art { position: absolute; inset: 0; z-index: -2; }
.tt-hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; display: block; transform-origin: 60% 40%; animation: tt-drift 36s ease-in-out infinite alternate; }
@keyframes tt-drift { to { transform: scale(1.09) translateY(-1.5%); } }
.tt-hero-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 9, 12, 0.5) 0%, rgba(10, 9, 12, 0.32) 28%, rgba(10, 9, 12, 0.86) 74%, #0a090c 100%),
    linear-gradient(90deg, rgba(10, 9, 12, 0.84) 0%, rgba(10, 9, 12, 0.4) 60%, rgba(10, 9, 12, 0.12) 100%);
}
/* Embers rising over the picture */
.tt-embers { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.tt-embers i { position: absolute; bottom: -12px; width: 4px; height: 4px; border-radius: 50%; background: #ffb24a; box-shadow: 0 0 8px 2px rgba(248, 148, 26, 0.7); opacity: 0; animation: tt-ember 10s linear infinite; }
.tt-embers i:nth-child(3n) { width: 3px; height: 3px; }
.tt-embers i:nth-child(4n) { width: 6px; height: 6px; filter: blur(1px); }
@keyframes tt-ember {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: 0.9; }
  75% { opacity: 0.45; }
  100% { transform: translate(46px, -560px); opacity: 0; }
}
.tt-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.tt-hero-grid > * { min-width: 0; }
.tt-hero .lp-kicker { background: rgba(10, 9, 12, 0.55); border-color: rgba(248, 148, 26, 0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tt-hero .lp-title { font-size: clamp(2.1rem, 9.4vw, 4.3rem); margin-top: 0.85rem; filter: drop-shadow(0 4px 28px rgba(0, 0, 0, 0.6)); }
/* The light theme darkens the orange word for white paper; here it sits on the picture */
[data-theme] .tutorial-page .tt-hero .lp-title span { background: linear-gradient(180deg, #ffd58a 0%, #f8941a 55%, #d9730b 100%); -webkit-background-clip: text; background-clip: text; }
.tt-hero .lp-lead { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6); }
.tt-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 1.4rem; }
.tt-hero-cta .lp-btn { max-width: 100%; height: auto; min-height: 58px; padding-top: 0.5rem; padding-bottom: 0.5rem; white-space: normal; text-align: left; }
.tt-hero-cta .lp-btn svg { flex-shrink: 0; }
.tt-cta-sub { font-size: 0.86rem; font-weight: 600; color: rgba(255, 255, 255, 0.74); }

/* Your journey: a ring of lessons done and the chapter you are on */
.tt-journey {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.05rem;
  border-radius: 20px;
  background: rgba(10, 9, 12, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tt-ring { position: relative; width: 88px; height: 88px; flex-shrink: 0; }
.tt-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tt-ring circle { fill: none; stroke-width: 8; }
.tt-ring-track { stroke: rgba(255, 255, 255, 0.14); }
.tt-ring-fill { stroke: var(--tt-hi); stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(var(--tt-hi-rgb), 0.6)); }
.tt-ring-num { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; font-family: var(--font-display); line-height: 1; }
.tt-ring-num b { font-size: 1.55rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tt-ring-num small { font-size: 0.8rem; font-weight: 700; color: rgba(255, 255, 255, 0.6); }
.tt-ring-num span { margin-top: 0.2rem; font-family: var(--font-sans); font-size: 0.66rem; font-weight: 600; color: rgba(255, 255, 255, 0.7); }
.tt-journey-label { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: #ffab45; }
.tt-journey-text b { display: block; margin-top: 0.15rem; font-family: var(--font-epic); font-size: 1.3rem; font-weight: 800; line-height: 1.15; }
.tt-journey-text p { margin-top: 0.2rem; font-size: 0.86rem; color: rgba(255, 255, 255, 0.78); }

/* The road: one stop per chapter, joined by a line that turns green behind you */
.tt-road { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 1.6rem; padding: 0.95rem 0 1rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.tt-road li { position: relative; min-width: 0; }
.tt-road li + li::before { content: ''; position: absolute; top: 18px; right: 50%; width: 100%; height: 2px; background: rgba(255, 255, 255, 0.16); }
.tt-road li.is-done + li::before { background: var(--tt-hi); }
.tt-road button { position: relative; width: 100%; min-height: 36px; padding: 0 0.1rem; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; background: none; border: 0; color: rgba(255, 255, 255, 0.78); cursor: pointer; }
.tt-road-node { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #17141b; border: 2px solid rgba(255, 255, 255, 0.24); color: #fff; font-family: var(--font-epic); font-size: 0.88rem; font-weight: 800; transition: transform var(--transition-fast), border-color var(--transition-fast); }
.tt-road button:hover .tt-road-node { transform: scale(1.1); border-color: #ffab45; }
.tt-road .is-now .tt-road-node { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(248, 148, 26, 0.2), 0 0 22px rgba(248, 148, 26, 0.6); }
.tt-road .is-done .tt-road-node { background: var(--tt-hi); border-color: var(--tt-hi); }
.tt-road .is-now button { color: #fff; }
.tt-road-name { font-size: 0.68rem; font-weight: 700; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.tt-road-count { font-size: 0.66rem; font-weight: 600; color: rgba(255, 255, 255, 0.55); font-variant-numeric: tabular-nums; }

/* --- The chapters --- */
.tt-map { display: grid; gap: 2.1rem; margin-top: 1.75rem; }
.tt-chapter { min-width: 0; scroll-margin-top: calc(var(--lp-header-h, 61px) + 12px); }
.tt-chapter-rail { display: none; }
.tt-chapter-main { min-width: 0; }
/* A chapter's banner: its own picture, always dark like the first screen */
.tt-chapter-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem 0.9rem;
  min-height: 116px;
  padding: 1rem;
  border-radius: 20px;
  background: #121015;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}
.tt-chapter-art { position: absolute; inset: 0; z-index: -1; display: flex; }
.tt-chapter-art img { flex: 1 1 0; min-width: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 24%; }
.tt-chapter-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 9, 12, 0.94) 0%, rgba(10, 9, 12, 0.8) 46%, rgba(10, 9, 12, 0.3) 100%); }
/* The chapter's number, on a diamond */
.tt-chapter-node { width: 38px; height: 38px; margin: 8px; display: grid; place-items: center; flex-shrink: 0; transform: rotate(45deg); border-radius: 9px; background: #17141b; border: 2px solid rgba(255, 255, 255, 0.24); color: #fff; }
.tt-chapter-node b { transform: rotate(-45deg); display: grid; place-items: center; font-family: var(--font-epic); font-size: 0.9rem; font-weight: 800; }
.tt-chapter.is-now .tt-chapter-node { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(248, 148, 26, 0.2), 0 0 22px rgba(248, 148, 26, 0.55); }
.tt-chapter.is-done .tt-chapter-node { background: var(--tt-hi); border-color: var(--tt-hi); }
.tt-chapter-kicker { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #ffab45; }
.tt-chapter-text .lp-h2 { font-size: 1.5rem; margin-top: 0.1rem; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7); }
.tt-chapter-text p { margin-top: 0.2rem; max-width: 34rem; font-size: 0.88rem; line-height: 1.45; color: rgba(255, 255, 255, 0.8); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }
.tt-chapter-prog { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.7rem; }
.tt-chapter-prog b { flex-shrink: 0; font-size: 0.76rem; font-weight: 700; color: rgba(255, 255, 255, 0.86); font-variant-numeric: tabular-nums; }
.tt-meter { flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.tt-meter i { display: block; height: 100%; border-radius: 999px; background: var(--tt-hi); }

/* --- Lesson cards. Phones: the picture on the left; wider screens: the picture on top --- */
.tt-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; margin-top: 0.7rem; }
.tt-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  min-width: 0;
  min-height: 116px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  text-decoration: none;
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-normal);
}
.tt-card:hover { border-color: var(--accent-border); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28); }
.tt-card-art { position: relative; overflow: hidden; background: #17141b; display: grid; place-items: center; }
.tt-card-art img:not(.tt-card-emoji) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 18%; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tt-card:hover .tt-card-art img:not(.tt-card-emoji) { transform: scale(1.06); }
.tt-card-emoji { width: 44px; height: 44px; object-fit: contain; }
.tt-card-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; padding: 0.7rem 0.8rem; }
.tt-card-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent-text); }
.tt-card-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(248, 148, 26, 0.6); animation: tt-beacon 2s infinite; }
@keyframes tt-beacon { 70%, 100% { box-shadow: 0 0 0 7px rgba(248, 148, 26, 0); } }
.tt-card h3 { font-family: var(--font-display); font-size: 1.06rem; font-weight: 700; line-height: 1.2; }
.tt-card p { font-size: 0.82rem; line-height: 1.42; color: var(--text-muted); }
.tt-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: auto; padding-top: 0.4rem; font-size: 0.76rem; font-weight: 700; color: var(--text-faint); }
.tt-card-go { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--accent-text); }
.tt-card-go svg { transition: transform var(--transition-fast); }
.tt-card:hover .tt-card-go svg { transform: translateX(3px); }
/* Next up: the one card that glows */
.tt-next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 12px 36px rgba(248, 148, 26, 0.2); }
.tt-next:hover { box-shadow: 0 0 0 1px var(--accent), 0 16px 44px rgba(248, 148, 26, 0.32); }
/* Done: a green seal on the picture */
.tt-done .tt-card-tag { color: var(--tt-hi-text); }
.tt-done .tt-card-art::after { content: '✓'; position: absolute; left: 8px; top: 8px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--tt-hi); color: #fff; font: 800 13px/1 var(--font-sans); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
/* A chapter with one lesson: one wide card */
.tt-card-wide { grid-template-columns: minmax(0, 1fr); }
.tt-card-wide .tt-card-art { aspect-ratio: 16 / 9; }
.tt-card-wide .tt-card-body { gap: 0.45rem; padding: 1rem 1rem 1.1rem; }
.tt-card-wide h3 { font-size: 1.5rem; font-weight: 800; }
.tt-card-wide p { font-size: 0.95rem; line-height: 1.55; }
.tt-card-wide .tt-card-foot { padding-top: 0.6rem; font-size: 0.84rem; }
.tt-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.15rem; }
.tt-chips span { font-size: 0.78rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--badge-bg); border: 1px solid var(--badge-border); color: var(--text-muted); }
.tt-go { pointer-events: none; }

/* --- Under the map: the video and the Commands page --- */
.tt-more { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; margin-top: 2.5rem; }
.tt-more a { display: flex; align-items: center; gap: 0.85rem; min-width: 0; padding: 0.9rem 1rem; border-radius: 16px; background: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-main); text-decoration: none; transition: border-color var(--transition-fast); }
.tt-more a:hover { border-color: var(--accent-border); }
.tt-more-icon { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font: 800 1.15rem/1 var(--font-display); }
.tt-more b { display: block; font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; }
.tt-more span span { display: block; font-size: 0.86rem; color: var(--text-muted); }

/* ================= LESSON: a Discord window with a coach (the guide) beside it ================= */
/* A lesson is a screen of its own, like an app: no site footer under it */
.tt-in-lesson .lp-footer { display: none; }
/* Phones: room under the Discord window for the guide's sheet (engine.js measures it) */
.tt-lesson-wrap { padding-top: 0.5rem; padding-bottom: calc(var(--tt-coach-h, 220px) + 1rem); }
.tt-topbar { display: flex; align-items: center; gap: 0.5rem; min-height: 40px; margin-bottom: 0.5rem; }
.tt-back, .tt-restart {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 0.6rem;
  border-radius: 999px;
  background: none;
  border: 0;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.tt-back { margin-left: -0.4rem; padding-left: 0.3rem; }
.tt-restart { margin-right: -0.4rem; }
.tt-back:hover, .tt-restart:hover { color: var(--accent-text); background: var(--bg-surface-elevated); }
.tt-crumb { flex: 1; min-width: 0; text-align: center; font-size: 0.82rem; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-crumb b { font-family: var(--font-display); font-weight: 700; color: var(--text-main); }
.tt-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.85rem; align-items: start; }
.tt-stage-col { min-width: 0; }

/* --- The coach: step x of y, what this screen is, the one thing to do next, the notes, Back / Next --- */
.tt-coach { min-width: 0; background: var(--bg-surface); }
/* The progress bar: one piece per step, in runs (the lesson's parts) */
.tt-segs { display: flex; gap: 5px; padding: 0.7rem 0 0.15rem; }
.tt-segs span { display: flex; gap: 2px; flex: 1 1 0; min-width: 0; }
.tt-segs i { flex: 1 1 0; min-width: 0; height: 5px; border-radius: 3px; background: var(--badge-border); transition: background 0.3s ease; }
.tt-segs i.done { background: var(--tt-hi); }
.tt-segs i.on { background: var(--tt-hi-text); box-shadow: 0 0 0 2px rgba(var(--tt-hi-rgb), 0.3); animation: tt-seg 1.6s ease-in-out infinite; }
@keyframes tt-seg { 50% { box-shadow: 0 0 0 4px rgba(var(--tt-hi-rgb), 0.08); } }
.tt-coach-meta { display: flex; align-items: center; gap: 0.5rem; min-height: 38px; }
.tt-step-n { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tt-hi-text); white-space: nowrap; }
.tt-step-part { flex: 1; min-width: 0; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-step-part:not(:empty)::before { content: '· '; }
.tt-coach-btn { width: 36px; height: 36px; flex-shrink: 0; display: none; place-items: center; border-radius: 10px; background: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); color: var(--text-muted); cursor: pointer; }
.tt-coach-btn svg { transition: transform var(--transition-fast); }
.tt-coach h2 { font-family: var(--font-display); font-size: 1.22rem; font-weight: 800; line-height: 1.2; }
.tt-guide-text { margin-top: 0.3rem; color: var(--text-main); font-size: 0.95rem; line-height: 1.5; }
.tt-guide-text b { color: var(--tt-hi-text); }
.tt-guide-text code, .tt-notes code, .tt-task code { font-size: 0.86em; padding: 0.05rem 0.35rem; border-radius: 6px; background: var(--bg-surface-elevated); }
.tt-more-btn { display: none; align-items: center; min-height: 36px; padding: 0; background: none; border: 0; color: var(--tt-hi-text); font-weight: 700; font-size: 0.86rem; cursor: pointer; }
.tt-notes { list-style: none; display: grid; gap: 0.3rem; margin-top: 0.7rem; }
.tt-notes li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  min-height: 36px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-muted);
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.tt-notes li:hover, .tt-notes li.on { background: var(--bg-surface-elevated); color: var(--text-main); }
.tt-notes b { color: var(--text-main); }
.tt-num {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: inline-grid; place-items: center;
  background: var(--tt-hi); color: #fff;
  font: 800 0.7rem/1 var(--font-sans);
  margin-top: 0.05rem;
}
/* "Your move": the one thing to do next, in big type (green, like every pointer of the tutorial's own) */
.tt-task {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  width: 100%;
  min-height: 48px;
  margin-top: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: rgba(var(--tt-hi-rgb), 0.12);
  border: 1px solid rgba(var(--tt-hi-rgb), 0.5);
  color: var(--text-main);
  font: inherit;
  text-align: left;
}
button.tt-task { cursor: pointer; transition: background var(--transition-fast); }
button.tt-task:hover { background: rgba(var(--tt-hi-rgb), 0.2); }
.tt-task-icon { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--tt-hi); color: #fff; font: 800 0.8rem/1 var(--font-sans); }
.tt-task-text { flex: 1 1 9rem; min-width: 0; font-size: 1rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.tt-task-text small { display: block; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tt-hi-text); }
.tt-task-text b { color: var(--tt-hi-text); }
.tt-fill { flex-shrink: 0; min-height: 36px; padding: 0 0.85rem; border-radius: 10px; border: 0; background: var(--tt-hi); color: #fff; font-weight: 700; font-size: 0.86rem; cursor: pointer; }
.tt-fill:hover { background: #1f9350; }
.tt-task-look { background: var(--bg-surface-elevated); border-color: var(--border-subtle); }
.tt-guide-actions { display: flex; gap: 0.5rem; margin-top: 0.65rem; }
.tt-guide-actions .lp-btn { height: 46px; flex: 1; }
.tt-keys { display: none; }

/* --- The end of a lesson --- */
.tt-finish-head { position: relative; display: grid; justify-items: center; gap: 0.5rem; padding: 0.9rem 0 0.2rem; text-align: center; }
.tt-finish-head .tt-coach-grip { position: absolute; right: 0; top: 0.4rem; }
.tt-finish-kicker { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tt-hi-text); }
.tt-finish-head h2 { margin-top: 0.15rem; font-family: var(--font-epic); font-size: 1.55rem; font-weight: 800; line-height: 1.15; }
/* The seal: a green tick that stamps in, a ring and a burst of sparks around it (once) */
.tt-seal { position: relative; width: 56px; height: 56px; }
.tt-seal svg { position: relative; width: 100%; height: 100%; display: block; }
.tt-seal circle { fill: var(--tt-hi); }
.tt-seal polyline { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; }
.tt-seal::before { content: ''; position: absolute; inset: 0; border-radius: 50%; }
.tt-cheer .tt-seal svg { animation: tt-seal 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.tt-cheer .tt-seal polyline { animation: tt-tick 0.4s 0.35s ease both; }
.tt-cheer .tt-seal::before { animation: tt-ring 1s 0.25s ease-out both; }
@keyframes tt-seal { from { transform: scale(0.3); opacity: 0; } }
@keyframes tt-tick { from { stroke-dashoffset: 30; } }
@keyframes tt-ring { from { box-shadow: 0 0 0 0 rgba(var(--tt-hi-rgb), 0.6); } to { box-shadow: 0 0 0 24px rgba(var(--tt-hi-rgb), 0); } }
.tt-sparks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.tt-sparks i { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--c); opacity: 0; animation: tt-spark 0.9s cubic-bezier(0.1, 0.7, 0.3, 1) both; }
.tt-sparks i:nth-child(odd) { width: 4px; height: 9px; border-radius: 2px; }
@keyframes tt-spark {
  0% { opacity: 1; transform: rotate(var(--a)) translateX(14px) scale(1); }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) scale(0.4); }
}
.tt-finish-body h3 { margin-top: 0.6rem; font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }
.tt-recap { margin-top: 0.8rem; }
.tt-recap > span { display: block; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.tt-recap ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.tt-recap li { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.22rem 0.6rem 0.22rem 0.45rem; border-radius: 999px; background: rgba(var(--tt-hi-rgb), 0.12); border: 1px solid rgba(var(--tt-hi-rgb), 0.35); font-size: 0.8rem; font-weight: 600; }
.tt-recap li svg { flex-shrink: 0; color: var(--tt-hi-text); }
.tt-cheer .tt-recap li { animation: tt-chip 0.35s ease both; animation-delay: calc(0.45s + var(--k, 0) * 60ms); }
@keyframes tt-chip { from { opacity: 0; transform: translateY(6px); } }
.tt-finish-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin-top: 0.85rem; }
.tt-finish-prog .tt-meter { flex: 1 1 80px; background: var(--badge-border); }
.tt-finish-prog b { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }
.tt-guide-done { display: grid; gap: 0.5rem; margin-top: 0.9rem; }
.tt-guide-done .lp-btn { height: auto; min-height: 48px; padding: 0.4rem 1rem; white-space: normal; text-align: center; }
.tt-finish-ready { font-size: 0.92rem; line-height: 1.5; color: var(--text-muted); }
.tt-finish-link { justify-self: center; display: inline-flex; align-items: center; min-height: 36px; font-size: 0.86rem; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.tt-finish-link:hover { text-decoration: underline; }

/* --- The short line over the foot of a lesson ("Lesson restarted." Undo) --- */
.tt-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tt-coach-h, 220px) + 10px);
  z-index: 85;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: max-content;
  max-width: calc(100vw - 1.5rem);
  padding: 0.4rem 0.45rem 0.4rem 0.9rem;
  border-radius: 12px;
  background: #201d25;
  border: 1px solid #3a3542;
  color: #f6f2ee;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.88rem;
  animation: tt-toast-in 0.25s ease;
}
.tt-toast button { flex-shrink: 0; min-height: 36px; padding: 0 0.8rem; border-radius: 9px; border: 0; background: var(--tt-hi); color: #fff; font-weight: 700; font-size: 0.84rem; cursor: pointer; }
@keyframes tt-toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* --- Phones and tablets: the coach is a sheet over the foot of the page, so the bot's screen keeps the rest.
       Closed it shows the first lines and what to do next; its arrow opens the whole text and the notes. --- */
@media (max-width: 959px) {
  .tt-coach {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    max-height: 78vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 1rem calc(0.8rem + var(--safe-bottom));
    border-radius: 18px 18px 0 0;
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -14px 44px rgba(0, 0, 0, 0.5);
  }
  [data-theme="light"] .tt-coach { box-shadow: 0 -10px 34px rgba(60, 35, 10, 0.2); }
  .tt-coach-btn { display: grid; }
  .tt-coach.open .tt-coach-grip svg { transform: rotate(180deg); }
  .tt-coach:not(.open) .tt-guide-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
  .tt-clipped:not(.open) .tt-more-btn { display: inline-flex; }
  .tt-coach:not(.open) .tt-notes, .tt-coach:not(.open) .tt-finish-body { display: none; }
  /* Back is the small arrow beside "Step x of y"; the row under the text is for Next alone */
  .tt-guide-actions [data-guide="back"], .tt-guide-actions.tt-no-next { display: none; }
  /* "Fill it in for me" is in the sheet, right under the message box: the line over the box only says what to type */
  .tt-input-hint { padding: 0.45rem 0.7rem; }
  .tt-input-hint button, .tt-input-hint i { display: none; }
}
@media (max-width: 959px) and (max-height: 640px) {
  .tt-coach:not(.open) .tt-guide-text { -webkit-line-clamp: 2; }
}

/* ================= DISCORD MESSAGE UI (dc-) ================= */
.dc-stage {
  position: relative;
  flex: 1 0 auto;
  background: var(--dc-bg);
  padding: 1rem 0.75rem 1.1rem 0.75rem;
  min-height: 230px;
  font-family: var(--dc-font);
  color: var(--dc-text);
  font-size: 15px;
  line-height: 1.375;
  overflow: hidden;
}
.dc-messages { display: flex; flex-direction: column; gap: 1.05rem; transition: opacity 0.25s ease; }
/* Waiting for the next command: the screen before stays, faded */
.dc-messages.dc-old { opacity: 0.45; }

/* A message: avatar + name line, then the content (plain text and/or a container) */
.dc-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; animation: dc-in 0.25s ease; margin: -4px -8px; padding: 4px 8px; border-radius: 6px; }
.dc-msg:hover { background: rgba(2, 2, 2, 0.06); } /* Discord's message hover */
@keyframes dc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* Only what is new moves (engine.js draw): a message already on screen stays still, one the bot edited in place fades over */
.dc-msg.dc-still { animation: none; }
.dc-msg.dc-edit { animation: dc-edit 0.28s ease; }
@keyframes dc-edit { from { opacity: 0.35; } }
.dc-reply { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; margin: 0 0 4px 20px; position: relative; font-size: 14px; color: var(--dc-sub); min-width: 0; }
.dc-reply::before { content: ''; position: absolute; left: -2px; top: 9px; width: 30px; height: 12px; border-left: 2px solid #4e5058; border-top: 2px solid #4e5058; border-top-left-radius: 6px; transform: translateX(-12px); }
.dc-reply .dc-av-sm { width: 16px; height: 16px; border-radius: 50%; margin-left: 22px; flex-shrink: 0; }
.dc-reply b { color: #c4c9ce; font-weight: 600; white-space: nowrap; }
.dc-reply span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dc-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; grid-row: span 2; }
.dc-av-letter { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--dc-blurple); grid-row: span 2; }
.dc-av-sm.dc-av-letter { width: 16px; height: 16px; font-size: 9px; grid-row: auto; }
.dc-head { display: flex; align-items: center; gap: 6px; min-width: 0; height: 22px; }
.dc-name { color: var(--dc-head); font-weight: 600; font-size: 16px; }
.dc-app { display: inline-flex; align-items: center; gap: 2px; background: var(--dc-blurple); color: #fff; font-size: 10px; font-weight: 600; height: 15px; padding: 0 4px; border-radius: 3px; letter-spacing: 0.02em; }
.dc-app svg { width: 10px; height: 10px; }
.dc-time { color: var(--dc-muted); font-size: 12px; margin-left: 2px; white-space: nowrap; }
.dc-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dc-plain { white-space: pre-wrap; overflow-wrap: anywhere; }
.dc-ephemeral { font-size: 12px; color: var(--dc-muted); display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.dc-ephemeral a { color: var(--dc-link); text-decoration: none; cursor: pointer; }
.dc-ephemeral a:hover { text-decoration: underline; }
.dc-ephemeral svg { width: 16px; height: 16px; }

/* Components V2 container */
.dc-container {
  position: relative;
  max-width: 560px;
  background: var(--dc-bg-2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dc-container.dc-accent { border-left: 4px solid var(--dc-accent, var(--dc-line)); padding-left: 14px; }
.dc-text { overflow-wrap: anywhere; min-width: 0; }
.dc-text p { margin: 0; min-height: 1.375em; }
.dc-text h1 { font-size: 24px; font-weight: 700; color: var(--dc-head); line-height: 1.33; margin: 2px 0; }
.dc-text h2 { font-size: 20px; font-weight: 700; color: var(--dc-head); line-height: 1.33; margin: 2px 0; }
.dc-text h3 { font-size: 16px; font-weight: 700; color: var(--dc-head); line-height: 1.375; margin: 2px 0; }
.dc-text .dc-subtext { font-size: 13px; color: var(--dc-muted); line-height: 1.3; }
.dc-text ul { margin: 0; padding-left: 1.25rem; }
.dc-quote { margin: 2px 0; padding: 0 8px 0 12px; border-left: 4px solid #4e5058; border-radius: 4px; } /* "> quote" */
.dc-text li { margin: 1px 0; }
.dc-text strong { font-weight: 700; color: var(--dc-head); }
.dc-text code {
  font-family: var(--dc-mono);
  font-size: 85%;
  background: var(--dc-bg-3);
  border: 1px solid #232428;
  border-radius: 4px;
  padding: 0 0.2em;
}
.dc-mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dc-ts { background: rgba(255, 255, 255, 0.06); border-radius: 3px; padding: 0 2px; }
.dc-emoji { width: 1.375em; height: 1.375em; object-fit: contain; vertical-align: -0.4em; display: inline-block; }
.dc-text h1 .dc-emoji, .dc-text h2 .dc-emoji { width: 1.2em; height: 1.2em; vertical-align: -0.25em; }
.dc-bar { display: inline-flex; vertical-align: -0.35em; }
.dc-bar img { width: 22px; height: 22px; margin-right: -2px; }

.dc-sep { height: 1px; background: var(--dc-line); margin: 4px 0; }
.dc-sep.dc-sep-lg { margin: 10px 0; }
.dc-sep.dc-sep-hidden { background: transparent; margin: 0; height: 4px; }

.dc-section { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.dc-section > .dc-text { flex: 1; }
.dc-section.dc-btn-acc { align-items: center; }
.dc-thumb { width: 85px; height: 85px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--dc-bg-3); }

/* Like Discord, a gallery picture shows whole at its own shape: 16:9 art fills the width, portrait class art (3:4) is
   capped in height. aspect-ratio (set per picture by discord.js) keeps its space while it loads. */
.dc-gallery { max-width: 100%; }
.dc-gallery img { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--dc-bg-3); }
.dc-gallery img.dc-portrait { width: min(100%, 315px); }

.dc-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }

/* Buttons */
.dc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  min-width: 52px;
  padding: 2px 14px;
  border: none;
  border-radius: 8px;
  font: 500 14px/16px var(--dc-font);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.17s ease;
  -webkit-tap-highlight-color: transparent;
}
.dc-btn img { width: 18px; height: 18px; object-fit: contain; }
.dc-btn-emoji-only { padding: 2px 10px; min-width: 44px; }
.dc-primary { background: var(--dc-blurple); }
.dc-primary:hover { background: var(--dc-blurple-h); }
.dc-secondary { background: var(--dc-grey); }
.dc-secondary:hover { background: var(--dc-grey-h); }
.dc-success { background: var(--dc-green); }
.dc-success:hover { background: var(--dc-green-h); }
.dc-danger { background: var(--dc-red); }
.dc-danger:hover { background: var(--dc-red-h); }
.dc-link { background: var(--dc-grey); }
.dc-link:hover { background: var(--dc-grey-h); }
.dc-link svg { width: 16px; height: 16px; }
.dc-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Select menu */
.dc-select-wrap { position: relative; width: 100%; max-width: 100%; }
.dc-select {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--dc-bg-3);
  border-radius: 8px;
  background: var(--dc-bg-3);
  color: var(--dc-text);
  font: 500 15px/20px var(--dc-font);
  cursor: pointer;
  text-align: left;
}
.dc-select:hover { border-color: #000; }
.dc-select .dc-ph { color: var(--dc-muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-select .dc-val { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-select img { width: 22px; height: 22px; object-fit: contain; }
.dc-select svg { flex-shrink: 0; color: var(--dc-sub); transition: transform 0.15s ease; }
.dc-select-wrap.open .dc-select { border-color: var(--dc-bg-3); border-radius: 8px 8px 0 0; }
.dc-select-wrap.open .dc-select svg { transform: rotate(180deg); }
.dc-select:disabled { opacity: 0.5; cursor: not-allowed; }
.dc-menu {
  display: none;
  position: relative;
  max-height: 280px;
  overflow-y: auto;
  background: var(--dc-bg-2);
  border: 1px solid var(--dc-bg-3);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
  z-index: 5;
}
.dc-select-wrap.open .dc-menu { display: block; }
.dc-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: none; background: none; color: var(--dc-text); text-align: left; cursor: pointer; font-family: var(--dc-font); }
.dc-opt:hover, .dc-opt:focus-visible { background: var(--dc-hover); outline: none; }
.dc-opt img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.dc-opt span { display: flex; flex-direction: column; min-width: 0; }
.dc-opt b { font-weight: 500; font-size: 15px; color: var(--dc-text); }
.dc-opt small { font-size: 12.5px; color: var(--dc-sub); line-height: 1.3; }
.dc-opt.dc-opt-on b { color: #fff; }
.dc-opt-check { margin-left: auto; color: var(--dc-blurple); font-weight: 800; }

/* Old-style embed (a few bot replies still use one) */
.dc-embed { max-width: 520px; background: var(--dc-bg-2); border-left: 4px solid var(--dc-accent, #1e1f22); border-radius: 4px; padding: 8px 16px 16px 12px; display: grid; gap: 8px; }
.dc-embed-title { font-weight: 600; color: var(--dc-head); font-size: 16px; margin-top: 8px; }
.dc-embed .dc-text { font-size: 14px; }

/* Modal (pop-up form) */
.dc-modal-back { position: fixed; inset: 0; z-index: 600; background: rgba(0, 0, 0, 0.7); display: grid; place-items: center; padding: 1rem; font-family: var(--dc-font); }
.dc-modal-back[hidden] { display: none; }
.dc-modal { width: 100%; max-width: 440px; background: var(--dc-bg); border-radius: 8px; overflow: hidden; color: var(--dc-text); animation: dc-pop 0.2s ease; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }
@keyframes dc-pop { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
.dc-modal-head { display: flex; align-items: center; gap: 10px; padding: 16px; }
.dc-modal-head img { width: 24px; height: 24px; border-radius: 50%; }
.dc-modal-head h3 { font-size: 20px; font-weight: 700; color: var(--dc-head); flex: 1; }
.dc-modal-x { background: none; border: none; color: var(--dc-sub); cursor: pointer; padding: 4px; }
.dc-modal-body { padding: 0 16px 20px; }
.dc-modal-body label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--dc-sub); margin-bottom: 8px; letter-spacing: 0.02em; }
.dc-modal-body label i { color: var(--dc-red); font-style: normal; }
.dc-modal-body input { width: 100%; height: 40px; padding: 10px; border: none; border-radius: 4px; background: var(--dc-bg-3); color: var(--dc-text); font: 16px var(--dc-font); outline: none; }
.dc-modal-body input:focus { box-shadow: 0 0 0 2px var(--dc-blurple); }
.dc-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px; background: var(--dc-bg-2); }
.dc-modal-cancel { background: none; border: none; color: #fff; font: 500 14px var(--dc-font); padding: 0 16px; cursor: pointer; }
.dc-modal-cancel:hover { text-decoration: underline; }

/* The Discord window around the bot's screens: a title bar like the home page's, the messages, the message box */
.dc-win {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--dc-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(248, 148, 26, 0.08);
  font-family: var(--dc-font);
}
[data-theme="light"] .dc-win { box-shadow: 0 18px 50px rgba(60, 35, 10, 0.22); }
.dc-win-bar { display: flex; align-items: center; gap: 0.55rem; flex-shrink: 0; height: 38px; padding: 0 0.85rem; background: #2b2d31; border-bottom: 1px solid #1e1f22; color: var(--dc-muted); font-size: 0.86rem; font-weight: 500; }
.dc-win-bar i { width: 9px; height: 9px; border-radius: 50%; background: #4e5058; }
.dc-win-bar span { margin-left: 0.35rem; }
.dc-win-bar b { color: var(--dc-head); font-weight: 600; }
.dc-scroll { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; scrollbar-width: thin; scrollbar-color: #1a1b1e transparent; }
/* What Discord shows at the top of an empty channel */
.dc-start { padding: 0.75rem 0.25rem 0.25rem; }
.dc-start-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; background: #41434a; color: #fff; font-size: 34px; font-weight: 500; line-height: 1; }
.dc-start h3 { margin-top: 0.6rem; font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--dc-head); }
.dc-start p { margin-top: 0.3rem; font-size: 15px; color: var(--dc-sub); }
.dc-start .tt-start-tip { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--dc-line); font-size: 14px; color: var(--dc-muted); }

/* The message box, at the foot of the window */
.dc-input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  height: 46px;
  margin: 0.25rem 0.75rem 0.75rem;
  padding: 0 6px 0 14px;
  border-radius: 8px;
  background: #383a40;
  font-family: var(--dc-font);
  transition: box-shadow 0.2s ease;
}
.dc-input.ready { box-shadow: 0 0 0 2px var(--tt-hi); }
.dc-input-plus { width: 24px; height: 24px; border-radius: 50%; background: #b5bac1; color: #383a40; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; line-height: 1; }
/* What is typed is drawn by the mirror behind the box (with "@Odyssey" as a mention); the box's own text is see-through */
.dc-input-field { position: relative; flex: 1; min-width: 0; height: 100%; }
.dc-input-mirror { position: absolute; inset: 0; overflow: hidden; white-space: pre; font: 16px/46px var(--dc-font); color: var(--dc-text); pointer-events: none; }
.dc-input-mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; }
.dc-input input { position: relative; display: block; width: 100%; height: 100%; padding: 0; background: none; border: none; outline: none; color: transparent; caret-color: var(--dc-text); font: 16px var(--dc-font); }
.dc-input input::placeholder { color: #6d6f78; }
.dc-input input:disabled { cursor: not-allowed; }
.dc-input-icons { display: none; align-items: center; gap: 10px; flex-shrink: 0; color: #b5bac1; }
.dc-input-gif { padding: 3px 4px; border-radius: 4px; background: #b5bac1; color: #383a40; font: 800 10px/1 var(--dc-font); }
.dc-input-send { width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px; border: none; background: none; color: #b5bac1; cursor: pointer; display: grid; place-items: center; }
.dc-input.ready .dc-input-send { color: #3ccf7a; }
.dc-input.off { opacity: 0.55; }
/* The tutorial's own line over the box: what to type (green edge: it is not Discord's) */
.tt-input-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.4rem; flex-shrink: 0; margin: 0.25rem 0.75rem 0; padding: 0.2rem 0.7rem; border-radius: 8px 8px 0 0; background: #2b2d31; border-left: 3px solid var(--tt-hi); color: var(--dc-sub); font: 0.84rem/1.4 var(--font-sans); }
.tt-input-hint:empty { display: none; }
.tt-input-hint:not(:empty) + .dc-input { margin-top: 0; border-radius: 0 0 8px 8px; }
.tt-input-hint b { color: var(--dc-head); }
.tt-input-hint i { font-style: normal; }
.tt-input-hint button { min-height: 36px; padding: 0; background: none; border: none; color: #3ccf7a; font: inherit; font-weight: 700; cursor: pointer; }
.tt-input-hint button:hover { text-decoration: underline; }
.tt-input-hint .warn { color: #f87171; }

/* ================= BUBBLES (the guide's notes on top of the bot's screens) ================= */
.tt-bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.tt-dot {
  position: absolute;
  width: 26px; height: 26px;
  padding: 0;
  border-radius: 50%;
  background: var(--tt-hi);
  color: #fff;
  border: 2px solid #313338;
  font: 800 12px/22px var(--font-sans);
  text-align: center;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  animation: tt-dot-in 0.35s ease backwards;
}
.tt-dot::after { content: ''; position: absolute; inset: -7px; } /* a finger-sized place to tap */
.tt-dot.on { background: #fff; color: #15803d; box-shadow: 0 0 0 4px rgba(var(--tt-hi-rgb), 0.5), 0 2px 8px rgba(0, 0, 0, 0.45); }
@keyframes tt-dot-in { from { transform: translate(-50%, -50%) scale(0); } }
/* A note: a paper card, so it never reads as part of Discord */
.tt-pop {
  position: absolute;
  z-index: 1; /* over the other notes' dots */
  width: max-content;
  max-width: min(300px, calc(100% - 16px));
  padding: 0.6rem 0.75rem;
  border-radius: 14px;
  background: #fff8ee;
  color: #241707;
  font: 500 13.5px/1.45 var(--font-sans);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  animation: dc-pop 0.18s ease;
}
.tt-pop b { color: #8a4a00; }
.tt-pop code { font-size: 0.9em; background: rgba(0, 0, 0, 0.07); border-radius: 4px; padding: 0 0.25em; }
.tt-pop::after { content: ''; position: absolute; left: var(--tail, 50%); width: 12px; height: 12px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.tt-pop.below::after { top: -5px; }
.tt-pop.above::after { bottom: -5px; }
.tt-pop-n { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 0.4rem; border-radius: 50%; background: var(--tt-hi); color: #fff; font: 800 11px/1 var(--font-sans); vertical-align: 1px; }
.tt-pop-next { display: flex; align-items: center; min-height: 36px; margin: 0.5rem 0 0 auto; padding: 0 0.8rem; border-radius: 9px; border: 0; background: #241707; color: #fff8ee; font: 700 12.5px/1 var(--font-sans); cursor: pointer; }
/* "Press here": green, with a pointer, nodding at the thing to press */
.tt-pop.tt-act { display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.75rem; background: var(--tt-hi); color: #fff; font-weight: 700; pointer-events: none; animation: dc-pop 0.18s ease, tt-nod 1.3s ease-in-out 0.18s infinite; } /* taps go through to what's under it */
.tt-pop.tt-act b { color: inherit; }
.tt-pop.tt-act svg { flex-shrink: 0; }
.tt-pop.tt-act.below { animation-name: dc-pop, tt-nod-up; }
@keyframes tt-nod { 50% { transform: translateY(4px); } }
@keyframes tt-nod-up { 50% { transform: translateY(-4px); } }

.tt-still .tt-dot, .tt-still .tt-pop { animation: none; }
.tt-still .tt-pop.tt-act { animation: tt-nod 1.3s ease-in-out infinite; }
.tt-still .tt-pop.tt-act.below { animation-name: tt-nod-up; }

/* The thing to press next: a green ring that sends out ripples */
.tt-target { position: relative; z-index: 2; outline: 2px solid var(--tt-hi); outline-offset: 2px; animation: tt-pulse 1.5s ease-out infinite; }
.dc-row.tt-target { border-radius: 10px; outline-offset: 4px; }
@keyframes tt-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--tt-hi-rgb), 0.7); }
  100% { box-shadow: 0 0 0 12px rgba(var(--tt-hi-rgb), 0); }
}
.tt-lit { outline: 2px solid var(--tt-hi); outline-offset: 3px; border-radius: 6px; transition: outline-color 0.2s ease; }
.tt-shake { animation: tt-shake 0.35s ease; }
@keyframes tt-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ================= Tablet / desktop ================= */
@media (min-width: 640px) {
  .tt-hero { padding-top: 2.25rem; }
  .tt-road-node { width: 44px; height: 44px; font-size: 1rem; }
  .tt-road li + li::before { top: 21px; }
  .tt-road-name { font-size: 0.82rem; }
  .tt-road-count { font-size: 0.72rem; }
  .tt-chapter-head { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 136px; padding: 1.2rem 1.3rem; }
  .tt-chapter-prog { grid-column: auto; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
  .tt-meter { flex: none; width: 130px; }
  .tt-chapter-text .lp-h2 { font-size: 1.75rem; }
  .tt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .tt-card { grid-template-columns: 124px minmax(0, 1fr); }
  .tt-card-wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .tt-card-wide .tt-card-art { aspect-ratio: auto; min-height: 250px; }
  .tt-card-wide .tt-card-body { justify-content: center; padding: 1.5rem 1.6rem; }
  .tt-card-wide .tt-card-foot { margin-top: 0; }
  .tt-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-stage { padding: 1.25rem 1.25rem 1.4rem 1rem; }
}

@media (min-width: 960px) {
  .tt-hero { padding-top: 3.75rem; }
  .tt-hero-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: end; gap: 3rem; min-height: 320px; }
  .tt-journey { padding: 1.2rem 1.3rem; }
  .tt-ring { width: 104px; height: 104px; }
  .tt-road { margin-top: 2.5rem; padding: 1.2rem 0 1.4rem; }
  .tt-road-name { font-size: 0.92rem; }
  /* The chapters hang off a dotted trail down the left, each numbered diamond a stop on it */
  .tt-map { gap: 3rem; margin-top: 2.75rem; }
  .tt-chapter { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 1.1rem; }
  .tt-chapter-rail { display: block; position: relative; }
  .tt-chapter-rail .tt-chapter-node { position: relative; z-index: 1; margin: 49px auto 0; }
  .tt-chapter-rail::after { content: ''; position: absolute; left: 50%; top: 101px; bottom: calc(-3rem - 37px); width: 2px; margin-left: -1px; background: repeating-linear-gradient(to bottom, var(--text-faint) 0 6px, transparent 6px 13px); opacity: 0.55; }
  .tt-chapter.is-done .tt-chapter-rail::after { background: repeating-linear-gradient(to bottom, var(--tt-hi) 0 6px, transparent 6px 13px); opacity: 1; }
  .tt-chapter:last-child .tt-chapter-rail::after { display: none; }
  .tt-chapter-rail .tt-chapter-node { background: var(--bg-surface); border-color: var(--border-subtle); color: var(--text-main); }
  .tt-chapter.is-done .tt-chapter-rail .tt-chapter-node { background: var(--tt-hi); border-color: var(--tt-hi); color: #fff; }
  .tt-chapter.is-now .tt-chapter-rail .tt-chapter-node { border-color: var(--accent); }
  .tt-chapter-head { grid-template-columns: minmax(0, 1fr) auto; padding: 1.3rem 1.6rem; }
  .tt-chapter-head .tt-chapter-node { display: none; }
  .tt-chapter-text .lp-h2 { font-size: 2rem; }
  .tt-chapter-text p { font-size: 0.95rem; }
  /* Cards turn upright: the picture on top. 12 tracks, so 3, 4, 2 + 3 or 6 lessons all fill their rows */
  .tt-cards { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.9rem; margin-top: 0.9rem; }
  .tt-card { grid-column: span 4; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 0; }
  .tt-card-art { aspect-ratio: 16 / 9; }
  .tt-card-body { padding: 0.9rem 1rem 1rem; }
  .tt-cards[data-n="2"] .tt-card, .tt-cards[data-n="5"] .tt-card:nth-child(-n + 2) { grid-column: span 6; }
  .tt-cards[data-n="5"] .tt-card:nth-child(-n + 2) .tt-card-art { aspect-ratio: 12 / 5; }
  .tt-cards[data-n="4"] .tt-card { grid-column: span 3; }
  /* Class guides: tall cards, the whole portrait */
  .tt-cards-portrait .tt-card-art { aspect-ratio: 4 / 5; }
  .tt-cards-portrait .tt-card-art img:not(.tt-card-emoji) { object-position: center top; }
  .tt-card.tt-card-wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-rows: auto; }
  .tt-card-wide .tt-card-art { min-height: 280px; }
  .tt-card-wide .tt-card-body { padding: 1.75rem 2rem; gap: 0.6rem; }
  .tt-card-wide h3 { font-size: 1.8rem; }
  /* The lesson: the coach is a card on the left that stays put; the Discord window fills the rest of the screen
     and scrolls on its own, like Discord */
  .tt-lesson-wrap { padding-bottom: 1rem; }
  .tt-layout { grid-template-columns: 380px minmax(0, 1fr); gap: 1.25rem; }
  .tt-coach { position: sticky; top: calc(var(--lp-header-h, 61px) + 0.75rem); max-height: calc(100vh - var(--lp-header-h, 61px) - 1.5rem); overflow-y: auto; padding: 0.3rem 1.25rem 1.25rem; border-radius: 20px; border: 1px solid var(--border-subtle); box-shadow: var(--shadow-md); }
  .tt-coach h2 { font-size: 1.5rem; }
  .tt-guide-text { font-size: 1rem; }
  .tt-task { margin-top: 0.9rem; padding: 0.7rem 0.8rem; }
  .tt-task-text { font-size: 1.08rem; }
  .tt-guide-actions { margin-top: 0.9rem; }
  .tt-guide-actions [data-guide="back"] { flex: 0 0 auto; }
  .tt-finish-head h2 { font-size: 1.8rem; }
  .dc-win { height: calc(100vh - var(--lp-header-h, 61px) - 4.6rem); min-height: 460px; }
  .dc-scroll { overflow-y: auto; }
  .tt-toast { bottom: 1.25rem; }
}
@media (min-width: 960px) and (hover: hover) {
  .tt-keys { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; margin-top: 0.9rem; padding-top: 0.75rem; border-top: 1px solid var(--border-subtle); font-size: 0.74rem; color: var(--text-faint); }
  .tt-keys span { white-space: nowrap; }
  .tt-keys kbd { display: inline-block; min-width: 22px; margin-right: 0.15rem; padding: 0.1rem 0.35rem; border-radius: 6px; background: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); color: var(--text-muted); font: 600 0.72rem/1.4 var(--font-sans); text-align: center; }
}
@media (min-width: 480px) {
  .dc-input-icons { display: flex; }
}

@media (max-width: 380px) {
  .tt-road-name { font-size: 0.62rem; }
  .tt-ring { width: 76px; height: 76px; }
  .tt-ring-num b { font-size: 1.3rem; }
  .tt-journey { gap: 0.75rem; padding: 0.85rem; }
  .tt-card { grid-template-columns: 84px minmax(0, 1fr); }
  .tt-card-wide { grid-template-columns: minmax(0, 1fr); }
  .tt-chapter-head { padding: 0.85rem; }
  .dc-stage { padding: 0.85rem 0.5rem 1rem; font-size: 14px; }
  .dc-msg { grid-template-columns: 32px minmax(0, 1fr); column-gap: 8px; }
  .dc-av, .dc-av-letter { width: 32px; height: 32px; }
  .dc-container { padding: 12px; }
  .dc-thumb { width: 64px; height: 64px; }
  .dc-btn { padding: 2px 10px; }
  .dc-bar img { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .tt-target, .tt-dot, .dc-msg, .tt-pop, .dc-modal, .tt-segs i, .tt-toast, .tt-cheer .tt-seal svg, .tt-cheer .tt-seal polyline, .tt-cheer .tt-seal::before, .tt-cheer .tt-recap li { animation: none !important; }
  .tt-sparks { display: none; }
  .dc-messages, .tt-segs i { transition: none; }
  .tt-hero-art img, .tt-card-tag i { animation: none; }
  .tt-embers { display: none; }
  .tt-card, .tt-card-art img, .tt-card-go svg, .tt-road-node { transition: none; }
  .tt-card:hover, .tt-card:hover .tt-card-art img:not(.tt-card-emoji), .tt-road button:hover .tt-road-node { transform: none; }
}
