:root { color-scheme: dark; --bg: #16161c; --panel: #23232d; --line: #3a3a48; --text: #e8e8ee; --accent: #7c5cff; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; color: inherit; background: #2f2f3c; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; }
button { cursor: pointer; }
button:hover { border-color: var(--accent); }
button.active { background: var(--accent); border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); }
button.danger:hover { border-color: #e74c3c; color: #e74c3c; }

/* landing page */
.landing { max-width: 30rem; margin: 12vh auto; padding: 0 1rem; text-align: center; }
.landing h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; margin: 1.5rem 0 .6rem; }
.room-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: 8px; }
.room-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; text-align: left; }
.room-list a:hover { border-color: var(--accent); }
.room-list span { opacity: .65; font-size: 13px; white-space: nowrap; }
.notice { color: #e67e22; }

/* room page */
#board { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; display: block; }
#board.dragging { cursor: grabbing; }
#board.selecting { cursor: default; }
#board.drawing, #board.measuring, #board.noting, #board.attaching { cursor: crosshair; }
#board.erasing { cursor: none; }
.panel { position: fixed; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 14px; }
#topbar { top: 10px; left: 10px; display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
#dock { left: 10px; right: 10px; bottom: 10px; padding: 0; overflow: hidden; display: flex; flex-direction: column; }

/* tab strip: a darker header with text-only, underlined tabs */
#tabs { display: flex; background: #17171d; border-bottom: 1px solid var(--line); padding: 0 8px; }
.tab { background: transparent; border: none; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 18px 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8f8fa6; }
.tab:hover { color: #fff; border-bottom-color: var(--line); }
.tab.active { color: #fff; background: transparent; border-bottom-color: var(--accent); }

/* tab content: a lighter body */
.pane { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; }
.pane label { display: flex; align-items: center; gap: 6px; }
.group { display: flex; align-items: center; gap: 8px; }
.divider { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
#dock.collapsed .pane { display: none; }
#dock.collapsed #tabs { border-bottom: none; }

/* tools panel: always visible, upper right */
#toolbox { top: 10px; right: 10px; width: 196px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 220px); overflow-y: auto; } /* max-height is adjusted from script to clear the chat */
.toolpicker { display: flex; flex-direction: column; gap: 6px; }
.tool { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.tool > span:first-child { display: flex; }

/* Draw / Erase split toggle: the lit half is the current mode, the other is greyed out */
.tool.split, .tool.split.active { padding: 0; gap: 0; overflow: hidden; background: #2f2f3c; border-color: var(--line); }
.tool.split.active { border-color: var(--accent); }
.half { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 4px; opacity: .4; filter: grayscale(1); }
.half + .half { border-left: 1px solid var(--line); }
.half.on { opacity: 1; filter: none; background: #3d3d50; }
.tool.split.active .half.on { background: var(--accent); }
#toolbox .group { flex-wrap: wrap; }
#toolbox select { flex: 1; min-width: 0; }
#toolbox input[type=number] { width: 4.5rem; }
.unit { opacity: .6; font-size: 12px; }
#drawStyle { flex-wrap: wrap; }
.shapes { display: flex; gap: 6px; flex-basis: 100%; }
.shapes button { flex: 1; display: flex; justify-content: center; padding: 6px 0; }
.shapes button.active { background: var(--accent); border-color: var(--accent); }
#toolbox input[type=color] { flex: none; padding: 0; width: 40px; height: 32px; }
@media (max-width: 700px) {
  #toolbox { width: auto; }
  .tool .label, #toolHint { display: none; }
}

#dock input[type=text] { width: 10rem; }
#dock input[type=number] { width: 5rem; }
#dock input[type=text]#unit { width: 4rem; }
#dock input[type=color] { padding: 0; width: 40px; height: 32px; }
#status { font-weight: bold; }
#ping { font-size: 12px; font-variant-numeric: tabular-nums; padding: 0 6px; border-radius: 999px; border: 1px solid currentColor; }
#ping.good { color: #2ecc71; }
#ping.fair { color: #f1c40f; }
#ping.poor { color: #ff6b5b; }
.ok { color: #2ecc71; } .bad { color: #e74c3c; }
.hint { opacity: .6; font-size: 12px; margin: 0; }
[hidden] { display: none !important; }

/* sticky note editor, positioned over the note being edited */
#noteEditor { position: fixed; z-index: 5; resize: none; border: 2px solid var(--accent); border-radius: 2px; color: #2b2b2b; font-family: system-ui, sans-serif; line-height: 1.25; outline: none; overflow: hidden; }
#noteToolbar { position: fixed; z-index: 6; display: flex; align-items: center; gap: 6px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
#noteToolbar span { min-width: 3.2em; text-align: center; }
#noteToolbar button { padding: 3px 9px; }
button:disabled { opacity: .4; cursor: default; }
button:disabled:hover { border-color: var(--line); }

/* saved maps manager inside the Map tab */
.tab-right { margin-left: auto; }
.maps-manager { flex-basis: 100%; display: grid; grid-template-columns: minmax(190px, 1fr) minmax(280px, 1.6fr); gap: 8px 14px; align-items: start; }
.maps-manager label { display: flex; flex-direction: column; align-items: stretch; gap: 4px; font-size: 12px; opacity: .9; }
.maps-manager select { width: 100%; }
.maps-actions { display: flex; flex-direction: column; gap: 8px; }
.maps-actions input { width: 100%; }
.maps-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.maps-buttons button { flex: 1; }
.hint.error { color: #e74c3c; opacity: 1; }
@media (max-width: 700px) { .maps-manager { grid-template-columns: 1fr; } }

/* player list in the top bar */
#players { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
#otherPlayers { display: contents; }
.player { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 6px; background: #17171d; border: 1px solid var(--line); border-radius: 999px; }
.player .dot { width: 10px; height: 10px; border-radius: 50%; background: #888; flex: none; }
.player .you { opacity: .6; font-size: 12px; }
.player input { background: transparent; border: none; border-bottom: 1px dashed transparent; border-radius: 0; padding: 0 2px; min-width: 4ch; font-size: 13px; }
.player input:hover, .player input:focus { border-bottom-color: var(--accent); outline: none; }

/* token image picker */
.image-pick { display: inline-flex; }
.image-pick button { display: inline-flex; align-items: center; gap: 8px; }
.image-pick button + button { margin-left: -1px; border-radius: 0 6px 6px 0; padding: 6px 9px; }
.image-pick button:first-child:not(:last-child) { border-radius: 6px 0 0 6px; }
#tokenImagePreview { width: 22px; height: 22px; object-fit: contain; background: #e9e9f0; border-radius: 4px; }
#iconPicker { z-index: 8; width: min(460px, calc(100vw - 20px)); max-height: min(60vh, 440px); display: flex; flex-direction: column; gap: 8px; }
#iconPicker[hidden] { display: none; }
.picker-head { display: flex; gap: 8px; }
.picker-head input { flex: 1; }
#iconGrid { overflow-y: auto; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
#iconGrid h4 { flex-basis: 100%; margin: 8px 0 0; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
#iconGrid h4:first-child { margin-top: 0; }
.icon-tile { width: 52px; height: 52px; padding: 4px; background: #e9e9f0; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.icon-tile img { max-width: 100%; max-height: 100%; }
.icon-tile.none { font-size: 12px; color: #2b2b2b; }
.icon-tile.selected { outline: 3px solid var(--accent); }

/* attach / detach, floating beside the selection's rotation knob */
#selectionActions { position: fixed; z-index: 6; display: flex; gap: 6px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; white-space: nowrap; }
#selectionActions button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; font-size: 12px; }
#selectionActions .icon { width: 14px; height: 14px; }
#selectionActions button.active { background: var(--accent); border-color: var(--accent); }

/* chat box, bottom right just above the tab dock (its height is set from script) */
#chat { right: 10px; width: var(--chat-w, min(300px, calc(100vw - 20px))); padding: 0; overflow: hidden; position: fixed; display: flex; flex-direction: column; z-index: 4; bottom: 120px; }
.chat-head { display: flex; align-items: center; gap: 8px; width: 100%; border: none; border-radius: 0; background: #17171d; padding: 7px 12px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: left; }
.chat-head .chev { margin-left: auto; transition: transform .15s; }
#chat.collapsed .chev { transform: rotate(180deg); }
#chatUnread { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; letter-spacing: 0; }
#chat.collapsed #chatBody { display: none; }
#chatLog { height: var(--chat-h, min(170px, 22vh)); overflow-y: auto; padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
#chatLog .empty { opacity: .5; font-size: 12px; }
#chatGrip { position: absolute; left: 0; top: 0; width: 18px; height: 18px; cursor: nwse-resize; z-index: 2; touch-action: none; background: linear-gradient(135deg, #8a8a99 0 2px, transparent 2px 5px, #8a8a99 5px 7px, transparent 7px); opacity: .7; }
#chatGrip:hover { opacity: 1; }
#chat.collapsed #chatGrip { display: none; }
.chat-notice { opacity: .75; font-style: italic; }
.chat-msg { overflow-wrap: anywhere; line-height: 1.35; }
.chat-msg .who { font-weight: 700; margin-right: 6px; }
#chatForm { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
#chatForm input { flex: 1; min-width: 0; }

/* initiative list, top left under the player bar (its top edge is set from script) */
#initiative { left: 10px; width: min(280px, calc(100vw - 20px)); padding: 0; overflow: hidden; z-index: 4; top: 100px; }
.init-head { display: flex; background: #17171d; }
#initToggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: none; border-radius: 0; background: transparent; padding: 7px 12px; font-size: 12px; text-align: left; }
.init-title { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
#initCurrent { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#initToggle .chev { margin-left: auto; transition: transform .15s; }
#initiative.collapsed #initToggle .chev { transform: rotate(180deg); }
#initNext { border: none; border-left: 1px solid var(--line); border-radius: 0; background: var(--accent); font-weight: 600; padding: 7px 14px; }
#initNext:disabled { background: #2f2f3c; }
#initiative.collapsed #initBody { display: none; }
#initEmpty { padding: 10px 12px 0; }
#initList { list-style: none; margin: 0; padding: 8px; max-height: min(300px, 40vh); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
/* one card per row: marker, number, name, remove */
#initList li { display: flex; align-items: center; gap: 4px; padding: 5px 8px; background: #1d1d25; border: 1px solid var(--line); border-radius: 8px; cursor: grab; touch-action: none; user-select: none; }
#initList li:hover { border-color: #55556b; }
#initList li.current { background: rgba(124, 92, 255, .28); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
#initList li.dragging { cursor: grabbing; position: relative; z-index: 5; box-shadow: 0 8px 22px rgba(0, 0, 0, .6); border-color: var(--accent); opacity: .96; }
.init-top { display: contents; }
.init-top .init-remove { order: 3; margin-left: auto; } /* pinned right, so the gap before it is bare card to grab */
#initList li input { min-width: 0; background: transparent; border-color: transparent; padding: 1px 4px; font-size: 13px; user-select: text; cursor: text; }
#initList li input:hover, #initList li input:focus { border-color: var(--line); background: #15151b; }
#initList li input.init-name { order: 2; flex: none; font-weight: 500; } /* its width follows the name; the empty part of the card is the drag area */
#initList li.current input.init-name { font-weight: 700; }
.init-btn { padding: 1px 6px; font-size: 12px; line-height: 1.4; background: transparent; border-color: transparent; }
.init-btn:hover:not(:disabled) { background: #2f2f3c; }
.init-mark { width: 22px; }
#initForm { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
#initForm input { flex: 1; min-width: 0; }
#initList li input.init-value, #initForm #initValue { flex: none; width: 3.4em; text-align: center; padding-left: 2px; padding-right: 2px; font-weight: 700; }
#initList li input.init-value { width: 2.8em; }
#initList li input.init-value { color: #c9c2ff; font-variant-numeric: tabular-nums; }
#initList li input.init-value::placeholder { opacity: .35; }
#initRoundBadge { font-size: 11px; font-weight: 700; background: #2f2f3c; border-radius: 999px; padding: 1px 7px; flex: none; }
#initRound { display: flex; align-items: center; gap: 8px; padding: 8px 10px 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
#initRoundInput { width: 5.2em; padding: 2px 6px; font-size: 14px; font-weight: 700; letter-spacing: 0; text-align: center; }

/* dropping images onto the page */
#dropHint { position: fixed; inset: 8px; z-index: 50; display: flex; align-items: center; justify-content: center; border: 3px dashed var(--accent); border-radius: 14px; background: rgba(124, 92, 255, .14); font-size: 20px; font-weight: 600; pointer-events: none; }
#dropHint[hidden] { display: none; }
#toast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 60; max-width: min(560px, calc(100vw - 24px)); padding: 9px 14px; background: #000; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; text-align: center; }
#toast.error { border-color: #e74c3c; color: #ff9d92; }

/* the Tokens tab says whether it is making a new token or editing the selected one */
.token-mode { display: inline-flex; align-items: center; gap: 6px; max-width: 16em; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: #17171d; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .8; }
.token-mode.editing { opacity: 1; border-color: var(--accent); background: rgba(124, 92, 255, .25); }
.token-mode.editing::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--accent); }
.tab.has-selection::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; vertical-align: middle; border-radius: 50%; background: var(--accent); }

/* dice tab */
#dicePresets { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.preset { border-radius: 999px; padding: 3px 12px; font-size: 13px; }
.preset.active { background: var(--accent); border-color: var(--accent); font-weight: 600; }
.preset.add { padding: 3px 10px; opacity: .8; }
.dice-editor { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#diceCount { width: 4em; text-align: center; }
.dice-mod { display: flex; align-items: center; gap: 4px; }
#diceMod { width: 4.6em; text-align: center; }
#diceResult { flex-basis: 100%; min-height: 54px; display: flex; align-items: center; }
.roll { display: flex; align-items: center; gap: 14px; animation: roll-pop .25s ease-out; }
@keyframes roll-pop { from { transform: scale(.85); opacity: .4; } to { transform: none; opacity: 1; } }
.roll-total { min-width: 2.2em; padding: 2px 12px; font-size: 34px; font-weight: 800; line-height: 1.15; text-align: center; background: #17171d; border: 2px solid var(--accent); border-radius: 10px; font-variant-numeric: tabular-nums; }
.roll-total.crit { border-color: #2ecc71; color: #2ecc71; }
.roll-total.fumble { border-color: #e74c3c; color: #e74c3c; }
.roll-expr { font-size: 12px; opacity: .75; }
.roll-dice { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 3px; }
.roll-set { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 6px; }
.roll-set.dropped { opacity: .4; text-decoration: line-through; }
.roll-set.kept { border-color: var(--accent); }
.die { min-width: 1.7em; padding: 0 5px; text-align: center; font-weight: 700; background: #2f2f3c; border-radius: 4px; font-variant-numeric: tabular-nums; }
.roll-note { margin-top: 3px; font-size: 12px; font-weight: 700; }
.chat-roll .who + span { color: #c9c2ff; }

/* dice tumbling across the screen: drawn on a canvas that never catches the mouse */
#diceCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 45; pointer-events: none; }
.dice-anim { display: flex; align-items: center; gap: 5px; font-size: 13px; }

/* preset chips: the name to pick it, and an x to delete it */
.preset-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 999px; background: #2f2f3c; overflow: hidden; }
.preset-chip.active { background: var(--accent); border-color: var(--accent); }
.preset-chip .preset { border: none; background: transparent; border-radius: 0; padding: 3px 6px 3px 12px; font-size: 13px; }
.preset-chip.active .preset { font-weight: 600; }
.preset-chip .preset-x { border: none; background: transparent; border-radius: 0; padding: 0 9px 0 4px; font-size: 15px; line-height: 1; opacity: .55; }
.preset-chip .preset-x:hover { opacity: 1; background: rgba(0, 0, 0, .25); color: #ff9d92; }
.preset-chip:not(:has(.preset-x)) .preset { padding-right: 12px; }
.chat-private .private-tag { margin-right: 6px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; opacity: .8; }

/* the die you can fling out of the Dice tab */
/* the Dice tab in three columns: presets and controls, the die you fling in the middle, and your latest result */
#pane-dice { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 18px; }
.dice-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.fling { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 22px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); align-self: stretch; }
#pane-dice #diceResult { flex-basis: auto; min-width: 0; justify-content: center; }
@media (max-width: 960px) {
  #pane-dice { grid-template-columns: minmax(0, 1fr); }
  .fling { padding: 10px 0; border-left: none; border-right: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  #pane-dice #diceResult { justify-content: flex-start; }
}
.fling-die { display: block; width: 92px; height: 92px; cursor: grab; touch-action: none; user-select: none; border-radius: 10px; }
.fling-die:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fling-die.held { opacity: .3; }
.fling-die svg, .fling-ghost svg { width: 100%; height: 100%; display: block; overflow: visible; }
.fling-hint { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .8; }
.fling-arrow { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) { .fling-arrow { animation: fling-nudge 1.4s ease-in-out infinite; } }
@keyframes fling-nudge { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-4px); } }
.fling-ghost { position: fixed; left: 0; top: 0; width: 104px; height: 104px; z-index: 70; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)); transition: filter .12s; }
.fling-ghost.armed { filter: drop-shadow(0 0 12px var(--accent)) drop-shadow(0 6px 10px rgba(0, 0, 0, .55)); }
.fling-ghost.thrown { transition: opacity .18s, scale .18s; opacity: 0; scale: .5; }
.fling-hint.armed { color: #c9c2ff; opacity: 1; }

/* rolling a preset several times */
.dice-times { display: flex; align-items: center; gap: 4px; font-weight: 700; }
#diceTimes { width: 3.6em; text-align: center; }
.roll-batch { display: flex; flex-direction: column; gap: 6px; animation: roll-pop .25s ease-out; }
.roll-batch-head { font-size: 12px; opacity: .8; }
.roll-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.roll-cell { min-width: 3.2em; padding: 3px 8px; text-align: center; background: #17171d; border: 1px solid var(--line); border-radius: 8px; }
.roll-cell.waiting { opacity: .35; }
.roll-cell.crit { border-color: #2ecc71; color: #2ecc71; }
.roll-cell.fumble { border-color: #e74c3c; color: #e74c3c; }
.roll-cell b { display: block; font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.roll-cell span { display: block; font-size: 10px; opacity: .7; }

/* natural 20 and natural 1 in the chat */
.chat-crit { background: rgba(255, 214, 51, 0.13); box-shadow: inset 3px 0 0 #ffd633; border-radius: 4px; padding: 2px 6px; }
.chat-fumble { background: rgba(255, 90, 80, 0.13); box-shadow: inset 3px 0 0 #ff5a50; border-radius: 4px; padding: 2px 6px; }
.chat-crit .who + span { color: #ffe27a; font-weight: 700; }
.chat-fumble .who + span { color: #ff9b94; font-weight: 700; }
.nat-tag { margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.chat-crit .nat-tag { background: #ffd633; color: #3a2d00; }
.chat-fumble .nat-tag { background: #ff5a50; color: #3a0a07; }

/* the numbers of a roll in the chat: dice lined up in a monospace column, total on the right */
.roll-row { display: grid; grid-template-columns: minmax(0, 1fr) 6ch; gap: 8px; margin-top: 2px; font-family: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace; font-size: 12px; white-space: pre; }
.roll-faces { display: flex; flex-wrap: wrap; gap: 0 8px; min-width: 0; }
.roll-faces .set.dropped { opacity: .4; text-decoration: line-through; }
.roll-faces .set.mod { opacity: .8; }
.roll-sum { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

/* the hotkey letter shown on a tool button */
.hotkey { margin-left: auto; padding: 0 5px; font: 700 10px/1.5 ui-monospace, monospace; border: 1px solid var(--line); border-radius: 4px; opacity: .6; }
.tool.active .hotkey { opacity: .9; border-color: rgba(255,255,255,.5); }
.half .hotkey { margin-left: 2px; }
