:root {
  /* Lop Galley: Lop Press cyan (BrandPalette.Galley). */
  --accent: #0e7490; --accent-ink: #ffffff; --accent-soft: #cffafe; --ink: #1f2937; --muted: #6b7280;
  --line: #e5e7eb; --page: #f8fafc; --card: #ffffff; --ok: #15803d; --bad: #b91c1c; --warn: #92400e;
  --bad-soft: #fef2f2; --field-line: #dbe3e8; --field-hover: #b6c6cf;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --accent: #67e8f9; --accent-ink: #082f37; --accent-soft: #164e63; --ink: #f3f4f6; --muted: #9ca3af; --line: #334155; --page: #0f172a; --card: #1e293b; --ok: #4ade80; --bad: #f87171; --warn: #fbbf24; --bad-soft: #3b1515; --field-line: #3b4a5c; --field-hover: #56677c; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
h1 { font-size: 26px; line-height: 1.2; margin: 4px 0 8px; }
h2 { font-size: 20px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--bad); margin: 0; }

a { color: var(--accent); text-underline-offset: 2px; }
a.brand { color: var(--ink); text-decoration: none; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 800; }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.panel { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 15px; }
/* Text boxes: rounded and soft, with a gentle glow instead of a hard ring when in use. */
input[type=email], input[type=password], input[type=text], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border: 1.5px solid var(--field-line); border-radius: 14px;
  background: var(--card); font-weight: 400; font-size: 16px; box-shadow: 0 1px 2px rgb(0 0 0 / .04);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
input[type=email]:hover, input[type=password]:hover, input[type=text]:hover, input[type=number]:hover, input[type=date]:hover, input[type=search]:hover, select:hover, textarea:hover { border-color: var(--field-hover); }
input[type=email]:focus, input[type=password]:focus, input[type=text]:focus, input[type=number]:focus, input[type=date]:focus, input[type=search]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:disabled, select:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
textarea { resize: vertical; min-height: 96px; font-family: ui-monospace, Menlo, Consolas, monospace; }
input[type=search] { border-radius: 999px; padding-left: 20px; }
button:focus-visible, a:focus-visible, input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 700; cursor: pointer; }
a.button.primary { background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: 9px 14px; font-weight: 700; text-decoration: none; display: inline-flex; }
button.primary:disabled { opacity: .6; cursor: wait; }
button.secondary { background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; cursor: pointer; font-weight: 600; }
button.danger { background: transparent; border: 1px solid var(--line); color: var(--bad); border-radius: 10px; padding: 7px 12px; cursor: pointer; font-weight: 600; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 600; justify-self: start; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 2; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 18px; }
.card h3 { margin: 0; padding: 12px 16px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 16px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; font-size: 13px; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip { display: inline-block; font-size: 13px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; white-space: nowrap; }
.chip.plain { background: var(--line); color: var(--ink); }
.rows > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.rows > div:first-child { border-top: 0; }
.rows .title { font-weight: 600; }
select { appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("chevron.svg");
  background-repeat: no-repeat; background-position: right 16px center; }
a.button { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
button.small { padding: 7px 12px; }
.back { display: inline-block; margin-bottom: 8px; color: var(--accent); text-decoration: none; font-weight: 600; font-size: 14px; }
.block { display: block; }
.form { display: grid; gap: 14px; margin-bottom: 18px; }
.form.narrow { max-width: 520px; }
.form .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.form textarea { font-family: inherit; }
.form .group { display: grid; gap: 12px; }
.form .group[hidden], .form .grid[hidden] { display: none; }
.field { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
h2.sub { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 8px 0 -4px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
.checklist > label.check.row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); margin: 0; cursor: pointer; }
.checklist > label.check.row:first-child { border-top: 0; }
.actions.bar { margin-top: 4px; }
.search { margin-bottom: 14px; max-width: 420px; }
tr.click, .rows > div.click { cursor: pointer; }
tr.click:hover td, .rows > div.click:hover { background: var(--page); }
.cardfoot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.cardfoot a { color: var(--accent); font-weight: 600; text-decoration: none; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tab { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600; }
.tab[aria-selected=true] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.note > div + div { margin-top: 4px; }
.rows .value { text-align: right; font-weight: 600; }
button.link.inline { display: inline; font-size: inherit; }
.hint { font-weight: 400; }
.banner { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; padding: 10px 16px; background: var(--accent-soft); font-size: 14px; text-align: center; }
.empty { padding: 16px; color: var(--muted); }
.note { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: 10px; font-weight: 600; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding: 8px 12px; border-bottom: 1px solid var(--line); }
  main { padding: 16px; }
  .top { padding: 10px 16px; }
  .lockstate .label { display: none; }
  th, td { padding: 9px 12px; }
  .hide-narrow { display: none; }
}
@media print {
  .top, .side, .actions, .lockstate, .banner, button, .back, .noprint, .search, .cardfoot { display: none !important; }
  .shell { display: block; }
  .card { break-inside: avoid; border-color: #ccc; }
  body { background: #fff; color: #000; }
}
.picks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; }
.picks .pick { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink); }
.picks .pick:hover { border-color: var(--field-hover); }
.picks .pick.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.picks .count { color: var(--muted); font-weight: 400; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chips a.chip { text-decoration: none; padding: 6px 12px; }
.swaplist { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.swaplist label.check { align-items: flex-start; }
.extra.swap { flex-direction: column; align-items: stretch; }
.warn { color: var(--warn); }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 8px; }
legend { font-weight: 600; padding: 0 4px; }
/* Share pickers: one table, three fixed columns (box, name, value), one line per row. */
.checklist > label.check.row > .name, .checklist > label.check.row > .value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checklist > label.check.row > .value { text-align: right; max-width: 45vw; }
.checklist > label.check.row.auto { cursor: default; }
.checklist > label.check.row.auto > .value { color: var(--muted); }
.tag { font-size: 12px; font-weight: 600; color: var(--accent); margin-left: 8px; }
label.check.allrow { padding: 12px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--line); font-weight: 600; margin: 0; }
.allgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; padding: 12px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.allgrid label.check { font-weight: 600; }
.sublabel { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin-top: 4px; }
@media (max-width: 760px) { .allgrid { grid-template-columns: 1fr; gap: 6px; } .checklist .tag { display: none; } }

/* Continue with Google / Apple */
.ssos{display:grid;gap:10px}
.sso{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:11px 16px;border-radius:10px;font:inherit;font-weight:700;cursor:pointer;border:1px solid var(--line);background:var(--card);color:var(--ink)}
.sso[hidden]{display:none}
.sso.apple{background:#000;color:#fff;border-color:#000}
.sso svg{width:18px;height:18px;flex:none}
.sso:disabled{opacity:.6;cursor:default}
.or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px;margin-top:4px}
.or:before,.or:after{content:"";flex:1;height:1px;background:var(--line)}
.provider{display:flex;gap:8px;align-items:center}
.provider svg{width:18px;height:18px;flex:none}
.ok{color:var(--ok);font-weight:600}

/* Phone-width lists: long text wraps on the left, and the details block stays right-aligned on its
   own side instead of dropping under the text (rows) or ragging left (tables). */
@media (max-width: 760px) {
  table tr > :last-child:not(:first-child):not(.num) { text-align: right; width: 42%; }
  .rows > div { flex-wrap: nowrap; }
  .rows > div > :first-child { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
  .rows > div > :last-child:not(:first-child) { flex: 0 1 auto; max-width: 55%; text-align: right; margin-left: auto; }
  .rows > div > button:last-child, .rows > div > a.button:last-child { flex-shrink: 0; white-space: nowrap; }
}

/* Mod lists: the jewelry or details as a softer accent line under the name. */

/* Passkeys: the unlock box and the "Unlock with your fingerprint or face next time?" offer. */

/* Lop Troupe additions */
.topright { display: flex; align-items: center; gap: 10px; }
.topright select { min-height: 38px; padding: 6px 40px 6px 12px; border-radius: 10px; width: auto; }
.topright a { color: var(--accent); font-weight: 600; text-decoration: none; }
.date { display: grid; place-items: center; width: 52px; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent); padding: 4px 0; line-height: 1.1; }
.date b { font-size: 20px; }
.date span { font-size: 12px; text-transform: uppercase; font-weight: 700; }
.gig { display: flex; gap: 14px; align-items: center; min-width: 0; }
.twocol { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.lyrics h4 { margin: 14px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.lyrics p { margin: 0; white-space: pre-wrap; font-size: 17px; }
.pad { padding: 12px 16px; }
.pad > p { margin: 4px 0; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; padding: 12px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.money { font-variant-numeric: tabular-nums; }
tr.break td { color: var(--muted); font-style: italic; }
.rowbtns { display: inline-flex; gap: 4px; }
.rowbtns button { padding: 3px 8px; font-size: 13px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal .dow { padding: 6px 8px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.cal .day { min-height: 96px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; align-content: start; gap: 4px; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.other { background: var(--page); color: var(--muted); }
.cal .day.today .n { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 7px; }
.cal .n { font-size: 13px; font-weight: 700; justify-self: start; }
.cal .ev { font-size: 12px; line-height: 1.3; padding: 3px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--ink); overflow: hidden; text-overflow: ellipsis; cursor: pointer; border: 0; text-align: left; }
.cal .ev.gig { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.cal .ev.away { background: var(--line); color: var(--muted); }
.cal .ev.open { background: transparent; color: var(--ok); padding: 0 2px; cursor: default; }
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgb(0 0 0 / .4); }
dialog h2 { margin-bottom: 2px; }
dialog .group { max-height: 62vh; overflow: auto; padding: 2px 4px 2px 2px; }
.part { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.stage { display: none; }
@media (max-width: 760px) {
  .twocol { grid-template-columns: 1fr; }
  .cal .day { min-height: 64px; padding: 4px; }
  .cal .ev { font-size: 11px; padding: 2px 4px; }
  .kv { grid-template-columns: 110px 1fr; }
  .topright #band-site { display: none; }
}
@media print {
  body.print-stage main > :not(.stage) { display: none !important; }
  body.print-stage .stage { display: block; }
  .stage h1 { font-size: 26px; margin: 0 0 4px; }
  .stage p.sub { margin: 0 0 18px; color: #555; }
  .stage .song { font-size: 30px; font-weight: 800; margin: 0 0 8px; }
  .stage .brk { font-size: 16px; color: #666; margin: 0 0 8px; }
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg button { border: 0; background: transparent; padding: 8px 16px; font-weight: 600; cursor: pointer; color: var(--ink); }
.seg button.on { background: var(--accent-soft); color: var(--accent); }
.num-badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; margin-right: 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; vertical-align: 1px; }

/* The player bar: YouTube's player (from the player page) along the bottom, over everything but the dialog. */
.playerbar { position: fixed; left: 0; right: 0; bottom: 0; height: 112px; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08); z-index: 20; }
.playerbar iframe { width: 100%; height: 100%; border: 0; display: block; }
.playerbar .close { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
body.playing { padding-bottom: 112px; }
body.playing .toast { bottom: 132px; }
@media print { .playerbar { display: none; } }

/* Stage plot editor (Print pack): the stage to scale, the audience at the bottom. */
.plotcols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.plotcard { padding: 12px; }
svg.plot { width: 100%; height: auto; display: block; touch-action: none; user-select: none; }
svg.plot .floor { fill: var(--page); stroke: var(--ink); stroke-width: .6; }
svg.plot .grid line { stroke: var(--line); stroke-width: .25; }
svg.plot .aud { fill: var(--muted); font-weight: 700; }
svg.plot .piece { cursor: grab; }
svg.plot .piece text { fill: var(--ink); pointer-events: none; }
svg.plot .piece rect { fill: color-mix(in srgb, var(--muted) 45%, var(--card)); stroke: var(--ink); stroke-width: .3; }
svg.plot .piece.riser rect { fill: color-mix(in srgb, var(--muted) 15%, var(--card)); stroke: var(--muted); }
svg.plot .piece.power rect { fill: var(--card); }
svg.plot .piece circle { fill: var(--card); stroke: var(--accent); stroke-width: .7; }
svg.plot .piece.wedge path { fill: var(--ink); }
svg.plot .piece.wedge text { fill: var(--page); }
svg.plot .piece.sel rect, svg.plot .piece.sel circle, svg.plot .piece.sel path { stroke: var(--accent); stroke-width: 1; }
svg.plot .piece.bad rect, svg.plot .piece.bad circle, svg.plot .piece.bad path { stroke: var(--bad); stroke-width: 1; }
svg.plot .piece.bad text { fill: var(--bad); }
@media (max-width: 760px) { .plotcols { grid-template-columns: 1fr; } }
.cardfoot.bad { color: var(--bad); }

/* Stage mode (free) and the Live Helper pack: one song at a time in big type, the setlist down the side on wide screens. */
body.stage-on { overflow: hidden; }
body.stage-on .toast { z-index: 60; }
.stagemode { --sm-bg: var(--page); --sm-ink: var(--ink); --sm-muted: var(--muted); --sm-accent: var(--accent);
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--sm-bg); color: var(--sm-ink); }
.lyr-30 { --lyr: 30px; } .lyr-32 { --lyr: 32px; } .lyr-38 { --lyr: 38px; } .lyr-46 { --lyr: 46px; }
.stagemode.themed { --sm-bg: #000; --sm-ink: #f5f5f4; --sm-muted: #a8a29e; --sm-accent: #fbbf24; color-scheme: dark; }
.stagemode.red { --sm-ink: #f87171; --sm-muted: #7f1d1d; --sm-accent: #ef4444; }
.sm-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid color-mix(in srgb, var(--sm-muted) 35%, transparent); }
.sm-where { color: var(--sm-muted); font-size: 14px; text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-main { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr); }
.sm-lyrics { overflow-y: auto; padding: 18px 24px 400px; min-width: 0; overscroll-behavior: contain; }
.sm-title { font-size: calc(var(--lyr) + 8px); line-height: 1.1; margin: 0 0 6px; overflow-wrap: anywhere; }
.sm-detail, .sm-parts { color: var(--sm-muted); font-size: 18px; margin: 0 0 4px; }
.sm-sec { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sm-accent); margin: 18px 0 4px; }
.stagemode:not(.themed) .sm-sec { color: var(--sm-muted); }
.sm-ly { font-size: var(--lyr); line-height: 1.3; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.themed .sm-ly, .themed .sm-cl { font-weight: 700; }
.sm-cl { font-size: var(--lyr); line-height: 1.2; margin: 2px 0; }
.sm-cl .cw { display: inline-block; white-space: pre; vertical-align: bottom; }
.sm-cl .cw b { display: block; min-height: 1.2em; font-size: .62em; color: var(--sm-accent); }
.sm-side { border-left: 1px solid color-mix(in srgb, var(--sm-muted) 35%, transparent); padding: 4px 18px 18px; overflow-y: auto; }
.sm-side .sm-sec { margin-top: 14px; }
.sm-side p { margin: 6px 0 0; font-size: 17px; }
.sm-side .sm-brk { color: var(--sm-muted); }
.sm-key { color: var(--sm-muted); font-size: 14px; }
.sm-hint { color: var(--sm-muted); font-size: 13px !important; margin-top: 18px !important; }
.sm-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 16px 14px; border-top: 1px solid color-mix(in srgb, var(--sm-muted) 35%, transparent); }
.sm-speed { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--sm-muted); }
.sm-reading { position: absolute; left: 0; width: 6px; height: 48px; border-radius: 0 3px 3px 0; background: var(--sm-accent); pointer-events: none; }
.sm-dot { position: absolute; right: 316px; top: 12px; width: 16px; height: 16px; border-radius: 50%; background: var(--sm-accent); pointer-events: none; }
.sm-dot.off { opacity: .15; }
.sm-count { position: absolute; inset: 0; background: #000; color: #f5f5f4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; z-index: 2; }
.red .sm-count { color: #f87171; }
.sm-count .n { font-size: 140px; font-weight: 800; line-height: 1; }
.sm-count .beats { display: flex; gap: 14px; }
.sm-count .beats i { width: 52px; height: 52px; border-radius: 50%; border: 2px solid #57534e; }
.sm-count .beats i.hit { background: var(--sm-accent, #fbbf24); border-color: var(--sm-accent, #fbbf24); box-shadow: 0 0 22px color-mix(in srgb, var(--sm-accent, #fbbf24) 60%, transparent); }
.sm-cap { color: #a8a29e; margin: 0; }
.themed .button.secondary, .themed button.secondary { background: transparent; color: var(--sm-ink); border-color: #44403c; }
@media (max-width: 760px) {
  .sm-main { grid-template-columns: 1fr; }
  .sm-side { display: none; }
  .sm-dot { right: 12px; }
  .sm-lyrics { padding: 14px 16px 400px; }
  .sm-bar button { padding-left: 10px; padding-right: 10px; }
}
@media print { .stagemode { display: none; } }
.scrollx { overflow-x: auto; }

/* Short choice lists as buttons (field() in app.js; same rule on phones, Windows and Lop Forma's web app). */
div.field { display: grid; gap: 6px; font-weight: 600; }
.choice { display: flex; gap: 6px; flex-wrap: wrap; }
.choice button { flex: 1 1 auto; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); color: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.choice button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---- Lop Galley ---- */
.ssos { display: grid; gap: 8px; }
.sso { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 10px 14px; font-weight: 600; cursor: pointer; }
.sso svg { width: 18px; height: 18px; }
.mark.small-mark { width: 20px; height: 20px; border-radius: 6px; font-size: 12px; }
.or { text-align: center; color: var(--muted); font-size: 13px; }
.top { flex-wrap: wrap; }
.toplinks { display: flex; gap: 4px; flex: 1; }
.toplinks a { padding: 6px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.toplinks a[aria-current=page] { background: var(--accent-soft); color: var(--accent); }
.topright { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-block; align-self: center; line-height: 1.4; font-size: 13px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.warn { color: var(--warn); border-color: var(--warn); }
main { max-width: 1240px; margin: 0 auto; }
h3 { font-size: 16px; margin: 0 0 8px; }
.mono, code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.sub { color: var(--muted); font-size: 14px; }
.ok-t { color: var(--ok); font-weight: 600; }
.bad-t { color: var(--bad); font-weight: 600; }
.pad { padding: 14px 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid3 { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.note.warn { background: var(--bad-soft); color: var(--bad); }
.note.ok { background: transparent; border: 1px solid var(--ok); color: var(--ok); }
.note.plain { background: var(--page); border: 1px solid var(--line); }

/* The six-step bar: on every editor screen, so what is left before a batch is always in view. */
.stp { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 18px; }
.stp-row { display: flex; align-items: center; gap: 8px; padding: 14px 16px; overflow-x: auto; }
.stp-i { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; cursor: pointer; background: none; border: 0; text-align: left; min-width: max-content; }
.stp-i:hover { background: var(--page); }
.stp-i.on { background: var(--accent-soft); }
.stp-i b { display: block; font-size: 15px; }
.stp-s { font-size: 13px; color: var(--muted); }
.stp-s.w { color: var(--bad); }
.stp-ln { flex: 1; min-width: 12px; height: 2px; background: var(--line); }
.stp-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sp { flex: 1; }
.mk { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); background: var(--card); flex: none; }
.mk.cur { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mk.done { border-color: var(--ok); color: var(--ok); }
.mk.warn { border-color: var(--bad); color: var(--bad); }

/* Choice buttons (up to four short choices, the rule for every Lop-Ear app). */
.choice { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.choice button { border: 0; border-right: 1px solid var(--line); background: transparent; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.choice button:last-of-type { border-right: 0; }
.choice button.on { background: var(--accent); color: var(--accent-ink); }

/* The data grid: a cell a field can't use is red and says why. */
.gridwrap { overflow: auto; max-height: 560px; }
table.g { font-size: 14px; }
table.g th, table.g td { padding: 7px 10px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
table.g thead th { position: sticky; top: 0; background: var(--card); z-index: 1; }
table.g td.rn { color: var(--muted); font-variant-numeric: tabular-nums; }
table.g td.bad { color: var(--bad); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--bad); background: var(--bad-soft); }
table.g tr.badrow td.rn { color: var(--bad); font-weight: 700; }

.steplist { display: grid; }
.step { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.step:first-child { border-top: 0; }
.step.sel { background: var(--accent-soft); }
.step.off b, .step.off .sub { text-decoration: line-through; opacity: .6; }
.step .tools { display: flex; gap: 4px; align-items: center; }
.icon { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; cursor: pointer; font-weight: 700; }
.map { display: grid; grid-template-columns: minmax(0, 13rem) 1rem minmax(0, 1fr) minmax(0, 9rem); gap: 8px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); }
.map:first-child { border-top: 0; }
.map > :first-child, .map > :last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map.check, .map.member { grid-template-columns: minmax(0, 1fr) 0 auto auto; }
.map.check > :last-child, .map.member > :last-child { overflow: visible; }
.map.miss code:first-child { color: var(--bad); }
.map input { min-height: 38px; padding: 6px 12px; border-radius: 10px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.arrow { color: var(--muted); }
.frame { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rowpick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.prog { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 8px 0; }
.prog > div { height: 100%; background: var(--accent); transition: width .4s ease; }
pre.code { background: var(--page); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow: auto; font-size: 13px; white-space: pre; margin: 0; }
.files { display: grid; }
.files > div { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); }
.files > div:first-child { border-top: 0; }
.drop { border: 1.5px dashed var(--field-line); border-radius: 12px; padding: 14px; text-align: center; color: var(--muted); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); width: min(560px, calc(100vw - 32px)); padding: 20px; }
dialog::backdrop { background: rgb(0 0 0 / .35); }
input[type=file] { font-size: 14px; }
@media (max-width: 700px) { .map { grid-template-columns: 1fr; } .toplinks { order: 3; flex-basis: 100%; } }
