/* The desktop board runs off the front of the worktop. Register its paper to
   the same 432 × 534 original crop used by the freestanding mobile board. */
.pc-stage[data-mode][data-thread] .pc-notes[data-tapes] {
  display: block;
  inset: calc(100% * 367 / 941) 0 0 calc(100% * 1167 / 1672);
  width: auto;
  height: auto;
  --paper-crop-width: 426;
  --paper-crop-height: 501;
  min-height: 0;
  padding: 0;
  overflow: visible;
  transform: none;
  pointer-events: none;
}
.pc-stage .pc-paper-surface {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  display: flex;
  flex-direction: column;
  gap: .34em;
  min-width: 0;
  padding: 2px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #978367 transparent;
  overscroll-behavior: contain;
  pointer-events: auto;
}
.pc-stage[data-thread="closed"] .pc-paper-surface > * {
  flex: none;
}
.pc-stage[data-thread="closed"] .pc-comments[data-mode="preview"] {
  overflow: visible;
}
.pc-stage[data-thread="open"] .pc-notes .pc-paper-surface {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}
.pc-stage[data-thread="open"] .pc-notes[data-tapes="2"] .pc-paper-surface {
  grid-template-rows: auto minmax(0, 1fr);
  gap: .24em;
}

/* Picking a second tape changes the deck only. Keep the one-tape notes and
   their layout steady until a second player's take actually arrives. */
.pc-stage[data-mode] .pc-notes[data-tapes="1"] {
  font-size: clamp(14px, 1.50cqw, 32px);
}
.pc-stage[data-mode] .pc-notes[data-tapes="1"] .pc-summary {
  padding: 0;
  border: 0;
}
.pc-stage[data-mode] .pc-notes[data-tapes="1"] .pc-summary .pc-note-head {
  display: block;
  padding: 0;
  background: transparent;
}
.pc-stage[data-mode] .pc-notes[data-tapes="1"] .pc-summary[data-slot] .pc-note-head::before {
  content: none;
}
.pc-stage[data-mode] .pc-notes[data-tapes="1"] .pc-note-title {
  font: 400 clamp(27px, 3.1cqw, 64px)/.99 var(--studio-display);
}
.pc-stage[data-mode] .pc-notes[data-tapes="1"] .pc-note-by {
  font: italic 400 .83em/1.15 var(--studio-body);
}
.pc-stage[data-mode] .pc-notes[data-tapes="1"] .pc-description { margin-top: .25em !important; }
.pc-stage[data-mode] .pc-notes[data-tapes="1"] .pc-actions { padding: .2em 0 .16em; }
.pc-stage[data-mode] .pc-notes[data-tapes="1"] .pc-comments[data-mode="preview"] {
  border-top: 1.5px solid #776956;
  gap: .30em;
}
.pc-stage .pc-notes .pc-comments[data-mode="thread"] {
  display: grid;
  grid-template: "head" auto "body" minmax(0, 1fr) "compose" auto / minmax(0, 1fr);
  gap: .3em;
  min-height: 0;
  height: 100%;
  padding-top: 0;
  border: 0;
}
.pc-stage .pc-notes .pc-comments[data-mode="thread"] .pc-comments-head {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: .3em;
  min-width: 0;
  padding: .18em .22em;
  background: color-mix(in srgb, var(--pc-tape-tone) 34%, #f9e8ce);
  border-inline-start: .18em solid var(--pc-tape-tone);
  border-radius: .18em;
}
.pc-stage .pc-notes .pc-thread-context {
  min-width: 0;
}
.pc-stage .pc-notes .pc-thread-context .pc-comments-title {
  color: var(--ink);
  font: 400 clamp(22px, 2.1cqw, 43px)/1.02 var(--studio-display);
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}
.pc-stage .pc-notes .pc-thread-count {
  margin-top: .12em;
  font: 500 clamp(13px, 1.03cqw, 21px)/1.15 var(--studio-label);
}
.pc-stage .pc-notes .pc-comments-head .pc-close-thread {
  display: grid;
  place-items: center;
  flex: none;
  padding: 0 .12em .09em;
  width: 1.2em;
  height: 1.25em;
  min-height: 0;
  border: 1px solid #b8a488;
  border-radius: .21em .16em .19em .12em;
  color: #34332e;
  background: #f7e6ca;
  text-decoration: none;
  font: 500 clamp(22px, 1.8cqw, 34px)/1 var(--studio-label);
}
.pc-stage .pc-notes .pc-comments[data-mode="thread"] :is(.pc-comment-list,.pc-comment-empty) {
  grid-area: body;
  min-height: 0;
  margin: 0;
}
.pc-stage .pc-notes .pc-comments[data-mode="thread"] .pc-comment-list {
  height: 100%;
  padding: 0 .12em 0 0;
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.pc-stage .pc-notes .pc-comments[data-mode="thread"] .pc-comment {
  padding: .34em .06em;
  color: var(--ink);
  border-bottom: 1px solid #cebaa0;
  font: 400 clamp(14px, 1.14cqw, 24px)/1.3 var(--studio-body);
}
.pc-stage .pc-notes .pc-comments .pc-comment-author {
  padding: 0;
  margin-right: .25em;
  background: transparent;
  font: 500 .94em/1.2 var(--studio-label);
}
.pc-stage .pc-notes .pc-comments .pc-comment-empty {
  padding: .3em .06em;
  font: 400 clamp(14px, 1.14cqw, 24px)/1.3 var(--studio-body);
}
.pc-stage .pc-notes .pc-comments .pc-comment-form {
  --composer-height: max(32px, 2.18em);
  grid-area: compose;
  position: relative;
  display: grid;
  grid-template-columns: var(--composer-height) minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0;
  font: 400 clamp(14px, 1.05cqw, 23px)/1.2 var(--studio-body);
}
.pc-stage .pc-notes .pc-nickname-control {
  display: grid;
}
.pc-stage .pc-notes .pc-comment-form :is(.pc-comment-input, .pc-comment-nickname) {
  width: 100%;
  height: var(--composer-height);
  font: inherit;
}
.pc-stage .pc-notes .pc-comment-form .pc-comment-input {
  border-left: 0;
  border-radius: 0 .23em .26em 0;
}
.pc-stage .pc-notes .pc-comment-form :is(.pc-post, .pc-nickname-toggle) {
  display: grid;
  place-items: center;
  height: var(--composer-height);
  min-height: 0;
  padding: 0;
  border: 1.5px solid #78664e;
  text-align: center;
  text-decoration: none;
}
.pc-stage .pc-notes .pc-comment-form .pc-nickname-toggle {
  border-radius: .29em .04em .07em .24em;
  background: #f0ddbc;
  color: #514c40;
}
.pc-stage .pc-notes .pc-nickname-toggle svg {
  width: 57%;
  height: 57%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linejoin: round;
}
.pc-stage .pc-notes .pc-nickname-toggle:is(.has-nickname, [aria-expanded="true"]) {
  background: #d8e0cd;
  color: #244d51;
}
.pc-stage .pc-notes .pc-comment-form .pc-post {
  min-width: 2.9em;
  margin-inline-start: .28em;
  padding-inline: .48em;
  border-color: #313e3b;
  border-radius: .28em .2em .29em .17em;
  background: #325762;
  color: #fff2d6;
  font: 500 1.08em/1 var(--studio-label);
}
.pc-stage .pc-notes .pc-comment-form .pc-post:disabled {
  opacity: 1;
  background: #dad0b9;
  border-color: #948871;
  color: #5e5b50;
}
.pc-stage .pc-notes .pc-comment-form :is(button, input):focus-visible {
  outline: 2px solid #265962;
  outline-offset: -3px;
  box-shadow: none;
}
.pc-stage .pc-notes .pc-comment-form .pc-post:focus-visible {
  outline-color: #f7db8a;
}
.pc-stage .pc-notes :is(.pc-nickname-hint, .pc-nickname-bubble) {
  position: absolute;
  z-index: 1;
  inset-inline-start: 1px;
  bottom: calc(100% + .46em);
  max-width: calc(100% - 2px);
  padding: .36em .55em;
  border: 1.5px solid #796b54;
  border-radius: .33em .24em .31em .18em;
  background: #fff0d6;
  box-shadow: 1px 2px 0 #6c57443d;
  color: #393a32;
}
.pc-stage .pc-notes :is(.pc-nickname-hint, .pc-nickname-bubble)::after {
  content: '';
  position: absolute;
  left: calc(var(--composer-height) / 2 - .28em);
  bottom: -.33em;
  width: .52em;
  height: .52em;
  transform: rotate(45deg);
  background: inherit;
  border: solid #796b54;
  border-width: 0 1.5px 1.5px 0;
}
.pc-stage .pc-notes .pc-nickname-hint {
  display: none;
  pointer-events: none;
  font-family: var(--studio-label);
}
.pc-stage .pc-notes .pc-nickname-toggle[aria-expanded="false"]:focus-visible + .pc-nickname-hint {
  display: block;
}
@media (hover: hover) {
  .pc-stage .pc-notes .pc-nickname-toggle[aria-expanded="false"]:hover + .pc-nickname-hint { display: block; }
  .pc-stage .pc-notes .pc-comment-form .pc-nickname-toggle:hover { background: #ead0a5; }
  .pc-stage .pc-notes .pc-comment-form .pc-post:enabled:hover { background: #254854; }
}
.pc-stage .pc-notes .pc-nickname-bubble {
  width: 12.5em;
}
.pc-stage .pc-notes .pc-nickname-label {
  display: block;
  margin-bottom: .2em;
  font: 500 1em/1.1 var(--studio-label);
}
.pc-stage .pc-notes .pc-note-title {
  font-family: var(--studio-display);
}
.pc-stage .pc-notes .pc-note-by {
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  font: italic 400 .83em/1.15 var(--studio-body);
}

/* The printed letter and shell swatch repeat on the tape, comment selector,
   and thread header so readers can always tell which take they are discussing. */
.pc-stage .pc-notes[data-tapes="2"] .pc-summary {
  margin: 0 0 .14em;
  padding: .1em 0 .14em .27em;
  border-inline-start: .2em solid var(--pc-tape-tone);
}
.pc-stage .pc-notes[data-tapes="2"] .pc-summary .pc-note-head {
  gap: .28em;
  align-items: baseline;
  padding: .1em .16em;
  background: color-mix(in srgb, var(--pc-tape-tone) 37%, #fae9ce);
}
.pc-stage .pc-notes[data-tapes="2"] .pc-summary[data-slot] .pc-note-head::before {
  content: none;
  display: none;
}
.pc-stage .pc-notes .pc-slot-swatch {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.25em;
  height: 1.24em;
  border: 1px solid color-mix(in srgb, var(--pc-tape-tone) 66%, #27282a);
  border-radius: .1em .18em .12em .14em;
  background: color-mix(in srgb, var(--pc-tape-tone) 60%, #fff1d7);
  color: #211f1b;
  font: 500 .88em/1 var(--studio-label);
  text-align: center;
}
.pc-stage .pc-notes[data-tapes="2"] .pc-summary .pc-note-title {
  font: 400 clamp(18px, 1.66cqw, 35px)/1.06 var(--studio-display);
}
.pc-stage .pc-notes[data-tapes="2"] .pc-note-by {
  font-size: .8em;
}
.pc-stage .pc-notes[data-tapes="2"] .pc-actions {
  flex-wrap: wrap;
  gap: .1em .3em;
}
.pc-stage .pc-notes .pc-actions button.pc-like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .25em;
  min-height: 28px;
  min-width: 0;
  padding: .23em .42em;
  border: 1.5px solid #684237;
  border-radius: .31em .25em .32em .19em;
  box-shadow: 0 1.5px #88664e;
  background: #f7dfb8;
  color: #672f27;
  font: 500 clamp(14px, 1.13cqw, 24px)/1.08 var(--studio-label);
  white-space: nowrap;
  cursor: pointer;
}
.pc-stage .pc-notes .pc-like svg {
  display: block;
  flex: none;
  width: 1em;
  height: 1em;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
  fill: transparent;
}
.pc-stage .pc-notes .pc-like-count {
  padding-inline-start: .31em;
  border-inline-start: 1px solid currentColor;
  font-variant-numeric: tabular-nums;
}
.pc-stage .pc-notes .pc-actions .pc-like[aria-pressed="true"] {
  background: #873e32;
  color: #fff1d6;
  border-color: #5f3128;
}
.pc-stage .pc-notes .pc-like[aria-pressed="true"] svg { fill: currentColor; }
@media (hover: hover) {
  .pc-stage .pc-notes .pc-actions .pc-like:hover { background: #f3cb93; }
  .pc-stage .pc-notes .pc-actions .pc-like[aria-pressed="true"]:hover { background: #71352c; }
}
.pc-stage .pc-notes .pc-actions .pc-like:active { box-shadow: inset 0 1px 2px #4b2a2a55; }
.pc-stage .pc-notes .pc-actions .pc-like:focus-visible {
  outline: 2px solid #264b57;
  outline-offset: 2px;
}
.pc-stage .pc-notes[data-tapes="2"] .pc-comments-link {
  background: color-mix(in srgb, var(--pc-tape-tone) 15%, #fff0d3);
  border-block-end: .17em solid var(--pc-tape-tone);
  border-radius: .09em;
  padding: .13em .18em;
  color: #253a3c;
  text-decoration: none;
}
.pc-stage .pc-notes[data-tapes="2"] .pc-comments-link[aria-expanded="true"] {
  background: color-mix(in srgb, var(--pc-tape-tone) 48%, #fff0d3);
  outline: 1px solid color-mix(in srgb, var(--pc-tape-tone) 58%, #575049);
}
.pc-stage .pc-notes[data-tapes="2"] .pc-summary[data-slot="B"] {
  border-inline-start: .3em double var(--pc-tape-tone);
}
.pc-stage .pc-notes .pc-thread-choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
}
.pc-stage .pc-notes button.pc-thread-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .32em;
  min-width: 0;
  min-height: 1.65em;
  padding: .12em .32em;
  background: color-mix(in srgb, var(--pc-tape-tone) 16%, #faecd1);
  border: 1px solid #bfad90;
  border-inline-start: .2em solid var(--pc-tape-tone);
  border-radius: 3px;
  text-align: left;
}
.pc-stage .pc-notes button.pc-thread-choice[aria-pressed="true"] {
  background: color-mix(in srgb, var(--pc-tape-tone) 43%, #faecd1);
  border-color: #71644f;
  border-inline-start-color: var(--pc-tape-tone);
  box-shadow: inset 0 -1.5px #6b604c;
}
.pc-stage .pc-notes .pc-choice-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font: 400 clamp(18px, 1.55cqw, 32px)/1.02 var(--studio-display);
}
.pc-stage .pc-notes .pc-choice-count {
  padding: .06em .3em;
  border: 1px solid #a69378;
  border-radius: .34em .34em .34em 0;
  font: 500 .77em/1.1 var(--studio-label);
  color: #2f302a;
}
.pc-stage .pc-notes[data-tapes="2"] .pc-comments[data-mode="thread"] .pc-comments-head {
  gap: .36em;
  padding: .1em 0;
  background: transparent;
  border: 0;
}
.pc-stage .pc-notes[data-tapes="2"] .pc-comments-head .pc-close-thread {
  width: auto;
  height: auto;
  min-height: 25px;
  padding: .1em .36em;
  white-space: nowrap;
  font: 500 clamp(13px, .98cqw, 20px)/1.2 var(--studio-label);
}
.pc-stage .pc-notes[data-tapes="2"] .pc-thread-context .pc-comments-title {
  font: 500 clamp(14px, 1.06cqw, 24px)/1.2 var(--studio-label);
}

@media (max-width: 900px), (max-width: 1100px) and (max-aspect-ratio: 1.12) {
  .pc-stage { padding-bottom: 3px; }
  .pc-stage .pc-notes .pc-actions button.pc-like {
    min-height: 44px;
    font-size: 16px;
  }
  .pc-stage[data-mode][data-thread] .pc-notes[data-tapes] {
    position: relative;
    inset: auto;
    width: min(100%, 500px);
    height: auto;
    min-height: 515px;
    aspect-ratio: 432 / 534;
    --paper-crop-width: 432;
    --paper-crop-height: 534;
    padding: 0;
    font-size: 19px;
  }
  .pc-stage[data-mode] .pc-notes[data-tapes="1"] .pc-note-title { font-size: 38px; }
  .pc-stage .pc-notes .pc-comments-head .pc-close-thread {
    width: 40px;
    height: 42px;
    font-size: 26px;
  }
  .pc-stage .pc-notes .pc-thread-context .pc-comments-title { font-size: 28px; }
  .pc-stage .pc-notes .pc-thread-count { font-size: 15px; }
  .pc-stage .pc-notes .pc-comments[data-mode="thread"] .pc-comment { font-size: 16px; }
  .pc-stage .pc-notes .pc-comments .pc-comment-form {
    --composer-height: 44px;
    font-size: 16px;
  }
  .pc-stage .pc-notes[data-tapes="2"] .pc-summary .pc-note-title { font-size: 23px; }
  .pc-stage .pc-notes button.pc-thread-choice { min-height: 44px; }
  .pc-stage .pc-notes .pc-choice-title { font-size: 22px; }
  .pc-stage .pc-notes[data-tapes="2"] .pc-comments-head .pc-close-thread { min-height: 40px; }
  .pc-stage .pc-notes[data-tapes="2"] .pc-thread-context .pc-comments-title { font-size: 16px; }
}
@media (max-width: 609px) {
  .pc-stage[data-mode][data-thread] .pc-notes[data-tapes] {
    width: min(calc(100% + 10px), 500px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pc-stage .pc-summary-enter, .pc-stage .pc-thread-enter {
    animation: pc-paper-detail-in 190ms ease-out;
  }
  @keyframes pc-paper-detail-in {
    from { opacity: .72; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* An additional row appears only for threads with more comments to read. */
.pc-stage .pc-notes .pc-comments[data-mode="thread"]:has(.pc-load-comments:not([hidden])) {
  grid-template: "head" auto "body" minmax(0, 1fr) "more" auto "compose" auto / minmax(0, 1fr);
}
.pc-stage .pc-notes .pc-load-comments {
  grid-area: more;
  justify-self: start;
  font: 500 .9em/1.2 var(--studio-label);
  color: #285653;
  text-decoration: underline;
}
