/* Practice Board: a large modal of short activities built from the learner's memory.
 * Hidden unless the server enables it. Uses the companion theme tokens (--lc-*),
 * light and dark, and turns all motion off for prefers-reduced-motion.
 */
.pb-root {
  --pb-alex: #2563eb; --pb-alex-soft: #e6eeff;
  --pb-iris: #7c3aed; --pb-iris-soft: #f0e8ff;
  --pb-mia: #db2777; --pb-mia-soft: #fde8f2;
  --pb-good: #0e8a5e; --pb-good-soft: #ddf5ea;
  --pb-warn: #b45309; --pb-warn-soft: #fdf0db;
  --pb-accent: var(--pb-alex); --pb-accent-soft: var(--pb-alex-soft);
  --pb-surface: var(--lc-surface, #fff); --pb-sunk: var(--lc-surface-3, #f1f5f9); --pb-bg: var(--lc-surface-2, #f8fafc);
  --pb-line: var(--lc-line, #e2e8f0); --pb-ink: var(--lc-ink, #0f172a); --pb-muted: var(--lc-muted, #64748b);
  --pb-ease: var(--lc-ease, cubic-bezier(.2, .8, .2, 1)); --pb-spring: var(--lc-spring, cubic-bezier(.34, 1.56, .64, 1));
}
[data-theme="dark"] .pb-root {
  --pb-alex: #7ba3ff; --pb-alex-soft: #1b2852;
  --pb-iris: #b490ff; --pb-iris-soft: #291e4b;
  --pb-mia: #ff7db6; --pb-mia-soft: #3b1a2d;
  --pb-good: #4fd0a0; --pb-good-soft: #123a2d;
  --pb-warn: #f4b357; --pb-warn-soft: #3a2a12;
}
.pb-root[data-accent="iris"], .pb-root [data-accent="iris"] { --pb-accent: var(--pb-iris); --pb-accent-soft: var(--pb-iris-soft); }
.pb-root[data-accent="mia"], .pb-root [data-accent="mia"] { --pb-accent: var(--pb-mia); --pb-accent-soft: var(--pb-mia-soft); }
.pb-root[data-accent="alex"], .pb-root [data-accent="alex"] { --pb-accent: var(--pb-alex); --pb-accent-soft: var(--pb-alex-soft); }

/* ---------- Entry points ---------- */
#practice-side-tab {
  position: absolute; right: -12px; top: calc(50% + 92px); z-index: 200;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 9px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(160deg, #7c3aed, #db2777); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  box-shadow: -2px 0 12px rgba(124, 58, 237, .32); transition: transform .2s var(--lc-ease, ease), box-shadow .2s;
}
#practice-side-tab:hover { transform: translateX(-2px); box-shadow: -2px 0 18px rgba(124, 58, 237, .45); }
#practice-side-tab .material-icons { font-size: 21px; }
#practice-side-tab[hidden], #practice-mobile-btn[hidden], #acc-warmups[hidden] { display: none !important; }
.chat-journal-wrapper.notes-panel-open ~ #practice-side-tab { display: none; }
@media (max-width: 768px) { #practice-side-tab { display: none !important; } }

.pb-dash-card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center;
  margin: 0 0 16px; padding: 16px 18px; border-radius: 16px; border: 1px solid color-mix(in srgb, #7c3aed 35%, transparent);
  background: linear-gradient(120deg, color-mix(in srgb, #7c3aed 10%, var(--lc-surface, #fff)), color-mix(in srgb, #db2777 8%, var(--lc-surface, #fff)));
  color: var(--lc-ink, #0f172a);
}
.pb-dash-card .pb-dash-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #7c3aed; }
[data-theme="dark"] .pb-dash-card .pb-dash-eyebrow { color: #b490ff; }
.pb-dash-card b { display: block; font-size: 1rem; }
.pb-dash-card span.pb-dash-sub { font-size: .88rem; color: var(--lc-muted, #64748b); }
.pb-dash-card .pb-btn { grid-row: 1 / span 3; grid-column: 2; }
.pb-dash-card .pb-btn.primary, [data-theme="dark"] .pb-dash-card .pb-btn.primary { background: linear-gradient(135deg, #7c3aed, #db2777); border-color: transparent; color: #fff; }
@media (max-width: 560px) { .pb-dash-card { grid-template-columns: minmax(0, 1fr); } .pb-dash-card .pb-btn { grid-row: auto; grid-column: 1; justify-self: start; } }

/* ---------- Modal ---------- */
dialog.pb-root {
  width: min(1080px, 94vw); height: min(880px, 92vh); max-width: none; max-height: none; padding: 0; margin: auto;
  border: 1px solid var(--pb-line); border-radius: 22px; background: var(--pb-surface); color: var(--pb-ink);
  box-shadow: var(--lc-sh-3, 0 24px 60px -18px rgba(15, 23, 42, .32)); overflow: hidden; font-family: inherit;
}
dialog.pb-root[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr); animation: pb-modal-in .38s var(--pb-ease) both; }
dialog.pb-root::backdrop { background: rgba(10, 14, 35, .55); backdrop-filter: blur(3px); }
@media (max-width: 768px) { dialog.pb-root { width: 100vw; height: 100%; max-height: 100%; border-radius: 0; border: 0; } }

.pb-root * { box-sizing: border-box; }
.pb-root button { font: inherit; cursor: pointer; }
.pb-root button:focus-visible, .pb-root textarea:focus-visible { outline: 2px solid var(--pb-accent); outline-offset: 2px; }
.pb-root h1, .pb-root h2, .pb-root h3 { margin: 0; letter-spacing: -.015em; text-wrap: balance; }
.pb-root p { margin: 0; }

.pb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--pb-line); background: var(--pb-bg); }
.pb-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.pb-logo { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #7c3aed, #db2777); flex: none; position: relative; overflow: hidden; }
.pb-logo .material-icons { font-size: 19px; }
.pb-logo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%) no-repeat; background-size: 220% 100%; animation: pb-sheen 6s ease-in-out infinite; }
.pb-title b { font-size: 1.05rem; }
.pb-badge { font-size: 11px; font-weight: 700; color: #7c3aed; background: #f0e8ff; border-radius: 999px; padding: 2px 8px; }
[data-theme="dark"] .pb-badge { background: #291e4b; color: #b490ff; }
.pb-head-actions { display: flex; align-items: center; gap: 6px; }
.pb-icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--pb-line); background: var(--pb-surface); color: var(--pb-ink); display: grid; place-items: center; flex: none; transition: background .15s, transform .15s; }
.pb-icon-btn:hover { background: var(--pb-sunk); }
.pb-icon-btn .material-icons { font-size: 20px; }

.pb-notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 18px; font-size: .86rem; color: var(--pb-muted); background: var(--pb-sunk); border-bottom: 1px solid var(--pb-line); animation: pb-drop .35s var(--pb-ease) both; }
.pb-notice .material-icons { font-size: 18px; color: var(--pb-accent); }
.pb-notice:empty, .pb-notice[hidden] { display: none; }

.pb-main { overflow-y: auto; padding: 24px 28px 34px; display: grid; gap: 20px; align-content: start; min-width: 0; overscroll-behavior: contain; }
@media (max-width: 768px) { .pb-main { padding: 18px 16px 28px; } }
.pb-screen { display: grid; gap: 20px; align-content: start; min-width: 0; animation: pb-screen-in .42s var(--pb-ease) both; }
.pb-intro { display: grid; gap: 6px; }
.pb-intro h1 { font-size: 1.65rem; }
.pb-lead { color: var(--pb-muted); max-width: 62ch; }
.pb-crumb { display: flex; gap: 8px; align-items: center; color: var(--pb-muted); font-size: .88rem; flex-wrap: wrap; }
.pb-crumb button { border: 0; background: none; color: var(--pb-accent); font-weight: 700; padding: 0; }

/* Companion switch */
.pb-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--pb-sunk); border: 1px solid var(--pb-line); justify-self: start; }
.pb-switch button { border: 0; background: transparent; color: var(--pb-muted); font-weight: 700; font-size: .86rem; padding: 6px 14px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; transition: background .2s, color .2s; }
.pb-switch button[aria-pressed="true"] { background: var(--pb-surface); color: var(--pb-ink); box-shadow: var(--lc-sh-1, 0 1px 2px rgba(15, 23, 42, .06)); }
.pb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pb-accent); flex: none; }

/* Buttons */
.pb-btn { border: 1px solid var(--pb-line); background: var(--pb-surface); color: var(--pb-ink); font-weight: 700; padding: 9px 16px; border-radius: 11px; display: inline-flex; align-items: center; gap: 6px; transition: transform .15s var(--pb-ease), box-shadow .2s, background .2s; }
.pb-btn:hover:not([disabled]) { transform: translateY(-1px); box-shadow: var(--lc-sh-2, 0 6px 18px -6px rgba(15, 23, 42, .14)); }
.pb-btn:active:not([disabled]) { transform: translateY(0) scale(.98); }
.pb-btn.primary { background: var(--pb-accent); border-color: var(--pb-accent); color: #fff; }
[data-theme="dark"] .pb-btn.primary { color: #0b1020; }
.pb-btn.ghost { background: transparent; }
.pb-btn[disabled] { opacity: .45; cursor: not-allowed; }
.pb-btn .material-icons { font-size: 18px; }
.pb-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Tiles */
.pb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pb-tile { position: relative; border: 1px solid var(--pb-line); border-radius: 18px; padding: 18px; display: grid; gap: 12px; align-content: start; background: var(--pb-surface); min-width: 0; overflow: hidden;
  animation: pb-pop .5s var(--pb-spring) both; animation-delay: calc(var(--i, 0) * 90ms); transition: transform .25s var(--pb-ease), box-shadow .25s, border-color .25s; }
.pb-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--pb-accent); }
.pb-tile:hover { transform: translateY(-3px); box-shadow: var(--lc-sh-2, 0 6px 18px -6px rgba(15, 23, 42, .14)); border-color: color-mix(in srgb, var(--pb-accent) 45%, var(--pb-line)); }
.pb-who { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--pb-muted); font-weight: 600; }
.pb-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .85rem; flex: none; background: var(--pb-accent); }
[data-theme="dark"] .pb-av { color: #0b1020; }
.pb-tile h3 { font-size: 1.08rem; }
.pb-focus { font-size: .88rem; color: var(--pb-muted); }
.pb-stage { display: inline-flex; font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--pb-accent-soft); color: var(--pb-accent); justify-self: start; }
.pb-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pb-framework { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--pb-line); color: var(--pb-ink); background: var(--pb-surface); justify-self: start; }
.pb-framework .material-icons { font-size: 14px; color: var(--pb-accent); }
.pb-framework[hidden] { display: none; }
.pb-meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.pb-meter i { height: 6px; border-radius: 3px; background: var(--pb-line); position: relative; overflow: hidden; }
.pb-meter i.done::after { content: ""; position: absolute; inset: 0; background: var(--pb-good); transform-origin: left; animation: pb-fill .5s var(--pb-ease) both; animation-delay: calc(var(--k, 0) * 70ms + 200ms); }
.pb-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--pb-muted); }
.pb-why { border: 1px dashed var(--pb-line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; font-size: .88rem; color: var(--pb-muted); }
.pb-why b { color: var(--pb-ink); }
.pb-link { border: 0; background: none; color: var(--pb-accent); font-weight: 700; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* Loading */
.pb-loading { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 40px 10px; color: var(--pb-muted); }
.pb-orbs { display: flex; gap: 8px; }
.pb-orbs i { width: 12px; height: 12px; border-radius: 50%; background: var(--pb-accent); animation: pb-bounce 1s ease-in-out infinite; }
.pb-orbs i:nth-child(1) { background: var(--pb-mia); } .pb-orbs i:nth-child(2) { background: var(--pb-iris); animation-delay: .15s; } .pb-orbs i:nth-child(3) { background: var(--pb-alex); animation-delay: .3s; }
.pb-loading-msg { font-weight: 600; min-height: 1.5em; animation: pb-fade .4s ease both; }
.pb-skel { display: grid; gap: 10px; width: min(560px, 100%); }
.pb-skel i { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--pb-sunk) 25%, var(--pb-line) 50%, var(--pb-sunk) 75%); background-size: 200% 100%; animation: pb-shimmer 1.3s linear infinite; }
.pb-skel i:nth-child(2) { width: 82%; } .pb-skel i:nth-child(3) { width: 64%; }
.pb-empty { display: grid; gap: 10px; justify-items: start; padding: 22px; border-radius: 16px; background: var(--pb-sunk); max-width: 640px; }
.pb-empty .material-icons { font-size: 30px; color: var(--pb-accent); }

/* Path */
.pb-path { display: grid; gap: 10px; max-width: 680px; position: relative; }
.pb-step { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--pb-line); border-radius: 16px; background: var(--pb-surface);
  animation: pb-slide .45s var(--pb-ease) both; animation-delay: calc(var(--i, 0) * 70ms); transition: border-color .2s, box-shadow .2s; }
.pb-step .pb-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--pb-sunk); color: var(--pb-muted); }
.pb-step.done .pb-num { background: var(--pb-good); color: #fff; animation: pb-check .5s var(--pb-spring) both; animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
.pb-step.next { border-color: var(--pb-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pb-accent) 16%, transparent); }
.pb-step.next .pb-num { background: var(--pb-accent); color: #fff; animation: pb-pulse 2.2s ease-in-out infinite; }
.pb-step.later { opacity: .62; }
.pb-step b { display: block; }
.pb-sub { font-size: .85rem; color: var(--pb-muted); }

/* Activity */
.pb-prog { display: flex; gap: 10px; align-items: center; font-size: .82rem; color: var(--pb-muted); font-weight: 700; }
.pb-bar { flex: 1; height: 7px; background: var(--pb-line); border-radius: 4px; overflow: hidden; max-width: 280px; }
.pb-bar i { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--pb-accent), color-mix(in srgb, var(--pb-accent) 60%, #fff)); border-radius: 4px; animation: pb-grow .7s var(--pb-ease) both; }
.pb-card { border: 1px solid var(--pb-line); border-radius: 18px; padding: 18px; display: grid; gap: 14px; background: var(--pb-surface); min-width: 0; max-width: 780px; overflow-wrap: anywhere; animation: pb-rise .4s var(--pb-ease) both; }
.pb-card > p:first-child { color: var(--pb-muted); }

.pb-sortrow { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 10px; align-items: center; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--pb-line); background: var(--pb-surface);
  animation: pb-slide .4s var(--pb-ease) both; animation-delay: calc(var(--i, 0) * 60ms); transition: background .25s, border-color .25s; }
.pb-sortrow.ok { background: var(--pb-good-soft); border-color: var(--pb-good); animation: pb-glow .6s ease both; }
.pb-sortrow.no { background: var(--pb-warn-soft); border-color: var(--pb-warn); animation: pb-nudge .45s ease both; }
.pb-reason { grid-column: 1 / -1; font-size: .86rem; color: var(--pb-ink); animation: pb-fade .3s ease both; }
.pb-pair { display: flex; gap: 6px; flex-wrap: wrap; }
.pb-sortrow > span { min-width: 0; overflow-wrap: anywhere; }
.pb-sortrow > .pb-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
.pb-sortrow .pb-chip { min-width: 0; max-width: 100%; min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 360px) { .pb-sortrow > .pb-pair { grid-template-columns: minmax(0, 1fr); } }
.pb-chip { border: 1px solid var(--pb-line); background: var(--pb-sunk); color: var(--pb-ink); border-radius: 9px; padding: 6px 11px; font-weight: 700; font-size: .82rem; transition: background .15s, transform .15s; }
.pb-chip:hover { transform: translateY(-1px); }
.pb-chip.sel { background: var(--pb-ink); color: var(--pb-surface); border-color: var(--pb-ink); }

.pb-opts { display: grid; gap: 8px; }
.pb-opt { text-align: left; border: 1px solid var(--pb-line); background: var(--pb-surface); color: var(--pb-ink); border-radius: 12px; padding: 12px 14px; font-weight: 500;
  animation: pb-slide .35s var(--pb-ease) both; animation-delay: calc(var(--i, 0) * 60ms); transition: border-color .15s, background .2s, transform .15s; }
.pb-opt:hover:not([disabled]) { border-color: var(--pb-accent); transform: translateX(3px); }
.pb-opt.best { border-color: var(--pb-good); background: var(--pb-good-soft); }
.pb-opt.other { border-color: var(--pb-warn); background: var(--pb-warn-soft); }
.pb-opt[disabled] { cursor: default; }
.pb-q { display: grid; gap: 8px; }
.pb-q + .pb-q { padding-top: 14px; border-top: 1px solid var(--pb-line); }

.pb-field { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.pb-field small { font-weight: 500; color: var(--pb-muted); }
.pb-root textarea { font: inherit; width: 100%; min-height: 72px; resize: vertical; border: 1px solid var(--pb-line); border-radius: 12px; padding: 10px 12px; background: var(--pb-bg); color: var(--pb-ink); transition: border-color .2s, box-shadow .2s; }
.pb-root textarea:focus { border-color: var(--pb-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pb-accent) 18%, transparent); outline: none; }
.pb-count { font-size: .78rem; color: var(--pb-muted); justify-self: end; font-weight: 500; }
.pb-hint { font-size: .88rem; padding: 9px 12px; border-radius: 10px; animation: pb-fade .3s ease both; }
.pb-hint.ok { background: var(--pb-good-soft); color: var(--pb-good); }
.pb-hint.tip { background: var(--pb-warn-soft); color: var(--pb-warn); }
.pb-model { border-left: 4px solid var(--pb-accent); background: var(--pb-accent-soft); border-radius: 0 12px 12px 0; padding: 12px 14px; font-size: .95rem; }
.pb-model small { display: block; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pb-accent); margin-bottom: 4px; }

.pb-marked { line-height: 2; font-size: 1rem; }
.pb-marked span { opacity: 0; animation: pb-fade .35s ease forwards; animation-delay: calc(var(--i, 0) * 120ms); }
.pb-marked del { background: var(--pb-warn-soft); color: var(--pb-warn); padding: 1px 3px; border-radius: 4px; }
.pb-marked ins { background: var(--pb-good-soft); color: var(--pb-good); text-decoration: none; padding: 1px 3px; border-radius: 4px; font-weight: 700; }
.pb-reasons { display: grid; gap: 6px; font-size: .9rem; }
.pb-reasons div { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; animation: pb-slide .35s var(--pb-ease) both; animation-delay: calc(var(--i, 0) * 90ms + 300ms); }
.pb-reasons i { width: 10px; height: 10px; border-radius: 3px; margin-top: 6px; background: var(--pb-good); }
.pb-reasons i.del { background: var(--pb-warn); }

/* Scenario */
.pb-scene { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 14px; align-items: start; }
.pb-char { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: #fff; background: var(--pb-iris); transition: background .5s, transform .5s var(--pb-spring); position: relative; }
.pb-char::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; color: var(--pb-iris); }
.pb-char.calm { background: var(--pb-good); transform: scale(1.04); }
.pb-char.tense { background: var(--pb-warn); animation: pb-nudge .5s ease; }
.pb-bubble { background: var(--pb-sunk); border-radius: 4px 16px 16px 16px; padding: 12px 14px; font-size: 1rem; animation: pb-bubble .45s var(--pb-spring) both; }
.pb-typing { display: inline-flex; gap: 4px; padding: 14px 16px; background: var(--pb-sunk); border-radius: 4px 16px 16px 16px; }
.pb-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--pb-muted); animation: pb-bounce 1s ease-in-out infinite; }
.pb-typing i:nth-child(2) { animation-delay: .15s; } .pb-typing i:nth-child(3) { animation-delay: .3s; }
.pb-mood { font-size: .82rem; color: var(--pb-muted); font-weight: 700; margin-top: 6px; }
.pb-moments { display: flex; gap: 6px; }
.pb-moments i { width: 26px; height: 6px; border-radius: 3px; background: var(--pb-line); transition: background .3s; }
.pb-moments i.on { background: var(--pb-accent); }

/* Feedback box */
.pb-fb { border-radius: 18px; padding: 16px 18px; background: var(--pb-accent-soft); display: grid; gap: 8px; max-width: 780px; animation: pb-pop .5s var(--pb-spring) both; }
.pb-fb .pb-fb-title { font-weight: 800; font-size: 1.02rem; display: flex; gap: 8px; align-items: center; }
.pb-fb .pb-fb-title .material-icons { color: var(--pb-accent); }
.pb-line { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 6px; font-size: .94rem; }
.pb-line .material-icons { font-size: 19px; color: var(--pb-accent); }
.pb-upnext { font-size: .9rem; color: var(--pb-muted); border-top: 1px solid color-mix(in srgb, var(--pb-accent) 25%, transparent); padding-top: 8px; }
.pb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pb-rcard { text-align: left; border: 1px solid var(--pb-line); background: var(--pb-surface); color: var(--pb-ink); border-radius: 14px; padding: 14px; font-weight: 500;
  animation: pb-pop .45s var(--pb-spring) both; animation-delay: calc(var(--i, 0) * 60ms); transition: border-color .2s, background .2s, transform .2s var(--pb-ease); }
.pb-rcard:hover { transform: translateY(-2px); border-color: var(--pb-accent); }
.pb-rcard.sel { background: var(--pb-accent-soft); border-color: var(--pb-accent); }
.pb-questions { display: grid; gap: 8px; }
.pb-question { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font-style: italic; color: var(--pb-ink); animation: pb-slide .35s var(--pb-ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.pb-question[hidden] { display: none; }
.pb-question .material-icons { font-size: 18px; color: var(--pb-accent); font-style: normal; }
.pb-view > span { display: inline-flex; align-items: center; gap: 4px; }
.pb-view .material-icons { font-size: 18px; color: var(--pb-accent); }
.pb-scale { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--pb-line); animation: pb-slide .35s var(--pb-ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.pb-scale input[type="range"] { width: 100%; accent-color: var(--pb-accent); }
.pb-scale-value { font-size: 1.3rem; color: var(--pb-accent); min-width: 2ch; text-align: right; }
.pb-mirror { font-size: 1rem; border-left: 4px solid var(--pb-accent); padding-left: 12px; }
.pb-own { display: grid; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--pb-line); animation: pb-rise .35s var(--pb-ease) both; }
.pb-own-fb { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--pb-accent-soft); animation: pb-pop .4s var(--pb-spring) both; }
.pb-own-fb .pb-line .material-icons { color: var(--pb-accent); font-size: 18px; }
.pb-real { border-color: color-mix(in srgb, var(--pb-accent) 40%, var(--pb-line)); }
.pb-inline { grid-template-columns: 56px minmax(0, 1fr); align-items: center; }
.pb-inline textarea { min-height: 42px; }
.pb-support { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 16px 18px; border-radius: 14px; background: var(--pb-sunk); border: 1px solid var(--pb-line); max-width: 780px; animation: pb-rise .35s var(--pb-ease) both; }
.pb-support .material-icons { color: var(--pb-mia); }
.pb-support p { color: var(--pb-muted); margin-top: 4px; }
.pb-error { display: grid; gap: 10px; padding: 16px 18px; border-radius: 14px; background: var(--pb-warn-soft); color: var(--pb-warn); max-width: 640px; }

/* Summary */
.pb-hero { position: relative; display: grid; gap: 6px; padding: 22px; border-radius: 20px; overflow: hidden; background: linear-gradient(120deg, var(--pb-accent-soft), var(--pb-sunk)); }
.pb-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pb-confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; left: var(--x); background: var(--c); opacity: 0; animation: pb-confetti 1.8s var(--pb-ease) forwards; animation-delay: var(--d); }
.pb-sum { display: grid; gap: 0; max-width: 780px; }
.pb-sum .pb-r { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--pb-line); font-size: .94rem; animation: pb-slide .35s var(--pb-ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.pb-ck { width: 24px; height: 24px; border-radius: 50%; background: var(--pb-good); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 800; }
.pb-ck.skip { background: var(--pb-line); color: var(--pb-muted); }
.pb-best { background: var(--pb-accent-soft); border-radius: 14px; padding: 14px 16px; font-size: 1rem; max-width: 780px; animation: pb-pop .5s var(--pb-spring) both .35s; }
.pb-best small { display: block; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pb-accent); margin-bottom: 4px; }
.pb-sugg { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.pb-sugg > * { border: 1px solid var(--pb-line); border-radius: 14px; padding: 14px; display: grid; gap: 4px; font-size: .88rem; color: var(--pb-muted); background: var(--pb-surface); text-align: left; animation: pb-pop .45s var(--pb-spring) both; animation-delay: calc(var(--i, 0) * 90ms + 400ms); }
.pb-sugg button:hover { border-color: var(--pb-accent); }
.pb-sugg b { color: var(--pb-ink); font-size: .96rem; }

/* Disclaimer */
.pb-disclaimer { display: grid; gap: 10px; padding: 18px; border-radius: 16px; border: 1px solid var(--pb-line); background: var(--pb-bg); max-width: 720px; font-size: .92rem; color: var(--pb-muted); animation: pb-rise .4s var(--pb-ease) both; }
.pb-disclaimer b { color: var(--pb-ink); font-size: 1rem; }

/* ---------- Motion ---------- */
@keyframes pb-modal-in { from { opacity: 0; transform: translateY(18px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes pb-screen-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes pb-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pb-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes pb-pop { 0% { opacity: 0; transform: translateY(14px) scale(.96); } 70% { transform: translateY(-2px) scale(1.01); } 100% { opacity: 1; transform: none; } }
@keyframes pb-slide { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes pb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pb-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pb-grow { from { width: 0; } to { width: var(--w, 0%); } }
@keyframes pb-check { 0% { transform: scale(.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes pb-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pb-accent) 45%, transparent); } 50% { box-shadow: 0 0 0 9px transparent; } }
@keyframes pb-glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pb-good) 50%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes pb-nudge { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes pb-bounce { 0%, 100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(-7px); opacity: 1; } }
@keyframes pb-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes pb-bubble { 0% { opacity: 0; transform: scale(.85); transform-origin: top left; } 100% { opacity: 1; transform: none; } }
@keyframes pb-sheen { 0%, 75% { background-position: -150% 0; } 100% { background-position: 250% 0; } }
@keyframes pb-confetti { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(240px) rotate(540deg); } }

@media (prefers-reduced-motion: reduce) {
  .pb-root *, .pb-root, .pb-root *::before, .pb-root *::after, #practice-side-tab { animation: none !important; transition: none !important; }
  .pb-marked span { opacity: 1; }
  .pb-confetti { display: none; }
}

/* ---------- Focus recap before Resume (focus_recap.js): a smaller window, same activities ---------- */
dialog.pb-root.fr-dialog { width: min(720px, 94vw); height: fit-content; max-height: min(820px, 92vh); position: fixed; }
dialog.pb-root.fr-dialog[open] { display: block; }
.fr-dialog::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--pb-accent), color-mix(in srgb, var(--pb-accent) 45%, #fff)); }
.fr-close { position: absolute; top: 12px; right: 12px; z-index: 1; }
.fr-main { padding: 26px 26px 26px; max-height: min(820px, 92vh); overflow-y: auto; overscroll-behavior: contain; }
.fr-slide { display: grid; gap: 14px; animation: fr-slide-in .42s var(--pb-ease) both; }
.fr-main h2 { font-size: 1.3rem; padding-right: 40px; }
.fr-who { display: flex; align-items: center; gap: 14px; }
.fr-av { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.35rem;
  background: linear-gradient(135deg, var(--pb-accent), color-mix(in srgb, var(--pb-accent) 55%, #fff));
  box-shadow: 0 10px 22px -10px var(--pb-accent), 0 0 0 4px var(--pb-accent-soft); animation: fr-pop .5s var(--pb-spring) both; }
.fr-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pb-accent); }
.fr-eyebrow .material-icons { font-size: 17px; animation: fr-twinkle 2.4s ease-in-out infinite; }
.fr-plan { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--pb-accent-soft); }
.fr-plan span { color: var(--pb-muted); font-size: .9rem; }
.fr-sub { color: var(--pb-muted); }
.fr-dots { display: inline-flex; gap: 6px; }
.fr-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--pb-line); transition: background .3s, transform .3s var(--pb-spring), box-shadow .3s; }
.fr-dots i.now { background: color-mix(in srgb, var(--pb-accent) 35%, var(--pb-surface)); box-shadow: 0 0 0 3px var(--pb-accent-soft); }
.fr-dots i.done { background: var(--pb-accent); animation: fr-dot .45s var(--pb-spring) both; }
.fr-step-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: 40px; }
.fr-step-count { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--pb-muted); font-weight: 700; }
.fr-body { display: grid; gap: 14px; }
.fr-done { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 18px 0 6px; }
.fr-done h2 { padding-right: 0; }
.fr-tick { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--pb-accent);
  box-shadow: 0 0 0 8px var(--pb-accent-soft); animation: fr-pop .55s var(--pb-spring) both; }
.fr-tick .material-icons { font-size: 40px; animation: fr-pop .45s .18s var(--pb-spring) both; }
@keyframes fr-slide-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes fr-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes fr-dot { 0% { transform: scale(.4); } 60% { transform: scale(1.35); } 100% { transform: none; } }
@keyframes fr-twinkle { 0%, 100% { transform: none; opacity: 1; } 50% { transform: scale(1.15) rotate(8deg); opacity: .8; } }
@media (prefers-reduced-motion: reduce) {
  .fr-slide, .fr-av, .fr-tick, .fr-tick .material-icons, .fr-dots i.done, .fr-eyebrow .material-icons { animation: none; }
  .fr-dots i { transition: none; }
}
@media (max-width: 768px) {
  dialog.pb-root.fr-dialog { width: 100vw; max-height: 100%; height: fit-content; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .fr-main { padding: 22px 16px 22px; max-height: 92vh; }
  .fr-av { width: 44px; height: 44px; font-size: 1.15rem; }
}
.fr-note { font-size: .78rem; color: var(--pb-muted); margin-top: -4px !important; }
