/* =========================================================================
   The pinned walkthrough.

   One workspace, five real parts of the product, driven by the scroll. Every
   panel shows something the application actually does - the scene list, the
   initiative tracker on a map, the board, the generated graph of links and
   the date poll - so the breadth is shown rather than claimed.
   ========================================================================= */

.showcase {
  position: relative;
  background: var(--bg-page);
}

.showcase__track {
  position: relative;
}

.showcase__stick {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
}

.showcase__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.9fr);
  gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  align-items: center;
  width: 100%;
}

/* ---- the step list ---------------------------------------------------- */

.showcase__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  counter-reset: step;
}

.showcase__step {
  position: relative;
  padding: 0.95rem 1rem 0.95rem 1.1rem;
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: background-color var(--t-mid) var(--ease);
}

.showcase__step::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 2px;
  border-radius: 2px;
  background: var(--line-2);
  transition: background-color var(--t-mid) var(--ease);
}

.showcase__step[data-on='true'] {
  background: var(--bg);
  box-shadow: var(--shadow-card);
}

.showcase__step[data-on='true']::before {
  background: var(--crimson);
}

.showcase__step-name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink-3);
  transition: color var(--t-mid) var(--ease);
}

.showcase__step[data-on='true'] .showcase__step-name {
  color: var(--ink);
}

.showcase__step-name .ico {
  width: 1.3rem;
  height: 1.3rem;
  flex: none;
  opacity: 0.55;
}

.showcase__step[data-on='true'] .showcase__step-name .ico {
  opacity: 1;
  color: var(--crimson);
}

.showcase__step-text {
  margin-top: 0.3rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 30ch;
}

/* The bar that fills while a step is on screen. */
.showcase__progress {
  display: block;
  margin-top: 0.6rem;
  height: 2px;
  border-radius: 2px;
  background: var(--line-2);
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--t-mid) var(--ease);
}

.showcase__step[data-on='true'] .showcase__progress {
  opacity: 1;
}

.showcase__progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--crimson);
}

/* ---- the screen ------------------------------------------------------- */

.showcase__screen {
  position: relative;
  border-radius: var(--radius-block);
  border: 1px solid var(--line-2);
  background: var(--bg);
  box-shadow: var(--shadow-frame);
  overflow: hidden;
  container-type: inline-size;
}

.showcase__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 0.82rem;
}

.showcase__bar b {
  font-weight: 800;
}

.showcase__bar span {
  color: var(--ink-3);
}

.showcase__panes {
  position: relative;
  /* Matched to the workspace in the hero, which grew by a notch: the fuller
     panels were running out of room here too. */
  min-height: clamp(24rem, 37vw, 36rem);
}

.pane {
  position: absolute;
  inset: 0;
  padding: clamp(1rem, 0.7rem + 1vw, 1.6rem);
  display: grid;
  gap: 1rem;
  font-size: clamp(11px, 1.05cqw, 14px);
}

.pane[hidden] {
  display: none;
}

/* ---- pane: adventure --------------------------------------------------- */

.pane--adventure {
  grid-template-columns: 13.5em minmax(0, 1fr) 14em;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.9em 1rem;
}

/* -------------------------------------------------------------------------
   Walls.
   An adventure is split into walls, each holding its own run of scenes, and
   the strip sits across the top of the whole view - above the scene list and
   the editor both, the way the module has it.
   ------------------------------------------------------------------------- */

.walls {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.3em;
  padding-bottom: 0.6em;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.walls::-webkit-scrollbar {
  display: none;
}

.walls__label {
  flex: none;
  margin-right: 0.35em;
  font-size: 0.68em;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.wall {
  display: flex;
  align-items: center;
  gap: 0.4em;
  flex: none;
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: 0.5em 0.5em 0 0;
  border-bottom-color: transparent;
  padding: 0.4em 0.75em;
  margin-bottom: -0.6em;
  font: inherit;
  font-size: 0.82em;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.wall:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.wall[data-on='true'] {
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 900;
  border-color: var(--line-2);
  border-bottom-color: var(--bg-soft);
  box-shadow: inset 0 2px 0 var(--crimson);
}

.wall i {
  font-style: normal;
  font-size: 0.8em;
  font-weight: 800;
  padding: 0.05em 0.35em;
  border-radius: var(--radius-pill);
  background: var(--tint-ink);
  color: var(--ink-3);
}

.wall[data-on='true'] i {
  background: var(--crimson);
  color: #fff;
}

.wall--ghost {
  border-style: dashed;
  border-bottom-color: transparent;
  color: var(--ink-faint);
  font-weight: 700;
}

/* A scene added just now holds nothing but its text block and the adder.
   Without this it inherited the previous scene's materials, so "pusto" was
   printed over somebody else's NPC, map and soundtrack. */
/* A fresh scene shows its own text block and whatever you put in it. The
   inherited markup from the previous scene stays hidden, so clearing the
   flag on the first embed would have dumped somebody else's NPC back in. */
.blocks[data-fresh='true'] > .block--section:not([data-new]),
.blocks[data-fresh='true'] > .block[data-block]:not([data-first]):not([data-new]) {
  display: none;
}

/* -------------------------------------------------------------------------
   Sections group the blocks inside a scene.
   ------------------------------------------------------------------------- */

.block--section {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding-top: 0.6em;
  padding-bottom: 0.4em;
  margin-top: 0.3em;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.block--section:hover {
  background: transparent;
  border-color: transparent;
  border-top-color: var(--line);
}

.section__bar {
  width: 0.2em;
  height: 1.1em;
  border-radius: 1px;
  background: var(--crimson);
  flex: none;
}

.section__name {
  font-size: 0.74em;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section__count {
  font-size: 0.72em;
  color: var(--ink-faint);
}

.section__eye {
  margin-left: auto;
  font-size: 0.68em;
  font-weight: 800;
  padding: 0.12em 0.5em;
  border-radius: var(--radius-pill);
  background: var(--tint-ink);
  color: var(--ink-3);
}

.pane__scenes {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  border-right: 1px solid var(--line);
  padding-right: 1em;
  min-height: 0;
  overflow-y: auto;
}

.pane__scene {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6em;
  align-items: center;
  padding: 0.55em 0.6em;
  border-radius: 0.6em;
  font-size: 1em;
  font-weight: 600;
  color: var(--ink-2);
}

.pane__scene i {
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 0.8em;
  font-weight: 800;
  border: 1.5px solid var(--line-2);
  color: var(--ink-3);
}

.pane__scene[data-on='true'] {
  background: var(--crimson-tint);
  color: var(--ink);
  font-weight: 800;
}

.pane__scene[data-on='true'] i {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
}

.pane__title {
  font-size: 1.5em;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
}

.pane__prose {
  font-size: 1em;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 48ch;
  margin: 0 0 1em;
}

.pane__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.pane__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.4em 0.75em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-2);
  font-size: 0.9em;
  font-weight: 700;
}

.pane__chip .ico {
  width: 1.1em;
  height: 1.1em;
  color: var(--crimson);
}

.pane__tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7em;
  margin-top: 1em;
}

/* ---- pane: map with the initiative tracker ----------------------------- */

.pane--map {
  grid-template-columns: minmax(0, 1fr) 17em;
  gap: 1em;
}

.pane__map {
  position: relative;
  border-radius: 0.8em;
  overflow: hidden;
  background: var(--bg-tint);
  border: 1px solid var(--line);
}

.pane__map svg {
  width: 100%;
  height: 100%;
  display: block;
}









/* the tracker */
.pane__init {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  border-left: 1px solid var(--line);
  padding-left: 1em;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.pane__init-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5em;
}

.pane__init-head b {
  font-size: 1.05em;
  font-weight: 800;
}

.pane__round {
  font-size: 0.82em;
  font-weight: 800;
  padding: 0.25em 0.6em;
  border-radius: var(--radius-pill);
  background: var(--olive-tint);
}

.pane__row {
  display: grid;
  grid-template-columns: 2.5em minmax(0, 1fr) auto;
  gap: 0.55em;
  align-items: center;
  padding: 0.5em;
  border-radius: 0.55em;
  border: 1px solid transparent;
}

.pane__row[data-on='true'] {
  background: var(--olive-tint);
  border-color: rgba(180, 185, 76, 0.5);
}

.pane__row-art {
  width: 2.5em;
  height: 2.5em;
  border-radius: 0.4em;
  background: var(--bg-tint);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.pane__row-art .cut {
  width: 86%;
  height: 86%;
  color: var(--ink);
}

.pane__row-name {
  font-size: 0.92em;
  font-weight: 800;
  line-height: 1.2;
}

.pane__row-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2em 0.45em;
  margin-top: 0.15em;
  font-size: 0.76em;
  color: var(--ink-3);
  font-weight: 600;
}

/* The middle column has to be allowed to shrink. Without this the status
   pill pushed out of its own track and sat on the initiative number. */
.pane__row > span:nth-child(2) {
  min-width: 0;
}

.pane__status {
  /* It is an <em>, and the italic leaned the last letter out of the pill. */
  font-style: normal;
  white-space: nowrap;
  padding: 0.15em 0.55em;
  line-height: 1.5;
  border-radius: var(--radius-pill);
  background: var(--crimson-tint);
  color: var(--crimson-deep);
  font-weight: 800;
}

.pane__init-num {
  font-size: 1.05em;
  font-weight: 900;
  color: var(--ink-3);
}

.pane__row[data-on='true'] .pane__init-num {
  color: var(--ink);
}

.pane__hp {
  grid-column: 2 / -1;
  height: 0.35em;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  overflow: hidden;
  margin-top: 0.3em;
}

.pane__hp i {
  display: block;
  height: 100%;
  background: var(--crimson);
  width: var(--hp, 100%);
}

/* ---- pane: board ------------------------------------------------------- */

/* These two position their children by hand, but they must stay absolute:
   `.pane` relies on inset: 0 for its height, and relative collapses it. */
.pane--board {
  display: block;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 2.2em 2.2em;
}

.pane__wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pane__wire {
  fill: none;
  stroke: var(--crimson);
  stroke-width: 1.8;
  stroke-dasharray: 5 6;
  opacity: 0.55;
}

.pane__note {
  position: absolute;
  width: 13em;
  padding: 0.75em 0.85em;
  border-radius: 0.7em;
  background: var(--bg);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-card);
  cursor: grab;
  touch-action: none;
}

.pane__note[data-kind='note'] {
  background: var(--olive-tint);
  border-color: rgba(180, 185, 76, 0.45);
}

.pane__note-kind {
  display: flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.7em;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.pane__note-kind .ico {
  width: 1em;
  height: 1em;
}

.pane__note-name {
  display: block;
  margin-top: 0.3em;
  font-size: 0.95em;
  font-weight: 800;
  line-height: 1.25;
}

.pane__note-meta {
  display: block;
  margin-top: 0.2em;
  font-size: 0.82em;
  color: var(--ink-3);
  line-height: 1.4;
}

/* ---- pane: mind map ---------------------------------------------------- */

.pane--mind {
  display: block;
}













/* ---- pane: calendar ---------------------------------------------------- */

.pane--poll {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.4em;
  align-items: start;
}

.pane__poll-rows {
  display: grid;
  gap: 0.55em;
  margin-top: 0.9em;
}

.pane__poll-row {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr) 2.4em;
  align-items: center;
  gap: 0.6em;
  font-size: 0.95em;
}

.pane__poll-row b {
  font-weight: 800;
}

.pane__poll-bar {
  height: 0.7em;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  overflow: hidden;
}

.pane__poll-bar i {
  display: block;
  height: 100%;
  width: var(--fill, 0%);
  background: var(--crimson);
  border-radius: inherit;
}

.pane__poll-row.is-best .pane__poll-bar i {
  background: var(--olive);
}

.pane__poll-row span:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--ink-3);
}

.pane__who {
  display: grid;
  gap: 0.5em;
  padding: 0.9em;
  border-radius: 0.7em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.pane__who-row {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.92em;
  font-weight: 600;
}

.pane__who-row .ico {
  width: 1.6em;
  height: 1.6em;
  color: var(--ink);
  opacity: 0.8;
}

.pane__who-row em {
  margin-left: auto;
  font-style: normal;
  font-weight: 800;
  font-size: 0.85em;
  padding: 0.2em 0.55em;
  border-radius: var(--radius-pill);
  background: var(--olive-tint);
}

.pane__who-row[data-no='true'] em {
  background: var(--bg-sunken);
  color: var(--ink-3);
}

.pane__status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3em 0.7em;
  border-radius: var(--radius-pill);
  background: var(--olive-tint);
  font-size: 0.82em;
  font-weight: 800;
}

/* ---- narrow ------------------------------------------------------------ */

@media (max-width: 1000px) {
  .showcase__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .showcase__steps {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .showcase__step {
    flex: none;
    width: 15rem;
  }

  .showcase__stick {
    min-height: auto;
  }
}

@container (max-width: 640px) {
  .pane--adventure,
  .pane--map,
  .pane--poll {
    grid-template-columns: minmax(0, 1fr);
  }

  .pane__scenes,
  .pane__init {
    border: 0;
    padding: 0;
  }

  .pane__tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Line icons, used wherever an engraving would render too small to read. */
.ico {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  display: block;
}

/* -------------------------------------------------------------------------
   The dice. Talehaven has a roller with formulas like 1k20+5 and a history,
   so this is the real thing in miniature, not a decoration.
   ------------------------------------------------------------------------- */

.pane__dice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6em;
  width: 100%;
  padding: 0.5em 0.6em;
  border: 1px solid var(--line-2);
  border-radius: 0.6em;
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.pane__dice:hover {
  border-color: var(--crimson);
  background: var(--crimson-tint);
}

.pane__dice-face {
  width: 2.1em;
  height: 2.1em;
  display: grid;
  place-items: center;
  font-size: 0.92em;
  font-weight: 900;
  color: #fff;
  background: var(--ink);
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}

.pane__dice-label {
  font-size: 0.86em;
  font-weight: 600;
  color: var(--ink-2);
}

.pane__dice-label b {
  font-weight: 800;
  color: var(--ink);
}

.pane__dice-out {
  font-size: 0.82em;
  font-weight: 800;
  color: var(--ink-3);
  white-space: nowrap;
}

.pane__dice[data-rolled='true'] .pane__dice-out {
  color: var(--crimson-deep);
}

/* -------------------------------------------------------------------------
   A scene is built from blocks, the way the editor in the application works.
   The blocks can be reordered by dragging the grip.
   ------------------------------------------------------------------------- */

/* The stack grows as blocks are added, so the column scrolls instead of
   pushing the rest of the workspace out of the window. */
.pane__editor {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 0.4em;
}

.pane__scene--ghost {
  color: var(--ink-3);
  font-weight: 600;
}

.pane__scene--ghost i {
  border-style: dashed;
}

.blocks {
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  margin-top: 0.8em;
  min-height: 0;
}

.block {
  position: relative;
  padding: 0.85em 0.9em 0.9em 1.9em;
  border: 1px solid transparent;
  border-radius: 0.7em;
  background: transparent;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.block:hover {
  background: var(--bg-soft);
  border-color: var(--line);
}

.block[data-dragging='true'] {
  background: var(--bg);
  border-color: var(--line-2);
  box-shadow: var(--shadow-lift);
  z-index: 3;
}

/* Six dots, the handle every block editor uses. */
.block__grip {
  position: absolute;
  left: 0.5em;
  top: 0.95em;
  width: 0.7em;
  height: 1.1em;
  cursor: grab;
  opacity: 0;
  touch-action: none;
  background-image: radial-gradient(currentColor 1.1px, transparent 1.2px);
  background-size: 0.35em 0.35em;
  color: var(--ink-3);
  transition: opacity var(--t-fast) var(--ease);
}

.block:hover .block__grip {
  opacity: 1;
}

.block__kind {
  display: block;
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.45em;
}

.block__prose {
  margin: 0;
  font-size: 1em;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 48ch;
}

.block--ghost {
  border: 1px dashed var(--line-2);
  padding-left: 0.9em;
}

.block__adders {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em;
}

.block__adder {
  padding: 0.35em 0.7em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-size: 0.85em;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.block__adder:hover {
  border-color: var(--crimson);
  color: var(--crimson-deep);
}

/* ---- the music block ---- */

.player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.3fr) auto;
  align-items: center;
  gap: 0.75em;
  padding: 0.6em 0.75em;
  border: 1px solid var(--line-2);
  border-radius: 0.6em;
  background: var(--bg);
}

.player__play {
  width: 2.3em;
  height: 2.3em;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.player__play:hover {
  background: var(--crimson);
}

.player__play svg {
  width: 1.1em;
  height: 1.1em;
}

.player__meta b {
  display: block;
  font-size: 0.92em;
  font-weight: 800;
  line-height: 1.2;
}

.player__meta small {
  display: block;
  font-size: 0.78em;
  color: var(--ink-3);
  margin-top: 0.1em;
}

.player__wave {
  display: flex;
  align-items: center;
  gap: 0.14em;
  height: 1.7em;
}

.player__wave {
  cursor: pointer;
}

.player__wave i {
  flex: 1;
  min-width: 2px;
  border-radius: 1px;
  background: var(--line-2);
  transition: background-color 120ms var(--ease);
}

/* The played part of the track is the coloured part. */
.player__wave i[data-on='true'] {
  background: var(--olive);
}

.player[data-on='true'] .player__wave i[data-on='true'] {
  background: var(--crimson);
}

.player__time {
  font-size: 0.82em;
  font-weight: 800;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------------
   The campaign shelf. Materials are dragged from here straight into the
   scene, which is how embedding works in the application.
   ------------------------------------------------------------------------- */

.shelf {
  border-left: 1px solid var(--line);
  padding-left: 1em;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.shelf__head {
  margin: 0;
  font-size: 0.78em;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.shelf__hint {
  margin: 0.3em 0 0.9em;
  font-size: 0.82em;
  color: var(--ink-3);
}

.shelf__list {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.shelf__item {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr);
  align-items: center;
  gap: 0.6em;
  padding: 0.45em;
  border: 1px solid var(--line);
  border-radius: 0.55em;
  background: var(--bg);
  cursor: grab;
  touch-action: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.shelf__item:hover {
  border-color: var(--crimson);
}

.shelf__item[data-dragging='true'] {
  box-shadow: var(--shadow-lift);
  border-color: var(--crimson);
  z-index: 10;
  cursor: grabbing;
}

.shelf__art {
  width: 2.4em;
  height: 2.4em;
  border-radius: 0.4em;
  background: var(--bg-tint);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.shelf__art .cut {
  width: 84%;
  height: 84%;
  color: var(--ink);
}

.shelf__meta {
  min-width: 0;
}

.shelf__meta b {
  display: block;
  font-size: 0.88em;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shelf__meta small {
  display: block;
  font-size: 0.76em;
  color: var(--ink-3);
  margin-top: 0.1em;
}

/* The line that shows where the thing will land. */
.blocks__drop {
  height: 2px;
  border-radius: 2px;
  background: var(--crimson);
  margin: -0.28em 0;
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: left center;
  transition: opacity 120ms var(--ease), transform 160ms var(--ease);
}

.blocks__drop[data-on='true'] {
  opacity: 1;
  transform: scaleX(1);
}

.blocks[data-armed='true'] {
  outline: 2px dashed rgba(185, 76, 76, 0.4);
  outline-offset: 6px;
  border-radius: 0.8em;
}

/* A material block that has just been embedded. */
.block--material {
  display: grid;
  grid-template-columns: 2.8em minmax(0, 1fr);
  gap: 0.7em;
  align-items: center;
  padding-left: 1.9em;
}

.block--material .shelf__art {
  width: 2.8em;
  height: 2.8em;
}

.block--material b {
  display: block;
  font-size: 0.98em;
  font-weight: 800;
}

.block--material small {
  display: block;
  font-size: 0.82em;
  color: var(--ink-3);
  margin-top: 0.1em;
}

@container (max-width: 820px) {
  .shelf {
    display: none;
  }

  .pane--adventure {
    grid-template-columns: 12em minmax(0, 1fr);
  }
}

/* -------------------------------------------------------------------------
   The tactical map.
   A real grid, real terrain, fog over what the party has not walked, and
   tokens big enough to read and grab. Clicking one opens its card.
   ------------------------------------------------------------------------- */

.pane__map {
  position: relative;
  border-radius: 0.8em;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #e8e2d2;
}

.pane__mapimg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grid and fog sit over the painted map, in that order. */
.pane__grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.pane__fog {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.pane__tools {
  position: absolute;
  left: 0.7em;
  top: 0.7em;
  z-index: 4;
  display: flex;
  gap: 0.25em;
  padding: 0.25em;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.pane__tool {
  padding: 0.3em 0.65em;
  border-radius: var(--radius-pill);
  font-size: 0.78em;
  font-weight: 700;
  color: var(--ink-2);
}

.pane__tool[data-on='true'] {
  background: var(--ink);
  color: #fff;
}

.pane__scalebar {
  position: absolute;
  right: 0.7em;
  bottom: 0.7em;
  z-index: 4;
  padding: 0.28em 0.65em;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.74em;
  font-weight: 700;
  color: var(--ink-2);
  box-shadow: var(--shadow-card);
}

/* ---- tokens ---- */

.token {
  position: absolute;
  z-index: 3;
  width: 4.2em;
  height: 4.2em;
  margin: -2.1em 0 0 -2.1em;
  padding: 0;
  border: 0;
  background: none;
  cursor: grab;
  touch-action: none;
  transition: filter var(--t-fast) var(--ease);
}

.token[data-dragging='true'] {
  cursor: grabbing;
  z-index: 6;
}

.token:hover {
  filter: drop-shadow(0 6px 12px rgba(25, 23, 20, 0.35));
}

.token__art {
  position: absolute;
  inset: 0.42em;
  border-radius: 50%;
  background: #f6f3ec;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(25, 23, 20, 0.35);
}

.token__art .cut {
  width: 82%;
  height: 82%;
  color: var(--ink);
}

/* The ring is the health bar: a conic sweep behind the portrait. */
.token__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--ring) 0 var(--hp, 100%),
    rgba(25, 23, 20, 0.35) var(--hp, 100%) 100%
  );
}

.token[data-side='party'] { --ring: #6f7a46; }
.token[data-side='foe'] { --ring: #b94c4c; }

.token__name {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 0.25em);
  padding: 0.12em 0.5em;
  border-radius: var(--radius-pill);
  background: rgba(21, 19, 14, 0.82);
  color: #fff;
  font-size: 0.7em;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
}

/* Whose turn it is. */
.token[data-active='true']::after {
  content: '';
  position: absolute;
  inset: -0.35em;
  border-radius: 50%;
  border: 2px solid var(--olive);
  animation: token-turn 2s ease-out infinite;
}

@keyframes token-turn {
  0% { transform: scale(1); opacity: 0.9; }
  70% { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1.22); opacity: 0; }
}

/* ---- the token card ---- */

.tokencard {
  position: absolute;
  z-index: 8;
  width: 17em;
  padding: 0.85em;
  border-radius: 0.7em;
  background: var(--bg);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lift);
}

.tokencard[hidden] {
  display: none;
}

.tokencard__head {
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr);
  gap: 0.6em;
  align-items: center;
}

.tokencard__art {
  width: 2.6em;
  height: 2.6em;
  border-radius: 0.45em;
  background: var(--bg-tint);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.tokencard__art .cut {
  width: 84%;
  height: 84%;
  color: var(--ink);
}

.tokencard__head b {
  display: block;
  font-size: 0.98em;
  font-weight: 800;
  line-height: 1.2;
}

.tokencard__head small {
  display: block;
  font-size: 0.8em;
  color: var(--ink-3);
  margin-top: 0.12em;
}

.tokencard__status {
  display: inline-block;
  font-style: normal;
  white-space: nowrap;
  margin-left: 0.4em;
  padding: 0.12em 0.5em;
  border-radius: var(--radius-pill);
  background: var(--tint-crimson-2);
  color: var(--crimson-deep);
  font-weight: 800;
}

.tokencard__hp {
  position: relative;
  height: 1.1em;
  margin: 0.7em 0 0.6em;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  overflow: hidden;
}

.tokencard__hp span {
  display: block;
  height: 100%;
  background: var(--crimson);
  transition: width var(--t-mid) var(--ease);
}

.tokencard__hp em {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 0.72em;
  font-weight: 800;
  color: var(--ink);
}

.tokencard__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35em;
}

.stat {
  display: grid;
  justify-items: center;
  gap: 0.05em;
  padding: 0.4em 0.2em;
  border-radius: 0.4em;
  background: var(--bg-soft);
}

.stat b {
  font-size: 0.66em;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.stat i {
  font-style: normal;
  font-size: 1em;
  font-weight: 900;
}

.stat em {
  font-style: normal;
  font-size: 0.72em;
  font-weight: 800;
  color: var(--crimson-deep);
}

.tokencard__acts {
  display: flex;
  gap: 0.3em;
  margin-top: 0.7em;
}

.tokencard__act {
  flex: 1;
  text-align: center;
  padding: 0.4em 0.3em;
  border-radius: 0.45em;
  border: 1px solid var(--line-2);
  font-size: 0.78em;
  font-weight: 800;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.tokencard__act:hover {
  border-color: var(--crimson);
  background: var(--tint-crimson);
}

.pane__initfoot {
  margin: 0.7em 0 0;
  font-size: 0.8em;
  color: var(--ink-3);
  line-height: 1.4;
}

.pane__row {
  cursor: pointer;
}

/* -------------------------------------------------------------------------
   The graph of links.
   Six hubs around the campaign, their entries hanging off them. The graph is
   built by the application from what is already in the world, so the counts
   on the hubs are the point, not decoration.
   ------------------------------------------------------------------------- */

.mnode {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.45em 0.75em;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-card);
  font-size: 0.88em;
  font-weight: 700;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
  z-index: 2;
  transition: opacity var(--t-mid) var(--ease), border-color var(--t-fast) var(--ease);
}

.mnode[data-dragging='true'] {
  cursor: grabbing;
  box-shadow: var(--shadow-lift);
  z-index: 6;
}

.mnode .ico {
  width: 1.05em;
  height: 1.05em;
  color: var(--crimson);
}

.mnode[data-kind='root'] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  font-weight: 800;
  font-size: 1em;
  padding: 0.6em 1em;
  z-index: 4;
}

.mnode[data-kind='root'] .ico {
  color: var(--olive);
}

.mnode[data-kind='hub'] {
  font-weight: 800;
  z-index: 3;
}

.mnode[data-kind='hub'] i {
  font-style: normal;
  font-size: 0.78em;
  font-weight: 800;
  padding: 0.1em 0.45em;
  border-radius: var(--radius-pill);
  background: var(--tint-olive);
  color: var(--ink-2);
}

.mnode[data-kind='leaf'] {
  font-size: 0.8em;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-soft);
  box-shadow: none;
}

.mnode[data-dim='true'] {
  opacity: 0.18;
}

.mnode:not([data-dim='true']):hover {
  border-color: var(--crimson);
}

.mlegend {
  position: absolute;
  left: 1em;
  bottom: 1em;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3em;
  font-size: 0.8em;
}

.mlegend__label {
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85em;
  color: var(--ink-3);
  margin-right: 0.2em;
}

.mfilter {
  padding: 0.3em 0.7em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-size: 1em;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.mfilter[data-on='false'] {
  opacity: 0.45;
}

.mfilter:hover {
  border-color: var(--crimson);
}

.mhint {
  position: absolute;
  right: 1em;
  bottom: 1em;
  z-index: 5;
  margin: 0;
  font-size: 0.78em;
  color: var(--ink-3);
}

.pane__wire--strong {
  stroke-width: 2.4;
  opacity: 0.5;
}

/* -------------------------------------------------------------------------
   The date poll.
   A grid rather than three bars, because the thing worth showing is that
   everyone fills in their own row and the date falls out of it.
   ------------------------------------------------------------------------- */

.pane--poll {
  display: block;
}

.poll2 {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.poll2__head .pane__prose {
  max-width: 56ch;
  margin-bottom: 0.6em;
}

.poll2__grid {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.4em;
  font-size: 0.95em;
}

.poll2__grid th,
.poll2__grid td {
  padding: 0.45em 0.5em;
  text-align: center;
}

.poll2__grid thead th {
  font-size: 0.85em;
  font-weight: 700;
  color: var(--ink-3);
  line-height: 1.25;
  border-bottom: 1px solid var(--line-2);
}

.poll2__grid thead th b {
  font-size: 1.1em;
  font-weight: 900;
  color: var(--ink);
}

.poll2__grid thead th[data-lead='true'] b {
  color: var(--crimson-deep);
}

.poll2__grid tbody th {
  display: flex;
  align-items: center;
  gap: 0.5em;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.poll2__grid tbody th em {
  font-style: normal;
  font-size: 0.68em;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: 0.45em;
  padding: 0.1em 0.4em;
  border-radius: var(--radius-pill);
  background: var(--tint-ink);
  color: var(--ink-3);
}

.poll2__grid tbody tr[data-you='true'] th em {
  background: var(--crimson);
  color: #fff;
}

.poll2__grid tbody th .cut {
  width: 1.7em;
  height: 1.7em;
  flex: none;
  color: var(--ink);
  opacity: 0.85;
}

.poll2__grid tbody tr[data-you='true'] th {
  color: var(--crimson-deep);
  font-weight: 800;
}

.poll2__grid tbody tr + tr th,
.poll2__grid tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.vote {
  width: 2.1em;
  height: 2.1em;
  border-radius: 0.5em;
  border: 1.5px solid var(--line-2);
  background: var(--bg);
  cursor: pointer;
  position: relative;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.vote:hover {
  border-color: var(--crimson);
}

.vote[data-on='true'] {
  background: var(--olive);
  border-color: var(--olive);
}

.vote[data-on='true']::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0.75em;
  height: 0.42em;
  border-left: 2.2px solid var(--ink);
  border-bottom: 2.2px solid var(--ink);
  transform: translate(-50%, -50%) rotate(-45deg);
}

.poll2__grid tfoot th,
.poll2__grid tfoot td {
  border-top: 1.5px solid var(--line-2);
  padding-top: 0.6em;
  font-size: 0.9em;
  font-weight: 800;
  color: var(--ink-3);
}

.poll2__grid tfoot td b {
  font-weight: 900;
  color: var(--ink);
}

.poll2__grid tfoot td[data-lead='true'] b {
  color: var(--crimson-deep);
}

.poll2__hint {
  margin: 0.8em 0 0;
  font-size: 0.85em;
  color: var(--ink-3);
}

.poll2__decide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
  /* It used to be pushed to the bottom with margin-top: auto, which left a
     hand's width of nothing between the table and the button. */
  margin-top: 1.1em;
}

.poll2[data-done='true'] .poll2__decide {
  display: none;
}

/* ---- the confirmed date ------------------------------------------------ */

.poll2__done {
  display: flex;
  align-items: center;
  gap: 0.9em;
  margin-top: 1.1em;
  padding: 0.85em 1em;
  border-radius: 0.8em;
  border: 1px solid rgba(180, 185, 76, 0.55);
  background: var(--olive-tint);
}

.poll2__seal {
  width: 2.6em;
  height: 2.6em;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid rgba(180, 185, 76, 0.6);
  color: var(--olive-deep, #6f7430);
}

.poll2__seal .cut {
  width: 70%;
  height: 70%;
}

.poll2__done-text {
  min-width: 0;
  flex: 1;
}

.poll2__done-text b {
  display: block;
  font-size: 0.98em;
  font-weight: 900;
}

.poll2__done-text small {
  display: block;
  margin-top: 0.15em;
  font-size: 0.8em;
  color: var(--ink-2);
  line-height: 1.4;
}

.poll2__faces {
  display: flex;
  flex: none;
}

.poll2__faces i {
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid rgba(180, 185, 76, 0.6);
  color: var(--ink);
  margin-left: -0.5em;
}

.poll2__faces i:first-child {
  margin-left: 0;
}

.poll2__again {
  flex: none;
  border: 0;
  background: transparent;
  padding: 0.3em 0.2em;
  font: inherit;
  font-size: 0.8em;
  font-weight: 800;
  color: var(--ink-3);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.poll2__again:hover {
  color: var(--ink);
}

/* A short burst of confetti when the date lands. */
.poll2__spark {
  position: absolute;
  width: 0.5em;
  height: 0.5em;
  border-radius: 1px;
  pointer-events: none;
  z-index: 6;
}

.poll2__lead {
  font-size: 0.95em;
  color: var(--ink-2);
}

.poll2__lead b {
  font-weight: 800;
  color: var(--ink);
}

.poll2__confirm {
  padding: 0.6em 1.1em;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 0.9em;
  font-weight: 800;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease);
}

.poll2__confirm:hover {
  background: var(--crimson);
}

.poll2[data-done='true'] .poll2__confirm {
  background: var(--olive);
  color: var(--ink);
}

/* -------------------------------------------------------------------------
   The music library.
   MP3, YouTube, Spotify and plain links, in folders, which is what the module
   actually holds. Pressing play makes a sound: a quiet pad synthesised in the
   browser, so no audio file has to ship with the page.
   ------------------------------------------------------------------------- */

.pane--music {
  grid-template-columns: 12em minmax(0, 1fr);
  gap: 1.2em;
}

.music__side {
  border-right: 1px solid var(--line);
  padding-right: 1em;
  min-width: 0;
}

.music__label {
  margin: 0 0 0.6em;
  font-size: 0.74em;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.music__label + .music__label {
  margin-top: 1.4em;
}

.music__folders {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.music__folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  padding: 0.45em 0.6em;
  border-radius: 0.5em;
  font-size: 0.92em;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
}

.music__folder i {
  font-style: normal;
  font-size: 0.82em;
  color: var(--ink-3);
}

.music__folder[data-on='true'] {
  background: var(--tint-olive);
  color: var(--ink);
  font-weight: 800;
}

.music__sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
}

.music__source {
  padding: 0.25em 0.6em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-2);
  font-size: 0.8em;
  font-weight: 700;
  color: var(--ink-2);
}

.music__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.music__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
}

.music__hint {
  font-size: 0.85em;
  color: var(--ink-3);
}

.music__list {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  margin-top: 0.9em;
  min-height: 0;
  overflow-y: auto;
}

.track {
  display: grid;
  grid-template-columns: 1.9em minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 0.75em;
  width: 100%;
  padding: 0.55em 0.6em;
  border: 1px solid transparent;
  border-radius: 0.55em;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.track:hover {
  background: var(--bg-soft);
  border-color: var(--line);
}

.track[data-on='true'] {
  background: var(--tint-olive);
  border-color: rgba(180, 185, 76, 0.45);
}

.track__play {
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: grid;
  place-items: center;
  position: relative;
}

.track__play::after {
  content: '';
  border-left: 0.5em solid var(--ink-2);
  border-top: 0.32em solid transparent;
  border-bottom: 0.32em solid transparent;
  margin-left: 0.14em;
}

.track[data-on='true'] .track__play {
  background: var(--ink);
  border-color: var(--ink);
}

.track[data-on='true'] .track__play::after {
  border: 0;
  width: 0.55em;
  height: 0.55em;
  margin: 0;
  background:
    linear-gradient(var(--olive), var(--olive)) left / 0.2em 100% no-repeat,
    linear-gradient(var(--olive), var(--olive)) right / 0.2em 100% no-repeat;
}

.track__name {
  font-size: 0.95em;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track__tag {
  font-size: 0.8em;
  color: var(--ink-3);
  white-space: nowrap;
}

.track__src {
  padding: 0.15em 0.5em;
  border-radius: var(--radius-pill);
  background: var(--tint-ink);
  font-size: 0.74em;
  font-weight: 800;
  color: var(--ink-2);
}

.track__len {
  font-size: 0.82em;
  font-weight: 700;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.player--bar {
  margin-top: auto;
  border-radius: 0.6em;
  background: var(--bg-soft);
}

@container (max-width: 760px) {
  .pane--music {
    grid-template-columns: minmax(0, 1fr);
  }

  .music__side {
    display: none;
  }

  .track {
    grid-template-columns: 1.9em minmax(0, 1fr) auto;
  }

  .track__tag,
  .track__src {
    display: none;
  }
}

/* -------------------------------------------------------------------------
   The entry panel.
   One record, two views. The toggle is the point: people want to see both the
   fields they fill and the card the table ends up looking at.
   ------------------------------------------------------------------------- */

.pane--entry {
  display: flex;
  flex-direction: column;
  gap: 0.9em;
}

.entry__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
}

.entry__kinds {
  display: flex;
  gap: 0.25em;
}

.entry__kind {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.45em 0.8em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-size: 0.9em;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.entry__kind .cut {
  width: 1.2em;
  height: 1.2em;
  color: var(--ink);
  opacity: 0.8;
}

.entry__kind[aria-selected='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 800;
}

.entry__kind[aria-selected='true'] .cut {
  color: #fff;
  opacity: 1;
}

.entry__toggle {
  display: inline-flex;
  padding: 0.2em;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
}

.entry__tab {
  padding: 0.4em 0.9em;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: 0.88em;
  font-weight: 800;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.entry__tab[aria-selected='true'] {
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.entry__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.entry__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8em 1em;
  align-content: start;
}

.entry__form .field--wide {
  grid-column: 1 / -1;
}

.entry__form[hidden],
.entry__preview[hidden] {
  display: none;
}

.entry__stats {
  grid-column: 1 / -1;
}

.entry__statgrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.4em;
  margin-top: 0.4em;
}

.entry__stat {
  display: grid;
  gap: 0.15em;
  padding: 0.45em 0.3em;
  border-radius: 0.45em;
  background: var(--bg-soft);
  text-align: center;
}

.entry__stat b {
  font-size: 0.68em;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.entry__stat input {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 0.95em;
  font-weight: 900;
  color: var(--ink);
}

.entry__stat input:focus {
  outline: none;
  color: var(--crimson-deep);
}

/* ---- the preview ---- */

.entry__preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1.2em;
  align-items: start;
}

.ecard {
  border: 1.5px solid var(--ink);
  border-radius: 0.8em;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-card);
}

.ecard__art {
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  background: var(--tint-sage);
  border-bottom: 1.5px solid var(--ink);
}

.ecard__art .cut {
  width: 42%;
  height: 78%;
  color: var(--ink);
}

.ecard__head {
  padding: 0.85em 0.95em 0.4em;
}

.ecard__name {
  font-size: 1.15em;
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.ecard__role {
  font-size: 0.85em;
  font-weight: 700;
  color: var(--ink-2);
  margin-top: 0.15em;
}

.ecard__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35em;
  padding: 0.5em 0.95em 0;
}

.ecard__rows {
  padding: 0.8em 0.95em 0;
  display: grid;
  gap: 0.6em;
}

.ecard__row {
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr);
  gap: 0.6em;
  font-size: 0.86em;
  line-height: 1.5;
}

.ecard__key {
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 0.15em;
}

.ecard__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
  padding: 0.85em 0.95em 1em;
}

.ecard__tag {
  padding: 0.2em 0.55em;
  border-radius: var(--radius-pill);
  background: var(--tint-olive);
  font-size: 0.75em;
  font-weight: 800;
}

.entry__note {
  padding: 0.9em 1em;
  border-radius: 0.6em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.88em;
  line-height: 1.55;
  color: var(--ink-2);
}

.entry__note b {
  display: block;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.3em;
}

.entry__foot {
  margin: 0;
  font-size: 0.82em;
  color: var(--ink-3);
}

@container (max-width: 760px) {
  .entry__form,
  .entry__preview {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry__statgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* A quiet scrollbar for the panels that scroll inside the workspace. The
   default one is wide enough to read as a second border. */
.pane__editor,
.pane__scenes,
.pane__init,
.shelf,
.music__list,
.entry__body {
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
  overscroll-behavior: contain;
}

.pane__editor::-webkit-scrollbar,
.pane__scenes::-webkit-scrollbar,
.pane__init::-webkit-scrollbar,
.shelf::-webkit-scrollbar,
.music__list::-webkit-scrollbar,
.entry__body::-webkit-scrollbar {
  width: 8px;
}

.pane__editor::-webkit-scrollbar-thumb,
.pane__scenes::-webkit-scrollbar-thumb,
.pane__init::-webkit-scrollbar-thumb,
.shelf::-webkit-scrollbar-thumb,
.music__list::-webkit-scrollbar-thumb,
.entry__body::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: var(--line-2);
}

/* -------------------------------------------------------------------------
   The board, as it looks during a session.
   Everything here exists in the product: a toolbar, round tokens with HP and
   status, the initiative tracker, the dice roller and the audio console.
   ------------------------------------------------------------------------- */

.btools {
  position: absolute;
  left: 0.8em;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  padding: 0.4em;
  border-radius: 0.8em;
  background: var(--bg);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lift);
}

.btool {
  width: 2.1em;
  height: 2.1em;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0.5em;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.btool svg {
  width: 1.15em;
  height: 1.15em;
}

.btool:hover {
  background: var(--bg-tint);
  color: var(--ink);
}

.btool[data-on='true'] {
  background: var(--ink);
  color: #fff;
}

.btools__rule {
  height: 1px;
  margin: 0.25em 0.3em;
  background: var(--line-2);
}

/* ---- tokens ------------------------------------------------------------ */

.btokens__label {
  position: absolute;
  z-index: 2;
  margin: 0;
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.btoken {
  position: absolute;
  z-index: 3;
  width: 4.4em;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: grab;
  touch-action: none;
  outline: none;
}

.btoken__art {
  position: relative;
  width: 3.6em;
  height: 3.6em;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-2);
  color: var(--ink);
  overflow: hidden;
  transition:
    border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.btoken__art .cut {
  width: 78%;
  height: 78%;
}

.btoken[data-side='party'] .btoken__art {
  border-color: rgba(180, 185, 76, 0.75);
}

.btoken[data-side='foe'] .btoken__art {
  border-color: rgba(185, 76, 76, 0.75);
  background: var(--tint-crimson);
}

.btoken:hover .btoken__art {
  transform: translateY(-2px);
}

/* The turn marker: a ring that sits outside the token. */
.btoken__ring {
  position: absolute;
  top: -0.3em;
  left: 50%;
  width: 4.2em;
  height: 4.2em;
  margin-left: -2.1em;
  border-radius: 50%;
  border: 2px dashed var(--crimson);
  opacity: 0;
  pointer-events: none;
}

.btoken[data-on='true'] .btoken__ring {
  opacity: 1;
}

.btoken__hp {
  width: 3em;
  height: 0.32em;
  margin-top: 0.3em;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  overflow: hidden;
}

.btoken__hp i {
  display: block;
  height: 100%;
  width: var(--hp, 100%);
  background: var(--crimson);
  transition: width var(--t-mid, 0.3s) var(--ease);
}

.btoken__name {
  margin-top: 0.15em;
  font-size: 0.72em;
  font-weight: 800;
  color: var(--ink-2);
  white-space: nowrap;
}

.btoken__dot {
  position: absolute;
  top: 0;
  right: 0.3em;
  width: 0.8em;
  height: 0.8em;
  border-radius: 50%;
  background: var(--crimson);
  border: 2px solid var(--bg);
}

.btoken[data-dead='true'] .btoken__art {
  filter: grayscale(1);
  opacity: 0.45;
}

/* ---- panels docked on the board ---------------------------------------- */

.bpanel {
  position: absolute;
  z-index: 5;
  width: 15.5em;
  border-radius: 0.8em;
  background: var(--bg);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  touch-action: none;
}

.bpanel--init {
  right: 1em;
  top: 1em;
}

.bpanel--dice {
  right: 1em;
  bottom: 5.5em;
}

.bpanel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  padding: 0.5em 0.7em;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  cursor: grab;
}

.bpanel__bar b {
  font-size: 0.82em;
  font-weight: 900;
}

.bpanel__round {
  font-size: 0.7em;
  font-weight: 800;
  padding: 0.15em 0.5em;
  border-radius: var(--radius-pill);
  background: var(--tint-olive);
  color: var(--ink-2);
  white-space: nowrap;
}

.bpanel__body {
  padding: 0.5em;
}

.bpanel__foot {
  padding: 0 0.5em 0.5em;
}

.bbtn {
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 0.4em 0.8em;
  font: inherit;
  font-size: 0.76em;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.bbtn:hover {
  background: var(--bg-tint);
}

.bbtn--full {
  width: 100%;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.bbtn--full:hover {
  background: var(--crimson);
  border-color: var(--crimson);
}

.bbtn--go {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
  margin-left: auto;
}

.bbtn--go:hover {
  background: var(--crimson-deep);
}

/* ---- initiative rows --------------------------------------------------- */

.brow {
  display: grid;
  grid-template-columns: 1.6em minmax(0, 1fr) auto;
  gap: 0.4em;
  align-items: center;
  padding: 0.3em 0.35em;
  border-radius: 0.45em;
  border: 1px solid transparent;
}

.brow[data-on='true'] {
  background: var(--tint-crimson);
  border-color: rgba(185, 76, 76, 0.4);
}

.brow__art {
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  background: var(--bg-tint);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink);
}

.brow__art .cut {
  width: 80%;
  height: 80%;
}

.brow__name {
  min-width: 0;
  font-size: 0.78em;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brow__hp {
  display: block;
  font-size: 0.68em;
  font-weight: 600;
  color: var(--ink-3);
}

.brow__num {
  font-size: 0.84em;
  font-weight: 900;
  color: var(--ink-3);
}

.brow[data-on='true'] .brow__num {
  color: var(--crimson-deep);
}

/* ---- dice -------------------------------------------------------------- */

.bdice__formula {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em;
}

.bdie {
  flex: 1;
  min-width: 2.2em;
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: 0.4em;
  padding: 0.3em 0;
  font: inherit;
  font-size: 0.72em;
  font-weight: 800;
  cursor: pointer;
}

.bdie[data-on='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.bdice__mod {
  display: flex;
  align-items: center;
  gap: 0.3em;
  margin-top: 0.45em;
}

.bdice__mod > span {
  font-size: 0.8em;
  font-weight: 900;
  min-width: 2em;
  text-align: center;
}

.bmod {
  width: 1.6em;
  height: 1.6em;
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: 0.35em;
  font: inherit;
  font-size: 0.8em;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-2);
}

.bmod:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.bdice__out {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  margin-top: 0.5em;
  padding: 0.45em 0.6em;
  border-radius: 0.5em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.bdice__out b {
  font-size: 1.5em;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  min-width: 1.6em;
}

.bdice__out small {
  font-size: 0.7em;
  color: var(--ink-3);
  line-height: 1.3;
}

.bdice__out[data-crit='hit'] {
  background: var(--tint-olive);
  border-color: rgba(180, 185, 76, 0.6);
}

.bdice__out[data-crit='miss'] {
  background: var(--tint-crimson);
  border-color: rgba(185, 76, 76, 0.45);
}

.bdice__out[data-crit='hit'] b {
  color: var(--olive-deep, #6f7430);
}

.bdice__out[data-crit='miss'] b {
  color: var(--crimson-deep);
}

.bdice__log {
  list-style: none;
  margin: 0.45em 0 0;
  padding: 0;
  display: grid;
  gap: 0.15em;
  max-height: 4.5em;
  overflow-y: auto;
}

.bdice__log li {
  display: flex;
  justify-content: space-between;
  gap: 0.5em;
  font-size: 0.68em;
  color: var(--ink-3);
  padding: 0.1em 0.1em;
  border-bottom: 1px dotted var(--line-2);
}

.bdice__log li b {
  font-weight: 900;
  color: var(--ink-2);
}

/* ---- the audio console ------------------------------------------------- */

.bconsole {
  position: absolute;
  left: 4.5em;
  right: 17.5em;
  bottom: 1em;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.5em 0.7em;
  border-radius: 0.8em;
  background: var(--night);
  color: #f3f0e8;
  box-shadow: var(--shadow-lift);
}

.bconsole__play {
  width: 2.2em;
  height: 2.2em;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f3f0e8;
  color: var(--night);
  cursor: pointer;
}

.bconsole__play svg {
  width: 1.1em;
  height: 1.1em;
}

.bconsole__meta {
  min-width: 6em;
  flex: none;
}

.bconsole__meta b {
  display: block;
  font-size: 0.78em;
  font-weight: 800;
}

.bconsole__meta small {
  display: block;
  font-size: 0.66em;
  opacity: 0.65;
}

.bconsole__wave {
  flex: 1;
  min-width: 0;
  height: 1.6em;
  display: flex;
  align-items: center;
  gap: 1.5px;
}

.bconsole__wave i {
  flex: 1;
  min-width: 1px;
  border-radius: 1px;
  background: rgba(243, 240, 232, 0.28);
}

.bconsole__wave i[data-on='true'] {
  background: var(--olive);
}

.bconsole__pads {
  display: flex;
  gap: 0.25em;
  flex: none;
}

.bpad {
  border: 1px solid rgba(243, 240, 232, 0.25);
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 0.25em 0.6em;
  font: inherit;
  font-size: 0.68em;
  font-weight: 800;
  color: #f3f0e8;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease);
}

.bpad:hover,
.bpad[data-on='true'] {
  background: var(--crimson);
  border-color: var(--crimson);
}

.bconsole__vol {
  display: flex;
  align-items: center;
  gap: 0.35em;
  flex: none;
}

.bconsole__vol svg {
  width: 1em;
  height: 1em;
  opacity: 0.7;
}

.bconsole__vol input {
  width: 4em;
  accent-color: var(--olive);
}

@container (max-width: 760px) {
  .btools,
  .bconsole__pads,
  .bconsole__vol {
    display: none;
  }

  .bpanel--dice {
    display: none;
  }

  .bconsole {
    left: 1em;
    right: 1em;
  }
}

/* -------------------------------------------------------------------------
   The sheet builder: a catalogue on the left, an A4 sheet on the right.
   Blocks land on the sheet when clicked or dragged, and Preview strips the
   editing chrome - the same two modes the module has.
   ------------------------------------------------------------------------- */

.pane--forge {
  grid-template-columns: 12.5em minmax(0, 1fr);
  gap: 1.1em;
}

.forge__lib {
  border-right: 1px solid var(--line);
  padding-right: 0.9em;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.forge__libhead {
  margin: 0 0 0.4em;
  font-size: 0.72em;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.forge__cat {
  margin: 0.7em 0 0.25em;
  font-size: 0.68em;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.forge__part {
  display: flex;
  align-items: center;
  gap: 0.5em;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: 0.5em;
  padding: 0.45em 0.55em;
  font: inherit;
  font-size: 0.8em;
  font-weight: 700;
  color: var(--ink-2);
  cursor: grab;
  touch-action: none;
  transition:
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.forge__part::before {
  content: '';
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--sage);
  flex: none;
}

.forge__part:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.forge__part[data-used='true']::before {
  background: var(--crimson);
}

.forge__main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.forge__bar {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding-bottom: 0.6em;
  border-bottom: 1px solid var(--line);
}

.forge__name {
  font-size: 0.9em;
  font-weight: 900;
}

.forge__opts {
  display: flex;
  align-items: center;
  gap: 0.3em;
  margin-left: auto;
}

.forge__opt {
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 0.22em 0.6em;
  font: inherit;
  font-size: 0.7em;
  font-weight: 800;
  color: var(--ink-3);
  cursor: pointer;
}

.forge__opt[data-on='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.forge__size {
  font-size: 0.7em;
  font-weight: 700;
  color: var(--ink-faint);
}

.forge__modes {
  display: flex;
  gap: 0.15em;
  padding: 0.15em;
  border-radius: var(--radius-pill);
  background: var(--bg-tint);
}

.forge__mode {
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 0.25em 0.65em;
  font: inherit;
  font-size: 0.72em;
  font-weight: 800;
  color: var(--ink-3);
  cursor: pointer;
}

.forge__mode[aria-selected='true'] {
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.forge__sheet {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 0.7em;
  padding: 0.9em;
  border-radius: 0.6em;
  border: 1px solid var(--line-2);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.forge__sheet[data-grid='true'] {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 1.4em 1.4em;
}

.forge__sheet[data-over='true'] {
  border-color: var(--crimson);
  background-color: var(--tint-crimson);
}

.forge__empty {
  margin: auto;
  font-size: 0.82em;
  color: var(--ink-faint);
  text-align: center;
}

.fblock {
  position: relative;
  border-radius: 0.5em;
  border: 1px solid var(--line-2);
  background: var(--bg);
  padding: 0.55em 0.7em;
}

.fblock__head {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.68em;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.fblock__kill {
  margin-left: auto;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.1em;
  line-height: 1;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 0 0.2em;
}

.fblock__kill:hover {
  color: var(--crimson);
}

.fblock__body {
  margin-top: 0.4em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
}

.fblock__body > span:not(.fblock__port) {
  padding: 0.25em 0.5em;
  border-radius: 0.35em;
  background: var(--bg-soft);
  font-size: 0.72em;
  font-weight: 700;
  color: var(--ink-2);
}

.fblock__body > span b {
  font-weight: 900;
  color: var(--ink);
}

.fblock__port {
  width: 3.2em;
  height: 3.6em;
  border-radius: 0.35em;
  background: var(--bg-tint);
  display: grid;
  place-items: center;
  color: var(--ink);
}

.fblock__port .cut {
  width: 80%;
  height: 80%;
}

.pane--forge[data-mode='preview'] .fblock {
  border-color: transparent;
}

.pane--forge[data-mode='preview'] .fblock__kill,
.pane--forge[data-mode='preview'] .forge__sheet {
  background-image: none;
}

.pane--forge[data-mode='preview'] .fblock__kill {
  display: none;
}

.forge__foot {
  margin: 0.6em 0 0;
  font-size: 0.74em;
  color: var(--ink-3);
}

/* -------------------------------------------------------------------------
   The treasury: a chain of denominations and the party's purse.
   ------------------------------------------------------------------------- */

.pane--vault {
  grid-template-columns: minmax(0, 1fr) 16em;
  gap: 1.4em;
}

.vault__left {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.vault__chain {
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  margin-top: 1em;
  position: relative;
}

/* The line that makes the chain read as a chain. */
.vault__chain::before {
  content: '';
  position: absolute;
  left: 1.5em;
  top: 2.4em;
  bottom: 3em;
  width: 2px;
  background: repeating-linear-gradient(var(--line-2) 0 4px, transparent 4px 8px);
}

.coinrow {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr) auto;
  gap: 0.7em;
  align-items: center;
  padding: 0.55em 0.7em;
  border-radius: 0.6em;
  border: 1px solid var(--line-2);
  background: var(--bg);
  position: relative;
}

.coinrow__face {
  width: 2.4em;
  height: 2.4em;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78em;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 2px solid;
}

.coinrow__face[data-tone='gold'] {
  background: #f2e4bd;
  border-color: #c8a44e;
  color: #6b5316;
}

.coinrow__face[data-tone='silver'] {
  background: #e8e8e4;
  border-color: #a9a9a2;
  color: #4e4e48;
}

.coinrow__face[data-tone='copper'] {
  background: #efd9c9;
  border-color: #b5774f;
  color: #6b3f22;
}

.coinrow__meta b {
  display: block;
  font-size: 0.86em;
  font-weight: 900;
}

.coinrow__meta small {
  display: block;
  font-size: 0.74em;
  color: var(--ink-3);
}

.coinrow__meta small i {
  font-style: normal;
  font-weight: 900;
  color: var(--ink);
}

.coinrow__have {
  font-size: 1.1em;
  font-weight: 900;
  min-width: 1.6em;
  text-align: right;
}

.coinrow--ghost {
  display: block;
  padding: 0.5em 0.7em;
  border-style: dashed;
  font-size: 0.78em;
  font-weight: 800;
  color: var(--ink-faint);
  text-align: center;
}

.vault__prices {
  margin-top: 1.1em;
  padding-top: 0.9em;
  border-top: 1px solid var(--line);
}

.vault__priceshead {
  margin: 0 0 0.5em;
  font-size: 0.68em;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vault__pricelist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.15em 1.4em;
}

.vault__pricelist li {
  display: flex;
  justify-content: space-between;
  gap: 0.6em;
  font-size: 0.8em;
  padding: 0.28em 0;
  border-bottom: 1px dotted var(--line-2);
}

.vault__pricelist b {
  font-weight: 900;
  white-space: nowrap;
}

.vault__pricelist[data-unit='grosz'] b {
  color: var(--crimson-deep);
}

.vault__unit {
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 0.7em;
  font-size: 0.76em;
  color: var(--ink-3);
}

.vault__right {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  min-height: 0;
  overflow-y: auto;
}

.vault__purse,
.vault__meta {
  padding: 0.8em 0.9em;
  border-radius: 0.7em;
  border: 1px solid var(--line-2);
  background: var(--bg-soft);
}

.vault__label {
  margin: 0;
  font-size: 0.68em;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vault__total {
  margin: 0.3em 0 0;
  font-size: 1.15em;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.vault__sum {
  margin: 0.1em 0 0;
  font-size: 0.74em;
  color: var(--ink-3);
}

.vault__sum b {
  font-weight: 900;
  color: var(--ink-2);
}

.vault__ops {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
  margin-top: 0.6em;
}

.vault__note {
  margin: 0.5em 0 0;
  font-size: 0.7em;
  color: var(--ink-faint);
}

.vault__metahint {
  margin: 0.2em 0 0.5em;
  font-size: 0.74em;
  color: var(--ink-3);
}

.metacoin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  padding: 0.35em 0;
  border-top: 1px solid var(--line);
}

.metacoin b {
  font-size: 0.78em;
  font-weight: 800;
}

.metacoin__pips {
  display: flex;
  gap: 0.2em;
  flex: none;
}

.metacoin__pips i {
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  cursor: pointer;
}

.metacoin__pips i[data-on='true'] {
  background: var(--crimson);
  border-color: var(--crimson);
}

/* -------------------------------------------------------------------------
   The character sheet.
   ------------------------------------------------------------------------- */

.pane--sheet {
  grid-template-columns: minmax(0, 1fr);
}

.sheet {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.sheet__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9em;
  align-items: center;
  padding-bottom: 0.8em;
  border-bottom: 2px solid var(--ink);
}

.sheet__portrait {
  width: 4em;
  height: 4.6em;
  border-radius: 0.5em;
  background: var(--bg-tint);
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  color: var(--ink);
  overflow: hidden;
}

.sheet__portrait .cut {
  width: 82%;
  height: 82%;
}

.sheet__id b {
  display: block;
  font-size: 1.25em;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.sheet__id span {
  display: block;
  font-size: 0.8em;
  color: var(--ink-2);
}

.sheet__sys {
  margin-top: 0.3em;
  display: inline-block !important;
  padding: 0.12em 0.5em;
  border-radius: var(--radius-pill);
  background: var(--tint-olive);
  font-size: 0.68em !important;
  font-weight: 800;
  color: var(--ink-2) !important;
}

.sheet__vitals {
  display: flex;
  gap: 0.45em;
}

.vital {
  display: grid;
  justify-items: center;
  gap: 0.05em;
  min-width: 3.4em;
  padding: 0.4em 0.5em;
  border-radius: 0.5em;
  border: 1px solid var(--line-2);
  background: var(--bg);
}

.vital i {
  font-style: normal;
  font-size: 0.62em;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vital b {
  font-size: 1.1em;
  font-weight: 900;
  line-height: 1;
}

.vital small {
  font-size: 0.62em;
  color: var(--ink-faint);
}

.sheet__grid {
  display: grid;
  /* auto-fit, not a hard breakpoint: dropping to two columns adds a whole
     third row and the sheet stopped fitting the panel. */
  grid-template-columns: repeat(auto-fit, minmax(11.5em, 1fr));
  gap: 0.8em;
  margin-top: 0.9em;
}

.sheet__box {
  padding: 0.7em 0.8em 0.8em;
  border-radius: 0.6em;
  border: 1px solid var(--line-2);
  background: var(--bg);
}

.sheet__boxhead {
  margin: 0 0 0.5em;
  font-size: 0.66em;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sheet__boxhead--sub {
  margin-top: 0.8em;
}

.sheet__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35em;
}

.sstat {
  display: grid;
  justify-items: center;
  gap: 0.05em;
  padding: 0.4em 0.2em;
  border-radius: 0.45em;
  border: 1px solid var(--line-2);
  background: var(--bg-soft);
  font: inherit;
  cursor: pointer;
  transition:
    border-color var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

.sstat:hover {
  border-color: var(--ink);
  background: var(--bg);
}

.sstat i {
  font-style: normal;
  font-size: 0.6em;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.sstat b {
  font-size: 1em;
  font-weight: 900;
  line-height: 1.1;
}

.sstat em {
  font-style: normal;
  font-size: 0.66em;
  font-weight: 800;
  color: var(--crimson-deep);
}

.sheet__tip {
  margin: 0.55em 0 0;
  font-size: 0.72em;
  color: var(--ink-3);
  min-height: 1.4em;
}

.sheet__skills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2em;
}

.sheet__skills li {
  display: flex;
  justify-content: space-between;
  gap: 0.5em;
  font-size: 0.78em;
  padding: 0.2em 0;
  border-bottom: 1px dotted var(--line-2);
}

.sheet__skills b {
  font-weight: 900;
}

.sheet__weapons {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76em;
}

.sheet__weapons th,
.sheet__weapons td {
  text-align: left;
  padding: 0.22em 0.2em;
  border-bottom: 1px dotted var(--line-2);
}

.sheet__weapons th {
  font-weight: 800;
}

.sheet__weapons td {
  text-align: right;
  color: var(--ink-2);
  font-weight: 700;
}

.sheet__track {
  display: flex;
  gap: 0.3em;
}

.strack {
  flex: 1;
  border: 1px solid var(--line-2);
  background: var(--bg-soft);
  border-radius: 0.4em;
  padding: 0.3em 0;
  font: inherit;
  font-size: 0.72em;
  font-weight: 800;
  cursor: pointer;
}

.strack:hover {
  border-color: var(--crimson);
  color: var(--crimson-deep);
}

.sheet__foot {
  margin: 0.9em 0 0;
  font-size: 0.74em;
  color: var(--ink-3);
  max-width: 70ch;
}

/* -------------------------------------------------------------------------
   The marketplace teaser. It says "soon" and means it.
   ------------------------------------------------------------------------- */

.pane--market {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 1em;
}

.market__soon {
  display: inline-block;
  padding: 0.2em 0.65em;
  border-radius: var(--radius-pill);
  background: var(--crimson);
  color: #fff;
  font-size: 0.68em;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
}

.market__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7em;
  min-height: 0;
}

.mcard {
  display: flex;
  flex-direction: column;
  padding: 0.7em;
  border-radius: 0.6em;
  border: 1px solid var(--line-2);
  background: var(--bg);
  opacity: 0.82;
}

.mcard__art {
  height: 5.5em;
  border-radius: 0.45em;
  background: var(--bg-tint);
  display: grid;
  place-items: center;
  color: var(--ink);
  margin-bottom: 0.5em;
}

.mcard__art .cut {
  width: 62%;
  height: 72%;
}

.mcard b {
  font-size: 0.82em;
  font-weight: 900;
  line-height: 1.25;
}

.mcard small {
  margin-top: 0.15em;
  font-size: 0.72em;
  color: var(--ink-3);
  line-height: 1.35;
}

.mcard__price {
  margin-top: auto;
  padding-top: 0.5em;
  font-size: 0.7em;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.market__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
}

.market__note {
  font-size: 0.8em;
  color: var(--ink-3);
}

.market__cta {
  width: auto;
  flex: none;
}

/* -------------------------------------------------------------------------
   The timeline: events on one rail, read in whichever reckoning you keep.
   ------------------------------------------------------------------------- */

.pane--time {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.8em;
}

.time__bar {
  display: flex;
  align-items: center;
  gap: 0.6em;
  flex-wrap: wrap;
  padding-bottom: 0.7em;
  border-bottom: 1px solid var(--line);
}

.time__label {
  font-size: 0.68em;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.time__cals {
  display: flex;
  gap: 0.15em;
  padding: 0.15em;
  border-radius: var(--radius-pill);
  background: var(--bg-tint);
}

.tcal {
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 0.28em 0.7em;
  font: inherit;
  font-size: 0.74em;
  font-weight: 800;
  color: var(--ink-3);
  cursor: pointer;
  white-space: nowrap;
}

.tcal[data-on='true'] {
  background: var(--ink);
  color: #fff;
}

.time__kinds {
  display: flex;
  gap: 0.25em;
  margin-left: auto;
  flex-wrap: wrap;
}

.tkind {
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 0.22em 0.6em;
  font: inherit;
  font-size: 0.7em;
  font-weight: 800;
  color: var(--ink-faint);
  cursor: pointer;
}

.tkind[data-on='true'] {
  color: var(--ink);
  border-color: var(--ink);
}

.tkind[data-on='true'][data-kind='sesja'] { background: var(--tint-ink); }
.tkind[data-on='true'][data-kind='lore'] { background: var(--tint-sage); }
.tkind[data-on='true'][data-kind='zwrot'] { background: var(--tint-crimson); }
.tkind[data-on='true'][data-kind='kamien'] { background: var(--tint-olive); }

.time__rail {
  position: relative;
  /* A band of its own height, centred in the row. Left to fill the row the
     cards sat at the very top and bottom with a void between them. */
  height: 21em;
  max-height: 100%;
  margin: auto 0;
  overflow-x: auto;
  /* visible would add a second scrollbar; the stems stay inside the band.
     The 5px of padding is room for the hover lift, which this would clip. */
  overflow-y: hidden;
  padding: 5px 0;
}

.time__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: var(--line-2);
}

.time__events {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.1em;
  min-width: min-content;
  height: 100%;
  padding: 0 0.3em;
}

.tev {
  position: relative;
  width: 11em;
  /* Fixed, so the stem to the line is the same length on every card. The
     stem and the dot hang outside the card, so this must not clip. */
  height: 8.6em;
  flex: none;
  border-radius: 0.55em;
  border: 1px solid var(--line-2);
  background: var(--bg);
  padding: 0.55em 0.65em;
  cursor: pointer;
  transition:
    transform var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.tev:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
}

/* Odd events hang above the line, even ones below, so the rail reads. */
.tev[data-side='up'] {
  align-self: flex-start;
}

.tev[data-side='down'] {
  align-self: flex-end;
}

.tev::after {
  content: '';
  position: absolute;
  left: 1.4em;
  width: 2px;
  background: var(--line-2);
}

.tev[data-side='up']::after {
  top: 100%;
  height: 1.9em;
}

.tev[data-side='down']::after {
  bottom: 100%;
  height: 1.9em;
}

.tev__dot {
  position: absolute;
  left: 1em;
  width: 0.8em;
  height: 0.8em;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: var(--ink);
}

.tev[data-side='up'] .tev__dot { top: calc(100% + 1.5em); }
.tev[data-side='down'] .tev__dot { bottom: calc(100% + 1.5em); }

.tev[data-kind='lore'] .tev__dot { background: var(--sage); }
.tev[data-kind='zwrot'] .tev__dot { background: var(--crimson); }
.tev[data-kind='kamien'] .tev__dot { background: var(--olive); }

.tev__when {
  display: block;
  font-size: 0.68em;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.tev__name {
  display: block;
  margin-top: 0.1em;
  font-size: 0.82em;
  font-weight: 900;
  line-height: 1.2;
}

.tev__text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.15em;
  font-size: 0.72em;
  color: var(--ink-3);
  line-height: 1.35;
}

.tev__tag {
  position: absolute;
  left: 0.65em;
  bottom: 0.55em;
  display: inline-block;
  padding: 0.1em 0.45em;
  border-radius: var(--radius-pill);
  font-size: 0.64em;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tev[data-kind='sesja'] .tev__tag { background: var(--tint-ink); color: var(--ink-2); }
.tev[data-kind='lore'] .tev__tag { background: var(--tint-sage); color: var(--ink-2); }
.tev[data-kind='zwrot'] .tev__tag { background: var(--tint-crimson); color: var(--crimson-deep); }
.tev[data-kind='kamien'] .tev__tag { background: var(--tint-olive); color: var(--ink-2); }

.tev[data-gm='true'] .tev__name::after {
  content: 'MG';
  margin-left: 0.4em;
  padding: 0.05em 0.3em;
  border-radius: 0.25em;
  background: var(--ink);
  color: #fff;
  font-size: 0.7em;
  vertical-align: middle;
}

.time__foot {
  margin: 0;
  font-size: 0.74em;
  color: var(--ink-3);
  max-width: 78ch;
}

.time__foot b {
  font-weight: 900;
  color: var(--ink-2);
}

@container (max-width: 760px) {
  .pane--forge {
    grid-template-columns: minmax(0, 1fr);
  }

  .forge__lib {
    display: none;
  }

  .pane--vault {
    grid-template-columns: minmax(0, 1fr);
  }

  .market__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sheet__gm {
  font-style: normal;
  font-size: 0.86em;
  letter-spacing: 0.06em;
  margin-left: 0.4em;
  padding: 0.1em 0.4em;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
}

.sheet__notes {
  margin: 0;
  font-size: 0.78em;
  line-height: 1.5;
  color: var(--ink-2);
}

.sheet__grid + .sheet__grid {
  margin-top: 0.8em;
}

/* -------------------------------------------------------------------------
   The heading inside the pinned column.
   The section heading scrolls out of sight the moment the view pins, so the
   column carries its own, which stays put for the whole walkthrough.
   ------------------------------------------------------------------------- */

.showcase__intro {
  margin-bottom: clamp(1.25rem, 1rem + 1vw, 2rem);
}

.showcase__introtitle {
  margin: 0.4rem 0 0;
  font-size: clamp(1.35rem, 1.05rem + 1.1vw, 2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.showcase__introtext {
  margin: 0.5rem 0 0;
  max-width: 34ch;
  font-size: var(--step-small);
  color: var(--ink-2);
  line-height: 1.5;
}

/* The teaser cards sit at their natural height rather than stretching into
   a column of mostly nothing. */
.market__grid {
  align-content: start;
}

.mcard {
  align-self: start;
}

/* The caption column holds its own heading, so it is one grid child and the
   screen keeps the second column to itself. */
.showcase__col {
  min-width: 0;
}

/* -------------------------------------------------------------------------
   The document.
   A page with an outline, a working toolbar and a body you can type in -
   a document module, not a text field with a border.
   ------------------------------------------------------------------------- */

.pane--doc {
  grid-template-columns: 13em minmax(0, 1fr);
  gap: 1.1em;
}

.doc__outline {
  border-right: 1px solid var(--line);
  padding-right: 0.9em;
  min-height: 0;
  overflow-y: auto;
}

.doc__side-head {
  margin: 0 0 0.5em;
  font-size: 0.68em;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.doc__toc {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  margin-bottom: 1.3em;
}

.doc__toc button {
  text-align: left;
  border: 0;
  background: transparent;
  border-left: 2px solid var(--line-2);
  padding: 0.3em 0 0.3em 0.6em;
  font: inherit;
  font-size: 0.8em;
  font-weight: 700;
  color: var(--ink-3);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.doc__toc button:hover,
.doc__toc button[data-on='true'] {
  color: var(--ink);
  border-left-color: var(--crimson);
}

.doc__mentions {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}

.dmention {
  display: flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3em 0.5em;
  border-radius: 0.45em;
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-size: 0.76em;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
}

.dmention:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.dmention .ico {
  width: 1em;
  height: 1em;
  flex: none;
  color: var(--crimson);
}

.doc__main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.doc__bar {
  display: flex;
  align-items: center;
  gap: 0.2em;
  padding-bottom: 0.6em;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.dtool {
  min-width: 1.9em;
  height: 1.9em;
  padding: 0 0.45em;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 0.4em;
  background: transparent;
  font: inherit;
  font-size: 0.82em;
  font-weight: 800;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease);
}

.dtool:hover {
  background: var(--bg-tint);
  color: var(--ink);
}

.dtool[data-on='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.dtool .ico {
  width: 1.1em;
  height: 1.1em;
}

.dtool__rule {
  width: 1px;
  height: 1.3em;
  margin: 0 0.3em;
  background: var(--line-2);
}

.doc__save {
  margin-left: auto;
  font-size: 0.72em;
  font-weight: 700;
  color: var(--ink-faint);
}

.doc__save[data-dirty='true'] {
  color: var(--crimson-deep);
}

/* The page, so the document reads as a page and not as a pane. */
.doc__page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 0.8em;
  padding: 0 0.4em 0 0;
}

.doc__sheet {
  max-width: 46em;
  margin: 0 auto;
  padding: 2.2em 2.6em 2.8em;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 0.5em;
  box-shadow: var(--shadow-card);
  outline: none;
  font-size: 0.92em;
  line-height: 1.7;
}

.doc__sheet:focus-visible {
  border-color: var(--crimson);
}

.doc__sheet h1 {
  margin: 0;
  font-size: 1.7em;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.doc__sheet .doc__meta {
  margin: 0.4em 0 1.6em;
  font-size: 0.78em;
  color: var(--ink-faint);
  padding-bottom: 1em;
  border-bottom: 1px solid var(--line);
}

.doc__sheet h2 {
  margin: 1.6em 0 0.5em;
  font-size: 1.12em;
  font-weight: 900;
  letter-spacing: -0.015em;
}

.doc__sheet p {
  margin: 0 0 0.8em;
}

.doc__sheet strong {
  font-weight: 800;
}

.doc__sheet blockquote {
  margin: 1.2em 0 0;
  padding: 0.2em 0 0.2em 1em;
  border-left: 3px solid var(--crimson);
  font-style: italic;
  color: var(--ink-2);
}

.doc__sheet ul,
.doc__sheet ol {
  margin: 0 0 0.9em;
  padding-left: 1.3em;
}

.dcallout {
  margin: 1.1em 0;
  padding: 0.85em 1em;
  border-radius: 0.5em;
  background: var(--tint-olive);
  border: 1px solid rgba(180, 185, 76, 0.5);
  font-size: 0.94em;
}

.dcallout b {
  display: block;
  font-weight: 900;
  margin-bottom: 0.25em;
}

.dtable {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6em 0 1.2em;
  font-size: 0.9em;
}

.dtable th,
.dtable td {
  text-align: left;
  padding: 0.45em 0.6em;
  border: 1px solid var(--line-2);
}

.dtable thead th {
  background: var(--bg-soft);
  font-size: 0.82em;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.dtasks {
  list-style: none;
  padding: 0 !important;
  margin: 0 0 1em;
}

.dtasks li {
  position: relative;
  padding-left: 1.7em;
  margin-bottom: 0.3em;
  cursor: pointer;
}

.dtasks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 1.05em;
  height: 1.05em;
  border-radius: 0.25em;
  border: 1.5px solid var(--line-2);
  background: var(--bg);
}

.dtasks li[data-done='true'] {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.dtasks li[data-done='true']::before {
  background: var(--olive);
  border-color: var(--olive);
}

.dtasks li[data-done='true']::after {
  content: '';
  position: absolute;
  left: 0.3em;
  top: 0.55em;
  width: 0.45em;
  height: 0.22em;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg);
}

/* A word that has an entry in the glossary. */
.dterm {
  border-bottom: 1.5px dotted var(--crimson);
  cursor: help;
}

.doc__foot {
  margin: 0.7em 0 0;
  font-size: 0.74em;
  color: var(--ink-3);
}

.doc__foot b {
  font-weight: 900;
  color: var(--ink-2);
}

/* -------------------------------------------------------------------------
   The glossary.
   Entries, their scope, and the thing the module is really for: a word in
   running text that carries its definition with it.
   ------------------------------------------------------------------------- */

.pane--dict {
  grid-template-columns: 15em minmax(0, 1fr);
  gap: 1.2em;
  position: relative;
}

.dict__side {
  border-right: 1px solid var(--line);
  padding-right: 1em;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dict__search {
  display: flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.45em 0.6em;
  border-radius: 0.5em;
  border: 1px solid var(--line-2);
  background: var(--bg);
}

.dict__search svg {
  width: 1em;
  height: 1em;
  flex: none;
  color: var(--ink-faint);
}

.dict__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.82em;
  outline: none;
  color: var(--ink);
}

.dict__count {
  margin: 0.6em 0 0.5em;
  font-size: 0.74em;
  color: var(--ink-3);
}

.dict__count b {
  font-weight: 900;
  color: var(--ink-2);
}

.dict__scopes {
  display: flex;
  gap: 0.2em;
  margin-bottom: 0.7em;
}

.dscope {
  flex: 1;
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 0.25em 0;
  font: inherit;
  font-size: 0.7em;
  font-weight: 800;
  color: var(--ink-3);
  cursor: pointer;
}

.dscope[data-on='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.dict__list {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.12em;
  padding-right: 0.2em;
}

.dict__letter {
  margin: 0.6em 0 0.15em;
  font-size: 0.66em;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.dentry {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 0.45em;
  padding: 0.4em 0.5em;
  font: inherit;
  cursor: pointer;
  display: grid;
  gap: 0.1em;
}

.dentry:hover {
  background: var(--bg-soft);
}

.dentry[data-on='true'] {
  background: var(--tint-crimson);
  border-color: rgba(185, 76, 76, 0.4);
}

.dentry b {
  font-size: 0.82em;
  font-weight: 800;
}

.dentry small {
  font-size: 0.7em;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dict__empty {
  margin: 1em 0;
  font-size: 0.78em;
  color: var(--ink-faint);
}

.dict__main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
}

.dict__entry {
  padding-bottom: 1.2em;
  border-bottom: 1px solid var(--line);
}

.dict__term {
  display: flex;
  align-items: center;
  gap: 0.6em;
  flex-wrap: wrap;
}

.dict__term h3 {
  margin: 0;
  font-size: 1.5em;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.dict__pill {
  font-size: 0.6em;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25em 0.6em;
  border-radius: var(--radius-pill);
}

.dict__pill[data-scope='Kampania'] {
  background: var(--tint-olive);
  color: var(--ink-2);
}

.dict__pill[data-scope='Prywatne'] {
  background: var(--tint-ink);
  color: var(--ink-3);
}

.dict__def {
  margin: 0.6em 0 0;
  max-width: 62ch;
  font-size: 0.94em;
  line-height: 1.6;
  color: var(--ink-2);
}

.dict__where {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
  margin-top: 0.9em;
}

.dwhere {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.25em 0.6em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-size: 0.72em;
  font-weight: 700;
  color: var(--ink-2);
}

.dwhere .ico {
  width: 0.95em;
  height: 0.95em;
  color: var(--crimson);
}

.dict__demo {
  padding-top: 1.1em;
}

.dict__sample {
  margin: 0;
  max-width: 60ch;
  font-size: 0.95em;
  line-height: 1.75;
}

.dict__hint {
  margin: 0.8em 0 0;
  max-width: 60ch;
  font-size: 0.78em;
  color: var(--ink-3);
  line-height: 1.5;
}

/* The bubble the product shows over a glossary word. */
.dtip {
  position: absolute;
  z-index: 8;
  max-width: 17em;
  padding: 0.6em 0.75em;
  border-radius: 0.5em;
  background: var(--night);
  color: #f3f0e8;
  font-size: 0.78em;
  line-height: 1.45;
  box-shadow: var(--shadow-lift);
  pointer-events: none;
  /* The offset is set from script with xPercent/yPercent: a CSS transform
     here would be overwritten by the fade-in tween and the bubble would
     land on top of the word instead of above it. */
}

.dtip b {
  display: block;
  font-weight: 900;
  margin-bottom: 0.15em;
}

.dtip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--night);
  transform: rotate(45deg);
}

@container (max-width: 760px) {
  .pane--doc,
  .pane--dict {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc__outline,
  .dict__side {
    display: none;
  }

  .doc__sheet {
    padding: 1.2em 1.1em 1.6em;
  }
}

/* -------------------------------------------------------------------------
   The right panel.
   Opened by a word in text, a mention chip or a token: whatever you were
   reading stays where it was and the entity arrives beside it.
   ------------------------------------------------------------------------- */

.sidecard {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  width: min(20em, 46%);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--line-2);
  box-shadow: -18px 0 40px -28px rgba(23, 21, 15, 0.45);
}

.sidecard[hidden] {
  display: none;
}

.sidecard__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  padding: 0.7em 0.9em;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.sidecard__kind {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.7em;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sidecard__kind .ico {
  width: 1.1em;
  height: 1.1em;
  color: var(--crimson);
}

.sidecard__close {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.3em;
  line-height: 1;
  padding: 0 0.2em;
  color: var(--ink-3);
  cursor: pointer;
}

.sidecard__close:hover {
  color: var(--crimson);
}

.sidecard__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1em 0.9em 1.1em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5em;
}

.sidecard__art {
  width: 100%;
  height: 8em;
  display: grid;
  place-items: center;
  border-radius: 0.5em;
  background: var(--bg-tint);
  color: var(--ink);
}

.sidecard__art .cut {
  width: 62%;
  height: 82%;
}

.sidecard__name {
  margin: 0.2em 0 0;
  font-size: 1.15em;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.sidecard__def {
  margin: 0;
  font-size: 0.82em;
  line-height: 1.55;
  color: var(--ink-2);
}

.sidecard__facts {
  margin: 0.3em 0 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3em;
}

.sidecard__facts div {
  padding: 0.4em 0.55em;
  border-radius: 0.4em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.sidecard__facts dt {
  font-size: 0.62em;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sidecard__facts dd {
  margin: 0.1em 0 0;
  font-size: 0.82em;
  font-weight: 800;
}

.sidecard__open {
  width: 100%;
  margin-top: auto;
}

@container (max-width: 760px) {
  .sidecard {
    width: 100%;
  }
}

/* -------------------------------------------------------------------------
   Campaigns.
   Tiles, because that is how the module lists them, and a toggle: reading
   them and editing them are two different jobs on the same screen.
   ------------------------------------------------------------------------- */

.pane--camps {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.9em;
}

.camps__bar {
  display: flex;
  align-items: flex-end;
  gap: 0.8em;
  flex-wrap: wrap;
  padding-bottom: 0.7em;
  border-bottom: 1px solid var(--line);
}

.camps__head {
  flex: 1 1 14em;
  min-width: 0;
}

.camps__sub {
  margin: 0.15em 0 0;
  font-size: 0.8em;
  color: var(--ink-3);
}

.camps__filters {
  display: flex;
  gap: 0.25em;
}

.cfilter {
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 0.3em 0.75em;
  font: inherit;
  font-size: 0.74em;
  font-weight: 800;
  color: var(--ink-3);
  cursor: pointer;
  white-space: nowrap;
}

.cfilter[data-on='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.camps__modes {
  display: flex;
  gap: 0.15em;
  padding: 0.15em;
  border-radius: var(--radius-pill);
  background: var(--bg-tint);
}

.cmode {
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 0.3em 0.8em;
  font: inherit;
  font-size: 0.75em;
  font-weight: 800;
  color: var(--ink-3);
  cursor: pointer;
}

.cmode[aria-selected='true'] {
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

/* Four to a row at most. auto-fill packed five or six in on a wide frame
   and the tiles got narrow enough that every description ran to an ellipsis. */
.camps__grid {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1em;
  align-content: start;
  /* The tiles lift on hover. A scrolling box clips on every side, so without
     this slack the raised edge and its shadow were cut off. */
  padding: 5px 7px 7px;
  margin: -5px -7px -7px;
}

@container (max-width: 1100px) {
  .camps__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@container (max-width: 820px) {
  .camps__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.camp {
  display: flex;
  flex-direction: column;
  border-radius: 0.65em;
  border: 1px solid var(--line-2);
  background: var(--bg);
  overflow: hidden;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    transform var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}

.camp:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: var(--shadow-card);
}

/* The cover colour is a real campaign setting, so each tile wears its own. */
.camp__cover {
  position: relative;
  height: 6.4em;
  display: grid;
  place-items: center;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.camp__cover .cut {
  width: 48%;
  height: 72%;
  opacity: 0.85;
}

.camp__role {
  position: absolute;
  top: 0.5em;
  left: 0.5em;
  padding: 0.12em 0.5em;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--line-2);
  font-size: 0.62em;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.camp__status {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.12em 0.5em;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--line-2);
  font-size: 0.62em;
  font-weight: 800;
  color: var(--ink-3);
}

.camp__status::before {
  content: '';
  width: 0.4em;
  height: 0.4em;
  border-radius: 50%;
  background: var(--ink-faint);
}

.camp__status[data-status='Aktywna']::before { background: var(--olive); }
.camp__status[data-status='Wstrzymana']::before { background: var(--crimson); }

.camp__body {
  padding: 0.85em 0.95em 0.95em;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.camp__name {
  font-size: 0.98em;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* W aplikacji system stoi WERSALIKAMI, 11 px, z rozstrzeleniem - nie jest
   karmazynowym podtytulem. */
.camp__system {
  margin-top: 0.15em;
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.camp__desc {
  margin: 0.5em 0 0;
  font-size: 0.74em;
  line-height: 1.45;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Wiersz z ikona graczy i data nastepnej sesji - w aplikacji ma kreske nad
   soba i oddziela tresc od liczb. */
.camp__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 0.9em;
  margin-top: auto;
  padding-top: 0.7em;
  border-top: 1px solid var(--line);
}

.camp__metaitem {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.74em;
  color: var(--ink-3);
}

.camp__metaitem .ico {
  width: 0.9em;
  height: 0.9em;
  color: var(--ink-faint);
}

.camp__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em;
  margin-top: 0.5em;
}

.camp__stats span {
  padding: 0.15em 0.4em;
  border-radius: var(--radius-xs);
  background: var(--bg-soft);
  font-size: 0.62em;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
}

.camp__stats b {
  font-weight: 900;
  color: var(--ink-2);
}

/* Pasek w kolorze kampanii pod okladka - w aplikacji to on niesie
   `coverColor` i odroznia kampanie od siebie na liscie. */
.camp__strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
}

/* ---- edit mode --------------------------------------------------------- */

.camp__fields {
  display: none;
  flex-direction: column;
  gap: 0.35em;
  margin-top: 0.5em;
}

.camp__fields label {
  display: grid;
  gap: 0.1em;
  font-size: 0.62em;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.camp__fields input,
.camp__fields select {
  border: 1px solid var(--line-2);
  border-radius: 0.35em;
  background: var(--bg);
  padding: 0.3em 0.45em;
  font: inherit;
  font-size: 1.2em;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: normal;
  text-transform: none;
}

.camp__fields input:focus,
.camp__fields select:focus {
  outline: none;
  border-color: var(--crimson);
}

.camp__swatches {
  display: flex;
  gap: 0.25em;
}

.camp__swatches button {
  width: 1.3em;
  height: 1.3em;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}

.camp__swatches button[data-on='true'] {
  border-color: var(--ink);
}

.pane--camps[data-mode='edit'] .camp {
  cursor: default;
}

.pane--camps[data-mode='edit'] .camp:hover {
  transform: none;
}

.pane--camps[data-mode='edit'] .camp__desc,
.pane--camps[data-mode='edit'] .camp__stats,
.pane--camps[data-mode='edit'] .camp__meta,
.pane--camps[data-mode='edit'] .camp__name,
.pane--camps[data-mode='edit'] .camp__system {
  display: none;
}

.pane--camps[data-mode='edit'] .camp__fields {
  display: flex;
}

.pane--camps[data-mode='edit'] .camp {
  border-style: dashed;
  border-color: var(--crimson);
}

.camp--ghost {
  display: grid;
  place-items: center;
  gap: 0.3em;
  border-style: dashed;
  color: var(--ink-faint);
  font-size: 0.82em;
  font-weight: 800;
  min-height: 13em;
}

.camp--ghost:hover {
  color: var(--ink);
}

.camps__foot {
  margin: 0;
  font-size: 0.74em;
  color: var(--ink-3);
}

.camps__foot b {
  font-weight: 900;
  color: var(--ink-2);
}

/* ---- the marketplace, both directions ---------------------------------- */

.mcard {
  position: relative;
}

.mcard__get {
  position: absolute;
  inset: auto 0.7em 0.7em;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  padding: 0.4em 0;
  font: inherit;
  font-size: 0.72em;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.mcard:hover .mcard__get,
.mcard__get:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.mcard[data-have='true'] {
  border-color: rgba(180, 185, 76, 0.7);
  background: var(--olive-tint, var(--tint-olive));
  opacity: 1;
}

.mcard[data-have='true'] .mcard__price {
  color: var(--olive-deep, #6f7430);
}

.mcard[data-mine='true'] {
  border-color: var(--ink);
}

.mcard__mine {
  position: absolute;
  top: 0.55em;
  left: 0.55em;
  padding: 0.1em 0.45em;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font-size: 0.6em;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shelf-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  flex: none;
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 0.4em 0.8em;
  font: inherit;
  font-size: 0.78em;
  font-weight: 800;
  color: var(--ink-2);
  cursor: pointer;
}

.shelf-chip .ico {
  width: 1.05em;
  height: 1.05em;
  color: var(--crimson);
}

.shelf-chip b {
  font-weight: 900;
  padding: 0.05em 0.45em;
  border-radius: var(--radius-pill);
  background: var(--tint-ink);
}

.shelf-chip[data-hot='true'] {
  border-color: var(--olive);
  background: var(--tint-olive);
}

.market__publish {
  flex: none;
}

/* The thing in flight: a small slab of the card, not a spinner. */
.flyer {
  position: absolute;
  z-index: 9;
  display: grid;
  place-items: center;
  border-radius: 0.5em;
  background: var(--bg);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-lift);
  color: var(--ink);
  pointer-events: none;
}

.flyer .cut {
  width: 64%;
  height: 72%;
}

/* The line it travels along, drawn and then wiped. */
.flyline {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  overflow: visible;
}

.flyline path {
  fill: none;
  stroke: var(--crimson);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 5 7;
}

/* Initials, not engravings: the circles in the poll are about 28px across
   and a woodcut at that size is a smudge. */
.poll2__face {
  display: inline-grid;
  place-items: center;
  width: 1.9em;
  height: 1.9em;
  flex: none;
  border-radius: 50%;
  background: var(--bg-tint);
  border: 1px solid var(--line-2);
  font-style: normal;
  font-size: 0.78em;
  font-weight: 900;
  color: var(--ink-2);
}

.poll2__grid tbody tr[data-you='true'] .poll2__face {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
}

.poll2__faces i {
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 0.78em;
  font-weight: 900;
  color: var(--ink-2);
}

/* -------------------------------------------------------------------------
   The sheet's right rail.
   The sheet alone stopped two thirds of the way down the panel while the
   treasury beside it filled its own. The rail carries what a sheet is
   actually surrounded by in the product: what you do with it, what it is
   attached to, and who gets to see it.
   ------------------------------------------------------------------------- */

.pane--sheet {
  grid-template-columns: minmax(0, 1fr) 15em;
  gap: 1.2em;
}

.sheet__rail {
  border-left: 1px solid var(--line);
  padding-left: 1em;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.srail__acts {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  margin-bottom: 0.2em;
}

.srail__act {
  display: flex;
  align-items: center;
  gap: 0.5em;
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: 0.5em;
  padding: 0.45em 0.6em;
  font: inherit;
  font-size: 0.8em;
  font-weight: 800;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
  transition:
    border-color var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

.srail__act .ico {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  color: var(--crimson);
}

.srail__act:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.srail__act[data-on='true'] {
  background: var(--tint-olive);
  border-color: rgba(180, 185, 76, 0.6);
  color: var(--ink);
}

.srail__echo {
  margin: 0.5em 0 1.2em;
  font-size: 0.72em;
  line-height: 1.45;
  color: var(--ink-3);
  min-height: 2.6em;
}

.srail__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
  margin-bottom: 1.2em;
}

.srail__vis {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}

.srail__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  padding: 0.3em 0;
  border-bottom: 1px dotted var(--line-2);
  font-size: 0.78em;
}

.srail__row b {
  font-weight: 800;
}

.srail__row em {
  font-style: normal;
  font-size: 0.86em;
  font-weight: 800;
  padding: 0.1em 0.45em;
  border-radius: var(--radius-pill);
  background: var(--tint-ink);
  color: var(--ink-3);
}

.srail__row em[data-on='true'] {
  background: var(--tint-olive);
  color: var(--ink-2);
}

.srail__stamp {
  margin: auto 0 0;
  padding-top: 1em;
  font-size: 0.7em;
  color: var(--ink-faint);
}

/* Boxes keep their natural height. Stretching them to reach the bottom only
   moved the emptiness inside the boxes, which looked worse. */

@container (max-width: 900px) {
  .pane--sheet {
    grid-template-columns: minmax(0, 1fr);
  }

  .sheet__rail {
    display: none;
  }
}

/* The long text block earns a wider column than the three-up rows. */
.sheet__grid--wide {
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
}

/* Panel wlasciwosci - trzecia kolumna `SheetBuilder`. Bez niego kreator mial
   dwie kolumny, a w produkcie ma trzy. */
.pane--forge {
  grid-template-columns: 12.5em minmax(0, 1fr) 13em;
}

.forge__props {
  border-left: 1px solid var(--line);
  padding-left: 0.9em;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.forge__propshead {
  margin: 0 0 0.5em;
  font-size: 0.72em;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.forge__propbody {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  margin-bottom: 1.2em;
}

.forge__prop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  padding: 0.35em 0.5em;
  border-radius: var(--radius-xs);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.76em;
}

.forge__prop b {
  font-weight: 800;
}

.forge__prop span {
  color: var(--ink-3);
}

.forge__widths {
  display: flex;
  gap: 0.2em;
  margin-top: 0.1em;
}

.forge__width {
  flex: 1;
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: var(--radius-xs);
  padding: 0.25em 0;
  font: inherit;
  font-size: 0.7em;
  font-weight: 800;
  color: var(--ink-3);
  cursor: pointer;
}

.forge__width[data-on='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.forge__hint {
  margin: 0;
  font-size: 0.74em;
  line-height: 1.45;
  color: var(--ink-3);
}

.forge__tips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45em;
}

.forge__tips li {
  position: relative;
  padding-left: 0.9em;
  font-size: 0.72em;
  line-height: 1.45;
  color: var(--ink-3);
}

.forge__tips li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.3em;
  height: 0.3em;
  border-radius: 50%;
  background: var(--line-2);
}

.pane--forge[data-mode='preview'] .forge__props {
  display: none;
}

@container (max-width: 1100px) {
  .pane--forge {
    grid-template-columns: 12.5em minmax(0, 1fr);
  }

  .forge__props {
    display: none;
  }
}

/* Zaznaczony blok na karcie - w aplikacji to on steruje panelem wlasciwosci. */
.fblock[data-on='true'] {
  border-color: var(--crimson);
  box-shadow: 0 0 0 2px rgba(184, 75, 75, 0.18);
}
