.pd-head-actions{margin-left:auto;display:flex;align-items:center;gap:8px;flex-shrink:0}.pd-head-pill{display:flex;align-items:center;justify-content:center;gap:8px;min-height:34px;padding:3px 12px;border:1px solid #b9bea7;border-radius:99px;background:#fffdf5;color:#294d3d;font:600 12px/1.2 Arial,sans-serif;cursor:pointer}.pd-head-pill svg{width:20px;height:20px;flex-shrink:0}.pd-account-die{display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);gap:2px;padding:5px;width:25px;height:25px;border:1px solid #b09d76;border-radius:6px;background:#f2e6cc;transform:rotate(-8deg)}.pd-account-die i{background:#294d3d;border-radius:50%}.pd-account-die i:nth-child(1){grid-area:1/1}.pd-account-die i:nth-child(2){grid-area:2/2}.pd-account-die i:nth-child(3){grid-area:3/3}
dialog.pd-popover{transform:none!important;translate:none!important}
dialog.pd-popover{position:fixed!important;inset:52px 12px auto auto!important;margin:0!important;width:302px!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 66px)!important;height:auto!important;padding:0!important;border:1px solid #a9893d!important;border-radius:15px!important;background:#18372b!important;color:#fff9e9!important;box-shadow:0 14px 42px #17261d38;overflow:auto!important;font:14px/1.4 Arial,sans-serif}dialog.pd-popover::backdrop{background:transparent!important;backdrop-filter:none!important}.pd-menu-head{display:flex;align-items:center;gap:11px;padding:16px 14px;border-bottom:1px solid #ffffff1c}.pd-menu-emblem{width:38px;height:38px;border:1px solid #c19a47;background:#fffdf3;border-radius:50%;color:#294d3d;display:grid;place-items:center;flex-shrink:0}.pd-menu-emblem svg{width:22px;height:22px}.pd-menu-head h2{font:700 18px Georgia,serif!important;color:#f3cf72!important;margin:0 0 3px!important}.pd-menu-head p{font-size:11px;color:#dddac6;margin:0}.pd-menu-close{margin-left:auto;align-self:flex-start;min-width:30px;min-height:30px;border:0;background:transparent;color:inherit;font-size:20px;cursor:pointer}.pd-menu-list{padding:3px 0 9px}.pd-menu-row{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:11px 15px;border:0;border-bottom:1px solid #ffffff0c;background:transparent;text-align:left;color:inherit;cursor:pointer;font:600 13px/1.3 Arial,sans-serif}.pd-menu-row:last-child{border-bottom:0}.pd-menu-row>svg{width:19px;height:19px;flex-shrink:0;color:#e9c466;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.pd-menu-row .pd-chevron{margin-left:auto;color:#c5c9b7}.pd-menu-row small{display:block;font-size:10px;font-weight:400;color:#d0d4bf;margin-top:3px}.pd-menu-row:hover:not(:disabled){background:#ffffff0b}.pd-menu-row:disabled{opacity:.45;cursor:not-allowed}.pd-head-pill:focus-visible,.pd-popover button:focus-visible{outline:2px solid #d0a548;outline-offset:-3px}
dialog.pd-confirm{width:min(440px,calc(100vw - 28px));padding:24px;border:1px solid #b2985c;border-radius:16px;background:#fffaf0;color:#294d3d}.pd-confirm h2{font:26px/1.15 Georgia,serif;margin:0 0 14px}.pd-confirm p{font:14px/1.5 Arial,sans-serif}.pd-confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.pd-confirm-actions button{padding:11px 15px;border:1px solid #9eac95;border-radius:99px;background:#fffdf5;color:#294d3d;font:600 13px Arial,sans-serif;cursor:pointer}.pd-confirm-actions button.pd-primary{background:#294d3d;color:#fffdf5}
@media(max-width:540px){.pd-head-actions{gap:6px}.pd-head-pill{padding:4px;min-width:34px}.pd-head-label,.pd-pill-arrow{display:none}.pd-popover .pd-menu-head h2{color:#294d3d!important}dialog.pd-popover{background:#fffdf5!important;color:#29382e!important}.pd-menu-head{border-bottom-color:#e5e2d6}.pd-menu-head p,.pd-menu-row small{color:#6b705e}.pd-menu-row{border-bottom-color:#edeadf}.pd-menu-row>svg{color:#95701e}.pd-menu-row .pd-chevron{color:#797d6b}.pd-menu-row:hover:not(:disabled){background:#eeeede}.pd-head-pill svg{width:22px;height:22px}}

/* Both menus stay light regardless of the selected website background. */
dialog.pd-popover{background:#fffdf5!important;color:#29382e!important}
dialog.pd-popover .pd-menu-head h2{color:#294d3d!important}
.pd-menu-head{border-bottom-color:#e5e2d6}.pd-menu-head p,.pd-menu-row small{color:#6b705e}.pd-menu-row{border-bottom-color:#edeadf}.pd-menu-row>svg{color:#95701e}.pd-menu-row .pd-chevron{color:#797d6b}.pd-menu-row:hover:not(:disabled){background:#eeeede}
#tab-controls,#panel-controls{display:none!important}
dialog#pd-table-controls{inset:auto 12px 70px auto!important;width:350px!important}
#pd-table-controls .pd-controls-body{padding:16px;display:grid;gap:15px}
#pd-table-controls .pd-control-label{font-size:12px;margin:0 0 8px;color:#485e50}
#pd-table-controls .mode-pill17{display:flex;width:100%;max-width:none}
#pd-table-controls .mode-segment17{flex:1;min-height:40px}
#pd-table-controls .dice-switch17,#pd-table-controls .sound-pill19i{width:100%;min-height:44px;justify-content:space-between}
#pd-table-controls .sound-pill19i{border:1px solid #b5c2a9;border-radius:99px;padding:10px 14px;background:#fffdf5;color:#294d3d;font:600 12px Arial,sans-serif;cursor:pointer}
#pd-table-controls .sound-pill19i[aria-pressed=true]{background:#3e5f43;color:#fffdf5}
#pd-table-controls .pd-controls-note{margin:0;font-size:11px;color:#6b705e}
#table-menu-toggle{white-space:normal}
@media(max-width:420px){#table-menu-toggle{font-size:10px;line-height:1.15;min-width:0}#table-menu-toggle span{min-width:0}}

/* Approved compact sizing: only the two settings menus. */
dialog#pd-settings-menu,dialog#pd-table-controls{width:280px!important;box-shadow:0 5px 16px #17261d24}
:is(#pd-settings-menu,#pd-table-controls) .pd-menu-head{gap:8px;padding:9px 11px}
:is(#pd-settings-menu,#pd-table-controls) .pd-menu-head h2{font-size:16px!important;margin:0!important}
#pd-settings-menu .pd-menu-head p{font-size:10px;margin-top:2px}
#pd-table-controls .pd-menu-head p{display:none}
:is(#pd-settings-menu,#pd-table-controls) .pd-menu-close{min-width:28px;min-height:28px;font-size:18px}
#pd-settings-menu .pd-menu-emblem{width:28px;height:28px}
#pd-settings-menu .pd-menu-emblem svg{width:18px;height:18px}
#pd-settings-menu .pd-menu-list{padding:2px 0 5px}
#pd-settings-menu .pd-menu-row{min-height:36px;padding:7px 11px;gap:9px;font-size:12px}
#pd-settings-menu .pd-menu-row>svg{width:17px;height:17px}
#pd-settings-menu .pd-menu-row small{margin-top:1px;font-size:10px}
#pd-table-controls .pd-controls-body{padding:10px 11px;gap:8px}
#pd-table-controls .pd-control-label{font-size:11px;margin-bottom:4px}
#pd-table-controls .mode-pill17{padding:2px;min-height:0}
#pd-table-controls .mode-segment17{min-height:32px;padding:6px 10px;font-size:11px}
#pd-table-controls .dice-switch17,#pd-table-controls .sound-pill19i{min-height:34px;padding:6px 10px;font-size:11px}
/* Keep the existing light equipment pill readable on the setup preview. */
#setup-view .equipment-pill > span { color: #173e36; }
/* Generator: expose the existing return action without changing other tabs. */
#equipment-dialog:has(#panel-generator:not([hidden])) .equipment-foot{display:flex!important}
@media(min-width:601px){
 #equipment-dialog[open]:has(#panel-generator:not([hidden])){grid-template-rows:auto minmax(0,1fr) auto!important}
}
@media(max-width:600px){
 #equipment-dialog:has(#panel-generator:not([hidden])) .equipment-foot{bottom:39px!important}
 #equipment-dialog:has(#panel-generator:not([hidden])) .equipment-body{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important}
}
/* Let mobile browser chrome react to native document scrolling.
   The existing fixed game view continues to follow visualViewport. */
@media (hover:none) and (pointer:coarse){
 html:has(body[data-view=game]){overflow-y:auto;overscroll-behavior:auto}
 body[data-view=game]{height:calc(100vh + 1px);overflow:visible;overscroll-behavior:auto}
 @supports(height:100lvh){body[data-view=game]{height:calc(100lvh + 1px)}}
 html:has(body[data-view=game]):has(dialog[open]){overflow-y:hidden}
 body[data-view=game]:has(dialog[open]){overflow:hidden}
}
