/* Structure only. Each pack's page.css gives its section the look. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: #111114; color: #e8e8ee; font: 500 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }

/* the toolbar */
.bar { position: sticky; top: 0; z-index: 2147483600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 14px; background: #111114f2; border-bottom: 1px solid #2c2c33; backdrop-filter: blur(6px); }
.bar h1 { margin: 0 6px 0 0; font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.bar .grp { display: inline-flex; align-items: center; gap: 4px; }
.bar .grp > span { color: #9a9aa6; font-size: 12px; margin-right: 2px; }
.bar a, .bar button { padding: 5px 10px; border: 1px solid #3a3a44; border-radius: 7px; background: #1c1c22; color: inherit; font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.bar a:hover, .bar button:hover { background: #26262e; }
.bar button[aria-pressed=true] { background: #e8e8ee; color: #111114; border-color: #e8e8ee; }
.bar a:focus-visible, .bar button:focus-visible { outline: 2px solid #7ab7ff; outline-offset: 2px; }
.bar output { min-width: 78px; font: 12px/1 ui-monospace, Menlo, monospace; color: #9a9aa6; }
.bar .sp { flex: 1; }
.bar .nav-group { margin-left: 8px; color: #9a9aa6; font-size: 12px; }

/* a pack's section */
.upf-pack { position: relative; padding: 44px max(20px, calc((100% - 1540px) / 2)) 64px; overflow: hidden; }
.upf-head { margin-bottom: 28px; }
.upf-links { margin: 12px 0 0; font-size: 13px; opacity: .8; }
.upf-links a { color: inherit; }
.upf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 20px; }
.upf-cell { position: relative; display: flex; flex-direction: column; min-width: 0; }
.upf-stage { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; align-content: center; gap: 14px; width: 100%; height: 220px; margin: 0; padding: 8px; }
.upf-cap { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: start; padding: 8px 12px 10px; }
.upf-cap b { grid-column: 1; }
.upf-cap span { grid-column: 1; font-size: 13px; }
.upf-replay { grid-column: 2; grid-row: 1 / span 2; align-self: center; padding: 5px 9px; border: 1px solid currentColor; border-radius: 6px; background: none; color: inherit; font: inherit; font-size: 12px; opacity: .75; cursor: pointer; }
.upf-replay:hover, .upf-replay:focus-visible { opacity: 1; }
@media (max-width: 420px) { .upf-pack { padding: 28px 12px 40px; } .upf-grid { grid-template-columns: 1fr; } }

/* the single stage (stage.html) and the poster (poster.html) */
body.solo { background: transparent; }
body.solo .upf-pack:not(.upf-poster) { min-height: 100vh; padding: 0; display: grid; place-items: center; }
body.solo .upf-cell { width: 360px; }
.upf-poster { width: 1600px; height: 1000px; padding: 34px 50px 30px; display: flex; flex-direction: column; }
.upf-poster .upf-head { flex: 1; min-height: 0; margin: 0; display: flex; align-items: center; }
.upf-poster .upf-grid { grid-template-columns: repeat(4, 360px); gap: 14px 20px; justify-content: space-between; }
.upf-poster .upf-cap { padding: 5px 10px 6px; }

/* contract 2 posters hold seventeen tiles: five columns, with the masthead taking three places in the first row */
.upf-poster.upf-poster-wide { width: 1940px; height: 1100px; padding: 30px 38px; display: block; }
.upf-poster-wide .upf-grid { grid-template-columns: repeat(5, 360px); gap: 12px 16px; justify-content: space-between; }
.upf-poster-wide .upf-head { grid-column: span 3; flex: none; margin: 0; display: flex; align-items: center; min-width: 0; min-height: 0; }

/* the relabel sheet (relabel.html): two uses side by side */
body.solo .upf-pack.upf-relabel { display: block; min-height: 0; padding: 26px 40px 34px; width: 1600px; }
.upf-relabel-note { margin: 0 0 14px; font-size: 15px; opacity: .8; }
.upf-uses { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.upf-use h2 { margin: 0 0 12px; font-size: 26px; line-height: 1.1; }
.upf-relabel .upf-grid { grid-template-columns: repeat(2, 360px); gap: 10px 20px; justify-content: space-between; }
.upf-relabel .upf-cap { padding: 5px 10px 6px; }
