/* ============================================
   INTENTIONAL YOUTUBE — Design System
   Primary:    #3D6B4F (dark forest green) ← updated June 2026 from #5D7052
               Used for all btn-primary buttons and branding icon circles.
               Source: matched to the hero CTA button color in the extension.
   Secondary:  #5D7052 (lighter forest green) — retained for SVG accents,
               achievement badges, calendar block, and subtle green fills.
   Background: #E8E5E0 (warm off-white)
   Yellow:     #E8B71C (amber)
   Dark text:  #3D3832 (near black)
   Light green:#D4E3CC
   Muted:      #B5A08F, #C9B8A0, #7A7269
   White:      #FDFCFB
   Font:       Inter
============================================ */

/* Inter v20 — self-hosted; no external request on every app load.
   All four weights (400–700) use the same WOFF2 file per subset
   (Inter v20 is a variable font), so one @font-face per subset covers
   the full 400 700 range. Files live in fonts/ beside app.css. */
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-v20-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-v20-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-v20-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-v20-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-v20-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-v20-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-v20-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #E8E5E0;
  color: #3D3832;
  min-height: 100vh;
}

/* ---- SCREENS ---- */
.screen {
  display: none;
  min-height: 100vh;
}
.screen.active {
  display: block;
}

/* ---- TAKE A BREAK ---- */
/* Deliberately blank screen — just the page background and one button,
   centered, so the planned-time-up break feels like a clean stop. */
.break-screen-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px;
}
.break-continue-btn {
  width: auto;
  max-width: 320px;
}

/* ---- TOP NAV (Home only) ---- */
.top-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 40px;
  background: #FDFCFB;
  border-bottom: 1px solid #E8E5E0;
}
.logo {
  width: 38px; height: 38px;
  background: #D4E3CC;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #5D7052;
  flex-shrink: 0;
}
.top-nav nav {
  display: flex;
  gap: 24px;
  flex: 1;
}
.nav-link {
  text-decoration: none;
  color: #7A7269;
  font-size: 14px;
  font-weight: 500;
}
.nav-link.active {
  color: #3D3832;
  border-bottom: 2px solid #3D3832;
  padding-bottom: 2px;
}
.avatar {
  width: 34px; height: 34px;
  background: #D4E3CC;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- FLOW SCREENS ---- */
.flow-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 52px 40px 40px;
}
.flow-screen-title {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
}
.flow-question {
  font-size: 21px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 22px;
  line-height: 1.3;
}

/* Progress dots */
.progress-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #C9B8A0;
}
.dot.done { background: #5D7052; }
.dot.active { background: #5D7052; }
.dot-line {
  width: 24px; height: 2px;
  background: #C9B8A0;
}
.dot-line.done { background: #5D7052; }

/* Privacy badge */
.privacy-badge {
  background: #D4E3CC;
  border-radius: 999px;
  padding: 10px 22px;
  text-align: center;
  font-size: 13px;
  color: #5D7052;
  font-weight: 500;
  margin-bottom: 24px;
  display: inline-block;
  width: 100%;
}

/* Example box */
.example-box {
  background: #F0EFEC;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
  font-size: 14px;
  color: #3D3832;
}
.example-box strong { display: block; margin-bottom: 6px; }
.example-box ul { padding-left: 18px; }
.example-box li { margin-top: 4px; color: #7A7269; }

/* Goal display (read-only) */
.goal-display {
  background: #FDFCFB;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  margin-bottom: 20px;
  color: #3D3832;
  box-shadow: 0 1px 4px rgba(61,56,50,0.07);
  min-height: 48px;
}

/* Select label */
.select-label {
  font-size: 14px;
  color: #7A7269;
  margin-bottom: 12px;
}

/* ---- INPUTS ---- */
textarea.text-input,
input.text-input {
  width: 100%;
  background: #FDFCFB;
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #3D3832;
  outline: none;
  box-shadow: 0 1px 4px rgba(61,56,50,0.07);
  margin-bottom: 22px;
  display: block;
}
textarea.text-input {
  resize: vertical;
  min-height: 90px;
}
input.text-input {
  height: 52px;
}
.text-input::placeholder { color: #B5A08F; }
.text-input:focus {
  box-shadow: 0 0 0 2px #5D7052;
}

/* Emotion reason field */
.emotion-reason-field {
  font-size: 15px;
  background: #FDFCFB;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(61,56,50,0.07);
  margin-bottom: 22px;
}
.emotion-reason-field .emotion-prefix {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #3D3832;
}
.emotion-reason-field textarea {
  width: 100%;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #3D3832;
  resize: none;
  min-height: 80px;
  background: transparent;
}
.emotion-reason-field textarea::placeholder { color: #B5A08F; }

/* ---- PILL BUTTONS ---- */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.pill {
  background: #FDFCFB;
  border: 1.5px solid #E8E5E0;
  border-radius: 999px;
  padding: 9px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #3D3832;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
}
.pill:hover {
  border-color: #5D7052;
  background: #EEF4EB;
}
.pill.selected {
  background: #5D7052;
  border-color: #5D7052;
  color: #FDFCFB;
}

/* Sessions over 30 minutes get a warning-red treatment, since long
   sessions work against the app's "watch with intention" goal. */
.pill-long {
  background: #FBDDD9;
  border-color: #F0B8B1;
  color: #B8453B;
}
.pill-long:hover {
  border-color: #C0524A;
  background: #F7C8C2;
}
.pill-long.selected {
  background: #C0524A;
  border-color: #C0524A;
  color: #FDFCFB;
}

/* ---- ACTION BUTTONS ---- */
.btn-primary {
  background: #3D6B4F;
  color: #FDFCFB;
  border: none;
  border-radius: 999px;
  padding: 15px 36px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  width: 100%;
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  background: #FDFCFB;
  color: #3D3832;
  border: 1.5px solid #E8E5E0;
  border-radius: 999px;
  padding: 15px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-secondary:hover { background: #F0EFEC; }

.btn-exit {
  background: #FDFCFB;
  color: #3D3832;
  border: 2px solid #E8B71C;
  border-radius: 999px;
  padding: 13px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
  transition: opacity 0.15s;
}
.btn-exit:hover { opacity: 0.88; }

.btn-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-top: 8px;
}
.btn-row .btn-primary { flex: 1; }

/* Video series preview: Back is small and secondary, Continue is the clear
   primary action on the same row. The "choose manually" option sits further
   below with a green outline to mark it as a distinct, alternate path. */
.series-primary-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-top: 8px;
}
.series-back-btn {
  flex: 0 0 30%;
}
.series-continue-btn {
  flex: 1;
}
.series-manual-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 88%;
  margin: 24px auto 0;
  border: 1.5px solid #5D7052;
}
.series-manual-icon {
  font-size: 16px;
}

/* ---- SCHEDULE SCREEN ---- */

/* Custom duration input */
.custom-duration {
  margin-bottom: 22px;
}
.custom-duration-label {
  display: block;
  font-size: 14px;
  color: #7A7269;
  margin-bottom: 10px;
}
.duration-input-group {
  display: flex;
  gap: 12px;
}
.duration-spinner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FDFCFB;
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 1px 4px rgba(61,56,50,0.07);
}
.duration-spinner input {
  width: 36px;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #3D3832;
  text-align: right;
  background: transparent;
  -moz-appearance: textfield;
}
.duration-spinner input::-webkit-outer-spin-button,
.duration-spinner input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.duration-spinner .spinner-unit {
  font-size: 14px;
  color: #7A7269;
}
.spinner-arrows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.spinner-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 9px;
  line-height: 1;
  color: #B5A08F;
  padding: 2px;
}
.spinner-btn:hover { color: #5D7052; }

/* Confirmation pill */
.confirm-pill {
  background: #D4E3CC;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 14px;
  color: #3D3832;
  text-align: center;
  margin-bottom: 8px;
}
.confirm-pill strong { color: #5D7052; }
.long-session-note {
  font-size: 13px;
  color: #7A7269;
  text-align: center;
  margin-bottom: 18px;
}

/* Side-by-side layout: pie chart on the left, calendar on the right, equal height */
.schedule-impact-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 18px;
}
.schedule-impact-row .time-breakdown,
.schedule-impact-row .calendar-day-widget {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}
.schedule-impact-row .breakdown-content {
  flex: 1;
  flex-direction: column;
  gap: 14px;
}
.schedule-impact-row .legend-item {
  min-width: 0;
}

/* Time breakdown (donut chart) */
.time-breakdown {
  background: #FDFCFB;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(61,56,50,0.07);
}
.breakdown-title {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}
.breakdown-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.breakdown-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #3D3832;
  min-width: 130px;
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-value {
  margin-left: auto;
  color: #7A7269;
  padding-left: 16px;
}

/* Calendar bar widget (card wrapper reused by Screen 8's session timelines) */
.calendar-bar-widget {
  background: #FDFCFB;
  border-radius: 14px;
  padding: 20px 16px 12px;
  margin-bottom: 22px;
  box-shadow: 0 1px 4px rgba(61,56,50,0.07);
}

/* Calendar day view (Schedule screen): Google-Calendar-style vertical timeline */
.calendar-day-widget {
  background: #FDFCFB;
  border-radius: 14px;
  padding: 16px 14px;
  box-shadow: 0 1px 4px rgba(61,56,50,0.07);
}
.calendar-day-track {
  position: relative;
  margin-top: 4px;
}
.calendar-hour-row {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
}
.calendar-hour-label {
  width: 32px;
  flex-shrink: 0;
  font-size: 9px;
  color: #B5A08F;
  text-align: right;
  padding-right: 6px;
  transform: translateY(-5px);
}
.calendar-hour-line {
  flex: 1;
  border-top: 1px solid #EFEAE3;
}
.calendar-block {
  position: absolute;
  left: 38px;
  right: 0;
  border-radius: 4px;
  box-sizing: border-box;
}
.calendar-block-videos {
  border: 2px solid #C0942C;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
}
.calendar-block-label {
  font-size: 11px;
  font-weight: 700;
  color: #5A4318;
  padding: 0 4px;
}
.calendar-drag-handle {
  position: absolute;
  bottom: -7px;
  left: 0;
  right: 0;
  height: 14px;
  cursor: ns-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.calendar-drag-handle span {
  width: 28px;
  height: 4px;
  background: #2F5E43;
  border-radius: 2px;
}

/* Black horizontal line marking the current real-world time */
.calendar-now-line {
  position: absolute;
  left: 38px;
  right: 0;
  height: 2px;
  background: #1a1a1a;
  z-index: 3;
}

/* ---- VIDEO SELECT / SERIES PANEL (Screens 7 & 8) ---- */
.video-layout {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 32px 40px;
}
.back-pill {
  margin-bottom: 20px;
}
.video-columns {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.video-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 100px 20px;
  text-align: center;
  color: #7A7269;
}
.video-loading.active {
  display: flex;
}
.video-loading-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #D4E3CC;
  border-top-color: #5D7052;
  border-radius: 50%;
  animation: video-loading-spin 0.8s linear infinite;
}
@keyframes video-loading-spin {
  to { transform: rotate(360deg); }
}

.video-thumb-col {
  flex: 1 1 560px;
  min-width: 0;
}
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #D4E3CC;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(61,56,50,0.07);
}
.play-button {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #FDFCFB;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #5D7052;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(61,56,50,0.12);
  padding-left: 4px;
}
.click-to-play {
  font-size: 13px;
  color: #3D3832;
}
.video-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #3D3832;
}

.video-series-panel {
  flex: 0 1 340px;
  min-width: 280px;
  background: #FDFCFB;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(61,56,50,0.07);
  position: sticky;
  top: 24px;
}
.panel-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7A7269;
  margin-bottom: 10px;
}

/* Series list — the current video is bold with a green bar + "Now playing" */
.video-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
  max-height: 46vh;
  overflow-y: auto;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  color: #3D3832;
  border-left: 3px solid transparent;
  transition: background 0.2s;
}
.checklist-marker {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #F0EFEC;
  color: #7A7269;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.checklist-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.checklist-title {
  font-weight: 400;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.checklist-meta {
  font-size: 12px;
  color: #7A7269;
}
.checklist-item.is-current {
  background: #EEF3EA;
  border-left-color: #5D7052;
}
.checklist-item.is-current .checklist-title { font-weight: 700; }
.checklist-item.is-current .checklist-marker { background: #5D7052; color: #FDFCFB; }
.checklist-item.is-current .checklist-meta { color: #4A5C41; font-weight: 600; }
.checklist-item.is-watched .checklist-title { color: #7A7269; }
.checklist-item.is-watched .checklist-marker { background: #D4E3CC; color: #4A5C41; }
.btn-full {
  width: 100%;
  margin-bottom: 10px;
}

/* ---- SERIES EDIT (Screen 7 — review/edit the video series) ---- */
.series-screen-layout {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 40px 40px;
}
.series-edit-panel {
  max-width: 640px;
  margin: 0 auto;
}
.series-edit-heading {
  text-align: center;
  margin-bottom: 20px;
}
.series-edit-heading .flow-screen-title {
  margin-bottom: 4px;
}
.series-edit-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #5D7052;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.series-edit-card {
  background: #FDFCFB;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(61,56,50,0.07);
  margin-bottom: 18px;
}
.series-edit-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.series-edit-item {
  background: #F0EFEC;
  border-radius: 14px;
  padding: 12px;
  transition: opacity 0.2s ease;
}
.series-edit-item-loading {
  opacity: 0.5;
  pointer-events: none;
}
.series-edit-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Thumbnail with overlaid number badge + regenerate button */
.series-edit-thumb-wrap {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #C9B8A0;
}
.series-edit-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.series-edit-number {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #5D7052;
  color: #FDFCFB;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(61,56,50,0.25);
}
.series-edit-regen-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(253,252,251,0.9);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  padding: 0;
  box-shadow: 0 1px 4px rgba(61,56,50,0.25);
}
.series-edit-regen-btn:hover {
  background: #FDFCFB;
  transform: rotate(45deg);
}

/* Title + channel/duration meta */
.series-edit-info {
  flex: 1 1 auto;
  min-width: 0;
}
.series-edit-title {
  font-size: 14px;
  font-weight: 600;
  color: #3D3832;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.series-edit-meta {
  font-size: 12px;
  color: #7A7269;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #E8E5E0;
  background: #FDFCFB;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  padding: 0;
}
.icon-btn:hover {
  background: #F0EFEC;
}

/* The 🔍 replace button is only shown once "Search & choose videos
   manually" has been switched on */
.replace-btn {
  display: none;
}
.manual-mode .replace-btn {
  display: flex;
}

/* 🗑 delete button — always visible, disabled when it's the last video */
.series-edit-delete-btn:hover {
  background: #F6DADA;
}
.series-edit-delete-btn:disabled {
  opacity: 0.35;
  cursor: default;
  background: #FDFCFB;
}

.series-edit-search {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #E8E5E0;
}
.series-edit-search.active {
  display: block;
}
.search-input-row {
  display: flex;
  gap: 8px;
}
.search-input-row input {
  flex: 1 1 auto;
  border: 1px solid #E8E5E0;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #3D3832;
}
.search-input-row .btn-secondary {
  flex-shrink: 0;
  white-space: nowrap;
}
.series-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.series-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
}
.series-search-result-thumb {
  flex-shrink: 0;
  width: 64px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #C9B8A0;
}
.series-search-result-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.series-search-result-title {
  font-size: 13px;
  color: #3D3832;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.series-search-result-duration {
  flex-shrink: 0;
  font-size: 12px;
  color: #7A7269;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.series-search-result .btn-secondary {
  flex-shrink: 0;
  white-space: nowrap;
}
.series-search-status {
  font-size: 13px;
  color: #7A7269;
}

/* "+ Add video" button — shown when the series doesn't yet add up to the
   chosen session length */
.series-edit-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: 1.5px dashed #B5A08F;
  border-radius: 14px;
  background: transparent;
  color: #5D7052;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.series-edit-add-btn:hover {
  background: #F0EFEC;
  border-color: #5D7052;
}
.series-edit-add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #5D7052;
  color: #FDFCFB;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.series-edit-add-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* "🕐 Total time: 1hr 15min" summary bar */
.series-edit-total {
  background: #D4E3CC;
  color: #3D3832;
  border-radius: 999px;
  padding: 10px 18px;
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 560px) {
  .series-edit-row {
    flex-wrap: wrap;
  }
  .series-edit-thumb-wrap {
    width: 100%;
  }
  .replace-btn,
  .series-edit-delete-btn {
    margin-left: auto;
  }
}

/* ---- VIDEO PLAYER (Screen 8) ---- */
.video-player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(61,56,50,0.07);
}
.video-player-wrap #yt-player,
.video-player-wrap iframe {
  /* NOTE: do not oversize/crop this iframe — captions are rendered as part
     of the video frame, and cropping pushes them outside the visible area
     (or off the bottom entirely). Branding is handled via the click-shield
     + end-cover instead. */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.video-click-shield {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  cursor: pointer;
}

/* Center play/pause icon, briefly flashed on click (see flashPlayPauseIcon) */
.video-pause-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.4);
  z-index: 2;
  width: 64px;
  height: 64px;
  line-height: 64px;
  text-align: center;
  font-size: 28px;
  color: #FDFCFB;
  background: rgba(61,56,50,0.55);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.video-pause-indicator.flash {
  animation: video-pause-flash 0.6s ease-out;
}
@keyframes video-pause-flash {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}

/* Covers the video the instant it ends, hiding YouTube's own end-screen
   (related videos, share, channel link) until the next video loads */
.video-end-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--dark, #3D3832);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.video-end-cover.active {
  opacity: 1;
  pointer-events: auto;
}

/* "Click or press Space to play" — shown while the video is cued, since
   nothing ever autoplays. Pointer-events off so the click lands on the
   shield and starts playback. */
.video-start-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.video-start-hint.active { display: flex; }
.video-start-hint-icon {
  width: 76px;
  height: 76px;
  line-height: 76px;
  text-align: center;
  font-size: 30px;
  color: #FDFCFB;
  background: rgba(61, 56, 50, 0.75);
  border-radius: 50%;
}
.video-start-hint-text {
  font-size: 13px;
  font-weight: 600;
  color: #FDFCFB;
  background: rgba(61, 56, 50, 0.75);
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* v2: the dark "paused cover" gradient that used to sit over the bottom 45%
   of the video while paused is gone (it was the "black blur" that appeared
   together with the controls). YouTube's small "More videos" chip may show
   while paused, but the click shield above keeps it unclickable. */

/* Golden "minutes saved" chest widget — sits in the top-right corner of the
   video-playing screen (not on top of the video) and shows a running total
   of minutes saved this session. Bumps + sparkles when new minutes land. */
.saved-chest-widget {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(160deg, #FBE08A 0%, #F3C94E 100%);
  border: 1px solid rgba(255,255,255,0.6);
  color: #5A4419;
  padding: 8px 16px 8px 10px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(229,170,20,0.35), inset 0 1px 0 rgba(255,255,255,0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.saved-chest-widget-icon {
  position: relative;
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}
.saved-chest-widget-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.saved-chest-widget-value {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.saved-chest-widget-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

/* Bump animation when new saved minutes land in the chest */
.saved-chest-widget.bump {
  animation: saved-chest-bump 0.6s ease-out;
}
@keyframes saved-chest-bump {
  0%   { transform: scale(1); box-shadow: 0 4px 14px rgba(229,170,20,0.35), inset 0 1px 0 rgba(255,255,255,0.6); }
  35%  { transform: scale(1.12); box-shadow: 0 6px 20px rgba(229,170,20,0.5), inset 0 1px 0 rgba(255,255,255,0.6); }
  100% { transform: scale(1); box-shadow: 0 4px 14px rgba(229,170,20,0.35), inset 0 1px 0 rgba(255,255,255,0.6); }
}

/* Small coins that pop and drift up off the chest icon when minutes are added */
.live-saved-coins {
  position: absolute;
  top: -2px;
  left: 50%;
  pointer-events: none;
}
.live-flying-coin {
  position: absolute;
  display: inline-block;
  font-size: 14px;
  opacity: 0;
  animation: live-coin-fly 0.9s ease-out forwards;
}
@keyframes live-coin-fly {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(0.5); }
  30%  { opacity: 1; transform: translate(-50%, -14px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -30px) scale(0.8); }
}

@media (max-width: 560px) {
  .saved-chest-widget {
    top: 10px;
    right: 10px;
    padding: 6px 12px 6px 8px;
    gap: 8px;
  }
  .saved-chest-widget-icon { font-size: 22px; }
  .saved-chest-widget-value { font-size: 17px; }
}
.video-progress-track {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 14px;
  display: flex;
  align-items: center;
  z-index: 2;
  cursor: pointer;
  /* Generous invisible hit area for clicking/dragging; the visible bar is
     drawn by ::before so it stays thin */
}
.video-progress-track::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: rgba(255,255,255,0.25);
}
.video-progress-fill {
  position: absolute;
  left: 0; bottom: 0;
  height: 4px;
  width: 0%;
  background: #FFFFFF;
  transition: width 0.3s ease;
  pointer-events: none;
}
.video-progress-handle {
  position: absolute;
  left: 0%;
  bottom: 0;
  width: 14px;
  height: 14px;
  background: #FFFFFF;
  border: 2px solid #FDFCFB;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 1px 4px rgba(61,56,50,0.3);
  cursor: grab;
}
.video-progress-handle:active {
  cursor: grabbing;
}

/* Player controls below the video (windowed mode only): Breathe on the
   left, captions / quality / speed / fullscreen on the right. v2 moved them
   (and the session widgets) off the picture so nothing covers the video. */
.below-player-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.player-controls-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Small black bear-face silhouette (round head + two ear circles) on the
   "Breathe with Bear" button */
.bear-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 2px;
  margin-top: -2px;
  color: #1A1A1A;
}

/* Gentle "planned time is up" prompt — floats over the bottom of the screen
   (windowed and fullscreen alike) without interrupting playback */
.break-banner {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  width: max-content;
  max-width: min(92vw, 640px);
  background: #FDFCFB;
  border: 1.5px solid #E8E5E0;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(61, 56, 50, 0.22);
  padding: 14px 18px;
  z-index: 500;
}
.break-banner.active { display: flex; }
.break-banner-text {
  font-size: 14px;
  font-weight: 500;
  color: #3D3832;
  text-align: center;
}
.break-banner-btn { padding: 10px 20px; }
.break-banner-dismiss {
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #8A8378;
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}
.break-banner-dismiss:hover { color: #3D3832; }
.hover-pill {
  background: #FDFCFB;
  border: 1.5px solid #E8E5E0;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #3D3832;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.hover-pill:hover { background: #F0EFEC; }

/* CC (captions) dropdown — highlighted like a selected pill when on */
select.cc-select.active {
  background-color: #5D7052;
  border-color: #5D7052;
  color: #FDFCFB;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23FDFCFB' stroke-width='1.5' fill='none' fill-rule='evenodd' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* "Exclude Shorts" row + small on/off toggle switch on the series-edit screen */
.exclude-shorts-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.exclude-shorts-label {
  font-size: 14px;
  font-weight: 500;
  color: #3D3832;
}
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #D9D5CE;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.toggle-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FDFCFB;
  box-shadow: 0 1px 3px rgba(61,56,50,0.25);
  transition: transform 0.2s;
}
.toggle-switch.active {
  background: #5D7052;
}
.toggle-switch.active .toggle-switch-knob {
  transform: translateX(18px);
}

/* CC / quality / speed dropdowns, styled to match the pill buttons */
select.pill-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%233D3832' stroke-width='1.5' fill='none' fill-rule='evenodd' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 32px;
}

/* Fullscreen-only elements (hidden unless .fullscreen-active) */
.fullscreen-badge,
.fullscreen-minimize-top,
.fullscreen-widgets,
.fullscreen-pill-cluster {
  display: none;
}

/* ---- FULLSCREEN MODE ---- */
.screen.fullscreen-active .video-player-wrap {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  z-index: 1000;
}
.screen.fullscreen-active .back-pill,
.screen.fullscreen-active .video-series-panel,
.screen.fullscreen-active .video-title,
.screen.fullscreen-active .video-hover-pills,
.screen.fullscreen-active .video-overlay,
.screen.fullscreen-active .below-player-controls,
.screen.fullscreen-active .copy-script-btn {
  display: none;
}

/* "Copy the script" button — windowed player only */
.copy-script-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #FDFCFB;
  border: 1.5px solid #E8E5E0;
  border-radius: 999px;
  padding: 9px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #3D3832;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 10px;
}
.copy-script-btn:hover { background: #F0EFEC; }
.copy-script-btn:disabled { opacity: 0.6; cursor: default; }
.copy-btn-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.screen.fullscreen-active .fullscreen-badge {
  display: block;
  position: absolute;
  top: 20px; left: 20px;
  background: rgba(61,56,50,0.75);
  color: #FDFCFB;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  z-index: 1001;
}
.screen.fullscreen-active .fullscreen-minimize-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  /* Sits below the "minutes saved" widget, which also pins to the
     top-right corner in fullscreen, so the two don't overlap */
  top: 78px; right: 20px;
  width: 38px; height: 38px;
  background: rgba(61,56,50,0.75);
  color: #FDFCFB;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  z-index: 1001;
}
/* Bottom-left, sitting to the left of the fullscreen-pill-cluster's
   "Breathe with Bear" button (which starts at left: 206px) */
.screen.fullscreen-active .fullscreen-widgets {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  position: absolute;
  bottom: 28px;
  left: 20px;
  z-index: 1001;
}
.fs-calendar-widget,
.win-calendar-widget {
  width: 170px;
  margin-bottom: 0;
  padding: 10px 12px 8px;
}
.fs-calendar-widget {
  background: rgba(253,252,251,0.92);
}

/* Compact y-axis timeline used by Screen 8's session widgets (windowed + fullscreen) */
.session-calendar-track .calendar-hour-label {
  width: 24px;
  font-size: 8px;
}
.session-calendar-track .calendar-block,
.session-calendar-track .calendar-now-line {
  left: 28px;
}

/* Horizontal row of controls, centered above the progress bar (which sits
   at the very bottom, 14px tall) so neither overlaps the other. Starts after
   the calendar widget (.fullscreen-widgets, 170px wide at left: 20px). */
.screen.fullscreen-active .fullscreen-pill-cluster {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: absolute;
  bottom: 28px;
  left: 206px;
  right: 20px;
  z-index: 1001;
}
.fullscreen-pill-cluster .hover-pill,
.fullscreen-pill-cluster .btn-exit,
.fullscreen-pill-cluster .next-video-btn {
  width: auto;
  text-align: center;
}
.fullscreen-pill-cluster .next-video-btn,
.fullscreen-pill-cluster .btn-exit {
  margin-top: 0;
}

/* In fullscreen the buttons, minimize button, minutes-saved widget and
   clock/calendar widgets all stay hidden until the mouse moves, then
   auto-hide again after a moment of stillness (see wakeFullscreenControls) */
.screen.fullscreen-active .fullscreen-pill-cluster,
.screen.fullscreen-active .fullscreen-minimize-top,
.screen.fullscreen-active .fullscreen-widgets,
.screen.fullscreen-active .saved-chest-widget {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.screen.fullscreen-active.fs-controls-visible .fullscreen-pill-cluster,
.screen.fullscreen-active.fs-controls-visible .fullscreen-minimize-top,
.screen.fullscreen-active.fs-controls-visible .fullscreen-widgets,
.screen.fullscreen-active.fs-controls-visible .saved-chest-widget {
  opacity: 1;
  pointer-events: auto;
}

/* While the video isn't actively playing (paused, cued, ended), keep the
   action buttons (Next video / Exit) on screen rather than auto-hiding —
   only fade them out once playback resumes and the mouse goes still */
.screen.fullscreen-active:not(.video-is-playing) .fullscreen-pill-cluster {
  opacity: 1;
  pointer-events: auto;
}

/* ---- WRITING REQUIREMENTS: inline field errors ---- */
.field-error {
  display: none;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #B4533A;
}
.field-error.active { display: block; }
.text-input.input-error {
  box-shadow: 0 0 0 2px #B4533A;
}

/* ---- SPEECH INPUT: mic button in the corner of thought fields ---- */
.dictation-wrap {
  position: relative;
  width: 100%;
}
.dictation-wrap .text-input {
  width: 100%;
  padding-right: 52px; /* keep typed text clear of the mic */
}
.mic-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  border: 1.5px solid #E8E5E0;
  border-radius: 50%;
  background: #FDFCFB;
  font-size: 15px;
  line-height: 1;
  color: #5D7052; /* sparkle icon uses text color instead of emoji color */
  cursor: pointer;
  transition: background 0.15s;
}
.mic-btn:hover { background: #F0EFEC; }
.mic-btn.listening {
  background: #B4533A;
  border-color: #B4533A;
  animation: mic-pulse 1.1s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}

/* ---- ACHIEVEMENT CELEBRATION ---- */
#badge-celebration {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#badge-celebration.active { display: flex; }
.badge-celebration-card {
  position: relative;
  background: #FDFCFB;
  border: 3px solid #E8B71C;
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(61, 56, 50, 0.3);
  padding: 28px 44px;
  text-align: center;
  animation: badge-pop 0.45s cubic-bezier(0.2, 1.2, 0.3, 1);
}
@keyframes badge-pop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.badge-celebration-icon { font-size: 52px; }
.badge-celebration-title {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8A8378;
}
.badge-celebration-name {
  margin-top: 2px;
  font-size: 22px;
  font-weight: 700;
  color: #3D3832;
}
.badge-celebration-confetti {
  position: absolute;
  top: 50%;
  left: 50%;
}
.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-burst 1s ease-out forwards;
}
@keyframes confetti-burst {
  0%   { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(260deg); opacity: 0; }
}

/* ---- BEAR BLOCK (test flow) ----
   Same visual language as Breathe with Bear. Every animation here is
   transform/opacity-only, so it stays light on the GPU and can't lag the
   machine or the plugin. */

/* Dev shortcut into the flow — dashed border marks it as a test control */
.test-bear-block-btn {
  position: fixed;
  right: 22px;
  top: 45%;
  z-index: 50;
  background: #FDFCFB;
  border: 2px dashed #5D7052;
  border-radius: 12px;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #5D7052;
  cursor: pointer;
}
.test-bear-block-btn:hover { background: #F0EFEC; }

.bear-block-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  text-align: center;
}
.bear-block-stage { display: none; }
.bear-block-stage.active { display: block; }

/* Stage 1: bear pacing back and forth */
.bear-walk-area {
  height: 330px;
  margin-top: 12px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bear-walker {
  width: 220px;
  cursor: pointer;
  animation: bear-walk-x 12s linear infinite;
  will-change: transform;
}
.bear-walker.roaring { animation-play-state: paused; }
.bear-bob { animation: bear-bob 0.45s ease-in-out infinite alternate; }
.bear-walker.roaring .bear-bob { animation: bear-roar 0.7s ease; }
@keyframes bear-walk-x {
  0%    { transform: translateX(min(30vw, 330px)) scaleX(-1); }
  49.9% { transform: translateX(calc(min(30vw, 330px) * -1)) scaleX(-1); }
  50%   { transform: translateX(calc(min(30vw, 330px) * -1)) scaleX(1); }
  99.9% { transform: translateX(min(30vw, 330px)) scaleX(1); }
  100%  { transform: translateX(min(30vw, 330px)) scaleX(-1); }
}
@keyframes bear-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(-7px); }
}
@keyframes bear-roar {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.18) rotate(-2deg); }
  60%  { transform: scale(1.15) rotate(2deg); }
  100% { transform: scale(1.05); }
}
.bear-leg {
  transform-box: fill-box;
  transform-origin: center;
  animation: bear-step 0.45s ease-in-out infinite alternate;
}
.bear-leg-right { animation-delay: 0.22s; }
.bear-walker.roaring .bear-leg { animation-play-state: paused; }
@keyframes bear-step {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}
/* Closed smile while walking, wide-open mouth while roaring */
.bear-mouth-roar { opacity: 0; }
.bear-walker.roaring .bear-mouth-roar { opacity: 1; }
.bear-walker.roaring .bear-mouth-walk { opacity: 0; }

/* Stage 2: the notebook */
.bear-notebook {
  display: flex;
  width: min(88vw, 860px);
  height: min(74vh, 560px);
  margin: 12px auto 0;
  background: #FDFCFB;
  border: 3px solid #5D7052;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(61, 56, 50, 0.25);
  cursor: pointer;
  overflow: hidden;
}
.bear-notebook.spit { animation: notebook-spit 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.12); }
@keyframes notebook-spit {
  from { transform: scale(0.06) translateY(40vh); opacity: 0.4; }
  to   { transform: none; opacity: 1; }
}
/* Spiral binding along the left edge */
.bear-notebook-rings {
  flex: none;
  width: 36px;
  background-color: #5D7052;
  background-image: radial-gradient(circle, #FDFCFB 5px, transparent 6px);
  background-size: 36px 44px;
  background-position: center 16px;
  background-repeat: repeat-y;
}
/* The page itself, with faint ruled lines; folds toward the spine on turn */
.bear-notebook-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 44px;
  background-image: repeating-linear-gradient(transparent, transparent 35px, #E8E2D4 36px);
  transform-origin: left center;
  transition: transform 0.24s ease-in;
  will-change: transform;
}
.bear-notebook-page.turning { transform: perspective(1200px) rotateY(-88deg); }
.bear-notebook-phase {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 640px;
}
.bear-notebook-phase.active { display: flex; }
.bear-notebook-title {
  font-size: 24px;
  font-weight: 700;
  color: #3D3832;
  text-align: center;
  line-height: 1.3;
}
.bear-notebook-cover-icon { font-size: 64px; }
.bear-notebook-input {
  width: 100%;
  min-height: 110px;
  cursor: text;
}
#bear-emotion-group { justify-content: center; }
.bear-block-exit { margin-top: 24px; }

/* ---- BREATHE WITH BEAR (Screen 9) ---- */
.breathe-container {
  /* No max-width — lets the bear scale up to fill the viewport */
  width: 100%;
  margin: 0;
  padding: 24px 40px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* center vertically */
  min-height: 100vh;       /* fill the viewport height */
  text-align: center;
  overflow: hidden;        /* clip the enlarged bear — no scrollbars */
}
.breathe-container .back-pill {
  align-self: flex-start;
  margin-bottom: 28px;
  position: relative;
  z-index: 10; /* stays above the expanded bear */
}
/* Title, caption, dots stay above the scaled-up bear */
#breathe-title,
.breathe-caption,
.breathe-dots {
  position: relative;
  z-index: 10;
}
.bear-svg {
  width: 220px;
  height: 220px;
  position: relative;
  z-index: 5;
  transform: scale(1);
  transform-origin: center;
  transition: transform 4s ease-in-out;
}
.bear-svg.bear-large {
  /* Scale up to fill the screen — at 220 px base, ×5 ≈ 1100 px,
     which fills most viewports and overflows top/bottom slightly */
  transform: scale(5);
}
.bear-svg .mouth-hold {
  display: none;
}
.bear-svg.bear-hold .mouth-smile {
  display: none;
}
.bear-svg.bear-hold .mouth-hold {
  display: block;
}
.breathe-caption {
  font-size: 14px;
  color: #7A7269;
  margin-top: 18px;
  margin-bottom: 16px;
}
.breathe-dots {
  display: flex;
  gap: 10px;
}
.breathe-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #C9B8A0;
  transition: background 0.3s;
}
.breathe-dot.active {
  background: #5D7052;
}

/* ---- INTENTION (Screen 10) ---- */
.intention-card {
  background: #FDFCFB;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 0 1px 4px rgba(61,56,50,0.07);
}
.intention-card .btn-secondary {
  width: 100%;
}
.intention-card .btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.intention-card .btn-secondary.connected {
  background: #D4E3CC;
  border-color: #D4E3CC;
  color: #5D7052;
  font-weight: 600;
}
.intention-card .btn-secondary.connected:hover {
  background: #D4E3CC;
}
.intention-card textarea {
  margin-bottom: 0;
}

/* ---- END SCREEN (Screen 11) ---- */
.achievement-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #D4E3CC;
  border-radius: 999px;
  padding: 8px 18px 8px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #3D3832;
  margin: 0 auto 20px;
}
.achievement-icon {
  width: 26px; height: 26px;
  background: #5D7052;
  color: #FDFCFB;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.end-subtitle {
  font-size: 14px;
  color: #7A7269;
  text-align: center;
  margin-bottom: 24px;
}
.end-card {
  background: #FDFCFB;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(61,56,50,0.07);
}
/* Side-by-side layout for the calendar card and the "Up next" card. Wraps
   to a single column on narrow screens, and the "Up next" card collapses
   away entirely (display:none, set in JS) until Google Calendar is connected. */
.end-cards-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 24px;
  text-align: left;
}
.end-cards-row .end-card {
  flex: 1 1 240px;
  margin-bottom: 0;
}
.next-action-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.next-action-text {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: #3D3832;
  text-align: center;
}
/* Real Google Calendar events for the rest of today, shown above the
   end-of-session timeline once the user has connected their calendar */
.calendar-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.calendar-events-list:empty {
  display: none;
}
.calendar-event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F0EFEC;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  text-align: left;
}
.calendar-event-time {
  font-weight: 700;
  color: #5D7052;
  flex-shrink: 0;
  min-width: 56px;
}
.calendar-event-title {
  color: #3D3832;
}

/* End-of-session timeline: same Google-Calendar-style track as the Schedule
   screen (.calendar-day-track), just with extra top margin to sit below the
   "Scheduled on your calendar" events list. */
.mini-calendar {
  margin-top: 16px;
}
.btn-end {
  background: #D4E3CC;
  color: #3D3832;
  border: none;
  border-radius: 999px;
  padding: 15px 36px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.15s;
}
.btn-end:hover { opacity: 0.88; }

/* "+N min saved" widget on the End screen — coins fly toward the chest */
.saved-minutes-card {
  text-align: center;
}
.saved-minutes-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 48px;
}
.saved-minutes-coins {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 32px;
  min-height: 32px;
}
.flying-coin {
  font-size: 22px;
  opacity: 0;
  animation: coin-fly-in 0.7s ease-out forwards;
}
@keyframes coin-fly-in {
  0%   { opacity: 0; transform: translateX(-28px) scale(0.6); }
  60%  { opacity: 1; transform: translateX(4px) scale(1.1); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
.saved-minutes-arrow {
  font-size: 18px;
  color: #B5A08F;
}
.saved-minutes-chest {
  font-size: 32px;
  transition: transform 0.2s ease;
}
.saved-minutes-chest.chest-bump {
  animation: chest-bump 0.5s ease;
}
@keyframes chest-bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.3) rotate(-6deg); }
  65%  { transform: scale(0.95) rotate(4deg); }
  100% { transform: scale(1); }
}
.saved-minutes-label {
  font-size: 16px;
  font-weight: 700;
  color: #5D7052;
  margin: 12px 0 6px;
}
.saved-minutes-link {
  font-size: 13px;
  font-weight: 600;
  color: #5D7052;
  text-decoration: none;
}
.saved-minutes-link:hover {
  text-decoration: underline;
}

/* ---- ACHIEVEMENTS SCREEN ---- */
.achievements-content {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 40px 56px;
}
.achievements-content .section-heading {
  margin-bottom: 6px;
}
.achievements-subtitle {
  text-align: center;
  font-size: 14px;
  color: #7A7269;
  margin-bottom: 32px;
}
.achievements-content h2.section-heading {
  margin-top: 40px;
  font-size: 20px;
}

/* "Saved minutes" chest/bucket */
.saved-chest-card {
  background: #FDFCFB;
  border-radius: 18px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(61,56,50,0.07);
}
.saved-chest {
  position: relative;
  width: 200px;
  margin: 0 auto 12px;
}
.chest-svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(61,56,50,0.15));
}
.chest-coins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.chest-coin {
  position: absolute;
  font-size: 20px;
  animation: chest-coin-pop 0.5s ease backwards;
}
@keyframes chest-coin-pop {
  0%   { opacity: 0; transform: translateY(10px) scale(0.5); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.saved-chest-counter {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.saved-chest-number {
  font-size: 48px;
  font-weight: 800;
  color: #3D3832;
  line-height: 1;
}
.saved-chest-label {
  font-size: 16px;
  font-weight: 600;
  color: #7A7269;
}
.saved-chest-caption {
  font-size: 13px;
  color: #B5A08F;
  max-width: 360px;
  margin: 0 auto;
}

/* Badges grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.badge-card {
  background: #FDFCFB;
  border-radius: 16px;
  padding: 20px 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(61,56,50,0.06);
  transition: opacity 0.2s ease;
}
.badge-card.locked {
  opacity: 0.55;
}
.badge-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #D4E3CC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 12px;
}
.badge-card.locked .badge-icon {
  background: #F0EFEC;
}
.badge-name {
  font-size: 13px;
  font-weight: 700;
  color: #3D3832;
  margin-bottom: 4px;
}
.badge-description {
  font-size: 12px;
  color: #7A7269;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .badges-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .badges-grid { grid-template-columns: 1fr; }
  .saved-chest { width: 160px; }
}

/* LANDING PAGE STYLES */
  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f0ece3;
    color: #1a1a1a;
    min-height: 100vh;
  }

  /* ── NAV ── */
  nav {
    max-width: 860px;
    margin: 0 auto;
    padding: 18px 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-logo {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
  }

  .nav-logo-icon {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: #3D6B4F;
    border-radius: 50%;
    padding: 4px;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
  }

  .nav-links a {
    text-decoration: none;
    font-size: 0.86rem;
    color: #444;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 50px;
    transition: background 0.18s, color 0.18s;
  }

  .nav-links a:hover {
    background: #e4dfd5;
    color: #1a1a1a;
  }

  .nav-cta {
    background: #3d6b4f !important;
    color: white !important;
    padding: 9px 20px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    font-size: 0.86rem !important;
  }

  /* Active nav link — underlined to show current page (used on Achievements) */
  .nav-link-current {
    text-decoration: underline !important;
    color: #1a1a1a !important;
    font-weight: 600;
  }

  .nav-cta:hover {
    background: #2f5340 !important;
  }

  /* ── HERO ── */
  .hero {
    max-width: 860px;
    margin: 0 auto;
    background: #e8e2d6;
    border-radius: 20px;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    overflow: hidden;
    position: relative;
    min-height: 300px;
  }

  .hero-left {
    padding: 42px 36px 42px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    position: relative;
    z-index: 2;
  }

  .hero-left h1 {
    font-size: 2.45rem;
    font-weight: 800;
    line-height: 1.1;
    color: #1a1a1a;
    letter-spacing: -0.6px;
  }

  .hero-left .subtitle {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2a2a2a;
    margin-top: -4px;
  }

  .feature-card {
    background: #dcebd4;
    border-radius: 14px;
    padding: 15px 17px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .feature-card-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
  }

  .feature-icon {
    display: inline-block;
    width: 34px;
    height: 34px;
    background: #3D6B4F;
    border-radius: 50%;
    padding: 5px;
    object-fit: contain;
    flex-shrink: 0;
    vertical-align: middle;
  }

  .feature-card-text strong {
    font-size: 0.87rem;
    color: #1a1a1a;
    display: block;
    line-height: 1.35;
    padding-top: 7px;
  }

  /* Divider inside feature card */
  .feature-divider {
    height: 1px;
    background: rgba(61,107,79,0.2);
    margin: 0 2px;
  }

  /* Free app row */
  .free-row {
    display: flex;
    gap: 12px;
    align-items: center;
  }

  .free-icon {
    width: 34px;
    height: 34px;
    background: #3d6b4f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 1rem;
  }

  .free-label {
    font-size: 0.87rem;
    font-weight: 700;
    color: #2a5c3a;
  }

  /* ── HERO IMAGE ── */
  .hero-right {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
  }

  .hero-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
  }

  /* Fade left edge only — blends into the #e8e2d6 background */
  .hero-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #e8e2d6 0%, rgba(232,226,214,0.3) 22%, transparent 42%);
    z-index: 2;
    pointer-events: none;
  }

  /* Subtle top fade */
  .hero-right::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40px;
    background: linear-gradient(to bottom, #e8e2d6 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
  }

  /* ── WHAT TO EXPECT ── */
  .expect-section {
    max-width: 860px;
    margin: 20px auto;
    background: #fff;
    border-radius: 20px;
    padding: 30px 40px 44px;
  }

  .expect-section h2 {
    text-align: center;
    font-size: 1.22rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
  }

  .cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 34px;
  }

  .expect-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
  }

  .expect-card img {
    width: 100%;
    height: 140px;
    border-radius: 12px;
    display: block;
    object-fit: cover;
    object-position: center top;
    background: transparent;
  }

  .expect-card .card-num {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
  }

  .expect-card .card-desc {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.5;
    margin-top: -2px;
  }

  .card-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #444;
    margin-top: 2px;
  }

  .card-check::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border: 1.5px solid #4a7c59;
    border-radius: 50%;
    color: #4a7c59;
    font-size: 0.68rem;
    flex-shrink: 0;
  }

  /* ── CTA BUTTONS ── */
  .cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
  }

  .cta-btn {
    background: #3d6b4f;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 17px 46px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 11px;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
  }

  .cta-btn:hover { background: #2f5340; transform: translateY(-1px); }
  .cta-btn:active { transform: translateY(0); }

  .cta-arrow {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
  }

  .cta-secondary {
    background: transparent;
    color: #3d6b4f;
    border: 2px solid #3d6b4f;
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, color 0.2s, transform 0.1s;
    font-family: inherit;
  }

  .cta-secondary:hover { background: #3d6b4f; color: white; transform: translateY(-1px); }
  .cta-secondary:active { transform: translateY(0); }

  .privacy-note {
    font-size: 0.76rem;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
  }

  /* ── MODALS ── */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.42);
    z-index: 100;
    align-items: center;
    justify-content: center;
  }
  .modal-overlay.open { display: flex; }

  .modal {
    background: white;
    border-radius: 20px;
    padding: 38px;
    max-width: 430px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18);
    animation: slideUp 0.22s ease;
  }

  @keyframes slideUp {
    from { transform: translateY(18px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
  }

  .modal h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 9px; color: #1a1a1a; }
  .modal p  { font-size: 0.86rem; color: #666; line-height: 1.6; margin-bottom: 20px; }

  .modal-input {
    width: 100%; padding: 13px 15px;
    border: 1.5px solid #d8d4cb; border-radius: 12px;
    font-size: 0.92rem; margin-bottom: 11px; outline: none;
    transition: border 0.2s; font-family: inherit;
  }
  .modal-input:focus { border-color: #4a7c59; }

  .modal-cta {
    width: 100%; background: #3d6b4f; color: white;
    border: none; border-radius: 50px; padding: 14px;
    font-size: 0.96rem; font-weight: 700; cursor: pointer;
    transition: background 0.2s; font-family: inherit;
  }
  .modal-cta:hover { background: #2f5340; }

  .modal-close {
    margin-top: 12px; background: none; border: none;
    color: #aaa; font-size: 0.82rem; cursor: pointer; font-family: inherit;
  }
  .modal-close:hover { color: #666; }

  .feelings-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px; margin-bottom: 16px; text-align: left;
  }
  .feeling-btn {
    background: #f5f3ee; border: 1.5px solid #e0dbd0;
    border-radius: 10px; padding: 9px 13px;
    font-size: 0.83rem; cursor: pointer;
    transition: all 0.15s; font-family: inherit; color: #333;
  }
  .feeling-btn:hover, .feeling-btn.selected {
    background: #dcebd4; border-color: #4a7c59; color: #2a5c3a; font-weight: 600;
  }
  .next-action-input {
    width: 100%; padding: 13px 15px;
    border: 1.5px solid #d8d4cb; border-radius: 12px;
    font-size: 0.92rem; margin-bottom: 13px; outline: none;
    transition: border 0.2s; font-family: inherit; display: none; resize: none;
  }
  .next-action-input.visible { display: block; }
  .next-action-input:focus { border-color: #4a7c59; }

/* ==============================
   SCREEN: MANUAL VIDEO PICKER
   ============================== */

.manual-picker-layout {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}
.manual-picker-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.manual-picker-top .flow-screen-title {
  margin: 0;
  text-align: left;
  flex: 1;
}
.manual-search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
/* Narrower search row — no separate Search button; results appear as user types */
.manual-search-row { max-width: 440px; }
.manual-search-input { min-width: 0; }
.manual-picker-body  { display: flex; gap: 24px; align-items: flex-start; }
.manual-grid-area    { flex: 1; min-width: 0; }

.manual-video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.manual-grid-empty,
.manual-grid-loading,
.manual-grid-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: #7A7269;
  font-size: 14px;
}

.manual-video-card {
  background: #FDFCFB;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(61,56,50,0.09);
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.manual-video-card:hover { box-shadow: 0 4px 14px rgba(61,56,50,0.14); }
.manual-video-card.selected {
  border-color: #3D3832;
  box-shadow: 0 4px 14px rgba(61,56,50,0.2);
}
.manual-video-card.already-added {
  border-color: #5D7052;
  opacity: 0.72;
  cursor: default;
}

.manual-video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #EFEAE3;
  overflow: hidden;
}
.manual-video-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.manual-add-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(30,30,30,0.78);
  color: #FDFCFB;
  border: none;
  border-radius: 999px;
  padding: 6px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.manual-video-card:hover .manual-add-btn,
.manual-video-card.selected .manual-add-btn { opacity: 1; pointer-events: auto; }
.manual-add-btn.over-limit {
  background: rgba(160,50,50,0.82);
  cursor: default;
}

/* "Save for later" button — visible on over-limit cards, top-right corner */
.manual-save-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(30,30,30,0.75);
  color: #FDFCFB;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  z-index: 2;
}
.manual-save-btn:hover { background: rgba(93,112,82,0.88); }
.manual-save-btn.saved { background: rgba(93,112,82,0.88); cursor: default; }

/* "Over limit" badge on cards where duration would exceed the cap */
.manual-over-limit-badge {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(150,50,50,0.80);
  color: #FDFCFB;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.manual-added-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(93,112,82,0.9);
  color: #FDFCFB;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.manual-video-info  { padding: 8px 10px 10px; }
.manual-video-title {
  font-size: 12px; font-weight: 600; color: #3D3832;
  margin: 0 0 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.35;
}
.manual-video-meta {
  font-size: 11px; color: #7A7269; margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.manual-series-sidebar { width: 260px; flex-shrink: 0; }
.manual-series-card {
  background: #FDFCFB;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(61,56,50,0.07);
  position: sticky;
  top: 24px;
}
.manual-series-title {
  font-size: 12px; font-weight: 700; color: #5D7052;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin: 0 0 12px;
}
.manual-series-list  { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.manual-series-empty { font-size: 13px; color: #B5A08F; text-align: center; padding: 14px 0; margin: 0; }

.manual-series-row {
  display: flex; align-items: center; gap: 6px;
  background: #F0EFEC; border-radius: 8px; padding: 7px 8px;
}
.manual-series-row-num   { font-size: 11px; font-weight: 700; color: #7A7269; flex-shrink: 0; min-width: 16px; }
.manual-series-row-title { font-size: 12px; font-weight: 600; color: #3D3832; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manual-series-row-dur   { font-size: 11px; color: #7A7269; flex-shrink: 0; }
.manual-series-delete-btn {
  background: none; border: none; cursor: pointer;
  font-size: 13px; padding: 2px 4px; border-radius: 4px;
  opacity: 0.6; transition: opacity 0.15s; flex-shrink: 0; line-height: 1;
}
.manual-series-delete-btn:hover { opacity: 1; }

.manual-series-total {
  background: #D4E3CC; color: #3D3832; border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600;
  text-align: center; margin-bottom: 10px;
}
.manual-series-total.over-limit { background: #F6DADA; color: #7A2B2B; }
.manual-duration-warning {
  font-size: 12px; color: #9B4A4A; text-align: center;
  margin: 0 0 10px; line-height: 1.4;
}
.manual-continue-btn { width: 100%; }

@media (max-width: 720px) {
  .manual-picker-body    { flex-direction: column; }
  .manual-series-sidebar { width: 100%; }
  .manual-series-card    { position: static; }
  .manual-video-grid     { grid-template-columns: repeat(2, 1fr); }
  .manual-picker-layout  { padding: 16px 16px 40px; }
  .manual-search-input   { width: 100%; }
}

/* ==============================
   COURSES SCREEN (Saved for later)
   ============================== */

.courses-layout {
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 32px 48px;
}
.courses-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.courses-top .flow-screen-title { margin: 0; text-align: left; flex: 1; }
.courses-subtitle {
  font-size: 14px;
  color: #7A7269;
  margin: 0 0 24px;
}

/* Courses tabs */
.courses-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.courses-tab-btn {
  background: #EFEAE3;
  border: none;
  border-radius: 999px;
  padding: 7px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #7A7269;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.courses-tab-btn.active {
  background: #5D7052;
  color: #FDFCFB;
}

/* Course group card grid — 3 columns for wider cards than manual picker */
.course-group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.course-group-card {
  position: relative;
  background: #FDFCFB;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(61,56,50,0.09);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.course-group-card:hover {
  box-shadow: 0 6px 20px rgba(61,56,50,0.14);
  transform: translateY(-2px);
  border-color: #5D7052;
}
.course-cover-thumb {
  aspect-ratio: 16 / 9;
}
.course-play-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(30,30,30,0.65);
  color: #FDFCFB;
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.course-group-card:hover .course-play-overlay { opacity: 1; }
.course-group-info {
  padding: 12px 14px 14px;
}
.course-group-name {
  font-size: 14px;
  font-weight: 700;
  color: #3D3832;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

/* Progress bar */
.course-progress-bar-wrap {
  background: #EFEAE3;
  border-radius: 999px;
  height: 6px;
  margin: 8px 0 4px;
  overflow: hidden;
}
.course-progress-bar {
  background: #5D7052;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
  min-width: 0;
}
.course-progress-label {
  font-size: 11px;
  color: #7A7269;
  margin: 0;
}

/* "+ Publish video" link on the home CTA section */
.publish-video-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #5D7052;
  text-decoration: none;
  padding: 6px 14px;
  border: 1.5px solid #5D7052;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.publish-video-link:hover {
  background: #5D7052;
  color: #FDFCFB;
}

@media (max-width: 720px) {
  .courses-layout { padding: 16px 16px 40px; }
  .course-group-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 480px) {
  .course-group-grid { grid-template-columns: 1fr; }
}

/* "Starting Course" toast — brief centered overlay, auto-removes in 1.5 s */
.course-start-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #5D7052;
  color: #FDFCFB;
  padding: 18px 36px;
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  pointer-events: none;
  animation: course-toast-anim 1.5s ease forwards;
}
@keyframes course-toast-anim {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  18%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================
   v2 — polish, player states, new screens
   Same design system: pills for buttons, 14–18px cards, Inter, the
   green / beige / yellow palette. No new colors except tints of them.
   ============================================ */

/* ---- Keyboard focus: visible everywhere, only for keyboard users ---- */
:focus-visible {
  outline: 3px solid #5D7052;
  outline-offset: 2px;
}
.text-input:focus-visible { outline: none; } /* has its own focus ring */

button:disabled,
select:disabled {
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Small shared pieces ---- */
.btn-small {
  padding: 9px 18px;
  font-size: 14px;
}
.btn-text {
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #7A7269;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 999px;
}
.btn-text:hover { color: #3D3832; background: #F0EFEC; }
.text-link {
  font-size: 13px;
  font-weight: 600;
  color: #5D7052;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }
.section-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7A7269;
}

/* Bottom toast for confirmations / errors */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  max-width: min(92vw, 520px);
  background: #3D3832;
  color: #FDFCFB;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(61, 56, 50, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10000;
}
.app-toast.active { opacity: 1; transform: translate(-50%, 0); }
.app-toast.is-error { background: #8A3B2C; }

/* Segmented control (search order, Quick Focus categories) */
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #EFEAE3;
  border-radius: 999px;
  flex-shrink: 0;
}
.segmented-wrap { flex-wrap: wrap; border-radius: 22px; }
.segmented-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #7A7269;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.segmented-btn:hover { color: #3D3832; }
.segmented-btn.active {
  background: #FDFCFB;
  color: #3D3832;
  box-shadow: 0 1px 4px rgba(61, 56, 50, 0.14);
}

/* Manual picker: search field + sort toggle side by side */
.manual-search-row {
  max-width: none;
  align-items: center;
  flex-wrap: wrap;
}
.manual-search-row .manual-search-input {
  flex: 1 1 320px;
  max-width: 520px;
  margin-bottom: 0;
}
.manual-video-date { margin-top: 2px; }

/* ---- Video player states ---- */
/* Start hint: "click to play" / "loading the next video…" / "didn't start" */
.video-start-hint.is-loading .video-start-hint-icon {
  font-size: 0;
  border: 4px solid rgba(253, 252, 251, 0.25);
  border-top-color: #FDFCFB;
  background: rgba(61, 56, 50, 0.6);
  width: 56px;
  height: 56px;
  animation: video-loading-spin 0.8s linear infinite;
}

/* End-of-video card and error card share the same calm card */
.video-end-cover,
.player-error {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #3D3832;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.video-end-cover.active,
.player-error.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease;
}
.player-card {
  max-width: 420px;
  text-align: center;
  color: #FDFCFB;
}
.player-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.end-cover-upnext,
.player-error-text {
  font-size: 14px;
  color: #D9D2C7;
  line-height: 1.45;
  margin-bottom: 18px;
}
.end-cover-next-btn { width: auto; padding: 13px 32px; }
.player-card-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.player-card-actions .btn-primary,
.player-card-actions .btn-secondary { width: auto; padding: 12px 24px; font-size: 14px; }

/* Short note near the bottom of the player (clear of YouTube's own title
   bar at the top), e.g. "This video has no captions" */
.player-status {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translate(-50%, 6px);
  z-index: 5;
  max-width: calc(100% - 32px);
  background: rgba(61, 56, 50, 0.88);
  color: #FDFCFB;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.player-status.active { opacity: 1; transform: translate(-50%, 0); }

/* The quality-sized player is scaled to fit (see layoutPlayerForQuality) */
.video-player-wrap #yt-player { transform-origin: center center; }

/* While a YouTube ad is present, clicks go to YouTube's player so its play / "Skip ad" buttons work */
.video-player-wrap.ad-present .video-click-shield { pointer-events: none; }

/* ---- Below the player: title, channel · date, actions ---- */
.video-info { margin-top: 18px; }
.video-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin-top: 6px;
  min-height: 20px;
  font-size: 14px;
  color: #7A7269;
}
#playing-video-channel { font-weight: 600; color: #3D3832; }
#playing-video-channel:not(:empty) + #playing-video-date:not(:empty)::before {
  content: '·';
  margin: 0 8px;
  color: #B5A08F;
}
.video-meta.is-loading::before {
  content: '';
  width: 220px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #EFEAE3 0%, #F7F4EF 50%, #EFEAE3 100%);
  background-size: 200% 100%;
  animation: meta-shimmer 1.2s ease-in-out infinite;
}
@keyframes meta-shimmer {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}

.video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FDFCFB;
  border: 1.5px solid #E8E5E0;
  border-radius: 999px;
  padding: 9px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #3D3832;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.action-pill:hover:not(:disabled) { background: #F0EFEC; }
.action-pill:disabled { opacity: 0.5; }
.action-pill.active {
  background: #D4E3CC;
  border-color: #5D7052;
  color: #2F3D29;
}
.action-icon { font-size: 14px; line-height: 1; }
.external-mark { font-size: 12px; color: #7A7269; }

/* ---- Side panel: session progress + today's timeline ---- */
.panel-session {
  background: #F6F4F0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.panel-session-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
}
.panel-session-label { font-weight: 700; }
.panel-session-time { color: #7A7269; font-variant-numeric: tabular-nums; }
.panel-session-bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: #E8E5E0;
  overflow: hidden;
}
.panel-session-fill {
  height: 100%;
  width: 0%;
  background: #2F5E43;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.video-series-panel .next-video-btn[disabled] { opacity: 0.6; }
.panel-timeline { margin-top: 18px; }
.panel-timeline-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7A7269;
  margin-bottom: 8px;
}
.panel-timeline .win-calendar-widget { width: 100%; box-shadow: none; background: #F6F4F0; }

.screen.fullscreen-active .video-info { display: none; }

/* Narrow windows: player on top, panel below at full width */
@media (max-width: 900px) {
  .video-layout { padding: 16px 16px 32px; }
  .video-series-panel { flex: 1 1 100%; position: static; }
  .video-checklist { max-height: none; }
  .below-player-controls { justify-content: flex-start; }
}

/* ---- Generic page layout for the v2 screens ---- */
.page-layout {
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 32px 120px;
}
.page-top {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-layout > .flow-screen-title { text-align: left; margin-bottom: 6px; }
.page-subtitle {
  font-size: 15px;
  color: #7A7269;
  line-height: 1.5;
  max-width: 640px;
  margin-bottom: 24px;
}
.empty-state {
  background: #FDFCFB;
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(61, 56, 50, 0.07);
}
.empty-state-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.empty-state-text {
  font-size: 14px;
  color: #7A7269;
  line-height: 1.55;
  max-width: 460px;
  margin: 0 auto;
}

/* ---- Learning channels ---- */
.channel-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #D4E3CC;
  color: #4A5C41;
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.channel-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.channel-avatar-large { width: 64px; height: 64px; font-size: 24px; }

.channel-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.channel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FDFCFB;
  border-radius: 16px;
  padding: 8px 12px 8px 8px;
  box-shadow: 0 2px 8px rgba(61, 56, 50, 0.07);
}
.channel-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  background: none;
  border: none;
  border-radius: 12px;
  padding: 8px;
  font-family: 'Inter', sans-serif;
  text-align: left;
  cursor: pointer;
  color: #3D3832;
}
.channel-row-main:hover { background: #F6F4F0; }
.channel-row-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.channel-row-name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-row-meta { font-size: 13px; color: #7A7269; }

.channel-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.channel-head .flow-screen-title { text-align: left; margin-bottom: 4px; }
.channel-head .page-subtitle { margin-bottom: 0; }

.channel-video-card {
  padding: 0;
  font-family: 'Inter', sans-serif;
  text-align: left;
  width: 100%;
}
.channel-more-row { display: flex; justify-content: center; margin-top: 20px; }

/* Courses screen: channels strip + removable channel courses */
.courses-channels-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.courses-channels {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 26px;
}
.courses-channels-hint { font-size: 13px; color: #7A7269; }
.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: #FDFCFB;
  border: 1.5px solid #E8E5E0;
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #3D3832;
  cursor: pointer;
}
.channel-chip:hover { border-color: #5D7052; }
.channel-chip .channel-avatar { width: 28px; height: 28px; font-size: 12px; }
/* ---- Quick Focus ---- */
.focus-resume { margin-bottom: 16px; }
.focus-resume-btn {
  padding: 10px 18px;
  font-size: 14px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
#screen-focus .segmented { margin-bottom: 20px; }
.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.focus-card {
  display: flex;
  flex-direction: column;
  background: #FDFCFB;
  border: 2px solid transparent;
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  text-align: left;
  font-family: 'Inter', sans-serif;
  color: #3D3832;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(61, 56, 50, 0.08);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.focus-card:hover { box-shadow: 0 6px 18px rgba(61, 56, 50, 0.14); }
.focus-card.is-playing { border-color: #5D7052; }
.focus-card-art {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #EFEAE3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.focus-card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.focus-card-site { font-size: 22px; font-weight: 800; color: #5D7052; letter-spacing: -0.01em; }
.focus-card-state {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(30, 30, 30, 0.72);
  color: #FDFCFB;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}
.focus-card.is-playing .focus-card-state { background: #5D7052; }
.focus-card-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.focus-card-title { font-size: 14px; font-weight: 700; line-height: 1.35; }
.focus-card-meta { font-size: 12px; color: #7A7269; }
.access-badge {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #D4E3CC;
  color: #2F3D29;
}
.access-badge.is-trial { background: #FBE9B7; color: #6B4F05; }

.focus-player {
  display: none;
  align-items: center;
  gap: 16px;
  background: #FDFCFB;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(61, 56, 50, 0.08);
  border: 2px solid #5D7052;
}
.focus-player.active { display: flex; }
.focus-player-frame {
  flex-shrink: 0;
  width: 320px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.focus-player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.focus-player-info { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.focus-player-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #5D7052; }
.focus-player-title { font-size: 16px; font-weight: 700; line-height: 1.35; }
.focus-footnote { margin-top: 28px; font-size: 12px; color: #7A7269; max-width: 640px; line-height: 1.5; }

@media (max-width: 640px) {
  .page-layout { padding: 20px 16px 120px; }
  .focus-player { flex-direction: column; align-items: stretch; }
  .focus-player-frame { width: 100%; }
}

/* "min saved" chest in the side panel (normal view) — see placeSavedChest */
.panel-chest-slot .saved-chest-widget {
  position: static;
  width: fit-content;
  margin: 0 0 14px auto;
}

/* ---- v2 layout fixes ---- */
/* Home nav: five links + the CTA fit on one line (v1 nav was sized for three) */
nav { max-width: 1080px; }
.nav-links a { white-space: nowrap; }
.nav-cta { white-space: nowrap; }
@media (max-width: 900px) {
  nav { flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
  .nav-links { flex-wrap: wrap; }
}

/* Manual picker: grid columns may shrink below the thumbnails' natural
   width (they overflowed the page sideways before) */
.manual-video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .manual-video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .manual-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Fullscreen: YouTube shows its own title in the top-left corner whenever
   the video isn't playing — hide our badge then, so they don't overlap */
.screen.fullscreen-active:not(.video-is-playing) .fullscreen-badge { display: none; }

/* Soundscape tab tools: "↻ New soundscapes" / "Back to hand-picked" */
.focus-tools { display: flex; align-items: center; gap: 8px; margin: -6px 0 18px; }
#screen-focus .segmented { margin-bottom: 14px; }

/* Emotion screen: three labelled categories inside one single-select group */
.emotion-groups { display: block; }
.emotion-category {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7A7269;
  margin: 14px 0 8px;
}
.emotion-category:first-child { margin-top: 0; }
.emotion-category-pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============================================
   MAIN FLOW — polished step cards (v2.1)
   Goal → Why → Feeling → Reason → Time → Videos (+ Intention).
   One calm card per step: step bar, small label, the question as the
   heading, the answer area, then a footer with ← Back and Continue.
   Same palette; only spacing, hierarchy and controls changed.
   ============================================ */
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .flow-container {
  max-width: 640px;
  margin: 48px auto 64px;
  padding: 32px 40px 28px;
  background: #FDFCFB;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 10px 30px rgba(61, 56, 50, 0.07);
  text-align: left;
}
#screen-schedule .flow-container { max-width: 720px; }

/* Step bar ("Step 2 of 6") — rendered by renderFlowProgress() */
.progress-dots { display: none; } /* replaced by the step bar */
.flow-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.flow-progress-label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #7A7269;
  font-variant-numeric: tabular-nums;
}
.flow-progress-track {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: #EFEAE3;
  overflow: hidden;
}
.flow-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: #5D7052;
  transition: width 0.35s ease;
}

/* Small label above, the question as the real heading */
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .flow-screen-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5D7052;
  text-align: left;
  margin: 0 0 8px;
}
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .flow-question {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #3D3832;
  text-align: left;
  margin: 0 0 8px;
}
.flow-helper {
  font-size: 15px;
  line-height: 1.5;
  color: #7A7269;
  margin: 0 0 22px;
}
.flow-question + :not(.flow-helper) { margin-top: 18px; }
.select-label {
  font-size: 13px;
  font-weight: 600;
  color: #7A7269;
  margin: 22px 0 10px;
}

/* Text fields: soft filled boxes that brighten on focus */
:is(#screen-goal-1, #screen-emotion, #screen-intention, #screen-schedule-next) .text-input,
#screen-emotion-reason .emotion-reason-field {
  background: #F7F5F1;
  border: 1.5px solid #E8E5E0;
  border-radius: 14px;
  box-shadow: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
:is(#screen-goal-1, #screen-emotion, #screen-intention, #screen-schedule-next) .text-input:focus,
#screen-emotion-reason .emotion-reason-field:focus-within {
  background: #FDFCFB;
  border-color: #5D7052;
  box-shadow: 0 0 0 3px rgba(93, 112, 82, 0.15);
}
#screen-emotion-reason .emotion-reason-field textarea { background: transparent; }
#screen-goal-1 .text-input { margin-bottom: 8px; font-size: 16px; }
#screen-emotion .text-input { margin: 18px 0 0; }
.field-hint { font-size: 13px; color: #7A7269; margin: 0; }
.field-hint em { font-style: normal; color: #3D3832; }
.privacy-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 18px 0 0;
  font-size: 12px;
  color: #8A8378;
}
.privacy-line::before { content: '🔒'; font-size: 11px; }

/* The goal typed earlier, shown as context — clearly not an input */
.goal-display {
  background: #F6F4F0;
  border: none;
  border-left: 3px solid #A9C29C;
  border-radius: 10px;
  box-shadow: none;
  padding: 10px 14px;
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #3D3832;
  text-align: left;
}
.goal-display::before {
  content: 'Your goal';
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7A7269;
  margin-bottom: 2px;
}
.goal-display:empty { display: none; }

/* Selectable chips */
:is(#screen-goal-2, #screen-emotion, #screen-schedule) .pill {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  border: 1.5px solid #E3DED6;
  background: #FDFCFB;
}
:is(#screen-goal-2, #screen-emotion, #screen-schedule) .pill:hover {
  border-color: #A9C29C;
  background: #F3F6F0;
}
:is(#screen-goal-2, #screen-emotion, #screen-schedule) .pill.selected {
  background: #5D7052;
  border-color: #5D7052;
  color: #FDFCFB;
  box-shadow: 0 0 0 3px rgba(93, 112, 82, 0.15);
}
#screen-schedule .pill.pill-long:not(.selected) {
  background: #FBF1EE;
  border-color: #EBCFC7;
  color: #8E4A3C;
}
#screen-schedule .pill.pill-long.selected {
  background: #A85B4B;
  border-color: #A85B4B;
  box-shadow: 0 0 0 3px rgba(168, 91, 75, 0.15);
}
.emotion-category { margin: 18px 0 8px; }
.pill-group { margin-bottom: 0; }

/* Footer: ← Back on the left, Continue on the right */
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #EFEAE3;
}
.btn-row.btn-row-end { justify-content: flex-end; }
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .btn-row .btn-secondary {
  background: transparent;
  border: none;
  padding: 12px 10px;
  color: #7A7269;
  font-weight: 600;
  font-size: 15px;
}
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-schedule-next) .btn-row .btn-secondary::before { content: '← '; }
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .btn-row .btn-secondary:hover {
  color: #3D3832;
  background: #F0EFEC;
}
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .btn-row .btn-primary {
  width: auto;
  min-width: 168px;
  padding: 14px 28px;
}
.btn-primary { transition: background 0.15s, transform 0.1s; }
.btn-primary:hover { opacity: 1; background: #335C43; }
.btn-primary:active { transform: translateY(1px); }

/* Intention: one field, no card inside the card */
#screen-intention .intention-card {
  background: none;
  box-shadow: none;
  border: none;
  padding: 0;
  margin: 18px 0 0;
}

/* Time step: the two charts sit inside the card as quiet panels */
#screen-schedule .custom-duration { margin-top: 20px; }
#screen-schedule .schedule-impact-row .time-breakdown,
#screen-schedule .schedule-impact-row .calendar-day-widget {
  background: #F7F5F1;
  box-shadow: none;
  border: none;
}
#screen-schedule .duration-spinner { background: #F7F5F1; box-shadow: none; border: 1.5px solid #E8E5E0; }

/* Video series step: step bar above the heading, quieter manual-search link */
.series-edit-panel .flow-progress { margin: 8px 0 22px; }
.series-manual-btn {
  background: transparent;
  border: none;
  color: #5D7052;
  font-weight: 600;
  font-size: 14px;
  width: auto;
  margin: 14px auto 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
}
.series-manual-btn:hover { background: #EEF3EA; }

/* The "Upcoming feature: bear" dev shortcut floated over the first step —
   hidden for users until the bear block ships (startBearBlock still exists) */
.test-bear-block-btn { display: none; }

@media (max-width: 640px) {
  :is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
      #screen-schedule, #screen-intention, #screen-schedule-next) .flow-container {
    margin: 16px;
    padding: 22px 20px 20px;
    border-radius: 18px;
  }
  :is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
      #screen-schedule, #screen-intention, #screen-schedule-next) .flow-question { font-size: 22px; }
  :is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
      #screen-schedule, #screen-intention, #screen-schedule-next) .btn-row .btn-primary { flex: 1; min-width: 0; }
}
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .btn-row .btn-primary { flex: 0 0 auto; margin-left: auto; }
.privacy-line::before { filter: grayscale(1); opacity: 0.6; }
@media (max-width: 640px) {
  :is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
      #screen-schedule, #screen-intention, #screen-schedule-next) .btn-row .btn-primary { flex: 1 1 auto; }
}

/* Video series step — same card, heading and footer as the other steps */
#screen-video-select .series-screen-layout { padding-top: 48px; }
#screen-video-select .series-edit-panel {
  max-width: 680px;
  background: #FDFCFB;
  border-radius: 20px;
  padding: 32px 40px 28px;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 10px 30px rgba(61, 56, 50, 0.07);
}
#screen-video-select .series-edit-heading { text-align: left; margin-bottom: 18px; }
#screen-video-select .series-edit-subtitle {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
#screen-video-select .series-edit-heading .flow-screen-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  margin: 0 0 8px;
}
#screen-video-select .series-edit-heading .flow-helper { margin-bottom: 0; }
#screen-video-select .series-edit-card { background: none; box-shadow: none; padding: 0; }
#screen-video-select .series-edit-item { background: #F7F5F1; }
#screen-video-select .series-primary-row {
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #EFEAE3;
}
#screen-video-select .series-back-btn {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  padding: 12px 10px;
  color: #7A7269;
  font-weight: 600;
}
#screen-video-select .series-back-btn::before { content: '← '; }
#screen-video-select .series-back-btn:hover { color: #3D3832; background: #F0EFEC; }
#screen-video-select .series-continue-btn { flex: 0 0 auto; width: auto; min-width: 168px; padding: 14px 28px; }
@media (max-width: 640px) {
  #screen-video-select .series-screen-layout { padding: 16px; }
  #screen-video-select .series-edit-panel { padding: 22px 20px 20px; }
  #screen-video-select .series-edit-heading .flow-screen-title { font-size: 22px; }
  #screen-video-select .series-continue-btn { flex: 1 1 auto; }
}
/* Context block label: "You wrote" (step 2's heading label is already "Your goal") */
.goal-display::before { content: 'You wrote'; }

/* ============================================
   VIDEO PLAYER — polished controls (v2.1)
   ============================================ */
.ui-icon { width: 22px; height: 22px; display: block; flex-shrink: 0; }

/* One centred play button. It sits exactly over YouTube's own centre
   button (72 px before playback, 56 px when paused) and is opaque, so only
   this one is ever seen. The hint text goes underneath it. */
.video-start-hint {
  inset: 0;
  top: 0;
  left: 0;
  transform: none;
  pointer-events: none;
  z-index: 2;
}
.video-start-hint.active { display: block; }
.video-start-hint-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #FDFCFB;
  color: #3D6B4F;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: normal;
  font-size: 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
.video-start-hint-icon .icon-play { width: 34px; height: 34px; margin-left: 5px; }
.video-start-hint-text {
  position: absolute;
  left: 50%;
  top: calc(50% + 58px);
  transform: translateX(-50%);
  background: rgba(36, 33, 29, 0.82);
}
.video-start-hint-text[hidden] { display: none; }
/* Loading: same button, with a spinner instead of the triangle */
.video-start-hint.is-loading .video-start-hint-icon {
  width: 84px;
  height: 84px;
  border: none;
  background: #FDFCFB;
  animation: none;
}
.video-start-hint.is-loading .video-start-hint-icon svg { display: none; }
.video-start-hint.is-loading .video-start-hint-icon::after {
  content: '';
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #D4E3CC;
  border-top-color: #3D6B4F;
  animation: video-loading-spin 0.8s linear infinite;
}
.screen.fullscreen-active .video-start-hint-icon { width: 96px; height: 96px; }

/* Click feedback (resume) — same icon family */
.video-pause-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(36, 33, 29, 0.6);
}
.video-pause-indicator .ui-icon { width: 26px; height: 26px; }

/* Player control bar */
.player-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px 16px;
  background: #24211D; /* solid: YouTube's own bottom row must not show through */
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #F4EFE7;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#screen-video-playing:not(.video-is-playing) .player-bar,
#screen-video-playing.fs-controls-visible .player-bar,
.player-bar:has(:focus-visible),
.player-bar:hover {
  opacity: 1;
  pointer-events: auto;
}
.player-bar-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.player-bar-btn:hover { background: rgba(255, 255, 255, 0.1); }
.player-bar-play .icon-pause,
.player-bar-fullscreen .icon-shrink { display: none; }
#screen-video-playing.video-is-playing .player-bar-play .icon-play { display: none; }
#screen-video-playing.video-is-playing .player-bar-play .icon-pause { display: block; }
.screen.fullscreen-active .player-bar-fullscreen .icon-expand { display: none; }
.screen.fullscreen-active .player-bar-fullscreen .icon-shrink { display: block; }
.player-time {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #D9D2C7;
  padding-left: 6px;
}
.player-bar-spacer { flex: 1; }
/* The seek bar stays visible on top (also while the bar is hidden) */
.video-progress-track { z-index: 4; }

/* During a YouTube ad, YouTube's own controls ("Skip ad") must be usable */
.video-player-wrap.ad-present .player-bar,
.video-player-wrap.ad-present .video-start-hint { display: none; }

/* Fullscreen: the button cluster and day widget sit above the control bar */
.screen.fullscreen-active .fullscreen-pill-cluster,
.screen.fullscreen-active .fullscreen-widgets { bottom: 92px; }

/* Dropdowns with a small leading icon */
.select-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.select-pill .select-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: #7A7269;
  pointer-events: none;
  z-index: 1;
}
.select-pill select.pill-select { padding-left: 38px; }
.select-pill:has(select.active) .select-icon { color: #FDFCFB; }

/* Action buttons under the video: line icons */
.action-pill .action-icon { width: 16px; height: 16px; flex-shrink: 0; }
.action-pill .external-mark { width: 12px; height: 12px; color: #7A7269; }
.action-pill.active .action-icon { fill: currentColor; }

/* ============================================
   SETUP + PRIVACY & DATA (same step-card look as the session flow)
   ============================================ */
:is(#screen-setup, #screen-privacy) .flow-container {
  max-width: 640px;
  margin: 48px auto 64px;
  padding: 32px 40px 28px;
  background: #FDFCFB;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 10px 30px rgba(61, 56, 50, 0.07);
  text-align: left;
}
:is(#screen-setup, #screen-privacy) .flow-container[hidden] { display: none; }
:is(#screen-setup, #screen-privacy) .flow-screen-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #5D7052; text-align: left; margin: 0 0 8px;
}
:is(#screen-setup, #screen-privacy) .flow-question {
  font-size: 26px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em;
  color: #3D3832; text-align: left; margin: 0 0 8px;
}
:is(#screen-setup, #screen-privacy) .btn-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid #EFEAE3;
}
:is(#screen-setup, #screen-privacy) .btn-row .btn-secondary {
  background: transparent; border: none; padding: 12px 10px; color: #7A7269; font-weight: 600; font-size: 15px;
}
:is(#screen-setup, #screen-privacy) .btn-row .btn-secondary::before { content: '← '; }
:is(#screen-setup, #screen-privacy) .btn-row .btn-secondary:hover { color: #3D3832; background: #F0EFEC; }
:is(#screen-setup, #screen-privacy) .btn-row .btn-primary { flex: 0 0 auto; width: auto; min-width: 168px; padding: 14px 28px; margin-left: auto; }

/* Purpose choices: full-width, easy to scan */
.purpose-group { display: flex; flex-direction: column; gap: 10px; }
.purpose-group .pill {
  text-align: left; padding: 14px 18px; font-size: 15px; border-radius: 14px;
  border: 1.5px solid #E3DED6; background: #FDFCFB;
}
.purpose-group .pill:hover { border-color: #A9C29C; background: #F3F6F0; }
.purpose-group .pill.selected {
  background: #EEF3EA; border-color: #5D7052; color: #2F3D29; font-weight: 600;
  box-shadow: 0 0 0 3px rgba(93, 112, 82, 0.15);
}

/* Plain-words data list */
.data-facts { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 6px; }
.data-fact { display: flex; gap: 12px; align-items: flex-start; }
.data-fact-icon {
  flex-shrink: 0; width: 22px; height: 22px; padding: 4px; margin-top: 1px;
  border-radius: 50%; background: #D4E3CC; color: #3D6B4F;
}
.data-fact-title { font-size: 15px; font-weight: 700; color: #3D3832; margin-bottom: 2px; }
.data-fact-text { font-size: 14px; line-height: 1.5; color: #5F5850; }
.data-facts-link { margin-top: 4px; }
.data-permission-note { margin: 16px 0 0; font-size: 14px; }
.setup-error { margin-top: 14px; font-size: 14px; color: #8A3B2C; background: #FBF1EE; border-radius: 10px; padding: 10px 14px; }
.setup-error[hidden] { display: none; }
.setup-not-now { display: block; margin: 12px auto 0; }

/* Privacy & data controls */
.settings-heading {
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #7A7269; margin: 28px 0 10px;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px; background: #F7F5F1; border-radius: 12px; font-size: 14px; color: #3D3832;
}
.settings-row + .field-hint { margin-top: 8px; }
.btn-danger {
  background: #FDFCFB; color: #8A3B2C; border: 1.5px solid #EBCFC7; border-radius: 999px;
  font-family: 'Inter', sans-serif; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn-danger:hover { background: #FBF1EE; }

/* "Off on youtube.com" notice */
.off-banner {
  position: sticky; top: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px; background: #FBF1E0; border-bottom: 1px solid #EFDDB8;
  font-size: 14px; color: #5A4419;
}
.off-banner[hidden] { display: none; }
.privacy-note a { color: #5D7052; font-weight: 600; }

@media (max-width: 640px) {
  :is(#screen-setup, #screen-privacy) .flow-container { margin: 16px; padding: 22px 20px 20px; }
  :is(#screen-setup, #screen-privacy) .flow-question { font-size: 22px; }
  .settings-row { flex-direction: column; align-items: flex-start; }
}

/* ---- Session controls inside the player bar (fullscreen) ----
   In fullscreen, Breathe · CC · Quality · Speed · Next · Exit sit in the
   bar at the bottom instead of floating over the video. In the normal view
   they're below the player / in the side panel, so the bar only has
   play · time · share · fullscreen there. */
.player-bar .fullscreen-pill-cluster { display: none; }
.screen.fullscreen-active .player-bar {
  height: auto;
  min-height: 72px;
  padding: 10px 16px 20px;
  flex-wrap: wrap;
  row-gap: 8px;
}
.screen.fullscreen-active .player-bar .fullscreen-pill-cluster {
  display: flex;
  position: static;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 8px 0 0;
  left: auto;
  right: auto;
  bottom: auto;
  opacity: 1;
  pointer-events: inherit;
}
.player-bar .fullscreen-pill-cluster .hover-pill,
.player-bar .fullscreen-pill-cluster select.pill-select {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #F4EFE7;
  padding-top: 8px;
  padding-bottom: 8px;
}
.player-bar .fullscreen-pill-cluster .hover-pill:hover { background-color: rgba(255, 255, 255, 0.16); }
.player-bar .fullscreen-pill-cluster select.pill-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23F4EFE7' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.player-bar .fullscreen-pill-cluster select.cc-select.active { background-color: #5D7052; border-color: #5D7052; }
.player-bar .fullscreen-pill-cluster select option { color: #3D3832; background: #FDFCFB; }
.player-bar .fullscreen-pill-cluster .select-icon { color: #D9D2C7; }
.player-bar .fullscreen-pill-cluster .bear-icon { color: #F4EFE7; }
.player-bar .fullscreen-pill-cluster .next-video-btn { width: auto; padding: 9px 18px; font-size: 14px; }
.player-bar .fullscreen-pill-cluster .btn-exit {
  width: auto;
  margin: 0;
  padding: 8px 16px;
  font-size: 13px;
  background: transparent;
  color: #F4EFE7;
}
.player-bar-share { margin-left: 2px; }
/* Player notes ("Link copied…") sit above the taller fullscreen bar */
.screen.fullscreen-active .player-status { bottom: 96px; }

/* ---- "min active" + "min saved" pair ---- */
.session-stats { display: flex; align-items: stretch; gap: 10px; }
.session-stats .saved-chest-widget { position: static; margin: 0; }
.panel-chest-slot .session-stats { justify-content: flex-end; margin-bottom: 14px; }
.screen.fullscreen-active .session-stats {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1100;
}
.active-time-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 16px;
  background: #FDFCFB;
  border: 1px solid #E3DED6;
  color: #3D3832;
  box-shadow: 0 2px 8px rgba(61, 56, 50, 0.08);
  transition: opacity 0.25s ease;
}
.active-time-icon { width: 24px; height: 24px; color: #5D7052; flex-shrink: 0; }
.active-time-widget .saved-chest-widget-label { color: #7A7269; opacity: 1; }
.active-time-widget.is-paused .active-time-icon { color: #B5A08F; }
/* Fullscreen: hides with the other controls while the video plays */
.screen.fullscreen-active .active-time-widget { opacity: 0; pointer-events: none; }
.screen.fullscreen-active.fs-controls-visible .active-time-widget { opacity: 1; pointer-events: auto; }

/* ---- Series list: the current video is a raised card (no side stroke) ---- */
.video-checklist { padding: 6px 6px 8px; margin-left: -6px; margin-right: -6px; }
.checklist-item { border-left: none; }
.checklist-item.is-current {
  background: #FDFCFB;
  border-left: none;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.06), 0 6px 18px rgba(61, 56, 50, 0.12);
}
.checklist-item.is-current .checklist-meta { color: #4A5C41; }

/* ---- Save to a course / New course dialog ---- */
.course-dialog {
  width: min(92vw, 440px);
  max-height: min(86vh, 640px);
  margin: auto;
  padding: 22px 24px 24px;
  border: none;
  border-radius: 20px;
  background: #FDFCFB;
  color: #3D3832;
  box-shadow: 0 24px 60px rgba(36, 33, 29, 0.28);
  font-family: 'Inter', sans-serif;
}
.course-dialog::backdrop { background: rgba(36, 33, 29, 0.45); }
.course-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.course-dialog-title { font-size: 20px; font-weight: 700; }
.course-dialog-close {
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: transparent; color: #7A7269; font-size: 15px; cursor: pointer;
}
.course-dialog-close:hover { background: #F0EFEC; color: #3D3832; }
.course-dialog-video {
  margin-top: 4px; font-size: 13px; color: #7A7269;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.course-dialog-video[hidden] { display: none; }
.course-dialog-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; max-height: 300px; overflow-y: auto; }
.course-dialog-list[hidden] { display: none; }
.course-dialog-empty { font-size: 14px; color: #7A7269; }
.course-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 12px 14px; text-align: left;
  border: 1.5px solid #E3DED6; border-radius: 12px; background: #FDFCFB;
  font-family: inherit; color: #3D3832; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.course-option:hover:not(:disabled) { border-color: #A9C29C; background: #F3F6F0; }
.course-option.is-in { background: #EEF3EA; border-color: #D4E3CC; cursor: default; }
.course-option-name { font-size: 15px; font-weight: 600; }
.course-option-meta { font-size: 12px; color: #7A7269; white-space: nowrap; }
.course-option.is-in .course-option-meta { color: #4A5C41; font-weight: 600; }
.course-dialog-new-btn {
  margin-top: 12px; width: 100%; padding: 12px 14px; text-align: left;
  border: 1.5px dashed #A9C29C; border-radius: 12px; background: transparent;
  font-family: inherit; font-size: 15px; font-weight: 600; color: #3D6B4F; cursor: pointer;
}
.course-dialog-new-btn:hover { background: #F3F6F0; }
.course-dialog-new-btn[hidden], .course-dialog-new[hidden] { display: none; }
.course-dialog-new { margin-top: 16px; }
.course-dialog-label { display: block; font-size: 13px; font-weight: 600; color: #7A7269; margin-bottom: 6px; }
.course-dialog-new .text-input {
  margin: 0; height: 48px; padding: 12px 14px;
  background: #F7F5F1; border: 1.5px solid #E8E5E0; box-shadow: none;
}
.course-dialog-new .text-input:focus { background: #FDFCFB; border-color: #5D7052; box-shadow: 0 0 0 3px rgba(93, 112, 82, 0.15); }
.course-dialog-error { margin-top: 8px; font-size: 13px; color: #8A3B2C; }
.course-dialog-error[hidden] { display: none; }
.course-dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; }
.course-dialog-actions .btn-primary { width: auto; padding: 12px 22px; font-size: 14px; }

/* ---- Courses tab: "+ New course" and empty courses ---- */
.courses-top .courses-new-btn { width: auto; padding: 11px 20px; font-size: 14px; margin-left: auto; }
.course-cover-thumb.is-empty {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, #F3F0EA 0 12px, #EFEAE3 12px 24px);
}
.course-empty-cover { font-size: 13px; font-weight: 600; color: #7A7269; }

/* ============================================
   COURSE PAGE · VIDEO PICKER · DRAG TO REORDER
   ============================================ */
.drag-handle {
  flex-shrink: 0;
  width: 28px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #B5A08F;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none; /* let the drag work on touch screens */
}
.drag-handle svg { width: 18px; height: 18px; }
.drag-handle:hover { background: #F0EFEC; color: #5D7052; }
.drag-handle:active { cursor: grabbing; }
.is-sorting { user-select: none; }
.is-sorting > [data-index] { transition: transform 0.15s ease; }
.is-sorting > .is-dragging {
  transition: none;
  position: relative;
  z-index: 2;
  box-shadow: 0 10px 28px rgba(61, 56, 50, 0.22);
}
.series-edit-row { align-items: center; }

/* Course page */
.course-page { max-width: 860px; }
.course-page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.course-page-heading .flow-screen-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #5D7052; text-align: left; margin: 0 0 6px;
}
.course-page-title { font-size: 28px; font-weight: 700; line-height: 1.2; color: #3D3832; }
.course-page-meta { margin-top: 6px; font-size: 14px; color: #7A7269; }
.course-page-actions { display: flex; gap: 10px; align-items: center; }
.course-start-btn { width: auto; padding: 12px 24px; font-size: 15px; }
.course-start-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.course-page-hint { margin: 14px 0 12px; font-size: 13px; color: #7A7269; }
.course-page-hint[hidden] { display: none; }
.hint-grip { color: #B5A08F; letter-spacing: -2px; font-weight: 700; }
.course-video-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.course-video-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 6px;
  background: #FDFCFB; border-radius: 14px;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.05), 0 4px 14px rgba(61, 56, 50, 0.07);
}
.course-video-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: #F0EFEC; color: #7A7269; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.course-video-row.is-watched .course-video-num { background: #D4E3CC; color: #4A5C41; }
.course-video-thumb { width: 128px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: #EFEAE3; }
.course-video-text { flex: 1; min-width: 0; }
.course-video-title {
  font-size: 15px; font-weight: 600; color: #3D3832; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.course-video-meta { margin-top: 3px; font-size: 13px; color: #7A7269; }
.course-video-remove {
  flex-shrink: 0; width: 36px; height: 36px; border: none; border-radius: 50%;
  background: transparent; color: #B5A08F; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.course-video-remove svg { width: 18px; height: 18px; }
.course-video-remove:hover { background: #FBF1EE; color: #8A3B2C; }
.course-video-empty {
  padding: 28px; text-align: center; color: #7A7269; font-size: 14px;
  background: #FDFCFB; border-radius: 14px; border: 1.5px dashed #E3DED6;
}
@media (max-width: 640px) {
  .course-video-thumb { width: 88px; }
  .course-page-actions { width: 100%; }
  .course-start-btn { flex: 1; }
}

/* "+ Add more videos to this course" under each course card */
.course-add-more-btn {
  margin-top: 12px; width: 100%; padding: 9px 12px;
  border: 1.5px dashed #A9C29C; border-radius: 10px; background: transparent;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; color: #3D6B4F; cursor: pointer;
}
.course-add-more-btn:hover { background: #F3F6F0; }
.course-group-card:focus-visible { outline: 3px solid #5D7052; outline-offset: 2px; }

/* Video picker dialog */
.picker-dialog { width: min(94vw, 760px); max-height: min(90vh, 820px); display: flex; flex-direction: column; }
.picker-dialog:not([open]) { display: none; }
.picker-search-row { display: flex; gap: 8px; margin-top: 14px; }
.picker-search-row .text-input {
  flex: 1; margin: 0; height: 44px; padding: 10px 14px;
  background: #F7F5F1; border: 1.5px solid #E8E5E0; box-shadow: none;
}
.picker-search-row .text-input:focus { background: #FDFCFB; border-color: #5D7052; box-shadow: 0 0 0 3px rgba(93, 112, 82, 0.15); }
.picker-results {
  flex: 1; min-height: 160px; overflow-y: auto; margin-top: 14px; padding: 4px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-content: start;
}
.picker-status { grid-column: 1 / -1; padding: 28px 8px; text-align: center; font-size: 14px; color: #7A7269; }
.picker-card {
  display: flex; flex-direction: column; gap: 4px; padding: 0 0 10px; text-align: left;
  border: 2px solid transparent; border-radius: 12px; background: #FDFCFB; overflow: hidden;
  box-shadow: 0 1px 4px rgba(61, 56, 50, 0.1); font-family: inherit; color: #3D3832; cursor: pointer;
}
.picker-card:hover:not(:disabled) { box-shadow: 0 4px 14px rgba(61, 56, 50, 0.16); }
.picker-card.is-selected { border-color: #5D7052; background: #F3F6F0; }
.picker-card.is-in { opacity: 0.6; cursor: default; }
.picker-thumb { position: relative; aspect-ratio: 16 / 9; background: #EFEAE3; }
.picker-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker-badge {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 999px;
  background: rgba(30, 30, 30, 0.72); color: #FDFCFB; font-size: 11px; font-weight: 700;
}
.picker-card.is-selected .picker-badge { background: #5D7052; }
.picker-title {
  padding: 0 10px; font-size: 13px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.picker-meta { padding: 0 10px; font-size: 11px; color: #7A7269; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid #EFEAE3;
}
.picker-count { font-size: 14px; font-weight: 600; color: #3D3832; }
.picker-footer .btn-primary { width: auto; padding: 12px 22px; font-size: 14px; }
.picker-footer .btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.hint-grip { width: 16px; height: 16px; vertical-align: -3px; letter-spacing: 0; }

/* ---- Courses: seasons, ⋯ menu, deadline calendar (v2) ---- */
.courses-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 960px) {
  .courses-body { grid-template-columns: minmax(0, 1fr); }
  .season-side { position: static; order: -1; }
}
.courses-main .course-group-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.season-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.season-blur-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #FDFCFB; border: 1.5px solid #E8E5E0; border-radius: 999px;
  padding: 8px 16px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  color: #3D3832; cursor: pointer;
}
.season-blur-btn:hover { border-color: #5D7052; }
.season-blur-btn svg { width: 18px; height: 18px; }
.season-blur-btn[hidden] { display: none; }

.season-section {
  border-radius: 18px;
  padding: 14px 14px 18px;
  margin-bottom: 18px;
  border: 2px dashed transparent;
  transition: border-color 0.15s, background 0.15s;
}
.season-section.is-current { background: #F3F6F0; }
.season-section.is-drop-target { border-color: #5D7052; background: #EEF3EA; }
.season-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.season-name { font-size: 18px; font-weight: 700; color: #3D3832; margin: 0; }
.season-rename-btn {
  width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent;
  color: #7A7269; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.season-rename-btn:hover { background: #EFEAE3; color: #3D3832; }
.season-rename-btn svg { width: 16px; height: 16px; }
.season-now-pill {
  background: #5D7052; color: #FDFCFB; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.02em;
}
.season-dates {
  margin-left: auto; background: none; border: none; font-family: 'Inter', sans-serif;
  font-size: 12px; color: #7A7269; cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.season-dates:hover { background: #EFEAE3; color: #3D3832; }
.season-section.is-blurred .season-grid {
  filter: blur(5px);
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
}
.season-empty { font-size: 13px; color: #7A7269; margin: 4px 2px; grid-column: 1 / -1; }
.course-group-card.is-dragging-card {
  z-index: 40;
  box-shadow: 0 18px 40px rgba(61,56,50,0.28);
  transition: none;
  cursor: grabbing;
  pointer-events: none;
}
body.is-season-dragging { user-select: none; cursor: grabbing; }
.course-group-card.is-complete { border-color: #A9C29B; }
.course-card-badge { font-size: 12px; font-weight: 600; color: #4A5C41; margin: 6px 0 0; }

/* ⋯ button on each course card + its menu */
.course-menu-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(253, 252, 251, 0.94); color: #3D3832; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(61,56,50,0.18);
}
.course-menu-btn:hover { background: #FDFCFB; color: #5D7052; }
.course-menu-btn svg { width: 18px; height: 18px; }
.course-menu {
  position: fixed; z-index: 1000; min-width: 210px;
  background: #FDFCFB; border: 1px solid #E8E5E0; border-radius: 14px;
  box-shadow: 0 14px 36px rgba(61,56,50,0.2); padding: 6px;
  display: flex; flex-direction: column;
}
.course-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; border-radius: 10px; padding: 10px 12px;
  font-family: 'Inter', sans-serif; font-size: 14px; color: #3D3832; text-align: left; cursor: pointer;
}
.course-menu-item svg { width: 18px; height: 18px; flex-shrink: 0; color: #7A7269; }
.course-menu-item:hover, .course-menu-item:focus-visible { background: #F0EFEC; }
.course-menu-item.is-danger, .course-menu-item.is-danger svg { color: #A6402C; }
.course-menu-item.is-danger:hover { background: #F8E9E4; }
.course-menu-item.is-current { font-weight: 700; }
.course-menu-label { font-size: 12px; font-weight: 600; color: #7A7269; margin: 6px 12px 4px; }

/* Deadline: "Set deadline" button + calendar on the side */
.season-side {
  position: sticky; top: 16px;
  background: #FDFCFB; border-radius: 18px; padding: 16px;
  box-shadow: 0 2px 10px rgba(61,56,50,0.08);
}
.season-deadline-btn { width: 100%; padding: 12px 16px; font-size: 14px; }
.season-deadline-options { margin-top: 10px; }
.season-deadline-options[hidden] { display: none; }
.season-deadline-label { font-size: 12px; color: #7A7269; margin: 0 0 8px; }
.season-deadline-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.season-length-btn {
  background: #F0EFEC; border: 1.5px solid transparent; border-radius: 10px; padding: 8px 4px;
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; color: #3D3832; cursor: pointer;
}
.season-length-btn:hover { border-color: #5D7052; }
.season-length-btn.active { background: #5D7052; color: #FDFCFB; }
.season-calendar { margin-top: 14px; }
.season-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.season-cal-title { font-size: 15px; font-weight: 700; color: #3D3832; margin: 0; text-align: center; flex: 1; }
.season-cal-step {
  width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent;
  color: #3D3832; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.season-cal-step:hover:not(:disabled) { background: #F0EFEC; }
.season-cal-step:disabled { opacity: 0.3; cursor: default; }
.season-cal-step svg { width: 18px; height: 18px; }
.season-cal-today { font-size: 13px; color: #3D3832; margin: 8px 0 2px; text-align: center; }
.season-cal-left { font-size: 13px; font-weight: 700; color: #4A5C41; margin: 0 0 10px; text-align: center; }
.season-cal-left.is-over { color: #A6402C; }
.cal-month { margin-top: 10px; }
.cal-month-name { font-size: 13px; font-weight: 700; color: #3D3832; margin: 0 0 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { font-size: 10px; font-weight: 600; color: #A39A90; text-align: center; padding-bottom: 2px; }
.cal-day {
  height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #A39A90; border-radius: 6px; font-variant-numeric: tabular-nums;
}
.cal-day.is-used { background: #E07A66; color: #FDFCFB; font-weight: 600; }
.cal-day.is-left { background: #CFE3C2; color: #3D4F35; font-weight: 600; }
.cal-day.is-today { outline: 2px solid #3D3832; outline-offset: 1px; }
.cal-day.is-deadline { border-radius: 50%; width: 26px; justify-self: center; box-shadow: 0 0 0 2px #FDFCFB, 0 0 0 4px #C0392B; }
.season-cal-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 11px; color: #7A7269; margin: 12px 0 0; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.legend-dot.is-used { background: #E07A66; }
.legend-dot.is-left { background: #CFE3C2; }
.legend-dot.is-deadline { border-radius: 50%; border: 2px solid #C0392B; background: transparent; }

/* Small confirm / name dialog */
.ask-dialog { width: min(92vw, 420px); }
.ask-text { font-size: 15px; color: #3D3832; margin: 10px 0 0; line-height: 1.45; }
.ask-text[hidden], #ask-input[hidden] { display: none; }
#ask-input { margin-top: 14px; width: 100%; }
.btn-danger { background: #A6402C !important; border-color: #A6402C !important; color: #FDFCFB !important; }

/* Learning channel page: search + "+ Add to a course" */
.channel-search-row { display: flex; gap: 10px; margin-bottom: 12px; }
.channel-search-row .text-input { flex: 1; margin: 0; }
.channel-search-row .btn-secondary { width: auto; padding: 0 22px; }
.channel-search-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: #3D3832; margin: 0 0 14px; }
.channel-search-status[hidden] { display: none; }
.channel-video-card { display: flex; flex-direction: column; cursor: default; }
.channel-video-card .manual-video-info { flex: 1; }
.channel-video-card.in-course { border-color: #A9C29B; }
.channel-video-in { font-size: 12px; font-weight: 600; color: #4A5C41; margin: 6px 0 0; }
.channel-add-btn {
  margin: 0 12px 12px; padding: 12px 14px; border-radius: 12px;
  border: none; background: #5D7052; color: #FDFCFB;
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer;
}
.channel-add-btn:hover { background: #4A5C41; }
.channel-add-btn.is-added { background: #EEF3EA; color: #4A5C41; border: 1.5px solid #A9C29B; }
.channel-add-btn.is-added:hover { background: #E2ECDB; }

/* Watched = green, with a "Watched" tag (series, player, course page) */
.watched-tag {
  display: inline-block; align-self: flex-start;
  background: #5D7052; color: #FDFCFB; font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; margin-top: 4px; letter-spacing: 0.02em;
}
.checklist-item.is-watched { background: #EEF5E9; }
.checklist-item.is-watched .checklist-marker { background: #5D7052; color: #FDFCFB; }
.series-edit-item.is-watched { background: #E6F0DF; box-shadow: inset 4px 0 0 #5D7052; }
.course-video-row.is-watched { background: #EEF5E9; }
.course-video-row.is-watched .course-video-num { background: #5D7052; color: #FDFCFB; }
.series-progress { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.series-progress[hidden] { display: none; }
.series-progress-text { font-size: 12px; font-weight: 600; color: #4A5C41; margin: 0; }
.series-progress-line .course-progress-bar-wrap { margin: 4px 0 0; height: 7px; background: #E3DDD4; }
.series-progress-line.is-course .series-progress-text { color: #3D3832; }
.course-page-progress { margin: 4px 0 16px; }
.course-page-progress[hidden] { display: none; }
.course-page-progress .series-progress-text { font-size: 13px; }

/* The course's own badge at the end of the course page */
.course-badge-row {
  display: flex; align-items: center; gap: 14px; margin-top: 20px;
  background: #F0EFEC; border-radius: 16px; padding: 14px 18px;
}
.course-badge-row.is-earned { background: #EEF5E9; }
.course-badge-icon { font-size: 30px; line-height: 1; }
.course-badge-row:not(.is-earned) .course-badge-icon { filter: grayscale(1); opacity: 0.7; }
.course-badge-title { font-size: 15px; font-weight: 700; color: #3D3832; margin: 0 0 2px; }
.course-badge-text { font-size: 13px; color: #7A7269; margin: 0; }

/* ---- Top bar on every page (v2) ---- */
nav.app-nav {
  max-width: none;
  margin: 0;
  padding: 10px 32px;
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(240, 236, 227, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #E4DED3;
}
.app-nav .nav-links { margin-left: auto; flex-wrap: wrap; }
.app-nav .nav-cta-item { display: none; }
body[data-screen="screen-home"] .app-nav .nav-cta-item { display: list-item; }
body[data-screen="screen-setup"] .app-nav { display: none; }
.nav-clock {
  font-size: 15px; font-weight: 700; color: #3D3832; font-variant-numeric: tabular-nums;
  background: #FDFCFB; border: 1px solid #E4DED3; border-radius: 999px; padding: 5px 12px;
}
@media (max-width: 900px) {
  nav.app-nav { flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  .app-nav .nav-links { margin-left: 0; order: 3; width: 100%; }
}

/* ---- The ADHD clock (pie of the time left) ---- */
.adhd-clock { display: block; flex-shrink: 0; }
.adhd-face { fill: #FDFCFB; stroke: #D8D1C5; stroke-width: 1.5; }
.adhd-left { fill: none; }
.adhd-ticks line { stroke: #A39A90; stroke-width: 1.2; stroke-linecap: round; }
.adhd-pin { fill: #3D3832; }
.adhd-clock.is-up .adhd-face { stroke: #C0392B; stroke-width: 2.5; }

/* ---- Session dock ---- */
.session-dock {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  width: 264px;
  background: #FDFCFB;
  border: 1px solid #E4DED3;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(61, 56, 50, 0.16);
  padding: 12px 14px 14px;
}
.session-dock[hidden] { display: none; }
.dock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dock-title { font-size: 12px; font-weight: 700; color: #7A7269; text-transform: uppercase; letter-spacing: 0.05em; }
.dock-min-btn {
  width: 28px; height: 28px; border-radius: 8px; border: none; background: #F0EFEC;
  color: #3D3832; font-size: 16px; font-weight: 700; cursor: pointer; line-height: 1;
}
.dock-min-btn:hover { background: #E4DED3; }
.dock-clock-row { display: flex; align-items: center; gap: 12px; }
.dock-time { font-size: 22px; font-weight: 700; color: #3D3832; margin: 0; font-variant-numeric: tabular-nums; line-height: 1.1; }
.dock-left { font-size: 13px; font-weight: 600; color: #4A5C41; margin: 2px 0 0; }
.dock-intent { font-size: 13px; color: #3D3832; margin: 10px 0 8px; line-height: 1.4; }
.dock-stats { display: flex; gap: 14px; font-size: 12px; color: #7A7269; margin: 0 0 8px; }
.dock-stats strong { color: #3D3832; font-size: 14px; }
.dock-calendar-track { margin-bottom: 8px; }
.dock-back-btn { width: 100%; }
.dock-back-btn[hidden] { display: none; }
/* minimized: just the clock, the time and what's left */
.session-dock.is-min { width: auto; padding: 8px 10px 8px 12px; border-radius: 999px; }
.session-dock.is-min .dock-head { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); margin: 0; }
.session-dock.is-min .dock-title, .session-dock.is-min .dock-body { display: none; }
.session-dock.is-min .dock-clock-row { gap: 8px; padding-right: 36px; }
.session-dock.is-min .dock-time { font-size: 15px; }
.session-dock.is-min .dock-left { font-size: 12px; margin: 0; }
body.is-fullscreen .session-dock { display: none; }

/* Clock in the video page's side panel */
.panel-clock {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px;
  background: #F3F6F0; border-radius: 14px; padding: 10px 12px; margin-bottom: 14px;
}
.panel-clock[hidden] { display: none; }
.panel-clock-time { font-size: 20px; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.panel-clock-left { font-size: 13px; font-weight: 600; color: #4A5C41; margin: 0; }
.panel-clock-intent { grid-column: 1 / -1; font-size: 13px; color: #3D3832; margin: 4px 0 0; line-height: 1.4; }

/* ---- "Your time": How long | Finish by ---- */
.plan-mode { display: inline-flex; background: #F0EFEC; border-radius: 999px; padding: 4px; margin: 4px 0 16px; }
.plan-mode-btn {
  border: none; background: transparent; border-radius: 999px; padding: 8px 18px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; color: #7A7269; cursor: pointer;
}
.plan-mode-btn.active { background: #5D7052; color: #FDFCFB; }
#plan-duration-panel[hidden], #plan-until-panel[hidden] { display: none; }
#duration-group .pill { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.pill-until { font-size: 11px; font-weight: 500; opacity: 0.75; margin-top: 2px; }
.plan-now { font-size: 14px; color: #3D3832; margin: 0 0 10px; }
.finish-grid { display: grid; grid-template-columns: 56px 1fr; gap: 6px 10px; align-items: center; margin-bottom: 8px; }
.finish-hour { font-size: 12px; font-weight: 700; color: #A39A90; font-variant-numeric: tabular-nums; border-top: 1px solid #E8E5E0; padding-top: 6px; }
.finish-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border-top: 1px solid #E8E5E0; padding-top: 6px; }
.finish-btn {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: #F0EFEC; border: 1.5px solid transparent; border-radius: 12px; padding: 7px 4px;
  font-family: 'Inter', sans-serif; cursor: pointer; color: #3D3832;
}
.finish-btn:hover { border-color: #5D7052; }
.finish-btn.selected { background: #5D7052; color: #FDFCFB; }
.finish-time { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.finish-dur { font-size: 11px; opacity: 0.8; }

/* ---- Courses: numbers, priority colors, reordering, completed list ---- */
.season-toolbar .link-course-btn, .course-page-actions .link-course-btn { display: inline-flex; align-items: center; gap: 6px; }
.link-icon { width: 16px; height: 16px; flex-shrink: 0; }
.season-toolbar [hidden] { display: none; }
.season-blur-row { display: flex; justify-content: center; margin: -6px 0 12px; }
.course-num {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px;
  background: rgba(61, 56, 50, 0.82); color: #FDFCFB;
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.course-group-card[data-priority] { border-top: 5px solid transparent; }
.course-group-card[data-priority="red"] { border-top-color: #D64545; }
.course-group-card[data-priority="orange"] { border-top-color: #E8893A; }
.course-group-card[data-priority="yellow"] { border-top-color: #E8C547; }
.course-group-card[data-priority="red"] .course-num { background: #D64545; }
.course-group-card[data-priority="orange"] .course-num { background: #E8893A; }
.course-group-card[data-priority="yellow"] .course-num { background: #E8C547; color: #3D3832; }
.course-group-card.drop-before { box-shadow: -5px 0 0 #5D7052, 0 2px 8px rgba(61,56,50,0.09); }
.course-group-card.drop-after { box-shadow: 5px 0 0 #5D7052, 0 2px 8px rgba(61,56,50,0.09); }
.priority-dots { display: flex; gap: 10px; padding: 2px 12px 10px; border-bottom: 1px solid #EFEAE3; margin-bottom: 4px; }
.priority-dot {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid #FDFCFB; cursor: pointer;
  box-shadow: 0 0 0 1.5px #D8D1C5;
}
.priority-dot.is-red { background: #D64545; }
.priority-dot.is-orange { background: #E8893A; }
.priority-dot.is-yellow { background: #E8C547; }
.priority-dot.is-none { background: linear-gradient(135deg, #FDFCFB 45%, #A39A90 45%, #A39A90 55%, #FDFCFB 55%); }
.priority-dot.is-on { box-shadow: 0 0 0 2.5px #3D3832; }
.priority-dot:hover { transform: scale(1.08); }

.completed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.completed-row-btn {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  background: #FDFCFB; border: 1.5px solid transparent; border-radius: 14px; padding: 10px 14px;
  font-family: 'Inter', sans-serif; cursor: pointer; box-shadow: 0 2px 8px rgba(61,56,50,0.07);
}
.completed-row-btn:hover { border-color: #5D7052; }
.completed-num { font-size: 16px; font-weight: 700; color: #7A7269; min-width: 26px; font-variant-numeric: tabular-nums; }
.completed-cover { width: 128px; flex-shrink: 0; border-radius: 10px; overflow: hidden; position: relative; }
.completed-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.completed-name { font-size: 16px; font-weight: 700; color: #3D3832; }
.completed-meta { font-size: 13px; color: #4A5C41; }

/* Covers from another site: its icon on a soft tile */
.site-cover {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; background: #EEF3EA;
}
.site-cover img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; background: #FDFCFB; }
.site-cover-letter {
  width: 64px; height: 64px; border-radius: 14px; background: #5D7052; color: #FDFCFB;
  font-size: 30px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.site-cover-host { font-size: 12px; font-weight: 600; color: #4A5C41; }
.site-cover.is-small { width: 40px; height: 40px; background: none; flex-shrink: 0; }
.site-cover.is-small img, .site-cover.is-small .site-cover-letter { width: 36px; height: 36px; font-size: 17px; border-radius: 9px; }
.course-cover-thumb.is-site { display: block; }
.completed-cover .site-cover { aspect-ratio: 16 / 9; }

.link-preview { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; font-size: 14px; font-weight: 600; color: #3D3832; }
.link-preview[hidden] { display: none; }
.link-dialog .text-input { width: 100%; margin-bottom: 4px; }
.link-dialog .course-dialog-label { margin-top: 12px; }

.course-links { margin-top: 18px; }
.course-links[hidden] { display: none; }
.course-links-title { font-size: 15px; font-weight: 700; color: #3D3832; margin: 0 0 10px; }
.course-link-row {
  display: flex; align-items: center; gap: 12px; background: #FDFCFB; border-radius: 14px;
  padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 2px 8px rgba(61,56,50,0.06);
}
.course-link-row.is-watched { background: #EEF5E9; }
.course-link-row .course-video-text { flex: 1; min-width: 0; }
.course-link-row .course-video-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-link-done {
  border: 1.5px solid #A9C29B; background: #FDFCFB; color: #4A5C41; border-radius: 999px;
  padding: 7px 14px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.course-link-done.is-done { background: #5D7052; border-color: #5D7052; color: #FDFCFB; }
.season-toolbar .courses-new-btn { width: auto; flex: 0 0 auto; margin: 0; padding: 10px 18px; font-size: 14px; }

/* ---- Landing page: the two starts on the hero picture ---- */
.hero-cta {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.hero-btn {
  min-width: 220px; padding: 15px 28px; border-radius: 999px; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(30, 30, 30, 0.22); transition: transform 0.15s, background 0.15s;
}
.hero-btn:hover { transform: translateY(-1px); }
.hero-btn-start { background: #3d6b4f; color: #FDFCFB; border: 2px solid #3d6b4f; }
.hero-btn-start:hover { background: #2f5340; }
.hero-btn-study { background: #FDFCFB; color: #2f5340; border: 2px solid #FDFCFB; }
.hero-btn-study:hover { background: #F3F6F0; }

/* ---- Settings + "after" question ---- */
#screen-settings .flow-container { max-width: 640px; margin: 48px auto 64px; padding: 32px 40px 28px; background: #FDFCFB; border-radius: 20px; box-shadow: 0 10px 30px rgba(61, 56, 50, 0.07); }
#screen-settings .settings-row { align-items: center; gap: 16px; }
.after-intent-row { margin: 14px 0 4px; }
.after-intent-row[hidden] { display: none; }
.after-intent-row .text-input { width: 100%; }
.dock-after, .panel-clock-after { font-size: 13px; font-weight: 600; color: #4A5C41; margin: -2px 0 8px; }
.panel-clock-after { grid-column: 1 / -1; margin: 0; }
.dock-after[hidden], .panel-clock-after[hidden] { display: none; }

/* ---- Video series: Most relevant | Latest ---- */
.series-order-tabs { display: inline-flex; background: #F0EFEC; border-radius: 999px; padding: 4px; margin: 0 0 12px; }
.series-order-tabs[hidden] { display: none; }
.series-order-btn {
  border: none; background: transparent; border-radius: 999px; padding: 8px 18px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; color: #7A7269; cursor: pointer;
}
.series-order-btn.active { background: #5D7052; color: #FDFCFB; }

/* ---- Upcoming feature chip next to Subscribe ---- */
.action-pill.is-upcoming { cursor: default; color: #A39A90; border-style: dashed; background: transparent; }

/* ---- Allocate study time to calendar ---- */
.study-page { max-width: 1240px; }
.study-title { text-align: left; }
.upcoming-note {
  display: inline-block; font-size: 13px; color: #7A7269; background: #F0EFEC;
  border: 1.5px dashed #D8D1C5; border-radius: 999px; padding: 6px 14px; margin: 0 0 18px;
}
.study-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .study-layout { grid-template-columns: 1fr; } }
.study-side { position: sticky; top: 72px; }
.study-courses { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.study-course-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  background: #FDFCFB; border: 1.5px solid #E8E5E0; border-left: 5px solid #5D7052; border-radius: 12px;
  padding: 10px 12px; cursor: grab; font-family: 'Inter', sans-serif; touch-action: none;
}
.study-course-chip:hover { border-color: #5D7052; }
.study-course-chip[data-priority="red"] { border-left-color: #D64545; }
.study-course-chip[data-priority="orange"] { border-left-color: #E8893A; }
.study-course-chip[data-priority="yellow"] { border-left-color: #E8C547; }
.study-chip-name { font-size: 14px; font-weight: 700; color: #3D3832; }
.study-chip-meta { font-size: 12px; color: #7A7269; }
.study-week-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.study-week-label { font-size: 15px; font-weight: 700; color: #3D3832; }
.study-grid {
  display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr));
  background: #FDFCFB; border-radius: 16px; padding: 8px 8px 12px; box-shadow: 0 2px 10px rgba(61,56,50,0.08);
}
.study-day-head { height: 30px; font-size: 12px; font-weight: 700; color: #7A7269; text-align: center; line-height: 30px; }
.study-day.is-today .study-day-head { color: #FDFCFB; background: #5D7052; border-radius: 999px; margin: 0 6px; }
.study-hours { position: relative; }
.study-hour-label { position: absolute; right: 6px; font-size: 10px; color: #A39A90; transform: translateY(-6px); font-variant-numeric: tabular-nums; }
.study-day-body {
  position: relative; border-left: 1px solid #EFEAE3;
  background-image: repeating-linear-gradient(to bottom, #EFEAE3 0, #EFEAE3 1px, transparent 1px, transparent 44px);
}
.study-day.is-today .study-day-body { background-color: #F7FAF4; }
.study-block {
  position: absolute; left: 3px; right: 3px; z-index: 2; overflow: hidden;
  background: #DCE8D3; border-left: 4px solid #5D7052; border-radius: 8px; padding: 3px 6px;
  display: flex; flex-direction: column; cursor: grab; touch-action: none;
}
.study-block[data-priority="red"] { border-left-color: #D64545; background: #F6DEDA; }
.study-block[data-priority="orange"] { border-left-color: #E8893A; background: #F8E5D2; }
.study-block[data-priority="yellow"] { border-left-color: #E8C547; background: #F7EFCB; }
.study-block.is-past { opacity: 0.55; }
.study-block.is-dragging { opacity: 0.35; }
.study-block-name { font-size: 12px; font-weight: 700; color: #3D3832; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.study-block-time { font-size: 11px; color: #4A5C41; font-variant-numeric: tabular-nums; }
.study-block-tools { position: absolute; bottom: 2px; right: 2px; display: none; gap: 2px; }
.study-block:hover .study-block-tools, .study-block:focus-within .study-block-tools { display: flex; }
.study-block-tools button {
  width: 20px; height: 20px; border: none; border-radius: 6px; background: rgba(253,252,251,0.95);
  color: #3D3832; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; line-height: 20px;
}
.study-now-line { position: absolute; left: -2px; right: 0; height: 2px; background: #C0392B; z-index: 3; pointer-events: none; }
.study-now-line::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #C0392B; }
.study-drop-mark {
  position: absolute; left: 3px; right: 3px; z-index: 1; border: 2px dashed #5D7052; border-radius: 8px;
  background: rgba(93,112,82,0.12); font-size: 11px; font-weight: 700; color: #4A5C41; padding: 2px 6px; pointer-events: none;
}
.study-ghost {
  position: fixed; z-index: 2000; pointer-events: none; background: #5D7052; color: #FDFCFB;
  font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; box-shadow: 0 8px 20px rgba(61,56,50,0.25);
}

/* The "off" banner scrolls with the page, so it never covers the top bar */
.off-banner { position: static; }

/* ============================================
   LANDING HERO — design option 1 (design-reference/…_option1.png)
   One wide warm card: big headline, subtitle, the two starts side by side,
   a small facts row; the drawing on the right fades into the card.
   ============================================ */
.hero.hero-v2 {
  max-width: 1480px;
  margin: 0 16px 20px;
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(100deg, #F2EBDF 0%, #F1E8DA 45%, #EFE4D3 100%);
}
@media (min-width: 1512px) { .hero.hero-v2 { margin: 0 auto 20px; } }
/* soft green shapes: top-left and bottom-right */
.hero.hero-v2::before {
  content: ''; position: absolute; z-index: 1; pointer-events: none;
  left: -120px; top: -150px; width: 380px; height: 300px;
  background: #D7E2CC; border-radius: 0 0 60% 40% / 0 0 70% 50%;
  transform: rotate(-12deg); opacity: 0.85;
}
.hero.hero-v2::after {
  content: ''; position: absolute; z-index: 3; pointer-events: none;
  right: -60px; bottom: -40px; width: 200px; height: 240px;
  background: #D7E2CC; border-radius: 60% 0 0 0 / 70% 0 0 0; opacity: 0.75;
}
.hero.hero-v2 .hero-left {
  position: relative; z-index: 2;
  padding: 56px 24px 48px clamp(28px, 11%, 172px);
  display: flex; flex-direction: column; justify-content: center; gap: 0;
}
.hero.hero-v2 .hero-left h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(40px, 4.6vw, 70px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: #1E1E1C;
  margin: 0 0 24px;
}
.hero.hero-v2 .hero-left .subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(16px, 1.45vw, 22px);
  font-weight: 400;
  line-height: 1.45;
  color: #2B2A27;
  max-width: 34ch;
  margin: 0 0 32px;
}
/* the two starts — side by side under the text (not over the picture) */
.hero.hero-v2 .hero-cta {
  position: static; inset: auto;
  display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start;
  gap: 16px; margin: 0 0 26px;
}
.hero.hero-v2 .hero-btn {
  min-width: 0; height: 56px; padding: 0 34px;
  font-size: 18px; font-weight: 700; border-radius: 999px;
  box-shadow: none;
}
.hero.hero-v2 .hero-btn-start { background: #2F5E43; border: 2px solid #2F5E43; color: #FDFCFB; min-width: 232px; }
.hero.hero-v2 .hero-btn-start:hover { background: #254C36; border-color: #254C36; }
.hero.hero-v2 .hero-btn-study { background: #FBF8F2; border: 2px solid #2F5E43; color: #2F5E43; min-width: 198px; }
.hero.hero-v2 .hero-btn-study:hover { background: #F0F4EC; }
.hero.hero-v2 .hero-btn:focus-visible { outline: 3px solid #2F5E43; outline-offset: 3px; }
.hero-facts { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex-wrap: wrap; }
.hero-facts li {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Inter', sans-serif; font-size: 15px; color: #2B2A27;
}
.hero-facts li + li { margin-left: 22px; padding-left: 22px; border-left: 1.5px solid #CFC6B6; height: 30px; }
.hero-fact-icon { width: 22px; height: 22px; color: #2F5E43; flex-shrink: 0; }
/* the drawing: fills the right half, fades into the card on its left edge */
.hero.hero-v2 .hero-right { position: relative; z-index: 1; display: block; overflow: hidden; }
.hero.hero-v2 .hero-right img.hero-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
}
.hero.hero-v2 .hero-right::before {
  background: linear-gradient(to right, #F1E8DA 0%, rgba(241,232,218,0.55) 18%, rgba(241,232,218,0) 40%);
  z-index: 2;
}
.hero.hero-v2 .hero-right::after { display: none; }
@media (max-width: 900px) {
  .hero.hero-v2 { grid-template-columns: 1fr; min-height: 0; }
  .hero.hero-v2 .hero-left { padding: 36px 24px 28px; }
  .hero.hero-v2 .hero-right { height: 260px; }
  .hero.hero-v2 .hero-right::before { background: linear-gradient(to bottom, #F1E8DA 0%, rgba(241,232,218,0) 35%); }
  .hero.hero-v2::after { width: 120px; height: 140px; }
}
@media (max-width: 480px) {
  .hero.hero-v2 { margin: 0 12px 16px; }
  .hero.hero-v2 .hero-btn { width: 100%; min-width: 0; }
  .hero-facts li + li { margin-left: 0; padding-left: 0; border-left: none; margin-top: 8px; width: 100%; }
}

/* Top bar as a floating rounded card (same design) */
nav.app-nav {
  margin: 8px 16px 12px;
  top: 8px;
  padding: 12px 22px;
  border-radius: 22px;
  background: rgba(248, 245, 239, 0.96);
  border: 1px solid #ECE5D9;
  box-shadow: 0 2px 12px rgba(61, 56, 50, 0.06);
}
@media (min-width: 1512px) { nav.app-nav { margin: 8px auto 12px; max-width: 1480px; } }
.app-nav .nav-logo { gap: 12px; }
.app-nav .nav-logo-icon { width: 40px; height: 40px; padding: 7px; background: #2F5E43; }
.app-nav .nav-logo-text { font-size: 18px; font-weight: 700; line-height: 1.2; color: #1E1E1C; letter-spacing: -0.01em; }
.app-nav .nav-links { margin: 0 auto; gap: 4px; }
.app-nav .nav-links a { font-size: 15.5px; color: #333; font-weight: 500; }
.app-nav .nav-clock { font-size: 17px; padding: 8px 16px; border-color: #ECE5D9; box-shadow: 0 1px 4px rgba(61,56,50,0.06); }
/* option 1 fine-tuning (matched against the reference at 1536 px) */
.hero.hero-v2 { min-height: 418px; }
.hero.hero-v2 .hero-left { padding: 44px 24px 40px clamp(28px, 11vw, 172px); }
.hero.hero-v2 .hero-left .subtitle { max-width: 520px; }
.hero.hero-v2::after { right: -70px; bottom: -70px; width: 190px; height: 230px; opacity: 0.6; }
@media (max-width: 900px) { .hero.hero-v2 .hero-left { padding: 36px 24px 28px; } }
@media (min-width: 901px) {
  .hero.hero-v2 { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .hero.hero-v2 .hero-left h1 { white-space: nowrap; font-size: clamp(40px, 4.4vw, 68px); }
}

/* ============================================
   LANDING "What to expect" — same style as the hero (design option 1)
   ============================================ */
.expect-section.expect-v2 {
  max-width: 1480px;
  margin: 0 16px 32px;
  padding: 44px clamp(24px, 6vw, 96px) 40px;
  border-radius: 24px;
  background: linear-gradient(180deg, #F7F1E7 0%, #F4ECDF 100%);
  position: relative;
  overflow: hidden;
}
@media (min-width: 1512px) { .expect-section.expect-v2 { margin: 0 auto 32px; } }
.expect-section.expect-v2::before {
  content: ''; position: absolute; right: -90px; top: -110px; width: 260px; height: 220px;
  background: #D7E2CC; border-radius: 0 0 40% 60% / 0 0 50% 70%; opacity: 0.6; pointer-events: none;
}
.expect-section.expect-v2 h2 {
  position: relative;
  font-family: 'Inter', sans-serif; font-size: clamp(26px, 2.4vw, 36px); font-weight: 800;
  letter-spacing: -0.02em; color: #1E1E1C; text-align: center; margin: 0 0 28px;
}
.expect-section.expect-v2 .cards-row {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  max-width: 1120px; margin: 0 auto;
}
.expect-section.expect-v2 .expect-card {
  background: #FDFCFB; border-radius: 20px; padding: 14px 14px 20px;
  box-shadow: 0 1px 2px rgba(61,56,50,0.04), 0 10px 28px rgba(61,56,50,0.08);
}
.expect-section.expect-v2 .expect-card img { width: 100%; border-radius: 14px; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 14px; }
.expect-section.expect-v2 .card-num { font-family: 'Inter', sans-serif; font-size: 17px; font-weight: 700; color: #1E1E1C; margin: 0 4px 6px; }
.expect-section.expect-v2 .card-desc { font-family: 'Inter', sans-serif; font-size: 15px; line-height: 1.5; color: #4A4640; margin: 0 4px 12px; }
.expect-section.expect-v2 .card-check { font-family: 'Inter', sans-serif; font-size: 14px; color: #2F5E43; font-weight: 600; margin: 0 4px; }
@media (max-width: 900px) { .expect-section.expect-v2 .cards-row { grid-template-columns: 1fr; max-width: 520px; } }

.expect-section.expect-v2 .cta-wrap { position: relative; display: flex; flex-direction: column; align-items: center; margin-top: 34px; gap: 0; }
.expect-cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.expect-cta-row .hero-btn {
  height: 56px; padding: 0 34px; font-size: 18px; font-weight: 700; border-radius: 999px; box-shadow: none; min-width: 0;
}
.expect-cta-row .hero-btn-start { background: #2F5E43; border: 2px solid #2F5E43; color: #FDFCFB; min-width: 232px; }
.expect-cta-row .hero-btn-start:hover { background: #254C36; border-color: #254C36; }
.expect-cta-row .hero-btn-study { background: #FBF8F2; border: 2px solid #2F5E43; color: #2F5E43; min-width: 198px; }
.expect-cta-row .hero-btn-study:hover { background: #F0F4EC; }

/* "More ways to start": two quiet icon links under the main starts */
.more-ways { margin-top: 30px; width: 100%; max-width: 640px; }
.more-ways-label {
  display: flex; align-items: center; gap: 14px; margin: 0 0 16px;
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8A8176;
}
.more-ways-label::before, .more-ways-label::after { content: ''; flex: 1; height: 1px; background: #DDD3C3; }
.more-ways-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 40px; }
.way-link {
  display: inline-flex; align-items: center; gap: 14px; background: none; border: none; padding: 4px; cursor: pointer;
  font-family: 'Inter', sans-serif; color: #1E1E1C; border-radius: 16px;
}
.way-icon {
  width: 56px; height: 56px; border-radius: 16px; background: #FDFCFB; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 2px;
  box-shadow: 0 1px 2px rgba(61,56,50,0.06), 0 8px 20px rgba(61,56,50,0.14);
  border: 1px solid #EFE8DC; transition: transform 0.15s, box-shadow 0.15s;
}
.way-link:hover .way-icon { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(61,56,50,0.08), 0 12px 26px rgba(61,56,50,0.18); }
.way-emoji { font-size: 28px; line-height: 1; }
.way-plus { width: 13px; height: 13px; color: #2F5E43; }
.way-play { width: 26px; height: 19px; }
.way-text { font-size: 16px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; text-decoration-color: #9DB39A; }
.way-link:hover .way-text { text-decoration-color: #2F5E43; }
.way-external { width: 16px; height: 16px; color: #6F675D; margin-left: -6px; }
.way-link:focus-visible { outline: 3px solid #2F5E43; outline-offset: 3px; }

.expect-section.expect-v2 .privacy-note { margin-top: 28px; text-align: center; font-size: 13px; color: #6F675D; }
.soundscape-link { margin-top: 8px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; color: #2F5E43; text-decoration: none; }
.soundscape-link:hover { text-decoration: underline; }
@media (max-width: 480px) {
  .expect-section.expect-v2 { margin: 0 12px 24px; }
  .expect-cta-row .hero-btn { width: 100%; }
  .more-ways-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* Top bar: a very small line icon before each link label */
.app-nav .nav-links a { display: inline-flex; align-items: center; gap: 6px; }
.app-nav .nav-icon { width: 14px; height: 14px; flex-shrink: 0; color: #7A8C70; opacity: 0.9; }
.app-nav .nav-links a:hover .nav-icon, .app-nav .nav-links a.nav-link-current .nav-icon { color: #2F5E43; opacity: 1; }
.app-nav .nav-links { gap: 2px; }
.app-nav .nav-links a { padding: 8px 10px; font-size: 15px; }
@media (max-width: 1240px) {
  .app-nav .nav-links a { padding: 7px 7px; font-size: 14px; gap: 5px; }
  .app-nav .nav-logo-text { font-size: 16px; }
}
@media (max-width: 1320px) {
  nav.app-nav { padding: 12px 16px; gap: 12px; }
  .app-nav .nav-links a { padding: 7px 6px; font-size: 13.5px; gap: 5px; }
  .app-nav .nav-icon { width: 13px; height: 13px; }
}

/* ---- Landing page: bottom section ---- */
.site-footer {
  max-width: 1480px; margin: 0 16px 24px; padding: 24px clamp(20px, 4vw, 48px);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px;
  background: #F7F2EA; border: 1px solid #ECE5D9; border-radius: 22px;
  font-family: 'Inter', sans-serif;
}
@media (min-width: 1512px) { .site-footer { margin: 0 auto 24px; } }
.site-footer-brand { display: flex; align-items: center; gap: 12px; }
.site-footer-brand .nav-logo-icon { width: 36px; height: 36px; padding: 6px; background: #2F5E43; border-radius: 50%; }
.site-footer-name { font-size: 15px; font-weight: 700; color: #1E1E1C; margin: 0; }
.site-footer-tag { font-size: 13px; color: #6F675D; margin: 2px 0 0; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer-links a { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: #2F5E43; text-decoration: none; }
.site-footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer-copy { font-size: 13px; color: #8A8176; margin: 0; }
.ext-icon { width: 13px; height: 13px; flex-shrink: 0; }

/* ---- About us ---- */
.about-page { max-width: 980px; margin: 32px auto 64px; padding: 0 16px; }
.about-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center;
  background: linear-gradient(180deg, #F7F1E7 0%, #F4ECDF 100%);
  border-radius: 24px; padding: clamp(28px, 4vw, 48px);
  position: relative; overflow: hidden;
}
.about-card::before {
  content: ''; position: absolute; left: -110px; top: -120px; width: 300px; height: 240px;
  background: #D7E2CC; border-radius: 0 0 60% 40% / 0 0 70% 50%; opacity: 0.6; pointer-events: none;
}
/* the calm background behind the photo: sage + warm light, like the hero */
.about-photo-wrap {
  position: relative; width: 240px; height: 240px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background:
    radial-gradient(circle at 70% 24%, rgba(255, 244, 220, 0.95) 0 16%, rgba(255, 244, 220, 0) 34%),
    radial-gradient(ellipse at 18% 108%, #A9C29B 0 32%, rgba(169, 194, 155, 0) 58%),
    radial-gradient(ellipse at 96% 92%, #C5D6B8 0 26%, rgba(197, 214, 184, 0) 52%),
    linear-gradient(160deg, #EEF3E8 0%, #E3ECDB 55%, #D5E3CB 100%);
  box-shadow: 0 0 0 6px #FDFCFB, 0 12px 30px rgba(61, 56, 50, 0.16);
}
.about-photo { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.about-text { position: relative; font-family: 'Inter', sans-serif; }
.about-text .flow-screen-title { text-align: left; margin: 0 0 6px; }
.about-name { font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; letter-spacing: -0.02em; color: #1E1E1C; margin: 0 0 6px; }
.about-role { font-size: 15px; font-weight: 600; color: #2F5E43; margin: 0 0 16px; }
.about-desc { font-size: 16px; line-height: 1.6; color: #3D3832; margin: 0 0 12px; max-width: 56ch; }
.about-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.about-link {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px;
  background: #FBF8F2; border: 2px solid #2F5E43; border-radius: 999px;
  font-size: 15px; font-weight: 700; color: #2F5E43; text-decoration: none;
}
.about-link:hover { background: #F0F4EC; }
.about-link > svg:first-child { width: 18px; height: 18px; color: #2F5E43; }
@media (max-width: 760px) {
  .about-card { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 24px; }
  .about-text .flow-screen-title { text-align: center; }
  .about-desc { margin-left: auto; margin-right: auto; }
  .about-links { justify-content: center; }
  .about-photo-wrap { width: 200px; height: 200px; }
}

/* ============================================
   MAIN FLOW v4: calm, clear, one accent colour.
   Same feel as the landing page: warm paper, dark ink, one deep green.
   No second column, no italics, nothing bright. Time awareness is shown
   with one quiet device at a time (a ring, two times, one sentence).
   ============================================ */
:root { --ink: #1E1E1C; --green: #2F5E43; --muted: #5F584E; --line: #E6E0D5; --soft: #F6F3EE; }

/* ---- Step card (one centred card, "Step 2 of 6" + a thin bar) ---- */
.flow-progress-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.flow-progress-track { height: 4px; background: #ECE6DB; }
.flow-progress-fill { background: var(--green); }
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .flow-container {
  border-radius: 24px; padding: 34px 40px 30px;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 14px 40px rgba(61, 56, 50, 0.07);
}
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .flow-screen-title { color: var(--muted); font-size: 14px; letter-spacing: 0.02em; text-transform: none; }
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .flow-question { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.flow-helper { color: var(--muted); font-size: 15px; }
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .btn-row .btn-primary {
  background: var(--green); border-color: var(--green); border-radius: 999px; padding: 14px 30px; min-width: 150px;
}
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .btn-row .btn-primary:hover { background: #274E38; }
:is(#screen-goal-2, #screen-emotion, #screen-schedule) .pill.selected { background: var(--green); border-color: var(--green); }

/* Bigger text where people type */
#screen-goal-1 #goal-input { font-size: 20px; line-height: 1.45; padding: 16px 18px; }
#after-intent-input { font-size: 18px; padding: 14px 16px; }
.emotion-reason-field .emotion-prefix { font-size: 17px; }
.emotion-reason-field textarea { font-size: 16px; }

/* ---- Step 5: time ---- */
#duration-group.pill-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
#screen-schedule #duration-group .pill {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 72px; padding: 10px 6px; border-radius: 16px; border: 1.5px solid var(--line); background: #FDFCFB; color: var(--ink);
}
#screen-schedule #duration-group .pill .dur-num { font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
#screen-schedule #duration-group .pill .dur-unit { font-size: 13px; color: var(--muted); }
#screen-schedule #duration-group .pill:hover { border-color: #9DB5A6; background: #F7F9F6; }
#screen-schedule #duration-group .pill.selected,
#screen-schedule #duration-group .pill.pill-long.selected { background: var(--green); border-color: var(--green); color: #FDFCFB; }
#screen-schedule #duration-group .pill.selected .dur-unit { color: rgba(253, 252, 251, 0.88); }
#screen-schedule #duration-group .pill.pill-long:not(.selected) { background: #FDFCFB; border-color: var(--line); color: var(--ink); }
.pill-until, .finish-dur { display: none; }
.custom-duration { margin-top: 14px; }
.finish-btn { min-height: 52px; border-radius: 14px; }
.finish-time { font-size: 17px; }
.finish-btn.selected { background: var(--green); }

/* Time awareness: now, a line, when the session ends, and one sentence */
.plan-finish { margin-top: 24px; background: var(--soft); border-radius: 18px; padding: 18px 22px 16px; }
.plan-line { display: flex; align-items: center; gap: 16px; }
.plan-line-end { display: flex; flex-direction: column; gap: 2px; }
.plan-line-end.is-finish { align-items: flex-end; }
.plan-line-end strong { font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.plan-line-end.is-finish strong { color: var(--green); }
.plan-line-end span { font-size: 14px; color: var(--muted); }
.plan-line-track { flex: 1; height: 2px; border-radius: 999px; background: var(--green); position: relative; }
.plan-line-track::before, .plan-line-track::after { content: ''; position: absolute; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-sizing: border-box; }
.plan-line-track::before { left: -1px; background: var(--soft); border: 2px solid var(--green); }
.plan-line-track::after { right: -1px; }
#screen-schedule .plan-finish .confirm-pill { background: none; border: none; padding: 0; margin: 14px 0 0; font-size: 15px; line-height: 1.45; color: #3D3832; text-align: left; display: block; box-shadow: none; }
#screen-schedule .plan-finish .confirm-pill strong { color: var(--ink); }
.plan-timeline-more { margin-top: 14px; }
.plan-timeline-more summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--green); padding: 4px 0; }
.plan-timeline-more .calendar-day-widget { margin-top: 12px; }
.plan-eyebrow { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.day-glance { padding: 12px 0 4px; }
.day-glance-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.day-glance-note { font-size: 13px; color: var(--muted); }
.day-glance-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; margin: 6px 0 12px; background: #ECE6DB; }
.day-glance-part { height: 100%; transition: flex-grow 0.35s ease; }
.day-glance-part + .day-glance-part { margin-left: 2px; }
.day-glance .breakdown-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 14px; }
@media (max-width: 640px) { .day-glance .breakdown-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.day-glance .legend-item { font-size: 14px; color: #3D3832; display: flex; align-items: center; gap: 6px; margin: 0; }
.day-glance .legend-value { margin-left: auto; font-weight: 700; color: var(--ink); }

/* The session block on any timeline: the one deep-green block, white label */
.calendar-block-videos { border: none; }
.calendar-block-videos .calendar-block-label { color: #FDFCFB; }

/* ---- Video page ---- */
.watch-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 2px 10px; }
.watch-eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0; }
.watch-queue { font-size: 14px; color: var(--muted); margin: 0; font-variant-numeric: tabular-nums; }
#screen-video-playing .video-player-wrap { border-radius: 20px; box-shadow: 0 14px 36px rgba(30, 28, 24, 0.16); }

/* Before the first video: the intention on the picture (plain, upright) */
.start-intent-block { display: none; }
.video-start-hint.active.has-intent:not(.is-loading) { background: rgba(20, 22, 18, 0.5); }
.video-start-hint.active.has-intent:not(.is-loading) .start-intent-block {
  display: block; position: absolute; left: 8%; right: 8%; top: calc(50% - 130px); text-align: center; color: #FDFCFB;
}
.start-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin: 0 0 8px; opacity: 0.92; }
.start-eyebrow .leaf-icon { width: 15px; height: 15px; }
.start-intent { font-family: 'Inter', sans-serif; font-style: normal; font-weight: 600; font-size: clamp(22px, 2.6vw, 36px); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 8px; overflow-wrap: anywhere; }
.start-sub { font-size: 15px; margin: 0; opacity: 0.95; font-variant-numeric: tabular-nums; }
.video-start-hint.has-intent .video-start-hint-icon { top: calc(50% + 34px); width: 68px; height: 68px; }
.video-start-hint.has-intent .video-start-hint-text { top: calc(50% + 80px); background: none; font-size: 14px; }

/* Controls on the video, like YouTube: no block, just a soft shade behind
   a lifted time line and one row of buttons */
#screen-video-playing .player-bar { height: 52px; padding: 0 10px 4px; background: none; border-top: none; color: #FFFFFF; }
#screen-video-playing .player-bar::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 130px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.42) 55%, rgba(0, 0, 0, 0.78) 100%);
}
#screen-video-playing .player-bar.settings-open { opacity: 1; pointer-events: auto; }
#screen-video-playing .player-bar-btn { width: 40px; height: 40px; }
#screen-video-playing .player-bar-btn:hover { background: rgba(255, 255, 255, 0.16); }
#screen-video-playing .player-time { font-size: 14px; color: #FFFFFF; }
.video-player-wrap .video-progress-track {
  left: 14px; right: 14px; bottom: 50px; height: 16px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
#screen-video-playing:not(.video-is-playing) .video-player-wrap .video-progress-track,
#screen-video-playing.fs-controls-visible .video-player-wrap .video-progress-track,
.video-player-wrap.settings-open .video-progress-track,
.video-player-wrap .player-bar:has(:focus-visible) ~ .video-progress-track,
.video-player-wrap .player-bar:hover ~ .video-progress-track,
.video-player-wrap .video-progress-track:hover { opacity: 1; pointer-events: auto; }
.video-player-wrap.ad-present .video-progress-track { display: none; }
.video-player-wrap .video-progress-track::before { bottom: 6.5px; height: 3px; background: rgba(255, 255, 255, 0.32); border-radius: 999px; transition: height 0.12s ease, bottom 0.12s ease; }
.video-player-wrap .video-progress-fill { bottom: 6.5px; height: 3px; background: #FFFFFF; border-radius: 999px; transition: width 0.3s ease, height 0.12s ease, bottom 0.12s ease; }
.video-player-wrap .video-progress-handle { width: 13px; height: 13px; bottom: 1.5px; background: #FFFFFF; border: none; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.video-player-wrap .video-progress-track:hover::before,
.video-player-wrap .video-progress-track:hover .video-progress-fill { height: 5px; bottom: 5.5px; }
/* fullscreen: one row, same lifted line */
.screen.fullscreen-active .player-bar { height: 60px; min-height: 0; padding: 0 16px 8px; flex-wrap: nowrap; }
.screen.fullscreen-active .video-player-wrap .video-progress-track { left: 20px; right: 20px; bottom: 58px; }

/* The settings gear: Captions, Quality, Speed */
.player-settings { position: relative; display: flex; }
.player-bar-settings .ui-icon { transition: transform 0.2s ease; }
.player-bar-settings[aria-expanded="true"] { background: rgba(255, 255, 255, 0.18); }
.player-bar-settings[aria-expanded="true"] .ui-icon { transform: rotate(40deg); }
.player-settings-menu {
  position: absolute; right: 0; bottom: 50px; z-index: 6; min-width: 264px;
  display: flex; flex-direction: column; gap: 2px; padding: 8px;
  background: rgba(28, 27, 25, 0.95); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.player-settings-menu[hidden] { display: none; }
.ps-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 5px 6px 5px 12px; border-radius: 10px; }
.ps-label { font-size: 15px; font-weight: 500; color: #FFFFFF; }
.ps-row .select-pill .select-icon { display: none; }
.ps-row .select-pill select.pill-select {
  min-width: 138px; padding: 8px 30px 8px 12px; font-size: 14px; color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.1); border-color: transparent; border-radius: 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23FFFFFF' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.ps-row .select-pill select.pill-select:hover { background-color: rgba(255, 255, 255, 0.18); }
.ps-row .select-pill select.cc-select.active { background-color: var(--green); border-color: transparent; }
.ps-row .select-pill select option { color: #1E1E1C; background: #FDFCFB; }

/* Below the video: channel above the title, then the actions */
#screen-video-playing .video-info { display: flex; flex-direction: column; margin-top: 16px; }
#screen-video-playing .video-meta { order: -1; margin: 0 0 4px; font-size: 14px; }
#screen-video-playing #playing-video-channel { color: var(--muted); font-weight: 600; }
#screen-video-playing .video-title { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
#screen-video-playing .action-pill { border-color: var(--line); padding: 10px 18px; }
#screen-video-playing .action-pill:hover:not(:disabled) { background: #F7F9F6; border-color: #9DB5A6; }

/* ---- Session panel next to the video ---- */
#screen-video-playing .video-series-panel { flex-basis: 350px; border-radius: 24px; padding: 20px; box-shadow: 0 1px 2px rgba(61,56,50,0.04), 0 14px 36px rgba(61,56,50,0.08); }
.panel-eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
#screen-video-playing .panel-clock { display: block; background: var(--soft); border-radius: 18px; padding: 16px 18px; margin: 0 0 16px; }
#screen-video-playing .panel-clock[hidden] { display: none; }
.panel-clock-row { display: flex; align-items: center; gap: 16px; }
.panel-clock-pie { flex-shrink: 0; line-height: 0; }
.panel-clock-stat + .panel-clock-stat { border-left: 1px solid #DDD5C7; padding-left: 16px; }
#screen-video-playing .panel-clock-left, .panel-clock-finish { font-size: 24px; font-weight: 700; line-height: 1.15; color: var(--ink); margin: 0; font-variant-numeric: tabular-nums; }
.panel-stat-label { font-size: 14px; color: var(--muted); margin: 0; }
#screen-video-playing .panel-clock-intent { grid-column: auto; font-size: 14px; line-height: 1.45; color: #3D3832; margin: 12px 0 0; }
.adhd-face { fill: none; stroke: #E0D9CC; stroke-width: 3.5; }
.adhd-left { fill: none; stroke: var(--green); stroke-width: 3.5; stroke-linecap: round; transition: stroke-dasharray 0.6s ease; }
.adhd-clock.is-up .adhd-face { stroke: #B4533F; }
.adhd-label { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700; fill: var(--ink); }
/* the ring, the time left and the finish time already say it: no second bar */
#screen-video-playing .panel-session { display: none; }
.panel-intention { padding: 0 2px; margin: 0 0 16px; }
.panel-intention[hidden] { display: none; }
.panel-intention-title { font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--ink); margin: 0 0 2px; overflow-wrap: anywhere; }
.panel-intention-because, .panel-intention .panel-clock-after { font-size: 14px; line-height: 1.45; color: var(--muted); margin: 0; }
.panel-intention .panel-clock-after { margin-top: 2px; }
.panel-intention-because[hidden], .panel-intention .panel-clock-after[hidden] { display: none; }
#screen-video-playing .panel-chest-slot { margin-bottom: 12px; }
.panel-list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 4px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.panel-list-head .panel-title { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; text-transform: none; }
.panel-list-total { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
#screen-video-playing .checklist-item.is-current { background: var(--soft); box-shadow: 0 1px 2px rgba(61, 56, 50, 0.06), 0 6px 18px rgba(47, 94, 67, 0.12); }
#screen-video-playing .checklist-item.is-current .checklist-marker { background: var(--green); color: #FDFCFB; }
#screen-video-playing .checklist-item.is-current .checklist-meta { color: var(--muted); }
#screen-video-playing .video-series-panel .next-video-btn { background: var(--green); border-color: var(--green); border-radius: 999px; padding: 14px; }
#screen-video-playing .video-series-panel .next-video-btn:hover { background: #274E38; }
#screen-video-playing .video-series-panel .btn-exit { width: 100%; border-radius: 999px; padding: 12px; font-size: 15px; background: #FDFCFB; border: 1.5px solid var(--green); color: var(--green); }
#screen-video-playing .video-series-panel .btn-exit:hover { background: #F2F6F3; }
.exit-caption { text-align: center; font-size: 14px; color: var(--muted); margin: 8px 0 14px; }
#screen-video-playing .panel-timeline { border-top: 1px solid var(--line); padding-top: 12px; }
#screen-video-select .series-continue-btn { background: var(--green); border-color: var(--green); border-radius: 999px; }

/* "min saved" / "min active": quiet tiles, no gold */
.saved-chest-widget { background: var(--soft); border: 1px solid var(--line); color: var(--ink); box-shadow: none; }
.saved-chest-widget-icon { filter: none; display: flex; align-items: center; color: var(--green); }
.saved-chest-widget-icon .saved-icon { width: 22px; height: 22px; }

/* The floating session clock on other pages: same quiet language */
.dock-title { font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--muted); }
.dock-left { color: var(--muted); font-size: 14px; }
.dock-intent { font-size: 14px; }
.dock-stats { font-size: 13px; color: var(--muted); }

/* Exit buttons everywhere: a quiet outline instead of the yellow one */
.btn-exit { border: 1.5px solid #CFC8BB; }

/* v4 polish: readable small labels, sentence case, nothing gold */
#screen-video-playing .player-bar::before {
  height: 150px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 48%, rgba(10, 10, 9, 0.96) 62%, rgba(10, 10, 9, 0.98) 100%);
}
.video-start-hint.active.has-intent:not(.is-loading) { background: rgba(20, 22, 18, 0.7); }
.field-hint { font-size: 14px; }
.field-hint em { font-style: normal; }
.flow-container .privacy-line { font-size: 13px; color: #6F675D; }
.emotion-category { font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; color: #5F584E; }
.saved-chest-widget-label, .active-time-widget .saved-chest-widget-label { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: #5F584E; opacity: 1; }
.panel-chest-slot .session-stats { justify-content: stretch; }
.panel-chest-slot .session-stats .saved-chest-widget { flex: 1; width: auto; }
.panel-timeline-title { font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; color: #5F584E; }
.series-progress-text { font-size: 13px; color: #5F584E; }
#donut-chart { display: none; }


/* ============================================
   ONE BRAND v5: the whole session flow looks like the landing page —
   warm paper, soft sage shapes, heavy dark headings, deep-green pills.
   References: design-reference/landing.png, video-series3.png,
   session-end-rewarding-stats.png
   ============================================ */

/* ---- The landing page's paper + sage shapes behind every flow step ---- */
body:is([data-screen="screen-goal-1"], [data-screen="screen-goal-2"], [data-screen="screen-emotion"],
        [data-screen="screen-emotion-reason"], [data-screen="screen-schedule"], [data-screen="screen-video-select"],
        [data-screen="screen-video-manual"], [data-screen="screen-intention"], [data-screen="screen-next-activity"], [data-screen="screen-planned"], [data-screen="screen-schedule-next"],
        [data-screen="screen-end"]) {
  background: linear-gradient(180deg, #F7F1E7 0%, #F4ECDF 100%) fixed;
}
body:is([data-screen="screen-goal-1"], [data-screen="screen-goal-2"], [data-screen="screen-emotion"],
        [data-screen="screen-emotion-reason"], [data-screen="screen-schedule"], [data-screen="screen-video-select"],
        [data-screen="screen-video-manual"], [data-screen="screen-intention"], [data-screen="screen-next-activity"], [data-screen="screen-planned"], [data-screen="screen-schedule-next"],
        [data-screen="screen-end"])::before,
body:is([data-screen="screen-goal-1"], [data-screen="screen-goal-2"], [data-screen="screen-emotion"],
        [data-screen="screen-emotion-reason"], [data-screen="screen-schedule"], [data-screen="screen-video-select"],
        [data-screen="screen-video-manual"], [data-screen="screen-intention"], [data-screen="screen-next-activity"], [data-screen="screen-planned"], [data-screen="screen-schedule-next"],
        [data-screen="screen-end"])::after {
  content: ''; position: fixed; z-index: -1; pointer-events: none; background: #D7E2CC; opacity: 0.6;
}
body:is([data-screen="screen-goal-1"], [data-screen="screen-goal-2"], [data-screen="screen-emotion"],
        [data-screen="screen-emotion-reason"], [data-screen="screen-schedule"], [data-screen="screen-video-select"],
        [data-screen="screen-video-manual"], [data-screen="screen-intention"], [data-screen="screen-next-activity"], [data-screen="screen-planned"], [data-screen="screen-schedule-next"],
        [data-screen="screen-end"])::before {
  left: -150px; top: 120px; width: 400px; height: 360px; border-radius: 0 62% 62% 0 / 0 55% 70% 0;
}
body:is([data-screen="screen-goal-1"], [data-screen="screen-goal-2"], [data-screen="screen-emotion"],
        [data-screen="screen-emotion-reason"], [data-screen="screen-schedule"], [data-screen="screen-video-select"],
        [data-screen="screen-video-manual"], [data-screen="screen-intention"], [data-screen="screen-next-activity"], [data-screen="screen-planned"], [data-screen="screen-schedule-next"],
        [data-screen="screen-end"])::after {
  right: -110px; bottom: -120px; width: 400px; height: 340px; border-radius: 64% 36% 0 0 / 72% 50% 0 0;
}

/* ---- Step cards: the landing page's heading weight and button shape ---- */
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .flow-question {
  font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: #1E1E1C;
}
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .flow-container {
  background: #FDFCFB; box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 10px 28px rgba(61, 56, 50, 0.08);
}
:is(#screen-goal-1, #screen-goal-2, #screen-emotion, #screen-emotion-reason,
    #screen-schedule, #screen-intention, #screen-schedule-next) .btn-row .btn-primary { font-weight: 700; font-size: 16px; }

/* ============ Step 6: the video series (two columns) ============ */
#screen-video-select .series-screen-layout { max-width: 1180px; padding: 36px 32px 48px; }
#screen-video-select .series-edit-panel {
  max-width: none; background: none; box-shadow: none; border-radius: 0; padding: 0;
  display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); column-gap: 56px; align-items: start;
}
#screen-video-select .series-edit-panel > .flow-progress { grid-column: 1; grid-row: 1; margin: 0 0 18px; }
#screen-video-select .series-left { grid-column: 1; grid-row: 2; }
#screen-video-select .series-right { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }

.series-art { display: block; width: 200px; height: auto; margin: 0 0 14px -8px; }
#screen-video-select .series-edit-heading { text-align: left; margin-bottom: 20px; }
#screen-video-select .series-edit-subtitle {
  font-size: 14px; font-weight: 700; letter-spacing: 0.01em; text-transform: none; color: #2F5E43; margin: 0 0 8px;
}
#screen-video-select .series-edit-heading .flow-screen-title {
  font-size: clamp(30px, 2.800vw, 38px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; color: #1E1E1C;
  text-align: left; text-transform: none; margin: 0 0 12px;
}
#screen-video-select .series-edit-heading .flow-helper { font-size: 16px; line-height: 1.6; color: #4A4640; margin: 0; }
.helper-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; vertical-align: -6px;
  border-radius: 50%; background: #FDFCFB; color: #2F5E43; box-shadow: 0 1px 3px rgba(61, 56, 50, 0.12);
}
.helper-icon .ui-icon { width: 13px; height: 13px; }

#screen-video-select .series-order-tabs { background: #ECE6DA; padding: 4px; margin: 0 0 16px; }
#screen-video-select .series-order-btn { font-size: 15px; font-weight: 600; padding: 10px 20px; color: #3D3832; border-radius: 999px; }
#screen-video-select .series-order-btn.active { background: #2F5E43; color: #FDFCFB; }
#screen-video-select .exclude-shorts-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #FDFCFB; border-radius: 16px; padding: 12px 16px; margin: 0;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 6px 18px rgba(61, 56, 50, 0.06);
}
#screen-video-select .exclude-shorts-label { font-size: 15px; font-weight: 600; color: #1E1E1C; }
#screen-video-select .toggle-switch.active { background: #2F5E43; }

/* the session clock, inside the left column on this step */
.series-dock-slot:empty { display: none; }
.series-dock-slot { margin-top: 16px; }
.session-dock.is-inline {
  position: static; width: auto; z-index: auto; border: none; border-radius: 16px; padding: 14px 16px;
  background: #FDFCFB; box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 6px 18px rgba(61, 56, 50, 0.06);
}
.session-dock.is-inline .dock-head, .session-dock.is-inline .dock-stats,
.session-dock.is-inline .dock-calendar-track, .session-dock.is-inline .dock-back-btn,
.session-dock.is-inline .dock-after { display: none; }
.session-dock.is-inline .dock-intent { margin: 10px 0 0; color: #4A4640; }

/* the videos: big, clean cards */
#screen-video-select .series-edit-card { background: none; box-shadow: none; padding: 0; }
#screen-video-select .series-progress { margin: 0 0 12px; }
#screen-video-select .series-edit-list { display: flex; flex-direction: column; gap: 14px; }
#screen-video-select .series-edit-item {
  background: #FDFCFB; border-radius: 20px; padding: 12px 16px 12px 8px; margin: 0;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 8px 24px rgba(61, 56, 50, 0.07);
}
#screen-video-select .series-edit-item.is-watched { background: #F1F6EC; box-shadow: inset 4px 0 0 #2F5E43, 0 8px 24px rgba(61, 56, 50, 0.07); }
#screen-video-select .series-edit-row { display: flex; align-items: center; gap: 14px; }
#screen-video-select .drag-handle { color: #A39B8F; flex-shrink: 0; }
#screen-video-select .drag-handle:hover { color: #2F5E43; background: #EEF3EA; }
#screen-video-select .series-edit-thumb-wrap { width: 176px; border-radius: 14px; background: #E6E0D5; }
#screen-video-select .series-edit-number {
  top: 8px; left: 8px; width: 24px; height: 24px; font-size: 13px; background: #2F5E43; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.series-edit-duration {
  position: absolute; right: 8px; bottom: 8px; padding: 3px 7px; border-radius: 7px;
  background: rgba(20, 20, 18, 0.82); color: #FDFCFB; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2;
}
#screen-video-select .series-edit-info { flex: 1; min-width: 0; }
#screen-video-select .series-edit-title {
  font-size: 18px; font-weight: 700; line-height: 1.3; color: #1E1E1C; margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
#screen-video-select .series-edit-meta { font-size: 14px; color: #5F584E; margin: 0; }
#screen-video-select .series-edit-regen-btn,
#screen-video-select .series-edit-delete-btn,
#screen-video-select .replace-btn {
  position: static; flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: #FDFCFB; border: 1.5px solid #E6E0D5; color: #2F5E43; box-shadow: none; cursor: pointer; font-size: 15px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
#screen-video-select .replace-btn { display: none; }
#screen-video-select .manual-mode .replace-btn { display: flex; }
#screen-video-select .series-edit-regen-btn .ui-icon,
#screen-video-select .series-edit-delete-btn .ui-icon { width: 18px; height: 18px; }
#screen-video-select .series-edit-regen-btn:hover { background: #EEF3EA; border-color: #2F5E43; transform: none; }
#screen-video-select .series-edit-delete-btn { color: #5F584E; }
#screen-video-select .series-edit-delete-btn:hover { background: #F7EDEA; border-color: #B4573F; color: #B4573F; }
#screen-video-select .series-edit-delete-btn:disabled { opacity: 0.35; cursor: default; background: #FDFCFB; border-color: #E6E0D5; color: #5F584E; }
#screen-video-select .series-edit-total {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #DCE6D2; color: #1E1E1C; border-radius: 999px; padding: 13px 18px; margin-top: 16px; font-size: 15px; font-weight: 600;
}
#screen-video-select .series-edit-total .ui-icon { width: 17px; height: 17px; color: #2F5E43; }
#screen-video-select .series-edit-add-btn { border-radius: 999px; font-size: 15px; }
#screen-video-select .series-primary-row {
  display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 0; border-top: none;
}
#screen-video-select .series-back-btn { font-size: 16px; color: #4A4640; }
#screen-video-select .series-back-btn:hover { background: rgba(47, 94, 67, 0.08); color: #1E1E1C; }
#screen-video-select .series-continue-btn {
  height: 56px; padding: 0 34px; border-radius: 999px; background: #2F5E43; border: 2px solid #2F5E43;
  color: #FDFCFB; font-size: 17px; font-weight: 700; min-width: 0; width: auto;
}
#screen-video-select .series-continue-btn:hover { background: #254C36; border-color: #254C36; }
#screen-video-select .series-manual-btn {
  display: inline-flex; align-items: center; gap: 8px; width: auto; margin: 18px 0 0 auto; float: right;
  background: none; border: none; padding: 8px 4px; font-size: 15px; font-weight: 600; color: #2F5E43;
}
#screen-video-select .series-manual-btn:hover { background: none; text-decoration: underline; }
#screen-video-select .series-manual-btn .ui-icon { width: 16px; height: 16px; }
#screen-video-select .video-loading { color: #4A4640; font-size: 16px; }

@media (max-width: 900px) {
  #screen-video-select .series-screen-layout { padding: 20px 16px 40px; }
  #screen-video-select .series-edit-panel { display: block; }
  #screen-video-select .series-left { margin-bottom: 24px; }
  .series-art { width: 150px; }
}
@media (max-width: 560px) {
  #screen-video-select .series-edit-row { flex-wrap: wrap; }
  #screen-video-select .series-edit-thumb-wrap { width: 128px; }
  #screen-video-select .series-edit-info { flex-basis: 40%; }
  #screen-video-select .series-edit-title { font-size: 16px; }
}

/* ============ Session end: "Session complete!" + real stats ============ */
.end-layout {
  max-width: 1120px; margin: 0 auto; padding: 36px 32px 56px;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; text-align: left;
}
.end-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.end-check {
  flex-shrink: 0; width: 72px; height: 72px; border-radius: 50%; background: #2F5E43; color: #FDFCFB;
  display: flex; align-items: center; justify-content: center;
}
.end-check svg { width: 34px; height: 34px; }
.end-title { font-size: clamp(30px, 2.800vw, 38px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; color: #1E1E1C; margin: 0 0 6px; }
.end-sub { font-size: 18px; line-height: 1.45; color: #3D3832; margin: 0; }
.end-plan-bar { height: 8px; border-radius: 999px; background: #E6DFD2; overflow: hidden; margin: 0 0 24px; }
.end-plan-bar[hidden] { display: none; }
.end-plan-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: #2F5E43; transition: width 0.6s ease; }

.end-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.end-tile {
  background: #FDFCFB; border-radius: 20px; padding: 20px 14px 18px; text-align: center;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 8px 24px rgba(61, 56, 50, 0.07);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.end-tile-icon { width: 30px; height: 30px; color: #2F5E43; margin-bottom: 8px; }
.end-tile strong { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: #1E1E1C; line-height: 1.2; overflow-wrap: anywhere; }
.end-tile span { font-size: 14px; color: #5F584E; }

#screen-end .end-card {
  background: #FDFCFB; border-radius: 20px; padding: 20px 22px; margin: 0 0 16px;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 8px 24px rgba(61, 56, 50, 0.07);
}
.end-week-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.end-week-title, #screen-end .panel-title { font-size: 17px; font-weight: 700; color: #1E1E1C; margin: 0; text-align: left; text-transform: none; letter-spacing: 0; }
#screen-end .panel-title { margin-bottom: 12px; }
.end-week-total { font-size: 14px; color: #5F584E; }
.end-week-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; align-items: end; }
.week-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.week-value { font-size: 13px; font-weight: 600; color: #5F584E; min-height: 26px; display: flex; align-items: center; white-space: nowrap; }
.week-col.is-empty .week-value { visibility: hidden; }
.week-col.is-today .week-value { background: #2F5E43; color: #FDFCFB; border-radius: 999px; padding: 0 10px; visibility: visible; }
.week-bar-wrap { width: 100%; max-width: 44px; height: 96px; display: flex; align-items: flex-end; }
.week-bar { width: 100%; border-radius: 8px 8px 4px 4px; background: #CFDCC5; transition: height 0.5s ease; }
.week-col.is-today .week-bar { background: #2F5E43; }
.week-label { font-size: 13px; color: #5F584E; }
.week-col.is-today .week-label { color: #1E1E1C; font-weight: 700; }
.end-week-note { font-size: 13px; color: #6F675D; margin: 14px 0 0; }

#screen-end .end-cards-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; }
#screen-end .end-cards-row .end-card { flex: 1 1 260px; }
#screen-end .next-action-text { text-align: left; }

.end-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-top: 12px; }
#screen-end .end-home-btn {
  height: 56px; padding: 0 30px; border-radius: 999px; background: #FBF8F2; border: 2px solid #2F5E43;
  color: #2F5E43; font-size: 17px; font-weight: 700; width: auto;
}
#screen-end .end-home-btn:hover { background: #F0F4EC; }
#screen-end .btn-end {
  width: auto; max-width: 100%; min-height: 56px; padding: 8px 34px; border-radius: 999px; background: #2F5E43; border: 2px solid #2F5E43;
  color: #FDFCFB; font-size: 17px; font-weight: 700; opacity: 1;
}
#screen-end .btn-end:hover { background: #254C36; border-color: #254C36; opacity: 1; }

.end-side {
  background: #DCE6D2; border-radius: 28px; padding: 30px 24px 0; text-align: center; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
}
.end-star { width: 34px; height: 34px; color: #C89B3C; margin-bottom: 10px; }
.end-side-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: #1E1E1C; margin: 0 0 8px; }
.end-side-text { font-size: 16px; line-height: 1.5; color: #3D3832; margin: 0 0 20px; max-width: 220px; }
.end-next { width: 100%; background: rgba(253, 252, 251, 0.75); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; }
.end-next-label { display: block; font-size: 13px; font-weight: 600; color: #2F5E43; margin-bottom: 2px; }
.end-next-text { font-size: 17px; font-weight: 700; line-height: 1.35; color: #1E1E1C; margin: 0; overflow-wrap: anywhere; }
#screen-end .achievement-badge { background: #FDFCFB; color: #1E1E1C; font-size: 14px; margin: 0 0 14px; padding: 7px 16px 7px 7px; }
#screen-end .achievement-icon { background: #2F5E43; color: #FDFCFB; }
#screen-end .achievement-icon svg { width: 14px; height: 14px; }
#screen-end .saved-minutes-card { background: none; box-shadow: none; padding: 0; margin: 0; }
#screen-end .saved-minutes-row { gap: 10px; min-height: 36px; }
#screen-end .saved-minutes-coins { min-width: 0; min-height: 0; gap: 5px; }
#screen-end .flying-coin { width: 9px; height: 9px; border-radius: 50%; background: #2F5E43; font-size: 0; }
#screen-end .saved-minutes-chest { width: 34px; height: 34px; border-radius: 50%; background: #FDFCFB; color: #2F5E43; display: flex; align-items: center; justify-content: center; font-size: 0; }
#screen-end .saved-minutes-chest svg { width: 18px; height: 18px; }
#screen-end .saved-minutes-label { font-size: 16px; font-weight: 700; color: #2F5E43; margin: 8px 0 0; }
.end-plant { display: block; width: 210px; height: auto; margin-top: 12px; }

@media (max-width: 900px) {
  .end-layout { grid-template-columns: 1fr; padding: 20px 16px 40px; }
  .end-side { order: -1; }
  .end-plant { width: 150px; }
}
@media (max-width: 560px) {
  .end-tiles { grid-template-columns: 1fr; }
  .end-hero { gap: 14px; }
  .end-check { width: 56px; height: 56px; }
  .end-week-chart { gap: 6px; }
  .end-actions > * { width: 100% !important; }
}

/* v5 polish */
.plan-mode-btn.active { background: #2F5E43; }
.week-col .week-value { visibility: hidden; }
.week-col.is-today .week-value { visibility: visible; }
.end-actions { margin: 8px 0 28px; }
#screen-video-select .replace-btn .ui-icon { width: 18px; height: 18px; }
/* the video page shares the paper (no shapes: nothing competes with the video) */
body[data-screen="screen-video-playing"] { background: linear-gradient(180deg, #F7F1E7 0%, #F4ECDF 100%) fixed; }


/* ============================================
   PODCAST MODE + "Pick videos from this course" (v6)
   Same brand as the landing page: paper, sage shapes, heavy dark
   headings, deep-green pills.
   ============================================ */
body:is([data-screen="screen-podcasts"], [data-screen="screen-course-pick"]) {
  background: linear-gradient(180deg, #F7F1E7 0%, #F4ECDF 100%) fixed;
}
body:is([data-screen="screen-podcasts"], [data-screen="screen-course-pick"])::after {
  content: ''; position: fixed; z-index: -1; pointer-events: none; background: #D7E2CC; opacity: 0.6;
  right: -110px; bottom: -120px; width: 400px; height: 340px; border-radius: 64% 36% 0 0 / 72% 50% 0 0;
}

.podcast-layout, .pick-layout { max-width: 1080px; padding-bottom: 140px; }
.podcast-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: center;
  background: #FDFCFB; border-radius: 24px; padding: 32px 36px; margin-bottom: 28px;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 10px 28px rgba(61, 56, 50, 0.08);
}
.podcast-eyebrow { font-size: 14px; font-weight: 700; color: #2F5E43; margin: 0 0 8px; }
.podcast-title { font-size: clamp(28px, 2.800vw, 38px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; color: #1E1E1C; margin: 0 0 12px; text-align: left; }
.podcast-sub { font-size: 17px; line-height: 1.55; color: #3D3832; margin: 0 0 10px; max-width: 620px; }
.podcast-note { font-size: 14px; color: #5F584E; margin: 0 0 18px; }
.podcast-auto-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 420px;
  background: #F6F3EE; border-radius: 16px; padding: 12px 16px; margin-bottom: 14px;
}
.podcast-auto-label { font-size: 15px; font-weight: 600; color: #1E1E1C; }
#screen-podcasts .toggle-switch.active { background: #2F5E43; }
.podcast-music-link { font-size: 15px; font-weight: 600; color: #2F5E43; }
.podcast-art { width: 100%; height: auto; display: block; }

.podcast-empty { background: #FDFCFB; border-radius: 20px; padding: 22px 24px; margin-bottom: 20px; color: #3D3832; font-size: 15px; line-height: 1.5; }
.podcast-empty[hidden] { display: none; }
.podcast-empty-title { font-size: 18px; font-weight: 700; color: #1E1E1C; margin: 0 0 4px; }
.podcast-empty p { margin: 0; }

.podcast-section { margin-bottom: 28px; }
.podcast-section-title { display: flex; align-items: baseline; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: #1E1E1C; margin: 0 0 12px; }
.podcast-section-count { font-size: 14px; font-weight: 500; color: #5F584E; letter-spacing: 0; }
.podcast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.podcast-card {
  position: relative; background: #FDFCFB; border-radius: 20px; border: 2px solid transparent;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 8px 24px rgba(61, 56, 50, 0.07);
}
.podcast-card.is-picked { border-color: #2F5E43; background: #F4F8F0; }
.podcast-pick {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 52px 12px 12px; text-align: left;
  background: none; border: none; border-radius: 18px; cursor: pointer; font-family: inherit; color: inherit;
}
.podcast-pick:focus-visible, .pick-row:focus-visible { outline: 3px solid rgba(47, 94, 67, 0.45); outline-offset: 2px; }
.podcast-thumb-wrap { position: relative; flex-shrink: 0; width: 128px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #E6E0D5; display: block; }
.podcast-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.podcast-tick {
  position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(253, 252, 251, 0.92); border: 2px solid #CFC8BB; color: transparent;
  display: flex; align-items: center; justify-content: center;
}
.podcast-tick svg { width: 14px; height: 14px; }
.podcast-card.is-picked .podcast-tick { background: #2F5E43; border-color: #2F5E43; color: #FDFCFB; }
.podcast-card-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.podcast-card-title {
  font-size: 16px; font-weight: 700; line-height: 1.3; color: #1E1E1C;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.podcast-card-meta { font-size: 14px; color: #5F584E; }
.podcast-remove {
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: none; border: none; color: #8A8176; cursor: pointer;
}
.podcast-remove .ui-icon { width: 17px; height: 17px; }
.podcast-remove:hover { background: #F7EDEA; color: #B4573F; }

.podcast-add { background: #FDFCFB; border-radius: 20px; padding: 16px 22px; box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 8px 24px rgba(61, 56, 50, 0.07); }
.podcast-add summary { cursor: pointer; font-size: 16px; font-weight: 700; color: #2F5E43; }
.podcast-add-form { max-width: 520px; padding-top: 14px; }
.podcast-add-form .course-dialog-label, #podcast-dialog .course-dialog-label { font-size: 14px; color: #5F584E; margin-top: 12px; }
.podcast-select {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid #E6E0D5; background: #F6F3EE;
  font-family: inherit; font-size: 16px; color: #1E1E1C;
}
#podcast-category-new, #podcast-dialog-category-new { margin-top: 10px; }
.podcast-add-btn { margin-top: 16px; height: 48px; padding: 0 28px; border-radius: 999px; background: #2F5E43; border-color: #2F5E43; font-weight: 700; width: auto; }
.podcast-add-form .privacy-line { font-size: 13px; margin-top: 12px; }
#podcast-dialog .btn-primary { background: #2F5E43; border-color: #2F5E43; border-radius: 999px; }

/* what's picked + the start button: always in reach at the bottom */
.podcast-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: min(720px, calc(100vw - 32px)); padding: 12px 12px 12px 24px; border-radius: 999px;
  background: #FDFCFB; border: 1px solid #E6E0D5; box-shadow: 0 12px 36px rgba(61, 56, 50, 0.2);
}
.podcast-bar[hidden] { display: none; }
.screen:not(.active) .podcast-bar { display: none; }
.podcast-bar-text { font-size: 16px; font-weight: 700; color: #1E1E1C; }
.podcast-bar .btn-primary {
  height: 52px; padding: 0 30px; border-radius: 999px; background: #2F5E43; border: 2px solid #2F5E43;
  color: #FDFCFB; font-size: 16px; font-weight: 700; width: auto; flex-shrink: 0;
}
.podcast-bar .btn-primary:hover { background: #254C36; border-color: #254C36; }
.podcast-bar .btn-primary:disabled { opacity: 0.45; cursor: default; }
/* the floating session clock would sit on top of these bars */
body:is([data-screen="screen-podcasts"], [data-screen="screen-course-pick"]) .session-dock { bottom: 104px; }

/* ---- Pick videos from the course ---- */
.series-pick-btn {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 18px; border-radius: 999px;
  background: #FBF8F2; border: 2px solid #2F5E43; color: #2F5E43; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.series-pick-btn[hidden] { display: none; }
.series-pick-btn:hover { background: #F0F4EC; }
.series-pick-btn .ui-icon { width: 17px; height: 17px; }
.pick-list { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.pick-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 16px 10px 14px; text-align: left;
  background: #FDFCFB; border: 2px solid transparent; border-radius: 18px; cursor: pointer; font-family: inherit; color: inherit;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 6px 18px rgba(61, 56, 50, 0.06);
}
.pick-row.is-picked { border-color: #2F5E43; background: #F4F8F0; }
.pick-box {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #CFC8BB; background: #FDFCFB; color: transparent;
  display: flex; align-items: center; justify-content: center;
}
.pick-box svg { width: 15px; height: 15px; }
.pick-row.is-picked .pick-box { background: #2F5E43; border-color: #2F5E43; color: #FDFCFB; }
.pick-thumb-wrap { width: 112px; }
.pick-bar { border-radius: 24px; padding: 12px 14px 12px 22px; width: min(820px, calc(100vw - 32px)); }
.pick-counter { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-delta { font-size: 14px; font-weight: 600; color: #2F5E43; }
.pick-delta.is-over { color: #8A5A1F; }
.pick-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pick-cancel-btn { background: none; border: none; font-size: 16px; font-weight: 600; color: #4A4640; padding: 12px 14px; width: auto; }
.pick-cancel-btn:hover { background: rgba(47, 94, 67, 0.08); }

@media (max-width: 760px) {
  .podcast-hero { grid-template-columns: 1fr; padding: 24px 20px; }
  .podcast-art { display: none; }
  .podcast-bar, .pick-bar { border-radius: 20px; flex-wrap: wrap; padding: 12px 14px; }
  .pick-thumb-wrap, .podcast-thumb-wrap { width: 96px; }
}
.text-input[hidden] { display: none; }
/* v6 polish: the pick screen has its own time counter; the floating clock would cover the list */
body[data-screen="screen-course-pick"] .session-dock { display: none; }
.podcast-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.podcast-card .podcast-thumb-wrap { width: 116px; }


/* ============================================
   TIME STATS (v7) — same paper and type as the rest
   ============================================ */
body[data-screen="screen-time-stats"] { background: linear-gradient(180deg, #F7F1E7 0%, #F4ECDF 100%) fixed; }
.time-stats-link {
  display: flex; align-items: center; gap: 14px; width: 100%; max-width: 520px; margin: 0 auto 28px; padding: 14px 18px; text-align: left;
  background: #FDFCFB; border: 2px solid #2F5E43; border-radius: 18px; color: #2F5E43; cursor: pointer; font-family: inherit;
}
.time-stats-link:hover { background: #F0F4EC; }
.time-stats-link svg { width: 26px; height: 26px; flex-shrink: 0; }
.time-stats-link > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.time-stats-link strong { font-size: 17px; font-weight: 700; color: #1E1E1C; }
.time-stats-link span span { font-size: 14px; color: #5F584E; }
.time-stats-link-arrow { font-size: 20px; font-weight: 700; }

.ts-layout { max-width: 980px; }
.ts-tabs { display: inline-flex; background: #ECE6DA; border-radius: 999px; padding: 4px; margin: 8px 0 18px; }
.ts-tab { border: none; background: none; border-radius: 999px; padding: 10px 20px; font-family: inherit; font-size: 15px; font-weight: 600; color: #3D3832; cursor: pointer; }
.ts-tab.active { background: #2F5E43; color: #FDFCFB; }
.ts-card { background: #FDFCFB; border-radius: 22px; padding: 24px 26px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 10px 28px rgba(61, 56, 50, 0.08); }
.ts-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.ts-total-number { font-size: clamp(34px, 4vw, 48px); font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: #1E1E1C; font-variant-numeric: tabular-nums; }
.ts-total-label { font-size: 17px; color: #5F584E; }
.ts-stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #E6DFD2; margin-bottom: 18px; gap: 2px; }
.ts-stack-part { display: block; height: 100%; min-width: 4px; }
.ts-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ts-tile { background: #F6F3EE; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.ts-tile-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: #1E1E1C; }
.ts-dot { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.ts-tile-value { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; color: #1E1E1C; font-variant-numeric: tabular-nums; }
.ts-tile-share { font-size: 14px; color: #5F584E; }

.ts-cal-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.ts-heading { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: #1E1E1C; margin: 0; }
.ts-cal-nav { display: flex; align-items: center; gap: 10px; }
.ts-cal-range { font-size: 15px; font-weight: 600; color: #1E1E1C; min-width: 170px; text-align: center; }
.ts-nav-btn { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid #E6E0D5; background: #FDFCFB; color: #2F5E43; font-size: 17px; font-weight: 700; cursor: pointer; font-family: inherit; }
.ts-nav-btn:hover:not(:disabled) { background: #EEF3EA; border-color: #2F5E43; }
.ts-nav-btn:disabled { opacity: 0.35; cursor: default; }
.ts-cal-row { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); gap: 6px; }
.ts-cal-head { margin-bottom: 8px; }
.ts-cal-day { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; color: #5F584E; padding: 6px 0; border-radius: 12px; }
.ts-cal-day strong { font-size: 16px; color: #1E1E1C; }
.ts-cal-day.is-today { background: #2F5E43; color: #FDFCFB; }
.ts-cal-day.is-today strong { color: #FDFCFB; }
.ts-cal-body { position: relative; }
.ts-cal-hours { position: relative; }
.ts-cal-hours span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 13px; color: #6F675D; font-variant-numeric: tabular-nums; }
.ts-cal-hours span:first-child { transform: none; }
.ts-cal-col {
  position: relative; border-radius: 10px; background-color: #F6F3EE;
  background-image: linear-gradient(180deg, rgba(61, 56, 50, 0.09) 1px, transparent 1px);
}
.ts-cal-col.is-today { background-color: #EEF3EA; }
.ts-block { position: absolute; left: 4px; right: 4px; border-radius: 5px; }
.ts-cal-empty { font-size: 15px; color: #5F584E; margin: 14px 0 0; }
.ts-cal-empty[hidden] { display: none; }
.ts-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; }
.ts-legend-item { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #3D3832; }
@media (max-width: 640px) {
  .ts-tiles { grid-template-columns: 1fr; }
  .ts-card { padding: 18px 14px; }
  .ts-cal-row { grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: 3px; }
  .ts-block { left: 2px; right: 2px; }
}

/* v8: reorder the series on the watching page too */
.video-checklist .checklist-item { transition: transform 0.12s ease; }
.video-checklist .checklist-item.is-dragging { transition: none; position: relative; z-index: 2; box-shadow: 0 8px 22px rgba(61, 56, 50, 0.18); }
.video-checklist .drag-handle { flex-shrink: 0; width: 26px; height: 32px; margin: 0 -2px 0 -6px; color: #A39B8F; touch-action: none; }
.video-checklist .drag-handle:hover { color: #2F5E43; background: #EEF3EA; }

.action-pill[hidden] { display: none; }
.action-pill:disabled { opacity: 0.6; cursor: default; }


/* ============================================
   v10
   ============================================ */
[hidden][data-ext-only] { display: none !important; }

/* ---- The sage shapes belong to the page: they scroll with it ---- */
html { overflow-x: clip; }
body { overflow-x: clip; position: relative; min-height: 100vh; }
body[data-screen]::before, body[data-screen]::after { position: absolute; }

/* ---- Series preview: smaller cards, more of the series at a glance ---- */
#screen-video-select .series-edit-list { gap: 8px; }
#screen-video-select .series-edit-item { padding: 8px 12px 8px 6px; border-radius: 16px; }
#screen-video-select .series-edit-row { gap: 12px; }
#screen-video-select .series-edit-thumb-wrap { width: 112px; border-radius: 10px; }
#screen-video-select .series-edit-title { font-size: 15px; margin-bottom: 3px; }
#screen-video-select .series-edit-meta { font-size: 13px; }
#screen-video-select .series-edit-number { top: 5px; left: 5px; width: 20px; height: 20px; }
#screen-video-select .series-edit-duration { right: 5px; bottom: 5px; padding: 2px 6px; }

/* ---- "What will you do after?" ---- */
.next-activity-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 10px; border-radius: 18px; border: 1.5px solid #E6DCCB; background: #FDFCFB; color: #1E1E1C;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 6px 18px rgba(61, 56, 50, 0.06);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.next-activity-tile:hover { border-color: #2F5E43; background: #F1F6EC; transform: translateY(-2px); }
.next-activity-tile:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.next-activity-tile.selected { border-color: #2F5E43; background: #E4EEDB; }
.next-activity-emoji { font-size: 40px; line-height: 1; }
.next-activity-label { text-align: center; line-height: 1.2; }
.next-activity-specify-row { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.next-activity-specify-row .text-input { flex: 1; margin: 0; }
.next-activity-specify-row .btn-primary { white-space: nowrap; width: auto; }
.end-next[hidden] { display: none; }

/* ---- Calendar next to the video: times you can actually read ---- */
.session-calendar-track .calendar-hour-label { width: 46px; font-size: 13px; font-weight: 600; color: #3D3832; font-variant-numeric: tabular-nums; white-space: nowrap; }
.session-calendar-track .calendar-hour-line { border-top-color: #DDD5C8; }
.session-calendar-track .calendar-block { left: 54px; }
.session-calendar-track .calendar-block-label { font-size: 13px; font-weight: 700; }

/* ---- Addiction reduction: Sound only + Greyscale ---- */
.watch-modes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin: 0 2px 10px; }
.watch-modes-title { font-size: 13px; font-weight: 600; color: #5F584E; margin-right: auto; }
.watch-mode { display: inline-flex; align-items: center; gap: 8px; }
.watch-mode-label { font-size: 14px; font-weight: 600; color: #1E1E1C; }
.watch-modes .toggle-switch.active { background: #2F5E43; }
.sound-only-cover {
  position: absolute; inset: 0; z-index: 1; display: none; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px;
  padding: 22px 26px; overflow: hidden;
  background: linear-gradient(160deg, #2F5E43 0%, #24493A 100%); color: #F4ECDF; text-align: left; pointer-events: none;
}
body.mode-sound-only .sound-only-cover { display: flex; }
body.mode-sound-only .video-player-wrap.ad-present .sound-only-cover { display: none; } /* an ad needs its Skip button */
/* the words sit in the top-left corner and the picture in the bottom-right,
   so neither is under the play button in the middle */
.sound-only-art { position: absolute; right: 3%; bottom: 12%; width: min(30%, 300px); height: auto; opacity: 0.9; }
.sound-only-title { margin: 0; font-size: 20px; font-weight: 700; color: #FDFCFB; }
.sound-only-sub { margin: 0; font-size: 14px; color: #D7E2CC; }
body.mode-greyscale .video-player-wrap iframe { filter: grayscale(1); }

/* ---- Dark mode switch in the top bar ---- */
.nav-theme-btn {
  flex-shrink: 0; width: 40px; height: 40px; margin-right: 8px; border-radius: 50%; border: 1px solid #ECE5D9; background: #FDFCFB; color: #3D3832;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.nav-theme-btn:hover { border-color: #2F5E43; color: #2F5E43; }
.nav-theme-btn:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.theme-icon { width: 20px; height: 20px; }
.theme-icon-sun { display: none; }
html.dark .theme-icon-sun { display: block; }
html.dark .theme-icon-moon { display: none; }


/* ============================================
   v11: "More" menu, grouped next-activity tiles, clearer end screen,
   Intentional calendar, favourites
   ============================================ */

/* ---- Top bar: three links + "More" ---- */
.nav-menu-btn {
  flex-shrink: 0; height: 40px; padding: 0 14px 0 12px; margin-right: 8px; border-radius: 999px; border: 1px solid #ECE5D9; background: #FDFCFB; color: #1E1E1C;
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.nav-menu-btn .ui-icon { width: 20px; height: 20px; }
.nav-menu-btn:hover, .nav-menu-btn[aria-expanded="true"] { border-color: #2F5E43; color: #2F5E43; }
.nav-menu-btn:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.nav-menu-scrim { position: fixed; inset: 0; z-index: 940; background: rgba(30, 30, 28, 0.28); }
.nav-menu-scrim[hidden], .nav-menu[hidden] { display: none; }
/* computer: drops down from the top, under the bar */
.nav-menu {
  position: fixed; z-index: 950; top: 84px; left: 50%; transform: translateX(-50%); width: min(1160px, calc(100vw - 32px));
  max-height: calc(100vh - 100px); overflow-y: auto;
  background: #FDFCFB; border: 1px solid #ECE5D9; border-radius: 22px; padding: 22px 28px 26px;
  box-shadow: 0 18px 48px rgba(30, 28, 24, 0.18); animation: nav-menu-down 0.18s ease-out;
}
@keyframes nav-menu-down { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes nav-menu-side { from { transform: translateX(100%); } to { transform: translateX(0); } }
.nav-menu-head { display: none; }
.nav-menu-groups { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 28px; }
.nav-menu-heading { font-size: 13px; font-weight: 700; color: #5F584E; margin: 0 0 8px; padding: 0 10px; letter-spacing: 0.01em; }
.nav-menu ul { list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  display: block; padding: 9px 10px; border-radius: 10px; font-size: 15.5px; font-weight: 600; color: #1E1E1C; text-decoration: none; line-height: 1.3;
}
.nav-menu a:hover { background: #EEF3EA; color: #2F5E43; }
.nav-menu a:focus-visible { outline: 3px solid #2F5E43; outline-offset: 1px; }
.nav-menu a.nav-link-current { color: #2F5E43; background: #E4EEDB; }
.nav-menu-note { display: block; font-size: 13px; font-weight: 500; color: #5F584E; margin-top: 2px; }
@media (max-width: 1000px) and (min-width: 761px) { .nav-menu-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* phone: slides in from the side */
@media (max-width: 760px) {
  .nav-menu {
    top: 0; right: 0; bottom: 0; left: auto; transform: none; width: min(86vw, 340px); max-height: none; border-radius: 22px 0 0 22px; padding: 16px 16px 28px;
    animation: nav-menu-side 0.2s ease-out;
  }
  .nav-menu-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; padding: 0 10px; }
  .nav-menu-title { font-size: 18px; font-weight: 700; color: #1E1E1C; }
  .nav-menu-close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #ECE5D9; background: #FDFCFB; color: #1E1E1C; font-size: 24px; line-height: 1; cursor: pointer; }
  .nav-menu-groups { grid-template-columns: 1fr; gap: 18px; }
  .nav-menu-btn-text { display: none; }
  .nav-menu-btn { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) { .nav-menu { animation: none; } }

/* ---- "One quick tap": groups ---- */
.next-activity-container { max-width: 880px; }
.next-activity-groups { display: flex; flex-wrap: wrap; gap: 20px 32px; margin: 22px 0 22px; }
.next-activity-row { display: flex; gap: 10px; }
.next-activity-heading { display: block; font-size: 14px; font-weight: 700; color: #5F584E; margin: 0 0 8px; }
.next-activity-tile { width: 104px; aspect-ratio: 1 / 1; }
.next-activity-specify { margin: 0 0 22px; }
@media (max-width: 560px) { .next-activity-row { flex-wrap: wrap; } .next-activity-tile { width: 96px; } }

/* ---- End screen: done → next activity (big, in the middle) → numbers ---- */
.end-top { grid-column: 1 / -1; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.end-top-done { display: inline-flex; align-items: center; gap: 14px; }
.end-top-done .end-check { width: 44px; height: 44px; flex-shrink: 0; }
.end-top-done .end-check svg { width: 24px; height: 24px; }
.end-top .end-title { font-size: 30px; margin: 0; }
.end-up-next {
  width: min(100%, 620px); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 28px 30px;
  background: #FDFCFB; border: 2px solid #2F5E43; border-radius: 28px; box-shadow: 0 10px 30px rgba(61, 56, 50, 0.08);
}
.end-up-next-label { font-size: 15px; font-weight: 700; color: #2F5E43; }
.end-up-next-emoji { font-size: 64px; line-height: 1.1; }
.end-up-next-name { font-size: 42px; line-height: 1.15; font-weight: 800; color: #1E1E1C; letter-spacing: -0.01em; overflow-wrap: anywhere; }
#screen-end .next-action-card { display: none; }
#screen-end #calendar-card:not(:has(.calendar-events-list > *)):not(:has(.mini-calendar > *)) { display: none; }
#screen-end .end-cards-row:not(:has(#calendar-card .calendar-events-list > *)):not(:has(#calendar-card .mini-calendar > *)) { display: none; }
#screen-end .end-tile span { font-size: 14px; }

/* ---- Intentional calendar ---- */
.planned-container { max-width: 720px; }
.planned-list { margin: 18px 0 6px; display: flex; flex-direction: column; gap: 8px; }
.planned-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #FDFCFB; border: 1px solid #ECE5D9; border-radius: 16px; }
.planned-item-when { flex-shrink: 0; font-size: 14px; font-weight: 700; color: #2F5E43; font-variant-numeric: tabular-nums; }
.planned-item-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; color: #1E1E1C; overflow-wrap: anywhere; }
.planned-item-length { flex-shrink: 0; font-size: 14px; color: #5F584E; }
.planned-item .btn-primary { width: auto; }
.planned-empty { font-size: 15px; color: #5F584E; margin: 6px 0; }
.planned-when { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.planned-when .text-input { width: 100%; margin: 0; }
@media (max-width: 560px) { .planned-when { grid-template-columns: 1fr; } .planned-item { flex-wrap: wrap; } }

/* ---- Favourites on the Soundscape page ---- */
.focus-fav-form { margin: 4px 0 18px; max-width: 640px; }
.focus-fav-form[hidden], .focus-tools[hidden] { display: none; }
.focus-fav-row { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.focus-fav-row .text-input { flex: 1; margin: 0; }
.focus-fav-row .btn-primary { width: auto; white-space: nowrap; }
.focus-fav-remove { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 14px; }

/* ---- One brand on EVERY page: the landing page's warm paper and the two
   soft sage shapes (they scroll with the page). Home draws its own. ---- */
body[data-screen] { background: linear-gradient(180deg, #F7F1E7 0%, #F4ECDF 100%); }
body[data-screen]:not([data-screen="screen-home"]):not([data-screen="screen-video-playing"])::before,
body[data-screen]:not([data-screen="screen-home"]):not([data-screen="screen-video-playing"])::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none; background: #D7E2CC; opacity: 0.6;
}
body[data-screen]:not([data-screen="screen-home"]):not([data-screen="screen-video-playing"])::before {
  left: -150px; top: 120px; width: 400px; height: 360px; border-radius: 0 62% 62% 0 / 0 55% 70% 0;
}
body[data-screen]:not([data-screen="screen-home"]):not([data-screen="screen-video-playing"])::after {
  right: -110px; bottom: -120px; width: 400px; height: 340px; border-radius: 64% 36% 0 0 / 72% 50% 0 0;
}
.nav-menu-btn.nav-link-current { border-color: #2F5E43; color: #2F5E43; background: #EEF3EA; }

/* the "How long" dropdown looks like the other fields */
select.text-input {
  width: 100%; height: 52px; background: #FDFCFB; border: none; border-radius: 14px; padding: 0 16px;
  font-family: 'Inter', sans-serif; font-size: 15px; color: #3D3832; outline: none;
  box-shadow: 0 1px 4px rgba(61,56,50,0.07); margin-bottom: 22px; display: block; cursor: pointer;
}


/* =====================================================================
   v12: corner clock, profile button, menu icons, scheduled card on the
   first step, shorter search field, Profile + Subscriptions pages
   ===================================================================== */

/* The clock: bottom right on every page. While a session is on, the
   session dock sits in the same corner and shows the time instead. */
.corner-clock {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  font-size: 17px; font-weight: 700; color: #1E1E1C; font-variant-numeric: tabular-nums;
  background: #FDFCFB; border: 1px solid #ECE5D9; border-radius: 999px; padding: 8px 16px;
  box-shadow: 0 4px 14px rgba(61, 56, 50, 0.10); pointer-events: none;
}
.corner-clock[hidden] { display: none; }

/* Profile: the last thing in the top bar */
.nav-profile-btn {
  position: relative; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #ECE5D9; background: #FDFCFB; color: #3D3832;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.nav-profile-btn svg { width: 20px; height: 20px; }
.nav-profile-btn:hover, .nav-profile-btn.nav-link-current { border-color: #2F5E43; color: #2F5E43; }
.nav-profile-btn:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.nav-profile-btn.is-connected::after {
  content: ''; position: absolute; right: 1px; top: 1px; width: 10px; height: 10px; border-radius: 50%; background: #2F5E43; border: 2px solid #FDFCFB;
}

/* More menu: a small icon before every link */
.nav-menu a { display: flex; align-items: flex-start; gap: 10px; }
.nav-menu-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; color: #2F5E43; }
.nav-menu-label { min-width: 0; }

/* First step: shorter search field, slightly larger text */
#screen-goal-1 #goal-input { min-height: 0; height: 60px; font-size: 21px; line-height: 1.3; padding: 16px 20px; resize: none; overflow: hidden; }

/* First step: what is already scheduled */
.goal-upcoming { margin: 0 0 18px; text-align: left; }
.goal-upcoming[hidden] { display: none; }
.goal-upcoming-heading { font-size: 13px; font-weight: 700; color: #5F584E; margin: 0 0 8px; }
.goal-upcoming-item {
  display: flex; align-items: center; gap: 14px; background: #FDFCFB; border: 1.5px solid #D7E2CC; border-radius: 16px; padding: 12px 14px 12px 18px; margin-bottom: 8px;
}
.goal-upcoming-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.goal-upcoming-text strong { font-size: 17px; font-weight: 700; color: #1E1E1C; overflow-wrap: anywhere; }
.goal-upcoming-when { font-size: 14px; color: #5F584E; }
.goal-upcoming-item .btn-primary { width: auto; flex-shrink: 0; margin: 0; }
.goal-upcoming-or { font-size: 14px; font-weight: 600; color: #5F584E; margin: 16px 0 0; text-align: center; }

/* Study calendar: send to Google Calendar */
.study-gcal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 18px; }
.study-gcal .btn-secondary { width: auto; margin: 0; }
.study-gcal-note { font-size: 13px; color: #5F584E; margin: 0; }

/* Profile page */
#screen-profile .flow-container { max-width: 640px; margin: 48px auto 64px; padding: 32px 40px 28px; background: #FDFCFB; border-radius: 20px; box-shadow: 0 10px 30px rgba(61, 56, 50, 0.07); text-align: left; }
#screen-profile .flow-screen-title, #screen-profile .flow-question { text-align: left; }
.profile-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid #ECE5D9; }
.profile-row-text { flex: 1; min-width: 0; font-size: 15px; color: #1E1E1C; }
.profile-row-text .field-hint { display: block; margin: 2px 0 0; }
.profile-status { display: inline-block; font-size: 13px; font-weight: 600; color: #5F584E; margin-top: 4px; }
.profile-status.is-on { color: #2F5E43; }
.profile-row .btn-primary { width: auto; flex-shrink: 0; margin: 0; }
.profile-note { font-size: 14px; color: #5F584E; background: #F4ECDF; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; }
.profile-note[hidden] { display: none; }
.profile-later { margin: 0 0 20px; padding: 0; list-style: none; }
.profile-later li { font-size: 15px; color: #1E1E1C; padding: 10px 0; border-top: 1px solid #ECE5D9; }
.profile-later .field-hint { display: block; margin: 2px 0 0; }
.profile-soon { display: inline-block; font-size: 13px; font-weight: 600; color: #5F584E; background: #F0EFEC; border: 1.5px dashed #D8D1C5; border-radius: 999px; padding: 1px 10px; margin-left: 6px; }

/* Subscriptions page */
.subs-connect { max-width: 560px; background: #FDFCFB; border-radius: 18px; padding: 22px 24px; box-shadow: 0 6px 20px rgba(61, 56, 50, 0.06); }
.subs-connect[hidden], .subs-connected[hidden] { display: none; }
.subs-connect p { font-size: 15px; color: #1E1E1C; margin: 0 0 14px; }
.subs-connect .btn-primary { width: auto; margin: 0 0 12px; }
.subs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 0 0 18px; }
.subs-card {
  display: flex; align-items: center; gap: 10px; text-align: left; background: #FDFCFB; border: 1px solid #ECE5D9; border-radius: 14px; padding: 10px 12px;
  font: inherit; font-size: 15px; font-weight: 600; color: #1E1E1C; cursor: pointer;
}
.subs-card:hover { border-color: #2F5E43; color: #2F5E43; }
.subs-card:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.subs-card img { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.subs-card span { min-width: 0; overflow-wrap: anywhere; }
.subs-status { font-size: 15px; color: #5F584E; }

@media (max-width: 760px) {
  #screen-profile .flow-container { margin: 16px; padding: 22px 20px 20px; }
  .profile-row { flex-wrap: wrap; }
  .corner-clock { font-size: 15px; padding: 6px 12px; right: 10px; bottom: 10px; }
}


/* =====================================================================
   v13: break between sessions, week calendar blocks (start, resize,
   colours, menu), the week picture on the time step
   ===================================================================== */

/* Break page */
.wait-count { font-size: 34px; font-weight: 800; color: #2F5E43; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.wait-links { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; margin-top: 18px; }
.settings-select { width: auto; min-width: 110px; margin: 0; flex-shrink: 0; height: 44px; }

/* Landing page: the longer second button keeps to one line where there is room */
.hero-btn-study { white-space: normal; }

/* Time step: the week at a glance (a button) */
.week-plan { display: flex; align-items: center; gap: 16px; text-align: left; margin: 6px 0 22px; padding: 12px; background: #FBF8F2; border: 1px solid #ECE5D9; border-radius: 16px; }
.week-preview {
  position: relative; flex-shrink: 0; width: 176px; height: 96px; padding: 8px 8px 6px; background: #FDFCFB; border: 1.5px solid #D7E2CC; border-radius: 12px; cursor: pointer;
}
.week-preview:hover { border-color: #2F5E43; box-shadow: 0 4px 14px rgba(47, 94, 67, 0.16); }
.week-preview:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.week-preview-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; height: 100%; }
.week-preview-day { display: flex; flex-direction: column; min-width: 0; }
.week-preview-letter { font-size: 10px; font-weight: 700; color: #5F584E; text-align: center; line-height: 12px; }
.week-preview-day.is-today .week-preview-letter { color: #2F5E43; }
.week-preview-lane { position: relative; flex: 1; background: #F4ECDF; border-radius: 4px; overflow: hidden; }
.week-preview-day.is-today .week-preview-lane { background: #E4EEDB; }
.week-preview-block { position: absolute; left: 1px; right: 1px; background: #5D7052; border-radius: 2px; }
.week-preview-block.is-done { opacity: 0.45; }
.week-preview-plus {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -42%); width: 34px; height: 34px; border-radius: 50%; background: #2F5E43; color: #FDFCFB;
  font-size: 24px; font-weight: 700; line-height: 32px; text-align: center; box-shadow: 0 2px 8px rgba(30, 30, 28, 0.25);
}
.week-plan-text { margin: 0; font-size: 15px; color: #1E1E1C; }
.week-plan-text .field-hint { display: block; margin: 2px 0 0; }

/* Calendar page */
.study-back-flow { width: auto; margin: 0 0 14px; }
.study-back-flow[hidden] { display: none; }
.study-ok-note { font-size: 14px; color: #2F5E43; background: #EEF3EA; border-radius: 12px; padding: 8px 14px; margin: 0 0 16px; display: inline-block; }
.study-day-body { cursor: copy; }
.study-block { cursor: grab; }
.study-block:focus-visible { outline: 3px solid #2F5E43; outline-offset: 1px; }
.study-block.is-short { flex-direction: row; align-items: center; gap: 6px; }
.study-block.is-done { opacity: 0.6; }
.study-block.is-done .study-block-name { text-decoration: line-through; }
.study-block.is-resizing { opacity: 0.85; z-index: 4; }
.study-block[data-color="blue"] { border-left-color: #3F6E9A; background: #D9E6F2; }
.study-block[data-color="purple"] { border-left-color: #7A5AA6; background: #E6DDF2; }
.study-block[data-color="orange"] { border-left-color: #E8893A; background: #F8E5D2; }
.study-block[data-color="pink"] { border-left-color: #B8527A; background: #F6DCE6; }
.study-block[data-color="green"] { border-left-color: #5D7052; background: #DCE8D3; }
.week-preview-block[data-color="blue"] { background: #3F6E9A; }
.week-preview-block[data-color="purple"] { background: #7A5AA6; }
.week-preview-block[data-color="orange"] { background: #E8893A; }
.week-preview-block[data-color="pink"] { background: #B8527A; }
.study-block-start {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; white-space: nowrap;
  border: none; border-radius: 999px; background: #2F5E43; color: #FDFCFB; font: inherit; font-size: 13px; font-weight: 700; padding: 3px 12px; line-height: 16px; cursor: pointer;
}
.study-block:hover .study-block-start, .study-block:focus .study-block-start, .study-block:focus-within .study-block-start { display: block; }
.study-block.is-dragging .study-block-start, .study-block.is-resizing .study-block-start { display: none; }
.study-block-start:focus-visible { outline: 3px solid #FDFCFB; outline-offset: 1px; }
.study-resize { position: absolute; left: 0; right: 0; height: 7px; cursor: ns-resize; z-index: 1; }
.study-resize-top { top: 0; }
.study-resize-bottom { bottom: 0; }
.study-block:hover .study-resize-bottom::after, .study-block:hover .study-resize-top::after {
  content: ''; position: absolute; left: 50%; width: 22px; height: 3px; margin-left: -11px; border-radius: 2px; background: rgba(30, 30, 28, 0.35);
}
.study-resize-top::after { top: 1px; }
.study-resize-bottom::after { bottom: 1px; }
.study-block.is-short .study-block-tools { display: none; }

/* Right-click menu of a block */
.study-menu {
  position: fixed; z-index: 200; min-width: 200px; background: #FDFCFB; border: 1px solid #ECE5D9; border-radius: 14px; padding: 6px;
  box-shadow: 0 14px 36px rgba(30, 28, 24, 0.22); display: flex; flex-direction: column; gap: 2px;
}
.study-menu-item { text-align: left; border: none; background: none; border-radius: 9px; padding: 9px 12px; font: inherit; font-size: 15px; font-weight: 600; color: #1E1E1C; cursor: pointer; }
.study-menu-item:hover { background: #EEF3EA; color: #2F5E43; }
.study-menu-item:focus-visible { outline: 3px solid #2F5E43; outline-offset: -1px; }
.study-menu-item.is-danger { color: #A33A2A; }
.study-menu-item.is-danger:hover { background: #F8E7E3; color: #A33A2A; }
.study-menu-colours { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 14px; font-weight: 600; color: #5F584E; }
.study-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #FDFCFB; box-shadow: 0 0 0 1px #D8D1C5; cursor: pointer; padding: 0; background: #5D7052; }
.study-swatch[data-color="blue"] { background: #3F6E9A; }
.study-swatch[data-color="purple"] { background: #7A5AA6; }
.study-swatch[data-color="orange"] { background: #E8893A; }
.study-swatch[data-color="pink"] { background: #B8527A; }
.study-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #1E1E1C; }
.study-swatch:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.study-menu-question { font-size: 15px; font-weight: 600; color: #1E1E1C; margin: 0; padding: 8px 12px 4px; max-width: 220px; }

@media (max-width: 560px) {
  .week-plan { flex-direction: column; align-items: stretch; }
  .week-preview { width: 100%; }
}
select.settings-select { width: auto; min-width: 110px; margin: 0; flex-shrink: 0; height: 44px; }
.settings-row label { flex: 1; }
.study-block-time { white-space: nowrap; }
.study-block.is-short .study-block-name { flex: 1; min-width: 0; }
#screen-wait .wait-count, #screen-wait .flow-helper { text-align: center; }
#screen-wait .btn-row { justify-content: center; }

/* Series preview: order tabs + "Exclude Shorts" sit above the video list (right column) */
.series-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
#screen-video-select .series-filters .series-order-tabs, .series-filters .exclude-shorts-row { margin: 0; }

/* v14: schedule the series for later; new course from the calendar */
.series-later-btn { width: 100%; margin: 10px 0 0; }
.study-new-course { width: 100%; margin: 12px 0 8px; }
.study-side-hint { margin: 0; }
.panel-save-series { width: 100%; margin: 0 0 10px; }

/* v16 */
.series-search-problem { font-size: 15px; color: #1E1E1C; background: #F8EFE0; border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.profile-result { font-size: 15px; font-weight: 600; color: #2F5E43; background: #EEF3EA; border-radius: 12px; padding: 10px 14px; margin: 10px 0; overflow-wrap: anywhere; }
.profile-result.is-error { color: #1E1E1C; background: #F8EFE0; font-weight: 500; }
.picker-title { font-size: 14px; color: #1E1E1C; min-height: 2.7em; }

/* v18: More menu — category names read as headings, apart from the links */
.nav-menu-heading { font-size: 17px; font-weight: 800; color: #1E1E1C; letter-spacing: -0.01em; line-height: 1.25; margin: 0 0 12px; padding: 0 10px 8px; border-bottom: 2px solid #D7E2CC; }
/* v18: landing page — "Scheduled session" sits beside "Start video session" */
.hero-btn-study { white-space: nowrap; }
.hero.hero-v2 .hero-btn-study, .expect-cta-row .hero-btn-study { min-width: 0; }
@media (min-width: 561px) { .hero.hero-v2 .hero-cta, .expect-cta-row { flex-wrap: nowrap; } }

/* v19: landing buttons never squeeze their text — side by side when there is
   room, otherwise the second one moves to its own line */
.hero.hero-v2 .hero-cta, .expect-cta-row { flex-wrap: wrap; }
.hero.hero-v2 .hero-btn, .expect-cta-row .hero-btn { flex: 0 0 auto; width: auto; min-width: 0; white-space: nowrap; padding-left: 28px; padding-right: 28px; }
@media (max-width: 420px) { .hero.hero-v2 .hero-btn, .expect-cta-row .hero-btn { flex: 1 1 100%; } }

/* v19: floating clock + countdown */
.corner-clock { display: inline-flex; align-items: baseline; gap: 6px; padding: 9px 16px; font-size: 15px; font-weight: 600; color: #5F584E; border-radius: 16px; }
.corner-clock .cc-now { font-variant-numeric: tabular-nums; }
.corner-clock[data-state="idle"] .cc-now { font-size: 17px; font-weight: 700; color: #1E1E1C; }
.corner-clock .cc-left { font-size: 24px; font-weight: 800; color: #2F5E43; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1; }
.corner-clock .cc-label { font-size: 13px; font-weight: 600; color: #5F584E; }
.corner-clock .cc-sep { align-self: stretch; width: 1px; background: #DCD4C6; margin: 0 4px; }
.corner-clock[data-state="soon"] { border-color: #E8B872; background: #FDF6EA; }
.corner-clock[data-state="soon"] .cc-left { color: #9A5B10; }
.corner-clock[data-state="over"] { border-color: #E0B4A6; background: #FBEFEA; }
.corner-clock[data-state="over"] .cc-left { color: #9C3F2B; }
#active-time-value, #dock-active { font-variant-numeric: tabular-nums; }
#active-time-value.is-soon, #dock-active.is-soon { color: #9A5B10; }
#active-time-value.is-over, #dock-active.is-over { color: #9C3F2B; }
.corner-clock .cc-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; font-weight: 700; color: #6B6459; }

/* v20: Settings — sub-rows under "All addiction reduction" */
.settings-row-sub { margin-left: 18px; }
/* v20: the video's gear menu is a solid, readable panel in light and dark mode */
.player-settings-menu { background: #1B1A18 !important; border: 1px solid #45423D; padding: 10px; gap: 6px; min-width: 280px; }
.player-settings-menu .ps-label { color: #FFFFFF !important; font-size: 15px; font-weight: 600; }
.player-settings-menu .ps-row .select-pill { background: none !important; border: none !important; }
.player-settings-menu .ps-row .select-pill select.pill-select { color: #FFFFFF !important; background-color: #3A3833 !important; border: 1px solid #5A5750 !important; font-size: 15px; font-weight: 600; }
.player-settings-menu .ps-row .select-pill select.pill-select:hover { background-color: #4A4741 !important; }
.player-settings-menu .ps-row .select-pill select.cc-select.active { background-color: #2F5E43 !important; border-color: #2F5E43 !important; }
.player-settings-menu .ps-row .select-pill select option { color: #1E1E1C !important; background: #FDFCFB !important; }

/* v21: gear menu dropdowns — one small arrow, never a tiled pattern; a plain lighter grey on hover */
.player-settings-menu .ps-row .select-pill select.pill-select,
.player-settings-menu .ps-row .select-pill select.pill-select:hover,
.player-settings-menu .ps-row .select-pill select.pill-select:focus {
  background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 10px 6px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23FFFFFF' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  text-overflow: ellipsis; max-width: 190px;
}

/* v22: floating session timer — the landing page's paper card + deep green */
.float-timer {
  position: fixed; right: 16px; bottom: 68px; z-index: 61; width: 340px; max-width: calc(100vw - 32px);
  background: #FDFCFB; border: 1px solid #ECE5D9; border-radius: 20px;
  box-shadow: 0 10px 28px rgba(61, 56, 50, 0.14); color: #1E1E1C; overflow: hidden;
}
.float-timer[hidden] { display: none; }
.ft-main { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 12px; }
.ft-ring { position: relative; flex-shrink: 0; width: 48px; height: 48px; padding: 0; border: none; border-radius: 50%; background: #EEF3EA; color: #2F5E43; cursor: pointer; display: grid; place-items: center; }
.ft-ring:hover { background: #E4EEDB; }
.ft-ring:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.ft-ring-svg { position: absolute; inset: 0; width: 48px; height: 48px; transform: rotate(-90deg); }
.ft-ring-track { fill: none; stroke: #DCE8D3; stroke-width: 4; }
.ft-ring-fill { fill: none; stroke: #2F5E43; stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray 0.9s linear; }
.ft-icon { position: relative; width: 18px; height: 18px; fill: currentColor; }
.ft-icon-play { display: none; }
.float-timer[data-state="paused"] .ft-icon-pause { display: none; }
.float-timer[data-state="paused"] .ft-icon-play { display: block; }
.ft-text { flex: 1; min-width: 0; }
.ft-title { margin: 0; font-size: 14px; font-weight: 700; color: #1E1E1C; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-time { margin: 2px 0 0; display: flex; align-items: baseline; gap: 6px; }
.ft-left { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; color: #2F5E43; font-variant-numeric: tabular-nums; }
.ft-unit { font-size: 13px; font-weight: 600; color: #5F584E; }
.ft-icon-btn { flex-shrink: 0; width: 36px; height: 36px; border: none; border-radius: 10px; background: none; color: #3D3832; cursor: pointer; display: grid; place-items: center; padding: 0; }
.ft-icon-btn .ui-icon { width: 20px; height: 20px; }
.ft-icon-btn:hover { background: #F4ECDF; color: #2F5E43; }
.ft-icon-btn:focus-visible { outline: 3px solid #2F5E43; outline-offset: 1px; }
.ft-chevron .ui-icon { transition: transform 0.2s ease; }
.ft-chevron[aria-expanded="true"] .ui-icon { transform: rotate(180deg); }
.ft-details { border-top: 1px solid #ECE5D9; padding: 10px 14px 12px; }
.ft-detail-line { margin: 0; font-size: 13px; color: #5F584E; }
.ft-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ft-actions[hidden] { display: none; }
.ft-ended { flex: 1; font-size: 14px; font-weight: 700; color: #9C3F2B; }
.ft-btn { border: 1.5px solid #2F5E43; background: #FBF8F2; color: #2F5E43; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ft-btn:hover { background: #F0F4EC; }
.ft-btn-primary { background: #2F5E43; color: #FDFCFB; }
.ft-btn-primary:hover { background: #254C36; }
.ft-btn:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
/* the last two minutes: amber, calm; after the end: soft red; paused: muted */
.float-timer[data-state="soon"] .ft-ring-fill { stroke: #D08A2E; }
.float-timer[data-state="soon"] .ft-left { color: #9A5B10; }
.float-timer[data-state="over"] { border-color: #E0B4A6; }
.float-timer[data-state="over"] .ft-ring { background: #FBEFEA; color: #9C3F2B; }
.float-timer[data-state="over"] .ft-left { color: #9C3F2B; }
.float-timer[data-state="paused"] .ft-left { color: #7A7269; }
.float-timer[data-state="paused"] .ft-ring-fill { stroke: #A9B8A0; }
@media (max-width: 420px) { .ft-actions { flex-wrap: wrap; } .ft-ended { flex-basis: 100%; } }

/* v22: overtime lap ring around the first one (counts down one more block) */
.ft-ring-svg { inset: -5px; width: 58px; height: 58px; overflow: visible; }
.ft-ring-over { fill: none; stroke: #D9826E; stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray 0.9s linear; }
.float-timer[data-state="over"] .ft-ring-track { stroke: #F1D3CA; }
.ft-main { padding-left: 16px; gap: 14px; }
.ft-ring-over { opacity: 0; }
.float-timer[data-state="over"] .ft-ring-over { opacity: 1; }
.ft-unit { white-space: nowrap; }

/* v24: course video picker — the whole title, never cut */
.picker-title { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; min-height: 0; overflow-wrap: anywhere; }


/* =====================================================================
   v25: My Courses — the season card, progress, pills, course cards with
   "Watch now", the "+ Create course" card, "Your schedule"
   ===================================================================== */
.mc-page { max-width: 1180px; }
.mc-icon { width: 18px; height: 18px; flex-shrink: 0; }
.mc-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin: 6px 0 20px; }
.mc-page .mc-title { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; text-align: left; color: #1E1E1C; }
.mc-status { margin: 6px 0 0; font-size: 16px; color: #5F584E; }
.mc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.mc-pills .mc-pill {
  margin: 0; padding: 9px 18px; border: 1px solid #E4DCCF; border-radius: 999px; background: #FDFCFB; box-shadow: none;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; color: #3D3832; cursor: pointer;
}
.mc-pills .mc-pill:hover { border-color: #2F5E43; color: #2F5E43; }
.mc-pills .mc-pill.active { background: #2F5E43; border-color: #2F5E43; color: #FDFCFB; }
.mc-pills .mc-pill:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }

/* the season card */
.mc-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  padding: 30px 34px; border-radius: 24px; background: var(--mc-deep); color: #FDFCFB; box-shadow: 0 12px 32px rgba(47, 94, 67, 0.22);
}
.mc-hero-decor { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.mc-hero-decor::before { content: ''; position: absolute; width: 420px; height: 420px; left: -170px; bottom: -310px; border-radius: 50%; background: rgba(253, 252, 251, 0.07); }
.mc-hero-decor::after { content: ''; position: absolute; width: 260px; height: 260px; right: -90px; top: -150px; border-radius: 50%; background: rgba(184, 220, 160, 0.13); }
.mc-hero-main, .mc-deadline { position: relative; z-index: 1; min-width: 0; }
.mc-hero-main { padding-right: 30px; }
.mc-hero-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #CFE3C2; }
.mc-state { padding: 3px 11px; border-radius: 999px; background: #DCEBD0; color: #2F5E43; font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.mc-hero.is-over .mc-state { background: #F6D9CF; color: #8F3A26; }
.mc-season-name { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; color: #FDFCFB; overflow-wrap: anywhere; }
.mc-rename { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: none; border-radius: 10px; background: rgba(253, 252, 251, 0.1); color: #FDFCFB; cursor: pointer; }
.mc-rename:hover { background: rgba(253, 252, 251, 0.2); }
.mc-rename:focus-visible { outline: 3px solid #FDFCFB; outline-offset: 2px; }
.mc-hero-sub { margin: 0 0 24px; font-size: 16px; color: rgba(253, 252, 251, 0.85); }
.mc-hero-actions { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.mc-action { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mc-action-hint { font-size: 13px; text-align: center; color: rgba(253, 252, 251, 0.78); }
.mc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border: 2px solid transparent; border-radius: 999px;
  font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; white-space: nowrap; cursor: pointer; text-decoration: none;
}
.mc-btn:focus-visible { outline: 3px solid #FDFCFB; outline-offset: 2px; }
.mc-btn-light { background: #FDFCFB; color: #2F5E43; }
.mc-btn-light:hover { background: #EEF3EA; }
.mc-btn-ghost { background: transparent; border-color: rgba(253, 252, 251, 0.65); color: #FDFCFB; }
.mc-btn-ghost:hover { background: rgba(253, 252, 251, 0.1); border-color: #FDFCFB; }
.mc-btn-plus { font-size: 20px; font-weight: 600; line-height: 1; }
.mc-btn-primary { background: #2F5E43; color: #FDFCFB; }
.mc-btn-primary:hover { background: #254C36; }
.mc-btn-outline { background: #FDFCFB; border-color: #2F5E43; color: #2F5E43; }
.mc-btn-outline:hover { background: #F0F4EC; }
.mc-btn-primary:focus-visible, .mc-btn-outline:focus-visible { outline-color: #2F5E43; }

/* deadline: days left, the big date, start → deadline */
.mc-deadline { display: flex; flex-direction: column; justify-content: center; padding-left: 32px; border-left: 1px solid rgba(253, 252, 251, 0.22); }
.mc-deadline-label { margin: 0; font-size: 14px; font-weight: 700; color: #CFE3C2; }
.mc-days-left { margin: 4px 0 0; font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: 0.01em; text-transform: uppercase; color: var(--mc-mint); }
.mc-hero.is-over .mc-days-left { color: #F2B8A6; }
.mc-deadline-date { margin: 2px 0 16px; font-size: 46px; font-weight: 900; line-height: 1.05; letter-spacing: -0.01em; text-transform: uppercase; white-space: nowrap; color: #FDFCFB; }
.mc-track { position: relative; height: 4px; margin: 0 6px; border-radius: 2px; background: rgba(253, 252, 251, 0.25); }
.mc-track-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--mc-mint); }
.mc-track-dot { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); }
.mc-track-dot.is-start { left: 0; background: var(--mc-mint); }
.mc-track-dot.is-end { left: 100%; background: #E8907A; }
.mc-track-dot.is-today { width: 14px; height: 14px; background: var(--mc-paper); box-shadow: 0 0 0 4px rgba(184, 220, 160, 0.35); }
.mc-track-labels { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(253, 252, 251, 0.82); }
.mc-hero .season-deadline-wrap { position: relative; margin-top: 10px; }
.mc-deadline-btn { padding: 4px 0; border: none; background: none; font-family: inherit; font-size: 14px; font-weight: 600; color: #FDFCFB; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mc-deadline-btn:focus-visible { outline: 3px solid #FDFCFB; outline-offset: 2px; border-radius: 4px; }
.mc-hero .season-deadline-options {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: 320px; max-width: calc(100vw - 48px); margin: 0; padding: 14px;
  border-radius: 16px; background: #FDFCFB; color: #1E1E1C; box-shadow: 0 16px 40px rgba(30, 28, 24, 0.28);
}
.mc-hero .season-deadline-label { font-size: 13px; }
.mc-hero .season-length-btn { font-size: 13px; }

/* season progress */
.mc-progress { display: flex; align-items: center; gap: 14px; margin: 14px 0 28px; padding: 14px 20px; border: 1px solid #ECE5D9; border-radius: 18px; background: #FDFCFB; box-shadow: 0 2px 10px rgba(61, 56, 50, 0.05); color: #2F5E43; }
.mc-progress-title { font-size: 15px; font-weight: 700; white-space: nowrap; color: #1E1E1C; }
.mc-progress-bar { flex: 1; min-width: 80px; height: 10px; overflow: hidden; border-radius: 999px; background: #EAE3D6; }
.mc-progress-fill { display: block; width: 0; height: 100%; border-radius: 999px; background: #2F5E43; transition: width 0.4s ease; }
.mc-progress-count { font-size: 14px; font-weight: 700; white-space: nowrap; color: #5F584E; }

/* courses + schedule */
.mc-page .courses-body { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
.mc-courses-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.mc-h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; color: #1E1E1C; }
.mc-h2 .mc-count { font-weight: 700; color: #7A7269; }
.mc-text-btn { padding: 4px 2px; border: none; background: none; font-family: inherit; font-size: 14px; font-weight: 700; color: #2F5E43; cursor: pointer; }
.mc-text-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.mc-text-btn[hidden] { display: none; }
.mc-page .season-section.is-current > .season-head { display: none; }
.mc-page .season-blur-row { align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.mc-other-head { margin: 0; font-size: 18px; font-weight: 800; color: #1E1E1C; }

/* course cards: Watch now, and a quieter "+ Add videos" */
.mc-page .course-group-card { display: flex; flex-direction: column; }
.mc-page .course-group-info { flex: 1; display: flex; flex-direction: column; }
.mc-card-actions { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; }
.mc-watch-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; border: none; border-radius: 999px;
  background: #2F5E43; color: #FDFCFB; font-family: inherit; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.mc-watch-btn:hover { background: #254C36; }
.mc-add-videos-btn { flex-shrink: 0; padding: 8px 4px; border: none; background: none; font-family: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; color: #2F5E43; cursor: pointer; }
.mc-add-videos-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.mc-card-actions .mc-add-videos-btn:only-child { flex: 1; padding: 10px; border: 1.5px dashed #B9CBAE; border-radius: 999px; }
.mc-watch-btn:focus-visible, .mc-add-videos-btn:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }

/* "+ Create course": where the next course would go */
.mc-create-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 300px; padding: 24px;
  border: 2px dashed #B9CBAE; border-radius: 14px; background: rgba(253, 252, 251, 0.55); color: #2F5E43; font-family: inherit; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.mc-create-card:hover { background: #F3F6F0; border-color: #2F5E43; transform: translateY(-2px); }
.mc-create-card:focus-visible { outline: 3px solid #2F5E43; outline-offset: 3px; }
.mc-create-plus { width: 64px; height: 64px; border-radius: 50%; background: #2F5E43; color: #FDFCFB; font-size: 40px; font-weight: 400; line-height: 62px; text-align: center; box-shadow: 0 6px 16px rgba(47, 94, 67, 0.25); }
.mc-create-text { font-size: 18px; font-weight: 800; color: #1E1E1C; }
.mc-create-hint { font-size: 13px; text-align: center; color: #5F584E; }

/* Your schedule */
.mc-side .mc-side-label { margin: 2px 2px 12px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #5F584E; }
.mc-next-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 16px; background: #EEF3EA; color: #2F5E43; }
.mc-next-card .mc-icon { width: 22px; height: 22px; margin-top: 2px; }
.mc-next-label { margin: 0; font-size: 13px; color: #5F584E; }
.mc-next-when { margin: 2px 0; font-size: 17px; font-weight: 800; color: #1E1E1C; }
.mc-next-title { margin: 0; font-size: 14px; color: #3D3832; }
.mc-next-start { width: 100%; margin-top: 10px; }
.mc-up-label { margin: 16px 2px 6px; font-size: 13px; font-weight: 700; color: #5F584E; }
.mc-upcoming { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mc-up-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid #F0EAE0; border-radius: 12px; background: #FBF8F2; }
.mc-up-text { flex: 1; min-width: 0; }
.mc-up-when { display: block; font-size: 13px; font-weight: 700; color: #2F5E43; }
.mc-up-title { display: block; overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; color: #1E1E1C; }
.mc-up-start { flex-shrink: 0; padding: 6px 12px; border: 1.5px solid #2F5E43; border-radius: 999px; background: #FDFCFB; font-family: inherit; font-size: 13px; font-weight: 700; color: #2F5E43; cursor: pointer; }
.mc-up-start:hover { background: #F0F4EC; }
.mc-allocate-btn { width: 100%; margin: 14px 0 18px; white-space: normal; text-align: center; }
.mc-side .season-calendar { padding-top: 14px; border-top: 1px solid #ECE5D9; }

/* Learning channels: at the end of the page */
.mc-channels { margin-top: 36px; padding-top: 22px; border-top: 1px solid #ECE5D9; }
.mc-channels-hint { margin: -4px 0 12px; font-size: 14px; color: #5F584E; }

@media (max-width: 960px) { .mc-page .courses-body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .mc-hero { grid-template-columns: minmax(0, 1fr); padding: 24px 22px; }
  .mc-hero-main { padding-right: 0; }
  .mc-deadline { margin-top: 22px; padding-top: 20px; padding-left: 0; border-left: none; border-top: 1px solid rgba(253, 252, 251, 0.22); }
  .mc-deadline-date { font-size: 38px; }
  .mc-progress { flex-wrap: wrap; }
  .mc-progress-bar { order: 3; flex-basis: 100%; }
  .mc-page .mc-title { font-size: 28px; }
}
@media (max-width: 420px) {
  .mc-hero-actions, .mc-action, .mc-action .mc-btn { width: 100%; }
}

/* =====================================================================
   v25: Create a course
   ===================================================================== */
.cc-dialog { width: min(940px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); padding: 0; overflow: hidden; }
.cc-dialog[open] { display: flex; flex-direction: column; }
.cc-dialog .cc-head { margin: 0; padding: 20px 24px 0; }
.cc-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; padding: 14px 24px 0; list-style: none; counter-reset: ccstep; }
.cc-steps[hidden] { display: none; }
.cc-steps li { counter-increment: ccstep; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #7A7269; }
.cc-steps li::before { content: counter(ccstep); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #EFEAE3; color: #5F584E; font-size: 13px; font-weight: 800; }
.cc-steps li:not(:last-child)::after { content: ''; width: 22px; height: 2px; margin-left: 4px; border-radius: 1px; background: #E4DCCF; }
.cc-steps li.is-current { color: #1E1E1C; }
.cc-steps li.is-current::before { background: #2F5E43; color: #FDFCFB; }
.cc-steps li.is-done { color: #2F5E43; }
.cc-steps li.is-done::before { content: '✓'; background: #DCE8D3; color: #2F5E43; }
.cc-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 24px 20px; }
.cc-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 14px 24px; border-top: 1px solid #ECE5D9; background: #FDFCFB; }
.cc-foot-left { display: flex; align-items: center; min-width: 0; }
.cc-footer-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.cc-error { flex-basis: 100%; margin: 0; font-size: 14px; font-weight: 600; color: #A33A2A; }
.cc-error[hidden] { display: none; }
.cc-count { font-size: 14px; font-weight: 600; color: #5F584E; }
.cc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 20px; border: 1.5px solid transparent; border-radius: 999px;
  font-family: inherit; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.cc-btn-primary { background: #2F5E43; color: #FDFCFB; }
.cc-btn-primary:hover { background: #254C36; }
.cc-btn-primary:disabled { opacity: 0.6; cursor: default; }
.cc-btn-secondary { background: #FDFCFB; border-color: #E4DCCF; color: #3D3832; }
.cc-btn-secondary:hover { border-color: #2F5E43; color: #2F5E43; }
.cc-btn-text { padding-left: 10px; padding-right: 10px; background: none; color: #2F5E43; }
.cc-btn-text:hover { text-decoration: underline; text-underline-offset: 3px; }
.cc-btn:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.cc-h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: #1E1E1C; }
.cc-label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: #3D3832; }
.cc-label:first-child, .cc-label-top { margin-top: 0; }
.cc-hint { margin: 6px 0 0; font-size: 14px; color: #5F584E; }
.cc-dialog .cc-results { flex: none; min-height: 0; overflow: visible; margin-top: 12px; }
.cc-other { margin-top: 18px; padding-top: 16px; border-top: 1px solid #ECE5D9; }
.cc-link-form { display: flex; gap: 8px; margin-top: 10px; }
.cc-link-form[hidden] { display: none; }
.cc-link-form .text-input { flex: 1; margin: 0; }
.cc-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cc-links:empty { display: none; }
.cc-link-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 999px; background: #F3F6F0; font-size: 14px; font-weight: 600; color: #1E1E1C; }
.cc-link-chip .site-cover, .cc-link-icon .site-cover { width: 24px; height: 24px; gap: 0; overflow: hidden; border-radius: 6px; }
.cc-link-chip .site-cover img, .cc-link-icon .site-cover img { width: 24px; height: 24px; border-radius: 6px; }
.cc-chip-x { width: 24px; height: 24px; border: none; border-radius: 50%; background: none; font-size: 13px; color: #5F584E; cursor: pointer; }
.cc-chip-x:hover { background: #E4EEDB; color: #1E1E1C; }
.cc-review { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.cc-review-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid #ECE5D9; border-radius: 14px; background: #FBF8F2; }
.cc-num { flex-shrink: 0; width: 22px; text-align: center; font-size: 14px; font-weight: 800; color: #7A7269; }
.cc-thumb { flex-shrink: 0; width: 104px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #EFEAE3; }
.cc-link-icon { flex-shrink: 0; display: grid; place-items: center; width: 104px; aspect-ratio: 16 / 9; border-radius: 8px; background: #EEF3EA; }
.cc-review-text { flex: 1; min-width: 0; }
.cc-review-title { margin: 0; font-size: 15px; font-weight: 700; color: #1E1E1C; overflow-wrap: anywhere; }
.cc-review-meta { margin: 2px 0 0; font-size: 13px; color: #5F584E; overflow-wrap: anywhere; }
.cc-review-tools { flex-shrink: 0; display: flex; gap: 6px; }
.cc-tool { width: 34px; height: 34px; border: 1px solid #E4DCCF; border-radius: 10px; background: #FDFCFB; font-size: 15px; color: #3D3832; cursor: pointer; }
.cc-tool:hover:not(:disabled) { border-color: #2F5E43; color: #2F5E43; }
.cc-tool:disabled { opacity: 0.35; cursor: default; }
.cc-total { margin: 14px 0 0; font-size: 15px; font-weight: 700; color: #2F5E43; }
/* pick a date and time */
.cc-when { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; margin-top: 14px; padding: 18px; border: 1px solid #ECE5D9; border-radius: 18px; background: #FBF8F2; }
.cc-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cc-cal-title { margin: 0; font-size: 16px; font-weight: 800; color: #1E1E1C; }
.cc-cal-nav { width: 36px; height: 36px; border: none; border-radius: 50%; background: none; font-size: 22px; line-height: 1; color: #3D3832; cursor: pointer; }
.cc-cal-nav:hover:not(:disabled) { background: #EFEAE3; }
.cc-cal-nav:disabled { opacity: 0.3; cursor: default; }
.cc-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cc-cal-dow { padding: 4px 0; text-align: center; font-size: 13px; font-weight: 700; color: #7A7269; }
.cc-cal-day { justify-self: center; width: 40px; max-width: 100%; aspect-ratio: 1; border: none; border-radius: 50%; background: none; font-family: inherit; font-size: 14px; font-weight: 600; color: #1E1E1C; cursor: pointer; }
.cc-cal-day:hover:not(:disabled) { background: #E4EEDB; }
.cc-cal-day:disabled { color: #C9C1B5; cursor: default; }
.cc-cal-day.is-today { box-shadow: inset 0 0 0 2px #2F5E43; }
.cc-cal-day.is-selected { background: #2F5E43; color: #FDFCFB; }
.cc-cal-day:focus-visible, .cc-chip:focus-visible, .cc-cal-nav:focus-visible, .cc-tool:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.cc-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cc-chip { padding: 10px 12px; border: 1.5px solid #CFC6B8; border-radius: 999px; background: #FDFCFB; font-family: inherit; font-size: 15px; font-weight: 700; white-space: nowrap; color: #1E1E1C; cursor: pointer; }
.cc-chip:hover { border-color: #2F5E43; }
.cc-chip.is-selected { background: #2F5E43; border-color: #2F5E43; color: #FDFCFB; }
.cc-time-input { max-width: 200px; margin: 0; font-variant-numeric: tabular-nums; }
.cc-when-note { margin: 14px 0 0; font-size: 14px; color: #5F584E; }
/* confirm + all set */
.cc-summary { margin-top: 12px; padding: 4px 18px; border: 1px solid #ECE5D9; border-radius: 18px; background: #FBF8F2; }
.cc-summary-row { display: flex; gap: 16px; padding: 13px 0; border-bottom: 1px solid #ECE5D9; }
.cc-summary-row:last-child { border-bottom: none; }
.cc-summary-label { flex-shrink: 0; width: 96px; font-size: 14px; font-weight: 700; color: #7A7269; }
.cc-summary-value { font-size: 15px; font-weight: 600; color: #1E1E1C; overflow-wrap: anywhere; }
.cc-ok { margin: 14px 0 0; font-size: 14px; color: #2F5E43; }
.cc-done { padding: 28px 12px 12px; text-align: center; }
.cc-done-check { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%; background: #2F5E43; color: #FDFCFB; font-size: 40px; line-height: 76px; box-shadow: 0 10px 24px rgba(47, 94, 67, 0.25); }
.cc-done-title { margin: 0 0 8px; font-size: 28px; font-weight: 800; color: #1E1E1C; }
.cc-done-text { max-width: 480px; margin: 0 auto; font-size: 16px; color: #3D3832; }
@media (max-width: 700px) {
  .cc-when { grid-template-columns: minmax(0, 1fr); }
  .cc-thumb, .cc-link-icon { width: 72px; }
  .cc-review-row { flex-wrap: wrap; }
}

/* =====================================================================
   v25: "Allocate study time to calendar" — same feature, calmer look
   ===================================================================== */
.sc-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.sc-top-text { min-width: 0; max-width: 760px; }
.sc-eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #2F5E43; }
.study-page .study-title { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; text-align: left; color: #1E1E1C; }
.study-page .sc-sub { margin: 8px 0 0; text-align: left; font-size: 15px; color: #5F584E; }
.study-page .study-ok-note { display: block; margin: 10px 0 0; padding: 0; background: none; border-radius: 0; font-size: 14px; font-weight: 600; color: #2F5E43; }
.sc-back, .sc-today, .sc-gcal-btn {
  padding: 9px 16px; border: 1px solid #E4DCCF; border-radius: 999px; background: #FDFCFB; font-family: inherit; font-size: 14px; font-weight: 600; color: #3D3832; cursor: pointer; white-space: nowrap;
}
.sc-back:hover, .sc-today:hover:not(:disabled), .sc-gcal-btn:hover { border-color: #2F5E43; color: #2F5E43; }
.sc-today:disabled { opacity: 0.45; cursor: default; }
.sc-back:focus-visible, .sc-today:focus-visible, .sc-gcal-btn:focus-visible, .sc-create:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.sc-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
.study-page .study-week-nav { margin: 0; gap: 6px; }
.study-page .study-week-label { min-width: 170px; text-align: center; font-size: 17px; font-weight: 800; color: #1E1E1C; }
.study-page .study-gcal { flex-direction: column; align-items: flex-end; gap: 4px; margin: 0; }
.study-page .study-gcal-note { max-width: 340px; text-align: right; }
.study-page .study-gcal-note:empty { display: none; }
.study-page .study-layout { grid-template-columns: 236px minmax(0, 1fr); gap: 24px; }
.study-page .study-side { top: 80px; }
.study-page .study-courses { gap: 10px; margin-top: 10px; }
.study-page .study-course-chip {
  position: relative; width: 100%; padding: 12px 34px 12px 30px; border: 1px solid #ECE5D9; border-left: 1px solid #ECE5D9; border-radius: 14px;
  background: #FDFCFB; box-shadow: 0 1px 3px rgba(61, 56, 50, 0.05); transition: border-color 0.15s, box-shadow 0.15s;
}
.study-page .study-course-chip::before { content: ''; position: absolute; left: 12px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: #5D7052; }
.study-page .study-course-chip::after { content: '⋮⋮'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; letter-spacing: -3px; color: #C9C1B5; }
.study-page .study-course-chip:hover { border-color: #2F5E43; box-shadow: 0 4px 14px rgba(61, 56, 50, 0.1); }
.study-page .study-course-chip[data-priority="red"]::before { background: #D64545; }
.study-page .study-course-chip[data-priority="orange"]::before { background: #E8893A; }
.study-page .study-course-chip[data-priority="yellow"]::before { background: #E8C547; }
.study-page .study-chip-name { font-size: 14px; color: #1E1E1C; }
.study-page .study-chip-meta { font-size: 13px; }
.sc-create {
  width: 100%; margin-top: 10px; padding: 12px; border: 2px dashed #B9CBAE; border-radius: 14px; background: transparent;
  font-family: inherit; font-size: 14px; font-weight: 700; color: #2F5E43; cursor: pointer;
}
.sc-create:hover { background: #F3F6F0; border-color: #2F5E43; }
.study-page .study-grid { padding: 6px 10px 12px; border: 1px solid #ECE5D9; border-radius: 20px; box-shadow: 0 6px 24px rgba(61, 56, 50, 0.06); }
.study-page .study-day-head { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 58px; line-height: 1; }
.study-page .study-day.is-today .study-day-head { margin: 0; border-radius: 0; background: none; color: inherit; }
.sc-dow { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #7A7269; }
.sc-dnum { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 17px; font-weight: 800; color: #1E1E1C; }
.study-day.is-today .sc-dow { color: #2F5E43; }
.study-day.is-today .sc-dnum { background: #2F5E43; color: #FDFCFB; }
.study-page .study-day-body { border-left: 1px solid #F1ECE4; background-image: repeating-linear-gradient(to bottom, #F1ECE4 0, #F1ECE4 1px, transparent 1px, transparent 44px); }
.study-page .study-day.is-today .study-day-body { background-color: #F6F9F3; }
.study-page .study-hour-label { font-size: 12px; color: #A39A90; }
.study-page .study-now-line, .study-page .study-now-line::before { background: #E07A5F; }
.study-page .study-block { border-left-width: 3px; border-radius: 10px; padding: 4px 8px; box-shadow: 0 1px 2px rgba(61, 56, 50, 0.08); }
.study-page .study-block-name { font-size: 13px; color: #1E1E1C; }
.study-page .study-block-time { font-size: 12px; }
@media (max-width: 860px) { .study-page .study-layout { grid-template-columns: minmax(0, 1fr); } .study-page .study-gcal { align-items: flex-start; } .study-page .study-gcal-note { text-align: left; } }

/* v25: the running session at the top of "Your schedule" */
.mc-now-card { margin: 0 0 14px; padding: 14px 16px; border-radius: 16px; background: var(--mc-deep); color: #FDFCFB; }
.mc-now-label { margin: 0; font-size: 13px; font-weight: 700; color: #CFE3C2; }
.mc-now-time { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 4px; }
.mc-now-left { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; color: #FDFCFB; }
.mc-now-left.is-soon { color: #F6C978; }
.mc-now-left.is-over { color: #F2B8A6; }
.mc-now-unit { font-size: 14px; font-weight: 600; color: #CFE3C2; }
.mc-now-intent { margin: 0; font-size: 14px; color: rgba(253, 252, 251, 0.85); }
.mc-now-card .mc-now-back { width: 100%; margin-top: 12px; background: #FDFCFB; color: #2F5E43; }
.mc-now-card .mc-now-back:hover { background: #EEF3EA; }


/* v25: card actions never squeeze — Watch now full width, "+ Add videos" under it */
.mc-card-actions { flex-direction: column; align-items: stretch; gap: 4px; }
.mc-card-actions .mc-watch-btn { flex: none; width: 100%; }
.mc-card-actions .mc-add-videos-btn { align-self: center; padding: 6px 8px; }
.mc-card-actions .mc-add-videos-btn:only-child { align-self: stretch; }

/* v26: video picker — one result per row, the full title beside the thumbnail;
   "About to be added" on the side */
#video-picker.picker-dialog { width: min(96vw, 1040px); max-height: min(92vh, 860px); }
.picker-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; margin-top: 14px; }
.picker-body .picker-results { margin-top: 0; }
.picker-results { display: flex; flex-direction: column; gap: 8px; }
.picker-results .picker-card { display: grid; grid-template-columns: 176px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 14px; padding: 8px; border-radius: 14px; }
.picker-results .picker-card .picker-thumb { grid-row: 1 / span 2; overflow: hidden; border-radius: 8px; }
.picker-results .picker-card .picker-title { grid-column: 2; padding: 4px 0 0; font-size: 15px; line-height: 1.35; }
.picker-results .picker-card .picker-meta { grid-column: 2; align-self: start; margin-top: 4px; padding: 0; font-size: 13px; white-space: normal; }
.picker-chosen { min-height: 0; overflow-y: auto; padding: 12px; border: 1px solid #ECE5D9; border-radius: 16px; background: #FBF8F2; }
.picker-chosen-title { margin: 0 0 10px; font-size: 14px; font-weight: 800; color: #1E1E1C; }
.picker-chosen-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.picker-chosen-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) 28px; align-items: start; gap: 8px; }
.picker-chosen-item img { width: 72px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: #EFEAE3; }
.picker-chosen-name { font-size: 13px; font-weight: 600; line-height: 1.3; color: #1E1E1C; overflow-wrap: anywhere; }
.picker-chosen-x { width: 28px; height: 28px; border: none; border-radius: 50%; background: none; font-size: 13px; color: #5F584E; cursor: pointer; }
.picker-chosen-x:hover { background: #E4EEDB; color: #1E1E1C; }
.picker-chosen-x:focus-visible { outline: 3px solid #2F5E43; outline-offset: 1px; }
.picker-chosen-empty { font-size: 13px; color: #5F584E; }
@media (max-width: 760px) {
  .picker-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .picker-chosen { order: -1; max-height: 150px; }
  .picker-results .picker-card { grid-template-columns: 120px minmax(0, 1fr); }
}
/* v26: rows keep their full height and the list scrolls (no squashing) */
.picker-results .picker-card { flex-shrink: 0; }
.picker-body .picker-results { min-height: 0; overflow-y: auto; padding: 4px; }
#video-picker > *:not(.picker-body) { flex-shrink: 0; }

/* v27: Create a course — "About to be added" beside the results; Review rows:
   ⋮⋮ handle · number · thumbnail · title · bin */
.cc-collect { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; margin-top: 12px; }
.cc-dialog .cc-collect .cc-results { margin-top: 0; }
.cc-chosen { position: sticky; top: 0; max-height: 60vh; }
.cc-review .drag-handle { flex-shrink: 0; }
.cc-handle-space { flex-shrink: 0; width: 28px; }
.cc-review-links { margin-top: 8px; }
.cc-bin { flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; margin-left: auto; padding: 0; border: none; border-radius: 10px; background: none; color: #5F584E; cursor: pointer; }
.cc-bin svg { width: 20px; height: 20px; }
.cc-bin:hover { background: #F8E7E3; color: #A33A2A; }
.cc-bin:focus-visible { outline: 3px solid #2F5E43; outline-offset: 1px; }
.cc-review.is-sorting .cc-review-row:not(.is-dragging) { transition: transform 0.15s ease; }
.cc-review-row.is-dragging { position: relative; z-index: 2; box-shadow: 0 10px 24px rgba(61, 56, 50, 0.18); background: #FDFCFB; }
@media (max-width: 760px) {
  .cc-collect { grid-template-columns: minmax(0, 1fr); }
  .cc-chosen { position: static; order: -1; max-height: 160px; }
}

/* v29: an unfinished course: "Continue selecting videos" under "+ Add videos" */
.mc-continue-btn { width: 100%; margin-top: 2px; padding: 9px 12px; border: 1.5px solid #2F5E43; border-radius: 999px; background: #FDFCFB; font-family: inherit; font-size: 14px; font-weight: 700; color: #2F5E43; cursor: pointer; }
.mc-continue-btn:hover { background: #F0F4EC; }
.mc-continue-btn:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }

/* =====================================================================
   v30: course badges (large; grey + lock until earned) and the course flow
   ===================================================================== */
.v30-badge { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; background: #FDFCFB; box-shadow: 0 4px 14px rgba(30, 30, 28, 0.22); }
.v30-badge-emoji { font-size: 36px; line-height: 1; }
.v30-badge.is-locked .v30-badge-emoji { filter: grayscale(1); opacity: 0.5; }
.v30-badge.is-earned { box-shadow: 0 0 0 3px #E8C547, 0 4px 14px rgba(30, 30, 28, 0.22); }
.v30-badge-lock { position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #3D3832; color: #FDFCFB; box-shadow: 0 0 0 2px #FDFCFB; }
.v30-badge-lock svg { width: 14px; height: 14px; }
.v30-badge-card { position: absolute; right: 10px; bottom: 10px; z-index: 3; }
.v30-badge-page { width: 92px; height: 92px; }
.v30-badge-page .v30-badge-emoji { font-size: 52px; }
.v30-badge-page .v30-badge-lock { width: 32px; height: 32px; }
.v30-badge-page .v30-badge-lock svg { width: 17px; height: 17px; }
.v30-badge-ach { width: 88px; height: 88px; margin: 0 auto 10px; }
.v30-badge-ach .v30-badge-emoji { font-size: 48px; }
.v30-badge-card-ach .badge-icon { display: none; }
.badge-see-btn { margin-top: 10px; padding: 8px 14px; border: 1.5px solid #2F5E43; border-radius: 999px; background: #FDFCFB; font-family: inherit; font-size: 13px; font-weight: 700; color: #2F5E43; cursor: pointer; }
.badge-see-btn:hover { background: #F0F4EC; }
.badge-see-btn:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.badge-card.locked .badge-see-btn { opacity: 1; }
/* course page: ▶ on every video */
.course-start-hint { margin: 4px 0 14px; font-size: 14px; color: #5F584E; }
.course-video-play { flex-shrink: 0; display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; border: none; border-radius: 50%; background: #2F5E43; color: #FDFCFB; font-size: 15px; cursor: pointer; }
.course-video-play:hover { background: #254C36; }
.course-video-play:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.course-video-play + .course-video-remove { margin-left: 6px; }
.course-video-thumb.is-playable { cursor: pointer; }
/* "Your time" in the course flow */
.course-time-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 6px 0 4px; }
.course-time-options[hidden] { display: none; }
.course-time-option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 18px; border: 2px solid #D7E2CC; border-radius: 16px; background: #FDFCFB; font-family: inherit; text-align: left; cursor: pointer; }
.course-time-option:hover { border-color: #2F5E43; background: #F3F6F0; }
.course-time-option:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.course-time-option.is-follow { border-color: #2F5E43; }
.course-time-label { font-size: 14px; font-weight: 700; color: #5F584E; }
.course-time-value { font-size: 24px; font-weight: 800; color: #2F5E43; }
.course-time-hint { font-size: 13px; color: #5F584E; }
.course-time-or { grid-column: 1 / -1; margin: 6px 0 0; font-size: 14px; font-weight: 600; color: #5F584E; }
/* v30: a locked course badge card stays readable (only the emoji is grey) */
.badge-card.locked.v30-badge-card-ach { opacity: 1; filter: none; }
.badge-card.locked.v30-badge-card-ach .badge-name { color: #3D3832; }
.v30-badge.is-locked .v30-badge-emoji { opacity: 0.6; }

/* v31: My schedule — standard 6-dot grip, the drag hint arrow, courses and
   calendar starting at the same height */
.study-page .study-course-chip::after {
  content: ''; letter-spacing: 0; width: 12px; height: 18px; right: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 18'%3E%3Cg fill='%23A39A90'%3E%3Ccircle cx='3' cy='3' r='1.6'/%3E%3Ccircle cx='9' cy='3' r='1.6'/%3E%3Ccircle cx='3' cy='9' r='1.6'/%3E%3Ccircle cx='9' cy='9' r='1.6'/%3E%3Ccircle cx='3' cy='15' r='1.6'/%3E%3Ccircle cx='9' cy='15' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 12px 18px;
}
.sc-drag-arrow { position: absolute; top: 50%; right: -30px; width: 28px; height: 18px; margin-top: -9px; color: #2F5E43; pointer-events: none; animation: scNudge 1.4s ease-in-out 6; }
.sc-drag-arrow svg { width: 100%; height: 100%; display: block; }
@keyframes scNudge { 0%, 100% { transform: translateX(0); opacity: 0.55; } 50% { transform: translateX(6px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sc-drag-arrow { animation: none; } }
.study-page .sc-toolbar { display: grid; grid-template-columns: 236px minmax(0, 1fr) auto; align-items: center; gap: 10px 24px; margin-bottom: 12px; }
.sc-courses-label { margin: 0; }
.study-page .study-courses { margin-top: 0; }
.study-page .sc-sub { font-size: 16px; color: #3D3832; }
@media (max-width: 860px) {
  .study-page .sc-toolbar { grid-template-columns: minmax(0, 1fr); }
  .sc-drag-arrow { display: none; }
}

/* v32: the course badge on "Session complete" */
.end-course-badge { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 4px; text-align: center; }
.v30-badge-end { width: 104px; height: 104px; margin-bottom: 4px; }
.v30-badge-end .v30-badge-emoji { font-size: 58px; }
.v30-badge-end .v30-badge-lock { width: 34px; height: 34px; }
.v30-badge-end .v30-badge-lock svg { width: 18px; height: 18px; }
.end-course-name { margin: 0; font-size: 17px; font-weight: 800; color: #1E1E1C; }
.end-course-text { margin: 0; font-size: 14px; font-weight: 600; color: #2F5E43; }
.achievement-badge[hidden] { display: none; }

/* v33: Back up & sync, backup file, when data can be lost */
.profile-row-sync { border: 1.5px solid #D7E2CC; background: #F6F9F3; }
.profile-file-btns { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.profile-restore { cursor: pointer; display: inline-flex; align-items: center; }
.data-loss-note { margin: 16px 0 6px; padding: 14px 16px; border-radius: 14px; background: #FBF4E8; border: 1px solid #EBDDC4; font-size: 14px; color: #3D3832; }
.data-loss-note strong { display: block; margin-bottom: 4px; font-size: 15px; color: #1E1E1C; }
.data-loss-note p { margin: 6px 0 0; }
.mc-sync-line { margin: 14px 2px 0; font-size: 13px; color: #5F584E; }
.mc-sync-line button { padding: 0; border: none; background: none; font: inherit; font-weight: 700; color: #2F5E43; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* v34: the last 7 days on the "How long?" step */
.week-aware { margin: 18px 0 6px; padding: 16px 18px; border: 1px solid #ECE5D9; border-radius: 18px; background: #FDFCFB; text-align: left; }
.week-aware[hidden] { display: none; }
.wa-title { margin: 0 0 12px; font-size: 16px; font-weight: 800; color: #1E1E1C; }
.wa-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: center; }
.wa-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; height: 130px; }
.wa-day { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.wa-bar-wrap { flex: 1; width: 100%; max-width: 26px; display: flex; align-items: flex-end; border-radius: 6px; background: #F4ECDF; overflow: hidden; }
.wa-bar { display: block; width: 100%; border-radius: 6px; background: #D9826E; }
.wa-day.is-today .wa-bar { background: #B5563F; }
.wa-day-label { font-size: 13px; font-weight: 700; color: #5F584E; }
.wa-day.is-today .wa-day-label { color: #1E1E1C; }
.wa-day-min { font-size: 12px; color: #7A7269; white-space: nowrap; }
.wa-pie-wrap { display: flex; align-items: center; gap: 14px; }
.wa-pie { width: 120px; height: 120px; flex-shrink: 0; }
.wa-pie-num { font-size: 17px; font-weight: 800; fill: #1E1E1C; }
.wa-pie-sub { font-size: 8px; fill: #5F584E; }
.wa-legend { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #3D3832; }
.wa-dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; vertical-align: middle; }
.wa-dot.is-used { background: #D9826E; }
.wa-dot.is-now { background: #F2C4B6; }
.wa-dot.is-left { background: #DCE8D3; }
.wa-note { margin: 12px 0 0; font-size: 14px; color: #3D3832; }
.settings-calm-note { margin: 4px 0 0 18px; }
@media (max-width: 640px) { .wa-body { grid-template-columns: minmax(0, 1fr); } }
.wa-day-min { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* v36: the extension points to the web app for Google */
.webapp-note { margin: 4px 0 18px; padding: 16px 18px; border-radius: 16px; background: #EEF3EA; border: 1.5px solid #D7E2CC; font-size: 14px; color: #3D3832; text-align: left; }
.webapp-note[hidden] { display: none; }
.webapp-note strong:first-child { display: block; margin-bottom: 4px; font-size: 16px; color: #1E1E1C; }
.webapp-note p { margin: 6px 0 0; }
.webapp-note .webapp-link { display: inline-flex; width: auto; margin-top: 12px; padding: 10px 18px; text-decoration: none; }

.settings-account-note { margin: 0 0 10px; }
#screen-settings .settings-row > [id^="settings-"][id$="-btn"] { flex: 0 0 auto; width: auto; min-width: 104px; padding-left: 18px; padding-right: 18px; white-space: nowrap; }


/* =====================================================================
   v38: the WEB APP on tablets and phones (body.is-web-app only — the
   extension is unchanged). Same look and functions; things just fit.
   ===================================================================== */

/* ---- tablet (761–960 px) ---- */
@media (max-width: 960px) and (min-width: 761px) {
  body.is-web-app .study-page .study-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
  body.is-web-app .study-page .sc-toolbar { grid-template-columns: 200px minmax(0, 1fr) auto; }
  body.is-web-app .mc-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); padding: 26px 26px; }
  body.is-web-app .mc-deadline-date { font-size: 38px; }
  body.is-web-app .mc-days-left { font-size: 26px; }
}

/* ---- phone (≤ 600 px) ---- */
@media (max-width: 600px) {
  /* top bar: the three links on one quiet row */
  body.is-web-app .nav-links { flex-wrap: nowrap; gap: 4px 12px; overflow-x: auto; scrollbar-width: none; }
  body.is-web-app .nav-links::-webkit-scrollbar { display: none; }
  body.is-web-app .nav-links a { white-space: nowrap; font-size: 13px; }
  body.is-web-app .nav-links .nav-icon { display: none; }
  body.is-web-app .nav-links { justify-content: space-between; }

  /* My Courses: the deadline fits */
  body.is-web-app .mc-page .mc-title { font-size: 26px; }
  body.is-web-app .mc-season-name { font-size: 24px; }
  body.is-web-app .mc-days-left { font-size: 22px; }
  body.is-web-app .mc-deadline-date { font-size: 32px; white-space: normal; }
  body.is-web-app .mc-hero { padding: 20px 18px; border-radius: 20px; }
  body.is-web-app .mc-hero-actions, body.is-web-app .mc-action { width: 100%; }
  body.is-web-app .mc-action .mc-btn { width: 100%; }
  body.is-web-app .mc-pills .mc-pill { padding: 8px 14px; }
  body.is-web-app .mc-progress { padding: 12px 14px; }

  /* course page: its buttons wrap instead of running off the edge */
  body.is-web-app .course-page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  body.is-web-app .course-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  body.is-web-app .course-page-actions > * { flex: 1 1 auto; width: auto; min-width: 0; }
  body.is-web-app .course-video-row { gap: 8px; }
  body.is-web-app .course-video-thumb { width: 72px; }

  /* "Schedule a session" (Intentional calendar): buttons wrap */
  body.is-web-app #screen-planned .btn-row { flex-wrap: wrap; }
  body.is-web-app #screen-planned .btn-row > * { flex: 1 1 100%; }

  /* the week calendar: same grid, scrolls sideways instead of squeezing */
  body.is-web-app .study-page .study-layout { grid-template-columns: minmax(0, 1fr); }
  body.is-web-app .study-page .study-side { position: static; }
  body.is-web-app .study-page .sc-toolbar { grid-template-columns: minmax(0, 1fr); }
  body.is-web-app .study-main { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  body.is-web-app .study-grid { min-width: 620px; }
  body.is-web-app .study-page .study-title { font-size: 26px; }
  body.is-web-app .sc-drag-arrow { display: none; }

  /* Create a course + the video picker: more room for titles */
  body.is-web-app .cc-dialog .cc-head { padding: 16px 16px 0; }
  body.is-web-app .cc-steps { padding: 10px 16px 0; gap: 6px 8px; }
  body.is-web-app .cc-steps li:not(:last-child)::after { width: 12px; }
  body.is-web-app .cc-body { padding: 14px 16px 16px; }
  body.is-web-app .cc-footer { padding: 12px 16px; }
  body.is-web-app .cc-review-row { flex-wrap: nowrap; gap: 8px; padding: 8px; }
  body.is-web-app .cc-review .drag-handle { width: 22px; }
  body.is-web-app .cc-num { width: 16px; }
  body.is-web-app .cc-thumb, body.is-web-app .cc-link-icon { width: 56px; }
  body.is-web-app .cc-bin { width: 34px; height: 34px; }
  body.is-web-app .cc-when { padding: 12px; gap: 16px; }
  body.is-web-app .cc-cal-day { width: 36px; }
  body.is-web-app .picker-results .picker-card { grid-template-columns: 112px minmax(0, 1fr); column-gap: 10px; }
  body.is-web-app .picker-results .picker-card .picker-title { font-size: 14px; }
  body.is-web-app #video-picker.picker-dialog { padding: 16px; }

  /* the floating timer + clock take less of a small screen */
  body.is-web-app .float-timer { right: 10px; left: 10px; width: auto; max-width: none; bottom: 58px; }
  body.is-web-app .ft-main { padding: 8px 8px 8px 12px; gap: 10px; }
  body.is-web-app .ft-left { font-size: 20px; }
  body.is-web-app .ft-ring, body.is-web-app .ft-ring-svg { width: 40px; height: 40px; }
  body.is-web-app .ft-ring-svg { inset: -4px; width: 48px; height: 48px; }
  body.is-web-app .corner-clock { right: 10px; bottom: 10px; padding: 6px 12px; }
  body.is-web-app .corner-clock[data-state="idle"] .cc-now { font-size: 15px; }
  body.is-web-app .screen.active { padding-bottom: 72px; }
}

/* v39: language switch (next to dark mode) */
.nav-lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid #ECE5D9; border-radius: 999px; background: #FDFCFB; color: #3D3832; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.nav-lang-btn:hover { border-color: #2F5E43; color: #2F5E43; }
.nav-lang-btn:focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.nav-lang-flag { font-size: 16px; line-height: 1; }
@media (max-width: 600px) { .nav-lang-btn { height: 36px; padding: 0 9px; } }

.nav-lang-btn .nav-lang-flag { width: 20px; height: 13px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(30, 30, 28, 0.15); font-size: 0; }

/* v40: answer boxes have room (Bear's notebook was ~25 characters wide) */
.bear-notebook-phase textarea.bear-notebook-input { width: min(100%, 520px); max-width: 100%; font-size: 15px; line-height: 1.5; }
.bear-notebook-phase .dictation-wrap { width: min(100%, 520px); }
.emotion-reason-field textarea { line-height: 1.5; overflow-y: auto; }

/* v43: "One quick tap" — each category is a soft box with room for four
   tiles (2×2), so the choices read at one glance; moderate space between */
.next-activity-container { max-width: 1060px; }
.next-activity-groups { display: grid; grid-template-columns: repeat(4, max-content); justify-content: center; gap: 18px; margin: 22px 0 26px; }
.next-activity-group { background: #F6F2EA; border: 1px solid #EAE2D3; border-radius: 22px; padding: 12px 12px 14px; min-width: 0; }
.next-activity-group .next-activity-heading { margin: 2px 4px 10px; }
.next-activity-row { display: grid; grid-template-columns: repeat(2, 96px); grid-template-rows: repeat(2, 96px); gap: 8px; }
.next-activity-row .next-activity-tile { width: auto; height: auto; aspect-ratio: auto; padding: 8px 6px; gap: 6px; font-size: 14px; border-radius: 16px; }
.next-activity-row .next-activity-emoji { font-size: 34px; }
.next-activity-row .next-activity-label { overflow-wrap: anywhere; }
@media (max-width: 1040px) { .next-activity-groups { grid-template-columns: repeat(2, max-content); } }
#screen-next-activity .flow-helper { text-align: center; }
#screen-next-activity .next-activity-specify { max-width: 640px; margin-left: auto; margin-right: auto; }
@media (max-width: 600px) {
  .next-activity-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .next-activity-group { padding: 10px 8px 10px; border-radius: 18px; }
  .next-activity-row { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: auto; gap: 6px; }
  .next-activity-row .next-activity-tile { aspect-ratio: 1 / 1; font-size: 12.5px; padding: 4px; gap: 4px; border-radius: 14px; }
  .next-activity-row .next-activity-emoji { font-size: 26px; }
}
#screen-next-activity .btn-row { max-width: 958px; margin-left: auto; margin-right: auto; }
@media (max-width: 600px) { #screen-next-activity .next-activity-specify-row { flex-direction: column; align-items: stretch; } #screen-next-activity .next-activity-specify-row .btn-primary { width: 100%; } }

/* ============================================================
   v44: Bear's notebooks (easter egg)
   ============================================================ */
/* the hidden notebooks: small, a little tilted, a wiggle when found by the mouse */
.bnb-spot { position: relative; display: block; width: 100%; height: 0; margin: 0; padding: 0; }
.bnb-egg {
  position: absolute; z-index: 2; width: 26px; height: 32px; padding: 0; margin: 0; border: 0; background: none;
  cursor: pointer; transform: rotate(var(--r, 0deg)); transform-origin: 50% 80%;
  filter: drop-shadow(0 2px 2px rgba(61, 56, 50, 0.22)); transition: transform 0.18s ease;
}
.bnb-egg-svg { display: block; width: 100%; height: 100%; }
.bnb-egg:hover, .bnb-egg:focus-visible { animation: bnb-wiggle 0.5s ease; }
.bnb-egg:focus-visible { outline: 2px solid #2F5E43; outline-offset: 3px; border-radius: 4px; }
@keyframes bnb-wiggle {
  0%, 100% { transform: rotate(var(--r, 0deg)); }
  30% { transform: rotate(calc(var(--r, 0deg) - 9deg)) translateY(-2px); }
  65% { transform: rotate(calc(var(--r, 0deg) + 7deg)); }
}
/* tucked behind a card: only its top shows above the card's edge */
.bnb-peek { position: absolute; bottom: 20px; width: 30px; height: 20px; overflow: hidden; z-index: 0; }
.bnb-peek .bnb-egg { left: 2px; top: 1px; }
.bnb-peek .bnb-egg:hover, .bnb-peek .bnb-egg:focus-visible { animation: none; transform: rotate(var(--r, 0deg)) translateY(-4px); }

/* the notebook itself, in this notebook's colours (set in JS) */
.bear-notebook-page { position: relative; }
.bnb-margin-art { position: absolute; inset: 0; pointer-events: none; }
.bnb-doodle { position: absolute; width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.bnb-doodle .f, .bnb-doodle g.f * { fill: currentColor; fill-opacity: 0.16; }
.bnb-doodle-1 { top: 18px; right: 22px; transform: rotate(8deg); }
.bnb-doodle-2 { bottom: 18px; left: 18px; transform: rotate(-10deg); }
.bnb-doodle-3 { bottom: 22px; right: 26px; width: 52px; height: 52px; transform: rotate(14deg); }
.bnb-cover-big { width: 64px; height: 78px; display: block; filter: drop-shadow(0 4px 6px rgba(61, 56, 50, 0.2)); }
.bnb-cover-sub { margin: -6px 0 0; font-size: 14px; font-weight: 600; color: #6B645B; }
@media (max-width: 600px) {
  .bnb-doodle { width: 40px; height: 40px; opacity: 0.4; }
  .bnb-doodle-3 { width: 34px; height: 34px; }
}

/* overlays: "found" and the collection */
.bnb-overlay {
  position: fixed; inset: 0; z-index: 850; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(30, 28, 24, 0.45); animation: bnb-fade 0.2s ease;
}
@keyframes bnb-fade { from { opacity: 0; } to { opacity: 1; } }
.bnb-card {
  position: relative; width: min(100%, 520px); max-height: calc(100vh - 32px); overflow-y: auto;
  background: #FDFCFB; border-radius: 24px; padding: 28px 26px 22px; text-align: center;
  box-shadow: 0 24px 60px rgba(30, 28, 24, 0.3);
}
.bnb-fly { width: 84px; height: 102px; margin: 0 auto 10px; animation: bnb-pop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.25); will-change: transform; }
.bnb-fly-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 10px rgba(61, 56, 50, 0.25)); }
.bnb-fly.is-flying { transition: transform 0.75s cubic-bezier(0.55, 0, 0.3, 1), opacity 0.2s ease 0.6s; }
.bnb-fly.is-landed { opacity: 0; }
@keyframes bnb-pop { from { transform: scale(0.2) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
.bnb-found-title { margin: 0 0 4px; font-size: 22px; font-weight: 800; color: #1E1E1C; line-height: 1.25; }
.bnb-found-name { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: #6B645B; }
.bnb-note { margin: 0 auto 16px; max-width: 400px; padding: 12px 16px; border-left: 4px solid var(--nb, #5D7052); border-radius: 12px; background: #F6F2EA; text-align: left; }
.bnb-note p { margin: 0 0 4px; font-size: 15.5px; line-height: 1.45; color: #2B2925; }
.bnb-note footer { font-size: 13px; font-weight: 700; color: #6B645B; }
.bnb-shelf { display: flex; justify-content: center; gap: 6px; margin: 4px 0 8px; flex-wrap: wrap; }
.bnb-slot { width: 24px; height: 30px; border-radius: 5px; border: 1.5px dashed #CFC5B4; display: inline-flex; align-items: center; justify-content: center; }
.bnb-slot.is-found { border-color: transparent; }
.bnb-slot-svg { width: 24px; height: 30px; display: block; }
.bnb-slot.is-new.is-found { animation: bnb-land 0.4s ease; }
@keyframes bnb-land { 0% { transform: scale(1.35); } 100% { transform: none; } }
.bnb-count { margin: 0 0 14px; font-size: 14px; color: #5F584E; }
.bnb-count-num { display: inline-block; font-weight: 800; color: #2F5E43; font-size: 16px; }
.bnb-count-num.is-bump { animation: bnb-land 0.4s ease; }
.bnb-all { margin: -4px 0 14px; font-weight: 700; color: #2F5E43; }
.bnb-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bnb-actions .btn-primary { width: auto; min-width: 220px; }

.bnb-col-card { width: min(100%, 640px); text-align: left; }
.bnb-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #F1EDE6; color: #3D3832; font-size: 22px; line-height: 1; cursor: pointer; }
.bnb-close:hover { background: #E6DFD4; }
.bnb-col-title { margin: 0 44px 4px 0; font-size: 22px; font-weight: 800; color: #1E1E1C; }
.bnb-col-sub { margin: 0 0 8px; font-size: 14px; color: #5F584E; }
.bnb-progress { height: 8px; border-radius: 999px; background: #EDE7DC; overflow: hidden; margin: 0 0 16px; }
.bnb-progress span { display: block; height: 100%; border-radius: 999px; background: #2F5E43; }
.bnb-col-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.bnb-col-item { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: #F7F4EE; border: 1px solid #ECE5D9; overflow: hidden; }
.bnb-col-item.is-missing { background: transparent; border-style: dashed; border-color: #D8CFC0; }
.bnb-col-cover { flex: none; width: 34px; height: 42px; }
.bnb-col-svg { width: 34px; height: 42px; display: block; }
.bnb-col-unknown { display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; border: 1.5px dashed #CFC5B4; color: #A39A8C; font-weight: 800; font-size: 18px; }
.bnb-col-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.bnb-col-name { margin: 0 0 3px; font-size: 15px; font-weight: 700; color: #1E1E1C; }
.bnb-col-note { margin: 0 0 4px; font-size: 14px; line-height: 1.45; color: #3D3832; }
.bnb-col-date, .bnb-col-hint { margin: 0; font-size: 13px; color: #6B645B; }
.bnb-col-art { position: absolute; right: -6px; bottom: -10px; width: 64px; height: 64px; opacity: 0.6; pointer-events: none; }
.bnb-col-art .bnb-doodle { position: static; width: 64px; height: 64px; }

/* Achievements */
.bnb-ach-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px 20px; margin: 0 0 32px; border-radius: 20px; background: #FDFCFB; box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 8px 24px rgba(61, 56, 50, 0.07); }
.bnb-ach-medal { flex: none; }
.bnb-ach-text { flex: 1 1 260px; min-width: 0; }
.bnb-ach-name { margin: 0 0 2px; font-size: 17px; font-weight: 700; color: #1E1E1C; }
.bnb-ach-desc { margin: 0 0 8px; font-size: 14px; color: #5F584E; }
.bnb-ach-card .bnb-shelf { justify-content: flex-start; }
.bnb-ach-count { margin: 0; font-size: 13.5px; font-weight: 600; color: #2F5E43; }
.bnb-ach-see { flex: none; }
@media (max-width: 600px) { .bnb-ach-see { width: 100%; } .bnb-card { padding: 24px 18px 18px; } }
.bnb-fly.is-back { animation: bnb-back 0.4s ease; }
@keyframes bnb-back { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }

/* ============================================================
   v45: Reviews page + "Send private feedback"
   ============================================================ */
.rv-page { max-width: 820px; }
.rv-eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #2F5E43; }
.rv-title { margin: 0 0 22px; font-size: 34px; font-weight: 800; color: #1E1E1C; line-height: 1.15; }
.rv-summary { display: flex; align-items: center; gap: 18px; padding: 20px 24px; margin: 0 0 22px; border-radius: 22px; background: #FDFCFB; box-shadow: 0 1px 2px rgba(61, 56, 50, 0.04), 0 8px 24px rgba(61, 56, 50, 0.07); }
.rv-average { font-size: 54px; font-weight: 800; line-height: 1; color: #1E1E1C; min-width: 1.6ch; }
.rv-summary-right { display: flex; flex-direction: column; gap: 6px; }
.rv-count { font-size: 14.5px; color: #5F584E; }
.rv-star-meter { position: relative; display: inline-block; line-height: 0; }
.rv-star-row { display: inline-flex; gap: 4px; }
.rv-star-row svg { width: 22px; height: 22px; }
.rv-star-meter.is-big .rv-star-row svg { width: 28px; height: 28px; }
.rv-star-row.is-empty svg { fill: #E6DFD2; }
.rv-star-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; }
.rv-star-row.is-full svg { fill: #E8B71C; }
.rv-quotes { display: grid; gap: 14px; margin: 0 0 22px; }
.rv-quote { position: relative; margin: 0; padding: 22px 24px 18px 64px; border-radius: 20px; background: #F6F2EA; border: 1px solid #ECE4D6; }
.rv-quote-mark { position: absolute; left: 22px; top: 24px; width: 26px; height: 20px; fill: #2F5E43; opacity: 0.5; }
.rv-quote blockquote { margin: 0 0 8px; font-size: 17px; line-height: 1.55; color: #2B2925; }
.rv-quote figcaption { font-size: 13.5px; font-weight: 600; color: #6B645B; }
.rv-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 24px; border-radius: 22px; background: #E9F1E2; }
.rv-cta-text { flex: 1 1 280px; }
.rv-cta-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: #1E1E1C; }
.rv-cta-sub { margin: 0; font-size: 14.5px; color: #4A453E; line-height: 1.45; }
.rv-cta-btn { width: auto; flex: none; }
@media (max-width: 600px) { .rv-title { font-size: 28px; } .rv-average { font-size: 44px; } .rv-summary, .rv-cta { padding: 16px 18px; } .rv-quote { padding: 18px 18px 16px 52px; } .rv-quote-mark { left: 16px; } .rv-cta-btn { width: 100%; } }

.fb-overlay { position: fixed; inset: 0; z-index: 860; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(30, 28, 24, 0.45); }
.fb-overlay[hidden] { display: none; }
body.fb-open { overflow: hidden; }
.fb-dialog { width: min(100%, 560px); max-height: calc(100vh - 32px); overflow-y: auto; background: #FDFCFB; border-radius: 24px; padding: 22px 24px 20px; box-shadow: 0 24px 60px rgba(30, 28, 24, 0.3); }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.fb-title { margin: 0; font-size: 21px; font-weight: 800; color: #1E1E1C; }
.fb-close { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: #F1EDE6; color: #3D3832; font-size: 22px; line-height: 1; cursor: pointer; }
.fb-close:hover { background: #E6DFD4; }
.fb-label { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: #3D3832; }
.fb-optional { font-weight: 500; color: #8A8276; }
.fb-stars { display: flex; align-items: center; gap: 4px; margin: 0 0 16px; }
.fb-star { width: 40px; height: 40px; padding: 4px; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.fb-star svg { width: 100%; height: 100%; fill: #E6DFD2; transition: fill 0.12s ease, transform 0.12s ease; }
.fb-star.is-on svg { fill: #E8B71C; }
.fb-star:hover svg { transform: scale(1.1); }
.fb-star:focus-visible { outline: 2px solid #2F5E43; outline-offset: 1px; }
.fb-stars-note { margin-left: 8px; font-size: 14px; font-weight: 600; color: #6B645B; }
.fb-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.fb-kind { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; min-height: 92px; padding: 12px 8px; border: 1.5px solid #E6DCCB; border-radius: 16px; background: #FDFCFB; color: #1E1E1C; font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.25; text-align: center; cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease; }
.fb-kind svg { width: 26px; height: 26px; color: #2F5E43; flex: none; }
.fb-kind:hover { border-color: #2F5E43; background: #F1F6EC; }
.fb-kind.is-on { border-color: #2F5E43; background: #E4EEDB; box-shadow: inset 0 0 0 1px #2F5E43; }
.fb-kind:focus-visible { outline: 2px solid #2F5E43; outline-offset: 2px; }
.fb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fb-message { width: 100%; min-height: 110px; margin: 0 0 10px; font-size: 15px; line-height: 1.5; resize: vertical; }
.fb-shot { margin: 0 0 8px; border: 1.5px dashed #D8CFC0; border-radius: 16px; transition: border-color 0.12s ease, background 0.12s ease; }
.fb-shot.is-drop { border-color: #2F5E43; background: #F1F6EC; }
.fb-shot-add { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: none; color: #1E1E1C; font: inherit; text-align: left; cursor: pointer; border-radius: 16px; }
.fb-shot-add[hidden] { display: none; }
.fb-shot-add:hover { background: #F7F4EE; }
.fb-shot-add svg { width: 26px; height: 26px; color: #2F5E43; flex: none; }
.fb-shot-add strong { display: block; font-size: 14.5px; }
.fb-shot-hint { display: block; font-size: 13px; color: #6B645B; }
.fb-shot-preview { position: relative; padding: 10px; }
.fb-shot-preview[hidden] { display: none; }
.fb-shot-preview img { display: block; max-width: 100%; max-height: 180px; margin: 0 auto; border-radius: 10px; }
.fb-shot-remove { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(30, 28, 24, 0.72); color: #FFFFFF; font-size: 18px; line-height: 1; cursor: pointer; }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb-status { min-height: 0; margin: 4px 0 0; font-size: 14px; color: #2F5E43; }
.fb-status:empty { display: none; }
.fb-status.is-error { color: #A8432A; }
.fb-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid #EEE7DB; }
.fb-private { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; color: #6B645B; }
.fb-private svg { width: 16px; height: 16px; flex: none; }
.fb-actions { display: flex; gap: 8px; margin-left: auto; }
.fb-actions .btn-primary, .fb-actions .btn-secondary { width: auto; }
@media (max-width: 600px) {
  .fb-dialog { padding: 18px 16px 16px; border-radius: 20px; }
  .fb-kinds { gap: 6px; }
  .fb-kind { min-height: 86px; padding: 10px 4px; font-size: 12.5px; }
  .fb-star { width: 36px; height: 36px; }
  .fb-actions { width: 100%; }
  .fb-actions > * { flex: 1; }
}
@media (max-width: 600px) {
  body.is-web-app .nav-links { gap: 4px 10px; }
  body.is-web-app .nav-links a[data-nav="screen-reviews"] .nav-icon { display: inline-block; width: 19px; height: 19px; margin: 0; }
  body.is-web-app .nav-links a[data-nav="screen-reviews"] .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .fb-actions > * { white-space: nowrap; padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 600px) {
  body.is-web-app .app-nav { padding-left: 12px; padding-right: 12px; }
  body.is-web-app .nav-links { gap: 4px 8px; }
  body.is-web-app .nav-links a { padding: 7px 3px; font-size: 12.5px; }
}

/* v46: Reviews call to action that stands out; landing tip; small Time stats link */
.rv-cta { background: var(--mc-deep); padding: 26px 28px; gap: 20px; box-shadow: 0 14px 34px rgba(47, 94, 67, 0.28); }
.rv-cta-title { font-size: 22px; font-weight: 800; line-height: 1.3; color: var(--mc-paper); margin: 0 0 8px; }
.rv-cta-sub { font-size: 16px; line-height: 1.55; color: var(--mc-mint); }
.rv-cta .rv-cta-btn { background: var(--mc-paper); color: var(--mc-deep); font-weight: 800; padding: 14px 24px; border: 0; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.rv-cta .rv-cta-btn:hover { background: var(--mc-mint); color: var(--mc-deep); }
@media (max-width: 600px) { .rv-cta { padding: 20px 18px; } .rv-cta-title { font-size: 19px; } .rv-cta-sub { font-size: 15px; } }
.settings-tip { max-width: 560px; margin: 0 auto 10px; font-size: 14px; line-height: 1.5; color: #4A453E; text-align: center; }
.settings-tip a { color: #2F5E43; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.time-stats-link.is-small { width: auto; max-width: 420px; margin: 8px 0 32px; padding: 10px 14px; font-size: 14px; gap: 10px; }
.time-stats-link.is-small strong { font-size: 14.5px; }
.toggle-switch[disabled] { opacity: 0.45; cursor: not-allowed; }

/* v47: Podcast listening view, alarm, limit */
body.podcast-audio .sound-only-cover { display: flex; background-size: cover; background-position: center; }
body.podcast-audio .sound-only-art { display: none; }
body.podcast-audio .video-player-wrap .video-progress-track { opacity: 1; pointer-events: auto; }
.podcast-elapsed { display: none; }
body.podcast-audio .podcast-elapsed { display: block; position: absolute; left: 16px; bottom: 22px; z-index: 6; padding: 4px 10px; border-radius: 999px; background: rgba(20, 20, 18, 0.65); color: #FDFCFB; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; pointer-events: none; }
.podcast-hero-start { width: auto; margin: 6px 0 10px; padding: 13px 26px; font-size: 16px; }
.podcast-alarm-row { gap: 10px; }
.podcast-alarm-select { width: auto; padding: 6px 10px; }
.podcast-limit-note { margin: 4px 0 6px; font-size: 13.5px; font-weight: 600; color: #2F5E43; }
.toggle-switch[disabled] { opacity: 0.45; cursor: not-allowed; }
.podcast-alarm-banner { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 870; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: #2F5E43; color: #FDFCFB; font-weight: 700; box-shadow: 0 12px 30px rgba(30, 28, 24, 0.3); }
.podcast-alarm-banner[hidden] { display: none; }

.settings-row-subsub { padding-left: 44px; }

/* v49: Google account card */
.account-card { margin: 16px 0 20px; padding: 18px 20px; border-radius: 20px; background: #E9F1E2; border: 1px solid #D3E3C6; }
.account-card-title { margin: 0 0 4px; font-size: 16px; }
.account-card .field-hint { display: block; margin: 0 0 12px; }
.account-card .account-signin { width: auto; }
.account-card-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; }
.account-dot { width: 10px; height: 10px; border-radius: 50%; background: #2F5E43; }
.account-sync-row { background: transparent; padding: 0; margin: 0 0 8px; }
.account-signout { padding-left: 0; }
.profile-row[hidden], .settings-row[hidden] { display: none !important; }

/* v50: draggable session block, schedule tip, Start never covered */
.plan-drag { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0 0 12px; }
.pd-col { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-left: 64px; }
.pd-now, .pd-finish { font-size: 13px; color: #5F584E; font-variant-numeric: tabular-nums; }
.pd-now strong, .pd-finish strong { font-size: 20px; color: #1E1E1C; margin-right: 4px; }
.pd-now { margin-left: -64px; }
.pd-finish { margin-left: -64px; }
.pd-block { position: relative; width: min(320px, 70vw); border-radius: 14px; background: #2F5E43; color: #FDFCFB; display: flex; align-items: flex-start; padding: 8px 14px; box-sizing: border-box; cursor: ns-resize; touch-action: none; user-select: none; transition: height 0.08s ease; box-shadow: 0 6px 16px rgba(47, 94, 67, 0.25); }
.pd-block.is-dragging { transition: none; box-shadow: 0 10px 24px rgba(47, 94, 67, 0.35); }
.pd-block:focus-visible { outline: 3px solid #E8B71C; outline-offset: 2px; }
.pd-len { font-weight: 800; font-size: 15px; }
.pd-handle { position: absolute; left: 50%; bottom: 5px; width: 44px; height: 5px; margin-left: -22px; border-radius: 999px; background: rgba(253, 252, 251, 0.7); }
.pd-hint { margin: 0; font-size: 13px; color: #6B645B; }
.sc-tip { margin: 4px 0 0; font-size: 13.5px; color: #5F584E; }
.study-block:hover .study-block-tools, .study-block:focus-within .study-block-tools { display: none; }
#screen-schedule .plan-line { display: none !important; }

/* v51: covers YouTube's end-screen suggestions (last 20 s) */
.end-guard { position: absolute; inset: 0; z-index: 1; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background-size: cover; background-position: center; color: #FDFCFB; text-align: center; pointer-events: none; }
.end-guard.active { display: flex; }
.end-guard-title { margin: 0; font-size: 20px; font-weight: 800; }
.end-guard-sub { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; opacity: 0.9; }

/* v52: Copy script → extension step */
.sh-dialog { max-width: 520px; }
.sh-text { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: #3D3832; }
.sh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.sh-actions .btn-primary { width: auto; }
.sh-status { margin: 12px 0 0; font-size: 14px; color: #2F5E43; }
.sh-status:empty { display: none; }
#script-handoff[hidden] { display: none; }
.quality-hint { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: #F6F2EA; font-size: 13.5px; line-height: 1.45; color: #4A453E; } .quality-hint[hidden] { display: none; }
.sh-v2 { margin: -6px 0 14px; padding: 10px 12px; border-radius: 12px; background: #FFF6DC; color: #5A4A1E; font-size: 13.5px; line-height: 1.45; }

/* v58: "saved only in this browser" warning; Scheduled session in the top bar */
.save-warning { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 18px; padding: 16px 18px; border-radius: 18px; background: #FDF1EE; border: 1px solid #F3C9BF; }
.save-warning-icon { width: 30px; height: 30px; flex: none; margin-top: 2px; }
.save-warning-title { margin: 0 0 4px; font-size: 16px; font-weight: 800; color: #1E1E1C; }
.save-warning-body { margin: 0 0 12px; font-size: 14.5px; line-height: 1.5; color: #4A3A35; }
.save-warning-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.save-warning-actions .btn-primary { width: auto; }
@media (max-width: 600px) {
  body.is-web-app .nav-links a[data-nav="screen-study-calendar"] .nav-icon { display: inline-block; width: 19px; height: 19px; margin: 0; }
  body.is-web-app .nav-links a[data-nav="screen-study-calendar"] .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* v59: space between "Your schedule" and the season calendar */
#season-side .season-calendar { margin-top: 32px; }
#season-side .season-cal-head[hidden], #season-side .season-cal-today[hidden] { display: none; }
#screen-goal-2 .goal-display:empty { display: none; }


/* ============================================================
   v61: accessibility
   ============================================================ */
/* faint texts readable (WCAG AA 4.5:1 on the light background) */
.cal-dow, .study-hour-label, .study-page .study-hour-label { color: #6F675E; }
.field-hint { color: #625B53; }
.site-footer-copy { color: #6B645B; }
.more-ways-label { color: #5F584E; }

/* a clear focus ring for keyboard users, wherever none is set */
:where(a, button, input, select, textarea, summary, [tabindex], [role="button"]):focus-visible { outline: 3px solid #2F5E43; outline-offset: 2px; }
.screen [tabindex="-1"]:focus { outline: none; }

/* Skip to content: only visible when reached with Tab */
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 2000; padding: 10px 16px; border-radius: 12px; background: #2F5E43; color: #FDFCFB; font-weight: 700; text-decoration: none; transition: top 0.15s ease; }
.skip-link:focus { top: 12px; }

/* text size: everything scales together */
html.text-large body { zoom: 1.15; }
html.text-larger body { zoom: 1.3; }

/* higher contrast */
html.hc .field-hint, html.hc .page-subtitle, html.hc .flow-helper, html.hc .select-label, html.hc .card-desc, html.hc .privacy-note,
html.hc .breathe-caption, html.hc .podcast-sub, html.hc .achievements-subtitle, html.hc .cal-dow, html.hc .study-hour-label,
html.hc .mc-next-label, html.hc .mc-next-title, html.hc .series-edit-meta, html.hc .picker-meta, html.hc .podcast-card-meta,
html.hc .bnb-col-hint, html.hc .bnb-col-date, html.hc .rv-count, html.hc .site-footer-copy, html.hc .more-ways-label, html.hc .course-time-hint { color: #2B2925 !important; }
html.hc .text-input, html.hc .pill, html.hc .next-activity-tile, html.hc .fb-kind, html.hc .settings-row { border-color: #3D3832 !important; }
html.hc :where(a, button, input, select, textarea, [tabindex], [role="button"]):focus-visible { outline: 4px solid #1E1E1C; outline-offset: 2px; }
html.dark.hc .field-hint, html.dark.hc .page-subtitle, html.dark.hc .flow-helper, html.dark.hc .select-label, html.dark.hc .card-desc,
html.dark.hc .privacy-note, html.dark.hc .breathe-caption, html.dark.hc .podcast-sub, html.dark.hc .achievements-subtitle, html.dark.hc .cal-dow,
html.dark.hc .study-hour-label, html.dark.hc .mc-next-label, html.dark.hc .mc-next-title, html.dark.hc .series-edit-meta, html.dark.hc .picker-meta,
html.dark.hc .podcast-card-meta, html.dark.hc .bnb-col-hint, html.dark.hc .bnb-col-date, html.dark.hc .rv-count, html.dark.hc .site-footer-copy,
html.dark.hc .more-ways-label, html.dark.hc .course-time-hint { color: #EDE8E2 !important; }
html.dark.hc .text-input, html.dark.hc .pill, html.dark.hc .next-activity-tile, html.dark.hc .fb-kind, html.dark.hc .settings-row { border-color: #CFC8BF !important; }
html.dark.hc :where(a, button, input, select, textarea, [tabindex], [role="button"]):focus-visible { outline-color: #FDFCFB; }

/* reduce motion (the switch, or the computer's own setting) */
html.rm *, html.rm *::before, html.rm *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
html.rm .bear-walker { animation: none !important; }
/* v61: calendar days and small hints readable too */
.cal-day { color: #6F675E; }
.courses-channels-hint, .section-label { color: #6B645B; }
html.dark .mc-pill.active, html.dark .courses-tab-btn.active { color: #FDFCFB; }
html.dark #screen-courses .mc-pills .mc-pill.active { color: var(--mc-paper); }
.sh-refresh { width: auto; margin-top: 8px; }

/* v64: season badge at the end of the progress bar; season badges; course badges grouped */
.mc-season-medal { flex: none; display: inline-flex; margin-left: 10px; }
.mc-season-medal .v30-badge { transform: scale(0.62); transform-origin: center; margin: -14px -10px; }
.season-medal .v30-badge-emoji { letter-spacing: -2px; }
.season-badge-card { cursor: default; }
.season-badge-courses { margin: 8px 0 0; padding: 0; list-style: none; text-align: left; font-size: 13.5px; line-height: 1.5; color: #3D3832; }
.season-badge-courses[hidden] { display: none; }
.badge-view-tabs { display: inline-flex; gap: 6px; margin: 0 0 14px; }
.badge-view-btn { padding: 6px 14px; border-radius: 999px; border: 1.5px solid #D8CFC0; background: transparent; color: #3D3832; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.badge-view-btn.is-on { background: #2F5E43; border-color: #2F5E43; color: #FDFCFB; }
#course-badges-grid.is-grouped { display: block; }
.badge-group-title { margin: 14px 0 8px; font-size: 15px; font-weight: 700; color: #3D3832; }
.badge-group-grid { margin-bottom: 8px; }
.season-medal .v30-badge-emoji { white-space: nowrap; font-size: 24px; letter-spacing: -2px; }

/* v66: course tasks */
.course-tasks { margin-top: 22px; }
.task-card { padding: 12px 14px; margin: 0 0 10px; border-radius: 16px; background: #FDFCFB; border: 1px solid #ECE5D9; }
.task-progress { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.task-progress-text { flex: none; font-size: 12.5px; font-weight: 700; color: #2F5E43; min-width: 72px; }
.task-progress-bar { flex: 1; height: 7px; border-radius: 999px; background: #EDE7DC; overflow: hidden; }
.task-progress-bar span { display: block; height: 100%; border-radius: 999px; background: #2F5E43; transition: width 0.25s ease; }
.task-row { display: flex; align-items: center; gap: 10px; }
.task-title { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; color: #1E1E1C; overflow-wrap: anywhere; }
.task-card.is-done > .task-row .task-title, .task-sub-row.is-done .task-title { text-decoration: line-through; color: #6B645B; }
.task-tick { flex: none; width: 26px; height: 26px; display: inline-grid; place-items: center; padding: 0; border: 2px solid #2F5E43; border-radius: 8px; background: #FDFCFB; color: #FDFCFB; cursor: pointer; }
.task-tick.is-done { background: #2F5E43; }
.task-tick svg { width: 16px; height: 16px; }
.task-icon-btn { flex: none; width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #6B645B; cursor: pointer; }
.task-icon-btn:hover { background: #F1EDE6; color: #1E1E1C; }
.task-icon-btn svg { width: 17px; height: 17px; }
.task-subs { margin: 8px 0 0 36px; display: flex; flex-direction: column; gap: 6px; }
.task-sub-row .task-title { font-size: 14px; font-weight: 500; }
.task-sub-row .task-tick { width: 22px; height: 22px; border-radius: 7px; }
.task-add-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.task-add-row .text-input { flex: 1; margin: 0; padding: 8px 12px; font-size: 14px; }
.task-add-row .btn-secondary { width: auto; white-space: nowrap; }
.task-add-row.is-sub .text-input { font-size: 13.5px; padding: 6px 10px; }
