.dice-overlay[popover]{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;overflow:visible;background:transparent;color:var(--wf-text);pointer-events:none;font:13px "Segoe UI",system-ui,sans-serif}
.dice-overlay::backdrop{display:none}
.campaign-menu,.workspace .left-panel{padding-bottom:96px}
.dice-overlay button,.dice-overlay input,.dice-overlay summary{pointer-events:auto}
.dice-overlay button{font-family:inherit}
.dice-overlay svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linejoin:round}
.dice-launcher{position:absolute;bottom:20px;left:20px;display:flex;align-items:center;gap:10px;padding:13px 17px;border:1px solid var(--wf-accent-muted);border-radius:12px;color:var(--wf-accent);background:linear-gradient(130deg,var(--wf-line),var(--wf-panel));box-shadow:0 6px 28px #0007;font-size:12px;font-weight:600;pointer-events:auto}
.dice-launcher svg{width:29px;height:29px}
.dice-launcher:hover,.dice-launcher[aria-expanded=true]{background:var(--wf-line);border-color:var(--wf-accent);transform:translateY(-2px)}
.dice-picker{position:absolute;bottom:94px;left:20px;width:338px;max-height:calc(100dvh - 115px);overflow-y:auto;background:var(--wf-panel);border:1px solid var(--wf-accent-muted);border-radius:12px;box-shadow:0 15px 60px #0009;padding:21px;pointer-events:auto}
.dice-picker[hidden],.dice-results-footer[hidden]{display:none}
.dice-picker header{display:flex;justify-content:space-between;gap:15px;align-items:flex-start;margin-bottom:21px}
.dice-picker header small{font-size:8px;color:var(--wf-accent);letter-spacing:1.5px}
.dice-picker h2{font:22px Georgia,serif;color:var(--wf-accent);margin:7px 0 0}
.dice-close{display:grid;place-items:center;flex-shrink:0;width:27px;height:27px;font-size:22px;line-height:1;color:var(--wf-muted);border-radius:5px}
.dice-close:hover{color:var(--wf-accent);background:rgb(var(--wf-muted-rgb) / 0.18)}
.dice-types{border:0;padding:0;margin:0;display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.dice-types legend{font-size:11px;color:var(--wf-muted);padding:0 0 11px}
.dice-types button{display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;padding:10px 3px;border:1px solid var(--wf-line);border-radius:7px;color:var(--wf-muted);font-size:10px;background:var(--wf-raised);min-height:62px}
.dice-types button.selected{color:var(--wf-accent);border-color:var(--wf-accent-muted);background:rgb(var(--wf-accent-muted-rgb) / 0.333);box-shadow:inset 0 0 0 1px rgb(var(--wf-accent-muted-rgb) / 0.267)}
.dice-types button:hover{background:var(--wf-line)}
.dice-types svg{height:28px;width:28px}
.dice-picker-numbers{display:grid;grid-template-columns:1.25fr 1fr;gap:17px;margin-top:20px}
.dice-picker label{display:block;font-size:10px;color:var(--wf-muted);margin:0}
.dice-picker input{font-size:13px;padding:10px;margin-top:8px;background:var(--wf-panel);border-color:var(--wf-line);height:39px;color:var(--wf-accent)}
.dice-stepper{display:flex;align-items:center;margin-top:8px;border:1px solid var(--wf-line);border-radius:6px;overflow:hidden;height:39px;background:var(--wf-panel)}
.dice-stepper input{width:48px;padding:8px 0;margin:0;text-align:center;border:0;border-radius:0;appearance:textfield;-moz-appearance:textfield}
.dice-stepper input::-webkit-inner-spin-button,.dice-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.dice-stepper button{width:36px;flex:1;height:100%;font-size:20px;color:var(--wf-accent)}
.dice-stepper button:hover{background:rgb(var(--wf-muted-rgb) / 0.192)}
.dice-custom{margin-top:17px}
.dice-custom summary{color:var(--wf-muted);cursor:pointer;font-size:10px}
.dice-custom label{margin-top:11px}
.dice-custom input{font-size:12px}
.dice-privacy{font-size:10px;color:var(--wf-muted);margin:18px 0 12px;line-height:1.6}
.dice-submit{width:100%;border:1px solid var(--wf-accent);background:var(--wf-accent-muted);color:var(--wf-panel);border-radius:7px;display:flex;align-items:center;justify-content:center;gap:10px;padding:12px;font-size:12px;font-weight:600}
.dice-submit:hover{background:var(--wf-accent)}
.dice-submit svg{width:23px;height:23px}
.dice-submit b{font-weight:600;margin-left:4px}
.dice-history{display:block;width:100%;padding:15px 5px 0;color:var(--wf-muted);font-size:10px;text-align:center}
.dice-history:hover{color:var(--wf-accent)}
.dice-notifications{position:absolute;bottom:20px;right:20px;width:326px;max-height:calc(100dvh - 40px);display:flex;flex-direction:column;gap:10px;pointer-events:none}
.dice-result-list{display:flex;flex-direction:column;gap:12px;overflow:auto;scrollbar-width:thin;pointer-events:auto;overscroll-behavior:contain}
.dice-result-list:empty{display:none}
.dice-result-card{flex-shrink:0;padding:16px 17px 17px;background:linear-gradient(125deg,var(--wf-raised),var(--wf-panel));border:1px solid var(--wf-accent-muted);border-radius:11px;box-shadow:0 8px 32px #0008;animation:dice-arrive .22s ease-out;overflow-wrap:anywhere}
.dice-result-card header{display:flex;align-items:center;gap:9px;color:var(--wf-muted)}
.dice-result-author{flex:1;min-width:0;font-size:10px;line-height:1.5}
.dice-result-privacy{font-size:8px;color:var(--wf-accent);white-space:nowrap}
.dice-result-card .dice-close{width:22px;height:22px}
.dice-result-title{color:var(--wf-accent);font-size:12px;margin:9px 0 3px;font-weight:500;line-height:1.5}
.dice-result-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:12px}
.dice-result-heading>span{font-size:13px;letter-spacing:.3px;color:var(--wf-accent)}
.dice-result-heading>div{display:flex;align-items:center;gap:10px}
.dice-result-heading small{font-size:8px;color:var(--wf-accent);letter-spacing:1px}
.dice-result-heading strong{font:36px Georgia,serif;color:var(--wf-accent);line-height:1.2}
.dice-result-faces{display:flex;gap:6px;flex-wrap:wrap;max-height:125px;overflow:auto;padding:1px;scrollbar-width:thin;overscroll-behavior:contain}
.dice-face{display:flex;flex-direction:column;align-items:center;min-width:39px;border:1px solid var(--wf-accent-muted);border-radius:7px;padding:6px 7px 5px;background:rgb(var(--wf-accent-rgb) / 0.063);gap:3px}
.dice-face b{font:21px Georgia,serif;color:var(--wf-accent);line-height:1}
.dice-face small{font-size:8px;color:var(--wf-muted)}
.dice-result-note{font-size:10px;line-height:1.6;color:var(--wf-muted);margin:11px 0 0}
.dice-results-footer{display:flex;justify-content:space-between;gap:10px;padding:0 4px;pointer-events:auto}
.dice-results-footer button{font-size:10px;color:var(--wf-muted);background:rgb(var(--wf-panel-rgb) / 0.929);border:1px solid var(--wf-line);border-radius:6px;padding:7px 10px;box-shadow:0 3px 8px #0004}
.dice-results-footer button:hover{background:var(--wf-line);color:var(--wf-accent)}
@keyframes dice-arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.dice-result-card{animation:none}.dice-launcher:hover,.dice-launcher[aria-expanded=true]{transform:none}}
@media(max-width:800px){.dice-notifications{right:12px;bottom:16px;width:285px}.dice-launcher{left:12px;bottom:16px}.dice-picker{left:12px;bottom:90px;width:310px}.dice-result-card{padding:12px}.dice-result-heading strong{font-size:30px}}
