Files
the-sunken-reach/frontend/src/index.css
T
joshuaandClaude Opus 5.5 4bd301182b V1.32.0: battles that keep to the fight
- The scene description shows during a battle only between rounds (while
  the first in the order is on turn), and always before and after it
- Combatant details start closed in a battle: the spotlight has whoever is
  on turn, or on a narrow screen their own card opens
- While a battle is under way, Add to the scene, Experience and Rewards
  fold to their titles
- Button labels wrap inside their buttons instead of spilling out
- Sticky turn order and side column follow the measured top bar height
- Phone: quick stats no longer sits on Log out, incoming rolls clear the
  bottom bar, the damage bar no longer scrolls on its own
- Docs updated; all packages at version 1.32.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 08:19:48 +02:00

3004 lines
65 KiB
CSS

:root {
/* Dark throughout, so the browser draws its own controls dark too. */
color-scheme: dark;
--bg: #131009;
--bg-elevated: #1b160e;
--bg-card: #221b12;
--bg-card-hover: #2a2116;
--bg-inset: #0e0b07;
--border: #4a3a24;
--border-soft: #362a1a;
--text: #ece1c8;
--text-muted: #b2a284;
--text-dim: #7c7159;
--accent: #c9a227;
--accent-strong: #e6c34a;
--accent-soft: rgba(201, 162, 39, 0.15);
--danger: #b23a3a;
--danger-strong: #d85454;
--danger-soft: rgba(178, 58, 58, 0.18);
--success: #5f8a4f;
--success-strong: #7ab266;
--arcane: #5c7fb0;
--arcane-strong: #7fa3d6;
--shadow-deep: 0 10px 30px rgba(0, 0, 0, 0.55);
--radius: 8px;
--font-display: 'Cinzel', Georgia, serif;
--font-body: 'Crimson Pro', Georgia, 'Times New Roman', serif;
/* The top bar's height, measured by Layout.tsx; this is only until then. */
--topbar-h: 3.6rem;
}
@media (prefers-color-scheme: light) {
:root {
/* This app is intentionally dark-themed only (D&D tavern-at-night aesthetic). */
}
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
}
body {
background: radial-gradient(ellipse at top, #1a1510 0%, var(--bg) 55%, #0d0a06 100%);
color: var(--text);
font-family: var(--font-body);
font-size: 16px;
line-height: 1.5;
min-height: 100vh;
}
#root {
min-height: 100vh;
}
h1,
h2,
h3,
h4 {
font-family: var(--font-display);
font-weight: 600;
letter-spacing: 0.02em;
color: var(--accent-strong);
margin: 0 0 0.5em 0;
}
a {
color: var(--arcane-strong);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
p {
margin: 0 0 0.75em 0;
}
button,
input,
select,
textarea {
font-family: var(--font-body);
font-size: 1rem;
}
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
background: var(--bg-inset);
}
::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 5px;
}
/* ---------------------------------------------------------------------- */
/* Layout primitives */
/* ---------------------------------------------------------------------- */
.app-shell {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem 1.25rem;
background: linear-gradient(180deg, #1e1810 0%, #171209 100%);
border-bottom: 1px solid var(--border);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
position: sticky;
top: 0;
z-index: 30;
}
.topbar-brand {
display: flex;
align-items: center;
gap: 0.6rem;
font-family: var(--font-display);
color: var(--accent-strong);
font-size: 1.15rem;
white-space: nowrap;
}
.topbar-brand .die {
font-size: 1.4rem;
filter: drop-shadow(0 0 6px rgba(201, 162, 39, 0.5));
}
.topbar-nav {
display: flex;
align-items: center;
gap: 0.75rem;
flex-wrap: wrap;
}
.topbar-user {
display: flex;
align-items: center;
gap: 0.6rem;
color: var(--text-muted);
font-size: 0.9rem;
}
.page {
flex: 1;
width: 100%;
max-width: 1080px;
margin: 0 auto;
padding: 1.5rem 1.25rem 4rem;
}
.page-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
margin-bottom: 1.5rem;
}
.page-header h1 {
margin-bottom: 0.15em;
}
.subtitle {
color: var(--text-muted);
font-size: 0.95rem;
}
/* ---------------------------------------------------------------------- */
/* Cards & ornamentation */
/* ---------------------------------------------------------------------- */
.card {
background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.25rem;
box-shadow: var(--shadow-deep);
position: relative;
}
.card::before,
.card::after {
content: '';
position: absolute;
width: 10px;
height: 10px;
border: 2px solid var(--accent);
opacity: 0.55;
}
.card::before {
top: -1px;
left: -1px;
border-right: none;
border-bottom: none;
}
.card::after {
bottom: -1px;
right: -1px;
border-left: none;
border-top: none;
}
.card + .card {
margin-top: 1rem;
}
.card-title {
font-family: var(--font-display);
color: var(--accent);
font-size: 1rem;
text-transform: uppercase;
letter-spacing: 0.08em;
margin-bottom: 0.75rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
}
.grid {
display: grid;
gap: 1rem;
}
.grid-cols-2 {
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.grid-cols-3 {
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
/* ---------------------------------------------------------------------- */
/* Buttons */
/* ---------------------------------------------------------------------- */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.4rem;
font-family: var(--font-display);
font-size: 0.85rem;
letter-spacing: 0.04em;
text-transform: uppercase;
padding: 0.6rem 1.1rem;
border-radius: 6px;
border: 1px solid var(--border);
background: var(--bg-elevated);
color: var(--text);
cursor: pointer;
transition: all 0.15s ease;
/* A label longer than the room there is wraps inside the button rather
than running out of it (or under the button beside it). */
max-width: 100%;
line-height: 1.25;
text-align: center;
overflow-wrap: break-word;
}
.btn:hover:not(:disabled) {
border-color: var(--accent);
color: var(--accent-strong);
transform: translateY(-1px);
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn-primary {
background: linear-gradient(160deg, var(--accent) 0%, #a8811c 100%);
border-color: var(--accent-strong);
color: #1a1410;
font-weight: 700;
}
.btn-primary:hover:not(:disabled) {
color: #1a1410;
box-shadow: 0 0 16px rgba(201, 162, 39, 0.45);
}
.btn-danger {
background: linear-gradient(160deg, var(--danger) 0%, #7a2626 100%);
border-color: var(--danger-strong);
color: #fbeaea;
}
.btn-ghost {
background: transparent;
border-color: transparent;
color: var(--text-muted);
}
.btn-ghost:hover:not(:disabled) {
border-color: var(--border);
}
.btn-block {
width: 100%;
}
.btn-lg {
padding: 0.9rem 1.5rem;
font-size: 1rem;
}
.btn-sm {
padding: 0.2rem 0.6rem;
font-size: 0.85rem;
min-width: 2rem;
}
/* Big dice-roll button for the character builder */
.btn-roll {
font-family: var(--font-display);
font-size: 1.3rem;
padding: 1.3rem 2rem;
border-radius: 12px;
background: radial-gradient(circle at 30% 20%, #3a2e18, #1c160c 70%);
border: 2px solid var(--accent);
color: var(--accent-strong);
box-shadow: 0 0 24px rgba(201, 162, 39, 0.25), inset 0 0 20px rgba(0, 0, 0, 0.5);
cursor: pointer;
transition: all 0.2s ease;
}
.btn-roll:hover:not(:disabled) {
box-shadow: 0 0 32px rgba(201, 162, 39, 0.45), inset 0 0 20px rgba(0, 0, 0, 0.5);
transform: translateY(-2px);
}
.btn-roll:disabled {
opacity: 0.6;
cursor: wait;
}
/* ---------------------------------------------------------------------- */
/* Forms */
/* ---------------------------------------------------------------------- */
.field {
display: flex;
flex-direction: column;
gap: 0.35rem;
margin-bottom: 1rem;
}
.field label {
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text-muted);
}
/* Every text-like field, including an <input> with no type given. */
input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']),
select,
textarea {
background: var(--bg-inset);
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.6rem 0.75rem;
color: var(--text);
}
input:focus,
select:focus,
textarea:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-soft);
}
select {
background: var(--bg-inset);
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.6rem 0.75rem;
color: var(--text);
}
select option {
background: var(--bg-inset);
color: var(--text);
}
/* Native checkboxes/radios otherwise render as unstyled white boxes in most
browsers, breaking the dark theme — this keeps them small and on-brand
without a full custom-control rebuild. */
input[type='checkbox'],
input[type='radio'] {
accent-color: var(--accent);
width: 16px;
height: 16px;
cursor: pointer;
}
.checkbox-row {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.9rem;
}
/* Toasts: notices that slide in over any page (components/Toasts.tsx). */
.toasts {
position: fixed;
top: 4.2rem;
right: 1rem;
z-index: 1200;
display: flex;
flex-direction: column;
gap: 0.5rem;
max-width: min(26rem, calc(100vw - 2rem));
}
.toast {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.6rem 0.8rem;
background: var(--bg-card);
border: 1px solid var(--accent);
border-radius: var(--radius);
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
animation: toastIn 0.25s ease-out;
}
.toast-good {
border-color: var(--accent-strong);
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45), 0 0 14px rgba(201, 162, 39, 0.3);
}
.toast-text {
flex: 1;
font-size: 0.92rem;
}
@keyframes toastIn {
from {
opacity: 0;
transform: translateX(1.5rem);
}
to {
opacity: 1;
transform: none;
}
}
@media (prefers-reduced-motion: reduce) {
.toast {
animation: none;
}
}
/* A notice across the top of a card or page that something is waiting. */
.notice-banner {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.6rem;
padding: 0.6rem 0.9rem;
margin-bottom: 0.9rem;
border: 1px solid var(--accent-strong);
border-radius: var(--radius);
background: linear-gradient(160deg, var(--bg-card-hover) 0%, var(--bg-inset) 100%);
}
/* A group of campaign settings under its own heading. */
.settings-group {
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.6rem 0.9rem 0.9rem;
margin: 0 0 0.9rem;
}
.settings-group legend {
padding: 0 0.4rem;
font-weight: 600;
color: var(--accent-strong);
}
/* ---------------------------------------------------------------------- */
/* Badges / stat blocks */
/* ---------------------------------------------------------------------- */
.badge {
display: inline-flex;
align-items: center;
gap: 0.3rem;
padding: 0.2rem 0.55rem;
border-radius: 999px;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.04em;
border: 1px solid var(--border);
color: var(--text-muted);
}
.badge-dm {
border-color: var(--accent);
color: var(--accent-strong);
}
.badge-player {
border-color: var(--arcane);
color: var(--arcane-strong);
}
.stat-block {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.15rem;
background: var(--bg-inset);
border: 1px solid var(--border-soft);
border-radius: 8px;
padding: 0.6rem 0.4rem;
min-width: 64px;
}
.stat-block .stat-label {
font-size: 0.65rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-dim);
}
.stat-block .stat-value {
font-family: var(--font-display);
font-size: 1.4rem;
color: var(--accent-strong);
}
.stat-block .stat-sub {
font-size: 0.75rem;
color: var(--text-muted);
}
.hp-bar-track {
display: flex;
width: 100%;
height: 10px;
background: var(--bg-inset);
border: 1px solid var(--border-soft);
border-radius: 999px;
overflow: hidden;
}
.hp-bar-fill {
height: 100%;
background: var(--success-strong);
transition: width 0.3s ease, background-color 0.3s ease;
}
/* Color reflects the actual HP percentage instead of a fixed gradient, so a
combat tracker reads "healthy / bloodied / critical" at a glance. */
.hp-bar-fill.hp-bloodied {
background: var(--accent-strong);
}
.hp-bar-fill.hp-critical {
background: var(--danger-strong);
}
/* Temporary HP: a separate segment after the real HP. */
.hp-bar-fill.hp-temp {
background: var(--arcane-strong);
}
.divider {
border: none;
border-top: 1px solid var(--border-soft);
margin: 1rem 0;
}
.error-text {
color: var(--danger-strong);
font-size: 0.9rem;
}
.empty-state {
text-align: center;
padding: 2.5rem 1rem;
color: var(--text-muted);
}
.spinner {
display: inline-block;
width: 1.4rem;
height: 1.4rem;
border: 3px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.roll-result {
font-family: var(--font-display);
font-size: 3rem;
color: var(--accent-strong);
text-shadow: 0 0 20px rgba(201, 162, 39, 0.5);
}
@keyframes rollPop {
0% {
transform: scale(0.4) rotate(-15deg);
opacity: 0;
}
60% {
transform: scale(1.1) rotate(5deg);
opacity: 1;
}
100% {
transform: scale(1) rotate(0deg);
}
}
.roll-result.animate {
animation: rollPop 0.4s ease-out;
}
/* ---------------------------------------------------------------------- */
/* Dice (components/dice/Die.tsx): each die drawn as its own shape. It */
/* tumbles in, flickering through faces, and lands on what it rolled. */
/* ---------------------------------------------------------------------- */
.dice-row {
display: inline-flex;
flex-wrap: wrap;
gap: 0.35rem;
align-items: flex-end;
justify-content: center;
}
.die {
position: relative;
display: inline-flex;
flex-direction: column;
align-items: center;
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.55));
}
.die-body {
fill: #2b2212;
stroke: var(--accent);
stroke-width: 4;
}
.die-facet {
stroke: var(--accent);
stroke-width: 1.5;
opacity: 0.35;
}
.die-face {
font-family: var(--font-display);
font-weight: 700;
fill: var(--accent-strong);
paint-order: stroke;
stroke: #1a140a;
stroke-width: 5;
}
.die-kind {
font-size: 0.6rem;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--text-dim);
line-height: 1;
}
/* Each kind of die has its own tint, as a set of real dice might. */
.die-d4 .die-body { fill: #2a1d1d; }
.die-d6 .die-body { fill: #2b2212; }
.die-d8 .die-body { fill: #1c2a22; }
.die-d10 .die-body { fill: #1b2431; }
.die-d12 .die-body { fill: #2a1f31; }
.die-d20 .die-body { fill: #33260f; }
.die.is-rolling {
animation-name: dieTumble;
animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1);
animation-fill-mode: both;
}
.die.is-rolling .die-face {
opacity: 0.75;
}
.die.is-landed {
animation: dieLand 0.28s ease-out;
}
.die.is-dropped {
opacity: 0.4;
}
.die.is-dropped .die-face {
text-decoration: line-through;
}
.die.is-minus .die-body {
stroke: var(--danger-strong);
}
.die.is-crit .die-body {
stroke: var(--success-strong);
fill: #20331a;
}
.die.is-crit {
filter: drop-shadow(0 0 10px rgba(122, 178, 102, 0.9));
animation: dieLand 0.28s ease-out, dieGlow 1.2s ease-in-out 0.28s 2;
}
.die.is-crit .die-face {
fill: #c9f0b8;
}
.die.is-fumble .die-body {
stroke: var(--danger-strong);
fill: #331616;
}
.die.is-fumble {
filter: drop-shadow(0 0 8px rgba(216, 84, 84, 0.8));
animation: dieShake 0.45s ease-in-out;
}
.die.is-fumble .die-face {
fill: #f1b0b0;
}
@keyframes dieTumble {
0% {
transform: translate(-70px, -90px) rotate(-540deg) scale(0.5);
opacity: 0;
}
25% {
opacity: 1;
}
55% {
transform: translate(10px, 6px) rotate(-90deg) scale(1.08);
}
75% {
transform: translate(-4px, -10px) rotate(20deg) scale(1);
}
100% {
transform: translate(0, 0) rotate(0deg) scale(1);
}
}
@keyframes dieLand {
0% {
transform: scale(1.18);
}
100% {
transform: scale(1);
}
}
@keyframes dieGlow {
50% {
filter: drop-shadow(0 0 18px rgba(122, 178, 102, 1));
}
}
@keyframes dieShake {
20% {
transform: translateX(-4px) rotate(-6deg);
}
40% {
transform: translateX(4px) rotate(5deg);
}
60% {
transform: translateX(-3px) rotate(-3deg);
}
80% {
transform: translateX(2px) rotate(2deg);
}
}
/* The total, and what goes with it, appear once the dice have landed. */
.roll-reveal {
animation: rollReveal 0.35s ease-out both;
}
@keyframes rollReveal {
from {
opacity: 0;
transform: scale(0.6);
}
to {
opacity: 1;
transform: scale(1);
}
}
.dice-stage {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.3rem;
width: 100%;
}
.dice-tabs {
display: flex;
gap: 0.4rem;
}
.dice-tabs .die-btn {
padding: 0.4rem 0.8rem;
}
.dice-entry {
padding: 0.6rem;
border: 1px dashed var(--accent);
border-radius: var(--radius);
background: var(--bg-inset);
}
.dice-entry-die {
display: flex;
flex-direction: column;
gap: 0.15rem;
}
.dice-error {
color: var(--danger-strong);
font-size: 0.9rem;
margin: 0.5rem 0 0;
}
/* A roll as a line of the table's feed (components/RollFeed.tsx). */
.roll-feed {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.roll-line {
padding: 0.45rem 0.6rem;
border: 1px solid var(--border-soft);
border-left: 3px solid var(--accent);
border-radius: 6px;
background: var(--bg-inset);
text-align: left;
}
.roll-line.is-crit {
border-left-color: var(--success-strong);
}
.roll-line.is-fumble {
border-left-color: var(--danger-strong);
}
.roll-line-head {
display: flex;
justify-content: space-between;
gap: 0.5rem;
font-size: 0.88rem;
}
.roll-line-body {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.4rem;
margin: 0.25rem 0;
}
.roll-line-body .dice-row {
justify-content: flex-start;
}
.roll-line-total {
font-size: 1.5rem;
color: var(--accent-strong);
}
.roll-line-tags {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.3rem;
font-size: 0.75rem;
}
.roll-line-tags .badge {
font-size: 0.68rem;
}
/* Somebody else's roll, shown beside the dice button as it lands. */
.dice-incoming {
position: fixed;
bottom: 1.25rem;
left: calc(1.25rem + 60px + 0.6rem);
z-index: 84;
width: min(300px, calc(100vw - 6.5rem));
padding: 0;
border: none;
background: none;
color: var(--text);
font-family: var(--font-body);
cursor: pointer;
animation: toastIn 0.25s ease-out;
}
.dice-incoming .roll-line {
border-color: var(--accent);
background: linear-gradient(180deg, #1c160d 0%, #120e08 100%);
box-shadow: var(--shadow-deep);
}
@media (prefers-reduced-motion: reduce) {
.die.is-rolling,
.die.is-landed,
.die.is-crit,
.die.is-fumble,
.roll-reveal,
.dice-incoming {
animation: none;
}
}
/* ---------------------------------------------------------------------- */
/* The battle: the turn-order track, the DM's cue, and attacks being */
/* resolved (components/encounter/*.tsx). */
/* ---------------------------------------------------------------------- */
/* Who acts when, as one line of names: this round, a flag, the next round. */
.initiative-track {
position: sticky;
top: var(--topbar-h);
z-index: 25;
display: flex;
align-items: center;
gap: 0.35rem;
overflow-x: auto;
margin: 0 -0.25rem 0.75rem;
padding: 0.5rem 0.25rem;
background: var(--bg);
border-bottom: 1px solid var(--border-soft);
scrollbar-width: thin;
}
.track-round,
.track-flag {
flex: 0 0 auto;
font-family: var(--font-display);
font-size: 0.72rem;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--text-dim);
white-space: nowrap;
}
.track-flag {
padding: 0.2rem 0.6rem;
margin: 0 0.25rem;
border-left: 2px dashed var(--accent);
border-right: 2px dashed var(--accent);
color: var(--accent-strong);
}
.track-chip {
flex: 0 0 auto;
padding: 0.3rem 0.7rem;
border-radius: 999px;
border: 1px solid transparent;
border-left-width: 5px;
background: var(--bg-inset);
color: var(--text);
font-family: var(--font-body);
font-size: 0.9rem;
white-space: nowrap;
cursor: pointer;
transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.track-chip:hover {
transform: translateY(-1px);
}
/* What they are, by colour: a player character, an NPC, a monster. */
.track-pc {
border-color: var(--arcane-strong);
background: rgba(92, 127, 176, 0.16);
}
.track-npc {
border-color: var(--success-strong);
background: rgba(95, 138, 79, 0.16);
}
.track-monster {
border-color: var(--danger-strong);
background: rgba(178, 58, 58, 0.16);
}
.track-chip.is-active {
font-family: var(--font-display);
font-size: 1.05rem;
font-weight: 700;
padding: 0.4rem 0.9rem;
box-shadow: 0 0 0 2px var(--accent-strong), 0 0 14px rgba(201, 162, 39, 0.35);
}
.track-chip.is-targeted {
box-shadow: 0 0 0 2px var(--danger-strong);
}
.track-chip.is-upcoming {
opacity: 0.6;
}
.track-chip.is-dying {
text-decoration: line-through;
text-decoration-color: var(--danger-strong);
}
.track-legend {
flex: 0 0 auto;
display: flex;
align-items: center;
gap: 0.3rem;
margin-left: 0.75rem;
font-size: 0.72rem;
color: var(--text-dim);
white-space: nowrap;
}
.track-dot {
display: inline-block;
width: 0.7rem;
height: 0.7rem;
border-radius: 50%;
border: 2px solid;
margin-left: 0.4rem;
}
/* Free roam: a card per place the party can go to. */
.place-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 0.9rem;
margin-top: 0.9rem;
align-items: start;
}
.place-card {
margin: 0;
}
.place-card.is-here {
border-color: var(--accent-strong);
box-shadow: 0 0 14px rgba(201, 162, 39, 0.2);
}
/* What the scene is waiting on, in a sentence. */
.cue-card {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 0.6rem;
padding: 0.55rem 0.9rem;
border-left: 4px solid var(--accent);
}
.cue-card.is-urgent {
border-color: var(--accent-strong);
box-shadow: 0 0 14px rgba(201, 162, 39, 0.2);
}
.cue-label {
font-family: var(--font-display);
font-size: 0.72rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent-strong);
}
.cue-keys {
margin-left: auto;
font-size: 0.75rem;
}
/* An attack or a spell being resolved. */
.action-card {
border-color: var(--accent);
border-left-width: 4px;
}
.action-card.is-auto {
border-color: var(--danger-strong);
}
.action-card.is-ready {
box-shadow: 0 0 14px rgba(122, 178, 102, 0.25);
}
.action-title {
font-family: var(--font-display);
font-size: 1.05rem;
}
.action-target {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.6rem;
margin-top: 0.5rem;
padding-top: 0.5rem;
border-top: 1px solid var(--border-soft);
}
.action-target-name {
font-family: var(--font-display);
min-width: 7rem;
}
.action-roll {
display: inline-flex;
align-items: center;
gap: 0.4rem;
}
.action-outcome {
font-family: var(--font-display);
font-size: 0.85rem;
font-weight: 700;
letter-spacing: 0.05em;
padding: 0.15rem 0.6rem;
border-radius: 999px;
border: 1px solid var(--border);
}
.action-outcome.is-hit {
color: var(--danger-strong);
border-color: var(--danger-strong);
background: var(--danger-soft);
}
.action-outcome.is-crit {
color: #1a140a;
border-color: var(--accent-strong);
background: var(--accent-strong);
}
.action-outcome.is-miss,
.action-outcome.is-saved {
color: var(--text-muted);
background: var(--bg-inset);
}
.action-outcome.is-waiting {
color: var(--text-dim);
border-style: dashed;
font-weight: 400;
}
.action-damage {
font-family: var(--font-display);
font-weight: 700;
color: var(--danger-strong);
}
.action-overrule {
display: inline-flex;
align-items: center;
gap: 0.25rem;
margin-left: auto;
}
.action-overrule .btn.is-on,
.action-option.is-on {
border-color: var(--accent-strong);
color: var(--accent-strong);
background: var(--accent-soft);
}
.action-damage-roll {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
margin-top: 0.5rem;
}
.action-damage-roll strong {
font-size: 1.3rem;
color: var(--accent-strong);
}
.action-options {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
gap: 0.4rem;
margin-top: 0.5rem;
}
.action-option {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.1rem;
text-align: left;
padding: 0.4rem 0.6rem;
}
.action-option-name {
font-family: var(--font-display);
}
/* The equipped weapon stands out among what can be attacked with. */
.action-option.is-equipped {
border-color: var(--accent-strong);
box-shadow: inset 3px 0 0 var(--accent-strong);
}
/* What whoever is on turn (and anyone targeted) is fighting with. */
.in-hand {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.4rem;
margin-top: 0.5rem;
padding: 0.35rem 0.6rem;
border: 1px solid var(--accent-strong);
border-radius: 6px;
background: var(--accent-soft);
}
.in-hand-label {
font-size: 0.68rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent-strong);
}
.in-hand-weapon {
font-family: var(--font-display);
font-size: 0.92rem;
}
.in-hand-weapon .mono {
font-size: 0.8rem;
color: var(--text-muted);
}
/* Quick stats drawer */
.drawer-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 90;
backdrop-filter: blur(2px);
}
.drawer {
position: fixed;
top: 0;
right: 0;
bottom: 0;
width: min(420px, 100vw);
background: linear-gradient(180deg, #1c160d 0%, #120e08 100%);
border-left: 1px solid var(--border);
box-shadow: -12px 0 40px rgba(0, 0, 0, 0.6);
z-index: 91;
overflow-y: auto;
padding: 1.25rem;
}
.fab-quickstats {
position: fixed;
bottom: 1.25rem;
right: 1.25rem;
z-index: 80;
border-radius: 999px;
width: 60px;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
background: radial-gradient(circle at 35% 30%, #3a2e18, #1c160c 70%);
border: 2px solid var(--accent);
color: var(--accent-strong);
font-size: 1.6rem;
cursor: pointer;
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(201, 162, 39, 0.3);
}
.mono {
font-family: 'Courier New', monospace;
}
.text-center {
text-align: center;
}
.flex-row {
display: flex;
align-items: center;
gap: 0.5rem;
}
.flex-between {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
}
.flex-wrap {
flex-wrap: wrap;
}
.gap-sm {
gap: 0.4rem;
}
.mt-sm {
margin-top: 0.5rem;
}
.mt-md {
margin-top: 1rem;
}
.mt-lg {
margin-top: 2rem;
}
/* ---------------------------------------------------------------------- */
/* Info tooltips */
/* ---------------------------------------------------------------------- */
.info-tip {
position: relative;
display: inline-flex;
margin-left: 0.3rem;
}
.info-tip-trigger {
background: transparent;
border: none;
color: var(--text-dim);
cursor: help;
font-size: 0.85em;
padding: 0;
line-height: 1;
}
.info-tip-trigger:hover,
.info-tip-trigger:focus {
color: var(--accent-strong);
outline: none;
}
/* Placed by InfoTip.tsx against the viewport, so no scrolling container can clip it. */
.info-tip-bubble {
position: fixed;
transform: translateX(-50%);
width: max-content;
max-width: 260px;
background: var(--bg-inset);
border: 1px solid var(--accent);
border-radius: 6px;
padding: 0.6rem 0.75rem;
font-size: 0.8rem;
font-family: var(--font-body);
text-transform: none;
letter-spacing: normal;
color: var(--text);
box-shadow: var(--shadow-deep);
z-index: 200;
pointer-events: none;
}
/* ---------------------------------------------------------------------- */
/* Tables + pagination */
/* ---------------------------------------------------------------------- */
.table-wrap {
overflow-x: auto;
border: 1px solid var(--border-soft);
border-radius: var(--radius);
}
table.data-table {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
}
table.data-table th,
table.data-table td {
padding: 0.55rem 0.75rem;
text-align: left;
white-space: nowrap;
}
table.data-table thead th {
background: var(--bg-inset);
color: var(--text-muted);
font-family: var(--font-display);
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.06em;
border-bottom: 1px solid var(--border);
}
table.data-table tbody tr {
border-bottom: 1px solid var(--border-soft);
}
table.data-table tbody tr:last-child {
border-bottom: none;
}
table.data-table tbody tr:hover {
background: var(--bg-card-hover);
}
.pagination {
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
padding: 0.75rem 0;
}
.pagination-status {
color: var(--text-muted);
font-size: 0.85rem;
}
/* ---------------------------------------------------------------------- */
/* Character builder live stats preview */
/* ---------------------------------------------------------------------- */
.build-layout {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
}
@media (min-width: 900px) {
.build-layout {
grid-template-columns: 1fr 320px;
align-items: start;
}
.build-preview {
position: sticky;
top: 80px;
}
}
.preview-highlight {
color: var(--accent-strong);
font-weight: 700;
}
@media (max-width: 640px) {
.page {
padding: 1rem 0.85rem 5rem;
}
.topbar {
padding: 0.6rem 0.85rem;
}
.roll-result {
font-size: 2.2rem;
}
}
/* ---------------------------------------------------------------------- */
/* Encounter screen */
/* ---------------------------------------------------------------------- */
.badge-friendly {
border-color: var(--success);
color: var(--success-strong);
}
.badge-neutral {
border-color: var(--border);
color: var(--text-muted);
}
.badge-hostile {
border-color: var(--danger);
color: var(--danger-strong);
}
.badge-live {
border-color: var(--success);
color: var(--success-strong);
}
.encounter-layout {
display: grid;
grid-template-columns: 1fr;
gap: 1.25rem;
align-items: start;
}
@media (min-width: 960px) {
.encounter-layout {
grid-template-columns: minmax(0, 1fr) 330px;
}
}
.section-label {
font-family: var(--font-display);
color: var(--text-muted);
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.1em;
margin: 0 0 0.5rem;
}
.card + .section-label,
.empty-state + .section-label {
margin-top: 1.5rem;
}
/* One combatant. The left edge is colour-coded by who it is. */
.combatant {
border-left: 4px solid var(--border);
padding: 1rem 1.1rem;
}
.combatant-character {
border-left-color: var(--arcane);
}
.combatant-monster {
border-left-color: var(--danger);
}
.combatant-npc {
border-left-color: var(--success);
}
.combatant.is-active {
border-color: var(--accent-strong);
box-shadow: 0 0 0 1px var(--accent-strong), 0 0 22px rgba(201, 162, 39, 0.25), var(--shadow-deep);
}
.combatant.is-down {
opacity: 0.6;
}
/* The marked target stands out even when it is down or not on turn. */
.combatant.is-targeted {
opacity: 1;
border-color: var(--danger-strong);
box-shadow: 0 0 0 1px var(--danger-strong), 0 0 22px rgba(216, 84, 84, 0.3), var(--shadow-deep);
}
.target-marker {
color: var(--danger-strong);
font-family: var(--font-display);
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.btn-target {
padding: 0.15rem 0.6rem;
font-size: 0.8rem;
}
.btn-target.is-on {
border-color: var(--danger-strong);
color: var(--danger-strong);
background: var(--danger-soft);
}
/* What players see of the dead: names, and a way to try to bring them back. */
.fallen-bar {
border-color: var(--danger);
}
/* The DM's quick damage bar. (Attacks being resolved sit above it, so it no
longer follows the scroll.) */
.attack-bar {
border-color: var(--danger-strong);
}
.attack-target {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
margin-top: 0.5rem;
}
.attack-target-name {
font-family: var(--font-display);
}
.attack-bar-title {
font-family: var(--font-display);
font-size: 1.1rem;
color: var(--text);
}
.combatant-name {
font-family: var(--font-display);
font-size: 1.1rem;
color: var(--text);
}
.combatant-sub {
color: var(--text-muted);
font-size: 0.85rem;
}
.turn-marker {
color: var(--accent-strong);
font-family: var(--font-display);
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.stat-chips {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
}
.stat-chip {
display: inline-flex;
align-items: baseline;
gap: 0.35rem;
background: var(--bg-inset);
border: 1px solid var(--border-soft);
border-radius: 6px;
padding: 0.2rem 0.55rem;
font-size: 0.9rem;
}
.stat-chip span {
font-size: 0.65rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-dim);
}
.stat-chip b {
color: var(--accent-strong);
font-weight: 600;
}
.condition-chip {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.15rem 0.5rem;
border-radius: 999px;
font-size: 0.8rem;
border: 1px solid var(--danger);
color: var(--danger-strong);
background: var(--danger-soft);
}
.condition-chip button {
background: none;
border: none;
color: inherit;
cursor: pointer;
padding: 0 0.1rem;
font-size: 0.85rem;
line-height: 1;
}
/* At 0 HP: the death-save tallies and what can be done about them. */
.death-saves {
margin-top: 0.6rem;
padding: 0.6rem 0.75rem;
border: 1px solid var(--danger);
border-radius: 6px;
background: var(--danger-soft);
}
.death-saves.is-stable {
border-color: var(--border);
background: var(--bg-inset);
}
.death-tally {
display: inline-flex;
align-items: center;
gap: 0.4rem;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text-muted);
}
.death-pips {
display: inline-flex;
gap: 0.25rem;
}
.death-pip {
width: 0.9rem;
height: 0.9rem;
padding: 0;
border-radius: 50%;
border: 2px solid var(--text-dim);
background: transparent;
}
button.death-pip {
cursor: pointer;
}
.death-pip.is-success {
border-color: var(--success-strong);
}
.death-pip.is-failure {
border-color: var(--danger-strong);
}
.death-pip.is-success.is-filled {
background: var(--success-strong);
}
.death-pip.is-failure.is-filled {
background: var(--danger-strong);
}
.combatant-details {
margin-top: 0.75rem;
padding-top: 0.75rem;
border-top: 1px solid var(--border-soft);
font-size: 0.92rem;
}
.combatant-details p {
margin: 0.3rem 0;
}
.detail-row {
display: flex;
justify-content: space-between;
gap: 0.5rem;
padding: 0.2rem 0;
}
.reward-row {
padding: 0.55rem 0;
border-bottom: 1px solid var(--border-soft);
}
.reward-row:last-child {
border-bottom: none;
}
.reward-row.is-awarded {
color: var(--text-muted);
}
.textarea-block {
display: block;
width: 100%;
resize: vertical;
}
/* ---------------------------------------------------------------------- */
/* Character builder: pick-then-confirm choices */
/* ---------------------------------------------------------------------- */
.step-intro {
color: var(--text-muted);
margin: 0 0 1rem;
}
.build-steps {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
}
.build-steps .badge.is-done {
border-color: var(--accent);
color: var(--accent-strong);
}
.build-steps .badge.is-current {
border-color: var(--accent-strong);
background: var(--accent-soft);
color: var(--accent-strong);
font-weight: 700;
}
/* The road from level 1 to 20 (ProgressionTimeline). */
.progression-list {
list-style: none;
margin: 0;
padding: 0;
border-left: 2px solid var(--border);
}
.progression-level {
display: flex;
gap: 0.75rem;
padding: 0.35rem 0 0.35rem 0.75rem;
position: relative;
}
.progression-level::before {
content: '';
position: absolute;
left: -6px;
top: 0.75rem;
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--border);
}
.progression-level.is-reached {
opacity: 0.55;
}
.progression-level.is-reached::before {
background: var(--accent);
}
.progression-level.is-next::before {
background: var(--accent-strong);
box-shadow: 0 0 8px var(--accent-strong);
}
.progression-badge {
font-family: var(--font-heading, inherit);
font-weight: 700;
min-width: 2.2rem;
display: flex;
flex-direction: column;
gap: 0.2rem;
align-items: flex-start;
}
.progression-gains {
flex: 1;
min-width: 0;
font-size: 0.9rem;
}
.progression-feature + .progression-feature {
margin-top: 0.2rem;
}
.progression-feature .badge {
margin-left: 0.4rem;
font-size: 0.7rem;
}
.choice-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
gap: 0.75rem;
text-align: left;
}
.choice-card {
display: flex;
flex-direction: column;
gap: 0.4rem;
text-align: left;
font-family: var(--font-body);
font-size: 0.95rem;
color: var(--text);
background: var(--bg-inset);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 0.9rem 1rem;
cursor: pointer;
transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.choice-card:hover {
border-color: var(--accent);
transform: translateY(-1px);
}
.choice-card:focus-visible {
outline: none;
box-shadow: 0 0 0 3px var(--accent-soft);
}
.choice-card.is-selected {
border-color: var(--accent-strong);
box-shadow: 0 0 0 1px var(--accent-strong), 0 0 18px rgba(201, 162, 39, 0.25);
background: linear-gradient(160deg, var(--bg-card-hover) 0%, var(--bg-inset) 100%);
}
.choice-card-title {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
font-family: var(--font-display);
font-size: 1.1rem;
color: var(--accent-strong);
}
.choice-card-blurb {
color: var(--text-muted);
font-style: italic;
}
.choice-card-facts {
color: var(--text-muted);
font-size: 0.85rem;
}
.step-footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
margin-top: 1.25rem;
padding-top: 1rem;
border-top: 1px solid var(--border-soft);
text-align: left;
}
.stat-block.is-key {
border-color: var(--accent);
}
.key-marker {
color: var(--accent-strong);
font-size: 0.7rem;
text-transform: uppercase;
letter-spacing: 0.06em;
}
/* ---------------------------------------------------------------------- */
/* Dice roller — on every page, bottom-left (quick stats owns bottom-right) */
/* ---------------------------------------------------------------------- */
.fab-dice {
position: fixed;
bottom: 1.25rem;
left: 1.25rem;
z-index: 80;
border-radius: 999px;
width: 60px;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
background: radial-gradient(circle at 35% 30%, #3a2e18, #1c160c 70%);
border: 2px solid var(--accent);
color: var(--accent-strong);
font-size: 1.6rem;
cursor: pointer;
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(201, 162, 39, 0.3);
transition: transform 0.15s ease;
}
.fab-dice:hover {
transform: translateY(-2px) rotate(-8deg);
}
.dice-panel {
position: fixed;
bottom: calc(1.25rem + 60px + 0.75rem);
left: 1.25rem;
z-index: 85;
width: min(340px, calc(100vw - 2.5rem));
max-height: calc(100vh - 8rem);
overflow-y: auto;
background: linear-gradient(180deg, #1c160d 0%, #120e08 100%);
border: 1px solid var(--accent);
border-radius: var(--radius);
box-shadow: var(--shadow-deep);
padding: 1rem;
}
.dice-choices {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 0.4rem;
}
.die-btn {
font-family: var(--font-display);
font-size: 0.95rem;
padding: 0.55rem 0;
border-radius: 6px;
border: 1px solid var(--border);
background: var(--bg-inset);
color: var(--text);
cursor: pointer;
transition: border-color 0.15s ease, color 0.15s ease;
}
.die-btn:hover {
border-color: var(--accent);
color: var(--accent-strong);
}
.die-btn.is-selected {
border-color: var(--accent-strong);
background: var(--accent-soft);
color: var(--accent-strong);
font-weight: 700;
}
.dice-label {
font-size: 0.7rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-dim);
}
.dice-result {
text-align: center;
min-height: 6.5rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 0.75rem 0;
padding: 0.5rem;
background: var(--bg-inset);
border: 1px solid var(--border-soft);
border-radius: var(--radius);
}
.roll-result.is-crit {
color: var(--success-strong);
text-shadow: 0 0 20px rgba(122, 178, 102, 0.6);
}
.roll-result.is-fumble {
color: var(--danger-strong);
text-shadow: 0 0 20px rgba(216, 84, 84, 0.5);
}
.dice-callout {
font-family: var(--font-display);
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--success-strong);
}
.dice-callout.is-fumble {
color: var(--danger-strong);
}
.dice-breakdown {
color: var(--text-muted);
font-size: 0.85rem;
word-break: break-word;
}
.dice-history-row {
padding: 0.25rem 0;
border-top: 1px solid var(--border-soft);
font-size: 0.9rem;
}
.dice-history-dice {
color: var(--text-dim);
font-size: 0.8rem;
}
/* ---------------------------------------------------------------------- */
/* Character builder: story steps (motivation, abilities, background, look) */
/* ---------------------------------------------------------------------- */
.pick-group {
padding: 0.75rem 0;
border-top: 1px solid var(--border-soft);
}
.pick-group:first-of-type {
border-top: none;
}
.pick-group-label {
font-family: var(--font-display);
color: var(--accent);
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.06em;
}
.pick-chips {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin-top: 0.5rem;
}
.pick-chip {
font-family: var(--font-body);
font-size: 0.95rem;
padding: 0.35rem 0.8rem;
border-radius: 999px;
border: 1px solid var(--border);
background: var(--bg-inset);
color: var(--text);
cursor: pointer;
transition: border-color 0.15s ease, color 0.15s ease;
}
.pick-chip:hover:not(:disabled) {
border-color: var(--accent);
}
.pick-chip.is-selected {
border-color: var(--accent-strong);
background: var(--accent-soft);
color: var(--accent-strong);
font-weight: 600;
}
.pick-chip:disabled {
opacity: 0.45;
cursor: not-allowed;
}
.pick-detail {
color: var(--text-muted);
font-style: italic;
margin: 0.4rem 0 0;
}
.granted-ability {
padding: 0.4rem 0;
border-bottom: 1px solid var(--border-soft);
}
.granted-ability:last-child {
border-bottom: none;
}
/* Text the builder composed, shown read-only on the sheet. */
.composed-text {
margin: 0;
white-space: pre-wrap;
}
/* ---------------------------------------------------------------------- */
/* Navigation: links along the top bar on a wide screen, a bar along the */
/* bottom on a phone; and a row of links to the sections of a long page */
/* ---------------------------------------------------------------------- */
.topbar-links {
display: flex;
align-items: center;
gap: 0.25rem;
}
.topbar-link {
display: inline-flex;
align-items: center;
gap: 0.35rem;
padding: 0.35rem 0.7rem;
border-radius: 6px;
border: 1px solid transparent;
color: var(--text-muted);
font-family: var(--font-display);
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.topbar-link:hover {
text-decoration: none;
color: var(--accent-strong);
border-color: var(--border);
}
.topbar-link.is-active {
color: var(--accent-strong);
border-color: var(--accent);
background: var(--accent-soft);
}
.topbar-name {
max-width: 14ch;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.bottom-nav {
display: none;
}
.jump-nav {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin-bottom: 1.25rem;
}
.jump-link {
font-family: var(--font-display);
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
padding: 0.4rem 0.75rem;
border-radius: 999px;
border: 1px solid var(--border);
background: var(--bg-inset);
color: var(--text-muted);
cursor: pointer;
}
.jump-link:hover {
border-color: var(--accent);
color: var(--accent-strong);
}
/* A section jumped to stops below the sticky top bar, not under it. */
[data-jump] {
scroll-margin-top: 4.5rem;
}
/* A table cell that holds a sentence rather than a figure may wrap. */
table.data-table td.cell-title,
table.data-table td.cell-wide {
white-space: normal;
min-width: 12rem;
}
/* ---------------------------------------------------------------------- */
/* Small screens. Nothing may be wider than the screen: rows of controls */
/* wrap, fields shrink to fit, tables become stacked cards, and the main */
/* destinations move to a bar along the bottom. */
/* ---------------------------------------------------------------------- */
html {
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
}
body,
#root,
.app-shell {
min-height: 100dvh;
}
/* A field never forces its row wider than the space there is. */
input,
select,
textarea {
max-width: 100%;
min-width: 0;
}
@media (max-width: 900px) {
:root {
--bottom-nav-height: calc(3.6rem + env(safe-area-inset-bottom, 0px));
--dice-slot: 4.2rem;
}
body {
overflow-wrap: break-word;
}
.page {
padding: 1rem 0.85rem calc(var(--bottom-nav-height) + 1.5rem);
}
.topbar {
padding: 0.5rem 0.85rem;
gap: 0.5rem;
}
.topbar-brand {
font-size: 1rem;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.topbar-links,
.topbar-name {
display: none;
}
.topbar-nav {
flex-wrap: nowrap;
}
.bottom-nav {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 70;
display: flex;
height: var(--bottom-nav-height);
padding-bottom: env(safe-area-inset-bottom, 0px);
background: linear-gradient(180deg, #1e1810 0%, #120e08 100%);
border-top: 1px solid var(--border);
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.45);
}
.bottom-nav-link {
flex: 1 1 0;
min-width: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.1rem;
color: var(--text-muted);
font-family: var(--font-display);
font-size: 0.68rem;
text-transform: uppercase;
letter-spacing: 0.04em;
border-top: 2px solid transparent;
}
.bottom-nav-link:hover {
text-decoration: none;
}
.bottom-nav-link .nav-icon {
font-size: 1.25rem;
line-height: 1.2;
}
.bottom-nav-link.is-active {
color: var(--accent-strong);
border-top-color: var(--accent-strong);
background: var(--accent-soft);
}
/* Nothing floats over the page on a phone. The dice roller takes the last
place in the bottom bar, and quick stats a place in the top bar. */
.bottom-nav {
padding-right: var(--dice-slot);
}
.fab-dice {
left: auto;
right: 0;
bottom: 0;
z-index: 71;
width: var(--dice-slot);
height: var(--bottom-nav-height);
padding: 0 0 env(safe-area-inset-bottom, 0px);
flex-direction: column;
gap: 0.1rem;
border: none;
border-top: 2px solid transparent;
border-radius: 0;
background: transparent;
box-shadow: none;
font-size: 1.25rem;
line-height: 1.2;
color: var(--text-muted);
}
.fab-dice::after {
content: 'Dice';
font-family: var(--font-display);
font-size: 0.68rem;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.fab-dice:hover {
transform: none;
}
.dice-incoming {
left: 0.85rem;
bottom: calc(var(--bottom-nav-height) + 0.6rem);
width: calc(100vw - 1.7rem);
}
.dice-panel {
left: 0.85rem;
bottom: calc(var(--bottom-nav-height) + 0.6rem);
width: calc(100vw - 1.7rem);
max-height: calc(100dvh - var(--bottom-nav-height) - 5rem);
}
/* Log out has a set width on a phone, so quick stats can sit just left of it. */
.topbar-user .btn {
width: 5.2rem;
padding: 0.45rem 0.3rem;
}
.fab-quickstats {
top: calc((var(--topbar-h) - 40px) / 2);
bottom: auto;
right: calc(0.85rem + 5.2rem + 0.5rem);
z-index: 31;
width: 40px;
height: 40px;
font-size: 1.15rem;
box-shadow: none;
}
/* The brand makes room for it. */
.app-shell:has(.fab-quickstats) .topbar-brand {
max-width: calc(100vw - 0.85rem - 6.55rem - 40px - 1.25rem);
}
.drawer {
width: 100vw;
padding: 1rem 0.85rem calc(var(--bottom-nav-height) + 1rem);
z-index: 95;
}
.drawer-backdrop {
z-index: 94;
}
h1 {
font-size: 1.5rem;
}
.card {
padding: 0.9rem 0.85rem;
}
.card-title {
flex-wrap: wrap;
}
.page-header {
margin-bottom: 1rem;
}
/* Rows of controls wrap instead of running off the side, and what is in
them may shrink: an inline min-width never beats the screen. */
.flex-row,
.flex-between,
.detail-row {
flex-wrap: wrap;
}
.flex-row > *,
.flex-between > * {
max-width: 100%;
}
.flex-row > input,
.flex-row > select,
.flex-row > textarea,
.flex-row > a,
.flex-between > a {
min-width: min(100%, 8rem) !important;
}
.btn {
padding: 0.6rem 0.9rem;
}
.grid-cols-2 {
grid-template-columns: minmax(0, 1fr);
}
.grid-cols-3 {
grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
}
.choice-grid {
grid-template-columns: 1fr;
}
.btn-roll {
font-size: 1.1rem;
padding: 1.1rem 1.25rem;
max-width: 100%;
}
.step-footer > * {
flex: 1 1 auto;
}
/* Things to tap are big enough to hit with a thumb. */
input[type='checkbox'],
input[type='radio'] {
width: 22px;
height: 22px;
flex: none;
}
.death-pip {
width: 1.5rem;
height: 1.5rem;
}
.btn-target {
padding: 0.4rem 0.75rem;
}
.condition-chip {
padding: 0.3rem 0.6rem;
}
.condition-chip button {
padding: 0.15rem 0.35rem;
font-size: 1rem;
}
.info-tip-trigger {
font-size: 1.05em;
padding: 0.2rem;
}
.pick-chip {
padding: 0.5rem 0.9rem;
}
.jump-link {
padding: 0.5rem 0.8rem;
}
[data-jump] {
scroll-margin-top: 3.8rem;
}
/* Tables: every row becomes a card. The first cell is its heading; the
rest carry their column's name from data-label. */
.table-wrap {
overflow: visible;
border: none;
}
table.data-table,
table.data-table tbody {
display: block;
}
table.data-table thead {
display: none;
}
table.data-table tbody tr {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.35rem 0.9rem;
padding: 0.7rem 0.75rem;
margin-bottom: 0.6rem;
background: var(--bg-inset);
border: 1px solid var(--border-soft);
border-radius: var(--radius);
}
table.data-table tbody tr:last-child {
border-bottom: 1px solid var(--border-soft);
margin-bottom: 0;
}
table.data-table tbody tr:hover {
background: var(--bg-inset);
}
table.data-table td {
display: flex;
align-items: center;
gap: 0.4rem;
padding: 0;
white-space: normal;
min-width: 0;
}
table.data-table td:empty {
display: none;
}
table.data-table td.cell-title,
table.data-table td.cell-wide {
display: block;
flex: 1 1 100%;
min-width: 0;
}
table.data-table td.cell-title {
font-size: 1.05rem;
}
table.data-table td[data-label]::before {
content: attr(data-label);
font-size: 0.65rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-dim);
flex: none;
}
table.data-table td.cell-actions {
margin-left: auto;
}
}
/* The narrowest phones: five places in the bottom bar still fit. */
@media (max-width: 380px) {
:root {
--dice-slot: 3.4rem;
}
.bottom-nav-link,
.fab-dice::after {
font-size: 0.58rem;
letter-spacing: 0;
}
}
/* Between a phone and a full desktop the top bar drops the name to stay on one line. */
@media (max-width: 1080px) {
.topbar-name {
display: none;
}
.topbar-nav {
flex-wrap: nowrap;
}
}
/* ---------------------------------------------------------------------- */
/* "This one is yours": a player's own character, wherever it is listed */
/* ---------------------------------------------------------------------- */
.badge-mine {
border-color: var(--arcane-strong);
color: var(--arcane-strong);
background: rgba(92, 127, 176, 0.18);
}
.mine-marker {
color: var(--arcane-strong);
font-family: var(--font-display);
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.combatant.is-mine {
border-color: var(--arcane-strong);
background: linear-gradient(160deg, #1d2431 0%, var(--bg-elevated) 100%);
box-shadow: 0 0 0 1px var(--arcane-strong), 0 0 20px rgba(127, 163, 214, 0.22), var(--shadow-deep);
}
/* Whose turn it is and who is targeted still win the border. */
.combatant.is-mine.is-active {
border-color: var(--accent-strong);
box-shadow: 0 0 0 1px var(--accent-strong), 0 0 22px rgba(201, 162, 39, 0.25), var(--shadow-deep);
}
.combatant.is-mine.is-targeted {
border-color: var(--danger-strong);
box-shadow: 0 0 0 1px var(--danger-strong), 0 0 22px rgba(216, 84, 84, 0.3), var(--shadow-deep);
}
.jump-link.is-mine {
border-color: var(--arcane-strong);
color: var(--arcane-strong);
background: rgba(92, 127, 176, 0.18);
}
table.data-table tbody tr.is-mine,
table.data-table tbody tr.is-mine:hover {
background: rgba(92, 127, 176, 0.16);
box-shadow: inset 4px 0 0 var(--arcane-strong);
}
/* A bonus from gear reads green; a penalty keeps the red of a condition. */
.condition-chip.is-bonus {
border-color: var(--success);
color: var(--success-strong);
background: rgba(95, 138, 79, 0.18);
}
/* ---------------------------------------------------------------------- */
/* The campaign page: one part at a time, picked from a row of buttons; */
/* lists as short rows; and the pop-out a row opens */
/* ---------------------------------------------------------------------- */
.campaign-search {
width: 100%;
margin-bottom: 0.75rem;
}
.section-nav {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin-bottom: 1.25rem;
}
.section-nav .jump-link {
display: inline-flex;
align-items: center;
gap: 0.35rem;
white-space: nowrap;
}
.jump-link.is-active {
border-color: var(--accent);
color: var(--accent-strong);
background: var(--accent-soft);
}
.section-count {
font-family: var(--font-body);
font-size: 0.75rem;
color: var(--text-dim);
}
.section-block + .section-block {
margin-top: 2rem;
}
.search-group + .search-group {
margin-top: 1.25rem;
}
.entry-list {
border: 1px solid var(--border-soft);
border-radius: var(--radius);
overflow: hidden;
}
.entry-list:empty {
display: none;
}
.entry-row {
display: flex;
align-items: center;
gap: 0.6rem;
width: 100%;
padding: 0.6rem 0.75rem;
background: transparent;
border: none;
border-bottom: 1px solid var(--border-soft);
color: var(--text);
text-align: left;
cursor: pointer;
}
.entry-row:last-child {
border-bottom: none;
}
.entry-row:hover,
.entry-row:focus-visible {
background: var(--bg-card-hover);
text-decoration: none;
outline: none;
}
.entry-row-main {
flex: 1 1 auto;
min-width: 0;
display: flex;
flex-direction: column;
}
.entry-row-name {
font-family: var(--font-display);
color: var(--accent-strong);
}
/* A few words only: the whole of it is in the pop-out. */
.entry-row-meta {
color: var(--text-muted);
font-size: 0.85rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.entry-row-badges {
flex: none;
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 0.3rem;
max-width: 45%;
}
.entry-row-chevron {
flex: none;
color: var(--text-dim);
font-size: 1.3rem;
line-height: 1;
}
.modal-backdrop {
position: fixed;
inset: 0;
z-index: 96;
display: flex;
align-items: flex-start;
justify-content: center;
padding: 5vh 1rem;
background: rgba(0, 0, 0, 0.65);
backdrop-filter: blur(2px);
}
.modal {
display: flex;
flex-direction: column;
width: min(620px, 100%);
max-height: 90dvh;
background: linear-gradient(180deg, #1c160d 0%, #120e08 100%);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow-deep);
}
.modal:focus {
outline: none;
}
.modal.is-wide {
width: min(860px, 100%);
}
.modal-head {
flex: none;
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 0.75rem;
padding: 0.9rem 0.6rem 0.75rem 1.2rem;
border-bottom: 1px solid var(--border-soft);
}
.modal-title {
font-size: 1.2rem;
margin: 0;
overflow-wrap: anywhere;
}
.modal-body {
overflow-y: auto;
padding: 1rem 1.2rem 1.25rem;
}
.modal-body .field input,
.modal-body .field select {
width: 100%;
}
.modal-foot {
margin-top: 1.5rem;
padding-top: 1rem;
border-top: 1px solid var(--border-soft);
display: flex;
justify-content: flex-end;
}
/* ---------------------------------------------------------------------- */
/* Spell slots, rests and levelling up */
/* ---------------------------------------------------------------------- */
.spell-slots {
margin-top: 0.75rem;
padding-top: 0.6rem;
border-top: 1px solid var(--border-soft);
}
.slot-row {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.3rem 0;
}
.slot-level {
width: 2.2rem;
font-family: var(--font-display);
color: var(--accent-strong);
}
.slot-pips {
display: inline-flex;
flex-wrap: wrap;
gap: 0.3rem;
flex: 1;
min-width: 0;
}
/* A slot still there to spend is filled; a spent one is an empty ring. */
.slot-pip {
width: 1rem;
height: 1rem;
padding: 0;
border-radius: 3px;
border: 2px solid var(--accent);
background: transparent;
transform: rotate(45deg);
margin: 0.15rem;
}
.slot-pip.is-filled {
background: var(--accent-strong);
}
button.slot-pip {
cursor: pointer;
}
button.slot-pip:disabled {
cursor: default;
}
.slot-count {
color: var(--text-muted);
}
.slot-row .btn {
padding: 0.25rem 0.7rem;
}
.rest-dice {
padding-left: 1.75rem;
}
.level-step {
padding: 0.75rem 0;
border-bottom: 1px solid var(--border-soft);
}
.level-step:last-of-type {
border-bottom: none;
}
.level-step p {
margin: 0.4rem 0 0;
}
.level-choice {
align-items: flex-start;
margin: 0.35rem 0;
}
.level-choice input {
margin-top: 0.25rem;
}
.level-spells {
max-height: 14rem;
overflow-y: auto;
margin-top: 0.4rem;
padding: 0.2rem 0.6rem;
border: 1px solid var(--border-soft);
border-radius: 6px;
}
@media (max-width: 900px) {
.slot-pip {
width: 1.3rem;
height: 1.3rem;
}
.rest-dice {
padding-left: 0;
}
}
.pagination .pagination-status > select {
min-width: 0 !important;
padding: 0.3rem 0.5rem;
}
@media (max-width: 900px) {
/* The parts of the campaign are one line that scrolls sideways, edge to edge. */
.section-nav {
flex-wrap: nowrap;
overflow-x: auto;
margin: 0 -0.85rem 1rem;
padding: 0 0.85rem 0.35rem;
scrollbar-width: none;
}
.section-nav::-webkit-scrollbar {
display: none;
}
.section-nav .jump-link {
flex: none;
}
.entry-row {
padding: 0.75rem 0.7rem;
}
/* A pop-out is the whole screen, over the bottom bar too. */
.modal-backdrop {
padding: 0;
}
.modal,
.modal.is-wide {
width: 100%;
height: 100dvh;
max-height: none;
border: none;
border-radius: 0;
}
.modal-head {
padding: 0.7rem 0.4rem 0.6rem 0.85rem;
}
.modal-body {
flex: 1;
padding: 0.9rem 0.85rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}
}
/* At the top of the pop-out of something added a moment ago. */
.added-bar {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 1rem;
padding: 0.5rem 0.75rem;
border: 1px solid var(--success);
border-radius: var(--radius);
background: rgba(95, 138, 79, 0.14);
color: var(--success-strong);
}
/* ---------------------------------------------------------------------------
The battle at a glance: the turn strip, the spotlight, saves and skills
--------------------------------------------------------------------------- */
/* Everyone in the scene on one line that stays under the top bar. */
.turn-strip {
position: sticky;
top: var(--topbar-h);
z-index: 25;
display: flex;
gap: 0.4rem;
overflow-x: auto;
margin: 0 -0.25rem 1rem;
padding: 0.5rem 0.25rem;
background: var(--bg);
border-bottom: 1px solid var(--border-soft);
scrollbar-width: thin;
}
.turn-chip {
flex: 0 0 auto;
display: flex;
flex-direction: column;
gap: 0.1rem;
min-width: 5.5rem;
max-width: 10rem;
padding: 0.3rem 0.6rem;
border-radius: 6px;
border: 1px solid var(--border);
background: var(--bg-inset);
color: var(--text-muted);
font: inherit;
text-align: left;
cursor: pointer;
}
.turn-chip:hover {
border-color: var(--accent);
}
.turn-chip-name {
font-family: var(--font-display);
font-size: 0.78rem;
letter-spacing: 0.03em;
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.turn-chip-sub {
font-size: 0.72rem;
color: var(--text-dim);
white-space: nowrap;
}
.turn-chip .hp-bar-track {
margin: 0;
}
.turn-chip.is-mine {
border-color: var(--arcane-strong);
}
.turn-chip.is-targeted {
border-color: var(--danger-strong);
background: var(--danger-soft);
}
.turn-chip.is-active {
border-color: var(--accent-strong);
background: var(--accent-soft);
box-shadow: 0 0 0 1px var(--accent-strong);
}
.turn-chip.is-active .turn-chip-name {
color: var(--accent-strong);
}
.turn-chip.has-acted {
opacity: 0.55;
}
/* On a wide screen the side column stays in view, scrolling on its own. */
@media (min-width: 960px) {
.encounter-side {
position: sticky;
top: calc(var(--topbar-h) + 4rem);
max-height: calc(100vh - var(--topbar-h) - 4.8rem);
overflow-y: auto;
scrollbar-width: thin;
padding-right: 2px;
/* Room to scroll the last card up past the quick-stats button. */
padding-bottom: 5rem;
}
}
.spotlight {
border-color: var(--accent);
}
.link-button {
background: none;
border: 0;
padding: 0;
font: inherit;
color: inherit;
text-align: left;
cursor: pointer;
}
.link-button:hover {
color: var(--accent-strong);
}
.sheet-numbers .section-label {
margin: 0.6rem 0 0.25rem;
}
.number-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
column-gap: 1rem;
}
.number-grid.is-saves {
grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
}
.number-row {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 0.4rem;
padding: 0.12rem 0;
font-size: 0.9rem;
color: var(--text-muted);
border-bottom: 1px dotted var(--border-soft);
}
.number-row.is-proficient {
color: var(--text);
}
.number-row.is-proficient b {
color: var(--accent-strong);
}
.prof-mark {
color: var(--accent);
font-size: 0.7rem;
}
.number-ability {
font-size: 0.62rem;
letter-spacing: 0.06em;
color: var(--text-dim);
}
/* A card that folds away: the title is the switch. */
summary.card-title {
cursor: pointer;
list-style: none;
justify-content: flex-start;
}
summary.card-title::-webkit-details-marker {
display: none;
}
summary.card-title::after {
content: '▾';
color: var(--text-dim);
margin-left: auto;
}
details:not([open]) > summary.card-title {
margin-bottom: 0;
}
details:not([open]) > summary.card-title::after {
content: '▸';
}
/* In one column the card on turn is already at the top of the list. */
@media (max-width: 959px) {
.spotlight,
.btn-pin {
display: none;
}
}
/* ---------------------------------------------------------------------------
Character state: inspiration, exhaustion, conditions, class counters
--------------------------------------------------------------------------- */
.btn-target.is-lit {
border-color: var(--accent-strong);
color: var(--accent-strong);
background: var(--accent-soft);
}
.condition-chip[title] {
cursor: help;
}
.condition-note {
opacity: 0.8;
font-size: 0.72rem;
}
.resource-tracker {
margin-top: 0.5rem;
}
.resource-name {
display: flex;
flex-direction: column;
min-width: 7.5rem;
max-width: 11rem;
line-height: 1.15;
}
.resource-rest {
font-size: 0.62rem;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text-dim);
}
.notice-card {
border-color: var(--arcane-strong);
background: rgba(92, 127, 176, 0.12);
margin-bottom: 1rem;
}
/* ---------------------------------------------------------------------------
Numbers that roll when clicked
--------------------------------------------------------------------------- */
.rollable {
background: none;
border: 0;
padding: 0;
margin: 0;
font: inherit;
color: inherit;
text-align: inherit;
cursor: pointer;
text-decoration: underline dotted var(--border);
text-underline-offset: 3px;
}
.rollable:hover,
.rollable:focus-visible {
color: var(--accent-strong);
text-decoration-color: var(--accent);
}
/* A whole row or chip that rolls keeps its own shape. */
.rollable.number-row {
width: 100%;
text-decoration: none;
border-bottom: 1px dotted var(--border-soft);
}
.rollable.number-row:hover {
background: var(--accent-soft);
}
.rollable:has(> .stat-chip) {
text-decoration: none;
display: inline-flex;
}
.rollable:hover > .stat-chip {
border-color: var(--accent);
}
.rollable.stat-sub {
display: block;
width: 100%;
text-align: center;
}
.roll-label {
text-align: center;
}