/* Share-link preview pages (Pods/SharedPreview, the sheet preview header,
   LessonShare/NotShared). Stand-alone: these pages have no app layout. */
:root {
    --ls-bg: #f6f7fb;
    --ls-card: #ffffff;
    --ls-ink: #1d2433;
    --ls-muted: #5b6478;
    --ls-line: #e3e6ef;
    --ls-accent: #4f46e5;
    --ls-accent-ink: #ffffff;
    --ls-note-bg: #eef2ff;
}
/* Dark follows the visitor's system setting through data-theme (set by a
   one-line script in the page head), because the player's question styles
   switch on [data-theme="dark"], not on the media query. */
:root[data-theme="dark"] {
    --ls-bg: #1b1b1b;
    --ls-card: #2b2b2b;
    --ls-ink: #f5f5f5;
    --ls-muted: #a5a5a5;
    --ls-line: #434343;
    --ls-accent: #818cf8;
    --ls-accent-ink: #1b1b1b;
    --ls-note-bg: #353535;
}

body.ls-page { background: var(--ls-bg); color: var(--ls-ink); margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* pod-play.css locks the player to one screen on desktop (body height 100vh,
   overflow hidden, at 993px and wider). The preview is a long page: without
   this a laptop could not scroll past the first slide. */
body.ls-page { height: auto; overflow: visible; }

.ls-header { background: var(--ls-card); border-bottom: 1px solid var(--ls-line); }
.ls-header-inner { max-width: 960px; margin: 0 auto; padding: 16px; display: flex; gap: 16px;
    align-items: flex-start; flex-wrap: wrap; }
.ls-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ls-ink);
    text-decoration: none; flex: 0 0 auto; padding-top: 2px; }
.ls-title-block { flex: 1 1 320px; min-width: 0; }
.ls-kind { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ls-muted); }
.ls-title { font-size: 1.5rem; margin: 2px 0 6px; line-height: 1.25; overflow-wrap: anywhere; }
.ls-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; color: var(--ls-muted); }
.ls-by { margin-top: 6px; font-size: .92rem; }
/* One column of equal-width buttons: the main action with its hint right under
   it, then the secondary actions. Every button and the "Use with my class"
   summary fill the column, so their edges line up. */
.ls-action { flex: 0 0 240px; width: 240px; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.ls-action form { margin: 0; }
.ls-action > .ls-btn, .ls-action form > .ls-btn, .ls-action .ls-run > summary.ls-btn { display: block; width: 100%; text-align: center; }
.ls-action > .ls-hint, .ls-action > .ls-own { text-align: center; margin-top: -4px; }
.ls-action > .ls-hint + .ls-btn, .ls-action > .ls-own + .ls-btn { margin-top: 4px; }
.ls-action .ls-run-form { max-width: none; }
.ls-action .ls-run-form .ls-btn { width: 100%; text-align: center; }
.ls-action > a.ls-hint { text-decoration: underline; }
.ls-btn { box-sizing: border-box; display: inline-block; background: var(--ls-accent); color: var(--ls-accent-ink); border: 0;
    border-radius: 10px; padding: 10px 18px; font-weight: 700; text-decoration: none; cursor: pointer; font-size: 1rem; }
.ls-btn:hover { filter: brightness(1.08); color: var(--ls-accent-ink); }
.ls-btn-ghost { background: transparent; color: var(--ls-accent); border: 1px solid var(--ls-accent); }
.ls-hint, .ls-own { font-size: .8rem; color: var(--ls-muted); }
.ls-note { max-width: 960px; margin: 0 auto; padding: 0 16px 12px; font-size: .85rem; color: var(--ls-muted); }
.ls-note.ls-error { color: #b91c1c; font-weight: 600; }

@media (max-width: 640px) {
    .ls-action { flex-basis: 100%; width: 100%; }
    .ls-btn { text-align: center; width: 100%; }
    .ls-title { font-size: 1.25rem; }
}

/* Pod preview body */
.ls-main { max-width: 960px; margin: 0 auto; padding: 16px 16px 48px; }
.ls-card { background: var(--ls-card); border: 1px solid var(--ls-line); border-radius: 14px;
    padding: 18px; margin-bottom: 16px; overflow: hidden; }
.ls-card-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ls-muted); margin-bottom: 4px; }
.ls-card h2 { font-size: 1.2rem; margin: 0 0 10px; overflow-wrap: anywhere; }
.ls-card.ls-check { border-left: 4px solid var(--ls-accent); }
.ls-points { margin: 0 0 8px; padding-left: 1.2rem; line-height: 1.6; }
.ls-points li { margin-bottom: 4px; overflow-wrap: anywhere; }
.ls-terms { display: grid; gap: 6px; margin: 10px 0 0; padding: 10px 12px; background: var(--ls-note-bg); border-radius: 10px; font-size: .92rem; }
.ls-terms dt { font-weight: 700; display: inline; }
.ls-terms dd { display: inline; margin: 0; }
.ls-media img { max-width: 100%; max-height: 360px; border-radius: 10px; display: block; margin: 8px auto; }
.ls-video { position: relative; width: 100%; padding-top: 56.25%; margin: 8px 0; border-radius: 10px; overflow: hidden; }
.ls-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ls-passage { font-size: .95rem; line-height: 1.6; padding: 10px 12px; border-left: 3px solid var(--ls-line); margin: 8px 0; }
.ls-slide-note { font-size: .85rem; color: var(--ls-muted); margin-top: 8px; }
.ls-question { margin-top: 12px; }
.ls-question + .ls-question { border-top: 1px dashed var(--ls-line); padding-top: 12px; }
.ls-empty { text-align: center; color: var(--ls-muted); padding: 40px 0; }

/* The player's question markup, drawn statically (see QuestionPreviewFrame). */
.ls-stage, .ls-stage * { animation: none !important; transition: none !important; }
.ls-stage .pod-content { padding: 0 !important; margin: 0 !important; min-height: 0 !important; overflow: visible !important; }
.ls-stage .content-card { display: block !important; margin: 0 !important; box-shadow: none !important;
    max-height: none !important; overflow: visible !important; }
.ls-stage .question-slide { display: block !important; }
.ls-stage .edpuzzle-question-card { display: block !important; }

/* Not shared page */
.ls-gone { max-width: 520px; margin: 12vh auto 0; padding: 0 16px; text-align: center; }
.ls-gone h1 { font-size: 1.5rem; }
.ls-gone p { color: var(--ls-muted); }
/* Look-only: the player's Submit / Clear / View Image buttons do nothing here. */
.ls-stage .activity-actions, .ls-stage .ixl-actions { display: none !important; }

/* "Use with my class" on the preview header (LessonShareRun) */
.ls-run { width: 100%; }
.ls-run > summary { list-style: none; text-align: center; }
.ls-run > summary::-webkit-details-marker { display: none; }
.ls-run[open] > summary { margin-bottom: 8px; }
.ls-run-form { display: flex; flex-direction: column; gap: 6px; background: var(--ls-note-bg);
    border-radius: 10px; padding: 12px; max-width: 280px; text-align: left; }
.ls-run-form label { font-size: .85rem; font-weight: 600; }
.ls-run-form input { border: 1px solid var(--ls-line); border-radius: 8px; padding: 8px 10px; font-size: .95rem;
    background: var(--ls-card); color: var(--ls-ink); }
@media (max-width: 640px) { .ls-run-form { max-width: none; } }

/* Class results page (LessonShare/ClassResults) */
.ls-results { max-width: 960px; margin: 0 auto; padding: 16px 16px 48px; }
.ls-callout { background: var(--ls-note-bg); border: 1px solid var(--ls-accent); border-radius: 12px;
    padding: 12px 14px; margin-bottom: 16px; }
.ls-callout strong { display: block; margin-bottom: 2px; }
.ls-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ls-linkbox { background: var(--ls-card); border: 1px solid var(--ls-line); border-radius: 14px; padding: 14px; min-width: 0; }
.ls-linkbox h2 { font-size: 1rem; margin: 0 0 4px; }
.ls-linkbox p { font-size: .85rem; color: var(--ls-muted); margin: 0 0 8px; }
.ls-copyrow { display: flex; gap: 8px; }
.ls-copyrow input { flex: 1 1 auto; min-width: 0; border: 1px solid var(--ls-line); border-radius: 8px;
    padding: 8px 10px; font-size: .85rem; background: var(--ls-bg); color: var(--ls-ink); }
.ls-copyrow .ls-btn { padding: 8px 14px; font-size: .9rem; white-space: nowrap; }
.ls-closed { color: #b45309; font-weight: 600; }
.ls-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 4px 0 12px; color: var(--ls-muted); font-size: .92rem; }
.ls-stats b { color: var(--ls-ink); font-size: 1.1rem; }
.ls-tablewrap { background: var(--ls-card); border: 1px solid var(--ls-line); border-radius: 14px; overflow-x: auto; }
.ls-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ls-table th, .ls-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--ls-line); white-space: nowrap; }
.ls-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ls-muted); }
.ls-table td.ls-name { white-space: normal; overflow-wrap: anywhere; font-weight: 600; }
.ls-table tr:last-child td { border-bottom: 0; }
.ls-pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 600; }
.ls-pill-done { background: #dcfce7; color: #166534; }
.ls-pill-work { background: #fef3c7; color: #92400e; }
:root[data-theme="dark"] .ls-pill-done { background: #14532d; color: #bbf7d0; }
:root[data-theme="dark"] .ls-pill-work { background: #78350f; color: #fde68a; }
.ls-toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ls-toolbar h2 { font-size: 1.1rem; margin: 0; }
.ls-toolbar .ls-btn { padding: 8px 14px; font-size: .9rem; }
.ls-foot { margin-top: 20px; font-size: .85rem; color: var(--ls-muted); display: flex; flex-wrap: wrap; gap: 12px;
    justify-content: space-between; align-items: center; }
.ls-foot form { margin: 0; }
/* The phone rule above makes every .ls-btn full width; these sit in rows. */
.ls-toolbar .ls-btn, .ls-copyrow .ls-btn { width: auto; }
.ls-run-form, .ls-copyrow input { box-sizing: border-box; }
.ls-btn-danger { background: transparent; color: #b91c1c; border: 1px solid #b91c1c; }
.ls-btn-danger:hover { color: #b91c1c; }
:root[data-theme="dark"] .ls-btn-danger { color: #fca5a5; border-color: #fca5a5; }

/* Save banner (ClassResults): until the run is kept, the results link is the only way back. */
.ls-save { background: #fff7ed; border: 2px solid #ea580c; border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.ls-save h2 { font-size: 1.05rem; margin: 0 0 4px; color: #9a3412; }
.ls-save p { margin: 0 0 10px; font-size: .92rem; }
.ls-save-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ls-save-actions form { margin: 0; }
.ls-save-actions .ls-btn { padding: 8px 14px; font-size: .92rem; width: auto; }
.ls-save-hint { font-size: .8rem; color: var(--ls-muted); margin-top: 8px; }
.ls-save.is-saved { background: #f0fdf4; border-color: #16a34a; }
.ls-save.is-saved h2 { color: #166534; }
.ls-save.is-calm { border-width: 1px; }
.ls-kept { background: #f0fdf4; border: 1px solid #16a34a; border-radius: 12px; padding: 10px 14px; margin-bottom: 16px;
    font-size: .92rem; }
:root[data-theme="dark"] .ls-save { background: #3b1d0a; border-color: #fb923c; }
:root[data-theme="dark"] .ls-save h2 { color: #fdba74; }
:root[data-theme="dark"] .ls-save.is-saved,
:root[data-theme="dark"] .ls-kept { background: #052e16; border-color: #4ade80; }
:root[data-theme="dark"] .ls-save.is-saved h2 { color: #bbf7d0; }
@media (max-width: 640px) { .ls-save-actions .ls-btn { width: 100%; } .ls-save-actions form { width: 100%; } }

/* My class runs (LessonShare/MyClassRuns) */
.ls-runs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ls-runs li { background: var(--ls-card); border: 1px solid var(--ls-line); border-radius: 14px; padding: 12px 14px;
    display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.ls-runs .ls-run-title { font-weight: 600; overflow-wrap: anywhere; }
.ls-runs .ls-run-meta { font-size: .85rem; color: var(--ls-muted); }
