:root {
  color-scheme: light;
  --paper: #f5f3ee;
  --surface: #fff;
  --ink: #29282b;
  --muted: #777479;
  --border: #e2ded7;
  --wine: #762f42;
  --wine-dark: #602135;
  --tint: #f5ebee;
  --brass: #98713b;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--wine);
}
button,
input,
a {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #b77b8c;
  outline-offset: 3px;
}
button {
  transition:
    background 0.15s,
    transform 0.15s,
    border-color 0.15s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
.site-header {
  height: 76px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1280px;
  height: 100%;
  margin: auto;
  padding: 0 38px;
  display: flex;
  align-items: center;
  gap: 25px;
}
.brand {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -1.1px;
}
.brand-dot {
  color: var(--wine);
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 34px;
  height: 35px;
  margin-right: 11px;
  border: 1px solid var(--wine);
  border-radius: 9px;
  color: var(--wine);
  font:
    italic 700 29px Georgia,
    serif;
  letter-spacing: -2px;
}
.brand-mark span {
  font-size: 20px;
  align-self: flex-end;
  margin: 0 1px 0 -2px;
}
.header-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
}
.header-section {
  color: var(--muted);
  font-size: 13px;
}
.back-link {
  margin-left: auto;
  font-size: 13px;
  display: flex;
  gap: 9px;
  align-items: center;
}
.workspace {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 38px 22px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.breadcrumbs span:last-child {
  color: var(--wine);
}
.breadcrumbs > span:not(:last-child) {
  color: #aaa4a0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 35px 0 30px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--wine);
}
.tiny-diamond {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--wine);
}
h1 {
  font:
    400 clamp(32px, 3.5vw, 44px)/1.1 Georgia,
    'Times New Roman',
    serif;
  letter-spacing: -1.4px;
  margin: 10px 0 12px;
}
h1 > span {
  color: var(--wine);
}
.page-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.edition {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 9px;
  letter-spacing: 1.7px;
  color: var(--muted);
}
.edition b {
  font:
    italic 32px Georgia,
    serif;
  color: #b2a48b;
  border-left: 1px solid var(--border);
  padding-left: 14px;
}
.app-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 2px 3px #29282b03;
  overflow: hidden;
}
.panel-heading {
  height: 63px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #eeebe6;
}
.heading-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
h2 {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.2px;
  margin: 0;
}
.section-icon {
  font-size: 22px;
  line-height: 1;
  color: var(--wine);
}
.text-button {
  padding: 8px 0;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 11px;
}
.text-button:hover {
  color: var(--wine);
}
.table-panel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
.builder {
  grid-column: 1;
  grid-row: 1;
}
.presets {
  grid-column: 1;
  grid-row: 2;
}
.history {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}
.table-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.table-status i,
.storage-dot {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: #5a7d65;
  display: inline-block;
}
.dice-table {
  position: relative;
  margin: 18px;
  border: 1px solid #d7d0c5;
  border-radius: 9px;
  background: radial-gradient(ellipse at 50% 20%, #fffdf8 0%, #f1ede4 75%);
  min-height: 346px;
  padding: 21px 24px 16px;
  overflow: hidden;
}
.dice-table:before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid #d9d1c36b;
  border-radius: 4px;
  pointer-events: none;
}
.dice-table:after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#8e785114 0.7px, transparent 0.7px);
  background-size: 5px 5px;
  pointer-events: none;
  opacity: 0.6;
}
.table-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
  min-height: 24px;
  gap: 15px;
}
.table-topline > span {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #938571;
  max-width: 65%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.table-clear {
  font-size: 10px;
  color: #958877;
  padding: 4px 0;
}
.dice-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 139px;
  padding: 23px 5px 12px;
}
.die {
  --die-color: var(--wine);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 76px;
  width: 76px;
  height: 83px;
  border: 0;
  background: none;
  padding: 0;
  filter: drop-shadow(0 8px 5px #40252d26);
  isolation: isolate;
  transition:
    transform 0.2s,
    filter 0.2s;
  opacity: 1 !important;
}
.die:before {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0, 95% 24%, 95% 76%, 50% 100%, 5% 76%, 5% 24%);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--die-color), white 23%),
    var(--die-color) 48%,
    color-mix(in srgb, var(--die-color), black 26%)
  );
  z-index: -2;
}
.die:after {
  content: '';
  position: absolute;
  inset: 5px;
  clip-path: polygon(50% 0, 95% 24%, 95% 76%, 50% 100%, 5% 76%, 5% 24%);
  background:
    linear-gradient(30deg, transparent 49.4%, #ffffff1c 50%, transparent 50.8%),
    linear-gradient(150deg, transparent 49.4%, #ffffff20 50%, transparent 50.8%);
  border: 1px solid #ffffff40;
  z-index: -1;
}
.die[data-type='d6']:before,
.die[data-type='dF']:before,
.die[data-type^='dS']:before {
  clip-path: polygon(13% 2%, 87% 2%, 100% 15%, 100% 85%, 87% 98%, 13% 98%, 0 85%, 0 15%);
}
.die[data-type='d4']:before {
  clip-path: polygon(50% 0, 100% 90%, 92% 100%, 8% 100%, 0 90%);
}
.die[data-type='d4'] {
  padding-top: 14px;
}
.die[data-type='d2']:before {
  clip-path: ellipse(46% 45% at 50% 50%);
}
.die[data-type='d8']:before {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.die:not(:disabled):hover {
  transform: translateY(-5px) rotate(-3deg);
  filter: drop-shadow(0 12px 6px #40252d35);
}
.die-value {
  font:
    600 29px/1.1 Georgia,
    serif;
  color: #fff;
  max-width: 100%;
  letter-spacing: -1px;
}
.die-value.long-value {
  font-size: 23px;
}
.die-type {
  font-size: 9px;
  color: #fff9;
  letter-spacing: 1px;
  line-height: 1.4;
  margin-top: 3px;
}
.die.unrolled .die-value {
  font-size: 23px;
}
.die.unrolled .die-type {
  display: none;
}
.die.is-max:after {
  background: linear-gradient(135deg, #e5c78e50, transparent 60%);
}
.result {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 112px;
  padding: 8px 0 6px;
}
.result-caption {
  font-size: 8px;
  letter-spacing: 2px;
  color: #948673;
}
.result strong {
  color: var(--wine);
  font:
    500 54px/1.1 Georgia,
    serif;
  margin: 3px 0 4px;
  letter-spacing: -2px;
}
.result-detail {
  font-size: 11px;
  color: #8e8273;
  text-align: center;
  overflow-wrap: anywhere;
  line-height: 1.6;
  max-width: 100%;
}
.table-footnote {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
  font-size: 9px;
  color: #9a8c7c;
  margin-top: 12px;
}
.table-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border-top: 1px solid #ac9773;
  border-left: 1px solid #ac9773;
  top: 9px;
  left: 9px;
  z-index: 1;
}
.corner-two {
  inset: auto 9px 9px auto;
  transform: rotate(180deg);
}
.roll-bar {
  padding: 0 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.formula-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 5px;
}
.field-caption {
  color: var(--muted);
  font-size: 10px;
}
.formula-block strong {
  font-size: 16px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.primary-button {
  border: 1px solid var(--wine);
  border-radius: 8px;
  background: var(--wine);
  color: #fff;
  min-height: 44px;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.primary-button:hover {
  background: var(--wine-dark);
}
.roll-button {
  min-width: 245px;
  height: 50px;
  font-size: 13px;
  flex-shrink: 0;
}
.roll-icon {
  font-size: 25px;
  line-height: 1;
}
kbd {
  font: 9px inherit;
  font-size: 9px;
  font-weight: 400;
  border: 1px solid #ffffff35;
  border-radius: 4px;
  padding: 3px 5px;
  color: #fff9;
  margin-left: 5px;
}
.builder-content {
  padding: 20px;
}
.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.quiet-label {
  color: #aaa3a2;
  font-size: 9px;
}
.dice-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.pick-die {
  position: relative;
  min-height: 49px;
  border: 1px solid var(--border);
  background: #faf9f6;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}
.pick-die:hover {
  background: var(--tint);
  border-color: #c7a6af;
}
.pick-die.selected {
  background: var(--tint);
  border-color: #c3a1ab;
  color: var(--wine);
}
.pick-die .mini-shape {
  font-size: 20px;
  font-weight: 400;
  color: #a49c97;
}
.pick-die.selected .mini-shape {
  color: var(--wine);
}
.pick-count {
  position: absolute;
  right: -3px;
  top: -4px;
  font-size: 8px;
  border-radius: 8px;
  min-width: 15px;
  height: 15px;
  background: var(--wine);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}
.expand-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 9px 0 0;
  min-height: 34px;
  border: 0;
  background: none;
  color: var(--wine);
  font-size: 10px;
}
.expand-button:hover {
  background: var(--tint);
  border-radius: 6px;
}
#extra-dice {
  padding: 4px 0 12px;
}
.dice-help {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}
.custom-die {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}
.custom-die input {
  min-width: 0;
  width: 85px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 7px;
  background: #faf9f6;
}
.small-button {
  width: 30px;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  font-size: 18px;
}
.selection {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.selection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}
.selection-title {
  display: flex;
  gap: 7px;
  align-items: center;
}
.selection-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.quantity {
  display: flex;
  align-items: center;
  gap: 6px;
}
.quantity button {
  border: 1px solid #e8e3dd;
  background: #fff;
  border-radius: 5px;
  font-size: 13px;
  width: 26px;
  height: 26px;
}
.quantity button:hover {
  background: var(--tint);
}
.quantity span {
  min-width: 18px;
  text-align: center;
  font-size: 11px;
}
.empty-selection {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin: 4px 0;
}
.builder-divider {
  height: 1px;
  background: #eeebe6;
  margin: 17px 0;
}
.modifier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 550;
}
.helper {
  display: block;
  font-size: 9px;
  color: #9b9595;
  margin-top: 5px;
}
.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  height: 35px;
}
.stepper button {
  width: 28px;
  height: 100%;
  background: #faf9f6;
  border: 0;
  font-size: 16px;
}
.stepper button:hover {
  background: var(--tint);
}
.stepper input {
  width: 50px;
  min-width: 0;
  text-align: center;
  border: 0;
  font-size: 12px;
  padding: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-inner-spin-button {
  appearance: none;
}
.color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  gap: 5px;
}
.swatches {
  display: flex;
  gap: 5px;
}
.swatch {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  background: var(--swatch);
  border: 3px solid #fff;
  outline: 1px solid transparent;
  outline-offset: 1px;
}
.swatch[aria-pressed='true'] {
  outline-color: var(--swatch);
}
.outline-button {
  border: 1px solid var(--border);
  border-radius: 7px;
  min-height: 39px;
  background: white;
  font-size: 11px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.outline-button:hover {
  border-color: #c3a1ab;
  background: var(--tint);
  color: var(--wine);
}
.save-set {
  width: 100%;
  margin-top: 23px;
  color: var(--wine);
}
.save-set > span {
  font-size: 18px;
}
.preset-list {
  padding: 7px 18px 0;
}
.preset-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f0ede8;
  gap: 6px;
  min-width: 0;
}
.preset-row:last-child {
  border: 0;
}
.preset-load {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  background: none;
  border: 0;
  padding: 11px 0;
}
.preset-load:hover .preset-name {
  color: var(--wine);
}
.preset-symbol {
  width: 31px;
  height: 33px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: color-mix(in srgb, var(--preset-color), transparent 92%);
  color: var(--preset-color);
  flex-shrink: 0;
}
.preset-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.preset-name {
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 550;
}
.preset-formula {
  font-size: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.preset-edit {
  color: #a19a98;
  border: 0;
  background: transparent;
  padding: 7px;
  font-size: 19px;
  border-radius: 4px;
}
.preset-edit:hover {
  background: var(--tint);
  color: var(--wine);
}
.presets-note,
.history-note {
  color: #a29a96;
  font-size: 9px;
  line-height: 1.5;
  margin: 14px 20px 18px;
}
.count-badge {
  min-width: 19px;
  min-height: 19px;
  padding: 3px 5px;
  border-radius: 5px;
  background: #f3f1ec;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #9b928c;
}
.history-list {
  max-height: 292px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.history-empty {
  padding: 32px 20px 24px;
  text-align: center;
  color: #a19890;
}
.empty-symbol {
  display: block;
  font-size: 28px;
  font-weight: 300;
  color: #c4b9ab;
  margin-bottom: 11px;
}
.history-empty p {
  margin: 0 0 5px;
  font-size: 12px;
  color: #7e766f;
}
.history-empty span:last-child {
  font-size: 10px;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 17px;
  width: 100%;
  padding: 14px 22px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #f0ede8;
  background: #fff;
}
.history-row:hover {
  background: #fcf9f6;
}
.history-time {
  font-size: 9px;
  color: #a49a94;
  white-space: nowrap;
}
.history-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.history-formula {
  font-size: 12px;
  font-weight: 500;
}
.history-values {
  font-size: 10px;
  color: #9c928a;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.history-total {
  font:
    25px Georgia,
    serif;
  color: var(--wine);
  flex-shrink: 0;
}
.history-note {
  border-top: 1px solid #f0ede8;
  margin: 0;
  padding: 12px 20px;
}
.workspace-footer {
  margin-top: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 9px;
  color: #a0988e;
  line-height: 1.6;
}
.workspace-footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}
.storage-dot {
  width: 4px;
  height: 4px;
  flex-shrink: 0;
  background: #9f977c;
}
dialog {
  width: min(420px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border: 1px solid var(--border);
  padding: 26px;
  border-radius: 15px;
  color: var(--ink);
  box-shadow: 0 20px 90px #30212830;
}
dialog::backdrop {
  background: #2c20264a;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.dialog-heading h2 {
  font:
    24px Georgia,
    serif;
}
.icon-button {
  border: 0;
  background: transparent;
  font-size: 24px;
  color: var(--muted);
  padding: 3px 6px;
}
.dialog-description {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  margin: 14px 0 24px;
}
.name-input {
  display: block;
  width: 100%;
  margin: 9px 0 15px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #faf9f6;
  font-size: 12px;
}
.dialog-preview {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 7px;
  color: var(--wine);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 25px;
}
.danger {
  color: #a3342c;
  margin-right: auto;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  width: max-content;
  background: #352e31;
  color: white;
  border-radius: 9px;
  padding: 13px 20px;
  font-size: 12px;
  box-shadow: 0 5px 25px #30212826;
  z-index: 20;
  line-height: 1.5;
}
.noscript {
  padding: 20px;
  color: var(--wine);
  text-align: center;
}
.rolling .die {
  animation: tumble 0.65s ease-in-out;
}
.rolling .die:nth-child(2n) {
  animation-delay: 0.06s;
}
.rolling .die:nth-child(3n) {
  animation-delay: 0.1s;
}
@keyframes tumble {
  0% {
    transform: translateY(0) rotate(0);
  }
  25% {
    transform: translateY(-23px) rotate(-25deg);
  }
  55% {
    transform: translateY(5px) rotate(25deg);
  }
  80% {
    transform: translateY(-6px) rotate(-8deg);
  }
  100% {
    transform: translateY(0) rotate(0);
  }
}
@media (min-width: 1000px) {
  .app-grid {
    grid-template-rows: auto auto;
    gap: 22px;
  }
  .table-panel {
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }
  .dice-table {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .dice-stage {
    flex: 1;
    align-content: center;
  }
  .result {
    flex-shrink: 0;
  }
  .builder {
    height: 100%;
  }
}
@media (max-width: 1000px) {
  .app-grid {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 16px;
  }
  .header-inner,
  .workspace {
    padding-left: 25px;
    padding-right: 25px;
  }
  .builder-content {
    padding: 17px;
  }
  .panel-heading {
    padding: 0 17px;
  }
  .dice-table {
    margin: 14px;
    min-height: 355px;
    padding: 16px;
  }
  .roll-bar {
    padding: 0 17px 18px;
    gap: 12px;
  }
  .roll-button {
    min-width: 0;
    padding: 10px 16px;
  }
  kbd {
    display: none;
  }
  .die {
    width: 66px;
    height: 73px;
    flex-basis: 66px;
  }
  .dice-stage {
    gap: 12px;
  }
  .formula-block strong {
    font-size: 14px;
  }
  .edition {
    display: none;
  }
  .table-topline > span {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .color-row {
    gap: 3px;
  }
  .swatches {
    gap: 4px;
  }
}
@media (max-width: 720px) {
  .site-header {
    height: 62px;
  }
  .header-inner {
    padding: 0 19px;
    gap: 14px;
  }
  .header-section,
  .header-divider {
    display: none;
  }
  .brand {
    font-size: 23px;
  }
  .brand-mark {
    width: 30px;
    height: 31px;
    font-size: 26px;
    margin-right: 9px;
  }
  .back-link {
    font-size: 11px;
  }
  .workspace {
    padding: 20px 16px 24px;
  }
  .breadcrumbs {
    font-size: 10px;
    gap: 10px;
  }
  .page-heading {
    margin: 27px 0 23px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.5px;
  }
  h1 {
    font-size: 34px;
    margin: 9px 0 10px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .app-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .app-grid > .panel {
    width: 100%;
  }
  .table-panel {
    order: 0;
  }
  .builder {
    order: 1;
  }
  .presets {
    order: 2;
  }
  .history {
    order: 3;
  }
  .panel-heading {
    height: 56px;
    padding: 0 18px;
  }
  .dice-table {
    margin: 12px;
    min-height: 320px;
    padding: 14px 16px;
  }
  .dice-stage {
    min-height: 126px;
    padding: 20px 0 10px;
    gap: 12px;
  }
  .result {
    min-height: 100px;
  }
  .result strong {
    font-size: 51px;
  }
  .result-caption {
    font-size: 8px;
  }
  .table-footnote {
    font-size: 8px;
    margin-top: 8px;
  }
  .roll-bar {
    padding: 2px 17px 18px;
    gap: 12px;
  }
  .roll-button {
    height: 48px;
    min-width: 176px;
    font-size: 12px;
    padding: 9px 14px;
    gap: 7px;
  }
  .formula-block {
    max-width: 45%;
  }
  .formula-block strong {
    font-size: 13px;
  }
  .field-caption {
    font-size: 10px;
  }
  .builder-content {
    padding: 18px;
  }
  .dice-picker {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
  }
  .pick-die {
    min-height: 48px;
    font-size: 10px;
    flex-direction: column;
    gap: 0;
  }
  .pick-die .mini-shape {
    font-size: 18px;
    line-height: 20px;
  }
  .selection {
    margin-top: 12px;
  }
  .selection-row {
    font-size: 12px;
  }
  .quantity button {
    width: 32px;
    height: 32px;
  }
  .modifier-row {
    gap: 15px;
  }
  .field-label {
    font-size: 12px;
  }
  .helper {
    font-size: 10px;
  }
  .stepper {
    height: 40px;
  }
  .stepper input {
    width: 59px;
    font-size: 14px;
  }
  .stepper button {
    width: 35px;
  }
  .color-row {
    margin-top: 20px;
  }
  .swatches {
    gap: 9px;
  }
  .swatch {
    width: 23px;
    height: 23px;
  }
  .save-set {
    margin-top: 22px;
    height: 42px;
    font-size: 12px;
  }
  .expand-button {
    font-size: 11px;
    min-height: 38px;
  }
  #rare-picker {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .dice-help {
    font-size: 11px;
  }
  .preset-list {
    padding-left: 18px;
    padding-right: 12px;
  }
  .preset-load {
    padding: 13px 0;
  }
  .preset-name {
    font-size: 12px;
  }
  .preset-formula {
    font-size: 11px;
  }
  .preset-symbol {
    width: 35px;
    height: 36px;
  }
  .history-row {
    padding: 14px 18px;
    gap: 12px;
  }
  .history-list {
    max-height: 310px;
  }
  .history-note,
  .presets-note {
    font-size: 10px;
  }
  .workspace-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 10px;
    margin-top: 21px;
  }
  .workspace-footer > span:last-child {
    display: none;
  }
  .text-button {
    font-size: 11px;
  }
  .custom-die {
    justify-content: flex-start;
    gap: 12px;
  }
  .table-status {
    font-size: 10px;
  }
  .history-time {
    font-size: 10px;
  }
}
@media (max-width: 365px) {
  h1 {
    font-size: 30px;
  }
  .workspace {
    padding-left: 12px;
    padding-right: 12px;
  }
  .dice-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pick-die {
    flex-direction: row;
    gap: 5px;
  }
  .roll-button {
    min-width: 160px;
  }
  .table-footnote {
    font-size: 7px;
  }
  .history .heading-with-icon {
    gap: 6px;
  }
  .history h2 {
    font-size: 13px;
  }
  .swatches {
    gap: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
.configure-preset {
  width: 100%;
  margin-top: 12px;
}
