/*
 * 誌面スタジオ — the app's own layer over the PMA design system (static/design/tokens.css + components.css, vendored
 * from design/ by `python -m shimen vendor-design` and by the Dockerfile). Every colour is a token; none is defined here.
 *
 * Direction: the 校正台 (proofing desk). Proofs are white paper lying on the grey desk (surface-sunk), with トンボ at the
 * sheet's corners and a soft ノド in the gutter. Red is the proofreader's pen and nothing else: a 赤字 is the person's own
 * mark, which the design system's "your move" red (ball-client) already means. Where a later 校 answered a 赤字, the
 * mark turns into a lagoon ring (status ok). History is a stack of 校 sheets, not a log table.
 * Depth: 1px rules; the only shadow is on what floats (the 赤字 note, the zoom, the PDF menu).
 * Classes: s-* (shimen). Base unit 4px; panel padding 16px; sections 48px apart; the spread always wins the screen.
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block-end: 7rem; }
body {
  margin: 0;
  background: var(--pma-paper);
  color: var(--pma-ink);
  font-family: var(--pma-font-sans);
  font-size: var(--pma-text-base);
  line-height: var(--pma-leading-ui);
  letter-spacing: var(--pma-tracking-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; line-height: var(--pma-leading-heading); word-break: auto-phrase; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ol, ul { margin: 0; padding: 0; }
a { color: var(--pma-link); text-underline-offset: 0.2em; }
img { max-inline-size: 100%; }
q { quotes: "「" "」"; }
:focus-visible { outline: var(--pma-focus-outline); outline-offset: 2px; }
[hidden] { display: none !important; }
[lang="en"] { font-family: var(--pma-font-display); font-variant-numeric: lining-nums tabular-nums; }
.s-ico { inline-size: 1.15em; block-size: 1.15em; flex: none; }

/* ---------------------------------------------------------------- layout, shell (same shape as teian) */
.s-wrap { max-width: var(--pma-page-max); margin: 0 auto; padding: 0 var(--pma-gutter); }
.s-wrap--wide { max-width: 92rem; }
.s-main { padding-block: var(--pma-space-6) var(--pma-space-8); min-height: 60vh; }
.s-skip { position: absolute; inset-inline-start: var(--pma-space-4); inset-block-start: -4rem; padding: var(--pma-space-2) var(--pma-space-4); background: var(--pma-brand); color: var(--pma-on-brand); z-index: 20; min-block-size: var(--pma-tap); display: inline-flex; align-items: center; }
.s-skip:focus { inset-block-start: var(--pma-space-2); }
.s-visually-hidden { position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.s-hint { color: var(--pma-ink-muted); font-size: var(--pma-text-sm); line-height: 1.7; }
.s-lede { max-width: var(--pma-measure); color: var(--pma-ink-2); line-height: var(--pma-leading-body); }
.s-h2 { font-size: var(--pma-text-lg); font-weight: var(--pma-weight-bold); }
.s-h3 { font-size: var(--pma-text-md); font-weight: var(--pma-weight-bold); }
.s-count { margin-inline-start: 0.4em; font-size: 1.15em; font-weight: var(--pma-weight-display); color: var(--pma-ink-muted); }
.s-optional { margin-inline-start: 0.5em; font-weight: var(--pma-weight-regular); color: var(--pma-ink-muted); }
.s-notice { margin-bottom: var(--pma-space-5); }
.s-notice .pma-notice__body form { margin-top: var(--pma-space-3); }
.s-notice .pma-notice__body p + p { margin-top: var(--pma-space-2); }

.pma-btn .s-ico { inline-size: 1.1em; block-size: 1.1em; }
.pma-btn:active { transform: scale(0.98); }
.s-btn-lead { min-height: 3.25rem; padding-inline: var(--pma-space-6); font-size: var(--pma-text-md); }
.s-linkbtn {
  min-height: var(--pma-tap); padding: 0 var(--pma-space-2); border: 0; background: none; color: var(--pma-link);
  font: inherit; font-size: var(--pma-text-sm); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer;
}
.s-iconbtn {
  display: inline-grid; place-items: center; inline-size: var(--pma-tap); block-size: var(--pma-tap); flex: none;
  border: 0; border-radius: var(--pma-radius-round); background: transparent; color: var(--pma-ink-2); cursor: pointer;
  transition: background-color var(--pma-duration) var(--pma-ease);
}
.s-iconbtn:hover { background: var(--pma-brand-tint); color: var(--pma-brand); }
.s-iconbtn:focus-visible { outline: none; box-shadow: var(--pma-focus-ring); }
.s-iconbtn .s-ico { inline-size: 1.25rem; block-size: 1.25rem; }

.s-bar { border-bottom: 1px solid var(--pma-rule-strong); background: var(--pma-paper); }
.s-bar__in { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--pma-space-6); min-height: 4rem; }
.s-brand { display: inline-flex; align-items: center; gap: var(--pma-space-3); color: var(--pma-ink); text-decoration: none; min-height: var(--pma-tap); }
.s-brand__logo { display: block; block-size: 34px; inline-size: auto; }
.s-brand__name { display: inline-flex; align-items: baseline; gap: var(--pma-space-2); font-weight: var(--pma-weight-bold); letter-spacing: var(--pma-tracking-heading); }
.s-brand__en { font-size: var(--pma-text-md); font-weight: var(--pma-weight-display); color: var(--pma-ink-muted); letter-spacing: var(--pma-tracking-display); }
.s-nav { display: flex; gap: var(--pma-space-1); margin-inline-end: auto; }
.s-nav a { display: inline-flex; align-items: center; min-height: 4rem; padding: 0 var(--pma-space-3); color: var(--pma-ink-2); font-weight: var(--pma-weight-medium); text-decoration: none; }
.s-nav a:hover { color: var(--pma-ink); background: var(--pma-surface-alt); }
.s-nav a[aria-current="page"] { color: var(--pma-ink); font-weight: var(--pma-weight-bold); box-shadow: inset 0 -3px 0 var(--pma-brand); }
.s-who { display: flex; align-items: center; gap: var(--pma-space-3); font-size: var(--pma-text-sm); }
.s-who__name { color: var(--pma-ink-2); }
.s-who__desk { display: inline-flex; align-items: center; min-height: var(--pma-tap); min-inline-size: var(--pma-tap); }
.s-who__out { margin: 0; }
.s-foot { padding-block: var(--pma-space-6) var(--pma-space-7); border-top: 1px solid var(--pma-rule-soft); color: var(--pma-ink-muted); font-size: var(--pma-text-sm); }
.s-foot__en { font-size: var(--pma-text-md); color: var(--pma-ink-2); letter-spacing: var(--pma-tracking-display); }

.s-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--pma-space-4); margin-bottom: var(--pma-space-6); }
.s-pagehead .pma-section-title { flex: 1 1 20rem; margin: 0; }
.s-pagehead--stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--pma-space-4); }
.s-crumb { font-size: var(--pma-text-sm); color: var(--pma-ink-muted); margin-bottom: var(--pma-space-1); }
.s-crumb a { color: var(--pma-ink-muted); }
.s-meta { display: flex; flex-wrap: wrap; gap: var(--pma-space-1) var(--pma-space-4); color: var(--pma-ink-muted); font-size: var(--pma-text-sm); }

/* ---------------------------------------------------------------- printer's marks: トンボ at the corners of a sheet */
.s-crop {
  --m: var(--pma-ink-muted); --l: 12px;
  padding: 10px;
  background:
    linear-gradient(var(--m), var(--m)) top left / var(--l) 1px no-repeat,
    linear-gradient(var(--m), var(--m)) top left / 1px var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) top right / var(--l) 1px no-repeat,
    linear-gradient(var(--m), var(--m)) top right / 1px var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) bottom left / var(--l) 1px no-repeat,
    linear-gradient(var(--m), var(--m)) bottom left / 1px var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) bottom right / var(--l) 1px no-repeat,
    linear-gradient(var(--m), var(--m)) bottom right / 1px var(--l) no-repeat;
}

/* ---------------------------------------------------------------- 号の一覧: covers on a shelf, the 校 stacked behind */
.s-shelf { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: var(--pma-space-7) var(--pma-space-6); }
.s-cover { display: grid; gap: var(--pma-space-2); color: inherit; text-decoration: none; }
.s-cover__paper {
  position: relative; display: block; aspect-ratio: 662 / 936; margin: 10px 10px var(--pma-space-2) 0;
  background: var(--pma-surface); outline: 1px solid var(--pma-rule);
  transition: outline-color var(--pma-duration) var(--pma-ease), transform var(--pma-duration) var(--pma-ease);
}
/* each 校 after the first is one more sheet behind the cover */
.s-cover__paper[data-stack="2"] { box-shadow: 5px -5px 0 -1px var(--pma-surface), 5px -5px 0 0 var(--pma-rule); }
.s-cover__paper[data-stack="3"] { box-shadow: 5px -5px 0 -1px var(--pma-surface), 5px -5px 0 0 var(--pma-rule), 10px -10px 0 -1px var(--pma-surface), 10px -10px 0 0 var(--pma-rule); }
.s-cover__img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.s-cover__blank { display: grid; place-items: center; block-size: 100%; padding: var(--pma-space-4); background: var(--pma-surface-alt); }
.s-cover__blanktitle { font-weight: var(--pma-weight-bold); color: var(--pma-ink-muted); text-align: center; word-break: auto-phrase; }
.s-cover:hover .s-cover__paper { outline-color: var(--pma-brand); transform: translateY(-2px); }
.s-cover:focus-visible { outline: none; }
.s-cover:focus-visible .s-cover__paper { outline: 3px solid var(--pma-focus); outline-offset: 2px; }
.s-cover__title { font-size: var(--pma-text-md); font-weight: var(--pma-weight-bold); line-height: var(--pma-leading-heading); word-break: auto-phrase; overflow-wrap: anywhere; }
.s-cover:hover .s-cover__title { text-decoration: underline; text-underline-offset: 0.2em; }
.s-cover__meta { display: flex; flex-wrap: wrap; gap: 0 var(--pma-space-3); color: var(--pma-ink-muted); font-size: var(--pma-text-sm); }
.s-cover__kou { color: var(--pma-ink); font-weight: var(--pma-weight-bold); }
.s-cover__state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pma-space-2); }
.s-cover__state:empty { display: none; }
.s-cover__sample { font-size: var(--pma-text-xs); color: var(--pma-ink-muted); border: 1px solid var(--pma-rule); border-radius: var(--pma-radius-pill); padding: 0 0.6em; }

/* empty: a blank sheet waiting on the desk */
.s-empty { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--pma-space-7); align-items: center; padding: var(--pma-space-7); background: var(--pma-surface-sunk); }
.s-empty--quiet { display: block; padding: var(--pma-space-6); }
.s-empty__sheet { aspect-ratio: 1.414 / 1; position: relative; }
.s-empty__sheet::before { content: ""; position: absolute; inset: 10px; background: var(--pma-surface); outline: 1px solid var(--pma-rule); }
.s-empty__fold { position: absolute; inset-block: 10px; inset-inline-start: 50%; inline-size: 1px; background: var(--pma-rule); }
.s-empty__title { font-size: var(--pma-text-xl); font-weight: var(--pma-weight-bold); margin-bottom: var(--pma-space-3); }
.s-empty__body { max-width: var(--pma-measure); color: var(--pma-ink-2); line-height: var(--pma-leading-body); margin-bottom: var(--pma-space-5); }
.s-empty__act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pma-space-3); }
.s-empty__act form { margin: 0; }

/* ---------------------------------------------------------------- 新しい号 */
.s-new { display: grid; gap: var(--pma-space-7); }
.s-step { margin: 0; padding: 0; border: 0; min-inline-size: 0; display: grid; gap: var(--pma-space-4); }
.s-step__legend { display: flex; align-items: baseline; gap: var(--pma-space-3); padding: 0 0 var(--pma-space-2); inline-size: 100%; border-bottom: 1px solid var(--pma-rule-strong); font-size: var(--pma-text-lg); font-weight: var(--pma-weight-bold); }
.s-step__no { font-size: var(--pma-text-2xl); font-weight: var(--pma-weight-display); line-height: 1; color: var(--pma-ink-muted); }

.s-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--pma-space-4); }
.s-type {
  position: relative; display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--pma-rule); background: var(--pma-surface);
  cursor: pointer; transition: border-color var(--pma-duration) var(--pma-ease), box-shadow var(--pma-duration) var(--pma-ease);
}
.s-type:hover { border-color: var(--pma-brand); }
.s-type:has(:checked) { border-color: var(--pma-brand); box-shadow: inset 0 0 0 2px var(--pma-brand); }
.s-type:has(:focus-visible) { outline: var(--pma-focus-outline); outline-offset: 2px; }
.s-type__radio { position: absolute; inset-block-start: 0; inset-inline-start: 0; z-index: 1; }
.s-type__pic { display: flex; justify-content: center; align-items: center; gap: 4px; aspect-ratio: 3 / 2; padding: var(--pma-space-4); background: var(--pma-surface-sunk); overflow: hidden; }
.s-type__pic img { display: block; max-block-size: 100%; min-inline-size: 0; object-fit: contain; outline: 1px solid rgb(0 0 0 / 0.1); outline-offset: -1px; }
.s-type__pic[data-n="2"] img { max-inline-size: calc(50% - 2px); }
/* 標準: the designer's grid drawn as a page plan (no picture of a medium to show) */
.s-type__plan { display: flex; gap: 0; block-size: 100%; aspect-ratio: 1.414 / 1; }
.s-type__planpage { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1.2fr repeat(3, 0.5fr); gap: 5px; padding: 9px; background: var(--pma-surface); outline: 1px solid var(--pma-rule); }
.s-type__planpage i { grid-column: 1 / -1; background: var(--pma-rule); }
.s-type__planpage i + i { grid-column: 1 / 3; }
.s-type__planpage b { background: repeating-linear-gradient(var(--pma-rule-soft) 0 2px, transparent 2px 5px); }
.s-type__body { display: grid; align-content: start; gap: var(--pma-space-2); padding: var(--pma-space-4); }
.s-type__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--pma-space-2); font-size: var(--pma-text-md); font-weight: var(--pma-weight-bold); }
.s-type__sub { font-size: var(--pma-text-sm); font-weight: var(--pma-weight-regular); color: var(--pma-ink-muted); }
.s-type__words { display: grid; gap: var(--pma-space-1); font-size: var(--pma-text-sm); line-height: 1.75; color: var(--pma-ink); }
.s-type__words--plain { color: var(--pma-ink-2); }
.s-type__who { font-size: var(--pma-text-xs); color: var(--pma-ink-muted); }
.s-type__who::before { content: "— "; }
.s-type__grammar { font-size: var(--pma-text-xs); line-height: 1.7; color: var(--pma-ink-muted); padding-top: var(--pma-space-2); border-top: 1px solid var(--pma-rule-soft); }
.s-type__limits { display: flex; gap: var(--pma-space-2); font-size: var(--pma-text-xs); line-height: 1.7; color: var(--pma-attn-fg); background: var(--pma-attn-bg); padding: var(--pma-space-2); }
.s-type__limits .s-ico { margin-top: 0.15em; }

/* Radios: the input itself is the 44px target (--pma-tap); the ring is drawn inside it, so the visual stays small. The whole card
   is also a <label>, so a tap anywhere on it chooses. Plain native radios return in forced-colors mode. */
.s-type__radio, .s-source input, .s-scope__opt input, .s-restyle__opt input {
  appearance: none; -webkit-appearance: none; flex: none; cursor: pointer;
  inline-size: var(--pma-tap); block-size: var(--pma-tap);
  background: radial-gradient(circle at center, var(--pma-surface) 0 6.5px, var(--pma-ink-muted) 7px 9px, transparent 9.5px);
}
.s-type__radio:checked, .s-source input:checked, .s-scope__opt input:checked, .s-restyle__opt input:checked {
  background: radial-gradient(circle at center, var(--pma-brand) 0 4px, var(--pma-surface) 4.5px 6.5px, var(--pma-brand) 7px 9px, transparent 9.5px);
}
.s-type__radio:disabled, .s-source input:disabled, .s-scope__opt input:disabled, .s-restyle__opt input:disabled { opacity: 0.5; cursor: default; }
.s-type__radio:focus-visible, .s-source input:focus-visible, .s-scope__opt input:focus-visible, .s-restyle__opt input:focus-visible { outline: var(--pma-focus-outline); outline-offset: -4px; border-radius: var(--pma-radius-round); }
@supports selector(:has(*)) {
  .s-type__radio:focus-visible, .s-source input:focus-visible, .s-scope__opt input:focus-visible, .s-restyle__opt input:focus-visible { outline: none; }
}
@media (forced-colors: active) {
  .s-type__radio, .s-source input, .s-scope__opt input, .s-restyle__opt input { appearance: auto; -webkit-appearance: radio; background: none; }
}

.s-field-title { max-width: 36rem; }
.s-sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pma-space-4); }
.s-source { display: flex; gap: var(--pma-space-3); padding: var(--pma-space-4); border: 1px solid var(--pma-rule); background: var(--pma-surface); cursor: pointer; }
.s-source:hover { border-color: var(--pma-brand); }
.s-source:has(:checked) { border-color: var(--pma-brand); box-shadow: inset 0 0 0 2px var(--pma-brand); }
.s-source:has(:focus-visible) { outline: var(--pma-focus-outline); outline-offset: 2px; }
.s-source input { margin: -0.5rem -0.5rem -0.5rem -0.75rem; }
.s-source__body { display: grid; gap: var(--pma-space-1); }
.s-source__name { font-weight: var(--pma-weight-bold); font-size: var(--pma-text-md); }
.s-source__text { color: var(--pma-ink-2); font-size: var(--pma-text-sm); line-height: 1.7; }
.s-source__cost { color: var(--pma-ink-muted); font-size: var(--pma-text-sm); font-variant-numeric: tabular-nums; }

/* own material only when 「自分の原稿と写真」 is chosen. app.js keeps data-source on the form in step with the radios (no :has needed);
   without JS, browsers that know :has do the same; the rest simply show the own-material fields and both captions, and still work. */
.s-own { display: grid; gap: var(--pma-space-5); padding: var(--pma-space-5); background: var(--pma-surface-alt); }
.s-new[data-source="sample"] .s-own,
.s-new[data-source="sample"] [data-for-source="own"],
.s-new[data-source="own"] [data-for-source="sample"] { display: none; }
@supports selector(:has(*)) {
  .s-new:not([data-source]):not(:has(input[name="source"][value="own"]:checked)) .s-own,
  .s-new:not([data-source]):not(:has(input[name="source"][value="own"]:checked)) [data-for-source="own"],
  .s-new:not([data-source]):has(input[name="source"][value="own"]:checked) [data-for-source="sample"] { display: none; }
}
@supports not selector(:has(*)) {
  .s-new:not([data-source]) .s-submit [data-for-source="sample"]::after { content: " ／ "; }
}
.s-textarea { min-height: 12rem; resize: vertical; line-height: 1.8; }
.s-file { font: inherit; font-size: var(--pma-text-sm); max-inline-size: 100%; min-block-size: var(--pma-tap); }
.s-photos { display: grid; gap: var(--pma-space-3); }
.s-photos__head { display: grid; gap: var(--pma-space-2); }
.s-photos__pick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pma-space-3); }
.s-photos__pick:has(input:focus-visible) label { box-shadow: var(--pma-focus-ring); }
.s-photos__count { font-size: var(--pma-text-sm); color: var(--pma-ink-2); font-variant-numeric: tabular-nums; }
.s-photos__count[data-tone="bad"] { color: var(--pma-blocked-fg); font-weight: var(--pma-weight-bold); }
.s-photorows { list-style: none; display: grid; gap: var(--pma-space-2); }
.s-photorow { display: grid; grid-template-columns: 2rem minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) var(--pma-tap); align-items: center; gap: var(--pma-space-2); }
.s-photorow__no { font-size: var(--pma-text-md); color: var(--pma-ink-muted); text-align: end; }
.s-photorow__thumb { display: none; }
/* with JS: the picker fills rows; each filled row shows its picture instead of the file control */
[data-js] .s-photorow { grid-template-columns: 2rem 4.5rem minmax(0, 1fr) minmax(0, 1fr) var(--pma-tap); padding: var(--pma-space-2); background: var(--pma-surface); border: 1px solid var(--pma-rule-soft); }
[data-js] .s-photorow:not(.is-filled) { display: none; }
[data-js] .s-photorow .s-file { display: none; }
[data-js] .s-photorow__thumb { display: block; aspect-ratio: 4 / 3; background: var(--pma-surface-sunk); overflow: hidden; }
.s-photorow__thumb img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.s-photorow .pma-input { min-inline-size: 0; }

.s-submit { position: sticky; inset-block-end: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--pma-space-3) var(--pma-space-5); padding: var(--pma-space-4) 0; border-top: 1px solid var(--pma-rule-strong); background: var(--pma-paper); }
.s-submit__choice { margin: 0; font-size: var(--pma-text-sm); font-weight: var(--pma-weight-bold); color: var(--pma-ink); }
/* two short lines of text on the left, the button on the right: the bar stays low so it hides little of the cards it floats over */
@media (min-width: 768px) {
  .s-submit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 var(--pma-space-5); padding-block: var(--pma-space-3); }
  .s-submit > .s-btn-lead { grid-column: 2; grid-row: 1 / span 2; }
  .s-submit__choice, .s-submit__est { grid-column: 1; }
  .s-submit__choice[hidden] + .s-submit__est { grid-row: 1 / span 2; }
}
.s-submit__choice[data-tone="wait"] { color: var(--pma-attn-fg); }
.s-submit__est { max-width: 40rem; color: var(--pma-ink-2); font-size: var(--pma-text-sm); line-height: 1.7; font-variant-numeric: tabular-nums; }
.s-submit__est b { color: var(--pma-ink); font-size: var(--pma-text-base); }

/* ---------------------------------------------------------------- estimate (own issue before it runs) */
.s-estimate { display: grid; gap: var(--pma-space-4); max-width: 36rem; margin-bottom: var(--pma-space-7); padding: var(--pma-space-5); border: 1px solid var(--pma-ink); }
.s-estimate__list { display: grid; margin: 0; border-top: 1px solid var(--pma-rule); }
.s-estimate__list > div { display: flex; justify-content: space-between; gap: var(--pma-space-4); padding: var(--pma-space-2) 0; border-bottom: 1px solid var(--pma-rule-soft); }
.s-estimate__list dt { color: var(--pma-ink-2); }
.s-estimate__list dd { margin: 0; font-variant-numeric: tabular-nums; }
.s-estimate__total { border-bottom: 3px double var(--pma-ink) !important; font-weight: var(--pma-weight-bold); }
.s-estimate__total dd { font-size: var(--pma-text-lg); }

/* ---------------------------------------------------------------- progress: the 校 being built, step by step */
.s-progress { display: grid; gap: var(--pma-space-3); max-width: 44rem; margin-bottom: var(--pma-space-7); padding: var(--pma-space-5); border-inline-start: 4px solid var(--pma-wait-mark); background: var(--pma-surface-alt); }
.s-progress[data-state="busy"] { border-color: var(--pma-attn-mark); background: var(--pma-attn-bg); }
.s-progress[data-state="failed"] { border-color: var(--pma-blocked-mark); background: var(--pma-blocked-bg); }
.s-progress__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--pma-space-3); }
.s-progress__title { font-size: var(--pma-text-xl); font-weight: var(--pma-weight-bold); }
.s-progress__elapsed { font-size: var(--pma-text-md); font-variant-numeric: tabular-nums; color: var(--pma-ink-2); }
.s-progress__status { color: var(--pma-ink-2); line-height: 1.7; }
.s-steps { list-style: none; display: grid; margin-top: var(--pma-space-2); border-top: 1px solid var(--pma-rule); }
.s-step-row { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto; align-items: center; gap: var(--pma-space-3); padding: var(--pma-space-3) 0; border-bottom: 1px solid var(--pma-rule-soft); color: var(--pma-ink-muted); }
.s-step-row__mark { display: grid; place-items: center; inline-size: 1.5rem; block-size: 1.5rem; border-radius: var(--pma-radius-round); box-shadow: inset 0 0 0 1.5px var(--pma-rule-input); }
.s-step-row__mark .s-ico { inline-size: 1rem; block-size: 1rem; }
.s-step-row__time { font-size: var(--pma-text-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.s-step-row[data-status="done"] { color: var(--pma-ink-2); }
.s-step-row[data-status="done"] .s-step-row__mark { background: var(--pma-ok-mark); box-shadow: none; color: var(--pma-surface); }
.s-step-row[data-status="running"] { color: var(--pma-ink); font-weight: var(--pma-weight-bold); }
.s-step-row[data-status="running"] .s-step-row__mark { box-shadow: inset 0 0 0 2.5px var(--pma-brand); }
.s-step-row[data-status="running"] .s-step-row__mark::after { content: ""; inline-size: 0.5rem; block-size: 0.5rem; border-radius: var(--pma-radius-round); background: var(--pma-brand); animation: s-beat 1.6s var(--pma-ease) infinite; }
.s-step-row[data-status="failed"] { color: var(--pma-blocked-fg); font-weight: var(--pma-weight-bold); }
.s-step-row[data-status="failed"] .s-step-row__mark { background: var(--pma-blocked-mark); box-shadow: none; color: var(--pma-surface); }
@keyframes s-beat { 50% { opacity: 0.25; } }

/* ---------------------------------------------------------------- the reader: header bar, 校 tabs, actions */
.s-issuehead { margin-bottom: var(--pma-space-5); }
.s-issuehead__title { font-size: var(--pma-text-xl); font-weight: var(--pma-weight-bold); letter-spacing: var(--pma-tracking-heading); overflow-wrap: anywhere; margin-bottom: var(--pma-space-1); }

.s-proofbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pma-space-3) var(--pma-space-6); padding-bottom: var(--pma-space-4); margin-bottom: var(--pma-space-5); border-bottom: 1px solid var(--pma-rule-strong); }
.s-proofbar__kou { display: grid; gap: 2px; margin-inline-end: auto; }
.s-kou { font-size: var(--pma-text-2xl); font-weight: var(--pma-weight-bold); line-height: 1.1; letter-spacing: 0.06em; }
.s-kou--sm { font-size: var(--pma-text-lg); }
.s-proofbar__what { color: var(--pma-ink-muted); font-size: var(--pma-text-sm); }
.s-proofbar__old { display: inline-flex; align-items: center; gap: var(--pma-space-1); color: var(--pma-attn-fg); font-size: var(--pma-text-sm); font-weight: var(--pma-weight-bold); }
.s-kous { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--pma-rule); }
.s-kous__item { display: inline-flex; align-items: center; gap: 0.2em; min-height: var(--pma-tap); padding: 0 var(--pma-space-4); color: var(--pma-ink-2); text-decoration: none; font-weight: var(--pma-weight-medium); border-inline-end: 1px solid var(--pma-rule); }
.s-kous__item:last-child { border-inline-end: 0; }
.s-kous__item:hover { background: var(--pma-surface-alt); color: var(--pma-ink); }
.s-kous__item[aria-current="page"] { background: var(--pma-ink); color: var(--pma-paper); font-weight: var(--pma-weight-bold); }
.s-proofbar__act { display: flex; flex-wrap: wrap; gap: var(--pma-space-2); }
.s-menu { position: relative; }
.s-menu > summary { list-style: none; }
.s-menu > summary::-webkit-details-marker { display: none; }
.s-menu__panel { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 6px); z-index: 30; display: grid; min-inline-size: 18rem; padding: var(--pma-space-2); background: var(--pma-surface); border: 1px solid var(--pma-rule); box-shadow: var(--pma-shadow-float); }
.s-menu__panel a { display: grid; gap: 2px; padding: var(--pma-space-3); color: var(--pma-ink); text-decoration: none; }
.s-menu__panel a:hover { background: var(--pma-brand-tint); }
.s-menu__panel a span { color: var(--pma-ink-muted); font-size: var(--pma-text-sm); }

.s-readgrid { display: grid; grid-template-columns: minmax(0, 1fr) 22.5rem; gap: var(--pma-space-6); align-items: start; }
.s-deskcol { display: grid; gap: var(--pma-space-4); min-inline-size: 0; }

/* ---------------------------------------------------------------- the 校正台: spreads as paper on the desk */
.s-desk { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--pma-space-3); padding: var(--pma-space-6) var(--pma-space-3); background: var(--pma-surface-sunk); }
.s-spreads { display: grid; gap: var(--pma-space-7); min-inline-size: 0; grid-column: 2; }
.s-turn { display: grid; place-items: center; inline-size: 3rem; block-size: 3rem; border: 1px solid var(--pma-rule-input); border-radius: var(--pma-radius-round); background: var(--pma-surface); color: var(--pma-ink); cursor: pointer; transition: background-color var(--pma-duration) var(--pma-ease); }
.s-turn:hover:not(:disabled) { background: var(--pma-ink); color: var(--pma-paper); border-color: var(--pma-ink); }
.s-turn:focus-visible { outline: none; box-shadow: var(--pma-focus-ring); }
.s-turn:disabled { opacity: 0.35; cursor: default; }
.s-turn[data-turn="-1"] { grid-column: 1; grid-row: 1; }
.s-turn[data-turn="1"] { grid-column: 3; grid-row: 1; }
.s-turn .s-ico { inline-size: 1.4rem; block-size: 1.4rem; }

.s-spread__sheet { --page-h: calc(100svh - 17rem); position: relative; display: grid; grid-template-columns: 1fr 1fr; margin-inline: auto; inline-size: min(100%, calc(var(--page-h) * 1.414 + 20px)); }
.s-spread__sheet[data-count="1"] { grid-template-columns: 1fr; inline-size: min(50%, calc(var(--page-h) * 0.707 + 20px)); }
/* トンボ at the corners of the paper itself (the captions sit below the trim, on the desk) */
.s-spread__sheet.s-crop { background: none; }
.s-page__frame::before { content: ""; position: absolute; inset: -10px; pointer-events: none; --m: var(--pma-ink-muted); --l: 12px; }
.s-spread__sheet[data-count="2"] .s-page:first-child .s-page__frame::before { inset-inline-end: 0;
  background: linear-gradient(var(--m), var(--m)) top left / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) top left / 1px var(--l) no-repeat,
              linear-gradient(var(--m), var(--m)) bottom left / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) bottom left / 1px var(--l) no-repeat; }
.s-spread__sheet[data-count="2"] .s-page:last-child .s-page__frame::before { inset-inline-start: 0;
  background: linear-gradient(var(--m), var(--m)) top right / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) top right / 1px var(--l) no-repeat,
              linear-gradient(var(--m), var(--m)) bottom right / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) bottom right / 1px var(--l) no-repeat; }
.s-spread__sheet[data-count="1"] .s-page__frame::before {
  background: linear-gradient(var(--m), var(--m)) top left / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) top left / 1px var(--l) no-repeat,
              linear-gradient(var(--m), var(--m)) top right / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) top right / 1px var(--l) no-repeat,
              linear-gradient(var(--m), var(--m)) bottom left / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) bottom left / 1px var(--l) no-repeat,
              linear-gradient(var(--m), var(--m)) bottom right / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) bottom right / 1px var(--l) no-repeat; }
/* the ノド: a soft fold where the two pages meet */
.s-spread__sheet[data-count="2"] .s-page:last-child .s-page__frame::after { content: ""; position: absolute; z-index: 1; inset-block: 0; inset-inline-start: -10px; inline-size: 20px; pointer-events: none; background: linear-gradient(90deg, transparent, rgb(0 0 0 / 0.07) 45%, rgb(0 0 0 / 0.12) 50%, rgb(0 0 0 / 0.07) 55%, transparent); }
.s-page { margin: 0; min-inline-size: 0; display: grid; grid-template-rows: auto 1fr; align-content: start; }
.s-page__frame { position: relative; line-height: 0; background: #fff; }
.s-page__frame[data-markable] { cursor: crosshair; }
.s-page__img { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 662 / 936; }
.s-page__cap { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--pma-space-2); padding-top: var(--pma-space-2); line-height: var(--pma-leading-ui); min-block-size: var(--pma-tap); }
.s-page[data-side="right"] .s-page__cap { flex-direction: row-reverse; }
.s-page__no { font-size: var(--pma-text-lg); font-weight: var(--pma-weight-display); color: var(--pma-ink); }
.s-page__unit { font-size: var(--pma-text-xs); color: var(--pma-ink-muted); }
.s-page__feat { font-size: var(--pma-text-xs); font-weight: var(--pma-weight-regular); color: var(--pma-ink-muted); }
/* the tools stay next to the folio, on the page's own outer edge (left page: left, right page: right), never in the gutter */
.s-page__tools { display: inline-flex; }
.s-spread__note { margin: var(--pma-space-3) 0 0; text-align: center; font-size: var(--pma-text-xs); color: var(--pma-ink-muted); }
html:not([data-js]) .s-spread + .s-spread .s-spread__note { display: none; }
.s-page__flags { display: flex; flex-wrap: wrap; gap: var(--pma-space-1); flex-basis: 100%; }
.s-page[data-side="right"] .s-page__flags { justify-content: flex-end; }
.s-flag { display: inline-flex; align-items: center; gap: 0.3em; padding: 0.05em 0.6em; border-radius: var(--pma-radius-pill); font-size: var(--pma-text-xs); line-height: 1.6; color: var(--pma-attn-fg); background: var(--pma-attn-bg); }
.s-flag[data-level="fail"] { color: var(--pma-blocked-fg); background: var(--pma-blocked-bg); }
.s-flag .s-ico { inline-size: 1em; block-size: 1em; }

/* one spread at a time once JS runs (without JS every spread is on the desk, one under another) */
[data-js] .s-reader .s-spread:not([data-current]),
[data-js] .s-reader .s-cmp:not([data-current]) { display: none; }
[data-js] .s-reader .s-spread[data-current],
[data-js] .s-reader .s-cmp[data-current] { animation: s-turn-in 220ms cubic-bezier(0.23, 1, 0.32, 1); }
[data-js] .s-reader [data-turn-dir="-1"] .s-spread[data-current],
[data-js] .s-reader [data-turn-dir="-1"] .s-cmp[data-current] { animation-name: s-turn-back; }
@keyframes s-turn-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes s-turn-back { from { opacity: 0; transform: translateX(-24px); } }
.s-desk__hint { color: var(--pma-ink-muted); font-size: var(--pma-text-sm); }

/* ---------------------------------------------------------------- marks on the page: 赤字 (red pen) and answered (lagoon) */
.s-mark {
  --size: 1.75rem;
  position: absolute; z-index: 2; display: none; place-items: center; inline-size: var(--size); block-size: var(--size);
  transform: translate(-50%, -50%); border-radius: var(--pma-radius-round); text-decoration: none; line-height: 1;
  background: var(--pma-ball-client-mark); color: #fff; box-shadow: 0 0 0 2px #fff, 0 1px 3px rgb(0 0 0 / 0.35);
}
.s-mark[data-placed], .s-mark--inline { display: inline-grid; }
.s-mark--inline { position: relative; transform: none; flex: none; box-shadow: none; }
.s-mark--inline::before { display: none; }
.s-mark::before { content: ""; position: absolute; inset: calc((var(--size) - var(--pma-tap)) / 2); border-radius: var(--pma-radius-round); } /* 44px hit area */
.s-mark__no { font-family: var(--pma-font-sans); font-size: 0.875rem; font-weight: var(--pma-weight-bold); }
.s-mark[data-status="answered"] { background: #fff; color: var(--pma-ball-client-fg); box-shadow: inset 0 0 0 2.5px var(--pma-ball-client-mark), 0 0 0 2px #fff, 0 1px 3px rgb(0 0 0 / 0.35); }
.s-mark[data-status="failed"] { background: #fff; color: var(--pma-ball-client-fg); box-shadow: 0 0 0 2px #fff; outline: 2px dashed var(--pma-ball-client-mark); outline-offset: -2px; }
.s-mark[data-status="impossible"] { background: var(--pma-surface-sunk); color: var(--pma-ink-2); box-shadow: 0 0 0 2px #fff; outline: 2px dashed var(--pma-ink-muted); outline-offset: -2px; }
.s-mark[data-kind="resolved"] { background: #fff; color: var(--pma-ok-fg); box-shadow: inset 0 0 0 3px var(--pma-ok-mark), 0 0 0 2px #fff, 0 1px 3px rgb(0 0 0 / 0.35); }
.s-mark--inline[data-kind="resolved"], .s-mark--inline[data-status="answered"] { box-shadow: inset 0 0 0 2.5px var(--pma-ok-mark); }
.s-mark--inline[data-status="answered"] { box-shadow: inset 0 0 0 2.5px var(--pma-ball-client-mark); }
.s-mark--inline[data-same] { box-shadow: inset 0 0 0 2.5px var(--pma-attn-mark); color: var(--pma-attn-fg); }
.s-mark[data-kind="new"] { --size: 2.25rem; cursor: grab; border: 0; padding: 0; font: inherit; }
.s-mark[data-kind="new"] .s-mark__no { font-size: 1.15rem; }
.s-mark[data-kind="new"]:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--pma-focus); }
.s-mark[data-kind="new"][data-placed] { animation: s-drop 200ms cubic-bezier(0.23, 1, 0.32, 1); }
@keyframes s-drop { from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); } }
a.s-mark:hover { transform: translate(-50%, -50%) scale(1.08); }
a.s-mark:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--pma-focus); }
.s-mark.is-lit { box-shadow: 0 0 0 2px #fff, 0 0 0 6px var(--pma-ball-client-mark); }

/* ---------------------------------------------------------------- the 赤字 note: a proofreader's slip beside the mark */
.s-note { display: grid; gap: var(--pma-space-3); margin-top: var(--pma-space-4); padding: var(--pma-space-4); background: var(--pma-surface); border: 1px solid var(--pma-rule); border-inline-start: 3px solid var(--pma-ball-client-mark); }
.s-note__head { display: flex; align-items: center; gap: var(--pma-space-2); }
.s-note__where { font-weight: var(--pma-weight-bold); margin-inline-end: auto; }
.s-note__close { margin: calc(var(--pma-space-2) * -1); }
.s-note__text { min-block-size: 4.5rem; resize: vertical; }
.s-note .pma-field > label { font-size: var(--pma-text-sm); }
.s-note__act { display: flex; flex-wrap: wrap; gap: var(--pma-space-2); }
.s-note[data-floating] { position: absolute; z-index: 25; inline-size: min(22rem, calc(100% - 1rem)); margin: 0; box-shadow: var(--pma-shadow-float); animation: s-pop 180ms cubic-bezier(0.23, 1, 0.32, 1); }
@keyframes s-pop { from { opacity: 0; transform: scale(0.97); } }
.s-note[data-floating] .s-note__close { display: inline-grid !important; }
.s-note[data-docked] { margin-top: 0; box-shadow: var(--pma-shadow-float); }
.s-scope { margin: 0; padding: 0; border: 0; display: grid; gap: var(--pma-space-2); }
.s-scope legend { padding: 0; margin-bottom: var(--pma-space-1); font-weight: var(--pma-weight-bold); font-size: var(--pma-text-sm); }
.s-scope__opt { display: flex; gap: var(--pma-space-2); padding: var(--pma-space-2) var(--pma-space-3); border: 1px solid var(--pma-rule); cursor: pointer; font-size: var(--pma-text-sm); line-height: 1.6; }
.s-scope__opt:has(:checked) { border-color: var(--pma-brand); background: var(--pma-brand-tint); }
.s-scope__opt:has(:focus-visible) { outline: var(--pma-focus-outline); outline-offset: 2px; }
.s-scope__opt input { margin: -0.5rem -0.5rem -0.5rem -0.75rem; }
.s-scope__opt > span { display: grid; }
.s-scope__desc { color: var(--pma-ink-muted); font-size: var(--pma-text-xs); }

/* ---------------------------------------------------------------- the margin beside the desk */
.s-margin { display: grid; gap: var(--pma-space-6); min-inline-size: 0; }
.s-panel { display: grid; gap: var(--pma-space-3); }
.s-panel__title { display: flex; align-items: baseline; padding-bottom: var(--pma-space-2); border-bottom: 1px solid var(--pma-rule-strong); font-size: var(--pma-text-base); font-weight: var(--pma-weight-bold); letter-spacing: var(--pma-tracking-heading); }

.s-change { display: grid; gap: var(--pma-space-2); padding: var(--pma-space-4); background: var(--pma-ok-bg); border-inline-start: 3px solid var(--pma-ok-mark); scroll-margin-top: var(--pma-space-6); }
.s-change[data-tone="same"] { background: var(--pma-attn-bg); border-color: var(--pma-attn-mark); }
.s-change__same { font-size: var(--pma-text-sm); color: var(--pma-attn-fg); font-weight: var(--pma-weight-bold); }
.s-mark[data-kind="resolved"][data-same] { color: var(--pma-attn-fg); box-shadow: inset 0 0 0 3px var(--pma-attn-mark), 0 0 0 2px #fff, 0 1px 3px rgb(0 0 0 / 0.35); }
.s-change:target { outline: 2px solid var(--pma-ok-mark); outline-offset: 2px; }
.s-change__akaji { display: flex; align-items: flex-start; gap: var(--pma-space-2); color: var(--pma-ball-client-fg); font-weight: var(--pma-weight-bold); line-height: 1.6; }
.s-change__akaji .s-mark { --size: 1.5rem; }
.s-change__why { color: var(--pma-ink-2); font-size: var(--pma-text-sm); }
.s-change__line { display: grid; gap: 2px; }
.s-change__what { font-size: var(--pma-text-sm); color: var(--pma-ink-2); }
.s-change__fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--pma-space-2); font-size: var(--pma-text-lg); font-variant-numeric: tabular-nums; color: var(--pma-ink-muted); }
.s-change__fig b { color: var(--pma-ink); font-size: var(--pma-text-xl); }
.s-change__arrow { color: var(--pma-ok-fg); }
.s-change__where { font-size: var(--pma-text-sm); color: var(--pma-ink-2); }
.s-change__interp { font-size: var(--pma-text-xs); color: var(--pma-ink-muted); line-height: 1.7; }
.s-change__confirm { display: flex; flex-wrap: wrap; gap: var(--pma-space-2); align-items: center; font-size: var(--pma-text-sm); }

.s-akajis { list-style: none; display: grid; gap: var(--pma-space-2); }
.s-akaji { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--pma-space-3); padding: var(--pma-space-3) 0; border-bottom: 1px solid var(--pma-rule-soft); scroll-margin-top: var(--pma-space-6); }
.s-akaji:target { background: var(--pma-ball-client-bg); }
.s-akaji .s-mark { --size: 1.5rem; }
.s-akaji__text { color: var(--pma-ball-client-fg); font-weight: var(--pma-weight-bold); line-height: 1.6; }
.s-akaji__meta { font-size: var(--pma-text-xs); color: var(--pma-ink-muted); }
.s-akaji__state { display: flex; align-items: center; gap: var(--pma-space-1); margin-top: var(--pma-space-1); font-size: var(--pma-text-sm); color: var(--pma-ink-2); }
.s-akaji[data-status="answered"] .s-akaji__state { color: var(--pma-ok-fg); }
.s-akaji[data-status="failed"] .s-akaji__state { color: var(--pma-blocked-fg); }

.s-check__sum { display: flex; align-items: center; gap: var(--pma-space-2); font-weight: var(--pma-weight-bold); }
.s-check__sum[data-tone="ok"] { color: var(--pma-ok-fg); }
.s-check__sum[data-tone="warn"] { color: var(--pma-attn-fg); }
.s-check__sum[data-tone="fail"] { color: var(--pma-blocked-fg); }
.s-checks { list-style: none; display: grid; gap: var(--pma-space-2); }
.s-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--pma-space-2); padding: var(--pma-space-3); background: var(--pma-attn-bg); font-size: var(--pma-text-sm); line-height: 1.6; }
.s-check > .s-ico { margin-top: 0.2em; color: var(--pma-attn-fg); }
.s-check[data-level="fail"] { background: var(--pma-blocked-bg); }
.s-check[data-level="fail"] > .s-ico { color: var(--pma-blocked-fg); }
.s-check[data-level="handoff"] { background: var(--pma-surface-alt); }
.s-check[data-level="handoff"] > .s-ico { color: var(--pma-wait-mark); }
.s-check__name { font-weight: var(--pma-weight-bold); }
.s-check__detail { color: var(--pma-ink-2); }
.s-check__note { color: var(--pma-ink-muted); font-size: var(--pma-text-xs); margin-top: var(--pma-space-1); }
.s-checks__passed { font-size: var(--pma-text-sm); }
.s-checks__passed summary { min-block-size: var(--pma-tap); display: flex; align-items: center; color: var(--pma-link); cursor: pointer; }
.s-checks__passed ul { list-style: none; display: grid; gap: var(--pma-space-2); }
.s-checks__passed li { display: grid; grid-template-columns: auto 1fr; gap: var(--pma-space-2); color: var(--pma-ink-2); line-height: 1.6; }
.s-checks__passed li .s-ico { color: var(--pma-ok-mark); margin-top: 0.2em; }

.s-cuts { list-style: none; display: grid; gap: var(--pma-space-3); }
.s-cut { display: grid; gap: var(--pma-space-2); padding: var(--pma-space-4); border: 1px solid var(--pma-ink); background: var(--pma-surface); }
.s-cut__where { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pma-space-2); font-weight: var(--pma-weight-bold); }
.s-cut__kou { font-weight: var(--pma-weight-regular); color: var(--pma-ink-muted); font-size: var(--pma-text-sm); }
.s-cut__fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--pma-space-1); color: var(--pma-ink-2); }
.s-cut__fig [lang="en"] { font-size: var(--pma-text-lg); }
.s-cut__fig b { font-size: var(--pma-text-xl); color: var(--pma-ink); }
.s-cut__pct { margin-inline-start: var(--pma-space-2); font-size: var(--pma-text-sm); color: var(--pma-attn-fg); font-weight: var(--pma-weight-bold); }
.s-cut__bar { inline-size: 100%; block-size: 6px; }
.s-cut__bar::-webkit-meter-bar { background: var(--pma-attn-bg); border: 0; border-radius: 0; block-size: 6px; }
.s-cut__bar::-webkit-meter-optimum-value, .s-cut__bar::-webkit-meter-suboptimum-value { background: var(--pma-ink-2); }
.s-cut__bar::-moz-meter-bar { background: var(--pma-ink-2); }
.s-cut form { margin: 0; }
.s-cuts__all { font-size: var(--pma-text-sm); color: var(--pma-ink-muted); }

/* ---------------------------------------------------------------- 台割: the strip of spreads under the desk */
.s-daiwari { display: grid; gap: var(--pma-space-2); }
.s-daiwari__title { display: flex; align-items: baseline; gap: var(--pma-space-2); font-size: var(--pma-text-sm); font-weight: var(--pma-weight-bold); color: var(--pma-ink-2); }
.s-daiwari__title [lang="en"] { font-size: var(--pma-text-md); font-weight: var(--pma-weight-display); text-transform: uppercase; letter-spacing: var(--pma-tracking-display); color: var(--pma-ink-muted); }
.s-daiwari__list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: var(--pma-space-3); }
.s-daiwari__item { display: grid; gap: var(--pma-space-1); padding: var(--pma-space-2); color: var(--pma-ink-2); text-decoration: none; border: 1px solid transparent; }
.s-daiwari__item:hover { background: var(--pma-surface-alt); }
.s-daiwari__item[aria-current="true"] { border-color: var(--pma-ink); background: var(--pma-surface); color: var(--pma-ink); }
.s-daiwari__pages { display: grid; grid-template-columns: 1fr 1fr; outline: 1px solid var(--pma-rule); background: #fff; }
.s-daiwari__pages[data-count="1"] { grid-template-columns: 1fr; inline-size: 50%; }
.s-daiwari__pages img { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 662 / 936; }
.s-daiwari__label { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--pma-space-2); font-size: var(--pma-text-xs); line-height: 1.6; }
.s-daiwari__label [lang="en"] { font-size: var(--pma-text-base); color: var(--pma-ink); }
.s-daiwari__dot { display: inline-grid; place-items: center; min-inline-size: 1.25rem; block-size: 1.25rem; padding: 0 0.3em; border-radius: var(--pma-radius-pill); font-weight: var(--pma-weight-bold); background: var(--pma-ball-client-mark); color: #fff; }
.s-daiwari__dot[data-kind="resolved"] { background: transparent; color: var(--pma-ok-fg); box-shadow: inset 0 0 0 2px var(--pma-ok-mark); }

/* ---------------------------------------------------------------- zoom: one page at full resolution */
.s-zoom { inline-size: min(100vw - 2rem, 70rem); max-block-size: calc(100svh - 2rem); padding: 0; border: 0; background: var(--pma-surface-sunk); color: var(--pma-ink); box-shadow: var(--pma-shadow-float); }
.s-zoom[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); animation: s-pop 200ms cubic-bezier(0.23, 1, 0.32, 1); }
.s-zoom::backdrop { background: rgb(4 28 81 / 0.55); }
.s-zoom__bar { display: flex; align-items: center; gap: var(--pma-space-2); padding: var(--pma-space-2) var(--pma-space-2) var(--pma-space-2) var(--pma-space-4); background: var(--pma-surface); border-bottom: 1px solid var(--pma-rule); }
.s-zoom__title { font-size: var(--pma-text-md); font-weight: var(--pma-weight-bold); }
.s-zoom__hint { margin-inline-end: auto; color: var(--pma-ink-muted); font-size: var(--pma-text-sm); }
.s-zoom__body { overflow: auto; padding: var(--pma-space-4); }
.s-zoom__img { display: block; margin: 0 auto; inline-size: 100%; max-inline-size: 910px; block-size: auto; background: #fff; cursor: crosshair; }
.s-zoom__img[data-markable="false"] { cursor: default; }

/* ---------------------------------------------------------------- history: the stack of 校 */
.s-history { margin-top: var(--pma-space-8); }
.s-stack { list-style: none; display: grid; }
.s-slip { position: relative; display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: var(--pma-space-4); align-items: start; padding: var(--pma-space-4); border: 1px solid var(--pma-rule); border-top-width: 0; background: var(--pma-surface-alt); }
.s-slip:first-child { border-top-width: 1px; }
.s-slip[aria-current="true"] { background: var(--pma-surface); box-shadow: inset 4px 0 0 var(--pma-ink); }
.s-slip[data-status="failed"] { background: var(--pma-blocked-bg); }
.s-slip__thumb img, .s-slip__blank { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 662 / 936; outline: 1px solid var(--pma-rule); background: var(--pma-surface); }
.s-slip__body { display: grid; gap: var(--pma-space-1); min-inline-size: 0; }
.s-slip__label { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pma-space-1) var(--pma-space-3); font-size: var(--pma-text-xl); font-weight: var(--pma-weight-bold); letter-spacing: 0.06em; }
.s-slip__label a { color: var(--pma-ink); display: inline-flex; align-items: center; min-block-size: var(--pma-tap); min-inline-size: var(--pma-tap); }
.s-slip__here { font-size: var(--pma-text-xs); font-weight: var(--pma-weight-bold); letter-spacing: var(--pma-tracking-body); padding: 0.1em 0.6em; background: var(--pma-ink); color: var(--pma-paper); }
.s-slip__what { color: var(--pma-ink-2); font-size: var(--pma-text-sm); }
.s-slip__answer { display: flex; flex-wrap: wrap; gap: 0 var(--pma-space-3); font-size: var(--pma-text-sm); line-height: 1.7; }
.s-slip__answer q { color: var(--pma-ball-client-fg); font-weight: var(--pma-weight-bold); }
.s-slip__change { color: var(--pma-ink-2); font-variant-numeric: tabular-nums; }
.s-slip__error { color: var(--pma-blocked-fg); font-size: var(--pma-text-sm); font-weight: var(--pma-weight-bold); }
.s-slip__meta { color: var(--pma-ink-muted); font-size: var(--pma-text-sm); font-variant-numeric: tabular-nums; }
.s-slip__cmp { display: inline-flex; align-items: center; gap: var(--pma-space-1); min-block-size: var(--pma-tap); font-size: var(--pma-text-sm); white-space: nowrap; }
.s-cmpform { display: grid; gap: var(--pma-space-3); margin-top: var(--pma-space-6); }
.s-cmpform__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--pma-space-3); }
.s-cmpform__row .pma-field { min-inline-size: 8rem; }
.s-restyle { margin-top: var(--pma-space-6); border-top: 1px solid var(--pma-rule); }
.s-restyle__sum { display: grid; gap: var(--pma-space-1); padding: var(--pma-space-4) 0; cursor: pointer; list-style: none; }
.s-restyle__sum::-webkit-details-marker { display: none; }
.s-restyle__sum .s-h3 { color: var(--pma-link); text-decoration: underline; text-underline-offset: 0.2em; }
.s-restyle__sum .s-h3::before { content: "＋ "; text-decoration: none; display: inline-block; }
.s-restyle[open] .s-restyle__sum .s-h3::before { content: "－ "; }
.s-restyle__form { display: grid; gap: var(--pma-space-4); padding-bottom: var(--pma-space-5); }
.s-restyle__opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--pma-space-3); }
.s-restyle__opt { display: flex; gap: var(--pma-space-2); padding: var(--pma-space-3); border: 1px solid var(--pma-rule); cursor: pointer; font-size: var(--pma-text-sm); line-height: 1.6; }
.s-restyle__opt:has(:checked) { border-color: var(--pma-brand); background: var(--pma-brand-tint); }
.s-restyle__opt:has(:disabled) { cursor: default; background: var(--pma-surface-sunk); color: var(--pma-ink-muted); }
.s-restyle__opt:has(:focus-visible) { outline: var(--pma-focus-outline); outline-offset: 2px; }
.s-restyle__opt input { margin: -0.5rem -0.5rem -0.5rem -0.75rem; }
.s-restyle__opt > span { display: grid; gap: 2px; }
.s-restyle__words { color: var(--pma-ink-2); font-size: var(--pma-text-xs); }

.s-photosec { margin-top: var(--pma-space-8); }
.s-photogrid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--pma-space-4); }
.s-photocard img { display: block; inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; outline: 1px solid rgb(0 0 0 / 0.1); outline-offset: -1px; }
.s-photocard__credit { margin-top: var(--pma-space-1); font-size: var(--pma-text-sm); font-weight: var(--pma-weight-bold); overflow-wrap: anywhere; }
.s-photocard__meta, .s-photocard__note { font-size: var(--pma-text-xs); color: var(--pma-ink-muted); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- compare */
.s-between { display: grid; gap: var(--pma-space-3); margin-bottom: var(--pma-space-5); }
.s-between__list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: var(--pma-space-3); }
.s-between__item { display: flex; gap: var(--pma-space-3); padding: var(--pma-space-3) var(--pma-space-4); background: var(--pma-ok-bg); border-inline-start: 3px solid var(--pma-ok-mark); }
.s-between__item .s-mark { --size: 1.5rem; }
.s-between__line { display: flex; flex-wrap: wrap; gap: 0 var(--pma-space-3); font-size: var(--pma-text-sm); font-variant-numeric: tabular-nums; }
.s-between__kou { color: var(--pma-ink-muted); }
.s-cmpnote { margin-bottom: var(--pma-space-3); color: var(--pma-ink-2); font-size: var(--pma-text-sm); line-height: 1.7; }
.s-cmpnote b { color: var(--pma-ink); }
.s-cmptools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pma-space-2); margin-bottom: var(--pma-space-3); }
.s-cmptools__label { font-size: var(--pma-text-sm); font-weight: var(--pma-weight-bold); color: var(--pma-ink-2); margin-inline-end: var(--pma-space-1); }
.s-cmptools__btn { min-block-size: var(--pma-tap); min-inline-size: var(--pma-tap); padding: 0 var(--pma-space-4); border: 1px solid var(--pma-rule-input); background: var(--pma-surface); color: var(--pma-ink); font: inherit; font-size: var(--pma-text-sm); cursor: pointer; }
.s-cmptools__btn:hover { border-color: var(--pma-ink); }
.s-cmptools__btn[aria-pressed="true"] { background: var(--pma-ink); color: var(--pma-paper); border-color: var(--pma-ink); font-weight: var(--pma-weight-bold); }
.s-cmptools__btn:focus-visible { outline: var(--pma-focus-outline); outline-offset: 2px; }
.s-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pma-space-5); }
.s-cmp__side { min-inline-size: 0; display: grid; gap: var(--pma-space-2); align-content: start; }
.s-cmp__label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--pma-space-3); padding-bottom: var(--pma-space-2); border-bottom: 2px solid var(--pma-ink); font-size: var(--pma-text-sm); color: var(--pma-ink-2); font-variant-numeric: tabular-nums; }
.s-cmp__label b { font-size: var(--pma-text-xl); letter-spacing: 0.06em; color: var(--pma-ink); }
.s-cmp__pos { align-self: center; padding: 0.05em 0.6em; background: var(--pma-ink); color: var(--pma-paper); font-weight: var(--pma-weight-bold); }
.s-cmp__n { color: var(--pma-ink); font-weight: var(--pma-weight-bold); }
.s-page__zoom { display: block; cursor: zoom-in; }
.s-page__zoom:focus-visible { outline: var(--pma-focus-outline); outline-offset: 2px; }
.s-desk--cmp .s-spread__sheet { --page-h: calc(100svh - 22rem); }
.s-desk--cmp .s-spread__sheet[data-count="2"] { inline-size: min(100%, calc(var(--page-h) * 1.414 + 20px)); }
/* one page of each 校 at a time: big enough to read; "spread" keeps both pages of a side small (the old view) */
.s-desk--cmp [data-cmp-view="0"] .s-spread__sheet[data-count="2"] .s-page:nth-child(2),
.s-desk--cmp [data-cmp-view="1"] .s-spread__sheet[data-count="2"] .s-page:nth-child(1) { display: none; }
.s-desk--cmp [data-cmp-view="0"] .s-spread__sheet,
.s-desk--cmp [data-cmp-view="1"] .s-spread__sheet { grid-template-columns: 1fr; inline-size: 100%; max-inline-size: 38rem; padding: 10px; }
.s-desk--cmp [data-cmp-view="0"] .s-spread__sheet .s-page__frame::before,
.s-desk--cmp [data-cmp-view="1"] .s-spread__sheet .s-page__frame::before {
  inset: -10px; --m: var(--pma-ink-muted); --l: 12px;
  background: linear-gradient(var(--m), var(--m)) top left / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) top left / 1px var(--l) no-repeat,
              linear-gradient(var(--m), var(--m)) top right / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) top right / 1px var(--l) no-repeat,
              linear-gradient(var(--m), var(--m)) bottom left / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) bottom left / 1px var(--l) no-repeat,
              linear-gradient(var(--m), var(--m)) bottom right / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) bottom right / 1px var(--l) no-repeat; }
.s-desk--cmp [data-cmp-view="0"] .s-spread__sheet .s-page__frame::after,
.s-desk--cmp [data-cmp-view="1"] .s-spread__sheet .s-page__frame::after { display: none; }
.s-desk--cmp [data-cmp-view="0"] .s-page[data-side] .s-page__cap,
.s-desk--cmp [data-cmp-view="1"] .s-page[data-side] .s-page__cap { flex-direction: row; }
.s-reader--cmp .s-daiwari { margin-top: var(--pma-space-4); }
.s-cmpback { display: flex; flex-wrap: wrap; gap: var(--pma-space-2); margin-top: var(--pma-space-5); }

/* ---------------------------------------------------------------- rule shelf */
.s-ruleshelf { display: grid; gap: var(--pma-space-4); margin-bottom: var(--pma-space-7); }
.s-shelfhead { display: flex; align-items: baseline; gap: var(--pma-space-2); padding-bottom: var(--pma-space-2); border-bottom: 1px solid var(--pma-rule-strong); font-size: var(--pma-text-lg); font-weight: var(--pma-weight-bold); }
.s-shelfhead .pma-ball { font-size: var(--pma-text-lg); }
.s-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: var(--pma-space-4); }
.s-rule { display: grid; gap: var(--pma-space-3); align-content: start; padding: var(--pma-space-5); border: 1px solid var(--pma-rule); background: var(--pma-surface); scroll-margin-top: var(--pma-space-6); }
.s-rule[data-waiting="true"] { border-color: var(--pma-ink); }
.s-rule:target { outline: 3px solid var(--pma-focus); outline-offset: 2px; }
.s-rule__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--pma-space-1) var(--pma-space-3); font-size: var(--pma-text-sm); color: var(--pma-ink-muted); }
.s-rule__id { font-size: var(--pma-text-lg); color: var(--pma-ink); font-weight: var(--pma-weight-display); }
.s-rule__scope { margin-inline-start: auto; padding: 0.05em 0.7em; border-radius: var(--pma-radius-pill); background: var(--pma-wait-bg); color: var(--pma-wait-fg); }
.s-rule__scope[data-scope="pattern"] { background: var(--pma-brand-tint); color: var(--pma-brand); font-weight: var(--pma-weight-bold); }
.s-rule__akaji { color: var(--pma-ball-client-fg); font-size: var(--pma-text-md); font-weight: var(--pma-weight-bold); line-height: 1.6; padding-inline-start: var(--pma-space-3); border-inline-start: 3px solid var(--pma-ball-client-mark); }
.s-rule__why { color: var(--pma-ink-2); font-size: var(--pma-text-sm); line-height: 1.7; }
.s-rule__change { display: grid; gap: 2px; padding: var(--pma-space-3) 0; border-block: 1px solid var(--pma-rule-soft); }
.s-rule__interp { color: var(--pma-ink-muted); font-size: var(--pma-text-xs); line-height: 1.7; }
.s-rule__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pma-space-2) var(--pma-space-4); font-size: var(--pma-text-sm); color: var(--pma-ink-muted); }
.s-rule__approve { margin: 0 0 0 auto; }

/* ---------------------------------------------------------------- door (signed out, errors) */
.s-door { display: grid; gap: var(--pma-space-4); max-width: 36rem; margin: var(--pma-space-7) auto; }
.s-door__title { font-size: var(--pma-text-xl); font-weight: var(--pma-weight-bold); }
.s-door__body { color: var(--pma-ink-2); line-height: var(--pma-leading-body); }
.s-door__dev { display: grid; gap: var(--pma-space-2); justify-items: start; margin-top: var(--pma-space-5); padding-top: var(--pma-space-5); border-top: 1px solid var(--pma-rule); }

/* ---------------------------------------------------------------- a 校 arriving (after a build, once) */
.s-reader.is-arrived .s-kou, .s-reader.is-arrived .s-change { animation: s-arrive 420ms cubic-bezier(0.23, 1, 0.32, 1) both; }
.s-reader.is-arrived .s-change:nth-of-type(2) { animation-delay: 60ms; }
.s-reader.is-arrived .s-change:nth-of-type(3) { animation-delay: 120ms; }
@keyframes s-arrive { from { opacity: 0; transform: translateY(-8px); } }

/* ---------------------------------------------------------------- widths: 1280 / 768 / 390 / 320 */
@media (max-width: 1279px) {
  .s-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1179px) {
  .s-readgrid { grid-template-columns: minmax(0, 1fr); }
  .s-margin { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); align-items: start; }
}
@media (max-width: 899px) {
  .s-nav a { min-height: var(--pma-tap); }
  .s-bar__in { padding-block: var(--pma-space-2); gap: 0 var(--pma-space-4); }
  .s-nav { order: 3; inline-size: 100%; margin: 0 calc(var(--pma-space-3) * -1); }
  .s-who { margin-inline-start: auto; }
  .s-empty { grid-template-columns: 1fr; padding: var(--pma-space-5); gap: var(--pma-space-5); }
  .s-empty__sheet { max-inline-size: 12rem; }
  .s-cmp { gap: var(--pma-space-3); }
}
@media (max-width: 767px) {
  .s-main { padding-block: var(--pma-space-5) var(--pma-space-7); }
  .s-hide-sm { display: none; }
  .s-sources { grid-template-columns: 1fr; }
  .s-own { padding: var(--pma-space-4); margin-inline: calc(var(--pma-gutter) * -1); }
  .s-photorow, [data-js] .s-photorow { grid-template-columns: 2rem minmax(0, 1fr) var(--pma-tap); grid-template-areas: "no file drop" "no credit credit" "no hint hint"; }
  [data-js] .s-photorow { grid-template-columns: 2rem 5rem minmax(0, 1fr) var(--pma-tap); grid-template-areas: "no thumb credit drop" "no thumb hint hint"; }
  .s-photorow__no { grid-area: no; align-self: start; }
  .s-photorow__thumb { grid-area: thumb; }
  .s-photorow .s-file { grid-area: file; }
  .s-photorow [name="credit"] { grid-area: credit; }
  .s-photorow [name="hint"] { grid-area: hint; }
  .s-photorow__drop { grid-area: drop; }
  .s-desk { grid-template-columns: 1fr 1fr; padding: var(--pma-space-4) var(--pma-space-2) var(--pma-space-2); margin-inline: calc(var(--pma-gutter) * -1); gap: var(--pma-space-2); }
  .s-spreads { grid-column: 1 / -1; grid-row: 1; }
  .s-turn { inline-size: 100%; border-radius: var(--pma-radius-control); }
  .s-turn[data-turn="-1"] { grid-column: 1; grid-row: 2; }
  .s-turn[data-turn="1"] { grid-column: 2; grid-row: 2; }
  .s-spread__sheet { inline-size: 100%; padding: 6px; --l: 8px; }
  .s-spread__sheet[data-count="1"] { inline-size: 55%; }
  .s-page__frame::before { --l: 8px; inset: -6px; }
  .s-page__unit { display: none; }
  .s-mark { --size: 1.5rem; }
  .s-mark__no { font-size: 0.75rem; }
  .s-proofbar { gap: var(--pma-space-3); }
  .s-proofbar__kou { inline-size: 100%; }
  .s-kous { inline-size: 100%; }
  .s-kous__item { flex: 1; justify-content: center; padding: 0 var(--pma-space-2); }
  .s-margin { grid-template-columns: minmax(0, 1fr); }
  .s-daiwari__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--pma-space-1); }
  .s-daiwari__item { padding: var(--pma-space-1); }
  .s-daiwari__label > span:not([lang]):not(.s-daiwari__dot) { display: none; }
  .s-slip { grid-template-columns: 3rem minmax(0, 1fr); padding: var(--pma-space-3); gap: var(--pma-space-3); }
  .s-slip__cmp { grid-column: 2; }
  .s-cmp { grid-template-columns: 1fr; gap: var(--pma-space-4); }
  .s-desk--cmp .s-spread__sheet[data-count="2"] { inline-size: 100%; }
  .s-rules { grid-template-columns: minmax(0, 1fr); }
  .s-rule { padding: var(--pma-space-4); }
  /* on a phone the bar is part of the page (after step 3), so it never covers a card; the choice line says what will start */
  .s-submit { position: static; margin-inline: calc(var(--pma-gutter) * -1); padding-inline: var(--pma-gutter); padding-block: var(--pma-space-3); gap: var(--pma-space-2); }
  .s-submit__est { font-size: var(--pma-text-xs); }
  .s-submit .pma-btn { inline-size: 100%; }
  .s-zoom { inline-size: 100vw; max-inline-size: 100vw; max-block-size: 100svh; block-size: 100svh; margin: 0; }
  .s-zoom__body { padding: var(--pma-space-2); }
  .s-zoom__hint { display: none; }
  .s-zoom__title { margin-inline-end: auto; }
}
@media (max-width: 559px) {
  .s-types { grid-template-columns: minmax(0, 1fr); }
  .s-type { grid-template-columns: 7.5rem minmax(0, 1fr); grid-template-rows: auto; }
  .s-type__pic { aspect-ratio: auto; padding: var(--pma-space-2); }
  .s-type__body { padding: var(--pma-space-3); }
  .s-type__grammar { display: none; }
  .s-type__plan { block-size: auto; inline-size: 100%; }
  .s-type__planpage { padding: 4px; gap: 3px; }
  .s-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pma-space-6) var(--pma-space-4); }
  .s-brand__en { display: none; }
}
@media (max-width: 359px) {
  .s-shelf { grid-template-columns: minmax(0, 1fr); }
  .s-type { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .s-who__name { display: none; }
}
@media (hover: none) { .s-hide-touch { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .s-cover:hover .s-cover__paper { transform: none; }
}

/* delete an issue: quiet until opened, then plainly dangerous */
.s-delete { margin-bottom: var(--pma-space-6); }
.s-btn-danger { background: var(--pma-blocked-bg); color: var(--pma-blocked-fg); border-color: var(--pma-blocked-mark); }
.s-btn-danger:hover { background: var(--pma-blocked-mark); color: var(--pma-surface); }
.s-notice { margin: 0 0 var(--pma-space-4); padding: var(--pma-space-3) var(--pma-space-4); border-radius: var(--pma-radius-control); background: var(--pma-brand-tint); color: var(--pma-ink); }
