dialog.dice-set-editor {
  --dse-line:#54645d;
  width:min(720px,calc(100vw - 24px));
  max-height:calc(100dvh - 32px);
  margin:auto;
  padding:0;
  overflow:auto;
  border:1px solid #718078;
  border-radius:16px;
  color:#f8f2e5;
  background:linear-gradient(145deg,#283731,#17251f 52%,#192720);
  box-shadow:inset 0 1px #b8c8bc44,0 22px 90px #030c08ac;
  color-scheme:dark;
}
.dice-set-editor::backdrop {background:#07120ec7;backdrop-filter:blur(5px)}
.dice-set-editor * {box-sizing:border-box}
.dice-set-editor .dse-form {display:grid;gap:15px;padding:clamp(16px,3vw,26px);margin:0}
.dice-set-editor .dse-header,.dice-set-editor .dse-rack-head,.dice-set-editor .dse-footer,.dice-set-editor .dse-actions {display:flex;align-items:center;gap:8px;position:static;width:auto;height:auto;min-height:0;background:none;box-shadow:none;border:none;padding:0;margin:0}
.dice-set-editor .dse-header,.dice-set-editor .dse-rack-head {justify-content:space-between}
.dice-set-editor h2,.dice-set-editor h3,.dice-set-editor legend {margin:0;padding:0;color:inherit;text-align:left}
.dice-set-editor h2 {font:500 clamp(26px,3.3vw,34px)/1.1 "STIX Two Text",Georgia,serif;letter-spacing:-.025em;text-transform:none}
.dice-set-editor h3 {font-size:15px}
.dice-set-editor button {display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:5px 10px;border:1px solid var(--dse-line);border-radius:6px;box-shadow:inset 0 1px #fbfbe80c;background:#27362f;color:#f3eee3;font-family:inherit;font-size:13px;font-weight:600;line-height:1.15;cursor:pointer;transform:none;margin:0}
.dice-set-editor button:hover:enabled {background-color:#35463c;border-color:#a3b0a0}
.dice-set-editor button:disabled {opacity:.4;cursor:default}
.dice-set-editor :is(button,input):focus-visible {outline:2px solid #ffe0a0;outline-offset:2px}
.dice-set-editor .dse-close {width:35px;height:35px;min-width:35px;padding:0;color:#e9e2d4;border-radius:50%;font:400 23px/1 system-ui}
.dice-set-editor .dse-name,.dice-set-editor legend {font-size:13px;font-weight:650;letter-spacing:.015em;color:#f4ede0}
.dice-set-editor .dse-name {display:grid;gap:6px;margin:0}
.dice-set-editor .dse-name input {width:100%;height:40px;margin:0;padding:8px 12px;color:#fff8e8;background:#15221c;border:1px solid var(--dse-line);border-radius:6px;box-shadow:inset 0 1px 3px #09170c88;font:inherit;font-size:16px}
.dice-set-editor .dse-name input::placeholder {color:#adbbad}
.dse-work {display:grid;grid-template-columns:minmax(150px,.82fr) minmax(0,1.65fr);gap:clamp(12px,2.5vw,22px);align-items:stretch}
.dice-set-editor .dse-specimen {position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;isolation:isolate;min-width:0;margin:0;padding:10px;overflow:hidden;color:#f3e9d4;border:1px solid #4b6252;border-radius:9px;background:radial-gradient(ellipse at 35% 22%,#44645469,transparent 66%),repeating-linear-gradient(115deg,#7b95700a 0 1px,transparent 1px 3px),repeating-linear-gradient(16deg,#12261940 0 1px,transparent 1px 4px),#263e32;box-shadow:inset 0 2px 10px #0c1a144c}
.dse-specimen canvas {display:block;position:static;width:min(100%,170px);height:auto;filter:drop-shadow(3px 8px 4px #08180c95)}
.dse-specimen figcaption {display:grid;gap:4px;text-align:center;font-weight:500;line-height:1.3;font-family:inherit;font-size:12px;color:#eee9d8}
.dse-specimen figcaption strong {font:600 20px/1.1 "STIX Two Text",Georgia,serif;color:#ffe6ae}
.dse-settings {display:grid;align-content:center;gap:13px}
.dice-set-editor fieldset {min-width:0;margin:0;padding:0;border:0}
.dice-set-editor legend {margin-bottom:6px}
.dse-choice-row {display:flex;flex-wrap:wrap;gap:5px}
.dice-set-editor .dse-choice[aria-pressed=true],.dice-set-editor .dse-tile[aria-pressed=true] {border-color:#e7c78b;background-color:#494631;color:#fff1cf;box-shadow:inset 0 0 0 1px #e7c78b4f}
.dse-swatch {display:inline-block;flex:none;width:15px;height:15px;box-shadow:inset 0 1px 2px #fff7,0 1px 1px #131913;border:1px solid #fcf5e566;border-radius:50%;background:linear-gradient(145deg,var(--dse-sw-light),var(--dse-sw-mid) 40%,var(--dse-sw-light) 52%,var(--dse-sw-mid) 68%,var(--dse-sw-dark))}
.dse-rack {display:grid;gap:8px;min-width:0}
.dice-set-editor .dse-actions {gap:4px}
.dice-set-editor .dse-add {color:#f6d79e}
.dse-tiles {display:flex;gap:6px;overflow-x:auto;padding:4px 3px 6px;scrollbar-width:thin}
.dice-set-editor .dse-tile {display:grid;justify-items:center;gap:0;min-width:53px;min-height:54px;padding:3px;font-size:11px}
.dse-tile canvas {display:block;position:static;width:37px;height:32px}
.dice-set-editor .dse-footer {border-top:1px solid #46584b;padding-top:14px;justify-content:flex-end}
.dse-error {margin-right:auto;color:#ffbaad;font-size:13px}
.dice-set-editor .dse-save,.dice-set-editor .dse-save:hover:enabled {padding-inline:18px;border-color:#f6db9b;background:linear-gradient(#f4deb0,#ddbc81);color:#2b261c}
@media(max-width:600px){
  .dice-set-editor .dse-form {gap:12px}
  .dse-work {grid-template-columns:minmax(0,1fr)}
  .dice-set-editor .dse-specimen {display:flex;flex-direction:row;gap:12px;justify-content:flex-start;padding:6px 12px;min-height:74px}
  .dse-specimen canvas {width:74px}
  .dse-specimen figcaption {text-align:left}
  .dse-settings {gap:10px}
  .dice-set-editor .dse-rack-head {flex-wrap:wrap}
}
@media(max-height:550px){
  dialog.dice-set-editor {max-height:calc(100dvh - 12px)}
}
