/* ScrimMate v2.3.3 — task pages (Submit result, Create scrim, Schedule practice scrim). Loaded last.
 * Before: a sheet / hero card stacked on another screen ("page under page"), card-in-card sections and a
 * match list that scrolled inside the page (max-height 248px), so half the screen swiped on its own.
 * Now: own top bar, no bottom tabs, one compact Command Center glow hero, flat numbered steps, one sticky
 * action bar, and long lists show 3 + "Show more". Everything is scoped to .sm-app-shell--task / .tp-page. */

/* ---------- 1. Shell: no bottom tabs, no global header, the page owns the whole screen ---------- */
.sm-app-shell--task > .sm-app-shell__header,
.sm-app-shell--task > .sm-app-shell__nav,
.sm-app-shell--task .sm-fab { display: none !important; }
.sm-app-shell--task > .sm-app-shell__content { padding: 0 !important; max-width: 100%; scroll-padding-top: 132px; scroll-padding-bottom: 96px; }
.sm-app-shell--task {
  background:
    radial-gradient(90% 46% at 0% 0%, color-mix(in srgb, var(--v230-tone, #f6c445) 12%, transparent), transparent 70%),
    radial-gradient(70% 40% at 100% 38%, color-mix(in srgb, var(--v230-tone, #f6c445) 6%, transparent), transparent 70%),
    var(--sm-bg, var(--surface, #0b0b0f));
}
:root[data-theme="light"] .sm-app-shell--task {
  background:
    radial-gradient(90% 46% at 0% 0%, color-mix(in srgb, var(--v230-tone, #f6c445) 16%, transparent), transparent 70%),
    radial-gradient(70% 40% at 100% 38%, color-mix(in srgb, var(--v230-tone, #f6c445) 8%, transparent), transparent 70%),
    var(--sm-bg, #f6f6f8);
}

.tp-page { --tp-pad: max(14px, env(safe-area-inset-left)); --tp-bg: var(--sm-bg, var(--surface, #0b0b0f));
  display: block; width: 100%; max-width: 720px; margin: 0 auto; padding: 0 var(--tp-pad) 0; box-sizing: border-box; min-width: 0; }
:root[data-theme="light"] .tp-page { --tp-bg: var(--sm-bg, #f6f6f8); }
.tp-page > * { min-width: 0; }

/* ---------- 2. Top bar ---------- */
.tp-bar { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; justify-content: flex-start; gap: 12px; box-sizing: border-box; height: calc(64px + env(safe-area-inset-top, 0px)); max-width: none; width: auto;
  margin: 0 calc(-1 * var(--tp-pad)); padding: calc(10px + env(safe-area-inset-top, 0px)) var(--tp-pad) 10px;
  background: color-mix(in srgb, var(--tp-bg) 95%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--v230-line, rgb(255 255 255 / .07)); }
.tp-back { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 14px; cursor: pointer;
  color: var(--on-surface, #f4f4f6); background: var(--v230-sheen-card, rgb(255 255 255 / .04));
  border: 1px solid color-mix(in srgb, var(--v230-tone, #f6c445) 22%, var(--v230-line, rgb(255 255 255 / .08)));
  transition: transform .15s ease, border-color .2s; -webkit-tap-highlight-color: transparent; }
.tp-back:active { transform: scale(.93); }
.tp-back:focus-visible { outline: 2px solid var(--v230-tone, #f6c445); outline-offset: 2px; }
.tp-back svg { width: 22px; height: 22px; fill: currentColor; }
.tp-bar__t { flex: 1 1 auto; min-width: 0; display: grid; justify-items: start; text-align: left; line-height: 1.15; margin: 0; }
.tp-bar__t small { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--v230-tone, #f6c445);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-bar__t h1 { margin: 2px 0 0; font-size: 1.22rem; font-weight: 800; letter-spacing: -.01em; color: var(--on-surface, #f4f4f6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 3. Compact glow hero (the only card at the top) ---------- */
.tp-hero { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; margin: 14px 0 6px; padding: 14px;
  border-radius: 20px; border: 1px solid color-mix(in srgb, var(--v230-tone, #f6c445) 26%, var(--v230-line, rgb(255 255 255 / .07)));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--v230-tone, #f6c445) 18%, transparent), transparent 60%),
              radial-gradient(70% 90% at 100% 100%, color-mix(in srgb, var(--v230-tone, #f6c445) 10%, transparent), transparent 70%),
              var(--v230-sheen-card, rgb(255 255 255 / .03)), var(--sm-surface, #141418);
  box-shadow: 0 18px 44px -30px color-mix(in srgb, var(--v230-tone, #f6c445) 75%, transparent); animation: tp-rise .34s cubic-bezier(.2, .8, .2, 1) both; }
:root[data-theme="light"] .tp-hero { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--v230-tone, #f6c445) 20%, transparent), transparent 60%),
  radial-gradient(70% 90% at 100% 100%, color-mix(in srgb, var(--v230-tone, #f6c445) 10%, transparent), transparent 70%), #fff; }
.tp-hero::after { content: ""; position: absolute; z-index: -1; right: -40px; top: -50px; width: 150px; height: 150px; border-radius: 50%;
  background: color-mix(in srgb, var(--v230-tone, #f6c445) 20%, transparent); filter: blur(42px); pointer-events: none; }
.tp-hero__icon { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: #1a1300;
  background: linear-gradient(135deg, var(--v230-tone, #f6c445), color-mix(in srgb, var(--v230-tone, #f6c445) 62%, #fff));
  box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--v230-tone, #f6c445) 80%, transparent); }
.tp-hero__icon svg { width: 22px; height: 22px; fill: currentColor; }
.tp-hero__txt { display: contents; }
.tp-hero__txt > p { grid-column: 2; }
.tp-hero__txt > .tp-chips { grid-column: 1 / -1; }
.tp-hero__txt p { margin: 0; font-size: .86rem; line-height: 1.42; color: var(--on-surface-variant, #b9b9c3); }
.tp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 28px; padding: 0 10px; border-radius: 999px; box-sizing: border-box;
  font-size: .74rem; font-weight: 700; color: var(--on-surface, #f4f4f6);
  background: color-mix(in srgb, var(--v230-tone, #f6c445) 10%, transparent); border: 1px solid color-mix(in srgb, var(--v230-tone, #f6c445) 26%, transparent); }
.tp-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-chip svg { flex: 0 0 auto; width: 14px; height: 14px; fill: var(--v230-tone, #f6c445); }
@keyframes tp-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tp-body { display: block; min-width: 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.tp-body > .sm-empty, .tp-body > .empty, .tp-body > .rs-empty { margin-top: 12px; }

/* ---------- 4. Flat numbered steps (no card-in-card) ---------- */
.tp-page .rs-sec, .tp-page .cc-section, .tp-page .ss-card {
  position: relative; margin: 0; padding: 20px 0 18px !important; border: 0 !important; border-radius: 0 !important;
  background: none !important; box-shadow: none !important; overflow: visible; }
.tp-page .rs-sec::before, .tp-page .cc-section::before, .tp-page .ss-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--v230-tone, #f6c445) 40%, transparent), var(--v230-line, rgb(255 255 255 / .07)) 45%, transparent); }
.tp-page .rs-sec::after, .tp-page .cc-section::after, .tp-page .ss-card::after { display: none !important; }
/* The step number: a glowing gold tile. */
.tp-page .rs-sec__n, .tp-page .cc-step, .tp-page .ss-step {
  flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; font-size: .84rem; font-weight: 900; color: #1a1300 !important;
  background: linear-gradient(135deg, var(--v230-tone, #f6c445), color-mix(in srgb, var(--v230-tone, #f6c445) 60%, #fff)) !important; border: 0 !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--v230-tone, #f6c445) 12%, transparent), 0 6px 18px -6px color-mix(in srgb, var(--v230-tone, #f6c445) 85%, transparent); }
.tp-page .rs-sec__h, .tp-page .cc-section__head, .tp-page .ss-card__head { display: flex; align-items: center; gap: 12px; }
.tp-page .rs-sec__h b, .tp-page .cc-section__head h3, .tp-page .ss-card__head h4 { margin: 0; font-size: 1.04rem; font-weight: 800; letter-spacing: -.005em; }
.tp-page .rs-sec__h small, .tp-page .cc-section__head small { display: block; margin-top: 2px; font-size: .8rem; line-height: 1.35; color: var(--on-surface-variant, #b9b9c3); }
.tp-page .rs-sec.is-invalid, .tp-page .cc-section.is-invalid { animation: cc-shake .32s ease; }
.tp-page .cc-section.is-invalid .cc-step { background: var(--error, #ff6b6b) !important; }
/* The step you are on glows a little. */
.tp-page .rs-shell[data-rs-step="pick"] [data-rs-sec="pick"] .rs-sec__n,
.tp-page .rs-shell[data-rs-step="scan"] [data-rs-sec="scan"] .rs-sec__n,
.tp-page .rs-shell[data-rs-step="check"] [data-rs-sec="check"] .rs-sec__n,
.tp-page .rs-shell[data-rs-step="send"] [data-rs-sec="send"] .rs-sec__n { animation: tp-glow 1.9s ease-in-out infinite; }
@keyframes tp-glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--v230-tone, #f6c445) 18%, transparent), 0 6px 22px -4px color-mix(in srgb, var(--v230-tone, #f6c445) 95%, transparent); } }

/* ---------- 5. Submit result ---------- */
.tp-page .v210-submit__body, .tp-page .rs-shell { padding: 0 !important; margin: 0; display: block; }
.tp-page .rs-form { display: block; }
/* Step rail sits under the top bar and stays there while you scroll. */
.tp-page .rs-rail { position: sticky !important; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 7; margin: 10px calc(-1 * var(--tp-pad)) 2px !important;
  padding: 6px var(--tp-pad) !important; max-width: none !important; width: auto !important; border-radius: 0 !important; border: 0 !important;
  border-bottom: 1px solid var(--v230-line, rgb(255 255 255 / .07)) !important;
  background: color-mix(in srgb, var(--tp-bg) 95%, transparent) !important; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: none !important; }
.tp-page .rs-rail li.is-on { background: color-mix(in srgb, var(--v230-tone, #f6c445) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v230-tone, #f6c445) 34%, transparent); }
/* No more list scrolling inside the page: the whole list grows, 3 visible + Show more. */
.tp-page .rs-matches { max-height: none !important; overflow: visible !important; padding-right: 0; }
.tp-page .rs-match { min-height: 58px; }
.tp-page .rs-sec .sm-field { margin: 0; }
.tp-page .rs-sec > .sm-field + .sm-field { margin-top: 2px; }
/* Sticky send bar at the very bottom of the screen (the bottom tabs are hidden on this page). */
.tp-page .rs-send { position: sticky !important; bottom: 0 !important; z-index: 6; max-width: none !important; width: auto !important; box-sizing: border-box; margin: 4px calc(-1 * var(--tp-pad)) 0 !important;
  padding: 12px var(--tp-pad) calc(10px + env(safe-area-inset-bottom)) !important;
  background: color-mix(in srgb, var(--tp-bg) 88%, transparent) !important; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--v230-line, rgb(255 255 255 / .07)); box-shadow: 0 -18px 30px -24px color-mix(in srgb, var(--v230-tone, #f6c445) 55%, transparent); }
.tp-page .rs-send__btn { margin-top: 0 !important; }
.tp-page .rs-send__note { margin-top: 6px !important; font-size: .76rem; }
.tp-page .tp-body:has(.rs-send) { padding-bottom: 0; }

/* ---------- 6. "3 + Show more" ---------- */
.tp-hide { display: none !important; }
.tp-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; margin: 8px 0 0; padding: 0 14px;
  border-radius: 14px; cursor: pointer; font: inherit; font-size: .86rem; font-weight: 800; color: var(--v230-tone, #f6c445);
  background: color-mix(in srgb, var(--v230-tone, #f6c445) 7%, transparent); border: 1px dashed color-mix(in srgb, var(--v230-tone, #f6c445) 38%, transparent);
  transition: background .2s, transform .15s; -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
.tp-more:active { transform: scale(.98); }
.tp-more:focus-visible { outline: 2px solid var(--v230-tone, #f6c445); outline-offset: 2px; }
.tp-more[hidden] { display: none !important; }
.tp-more svg { width: 18px; height: 18px; fill: currentColor; transition: transform .25s; }
.tp-more[aria-expanded="true"] svg { transform: rotate(180deg); }
:root[data-theme="light"] .tp-more { color: #8a6400; border-color: color-mix(in srgb, #b8860b 40%, transparent); }

/* ---------- 7. Create scrim / Schedule practice scrim ---------- */
.tp-page .tp-mount { display: block; min-width: 0; }
.tp-page .cc-form { overflow: visible !important; display: block; padding: 0 !important; min-height: 0; flex: none; }
.tp-page .cc-form > .cc-section, .tp-page .ss-modern > .ss-card { animation: tp-rise .34s cubic-bezier(.2, .8, .2, 1) both; }
.tp-page .cc-section { display: grid; gap: 12px; }
.tp-page .ss-modern { display: block; }
.tp-page .ss-card { display: grid; gap: 12px; }
.tp-page .ss-hero { display: none; } /* the page hero already says it */
.tp-page .modal-error { margin: 12px 0 0; }
/* Start from a past scrim: a vertical list (3 + Show more) instead of a sideways strip. */
.tp-page .v20-tpl { margin: 12px 0 8px; padding: 14px; border-radius: 18px; border: 1px dashed color-mix(in srgb, var(--v230-tone, #f6c445) 34%, transparent);
  background: color-mix(in srgb, var(--v230-tone, #f6c445) 5%, transparent); }
.tp-page .v20-tpl__list { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 8px; overflow: visible !important; scroll-snap-type: none; padding: 0; }
.tp-page .v20-tpl__item { width: 100%; min-width: 0 !important; max-width: none !important; text-align: left; box-sizing: border-box; }
.tp-page .v20-tpl__item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* One sticky publish bar at the bottom of the screen. */
.tp-page .cc-footer, .tp-page .ss-footer { position: sticky !important; bottom: 0 !important; z-index: 6; max-width: none !important; width: auto !important; box-sizing: border-box; margin: 6px calc(-1 * var(--tp-pad)) 0 !important;
  padding: 12px var(--tp-pad) calc(12px + env(safe-area-inset-bottom)) !important; border-radius: 0 !important;
  background: color-mix(in srgb, var(--tp-bg) 88%, transparent) !important; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--v230-line, rgb(255 255 255 / .07)); box-shadow: 0 -18px 30px -24px color-mix(in srgb, var(--v230-tone, #f6c445) 55%, transparent); }
.tp-page .tp-body:has(.cc-footer, .ss-footer) { padding-bottom: 0; }
.tp-page .cc-publish, .tp-page [data-sched-submit] { box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--v230-tone, #f6c445) 85%, transparent); }
.tp-page .cc-error { margin: 12px 0 0; }

/* ---------- 8. Small phones / big text ---------- */
@media (max-width: 360px) {
  .tp-page { --tp-pad: max(12px, env(safe-area-inset-left)); }
  .tp-hero { padding: 12px; gap: 10px; }
  .tp-hero__icon { width: 36px; height: 36px; border-radius: 12px; }
  .tp-bar__t h1 { font-size: 1.1rem; }
  .tp-page .cc-footer { gap: 10px; }
  .tp-page .cc-publish { padding-inline: 16px; }
}
@media (min-width: 768px) { .tp-hero { margin-top: 20px; } }
@media (prefers-reduced-motion: reduce) {
  .tp-hero, .tp-page .cc-form > .cc-section, .tp-page .ss-modern > .ss-card, .tp-page .rs-sec__n { animation: none !important; }
}

/* ---------- 9. Nothing swipes sideways inside a task page ---------- */
.tp-page .v1-planner__shift { flex-wrap: wrap !important; overflow: visible !important; }
.tp-page .cc-pts__foot { flex-wrap: wrap; }
.tp-page .cc-pill { white-space: normal; max-width: 100%; box-sizing: border-box; line-height: 1.3; }
