/* Audition prep: the shared look for every page in Auditions/. Load
   awaken-tokens.css first. The pages themselves are written by
   scripts/build_auditions.py; auditions.js runs the tabs, the song list,
   the players and the chart viewer.

   Built for phones first. From 700px the songs open up and the two players
   sit side by side; from 1024px the tips move into a column beside the
   songs and the tabs go away. */

/* ── Fonts: the licensed files this site already serves ── */
@font-face { font-family:'Circular'; src:url('Fonts/CircularXXWeb-Light.woff2') format('woff2'); font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:'Circular'; src:url('Fonts/CircularXXSub-LightSubset.woff2') format('woff2'),url('Fonts/CircularXXSub-LightSubset.woff') format('woff'); font-weight:400 500; font-style:normal; font-display:swap; }
@font-face { font-family:'Circular'; src:url('Fonts/CircularXXSub-BoldSubset.woff2') format('woff2'),url('Fonts/CircularXXSub-BoldSubset.woff') format('woff'); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:'Circular'; src:url('Fonts/CircularXXWeb-Bold.woff2') format('woff2'),url('Fonts/CircularXXWeb-Bold.woff') format('woff'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'Quarto'; src:url('Fonts/Quarto-Light_Web.woff2') format('woff2'); font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:'Quarto'; src:url('Fonts/Quarto-Medium_Web.woff2') format('woff2'); font-weight:400 500; font-style:normal; font-display:swap; }
@font-face { font-family:'Quarto'; src:url('Fonts/Quarto-Semibold_Web.woff2') format('woff2'); font-weight:600; font-style:normal; font-display:swap; }

/* ── Page ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); color: var(--ink); }
button { font: inherit; color: inherit; letter-spacing: inherit; cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; }
:focus { outline: none; }
:focus-visible { box-shadow: var(--aw-focus); }
[hidden] { display: none !important; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.au { max-width: 640px; margin: 0 auto; padding: 0 20px calc(48px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 700px) { .au { max-width: 760px; padding-inline: 32px; } }
@media (min-width: 1024px) { .au { max-width: 1120px; padding-inline: 40px; } }

/* ── The Awaken Church Worship lockup, drawn from the logo file ──
   -ink is for light paper, -light for dark surfaces and the photo.
   --lk-h is the height "AwakenChurch" is drawn at; --lk-r is how much taller
   the image is because the brush word rises above the caps. */
.lockup { display: block; --lk-r: 1.073; }
.lockup img { display: block; height: calc(var(--lk-h, 18px) * var(--lk-r)); width: auto; }
.lockup .lk-light { display: none; }
.on-photo .lockup .lk-ink { display: none; }
.on-photo .lockup .lk-light { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lockup .lk-ink { display: none; }
  :root:not([data-theme="light"]) .lockup .lk-light { display: block; }
}
:root[data-theme="dark"] .lockup .lk-ink { display: none; }
:root[data-theme="dark"] .lockup .lk-light { display: block; }

/* ── Type ── */
.au h1, .au h2, .au h3 { font-family: var(--font-display); font-weight: 400; color: var(--ink); letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
.au h1 { font-size: clamp(44px, 12vw, 68px); line-height: 0.98; }
.eyebrow { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 0; }
.lede { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 14px 0 0; max-width: 36em; text-wrap: pretty; }
.lede strong { color: var(--ink); font-weight: 600; }
.lede + .lede { margin-top: 8px; font-size: 16px; }
.au .group-h { font-family: var(--font-ui); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 0 0 10px; }

/* ════════════ Home ════════════ */

/* The photo dissolves into the page in both themes (the team applications'
   hero). On a phone it runs edge to edge; wider, it's a rounded panel. */
.hero { position: relative; margin: 0 -20px; height: clamp(300px, 52vh, 440px); overflow: hidden; }
.hero img.photo {
  width: 100%; height: 100%; object-fit: cover; object-position: 46% 64%; display: block;
  --fade: linear-gradient(180deg, #000 0%, #000 42%, rgb(0 0 0 / .96) 50%, rgb(0 0 0 / .86) 58%, rgb(0 0 0 / .7) 66%,
          rgb(0 0 0 / .5) 74%, rgb(0 0 0 / .3) 82%, rgb(0 0 0 / .14) 89%, rgb(0 0 0 / .04) 95%, transparent 100%);
  -webkit-mask-image: var(--fade); mask-image: var(--fade);
}
.hero::after { content: ''; position: absolute; inset: 0 0 auto; height: 36%; pointer-events: none; background: linear-gradient(180deg, rgb(0 0 0 / .34), transparent); }
.hero-brand {
  position: absolute; z-index: 2; top: calc(14px + env(safe-area-inset-top, 0px)); left: 16px;
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 999px;
  background: rgb(16 13 10 / .55); -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
}
/* The Worship W is a little taller than wide, so it sets its height only. */
.hero-brand > img { height: 22px; width: auto; display: block; }
.hero-brand .lockup { --lk-h: 22px; }
@media (max-width: 380px) { .hero-brand .lockup { --lk-h: 19px; } }
@media (min-width: 700px) {
  .hero { margin: 24px 0 0; border-radius: 24px 24px 0 0; height: clamp(360px, 48vh, 460px); }
  .hero-brand { top: 18px; left: 18px; }
}
@media (min-width: 1024px) { .hero { height: clamp(380px, 46vh, 480px); } }

.home-intro h1 { margin-top: -30px; position: relative; z-index: 1; }
@media (min-width: 700px) { .home-intro h1 { margin-top: -26px; } }

/* Phone: intro, then the roles, then how to prepare. From 1024px the intro and
   how to prepare sit on the left and the roles fill the right. */
.home-grid { display: grid; gap: 36px; }
.home-intro { grid-area: intro; }
.home-roles { grid-area: roles; display: grid; gap: 28px; }
.home-how { grid-area: how; }
.home-grid { grid-template-areas: "intro" "roles" "how"; }
@media (min-width: 1024px) {
  .home-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); grid-template-areas: "intro roles" "how roles"; column-gap: 56px; row-gap: 32px; align-items: start; }
  .home-roles { padding-top: 28px; }
}

/* A role: a card you tap */
.roles { display: grid; gap: 8px; }
@media (min-width: 560px) { .roles { grid-template-columns: 1fr 1fr; gap: 10px; } }
.role {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 14px 14px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none;
  transition: border-color .15s, transform .18s var(--ease-out), box-shadow .2s;
}
.role:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.role:active { transform: scale(.985); }
.role-ic { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--sunk); color: var(--ink-2); display: grid; place-items: center; }
.role-ic .i { width: 26px; height: 26px; stroke-width: 1.6; }
.role-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.role-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.role-meta { font-size: 14px; color: var(--ink-3); }
.role > .chev { width: 18px; height: 18px; color: var(--ink-3); transition: transform .2s var(--ease-out); }
.role:hover > .chev { transform: translateX(2px); color: var(--ink); }
.pill-soon { justify-self: start; font-size: 12px; font-weight: 600; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 2px 9px; }

/* How to prepare: three numbered steps */
.how { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.how li { display: grid; grid-template-columns: 32px 1fr; gap: 4px 8px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.how li > span { grid-row: span 2; font-size: 15px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; line-height: 1.5; }
.how b { font-weight: 600; font-size: 16px; }
.how p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }

.foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 56px; font-size: 13px; color: var(--ink-3); }
.foot img { height: 16px; width: auto; display: block; }

/* ════════════ A role's page ════════════ */

/* The top bar: back to every role, the lockup, and (below 1024px) the
   Songs / Tips tabs, all kept in reach while you scroll. */
.bar {
  position: sticky; top: 0; z-index: 10;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 20px 10px;
  background: var(--paper);
}
.bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-soft); opacity: 0; transition: opacity .2s; }
.bar.scrolled::after { opacity: 1; }
.bar-in { max-width: 600px; margin: 0 auto; }
.bar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.back {
  display: inline-flex; align-items: center; gap: 4px; margin-left: -10px; padding: 8px 12px 8px 6px; border-radius: 999px;
  font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: background-color .15s, color .15s;
}
.back:hover { color: var(--ink); background: var(--sunk); }
.back .i { width: 18px; height: 18px; }
.bar-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
.bar-brand > img { height: 22px; width: auto; display: block; flex: none; }
.bar-brand .lockup { --lk-h: 17px; }
@media (max-width: 420px) { .bar-brand .lockup { --lk-h: 15px; } }
@media (max-width: 340px) { .bar-brand .lockup { display: none; } }
@media (min-width: 700px) { .bar { padding-inline: 32px; } .bar-in { max-width: 696px; } }
@media (min-width: 1024px) { .bar { padding-inline: 40px; } .bar-in { max-width: 1040px; } .bar-brand .lockup { --lk-h: 19px; } }

/* Songs / Tips: the hub's segmented control */
html:not(.js) .seg { display: none; }
.seg { display: flex; background: var(--sunk); border-radius: 12px; padding: 3px; gap: 2px; margin-top: 8px; }
.seg button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  border: 0; background: none; border-radius: 9px; padding: 7px 10px; font-weight: 500; font-size: 15px; color: var(--ink-2);
  transition: background-color .15s, color .15s;
}
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(31 27 23 / .12); }
.seg .n { font-size: 12px; font-weight: 600; color: var(--ink-3); background: var(--sunk); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.seg button[aria-selected="true"] .n { background: var(--paper); }
@media (min-width: 1024px) { .seg { display: none; } }

.role-head { padding: 24px 0 8px; }
.role-head h1 { margin-top: 6px; }
@media (min-width: 1024px) { .role-head { padding: 40px 0 12px; } }

/* Below 1024px only the chosen tab shows. From 1024px both show, songs on the
   left and the tips in a column on the right that stays in view. */
.layout { display: block; margin-top: 20px; }
/* Without the script both show, one after the other. */
.js .panel { display: none; }
.js .panel.on { display: block; }
.js .panel.on.switched { animation: au-in .4s var(--ease-out) both; }
.tips-panel { margin-top: 40px; }
.js .tips-panel { margin-top: 0; }
@keyframes au-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.au .panel-h { font-size: 26px; line-height: 1.15; margin: 0 0 14px; }
@media (min-width: 1024px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; margin-top: 28px; }
  .js .panel, .js .panel.on { display: block; animation: none; }
  .tips-panel, .js .tips-panel { position: sticky; top: 84px; margin-top: 0; }
}
@media (min-width: 1240px) {
  .au { max-width: 1240px; }
  .bar-in { max-width: 1160px; }
  .layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; }
}

/* ── Songs ── */
.songs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.song { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: border-color .2s, box-shadow .25s; }
.song.open { box-shadow: var(--shadow); }
.au .song-h { margin: 0; font: inherit; letter-spacing: normal; }
.song-hd {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 16px; min-height: 72px;
  border: 0; background: none; text-align: left; border-radius: 18px; transition: background-color .15s;
}
.song-hd:hover { background: var(--aw-hover); }
.song-num {
  width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--sunk); font-variant-numeric: tabular-nums;
  transition: background-color .2s, color .2s;
}
.song.open .song-num { background: var(--ink); color: var(--paper); }
.song-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.song-name { font: 400 23px/1.15 var(--font-display); letter-spacing: -0.015em; color: var(--ink); }
.song-artist { font-size: 14px; color: var(--ink-3); }
.song-chev { width: 20px; height: 20px; color: var(--ink-3); transition: transform .3s var(--ease-out); }
.song.open .song-chev { transform: rotate(180deg); color: var(--ink); }

.song-wrap { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease-out); }
.song.open .song-wrap { grid-template-rows: 1fr; }
.song-in { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s .35s; }
.song.open .song-in { visibility: visible; transition: visibility 0s; }
.song-body { padding: 0 16px 16px; display: grid; gap: 10px; }

/* From 700px every song is open, so the whole set reads at a glance */
@media (min-width: 700px) {
  .song, .song.open { box-shadow: none; }
  .song-hd { pointer-events: none; padding: 20px 20px 14px; min-height: 0; }
  .song-chev { display: none; }
  .song-wrap { grid-template-rows: 1fr; }
  .song-in { visibility: visible; }
  .song-num { background: var(--ink); color: var(--paper); }
  .song-body { padding: 0 20px 20px; }
}

/* ── A song's player: the Reference / Play-along switch, play, where you
   are, and the time ── */
.player { min-width: 0; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px; transition: background-color .2s, border-color .2s; }
.player.playing { background: var(--aw-current); border-color: color-mix(in srgb, var(--orange) 22%, var(--line-soft)); }
.p-switch { display: none; background: var(--sunk); border-radius: 11px; padding: 3px; gap: 2px; }
.p-switch button {
  flex: 1; min-height: 40px; border: 0; background: none; border-radius: 8px; padding: 6px 10px;
  font-size: 15px; font-weight: 500; color: var(--ink-2); transition: background-color .15s, color .15s, box-shadow .15s;
}
.p-switch button:hover { color: var(--ink); }
.p-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgb(31 27 23 / .12); }
.player.playing .p-switch { background: color-mix(in srgb, var(--orange) 10%, var(--sunk)); }
.p-note { display: none; margin: 8px 2px 6px; font-size: 14px; line-height: 1.45; color: var(--ink-3); }
.p-native { font-size: 15px; margin: 10px 0 6px; }
.p-native:first-of-type { margin-top: 0; }
.p-native b { font-weight: 600; }
.p-native span { color: var(--ink-3); font-size: 14px; }
.player audio { display: block; width: 100%; height: 40px; }
.p-ui { display: none; align-items: center; gap: 12px; padding-left: 2px; }
.js .player audio, .js .p-native { display: none; }
.js .p-ui { display: flex; }
.js .p-switch { display: flex; }
.js .p-note { display: block; }
.p-btn {
  width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); transition: transform .18s var(--ease-out), opacity .15s;
}
.p-btn:hover { opacity: .9; }
.p-btn:active { transform: scale(.92); }
.p-btn svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.p-btn .p-pause, .p-btn .p-spin { display: none; }
.player.playing .p-btn .p-play { display: none; }
.player.playing .p-btn .p-pause { display: block; }
.player.loading .p-btn .p-play, .player.loading .p-btn .p-pause { display: none; }
.player.loading .p-btn .p-spin { display: block; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; animation: au-spin .8s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }
.p-main { flex: 1; min-width: 0; }
.p-line { display: flex; align-items: center; gap: 10px; }
.p-time { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 4.6em; text-align: right; }

/* The scrubber: a thin line that fills with ink as the track plays */
.p-seek {
  --p: 0%; flex: 1; min-width: 0; height: 28px; margin: 0; background: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.p-seek::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--ink) var(--p), var(--line) var(--p)); }
.p-seek::-moz-range-track { height: 4px; border-radius: 999px; background: var(--line); }
.p-seek::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--ink); }
.p-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .15s var(--ease-out); }
.p-seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .25); }
.p-seek:active::-webkit-slider-thumb { transform: scale(1.25); }
.p-seek:focus-visible { box-shadow: none; }
.p-seek:focus-visible::-webkit-slider-thumb { box-shadow: var(--aw-focus); }
.p-seek:disabled { cursor: default; opacity: .6; }

/* ── The chord chart ── */
.chart {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px 10px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none;
  transition: border-color .15s, background-color .15s, transform .18s var(--ease-out);
}
.chart:hover { border-color: var(--line-strong); background: var(--aw-hover); }
.chart:active { transform: scale(.985); }
.chart-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--sunk); color: var(--ink-2); display: grid; place-items: center; }
.chart-ic .i { width: 18px; height: 18px; }
.chart-t { flex: 1; min-width: 0; display: grid; }
.chart-t b { font-weight: 600; font-size: 15px; }
.chart-t span { font-size: 13px; color: var(--ink-3); }
.chart > .i { width: 18px; height: 18px; color: var(--ink-3); transition: transform .2s var(--ease-out); }
.chart:hover > .i { transform: translateX(2px); color: var(--ink); }

/* A role whose songs aren't ready yet */
.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 18px; padding: 24px 20px; }
.au .empty h3 { font-size: 24px; line-height: 1.15; }
.empty p { margin: 8px 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; max-width: 34em; }
.empty .btn { margin-top: 16px; }
@media (min-width: 1024px) { .empty .btn { display: none; } }

/* ── Tips ── */
.tips { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.bring { background: var(--aw-current); border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; position: relative; }
.au .bring h3 { font-family: var(--font-ui); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; font-weight: 600; color: var(--ink-2); margin: 0 0 4px; }
.bring p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink); }
.tips-intro { margin: 0 0 6px; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.tips-list { list-style: none; margin: 0; padding: 0; }
.tips-list li { position: relative; padding: 12px 0 12px 22px; border-top: 1px solid var(--line-soft); font-size: 16px; line-height: 1.55; color: var(--ink); }
.tips-list li:first-child { border-top: 0; }
.tips-list li::before { content: ''; position: absolute; left: 4px; top: calc(12px + .62em); width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.tip-note { display: block; margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
@media (min-width: 1024px) {
  .tips { padding: 22px 22px 14px; }
  .tips-list li { font-size: 15px; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: transform .18s var(--ease-out), background-color .15s, border-color .15s;
}
.btn:hover { border-color: var(--line-strong); }
.btn:active { transform: scale(.96); }
.btn .i { width: 17px; height: 17px; }
.icon-btn { width: 44px; height: 44px; padding: 0; flex: none; }

/* ── The chord chart viewer: the chart's pages, inside the page ──
   Full screen on a phone, a large sheet from 700px. Double-tap or the zoom
   button doubles the size; pinching works too. */
.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: var(--sunk); color: var(--ink); overflow: hidden;
}
.viewer[open] { display: flex; flex-direction: column; animation: au-up .4s var(--ease-sheet) both; }
.viewer::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@keyframes au-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) {
  .viewer { width: min(980px, calc(100vw - 48px)); height: calc(100dvh - 48px); margin: auto; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
}
.viewer-bar {
  display: flex; align-items: center; gap: 6px; flex: none;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px 18px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.viewer-t { flex: 1; min-width: 0; display: grid; }
.viewer-t h2 { margin: 0; font: 400 21px/1.2 var(--font-display); letter-spacing: -0.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-t span { font-size: 13px; color: var(--ink-3); }
.viewer-bar .btn { border-color: transparent; background: none; }
.viewer-bar .btn:hover { background: var(--sunk); }
.viewer-bar .btn.small { min-height: 40px; padding: 0 12px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.viewer .z-out { display: none; }
.viewer.zoomed .z-in { display: none; }
.viewer.zoomed .z-out { display: block; }
.viewer-pages {
  flex: 1; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 16px 12px calc(56px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 12px; justify-content: center;
}
.viewer-pages img {
  display: block; width: min(860px, calc(100vw - 24px)); height: auto; background: #fff;
  border-radius: 6px; box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 8px 24px -12px rgb(0 0 0 / .3);
}
@media (min-width: 700px) { .viewer-pages { padding: 24px 24px 64px; gap: 16px; } .viewer-pages img { width: min(760px, calc(100vw - 96px)); } }
.viewer.zoomed .viewer-pages { justify-content: start; }
.viewer.zoomed .viewer-pages img { width: min(1400px, calc(200vw - 48px)); }
@media (min-width: 700px) { .viewer.zoomed .viewer-pages img { width: 1400px; } }
.viewer-count {
  position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--paper); background: color-mix(in srgb, var(--ink) 82%, transparent);
  border-radius: 999px; padding: 5px 12px; pointer-events: none; transition: opacity .3s;
}
.viewer-count:empty { opacity: 0; }
html.viewer-open { overflow: hidden; }

/* ── Moving between the home page and a role: the role's name carries over
   into the title. Browsers without view transitions just change page. ── */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: .38s; animation-timing-function: cubic-bezier(.16,1,.3,1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
