/* Layouts for the album, guest games, financial records and wedding archive. */
.st-root {
  --st-ink: var(--theme-ink);
  --st-rule: var(--theme-line);
  --st-gap: clamp(1.2rem, 3vw, 3.5rem);
  color: var(--st-ink);
  min-width: 0;
  max-width: 78rem;
  margin-inline: auto;
}
.st-root *, .st-root { box-sizing: border-box; }
.st-root :is(h1,h2,h3,p,strong,small,b,button,summary,td,th) { overflow-wrap: anywhere; }
.st-root :is(section,article,figure,form,div) { min-width: 0; }
.st-root .st-heading {
  display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap;
  gap: .8rem 2rem; padding-block: .2rem 1rem; border-bottom: 1px solid var(--st-rule); margin: 0 0 var(--st-gap);
}
.st-root .st-heading h1 {
  margin: 0; max-width: 23ch;
  font: var(--heading-weight,500) clamp(2.45rem,5.1vw,5rem)/1 var(--serif);
  letter-spacing: -.045em; color: var(--st-ink);
}
.st-root .st-heading p { max-width: 55ch; margin: .6rem 0 0; }
.st-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; }
.st-root > .st-actions { margin-bottom: 1rem; }
.st-root .st-button, .st-pick {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  color: var(--st-ink); font: 650 .91rem/1.3 var(--sans);
}
.st-root a.st-button { padding-inline: 0; text-align: start; text-decoration: underline; text-underline-offset: .23em; }
.st-root button.st-button { color:var(--on-accent); background:var(--accent); }
.st-root button.st-button, .st-pick { padding: .55rem 1rem; cursor:pointer; }
.st-root :is(button,a,summary,input):focus-visible,.st-pick:focus-within { outline: 3px solid var(--stamp); outline-offset: 3px; }
.st-root .st-empty { border-block-start: 1px solid var(--st-rule); padding-block: .9rem; }
.st-empty p { margin: 0; }
.st-root .st-detail { border-block: 1px solid var(--st-rule); margin: 1rem 0 0; padding: .2rem 0; }
.st-detail summary { cursor: pointer; font-weight: 650; padding-block: .75rem; }
.st-root .panel { background: transparent; padding: 0; border: 0; box-shadow: none; border-radius: 0; }
.st-root .panel > h2:first-child { margin-top: 0; }
.st-root .row { gap: .75rem; flex-wrap: wrap; }
.st-root .tf-form { max-width: 55rem; }
.st-root .tf-form > button { justify-self: start; }
.st-root .st-form { max-width: 55rem; }

/* Keep the couple's chosen cover separate from actual guest submissions. */
.st-root .album-masthead {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(10rem,25%);
  align-items: end; gap: var(--st-gap); padding: 0 0 1.1rem; margin: 0;
  background: none; box-shadow: none; border: 0; border-bottom: 2px solid var(--st-ink);
}
.st-root .album-masthead .st-heading { display: block; border: 0; padding: 0; margin: 0; }
.st-root .album-masthead > img { width: 100%; height: clamp(5rem,8.5vw,8rem); margin:0; border: 0; box-shadow: none; transform: none; }
.st-root .album-masthead .st-actions { margin-top: .7rem; }
.st-section { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .2rem 1rem; min-height: 3rem; margin: 0 0 .6rem; }
.st-section > span,.st-print small,.st-board-head span,.game-score,.payment-register thead th,.payment-register small { font: .82rem/1.45 var(--mono,monospace); }
.st-photos { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(1.15rem,2.5vw,2.3rem) clamp(.8rem,1.75vw,1.5rem); align-items:start; }
.st-root button.st-print { display:block; padding:0; width:100%; color:var(--st-ink); text-align:left; background:none; border:0; border-radius:0; box-shadow:none; }
.st-print .proof-mount,.st-print .proof-caption,.st-print .proof-caption > span { display:block; }
.st-print .proof-mount :is(img,video) { display:block; width:100%; aspect-ratio:1.5; object-fit:cover; }
.st-print .proof-caption { padding: .6rem 0 .15rem; }
.st-print .proof-caption strong { display:block; font: var(--heading-weight,500) clamp(1.15rem,1.7vw,1.6rem)/1.1 var(--serif); }
.st-print small { display:block; color:var(--muted); margin-top:.3rem; }
@media(min-width:751px) {
  .st-photos:has(> :nth-child(3)) { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .st-photos:has(> :nth-child(3)) > * { grid-column:span 2; }
  .st-photos:has(> :nth-child(3)) > :first-child { grid-column:span 4; }
  .st-photos:has(> :nth-child(3)) > :nth-child(2) .proof-mount :is(img,video) { aspect-ratio:.76; }
  .st-photos:has(> :nth-child(3n + 1):last-child):has(> :nth-child(4)) > :nth-last-child(-n + 2) { grid-column:span 3; }
  .st-photos > :only-child { grid-column:span 2; }
  .st-photos:not(:has(> :nth-child(3))):has(> :nth-child(2)) { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.memory-spread { display:grid; grid-template-columns:minmax(0,2fr) minmax(12rem,.88fr); align-items:start; gap:var(--st-gap); }
.st-viewer { margin:0; }
.st-viewer :is(img,video) { display:block; width:100%; max-height:72vh; object-fit:contain; background:var(--theme-stock); }
.memory-caption .st-heading { display:block; border-top:2px solid var(--st-ink); padding:1rem 0; margin:0; border-bottom:0; }
.memory-caption .st-heading h1 { font-size:clamp(2rem,3.7vw,4rem); }
.memory-caption [data-save-one] { margin-top:1.45rem; }
.st-upload { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:center; gap:var(--st-gap); }
.upload-art img { width:100%; max-height:24rem; display:block; object-fit:contain; }
.upload-action p { max-width:34ch; }
.st-pick { position:relative; overflow:hidden; color:var(--on-accent); background:var(--accent); }
.st-pick input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; }
.moderation-spread { display:grid; grid-template-columns:minmax(0,1.9fr) minmax(14rem,1fr); gap:var(--st-gap); }
.review-requests { border-inline-start:1px solid var(--st-rule); padding-inline-start:var(--st-gap); }
.review-requests h2 { margin-top:0; }
.st-review article { padding-block-end:1.5rem; margin-block-end:1.5rem; border-bottom:1px solid var(--st-rule); }
.st-review :is(img,video) { width:100%; max-height:27rem; display:block; object-fit:contain; background:var(--theme-stock); }
.st-review article > div { display:flex; align-items:baseline; flex-wrap:wrap; gap:.5rem 1rem; padding-top:.8rem; }
.st-review article h2,.st-review article p { margin:0; }
.st-review .st-actions { flex-basis:100%; }
#app .st-review button[data-command="studio.reject"], #app .st-root button:is([data-command="studio.remove"],[data-command="studio.removeQuestion"],[data-command="studio.deleteSquare"]) {
  color:var(--st-ink); background:transparent; box-shadow:none; border:0; padding-inline:.3rem; text-decoration:underline; text-underline-offset:.2em;
}
[data-studio-screen="album-settings"] .tf-form, [data-studio-screen="expense-entry"] .st-form form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:1.1rem 1.7rem; }
.st-form .tf-form :is(p,button),[data-studio-screen="expense-entry"] .st-form .field:first-of-type { grid-column:1/-1; }
.st-form .tf-form .field { margin:0; }
.st-form .tf-form p { max-width:65ch; margin:0; }

/* Games have one play list, with the emblem next to its title. Questions are a single reading sequence. */
.st-root .game-library { border-top:2px solid var(--st-ink); }
.st-root .game-library .game-card { display:grid; grid-template-columns:4.5rem minmax(0,1fr) auto; column-gap:1.35rem; align-items:center; border:0; border-bottom:1px solid var(--st-rule); border-radius:0; padding:1rem 0; margin:0; }
.st-root .game-library .game-card > h2 { margin:0; align-self:end; font:var(--heading-weight,500) clamp(1.65rem,2.8vw,2.8rem)/1.05 var(--serif); }
.st-root .game-library .game-card > p { grid-column:2; align-self:start; margin:.3rem 0 0; color:var(--muted); }
.game-emblem { grid-column:1; grid-row:1/span 2; aspect-ratio:1; width:100%; display:grid; place-items:center; font:italic 3rem/1 var(--serif); background:var(--theme-tint); color:var(--st-ink); }
[data-game-stock="bingo"] .game-emblem { background:repeating-linear-gradient(90deg,transparent 0 22%,var(--st-rule) 22% 23%),repeating-linear-gradient(0deg,var(--theme-tint) 0 22%,var(--st-rule) 22% 23%); }
[data-game-stock="this-or-that"] .game-emblem { background:linear-gradient(110deg,var(--theme-stock) 50%,var(--theme-tint) 50%); font-size:1.6rem; }
.game-library [data-game-stock] > a { grid-column:3; grid-row:1/span 2; }
.game-score { display:flex; align-items:center; flex-wrap:wrap; gap:.65rem 1rem; padding:.65rem 0 1rem; }
.game-score progress { width:min(11rem,100%); height:6px; accent-color:var(--brand-surface); }
.st-root .question-sheets .game-card { grid-template-columns:minmax(0,.94fr) minmax(0,1.2fr); gap:.4rem var(--st-gap); padding-block:1.4rem; }
.question-sheets .game-card > small { grid-column:1; align-self:end; font: .82rem var(--mono,monospace); }
.st-root .question-sheets .game-card > h2 { grid-column:1; align-self:start; font-size:clamp(1.4rem,2.4vw,2.3rem); }
.question-sheets .game-options { grid-column:2; grid-row:1/span 2; }
.question-sheets .vote-option,.question-sheets .game-response { border-bottom:1px solid var(--st-rule); }
#app .question-sheets .vote-option button,.question-sheets .game-response { display:flex; align-items:center; justify-content:flex-start; gap:.8rem; width:100%; min-height:44px; margin:0; padding:.65rem .4rem; border:0; border-radius:0; background:none; color:var(--st-ink); box-shadow:none; text-align:start; line-height:1.4; }
.question-sheets :is(.vote-option button,.game-response)::before { content:""; flex:none; width:.85rem; height:.85rem; border:1.5px solid currentColor; border-radius:50%; }
#app .question-sheets .vote-option.picked button,.question-sheets .game-response.picked { background:var(--theme-tint); font-weight:700; }
.question-sheets .picked button::before,.question-sheets .game-response.picked::before { background:currentColor; box-shadow:inset 0 0 0 2px var(--theme-tint); }
.st-two,.board-editor { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,.85fr); gap:1.25rem var(--st-gap); align-items:start; }
.st-two > .panel + .panel,.board-settings { border-inline-start:1px solid var(--st-rule); padding-inline-start:var(--st-gap); }
.board-settings { grid-column:2; grid-row:1; }
.board-prompt { grid-column:1; grid-row:1; }
.board-index { grid-column:1/-1; border-top:2px solid var(--st-ink); }
.board-index .row,.st-two .row { display:flex; justify-content:space-between; align-items:baseline; }
.board-index .row small { font: .82rem var(--mono,monospace); }
.st-board-wrap { background:var(--theme-paper); padding:clamp(.65rem,1.4vw,1.3rem); border-top:5px solid var(--bookcloth); }
.st-board-head { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:.3rem .75rem; padding-bottom:.75rem; }
.st-board-head strong { font:var(--heading-weight,500) clamp(1.5rem,2.4vw,2.35rem)/1.1 var(--serif); }
.st-board-scroll { overflow-x:auto; }
.st-board { display:grid; grid-template-columns:repeat(var(--st-cols),minmax(65px,1fr)); gap:1px; border:1px solid var(--st-rule); background:var(--st-rule); }
.st-root button.st-square { position:relative; display:flex; flex-direction:column; justify-content:space-between; align-items:flex-start; gap:.5rem; min-height:clamp(5.7rem,8.5vw,8.3rem); padding:clamp(.4rem,1vw,1rem); background:var(--theme-sheet); color:var(--st-ink); border:0; border-radius:0; box-shadow:none; text-align:left; }
.st-square small { font:.8rem var(--mono,monospace); }
.st-square span { font:var(--heading-weight,500) clamp(1rem,1.6vw,1.55rem)/1.1 var(--serif); }
.st-root button.st-square.st-marked { background:var(--accent); color:var(--on-accent); }
.st-square b { position:absolute; top:.4rem; right:.4rem; }
.square-spread { display:flex; align-items:center; flex-wrap:wrap; gap:var(--st-gap); }
.square-location { display:grid; width:clamp(4.5rem,13vw,9rem); grid-template-columns:repeat(var(--st-cols),1fr); gap:2px; }
.square-location span { aspect-ratio:1; background:var(--theme-stock); border:1px solid var(--st-rule); }
.square-location .current { background:var(--stamp); }
.square-location .marked { background:var(--bookcloth); }
.st-answer { flex:1 1 18rem; max-width:33rem; }
.game-setup { display:grid; justify-items:start; gap:.5rem; }
.game-setup label { display:flex; align-items:center; gap:.65rem; min-height:42px; }
.game-setup input[type=checkbox] { width:auto; }

/* Financial pages share the alignment of a ledger, without a panel around the table. */
.expenses-spread { display:grid; grid-template-columns:minmax(12rem,.84fr) minmax(0,1.9fr); gap:var(--st-gap); align-items:start; }
.st-ledger { border-top:4px solid var(--bookcloth); padding-top:1rem; }
.st-ledger > div:first-child { display:grid; gap:.35rem; }
.st-ledger strong,.payment-amount h2 { font:var(--heading-weight,500) clamp(2.2rem,3.8vw,4.4rem)/1.1 var(--serif); color:var(--st-ink); font-variant-numeric:lining-nums tabular-nums; }
.st-ledger > div:last-child { margin-top:1.15rem; }
.st-ledger > div:last-child p { display:flex; justify-content:space-between; gap:.6rem; padding:.5rem 0; margin:0; border-top:1px solid var(--st-rule); }
.st-ledger b { font: .9rem var(--mono,monospace); }
.payment-history h2 { margin-top:0; }
.payment-register { width:100%; border-collapse:collapse; table-layout:fixed; text-align:start; }
.payment-register :is(th,td) { padding:.7rem .4rem; text-align:start; vertical-align:top; border-bottom:1px solid var(--st-rule); }
.payment-register thead th { color:var(--muted); border-bottom:2px solid var(--st-ink); }
.payment-register thead th:first-child { width:46%; }
.payment-register thead th:last-child { width:28%; }
.payment-register .register-amount,.payment-register thead th:last-child { text-align:end; font-variant-numeric:tabular-nums; }
.payment-register small { display:block; margin-top:.2rem; color:var(--muted); }
.payment-register th[scope=row] a { color:var(--st-ink); text-underline-offset:.2rem; }
.receipt-spread { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:var(--st-gap); align-items:start; }
.payment-amount h2 { margin:0; }
.receipt-spread .st-detail { margin:0; }
.archive-spread { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); align-items:start; gap:var(--st-gap); }
.archive-cover { margin:0; }
.archive-cover img { display:block; width:100%; aspect-ratio:4/3; }
.archive-record .st-keepsake { padding-bottom:1rem; }
.st-keepsake h2 { font:var(--heading-weight,500) clamp(2rem,3.8vw,4rem)/1.03 var(--serif); margin:.25rem 0 .7rem; }
.archive-record > .panel { padding-top:1.3rem; border-top:2px solid var(--st-ink); margin-top:1.2rem; }
@media(max-width:750px) {
  .st-root .st-heading { padding-bottom:.75rem; margin-bottom:1rem; }
  .st-root .album-masthead { grid-template-columns:minmax(0,1fr) 26%; gap:.65rem; }
  .st-root .album-masthead > img { grid-row:auto; height:5rem; }
  .st-photos { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .st-photos > :first-child { grid-column:1/-1; }
  .st-print small { font-size:.75rem; }
  .memory-spread,.moderation-spread,.st-two,.board-editor,.expenses-spread,.receipt-spread,.archive-spread { grid-template-columns:minmax(0,1fr); }
  .memory-caption .st-heading { border:0; }
  .memory-caption [data-save-one] { margin-top:.65rem; }
  .review-requests,.st-two > .panel + .panel,.board-settings { padding-inline-start:0; border-inline-start:0; border-block-start:1px solid var(--st-rule); padding-top:1rem; }
  .st-upload { grid-template-columns:minmax(4rem,.6fr) minmax(0,1.4fr); }
  .board-editor > * { grid-column:1; grid-row:auto; }
  .board-prompt { order:-1; }
  .st-root .game-library [data-game-stock] { grid-template-columns:3.5rem minmax(0,1fr); gap:.15rem .85rem; }
  .game-library [data-game-stock] > a { grid-column:2; grid-row:auto; justify-self:start; }
  .game-library .game-emblem { grid-row:1/span 3; }
  .st-root .question-sheets .game-card { display:block; padding-block:1rem; }
  .st-root .question-sheets .game-card > h2 { margin:.45rem 0 .6rem; }
  .st-board-head span { font-size:.75rem; }
  .payment-register { font-size:.85rem; }
  .payment-register :is(th,td) { padding:.65rem .2rem; }
  .payment-register thead th,.payment-register small { font-size:.72rem; }
  .archive-cover img { aspect-ratio:2.8; }
}
@media(max-width:440px) {
  [data-studio-screen="album-settings"] .tf-form,[data-studio-screen="expense-entry"] .st-form form { grid-template-columns:minmax(0,1fr); }
  .square-location { width:4.5rem; }
}
