/* Project Outpost — Dice / Roll Console Design Lab transplant.
 * Presentation only. Existing roll requests, result state and history remain authoritative. */

body.outpost-real-page-preview #dice .dice-workspace {
  width: 100%;
  min-width: 0;
  color: var(--op-text);
}

body.outpost-real-page-preview #dice .dice-layout-v3 {
  display: grid;
  min-width: 0;
  min-height: 520px;
  margin: var(--op-workspace-layout-gap) 0 0;
  overflow: visible;
  border-top: 1px solid var(--op-line);
  border-bottom: 1px solid var(--op-line);
  border-radius: 0;
  background: color-mix(in srgb, var(--op-bg-raised) 38%, transparent);
  box-shadow: none;
}

body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="quick"] .dice-layout-v3 {
  grid-template-areas: "quick stage history";
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  height: clamp(420px, calc(100dvh - 250px - var(--op-workspace-bottom-safe-area)), 620px);
  min-height: 420px;
}

body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="formula"] .dice-layout-v3 {
  grid-template-areas: "control stage";
  grid-template-columns: minmax(0, 1fr) 340px;
}

body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="history"] .dice-layout-v3 {
  grid-template-areas: "history";
  grid-template-columns: minmax(0, 1fr);
}

body.outpost-real-page-preview #dice .dice-control-panel { grid-area: control; }
body.outpost-real-page-preview #dice .dice-stage-panel { grid-area: stage; }
body.outpost-real-page-preview #dice .dice-quick-panel { grid-area: quick; }
body.outpost-real-page-preview #dice .dice-history-panel { grid-area: history; }

body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="quick"] .dice-control-panel,
body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="formula"] :is(.dice-quick-panel, .dice-history-panel),
body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="history"] :is(.dice-control-panel, .dice-stage-panel, .dice-quick-panel) {
  display: none;
}

body.outpost-real-page-preview #dice .dice-layout-v3 > :is(.panel, .dice-stage-panel) {
  min-width: 0;
  margin: 0;
  padding: var(--op-workspace-region-padding);
  border: 0;
  border-radius: 0;
  color: var(--op-text);
  background: transparent;
  box-shadow: none;
}

body.outpost-real-page-preview #dice .dice-layout-v3 > * + * {
  border-left: 1px solid var(--op-line);
}

body.outpost-real-page-preview #dice .dice-region-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--op-line-faint);
}

body.outpost-real-page-preview #dice .dice-region-head h2,
body.outpost-real-page-preview #dice .dice-region-head h3 {
  margin: 0;
  color: var(--op-text);
  font-size: 14px;
  font-weight: 600;
}

body.outpost-real-page-preview #dice .dice-region-head small {
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

body.outpost-real-page-preview #dice :is(.dice-control-card, .dice-quick-toggle, .dice-quick-switchboard, .history-row) {
  border-radius: 0;
  background: transparent;
  background-image: none;
  box-shadow: none;
}

body.outpost-real-page-preview #dice .dice-control-card {
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--op-line-faint);
}

body.outpost-real-page-preview #dice :is(.dice-control-panel, .dice-quick-panel) {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
}

body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="quick"] .dice-quick-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
  padding-inline: 20px;
  overflow: hidden;
}

body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="quick"] .dice-quick-switchboard,
body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="quick"] .quick-switch-column.active {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.outpost-real-page-preview #dice :is(.dice-buttons, .dice-controls, .quick-mods, .adv-row) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.outpost-real-page-preview #dice .dice-buttons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.outpost-real-page-preview #dice :is(.dice-command, .dice-settings) {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

body.outpost-real-page-preview #dice .dice-command {
  grid-template-columns: minmax(0, 1fr) auto;
}

body.outpost-real-page-preview #dice .dice-settings {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.outpost-real-page-preview #dice .toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 8px 0;
  border-bottom: 1px solid var(--op-line-faint);
}

body.outpost-real-page-preview #dice :is(.dice-buttons, .dice-controls, .quick-mods, .adv-row) button {
  min-width: 0;
  min-height: 40px;
}

body.outpost-real-page-preview #dice .dice-section-title {
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.outpost-real-page-preview #dice :is(.dice-buttons, .quick-mods, .adv-row) button,
body.outpost-real-page-preview #dice .dice-command button,
body.outpost-real-page-preview #dice .dice-settings button {
  border: 1px solid var(--op-line);
  border-radius: 0;
  color: var(--op-text);
  background: transparent;
  box-shadow: none;
}

body.outpost-real-page-preview #dice :is(.dice-buttons, .quick-mods) button.selected {
  border-color: var(--op-line-strong);
  color: var(--op-text);
  background: var(--op-surface-strong);
  box-shadow: inset 0 -2px var(--op-accent);
}

body.outpost-real-page-preview #dice :is(input, select) {
  border: 1px solid var(--op-line);
  border-radius: 0;
  color: var(--op-text);
  background: transparent;
  box-shadow: none;
}

body.outpost-real-page-preview #dice .dice-stage-panel {
  display: grid;
  grid-template-rows: auto minmax(300px, 1fr) auto;
}

body.outpost-real-page-preview #dice #rollDisplay {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: var(--op-workspace-region-padding);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

body.outpost-real-page-preview #dice #rollDisplay .dice-orbit {
  opacity: 0.14;
}

body.outpost-real-page-preview #dice #dieFace {
  color: var(--op-text);
  font-family: var(--op-font-mono);
  font-size: clamp(64px, 9vw, 118px);
  font-weight: 430;
  text-shadow: none;
}

body.outpost-real-page-preview #dice #rollBreakdown {
  margin-top: 16px;
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

body.outpost-real-page-preview #dice .dice-stage-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 44px;
  border-top: 1px solid var(--op-line);
  border-bottom: 1px solid var(--op-line);
}

body.outpost-real-page-preview #dice .dice-stage-actions button {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--op-line-faint);
  border-radius: 0;
  color: var(--op-text-muted);
  background: transparent;
  box-shadow: none;
  font-family: var(--op-font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.outpost-real-page-preview #dice .dice-stage-actions button:hover,
body.outpost-real-page-preview #dice .dice-stage-actions button.active,
body.outpost-real-page-preview #dice .dice-stage-actions .roll-button {
  color: var(--op-text);
  background: var(--op-surface-strong);
}

body.outpost-real-page-preview #dice .dice-quick-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--op-line);
}

body.outpost-real-page-preview #dice .dice-quick-toggle button {
  min-height: 38px;
  padding-inline: 10px;
  border: 0;
  border-right: 1px solid var(--op-line-faint);
  border-radius: 0;
  color: var(--op-text-muted);
  background: transparent;
  font-family: var(--op-font-mono);
  font-size: 8px;
  line-height: 1.25;
  text-transform: uppercase;
}

body.outpost-real-page-preview #dice .dice-quick-toggle button.active {
  color: var(--op-text);
  background: var(--op-surface-strong);
  box-shadow: inset 0 -2px var(--op-accent);
}

body.outpost-real-page-preview #dice :is(.quick-switch-column, .dice-skill-switches) {
  display: grid;
  gap: 0;
}

body.outpost-real-page-preview #dice .dice-skill-switches {
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--op-line-strong) transparent;
  scrollbar-width: thin;
}

body.outpost-real-page-preview #dice .dice-skill-switches:focus-visible {
  outline: 1px solid var(--op-line-strong);
  outline-offset: 3px;
}

body.outpost-real-page-preview #dice .dice-quick-entries {
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--op-line-strong) transparent;
  scrollbar-width: thin;
}

body.outpost-real-page-preview #dice .dice-quick-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--op-line-faint);
}

body.outpost-real-page-preview #dice .dice-quick-entry > button:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 44px;
  gap: 12px;
  padding: 9px 0;
  border: 0;
  color: var(--op-text);
  background: transparent;
  text-align: left;
}

body.outpost-real-page-preview #dice .dice-quick-entry > button:first-child small {
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 8px;
}

body.outpost-real-page-preview #dice .dice-quick-entry > button:first-child:hover {
  padding-left: 8px;
  background: var(--op-surface-soft);
}

body.outpost-real-page-preview #dice .dice-quick-delete {
  width: 32px;
  min-width: 32px;
  border: 0;
  border-left: 1px solid var(--op-line-faint);
  color: var(--op-text-muted);
  background: transparent;
}

body.outpost-real-page-preview #dice .dice-quick-delete:hover {
  color: var(--op-text);
  background: var(--op-surface-soft);
}

body.outpost-real-page-preview #dice .dice-quick-empty {
  margin: 12px 0;
  color: var(--op-text-faint);
  font-size: 9px;
}

body.outpost-real-page-preview #dice .dice-quick-editor {
  border-top: 1px solid var(--op-line);
}

body.outpost-real-page-preview #dice .dice-quick-editor summary {
  min-height: 38px;
  padding: 13px 0 0;
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

body.outpost-real-page-preview #dice .dice-quick-editor > div {
  display: grid;
  gap: 8px;
  padding: 8px 0 0;
}

body.outpost-real-page-preview #dice .dice-quick-editor label {
  display: grid;
  gap: 4px;
}

body.outpost-real-page-preview #dice .dice-quick-editor label span,
body.outpost-real-page-preview #dice .dice-quick-editor > div > small {
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 8px;
}

body.outpost-real-page-preview #dice .dice-quick-editor input,
body.outpost-real-page-preview #dice .dice-quick-editor button {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--op-line);
  color: var(--op-text);
  background: transparent;
}

body.outpost-real-page-preview #dice :is(.quick-switch-column, .dice-skill-switches) button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--op-line-faint);
  border-radius: 0;
  color: var(--op-text);
  background: transparent;
  box-shadow: none;
  text-align: left;
}

body.outpost-real-page-preview #dice :is(.quick-switch-column, .dice-skill-switches) button:hover {
  padding-left: 8px;
  background: var(--op-surface-soft);
}

body.outpost-real-page-preview #dice .quick-switch-column .dice-quick-entry > .dice-quick-delete {
  display: block;
  width: 32px;
  min-width: 32px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--op-line-faint);
  color: var(--op-text-muted);
  background: transparent;
  text-align: center;
}

body.outpost-real-page-preview #dice .quick-switch-column .dice-quick-editor button {
  display: block;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--op-line);
  color: var(--op-text);
  background: transparent;
  text-align: center;
}

body.outpost-real-page-preview #dice .history-actions {
  display: flex;
}

body.outpost-real-page-preview #dice .history-actions button {
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-left: 1px solid var(--op-line-faint);
  border-radius: 0;
  color: var(--op-text-muted);
  background: transparent;
  font-family: var(--op-font-mono);
  font-size: 8px;
}

body.outpost-real-page-preview #dice .history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  grid-template-areas:
    "identity total"
    "breakdown time";
  gap: 5px 10px;
  min-height: 62px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--op-line-faint);
}

body.outpost-real-page-preview #dice .history-row b {
  grid-area: total;
  align-self: center;
  color: var(--op-text);
  font-family: var(--op-font-mono);
  font-size: 16px;
  font-weight: 500;
}

body.outpost-real-page-preview #dice .history-row :is(span, small) {
  color: var(--op-text-muted);
  font-size: 9px;
}

body.outpost-real-page-preview #dice .history-roller {
  grid-area: identity;
  display: grid;
  min-width: 0;
  gap: 3px;
}

body.outpost-real-page-preview #dice .history-source,
body.outpost-real-page-preview #dice .history-roller > small,
body.outpost-real-page-preview #dice .history-breakdown {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.outpost-real-page-preview #dice .history-source {
  color: var(--op-text);
  font-weight: 600;
}

body.outpost-real-page-preview #dice .history-roller > small {
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 8px;
}

body.outpost-real-page-preview #dice .history-breakdown {
  grid-area: breakdown;
}

body.outpost-real-page-preview #dice .history-time {
  grid-area: time;
  justify-self: end;
  align-self: center;
  white-space: nowrap;
}

/* Formula uses the approved Design Lab workbench: one open builder and one preview. */
body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="formula"] .dice-control-panel {
  display: block;
  overflow: visible;
}

body.outpost-real-page-preview #dice .dice-formula-workbench {
  display: block;
  margin: 18px 0 22px;
  border-top: 1px solid var(--op-line);
  border-bottom: 1px solid var(--op-line);
}

body.outpost-real-page-preview #dice .dice-formula-draft-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 126px;
  padding: 20px 0;
  border-bottom: 1px solid var(--op-line);
}

body.outpost-real-page-preview #dice .dice-formula-draft-head span,
body.outpost-real-page-preview #dice .dice-formula-draft-head :is(small, strong) {
  display: block;
}

body.outpost-real-page-preview #dice .dice-formula-draft-head small {
  margin-bottom: 12px;
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
}

body.outpost-real-page-preview #dice .dice-formula-draft-head strong {
  color: var(--op-text);
  font-family: var(--op-font-mono);
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 430;
  letter-spacing: -0.05em;
}

body.outpost-real-page-preview #dice .dice-formula-draft-head button {
  min-width: 76px;
  min-height: 36px;
  border: 1px solid var(--op-line);
  border-radius: 0;
  color: var(--op-text-muted);
  background: transparent;
  font-family: var(--op-font-mono);
  font-size: 8px;
}

body.outpost-real-page-preview #dice .dice-formula-compose {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(280px, 1.55fr) minmax(150px, 0.72fr);
}

body.outpost-real-page-preview #dice .dice-formula-control {
  min-width: 0;
  min-height: 190px;
  padding: 18px;
  border-right: 1px solid var(--op-line);
}

body.outpost-real-page-preview #dice .dice-formula-control:last-child {
  border-right: 0;
}

body.outpost-real-page-preview #dice .dice-formula-control header {
  min-height: 42px;
  margin-bottom: 16px;
}

body.outpost-real-page-preview #dice .dice-formula-control header :is(b, small) {
  display: block;
}

body.outpost-real-page-preview #dice .dice-formula-control header b {
  color: var(--op-text);
  font-family: var(--op-font-mono);
  font-size: 9px;
  letter-spacing: 0.07em;
}

body.outpost-real-page-preview #dice .dice-formula-control header small {
  margin-top: 4px;
  color: var(--op-text-muted);
  font-size: 9px;
}

body.outpost-real-page-preview #dice .dice-formula-stepper {
  display: grid;
  grid-template-columns: 40px minmax(56px, 1fr) 40px;
  border: 1px solid var(--op-line);
}

body.outpost-real-page-preview #dice .dice-formula-stepper :is(button, input) {
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--op-line-faint);
  border-radius: 0;
  color: var(--op-text);
  background: transparent;
  box-shadow: none;
  font-family: var(--op-font-mono);
  text-align: center;
}

body.outpost-real-page-preview #dice .dice-formula-stepper :last-child {
  border-right: 0;
}

body.outpost-real-page-preview #dice .dice-formula-dice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--op-line);
  border-left: 1px solid var(--op-line);
}

body.outpost-real-page-preview #dice .dice-formula-dice-grid button {
  min-width: 0;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--op-line-faint);
  border-bottom: 1px solid var(--op-line-faint);
  border-radius: 0;
  color: var(--op-text-muted);
  background: transparent;
  box-shadow: none;
  font-family: var(--op-font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
}

body.outpost-real-page-preview #dice .dice-formula-dice-grid button:hover,
body.outpost-real-page-preview #dice .dice-formula-dice-grid button.selected {
  color: var(--op-text);
  background: var(--op-surface-soft);
}

body.outpost-real-page-preview #dice .dice-formula-dice-grid button.selected {
  box-shadow: inset 0 -2px var(--op-accent);
}

body.outpost-real-page-preview #dice .dice-formula-custom-sides {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--op-line);
  border-top: 0;
}

body.outpost-real-page-preview #dice .dice-formula-custom-sides span {
  padding-left: 10px;
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

body.outpost-real-page-preview #dice .dice-formula-custom-sides input {
  min-height: 36px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--op-line-faint);
  text-align: center;
}

body.outpost-real-page-preview #dice .dice-formula-rules {
  border-top: 1px solid var(--op-line-faint);
}

body.outpost-real-page-preview #dice .dice-formula-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 220px);
  align-items: center;
  gap: 18px;
  min-height: 58px;
  border-bottom: 1px solid var(--op-line-faint);
}

body.outpost-real-page-preview #dice .dice-formula-rule span,
body.outpost-real-page-preview #dice .dice-formula-rule :is(b, small) {
  display: block;
}

body.outpost-real-page-preview #dice .dice-formula-rule b {
  color: var(--op-text);
  font-size: 11px;
  font-weight: 600;
}

body.outpost-real-page-preview #dice .dice-formula-rule small {
  margin-top: 3px;
  color: var(--op-text-muted);
  font-size: 9px;
}

body.outpost-real-page-preview #dice .dice-formula-rule input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: var(--op-text);
  background: transparent;
  text-align: right;
  text-transform: uppercase;
}

body.outpost-real-page-preview #dice .dice-formula-rule strong {
  color: var(--op-text);
  font-family: var(--op-font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: right;
}

body.outpost-real-page-preview #dice .dice-formula-advanced {
  margin-top: 18px;
  border-top: 1px solid var(--op-line-faint);
  border-bottom: 1px solid var(--op-line-faint);
}

body.outpost-real-page-preview #dice .dice-formula-advanced summary {
  min-height: 42px;
  padding: 15px 0 0;
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

body.outpost-real-page-preview #dice .dice-formula-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid var(--op-line);
}

body.outpost-real-page-preview #dice .dice-formula-modes button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--op-line-faint);
  border-radius: 0;
  color: var(--op-text-muted);
  background: transparent;
  font-family: var(--op-font-mono);
  font-size: 8px;
  text-transform: uppercase;
}

body.outpost-real-page-preview #dice .dice-formula-modes button.active {
  color: var(--op-text);
  background: var(--op-surface-strong);
  box-shadow: inset 0 -2px var(--op-accent);
}

body.outpost-real-page-preview #dice .dice-result-stage {
  display: grid;
  justify-items: center;
  align-content: center;
  width: 100%;
  min-height: 360px;
  text-align: center;
}

body.outpost-real-page-preview #dice .dice-result-die {
  display: grid;
  place-items: center;
  width: 178px;
  height: 178px;
  clip-path: polygon(50% 0, 92% 25%, 92% 75%, 50% 100%, 8% 75%, 8% 25%);
  color: var(--op-text);
  background: var(--op-surface-strong);
  box-shadow: inset 0 0 0 1px var(--op-line-strong);
}

body.outpost-real-page-preview #dice .dice-result-die #dieFace,
body.outpost-real-page-preview #dice .dice-formula-preview-copy .dice-result-die #dieFace {
  margin: 0;
  color: var(--op-text);
  font-family: var(--op-font-mono);
  font-size: clamp(48px, 5vw, 64px);
  font-weight: 430;
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: none;
}

body.outpost-real-page-preview #dice .dice-result-stage #rollResultTitle {
  margin: 22px 0 6px;
  color: var(--op-text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

body.outpost-real-page-preview #dice .dice-result-authority {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-left: 2px solid var(--op-success);
  color: var(--op-success);
  background: var(--op-surface-soft);
  font-family: var(--op-font-mono);
  font-size: 8px;
  letter-spacing: 0.07em;
}

body.outpost-real-page-preview #dice .dice-result-authority[data-sync-state="syncing"] {
  color: var(--op-text-muted);
  border-style: dashed;
}

body.outpost-real-page-preview #dice .dice-result-authority[data-sync-state="unsynced"],
body.outpost-real-page-preview #dice .dice-result-authority[data-sync-state="local"] {
  color: var(--op-danger, #e06b72);
}

body.outpost-real-page-preview #dice .dice-result-stage #rollBreakdown {
  max-width: 58ch;
  margin: 14px 0 0;
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

body.outpost-real-page-preview #dice .dice-formula-preview .dice-result-stage {
  min-height: 0;
  justify-items: start;
  text-align: left;
}

body.outpost-real-page-preview #dice .dice-formula-preview .dice-result-die {
  width: 142px;
  height: 142px;
  margin-top: 22px;
}

body.outpost-real-page-preview #dice .skill-proficiency-column {
  grid-template-rows: auto auto minmax(0, 1fr);
}

body.outpost-real-page-preview #dice .dice-skill-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  margin-top: 10px;
  border: 1px solid var(--op-line);
}

body.outpost-real-page-preview #dice .dice-skill-toolbar :is(input, button) {
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  color: var(--op-text);
  background: transparent;
  box-shadow: none;
  font-size: 9px;
}

body.outpost-real-page-preview #dice .dice-skill-toolbar button {
  border-left: 1px solid var(--op-line);
  color: var(--op-text-muted);
  font-family: var(--op-font-mono);
  font-size: 8px;
  letter-spacing: .06em;
}

body.outpost-real-page-preview #dice .dice-skill-toolbar button:is(:hover, .active) {
  color: var(--op-text);
  background: var(--op-surface-strong);
  box-shadow: inset 0 -2px var(--op-accent);
}

body.outpost-real-page-preview #dice .dice-skill-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--op-line);
  color: var(--op-text-muted);
  font-size: 8px;
}

body.outpost-real-page-preview #dice .dice-skill-legend > span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
}

body.outpost-real-page-preview #dice .dice-skill-legend > small {
  grid-column: 1 / -1;
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  padding-top: 2px;
  font-size: 7.5px;
  line-height: 1.5;
}

body.outpost-real-page-preview #dice .dice-skill-name,
body.outpost-real-page-preview #dice .dice-skill-name :is(b, small) {
  display: block;
  min-width: 0;
}

body.outpost-real-page-preview #dice .dice-skill-name b {
  overflow: hidden;
  font-size: 10px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.outpost-real-page-preview #dice .dice-skill-name small {
  margin-top: 3px;
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 7px;
}

body.outpost-real-page-preview #dice .dice-skill-status {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 4px;
}

body.outpost-real-page-preview #dice :is(.dice-skill-status, .dice-skill-legend) em {
  min-width: 25px;
  padding: 3px 4px;
  border-left: 2px solid var(--op-line-strong);
  color: var(--op-text-muted);
  background: var(--op-surface-soft);
  font-family: var(--op-font-mono);
  font-size: 7px;
  font-style: normal;
  line-height: 1;
  text-align: center;
}

body.outpost-real-page-preview #dice :is(.dice-skill-status, .dice-skill-legend) em.pro {
  border-left-color: var(--op-success);
  color: var(--op-success);
}

body.outpost-real-page-preview #dice :is(.dice-skill-status, .dice-skill-legend) em.dis {
  border-left-color: var(--op-warning);
  color: var(--op-warning);
}

body.outpost-real-page-preview #dice .dice-skill-status strong {
  min-width: 24px;
  color: var(--op-text);
  font-family: var(--op-font-mono);
  font-size: 11px;
  font-weight: 500;
  text-align: right;
}

body.outpost-real-page-preview #dice .dice-skill-switch:is(.proficient, .has-disadvantage) {
  padding-left: 12px;
}

body.outpost-real-page-preview #dice .dice-skill-switch[hidden],
body.outpost-real-page-preview #dice .dice-skill-empty[hidden] {
  display: none !important;
}

body.outpost-real-page-preview #dice .dice-skill-empty {
  margin: 18px 0;
  color: var(--op-text-muted);
  font-size: 10px;
  text-align: center;
}

body.outpost-real-page-preview #dice [data-roll-history-more] {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-top: 1px solid var(--op-line);
  border-radius: 0;
  color: var(--op-text-muted);
  background: transparent;
  font-family: var(--op-font-mono);
  font-size: 8px;
  letter-spacing: .05em;
}

body.outpost-real-page-preview #dice [data-roll-history-more]:hover {
  color: var(--op-text);
  background: var(--op-surface-soft);
}

/* Dice follows the same accessibility contract as the rest of the workspace. */
body.outpost-real-page-preview[data-text-size="huge"] #dice .dice-region-head :is(h2, h3) {
  font-size: 17px !important;
  font-weight: 750 !important;
}

body.outpost-real-page-preview[data-text-size="huge"] #dice :is(
  .dice-skill-name b,
  .history-source,
  .dice-formula-rule b,
  .dice-formula-control header b
) {
  font-size: 14px !important;
  font-weight: 720 !important;
}

body.outpost-real-page-preview[data-text-size="huge"] #dice :is(
  .dice-skill-name small,
  .dice-skill-legend,
  .history-row :is(span, small),
  .dice-formula-rule small,
  .dice-formula-control header small
) {
  font-size: 11px !important;
  line-height: 1.4 !important;
}

body.outpost-real-page-preview[data-text-size="huge"] #dice .dice-skill-switch {
  min-height: 60px;
}

body.outpost-real-page-preview[data-text-size="huge"] #dice .history-row {
  min-height: 74px;
}

body.outpost-real-page-preview[data-ui-mode="easy"] #dice .dice-result-stage #rollResultTitle {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .03em;
}

body.outpost-real-page-preview[data-ui-mode="easy"] #dice .dice-result-authority {
  min-height: 28px;
  font-size: 10px;
  font-weight: 750;
}

body.outpost-real-page-preview[data-ui-mode="easy"] #dice .dice-skill-legend > small {
  display: none;
}

body.outpost-real-page-preview #dice .dice-skill-switch:is(.proficient, .has-disadvantage):hover {
  padding-left: 16px;
}

body.outpost-real-page-preview #dice .dice-skill-switch.proficient {
  box-shadow: inset 2px 0 var(--op-success);
}

body.outpost-real-page-preview #dice .dice-skill-switch.has-disadvantage {
  box-shadow: inset 2px 0 var(--op-warning);
}

body.outpost-real-page-preview #dice .dice-skill-switch.proficient.has-disadvantage {
  box-shadow: inset 2px 0 var(--op-success), inset 4px 0 var(--op-warning);
}

body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="formula"] .dice-stage-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

body.outpost-real-page-preview #dice .dice-formula-preview#rollDisplay {
  display: block;
  min-height: 0;
  padding: 22px 0 0;
  text-align: left;
}

body.outpost-real-page-preview #dice .dice-formula-preview-copy > span {
  display: block;
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
}

body.outpost-real-page-preview #dice .dice-formula-preview-copy #dieFace {
  margin: 22px 0 12px;
  color: var(--op-text);
  font-family: var(--op-font-mono);
  font-size: clamp(54px, 6vw, 84px);
  font-weight: 430;
  letter-spacing: -0.04em;
  line-height: 1;
}

body.outpost-real-page-preview #dice .dice-formula-preview-copy p {
  max-width: 32ch;
  margin: 0 0 24px;
  color: var(--op-text-muted);
  font-size: 10px;
  line-height: 1.55;
}

body.outpost-real-page-preview #dice .dice-formula-range {
  border-top: 1px solid var(--op-line-faint);
}

body.outpost-real-page-preview #dice .dice-formula-range > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  border-bottom: 1px solid var(--op-line-faint);
}

body.outpost-real-page-preview #dice .dice-formula-range span,
body.outpost-real-page-preview #dice .dice-formula-range :is(b, small) {
  display: block;
}

body.outpost-real-page-preview #dice .dice-formula-range b {
  color: var(--op-text);
  font-size: 11px;
}

body.outpost-real-page-preview #dice .dice-formula-range small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--op-text-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.outpost-real-page-preview #dice .dice-formula-range strong,
body.outpost-real-page-preview #dice .dice-formula-range #dieFace {
  color: var(--op-text);
  font-family: var(--op-font-mono);
  font-size: 15px;
  font-weight: 500;
  text-shadow: none;
}

body.outpost-real-page-preview #dice .dice-formula-confirm {
  padding-top: 18px;
}

body.outpost-real-page-preview #dice .dice-formula-confirm > .roll-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--op-line-strong);
  border-radius: 0;
  color: var(--op-bg);
  background: var(--op-text);
  box-shadow: none;
  font-family: var(--op-font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

@media (max-width: 1120px) {
  body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="quick"] .dice-layout-v3 {
    grid-template-columns: 250px minmax(0, 1fr) 260px;
  }

  body.outpost-real-page-preview #dice .dice-formula-compose {
    grid-template-columns: minmax(130px, .7fr) minmax(240px, 1.4fr) minmax(130px, .7fr);
  }
}

@media (max-width: 820px) {
  body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="quick"] .dice-layout-v3,
  body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="formula"] .dice-layout-v3 {
    grid-template-areas: "stage" "quick" "history";
    grid-template-columns: minmax(0, 1fr);
  }

  body.outpost-real-page-preview #dice .dice-workspace[data-dice-workspace-mode="formula"] .dice-layout-v3 {
    grid-template-areas: "control" "stage";
  }

  body.outpost-real-page-preview #dice .dice-layout-v3 > * + * {
    border-left: 0;
    border-top: 1px solid var(--op-line);
  }

  body.outpost-real-page-preview #dice .dice-formula-compose {
    grid-template-columns: minmax(0, 1fr);
  }

  body.outpost-real-page-preview #dice .dice-formula-control {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--op-line);
  }

  body.outpost-real-page-preview #dice .dice-formula-control:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  body.outpost-real-page-preview #dice .dice-layout-v3 > :is(.panel, .dice-stage-panel) {
    padding: 18px;
  }

  body.outpost-real-page-preview #dice .dice-stage-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.outpost-real-page-preview #dice .dice-formula-draft-head {
    min-height: 104px;
  }

  body.outpost-real-page-preview #dice .history-row {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  body.outpost-real-page-preview #dice .history-row > small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.outpost-real-page-preview #dice *,
  body.outpost-real-page-preview #dice *::before,
  body.outpost-real-page-preview #dice *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
