/* Cross Point College hub. Palette and type follow crosspoint.tv/college:
   orange, blue and green blocks on cream, DM Serif Text headings, Inter body, script wordmark. */
:root {
  --orange: #d44f1e;
  --orange-deep: #b23f15;
  --blue: #0b5d8f;
  --green: #4c693d;
  --brown: #3b2a25;
  --cream: #f9f7e1;
  --paper: #fffef4;
  --butter: #f4f1a6;
  --ink: #242424;
  --muted: #6d675a;
  --line: #e2ddc0;
  --bad: #a3271b;
  --serif: 'DM Serif Text', Georgia, serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px;
  --tabbar: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: pan-x pan-y; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.1rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.boot { padding: 4rem 1rem; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.fine { font-size: 0.85rem; color: var(--muted); }
.on-dark, .fine.on-dark { color: rgb(255 255 255 / 0.85); }
.eyebrow { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; vertical-align: middle; margin: 0 0.35em; opacity: 0.7; }
.stack { display: grid; gap: 1rem; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.2em; }

.logo {
  display: block; height: 46px; aspect-ratio: 1258 / 470; color: var(--orange); background: currentColor;
  -webkit-mask: url(/college-logo.png) top center / 100% auto no-repeat;
  mask: url(/college-logo.png) top center / 100% auto no-repeat;
}
/* Both sizes crop the tagline off the file (it sits 3px under the tail of the g and reads
   as overlapping). The sign-in page sets the tagline as real text below, with room. */
.logo.big { height: auto; width: min(100%, 380px); aspect-ratio: 1258 / 488; color: var(--butter); }
.login-hero .kicker { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; word-spacing: 1.4em; letter-spacing: 0.02em; color: var(--butter); margin: 0.6rem 0 0.5rem; }

/* ---------- buttons, fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 44px; padding: 0.55rem 1.1rem;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 600; text-decoration: none; cursor: pointer;
  background: none; transition: transform 0.08s, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn.big { min-height: 52px; padding: 0.7rem 1.5rem; font-size: 1.05rem; }
.btn.primary { background: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-deep); }
.btn.light { background: var(--cream); color: var(--ink); }
.btn.ghost { border-color: var(--ink); color: var(--ink); }
.btn.ghost:hover { background: rgb(0 0 0 / 0.05); }
.link { background: none; border: 0; padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--orange-deep); }
.link.on-dark { color: #fff; }
.link.quiet { color: var(--muted); font-weight: 500; font-size: 0.88rem; }
.link.armed { color: var(--bad); font-weight: 700; }
.pill { font-size: 0.8rem; font-weight: 700; text-decoration: none; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--ink); color: var(--cream); }

label { display: block; font-size: 0.88rem; font-weight: 600; }
label > input, label > select, label > textarea, label > .inline { margin-top: 0.35rem; }
.opt { font-weight: 400; color: var(--muted); }
input:not([type='checkbox']), select, textarea {
  display: block; width: 100%; min-height: 46px; padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-weight: 400;
  font-size: 16px; /* under 16px, iPhones zoom the page when a field is tapped */
}
textarea { resize: vertical; line-height: 1.5; }
/* Safari draws its own small select unless told not to; this keeps selects the size of the other fields. */
select {
  -webkit-appearance: none; appearance: none; padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23242424' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center; background-size: 1.1rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgb(11 93 143 / 0.18); }
label.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
input[type='checkbox'] { width: 20px; height: 20px; accent-color: var(--orange); flex: none; }
progress { appearance: none; width: 100%; height: 6px; border: 0; border-radius: 99px; overflow: hidden; background: rgb(255 255 255 / 0.3); }
progress::-webkit-progress-bar { background: rgb(255 255 255 / 0.3); }
progress::-webkit-progress-value { background: var(--butter); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--butter); }

.card, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }

/* ---------- student shell ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.5rem max(1rem, env(safe-area-inset-left));
  background: rgb(249 247 225 / 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-right { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-weight: 700; text-decoration: none; }
.topnav { display: none; gap: 0.25rem; }
.topnav a { display: flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.8rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.92rem; color: var(--muted); }
.topnav a.on { background: var(--ink); color: var(--cream); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--paper); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 0.55rem 0 0.5rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; color: var(--muted); }
.tabbar a .icon { width: 24px; height: 24px; }
.tabbar a.on { color: var(--orange); }
.page { max-width: 1160px; margin: 0 auto; padding: 1.25rem 1rem calc(var(--tabbar) + 2rem); display: grid; gap: 1.5rem; }
.page > * { min-width: 0; }

@media (min-width: 820px) {
  .topnav { display: flex; }
  .tabbar { display: none; }
  .page { padding-bottom: 3rem; }
}

.hello { display: grid; gap: 0.4rem; }
.hello .eyebrow { color: var(--orange-deep); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.3rem; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 0.82rem; font-weight: 600; }
.chip .icon { color: var(--orange); }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.backlink { display: inline-flex; align-items: center; gap: 0.2rem; font-weight: 600; font-size: 0.9rem; text-decoration: none; color: var(--muted); }

/* color blocks */
.c-orange { background: var(--orange); color: #fff; }
.c-blue { background: var(--blue); color: #fff; }
.c-green { background: var(--green); color: #fff; }
.c-brown { background: var(--brown); color: #fff; }
.tone-orange { color: var(--orange-deep); }
.tone-blue { color: var(--blue); }
.tone-green { color: var(--green); }
.tone-brown { color: var(--brown); }

.today, .plancard, .planhead { border-radius: 20px; padding: 1.4rem 1.25rem; display: grid; gap: 0.7rem; text-decoration: none; }
.today h2, .plancard h2, .planhead h1 { color: var(--cream); }
.today .ref { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--butter); }
.today-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 0.4rem 0 0.3rem; }
.plancard { transition: transform 0.12s; }
.plancard:hover { transform: translateY(-2px); }
.empty { text-align: center; padding: 2.5rem 1.25rem; border: 1.5px dashed var(--line); border-radius: 20px; display: grid; gap: 0.75rem; justify-items: center; }
.announce { background: var(--butter); border-radius: var(--radius); padding: 0.9rem 1.1rem; font-weight: 500; }
.teaser { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--green); color: #fff; text-decoration: none; }
.teaser > span { display: grid; flex: 1; }
.teaser .muted { color: rgb(255 255 255 / 0.8); font-size: 0.9rem; }
.teaser .icon:first-child { width: 28px; height: 28px; color: var(--butter); }

/* videos */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.vcard { display: grid; gap: 0.55rem; text-decoration: none; }
.vthumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--brown); display: block; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; }
.vplay, .player-btn { position: absolute; inset: auto auto 10px 10px; width: 38px; height: 38px; border-radius: 50%; background: var(--cream); color: var(--orange); display: grid; place-items: center; }
.vmeta { display: grid; gap: 0.1rem; }
.vmeta .eyebrow { color: var(--orange-deep); }
.vmeta strong { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; line-height: 1.15; }
.vmeta .muted { font-size: 0.88rem; }
@media (max-width: 520px) {
  .vgrid { grid-template-columns: 1fr; }
  .vcard { grid-template-columns: 44% 1fr; align-items: center; gap: 0.8rem; }
  .vplay { width: 28px; height: 28px; inset: auto auto 6px 6px; }
  .vplay .icon { width: 14px; height: 14px; }
}
.player { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: var(--radius); overflow: hidden; background: #000; cursor: pointer; }
.player img { width: 100%; height: 100%; object-fit: cover; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-btn { inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 68px; height: 68px; }
.player-btn .icon { width: 30px; height: 30px; }
.player.playing { cursor: default; }
.chiprow { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chipbtn { flex: none; padding: 0.4rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); font-weight: 600; font-size: 0.88rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.chipbtn.on { background: var(--ink); border-color: var(--ink); color: var(--cream); }

/* plan + step */
.steplist { display: grid; gap: 0.5rem; }
.steprow { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1rem; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); text-decoration: none; }
.steprow.locked { background: none; border-style: dashed; color: var(--muted); }
.stepnum { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; font-family: var(--serif); font-size: 1.1rem; background: var(--cream); border: 1.5px solid var(--ink); }
.steprow.done .stepnum { background: var(--green); border-color: var(--green); color: #fff; }
.steprow.locked .stepnum { border-color: var(--line); }
.steptext, .grow { display: grid; flex: 1; min-width: 0; }
.steptext .muted, .grow .muted { font-size: 0.88rem; }
.step { display: grid; gap: 1.15rem; }
.step-head { display: grid; gap: 0.5rem; }
/* Phone: one column in reading order. Wide: content left, the day's "do this" cards pinned right. */
.step-cols { display: grid; gap: 1.15rem; }
.step-main, .step-side { display: contents; }
.o-scripture { order: 1; } .o-video { order: 2; } .o-text { order: 3; } .o-ocean { order: 4; } .o-memory { order: 5; }
.o-prayer { order: 6; } .o-complete { order: 7; } .o-reflect { order: 8; } .o-nav { order: 9; }
.ocean { display: grid; gap: 0.8rem; padding: 1.1rem 1.2rem; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.ocean .eyebrow { color: var(--blue); }
.ocean-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.ocean-list li { display: flex; align-items: center; gap: 0.9rem; }
.ocean-letter { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.weekhead { display: flex; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; flex-wrap: wrap; margin: 1rem 0 0.1rem; }
.weekhead .muted { font-size: 0.88rem; font-weight: 400; }
@media (min-width: 1000px) {
  .step-cols { grid-template-columns: minmax(0, 1fr) 360px; gap: 2rem; align-items: start; }
  .step-main, .step-side { display: grid; gap: 1.15rem; min-width: 0; }
  .step-side { position: sticky; top: 76px; }
  .step-cols > * > * { order: 0; }
}
.cards { display: grid; gap: 1rem; }
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .cards > :only-child { grid-column: 1 / -1; }
}
.page > form[data-form='profile'] { max-width: 760px; }
/* Community wall: one composer across the top, then full-width cards, newest first. */
.composer-opts { display: flex; align-items: center; gap: 0.75rem 1.5rem; flex-wrap: wrap; }
.inline-field { display: flex; align-items: center; gap: 0.6rem; }
.inline-field select { width: auto; margin: 0; min-height: 42px; }
.wall { display: grid; gap: 0.9rem; }
.wall .post { padding: 1.1rem 1.3rem; }
.wall .post-body { font-size: 1.08rem; }
.post .topic { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.post.t-prayer { border-left: 6px solid var(--blue); }
.post.t-prayer .topic { color: var(--blue); }
.post.t-praise { border-left: 6px solid var(--orange); }
.post.t-praise .topic { color: var(--orange-deep); }
.post.t-verse { border-left: 6px solid var(--green); }
.post.t-verse .topic { color: var(--green); }
.post.t-verse .post-body { font-family: var(--serif); font-size: 1.2rem; line-height: 1.4; }
.memory { background: var(--green); color: #fff; border-radius: var(--radius); padding: 1.1rem 1.2rem; display: grid; gap: 0.6rem; }
.memory .eyebrow { color: var(--butter); }
.memory blockquote { margin: 0; font-family: var(--serif); font-size: 1.3rem; line-height: 1.35; color: var(--cream); transition: filter 0.2s; }
.memory.hidden blockquote { filter: blur(9px); user-select: none; }
.memory-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; font-size: 0.9rem; }
.memory cite { font-style: normal; font-weight: 600; }
.scripture { display: flex; align-items: center; gap: 0.8rem; padding: 0.85rem 1rem; border-radius: var(--radius); background: var(--blue); color: #fff; text-decoration: none; }
.scripture > span { display: grid; flex: 1; }
.scripture strong { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; }
.scripture .muted { color: rgb(255 255 255 / 0.8); font-size: 0.85rem; }
.stepvideo { margin: 0; display: grid; gap: 0.5rem; }
.stepvideo figcaption { font-size: 0.92rem; }
.prose { display: grid; gap: 0.9rem; font-size: 1.07rem; line-height: 1.65; }
.prayer { background: var(--butter); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: grid; gap: 0.5rem; }
.prayer .prose { font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.45; }
.complete { display: grid; gap: 0.5rem; justify-items: center; text-align: center; padding: 1.25rem; border-radius: 20px; border: 1.5px solid var(--line); background: var(--paper); }
.complete .btn { width: 100%; max-width: 340px; }
.complete.done .btn { border-color: var(--green); color: var(--green); }
.reflect .eyebrow { color: var(--orange-deep); }
.reflect { display: grid; gap: 0.4rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.prevnext { display: flex; justify-content: space-between; gap: 1rem; }

/* community */
.composer { display: grid; gap: 0.6rem; }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.composer > .btn { justify-self: end; }
.posts { display: grid; gap: 0.75rem; }
.post { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.95rem 1.1rem; display: grid; gap: 0.5rem; }
.post header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; font-size: 0.9rem; }
.post p { white-space: pre-wrap; overflow-wrap: anywhere; }
.post footer { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.post .pending { font-size: 0.85rem; color: var(--orange-deep); font-weight: 600; }
.react { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; padding: 0.35rem 0.85rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 0.88rem; cursor: pointer; }
.react.on { background: var(--green); border-color: var(--green); color: #fff; }
.react b { font-weight: 700; }

/* sign in */
.login { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.login-hero { background: var(--orange); color: #fff; padding: 2.5rem 1.5rem 3.5rem; display: grid; gap: 0.8rem; justify-items: center; text-align: center; }
.login-hero h1 { color: var(--cream); font-size: clamp(2.4rem, 9vw, 3.6rem); }
.login-hero p:last-child { max-width: 34ch; }
.login-card { width: min(100% - 2rem, 420px); margin: -2rem auto 2rem; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; display: grid; gap: 1rem; align-self: start; box-shadow: 0 12px 30px rgb(59 42 37 / 0.12); }
@media (min-width: 900px) {
  .login { grid-template-rows: none; grid-template-columns: 1.1fr 1fr; }
  .login-hero { align-content: center; padding: 3rem; }
  .login-card { margin: auto; }
}

#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 1rem); transform: translate(-50%, 20px); z-index: 20; max-width: min(92vw, 440px); padding: 0.7rem 1.1rem; border-radius: 12px; background: var(--ink); color: var(--cream); font-weight: 600; font-size: 0.92rem; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); color: #fff; }

/* ---------- admin ---------- */
/* Phone: a top bar with a menu button; the nav is a drawer that slides in from the left.
   Wide: the same nav is a fixed sidebar and the top bar is gone. */
.admin { display: grid; min-height: 100dvh; align-content: start; }
.adminbar { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; background: var(--brown); color: var(--cream); }
.adminbar strong { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; }
.adminbar .logo { color: var(--butter); height: 38px; margin-left: auto; }
.menubtn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 10px; background: rgb(255 255 255 / 0.1); color: var(--cream); cursor: pointer; }
.menubtn .icon { width: 24px; height: 24px; }
.rail {
  position: fixed; inset: 0 auto 0 0; z-index: 10; width: min(82vw, 300px);
  background: var(--brown); color: var(--cream); padding: 1rem 0.9rem calc(1rem + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 0.75rem; overflow-y: auto;
  transform: translateX(-105%); transition: transform 0.22s ease; visibility: hidden;
}
.admin.menu-open .rail { transform: none; visibility: visible; box-shadow: 0 0 40px rgb(0 0 0 / 0.4); }
.scrim { position: fixed; inset: 0; z-index: 9; border: 0; padding: 0; background: rgb(36 36 36 / 0.5); opacity: 0; pointer-events: none; transition: opacity 0.22s; }
.admin.menu-open .scrim { opacity: 1; pointer-events: auto; }
.rail-top { display: flex; align-items: center; justify-content: space-between; }
.rail .logo { color: var(--butter); height: 46px; }
.rail .eyebrow { color: var(--butter); padding: 0 0.75rem; }
.rail nav { display: flex; flex-direction: column; gap: 0.25rem; }
.rail nav a, .railback { display: flex; align-items: center; gap: 0.4rem; min-height: 48px; padding: 0.45rem 0.75rem; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 1.05rem; color: rgb(249 247 225 / 0.8); white-space: nowrap; }
.rail nav a.on { background: var(--orange); color: #fff; }
.rail nav a b { background: var(--butter); color: var(--ink); border-radius: 99px; padding: 0 0.45rem; font-size: 0.75rem; }
.railback { margin-top: auto; }
.adminpage { padding: 1.25rem 1rem 4rem; display: grid; gap: 1.25rem; align-content: start; max-width: 1000px; width: 100%; }
.adminpage > * { min-width: 0; }
.adminpage h1 { font-size: 2rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.panel { display: grid; gap: 0.9rem; }
details.panel > summary { cursor: pointer; }
details.panel > summary h3 { display: inline; }
@media (min-width: 900px) {
  .admin { grid-template-columns: 220px 1fr; align-content: stretch; }
  .adminbar, .scrim, .rail-top .menubtn { display: none; }
  .rail { position: sticky; top: 0; height: 100dvh; width: auto; transform: none; visibility: visible; padding: 1.25rem 0.9rem; box-shadow: none; }
  .rail nav a, .railback { min-height: 0; font-size: 0.9rem; }
  .adminpage { padding: 2rem 2rem 4rem; }
}
.editlink { display: inline-flex; align-items: center; gap: 0.15rem; font-weight: 600; font-size: 0.9rem; color: var(--orange-deep); white-space: nowrap; }
.addvideo { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.aipanel { border-color: var(--blue); border-width: 1.5px; }
.aipanel.off { border-style: dashed; border-color: var(--line); }
.ainote { background: var(--butter); border-radius: 10px; padding: 0.7rem 0.9rem; white-space: pre-wrap; }
form.busy textarea { opacity: 0.6; }
form.busy [data-ai-status] { color: var(--blue); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-decoration: none; display: grid; gap: 0.2rem; }
.tile strong { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; line-height: 1; }
.tile span { font-size: 0.85rem; color: var(--muted); }
.chart { width: 100%; height: 120px; display: block; }
.chart .bar { fill: var(--orange); }
.chart-axis { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th { text-align: left; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0.4rem 0.6rem; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
td { padding: 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
/* Stays a table cell (no flex), so its bottom line sits level with the rest of the row. */
.rowacts { white-space: nowrap; }
.rowacts > * + * { margin-left: 0.9rem; }
.tag { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 99px; font: 700 0.7rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; background: var(--line); color: var(--ink); white-space: nowrap; }
.tag.published { background: var(--green); color: #fff; }
.tag.archived { background: var(--muted); color: #fff; }
.grid2 { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .span2 { grid-column: span 2; }
}
.inline { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.inline input { flex: 1; min-width: 200px; }
.actions { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
fieldset { border: 1.5px solid var(--line); border-radius: 10px; padding: 0.6rem 0.8rem; margin: 0; min-width: 0; }
legend { font-size: 0.88rem; font-weight: 600; padding: 0 0.3rem; }
.picks { display: grid; gap: 0.15rem; max-height: 220px; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 0.6rem; font-weight: 400; padding: 0.3rem 0; }
.pick strong { font-weight: 600; }
.listrow { display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 0.2rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.listrow:last-child { border-bottom: 0; }
.swatch { width: 14px; height: 36px; border-radius: 6px; flex: none; }
details.rowedit, details.stepedit { border-bottom: 1px solid var(--line); }
details.rowedit > summary, details.stepedit > summary { display: flex; align-items: center; gap: 0.8rem; padding: 0.65rem 0.2rem; cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.rowedit > summary img, .nothumb { width: 88px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--line); flex: none; }
details.rowedit[open], details.stepedit[open] { padding-bottom: 1.1rem; }
details.rowedit[open] > summary, details.stepedit[open] > summary { margin-bottom: 0.6rem; }
@media (max-width: 560px) {
  details.rowedit > summary > .muted { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.memory-legal { font-size: 0.7rem; opacity: 0.7; margin-top: 0.6rem; }

.startvideo { display: grid; gap: 0.5rem; }
.startvideo h3 { margin: 0; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1rem; }
form.inline { margin-bottom: 1rem; align-items: center; }
